Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.jet.taglib
Interface RuntimeTagElement


public interface RuntimeTagElement

Defines the execution behavior an XML Element in a JET2 compiled template.

Clients do not typically use the class directly.

The tag has the following life cycle:

  • Tag constructor is called.
  • Parent tag is set via setParent(). If the tag has no parent, null is passed.
  • The tag context is set via setTagInfo(TagInfo).
  • The tag is readied for operation by a call to doStart().
  • If the element has body content (that is, it is not an empty tag, but a begin-tag/end-tag pair), then okToProcessBody() is called.
  • If okToProcessBody() returns true, then handleBodyContent() is called.
  • okToProcessBody() and handleBodyContent() are called repeatedly until okToProcessBody() returns false.
  • Once body processing is complete, doEnd() is called.
  • This interface is not intended to be implemented by clients.


    Method Summary
     void doEnd ()
              Perform any actions associated with the end of the tag element.
     void doStart ( JET2Context context, JET2Writer out)
              Perform any actions associated with the start of the tag element.
      JET2Context getContext ()
              Return the context passed to doStart(JET2Context, JET2Writer).
      TagInfo getTagInfo ()
              Return the tag context set by setTagInfo(TagInfo).
      JET2Writer getWriter ()
              Return the writer passed to doStart(JET2Context, JET2Writer).
     void handleBodyContent ( JET2Writer bodyContent)
              Handle the body content of the tag element.
     boolean okToProcessBody ()
              Determine if the tag element's body should be processed.
     void setRuntimeParent ( RuntimeTagElement parentTag)
              Set the parent tag of the element.
     void setTagInfo ( TagInfo tagInfo)
              Provide the tag with information on its context within the template, include attribute values and position.
     

    Method Detail

    setRuntimeParent

    void setRuntimeParent(
    RuntimeTagElement parentTag)
    Set the parent tag of the element. This method always called once, after construction, and before ready() is called.

    Parameters:
    parentTag - the parent tag, or null if the tag has no parent in the template.

    setTagInfo

    void setTagInfo(
    TagInfo tagInfo)
    Provide the tag with information on its context within the template, include attribute values and position.

    Parameters:
    tagInfo - the tag information. Will never by null.
    See Also:
    TagInfo

    getTagInfo

    
    TagInfo getTagInfo()
    Return the tag context set by setTagInfo(TagInfo).

    Returns:
    the tag context, or null if not yet set.

    doStart

    void doStart(
    JET2Context context,
                 
    JET2Writer out)
    Perform any actions associated with the start of the tag element.

    Parameters:
    context -
    out -

    doEnd

    void doEnd()
    Perform any actions associated with the end of the tag element.


    okToProcessBody

    boolean okToProcessBody()
    Determine if the tag element's body should be processed. If the tag element has a body (even an empty body), then this method is called repeatedly until false is returned. Each time true is returned, handleBodyContent(JET2Writer) is called.

    Returns:
    true if the body should be processed, false otherwise.

    handleBodyContent

    void handleBodyContent(
    JET2Writer bodyContent)
    Handle the body content of the tag element. This method is called once everytime a call to okToProcessBody() returns true.

    Parameters:
    bodyContent - the writer containing the body content. Will never by null.

    getContext

    
    JET2Context getContext()
    Return the context passed to doStart(JET2Context, JET2Writer).

    Returns:
    the context

    getWriter

    
    JET2Writer getWriter()
    Return the writer passed to doStart(JET2Context, JET2Writer).

    Returns:
    the current output writer

    Copyright 2006 IBM Corporation and others.
    All Rights Reserved.


     
     
      Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire