|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.persistence.AbstractPersistenceManager
org.apache.jackrabbit.core.persistence.xml.XMLPersistenceManager
public class XMLPersistenceManager
XMLPersistenceManager is a FileSystem-based
PersistenceManager that persists ItemState
and NodeReferences objects in XML format.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_ENCODING
The default encoding used in serialization |
| Constructor Summary | |
|---|---|
XMLPersistenceManager()
Creates a new XMLPersistenceManager instance. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the persistence manager. |
protected void |
destroy(NodeReferences refs)
Destroy a node references object. |
protected void |
destroy(NodeState state)
Destroy a node state. |
protected void |
destroy(PropertyState state)
Destroy a property state. |
boolean |
exists(NodeId id)
Checks whether the identified node exists. |
boolean |
exists(NodeReferencesId id)
Checks whether references of the identified target node exist. |
boolean |
exists(PropertyId id)
Checks whether the identified property exists. |
java.lang.String |
getNodePathTemplate()
Returns the node path template. |
void |
init(PMContext context)
Initializes the persistence manager. |
NodeState |
load(NodeId id)
Load the persistent members of a node state. |
NodeReferences |
load(NodeReferencesId id)
Load the persistent members of a node references object. |
PropertyState |
load(PropertyId id)
Load the persistent members of a property state. |
void |
setNodePathTemplate(java.lang.String template)
Sets the node path template. |
protected void |
store(NodeReferences refs)
Store a references object. |
protected void |
store(NodeState state)
Store a node state. |
protected void |
store(PropertyState state)
Store a property state. |
| Methods inherited from class org.apache.jackrabbit.core.persistence.AbstractPersistenceManager |
|---|
checkConsistency, createNew, createNew, store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_ENCODING
| Constructor Detail |
|---|
public XMLPersistenceManager()
XMLPersistenceManager instance.
| Method Detail |
|---|
public java.lang.String getNodePathTemplate()
public void setNodePathTemplate(java.lang.String template)
template - node path template
public void init(PMContext context)
throws java.lang.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 context
java.lang.Exception - if the persistence manager initialization failed
public void close()
throws java.lang.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.
java.lang.Exception - if the persistence manager failed to close properly
public NodeState load(NodeId id)
throws NoSuchItemStateException,
ItemStateException
id - node id
NoSuchItemStateException - if the node state does not exist
ItemStateException - if another error occurs
public PropertyState load(PropertyId id)
throws NoSuchItemStateException,
ItemStateException
id - property id
NoSuchItemStateException - if the property state does not exist
ItemStateException - if another error occurs
protected void store(NodeState state)
throws ItemStateException
store in class AbstractPersistenceManagerstate - node state to store
ItemStateException - if an error occurs
protected void store(PropertyState state)
throws ItemStateException
store in class AbstractPersistenceManagerstate - property state to store
ItemStateException - if an error occurs
protected void destroy(NodeState state)
throws ItemStateException
destroy in class AbstractPersistenceManagerstate - node state to destroy
ItemStateException - if an error occurs
protected void destroy(PropertyState state)
throws ItemStateException
destroy in class AbstractPersistenceManagerstate - property state to destroy
ItemStateException - if an error occurs
public NodeReferences load(NodeReferencesId id)
throws NoSuchItemStateException,
ItemStateException
id - reference target node id
NoSuchItemStateException - if the target node does not exist
ItemStateException - if another error occurs
protected void store(NodeReferences refs)
throws ItemStateException
store in class AbstractPersistenceManagerrefs - references object to store
ItemStateException - if an error occurs
protected void destroy(NodeReferences refs)
throws ItemStateException
destroy in class AbstractPersistenceManagerrefs - node references object to destroy
ItemStateException - if an error occurs
public boolean exists(NodeId id)
throws ItemStateException
id - node id
true if the node exists,
false otherwise
ItemStateException - on persistence manager errors
public boolean exists(PropertyId id)
throws ItemStateException
id - property id
true if the property exists,
false otherwise
ItemStateException - on persistence manager errors
public boolean exists(NodeReferencesId id)
throws ItemStateException
id - target node id
true if the references exist,
false otherwise
ItemStateException - on persistence manager errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||