@Deprecated public class XMLPersistenceManager extends AbstractPersistenceManager
XMLPersistenceManager
is a FileSystem
-based
PersistenceManager
that persists ItemState
and NodeReferences
objects in XML format.Modifier and Type | Field and Description |
---|---|
static Charset |
DEFAULT_ENCODING
Deprecated.
The default encoding used in serialization
|
Constructor and Description |
---|
XMLPersistenceManager()
Deprecated.
Creates a new
XMLPersistenceManager instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the persistence manager.
|
protected void |
destroy(NodeReferences refs)
Deprecated.
Destroy a node references object.
|
protected void |
destroy(NodeState state)
Deprecated.
Destroy a node state.
|
protected void |
destroy(PropertyState state)
Deprecated.
Destroy a property state.
|
boolean |
exists(NodeId id)
Deprecated.
Checks whether the identified node exists.
|
boolean |
exists(PropertyId id)
Deprecated.
Checks whether the identified property exists.
|
boolean |
existsReferencesTo(NodeId id)
Deprecated.
Checks whether references of the identified target node exist.
|
String |
getNodePathTemplate()
Deprecated.
Returns the node path template.
|
void |
init(PMContext context)
Deprecated.
Initializes the persistence manager.
|
NodeState |
load(NodeId id)
Deprecated.
Load the persistent members of a node state.
|
PropertyState |
load(PropertyId id)
Deprecated.
Load the persistent members of a property state.
|
NodeReferences |
loadReferencesTo(NodeId id)
Deprecated.
Load the persisted references to the node with the given identifier.
|
void |
setNodePathTemplate(String template)
Deprecated.
Sets the node path template.
|
protected void |
store(NodeReferences refs)
Deprecated.
Store a references object.
|
protected void |
store(NodeState state)
Deprecated.
Store a node state.
|
protected void |
store(PropertyState state)
Deprecated.
Store a property state.
|
checkConsistency, createNew, createNew, store
public static final Charset DEFAULT_ENCODING
public XMLPersistenceManager()
XMLPersistenceManager
instance.public String getNodePathTemplate()
public void setNodePathTemplate(String template)
template
- node path templatepublic void init(PMContext context) throws Exception
An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded.
context
- persistence manager contextException
- if the persistence manager initialization failedpublic void close() throws Exception
An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded.
Exception
- if the persistence manager failed to close properlypublic NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException
id
- node idNoSuchItemStateException
- if the node state does not existItemStateException
- if another error occurspublic PropertyState load(PropertyId id) throws NoSuchItemStateException, ItemStateException
id
- property idNoSuchItemStateException
- if the property state does not existItemStateException
- if another error occursprotected void store(NodeState state) throws ItemStateException
store
in class AbstractPersistenceManager
state
- node state to storeItemStateException
- if an error occursprotected void store(PropertyState state) throws ItemStateException
store
in class AbstractPersistenceManager
state
- property state to storeItemStateException
- if an error occursprotected void destroy(NodeState state) throws ItemStateException
destroy
in class AbstractPersistenceManager
state
- node state to destroyItemStateException
- if an error occursprotected void destroy(PropertyState state) throws ItemStateException
destroy
in class AbstractPersistenceManager
state
- property state to destroyItemStateException
- if an error occurspublic NodeReferences loadReferencesTo(NodeId id) throws NoSuchItemStateException, ItemStateException
id
- reference target node idNoSuchItemStateException
- if the target node does not existItemStateException
- if another error occursprotected void store(NodeReferences refs) throws ItemStateException
store
in class AbstractPersistenceManager
refs
- references object to storeItemStateException
- if an error occursprotected void destroy(NodeReferences refs) throws ItemStateException
destroy
in class AbstractPersistenceManager
refs
- node references object to destroyItemStateException
- if an error occurspublic boolean exists(NodeId id) throws ItemStateException
id
- node idtrue
if the node exists,
false
otherwiseItemStateException
- on persistence manager errorspublic boolean exists(PropertyId id) throws ItemStateException
id
- property idtrue
if the property exists,
false
otherwiseItemStateException
- on persistence manager errorspublic boolean existsReferencesTo(NodeId id) throws ItemStateException
id
- target node idtrue
if the references exist,
false
otherwiseItemStateException
- on persistence manager errorsCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.