Plumtree Tags API  
 

com.plumtree.portaluiinfrastructure.tags.metadata Namespace

Adaptive Tag API Documentation

Namespace hierarchy

Classes

Class Description
ARelatedTag This base class provides programmatic access to the tag meta data for required and related parent and child tags.

Adding public static final member variables of the various ARelatedTag classes turns on validation that a tag is being used in the correct context, as well as providing useful documentation information.
ATagAttribute This base class provides programmatic access to the tag meta data for attributes, including name, description, type, requirement, and default values.

Adding public static final member variables of the various ATagAttribute classes turns on validation that the tag attributes are being used correctly, as well as providing useful documentation information.
AttributeType This enumeration specifies the type of an attribute. If the input value of a required attribute cannot be converted to the correct type, an error will be raised and the tag will not be displayed (for required attributes only).

Information about valid inputs for each type is provided with each enumeration value. In general, the Tag Framework uses the XPConvert class to convert the string attribute value into the appropriate type.
OptionalTagAttribute This class provides programmatic access to the tag meta data for optional attributes, including name, description, type, and default values.

Tag classes need to have one public static final OptionalTagAttribute member variable for every attribute that this tag supports, but does not require.

E.G.
<pt:thistag pt:firstattribute="foo" pt:secondattribute="bar"/>
would need
public static final OptionalTagAttribute = new OptionalTagAttribute( "firstattribute", "This optional attribute is used to ...", AttributeType.STRING, "first default value");
public static final OptionalTagAttribute = new OptionalTagAttribute( "secondattribute", "This optional attribute is used to ...", AttributeType.STRING, "second default value");

The OptionalTagAttribute objects are used for programmatic access to tag meta data, as well as to pre-process tags for tag attributes (presence, correct type, and default values). If the attribute values are not correct, the default values will be used instead. An error will be logged, but the tag and its children will still be displayed.
RelatedChildTag This class provides programmatic access to the tag meta data for related child tags.

Tag classes need to have one public static final RelatedChildTag member variable for every related RelatedChildTag that should be in the documentation for this tag. The related child tag must be in the same library as this tag.

Specifying related tags is simply a convenience to tell users of the main tag that it is designed to work with the child tag. Any tag can be used inside any other tag, regardless of whether or not it is specified as a related child tag.
RequiredChildTag This class provides programmatic access to the tag meta data for required child tags.

Tag classes need to have one public static final RequiredChildTag member variable for every child tag that this tag requires. The required child tag must be in the same library as this tag.

If this child tag is required to be present every time the main tag is used, and the child tag is not present, an error will be logged and the tag and its children will be skipped and not displayed. An HTML Comment describing the tag and error will be displayed instead.

E.G. If parenttag requires childtag to be present, then
<pt:parenttag><pt:childtag/></pt:parenttag>
will work, but
<pt:parenttag>text</pt:parenttag>
will not work, because childtag is required to be inside of parenttag.
RequiredParentTag This class provides programmatic access to the tag meta data for required parent tags.

If a tag class requires a specific parent tag in order to function, the class needs to have at least one public static final RequiredParentTag member variable that specifies the required parent tag. The required parent tag must be in the same library as this tag.

If this tag is used outside of the required parent tag, an error will be logged and the tag and its children will be skipped and not displayed. An HTML Comment describing the tag and error will be displayed instead.

If multiple required parent tags are specified, then at least one required parent tag must be present for the tag to function (but not all parent tags are required to be present).

E.G. If thistag requires parenttag to be present, then
<pt:parenttag><pt:thistag/></pt:parenttag>
will work, but
<pt:thistag/>
will not work, because thistag is required to be inside of parenttag.
RequiredTagAttribute This class provides programmatic access to the tag meta data for required attributes, including name, description, and type.

Tag classes need to have one public static final RequiredTagAttribute member variable for every attribute that this tag requires.

E.G.
<pt:thistag pt:firstattribute="foo" pt:secondattribute="bar"/>
would need
public static final RequiredTagAttribute = new RequiredTagAttribute( "firstattribute", "This attribute is used to ...");
public static final RequiredTagAttribute = new RequiredTagAttribute( "secondattribute", "This attribute is used to ...");

The RequiredTagAttribute objects are used for programmatic access to tag meta data, as well as to pre-process tags for required attributes (presence and correct type). If the attributes are not correct (missing required attribute or bad value), an error will be logged and the tag and its children will be skipped and not displayed. An HTML Comment describing the tag and error will be displayed instead.
TagLibraryMetaData This class provides programmatic access to the tag library meta data for name and description.

This class also enforces all lower case for the names of libraries.
TagMetaData This class also enforces all lower case for the names of tags.

Interfaces

Interface Description
ITagLibraryMetaData This class provides programmatic access to the tag library meta data for name and description.

Tag libraries need to contain exactly one ITagLibraryMetaData class with exactly one public static final TagLibraryMetaData member variable that provides the meta information about the Tag Library.
ITagMetaData This class provides programmatic access to the tag meta data for name, description, and example.

Tag classes need to have exactly one public static final ITagMetaData member variable that provides the name, description, and example text for this Tag.

E.G.
<pt:thistag/>
would need
public static final ITagMetaData = new TagMetaData("thistag", "This tag displays some HTML ...");