org.eclipse.jet.taglib
Interface CustomTag

All Known Subinterfaces:
ConditionalTag, ContainerTag, EmptyTag, FunctionTag, IteratingTag, OtherTag
All Known Implementing Classes:
AbstractConditionalTag, AbstractContainerTag, AbstractCustomTag, AbstractEmptyTag, AbstractFunctionTag, AbstractIteratingTag, AbstractOtherTag

public interface CustomTag

Interface representing common characteristics of JET2 custom tags.

All custom tags have the same setup sequence. The following methods are always called to initialize a tag:

  • CustomTag.setParent(CustomTag) specifying the containing tag, if any.
  • CustomTag.setTagInfo(TagInfo) specifying the tag attribute values.
  • CustomTag.setContext(JET2Context) specifying the JET execution context.
  • CustomTag.setOut(JET2Writer) specifying the writer to which the tag should write.
  • This interface is not intended to be directly implemented by clients


    Method Summary
     java.lang.String getAttribute(java.lang.String name)
              Return the processed value of the tag attribute (with dynamic XPath expressions already resolved.
     CustomTagKind getKind()
              Return the kind of the custom tag
     JET2Writer getOut()
              Return the writer to which the tag will write.
     CustomTag getParent()
              Return the parent tag.
     java.lang.String getRawAttribute(java.lang.String name)
              Return the 'raw' value of the named tag attribute.
     void setContext(JET2Context context)
              Set the context of the tag.
     void setOut(JET2Writer out)
              Set the writer to which the tag will write.
     void setParent(CustomTag parent)
              Set the custom tag representing the parent of this tag.
     void setTagInfo(TagInfo td)
              Set the tag info for the tag.
     

    Method Detail

    setParent

    public void setParent(CustomTag parent)
    Set the custom tag representing the parent of this tag.

    Parameters:
    parent - the parent tag, or null if the tag has none.

    getParent

    public CustomTag getParent()
    Return the parent tag.

    Returns:
    the parent tag, or null if the tag has none.

    getKind

    public CustomTagKind getKind()
    Return the kind of the custom tag

    Returns:
    the tag kind
    See Also:
    CustomTagKind

    setTagInfo

    public void setTagInfo(TagInfo td)
    Set the tag info for the tag. This is done by the compiler, and is not intended to be called by clients.

    Parameters:
    td - the tag info.

    setContext

    public void setContext(JET2Context context)
    Set the context of the tag. This is done by the compiler, and is not intended to be called by clients.

    Parameters:
    context - the context.

    getRawAttribute

    public java.lang.String getRawAttribute(java.lang.String name)
    Return the 'raw' value of the named tag attribute.

    Parameters:
    name - the tag attribute name.
    Returns:
    the raw value or null if the attribute is not defined.

    getAttribute

    public java.lang.String getAttribute(java.lang.String name)
                                  throws JET2TagException
    Return the processed value of the tag attribute (with dynamic XPath expressions already resolved.

    Parameters:
    name - the tag attribute name.
    Returns:
    the processed value of null if the attribute is not defined.
    Throws:
    JET2TagException - if an error occurs while processing a dynmaic XPath expression.

    setOut

    public void setOut(JET2Writer out)
    Set the writer to which the tag will write.

    Parameters:
    out - a non-null instance of JET2Writer.

    getOut

    public JET2Writer getOut()
    Return the writer to which the tag will write.

    Returns:
    the tag's writer.

    Copyright 2006 IBM Corporation and others.
    All Rights Reserved.