| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Templatable
Templatable is one of the Application Component Interfaces, implemented by a composite application component. Templatable is used to save your component's state information in an application template and to recreate it from a template.
Lifecycle.removeInstance(String) will be called to compensate for a failed template instantiation.
Note: The component instance identifier input parameter used in Templatable methods is the identifer returned by the createFromTemplate(Reader, ListModel) method if it was created from a template, otherwise it is the id from the Lifecycle.createInstance(ListModel) method.
Method Summary | |
---|---|
ListModel | java.io.Reader, com.ibm.portal.ListModel)">createFromTemplate(java.io.Reader objectData,
ListModel variables)
Called when an instance of this component is created from a template. |
ListModel | java.io.Writer)">serializeToTemplate(java.lang.String id,
java.io.Writer objectData)
Writes a description of this component instance to a Writer. |
Method Detail |
---|
ListModel serializeToTemplate(java.lang.String id, java.io.Writer objectData) throws java.io.IOException, ComponentException
null
.<object-data>your characters</object-data>
null
but may be empty.
ListModel createFromTemplate(java.io.Reader objectData, ListModel variables) throws java.io.IOException, ComponentException
The instance identifier that you return from this method is used to identify this component instance according to the fly weight pattern. I.e. whenever the application infrastructure calls any other Application Component Interface methods this id is passed in. For example, you could store any state information for this component instance in a resource that has a unique identifer, and return that identifier as the instance ID for this component. That pattern also implies that no instance variables should be used as there is no defined relation between the Java instances of the implementation class and the component instances in the system. The instance ID can be any string, but it must distinguish this component instance from all other instances of the same component.
null
.Variable.APPLICATION_ID
, must not be null
.
null
.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |