org.apache.jackrabbit.core.persistence
Class AbstractPersistenceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.AbstractPersistenceManager
All Implemented Interfaces:
PersistenceManager
Direct Known Subclasses:
DatabasePersistenceManager, InMemPersistenceManager, ObjectPersistenceManager, XMLPersistenceManager

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

@Deprecated
public abstract class AbstractPersistenceManager
extends Object
implements PersistenceManager

Implementation PersistenceManager that handles some concepts.


Constructor Summary
AbstractPersistenceManager()
          Deprecated.  
 
Method Summary
 void checkConsistency(String[] uuids, boolean recursive, boolean fix)
          Deprecated. This implementation does nothing.
 NodeState createNew(NodeId id)
          Deprecated. Creates a new node state instance with the given id.
 PropertyState createNew(PropertyId id)
          Deprecated. Creates a new property state instance with the given id.
protected abstract  void destroy(NodeReferences refs)
          Deprecated. Destroy a node references object.
protected abstract  void destroy(NodeState state)
          Deprecated. Destroy a node state.
protected abstract  void destroy(PropertyState state)
          Deprecated. Destroy a property state.
 void store(ChangeLog changeLog)
          Deprecated. Right now, this iterates over all items in the changelog and calls the individual methods that handle single item states or node references objects.
protected abstract  void store(NodeReferences refs)
          Deprecated. Store a references object.
protected abstract  void store(NodeState state)
          Deprecated. Store a node state.
protected abstract  void store(PropertyState state)
          Deprecated. Store a property state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.core.persistence.PersistenceManager
close, exists, exists, existsReferencesTo, init, load, load, loadReferencesTo
 

Constructor Detail

AbstractPersistenceManager

public AbstractPersistenceManager()
Deprecated. 
Method Detail

createNew

public NodeState createNew(NodeId id)
Deprecated. 
Creates a new node state instance with the given id.

Specified by:
createNew in interface PersistenceManager
Parameters:
id - node id
Returns:
node state instance

createNew

public PropertyState createNew(PropertyId id)
Deprecated. 
Creates a new property state instance with the given id.

Specified by:
createNew in interface PersistenceManager
Parameters:
id - property id
Returns:
property state instance

store

public void store(ChangeLog changeLog)
           throws ItemStateException
Deprecated. 
Right now, this iterates over all items in the changelog and calls the individual methods that handle single item states or node references objects. Properly implemented, this method should ensure that changes are either written completely to the underlying persistence layer, or not at all. Atomically saves the given set of changes.

Specified by:
store in interface PersistenceManager
Parameters:
changeLog - change log containing states that were changed
Throws:
ItemStateException - if the changes could not be saved

checkConsistency

public void checkConsistency(String[] uuids,
                             boolean recursive,
                             boolean fix)
Deprecated. 
This implementation does nothing. Perform a consistency check of the data. An example are non-existent nodes referenced in a child node entry. The existence of this feature and the scope of the implementation can vary in different PersistenceManager implementations.

Specified by:
checkConsistency in interface PersistenceManager
Parameters:
uuids - list of UUIDs of nodes to be checked. if null, all nodes will be checked
recursive - if true, the tree(s) below the given node(s) will be traversed and checked as well
fix - if true, any problems found that can be repaired will be repaired. if false, no data will be modified, instead all inconsistencies will only get logged

store

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

Parameters:
state - node state to store
Throws:
ItemStateException - if an error occurs

store

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

Parameters:
state - property state to store
Throws:
ItemStateException - if an error occurs

store

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

Parameters:
refs - references object to store
Throws:
ItemStateException - if an error occurs

destroy

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

Parameters:
state - node state to destroy
Throws:
ItemStateException - if an error occurs

destroy

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

Parameters:
state - property state to destroy
Throws:
ItemStateException - if an error occurs

destroy

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

Parameters:
refs - node references object to destroy
Throws:
ItemStateException - if an error occurs


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