org.apache.jackrabbit.core.persistence.xml
Class XMLPersistenceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.AbstractPersistenceManager
      extended by org.apache.jackrabbit.core.persistence.xml.XMLPersistenceManager
All Implemented Interfaces:
PersistenceManager

Deprecated. Please migrate to a bundle persistence manager (JCR-2802)

@Deprecated
public class XMLPersistenceManager
extends AbstractPersistenceManager

XMLPersistenceManager is a FileSystem-based PersistenceManager that persists ItemState and NodeReferences objects in XML format.


Field Summary
static String DEFAULT_ENCODING
          Deprecated. The default encoding used in serialization
 
Constructor Summary
XMLPersistenceManager()
          Deprecated. Creates a new XMLPersistenceManager instance.
 
Method Summary
 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.
 
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

DEFAULT_ENCODING

public static final String DEFAULT_ENCODING
Deprecated. 
The default encoding used in serialization

See Also:
Constant Field Values
Constructor Detail

XMLPersistenceManager

public XMLPersistenceManager()
Deprecated. 
Creates a new XMLPersistenceManager instance.

Method Detail

getNodePathTemplate

public String getNodePathTemplate()
Deprecated. 
Returns the node path template.

Returns:
node path template

setNodePathTemplate

public void setNodePathTemplate(String template)
Deprecated. 
Sets the node path template.

Parameters:
template - node path template

init

public void init(PMContext context)
          throws Exception
Deprecated. 
Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

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.

Parameters:
context - persistence manager context
Throws:
Exception - if the persistence manager initialization failed

close

public void close()
           throws Exception
Deprecated. 
Closes the persistence manager. The consistency of the persistent storage is guaranteed and all acquired resources are released. It is an error to invoke any methods on a closed persistence manager, and implementations are free to enforce this constraint by throwing IllegalStateExceptions in such cases.

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.

Throws:
Exception - if the persistence manager failed to close properly

load

public NodeState load(NodeId id)
               throws NoSuchItemStateException,
                      ItemStateException
Deprecated. 
Load the persistent members of a node state.

Parameters:
id - node id
Returns:
loaded node state
Throws:
NoSuchItemStateException - if the node state does not exist
ItemStateException - if another error occurs

load

public PropertyState load(PropertyId id)
                   throws NoSuchItemStateException,
                          ItemStateException
Deprecated. 
Load the persistent members of a property state.

Parameters:
id - property id
Returns:
loaded property state
Throws:
NoSuchItemStateException - if the property state does not exist
ItemStateException - if another error occurs

store

protected void store(NodeState state)
              throws ItemStateException
Deprecated. 
Store a node state. Subclass responsibility.

Specified by:
store in class AbstractPersistenceManager
Parameters:
state - node state to store
Throws:
ItemStateException - if an error occurs

store

protected void store(PropertyState state)
              throws ItemStateException
Deprecated. 
Store a property state. Subclass responsibility.

Specified by:
store in class AbstractPersistenceManager
Parameters:
state - property state to store
Throws:
ItemStateException - if an error occurs

destroy

protected void destroy(NodeState state)
                throws ItemStateException
Deprecated. 
Destroy a node state. Subclass responsibility.

Specified by:
destroy in class AbstractPersistenceManager
Parameters:
state - node state to destroy
Throws:
ItemStateException - if an error occurs

destroy

protected void destroy(PropertyState state)
                throws ItemStateException
Deprecated. 
Destroy a property state. Subclass responsibility.

Specified by:
destroy in class AbstractPersistenceManager
Parameters:
state - property state to destroy
Throws:
ItemStateException - if an error occurs

loadReferencesTo

public NodeReferences loadReferencesTo(NodeId id)
                                throws NoSuchItemStateException,
                                       ItemStateException
Deprecated. 
Load the persisted references to the node with the given identifier.

Parameters:
id - reference target node id
Throws:
NoSuchItemStateException - if the target node does not exist
ItemStateException - if another error occurs

store

protected void store(NodeReferences refs)
              throws ItemStateException
Deprecated. 
Store a references object. Subclass responsibility.

Specified by:
store in class AbstractPersistenceManager
Parameters:
refs - references object to store
Throws:
ItemStateException - if an error occurs

destroy

protected void destroy(NodeReferences refs)
                throws ItemStateException
Deprecated. 
Destroy a node references object. Subclass responsibility.

Specified by:
destroy in class AbstractPersistenceManager
Parameters:
refs - node references object to destroy
Throws:
ItemStateException - if an error occurs

exists

public boolean exists(NodeId id)
               throws ItemStateException
Deprecated. 
Checks whether the identified node exists.

Parameters:
id - node id
Returns:
true if the node exists, false otherwise
Throws:
ItemStateException - on persistence manager errors

exists

public boolean exists(PropertyId id)
               throws ItemStateException
Deprecated. 
Checks whether the identified property exists.

Parameters:
id - property id
Returns:
true if the property exists, false otherwise
Throws:
ItemStateException - on persistence manager errors

existsReferencesTo

public boolean existsReferencesTo(NodeId id)
                           throws ItemStateException
Deprecated. 
Checks whether references of the identified target node exist.

Parameters:
id - target node id
Returns:
true if the references exist, false otherwise
Throws:
ItemStateException - on persistence manager errors


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.