EchoPoint
1.0

echopoint.template
Interface CompilationContext


public interface CompilationContext

This interface is used during the compilation of a template.


Method Summary
 void applyStyleSheet(java.io.Reader styleSheetInformation)
          This method will be called by the compilation mechanism if its recognizes style sheet information in the template.
 nextapp.echo.Component getComponent(java.lang.String componentName)
          Gets the Component with the specified contraint name
 PropertyManager getPropertyManager(java.lang.Class componentClazz)
          Returns a PropertyManager for a given Component class.
 java.lang.Object getStateAttribute(java.lang.Object key)
          Returns any state object that has been prevously set into the compilation context, or null if the state key cannot be found.
 boolean isComponentPropertiesSet()
          Returns true if the Component properties have already been set for the template
 boolean isLoudErrorsUsed()
          This returns true if "loud" error messages are to be used during template compilation.
 boolean isPropertiesUsed()
          Returns true if the Component properties will be set from the template tag attributes.
 void setComponentPropertiesSet(boolean flag)
          Called to set whether the Component properties have been set for the given template.
 void setPropertiesUsed(boolean flag)
          Sets whether the Component properties will be set from the template tag attributes.
 void setStateAttribute(java.lang.Object key, java.lang.Object value)
          Called to set some "arbitary" state attribute.
 

Method Detail

getComponent

public nextapp.echo.Component getComponent(java.lang.String componentName)
Gets the Component with the specified contraint name


getPropertyManager

public PropertyManager getPropertyManager(java.lang.Class componentClazz)
Returns a PropertyManager for a given Component class.


isComponentPropertiesSet

public boolean isComponentPropertiesSet()
Returns true if the Component properties have already been set for the template

Returns:
boolean

setComponentPropertiesSet

public void setComponentPropertiesSet(boolean flag)
Called to set whether the Component properties have been set for the given template. This is a call back method that will be invoked by template compilation code once Component properties are set the first time.

Returns:
boolean

isPropertiesUsed

public boolean isPropertiesUsed()
Returns true if the Component properties will be set from the template tag attributes.

Returns:
boolean

setPropertiesUsed

public void setPropertiesUsed(boolean flag)
Sets whether the Component properties will be set from the template tag attributes.


isLoudErrorsUsed

public boolean isLoudErrorsUsed()
This returns true if "loud" error messages are to be used during template compilation.

Returns:
true if lound error messages are to be displayed

setStateAttribute

public void setStateAttribute(java.lang.Object key,
                              java.lang.Object value)
Called to set some "arbitary" state attribute. The implementation is expect to give this value back during a called to getStateAttribute() with the same key value. The backing object must be able to accept null as a key value (eg HashMap).

Parameters:
key - - the key of the state
value - - the value of the state

getStateAttribute

public java.lang.Object getStateAttribute(java.lang.Object key)
Returns any state object that has been prevously set into the compilation context, or null if the state key cannot be found.

Parameters:
key - - the key of the state
Returns:
a value or null if it cant be found.

applyStyleSheet

public void applyStyleSheet(java.io.Reader styleSheetInformation)
                     throws java.lang.Exception
This method will be called by the compilation mechanism if its recognizes style sheet information in the template.

The implementor can then apply the style sheet information in any way it sees fit.

Parameters:
styleSheetInformation - - a reader contain the style sheet information
Throws:
StyleSheetParseException - because it could be a problem
java.lang.Exception

EchoPoint
1.0