public class XMLPersistenceManager extends AbstractPersistenceManager
PersistenceManager.Factories
DEFAULT_DOMAIN_NAME, DEFAULT_DOMAIN_URL, DISABLED, MANDATORY, MANDATORY_IF_DECLARED, PERSISTENCE_DYNOBJECT_NAMESPACE, PERSISTENCE_NAMESPACE
Constructor and Description |
---|
XMLPersistenceManager() |
Modifier and Type | Method and Description |
---|---|
PersistentStateServices |
createPersistentState(PersistentContextServices context,
PersistentIdentifier id) |
protected XMLPersistentStateReader |
getReaderInstance() |
protected XMLPersistentStateWriter |
getWriterInstance() |
PersistentState |
loadState(InputStream in)
De-serializes an state from the data read from the provided
reader . |
void |
saveState(PersistentState state,
OutputStream out)
Serializes the
PersistentState and writes the serialized data in
the provided OutputStream . |
String |
version() |
addAlias, addDefinition, addDefinition, addDefinition, addDefinition, addDefinition, create, createPersistentState, createState, getAutoValidation, getDefinition, getDefinition, getDomainDefinitions, getDomains, getDynObjectDefinition, getFactories, getNewContext, getObject, getState, getState, getWrappedList, getWrappedMap, getWrappedSet, putObject, registerFactory, setAutoValidation, unregisterClass, unregisterClass, unregisterFactory, validate, validateAll
public PersistentStateServices createPersistentState(PersistentContextServices context, PersistentIdentifier id)
public PersistentState loadState(InputStream in) throws PersistenceException
PersistenceManager
De-serializes an state from the data read from the provided
reader
. Depending on the implementation the serialized data
may have different formats, such as XML or binary data.
Note that a particular implementation will only be able to de-serialize data which has been serialized by the same implementation.
PersistenceException
public void saveState(PersistentState state, OutputStream out) throws PersistenceException, PersistenceValidateExceptions
PersistenceManager
Serializes the PersistentState
and writes the serialized data in
the provided OutputStream
. Depending on the implementation the
serialized data may have different formats, such as XML or binary data.
Note that a particular implementation will only be able to de-serialize data which has been serialized by the same implementation.
protected XMLPersistentStateReader getReaderInstance()
protected XMLPersistentStateWriter getWriterInstance()
public String version()