| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Serializable
Serializable is one of the Application Component Interfaces, implemented by a composite application component. It is used to save the state of your component into an application XML.
Note: The component instance identifier input parameter used in the #serializeInstance(String, Map) method is the identifer returned by the Templateable#createFromTemplate(Reader, ListModel) method if it was created from a template, otherwise it is the id from the Lifecycle.createInstance(ListModel) method.
Field Summary | |
---|---|
static java.lang.String | NAMESPACE_60
|
static java.lang.String | NAMESPACE_601
|
static java.lang.String | NAMESPACE_61
|
Method Summary | |
---|---|
void | cancelDeserializeInstance(javax.xml.transform.Result result)
Called if an exception occured during the processing of the data for this component. |
void | finishDeserializeInstance(javax.xml.transform.Result result)
Called after all data was send to the Result object returned from initDeserializeInstance(String, Map). |
javax.xml.transform.Result | initDeserializeInstance(java.lang.String id,
java.util.Map parameters)
This method is called to deserialize the business component instance. |
javax.xml.transform.Source | serializeInstance(java.lang.String id,
java.lang.String targetAction,
java.lang.String targetNamespace,
java.util.Map parameter)
This method is called to serialize the business component instance. |
boolean | supportsSerialization(java.lang.String targetAction,
java.lang.String targetNamespace,
java.util.Map parameters)
This method is used to ask the component if it support the specified type of serialization. |
void | undoDeserializeInstance(javax.xml.transform.Result result)
Called if deserialization fails after this component was deserialized. |
Field Detail |
---|
static final java.lang.String NAMESPACE_60
static final java.lang.String NAMESPACE_601
static final java.lang.String NAMESPACE_61
Method Detail |
---|
boolean supportsSerialization(java.lang.String targetAction, java.lang.String targetNamespace, java.util.Map parameters) throws TemporaryNotSupportedException
true
if this type of serialization is supported
javax.xml.transform.Source serializeInstance(java.lang.String id, java.lang.String targetAction, java.lang.String targetNamespace, java.util.Map parameter) throws ComponentException
SAXSource
object should be returned. This allows for
streaming the business component data into the aggregated XML document. It is however also
valid to return any other Source
object as long as it results in a well-formed
XML document.
If your component can only generate the content as a String or DOM the following can be used:
java.io.Reader reader = new StringReader("<data>my data</data>"); javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource(reader); javax.xml.transform.Source source = new javax.xml.transform.dom.DOMSource(document);The
parametres
argument contains a set of additional key/value-pairs. Currently
the following pairs are defined:
key | value | description |
---|---|---|
backupContext |
a java.lang.Object |
This value needs to be passed back to a backup service if one is used. |
null
.name | description |
---|---|
backupInstance |
the full instance data needs to be stored for a later restore |
serializeInstanceToClient |
The instance is going to be send to the client. Backend data should not be send over here as backend data could possible be huge. Such data should be send over using synchronization. Any information the component might need on the client to access the server instance could be transfered using the Serialization framework. |
http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite
http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/ibm-portal-composite/application-instance
Source
object delivering the XML document for this business component instance
or null
if the business component does not support this type of serialization.
javax.xml.transform.Result initDeserializeInstance(java.lang.String id, java.util.Map parameters) throws ComponentException
SAXResult
object should be returned. This allows for
streaming the business component data into the component from the aggregated XML document.
It is however also valid to return any other Result
.
The parametres
argument contains a set of additional key/value-pairs. Currently
the following pairs are defined:
key | value | description |
---|---|---|
backupServiceHandle |
a java.lang.Object |
This value needs to be passed back to a backup service if one is used. |
application.id |
a java.lang.String |
ID of the composite application. |
null
.Result
object is the target the deserialization framework will use to send the component's
data to. This is the data the component stored during serialization.
void finishDeserializeInstance(javax.xml.transform.Result result) throws ComponentException
void cancelDeserializeInstance(javax.xml.transform.Result result) throws ComponentException
void undoDeserializeInstance(javax.xml.transform.Result result) throws ComponentException
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |