Class MasonTagTypes
- java.lang.Object
-
- MasonTagTypes
-
public final class MasonTagTypes extends java.lang.ObjectContains tag types related to the Mason server platform.There is no specific tag type defined for the Mason substitution tag as it is recognised using the common server tag type.
The tag types defined in this class are not registered by default. The
register()method is provided as a convenient way to register them all at once.
-
-
Field Summary
Fields Modifier and Type Field Description static StartTagTypeMASON_COMPONENT_CALLThe tag type given to a Mason component call (<& ... &>).static StartTagTypeMASON_COMPONENT_CALLED_WITH_CONTENTThe tag type given to the start tag of a Mason component called with content (<&| ... &> ... </&>).static EndTagTypeMASON_COMPONENT_CALLED_WITH_CONTENT_ENDThe tag type given to the end tag of a Mason component called with content.static StartTagTypeMASON_NAMED_BLOCKThe tag type given to the start tag of a Mason named block (<%name ... > ... </%name>).static EndTagTypeMASON_NAMED_BLOCK_ENDThe tag type given to the end tag of a Mason named block.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleandefines(TagType tagType)Indicates whether the specified tag type is defined in this class.static voidderegister()Deregisters all of the tag types defined in this class at once.static booleanisParsedByMason(TagType tagType)Indicates whether the specified tag type is recognised by a Mason parser.static voidregister()Registers all of the tag types defined in this class at once.
-
-
-
Field Detail
-
MASON_COMPONENT_CALL
public static final StartTagType MASON_COMPONENT_CALL
The tag type given to a Mason component call (<& ... &>).- Properties:
-
Property Value Descriptionmason component call StartDelimiter<&ClosingDelimiter&>IsServerTagtrueNamePrefix&CorrespondingEndTagTypenullHasAttributesfalseIsNameAfterPrefixRequiredfalse - Example:
<& menu &>
-
MASON_COMPONENT_CALLED_WITH_CONTENT
public static final StartTagType MASON_COMPONENT_CALLED_WITH_CONTENT
The tag type given to the start tag of a Mason component called with content (<&| ... &> ... </&>).- Properties:
-
Property Value Descriptionmason component called with content StartDelimiter<&|ClosingDelimiter&>IsServerTagtrueNamePrefix&|CorrespondingEndTagTypeMASON_COMPONENT_CALLED_WITH_CONTENT_ENDHasAttributesfalseIsNameAfterPrefixRequiredfalse - Example:
<&| /sql/select, query => 'SELECT name, age FROM User' &> <tr><td>%name</td><td>%age</td></tr> </&>
-
MASON_COMPONENT_CALLED_WITH_CONTENT_END
public static final EndTagType MASON_COMPONENT_CALLED_WITH_CONTENT_END
The tag type given to the end tag of a Mason component called with content.See the corresponding start tag type
MASON_COMPONENT_CALLED_WITH_CONTENTfor more details.- Properties:
-
Property/Method Value Description/mason component called with content StartDelimiter</&ClosingDelimiter>IsServerTagtrueNamePrefix/&CorrespondingStartTagTypeMASON_COMPONENT_CALLED_WITH_CONTENTgenerateHTML("StartTagName")</&> - Example:
</&>
- See Also:
MASON_COMPONENT_CALLED_WITH_CONTENT
-
MASON_NAMED_BLOCK
public static final StartTagType MASON_NAMED_BLOCK
The tag type given to the start tag of a Mason named block (<%name ... > ... </%name>).A tag of this type must not have a '
%' character before its closing delimiter, otherwise it is most likely a common server tag.For the start tag to be recognised, a corresponding end tag of the correct type must exist somewhere in the source document following the start tag.
- Properties:
-
Property Value Descriptionmason named block StartDelimiter<%ClosingDelimiter>IsServerTagtrueNamePrefix%CorrespondingEndTagTypeMASON_NAMED_BLOCK_ENDHasAttributesfalseIsNameAfterPrefixRequiredtrue - Example:
<%perl> print "hello world"; </%perl>
-
MASON_NAMED_BLOCK_END
public static final EndTagType MASON_NAMED_BLOCK_END
The tag type given to the end tag of a Mason named block.See the corresponding start tag type
MASON_NAMED_BLOCKfor more details.- Properties:
-
Property/Method Value Description/mason named block StartDelimiter</%ClosingDelimiter>IsServerTagtrueNamePrefix/%CorrespondingStartTagTypeMASON_NAMED_BLOCKgenerateHTML("%StartTagName")</%StartTagName> - Example:
</%perl>
- See Also:
MASON_NAMED_BLOCK
-
-
Method Detail
-
register
public static void register()
Registers all of the tag types defined in this class at once.The tag types must be registered before the parser will recognise them.
-
deregister
public static void deregister()
Deregisters all of the tag types defined in this class at once.
-
defines
public static boolean defines(TagType tagType)
Indicates whether the specified tag type is defined in this class.- Parameters:
tagType- theTagTypeto test.- Returns:
trueif the specified tag type is defined in this class, otherwisefalse.
-
isParsedByMason
public static boolean isParsedByMason(TagType tagType)
Indicates whether the specified tag type is recognised by a Mason parser.This is true if the specified tag type is defined in this class or if it is the common server tag type.
-
-