|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Persistence manager interface. Persistence managers are internal Jackrabbit components that handle the persistent storage of content nodes and properties. A persistence manager knows how to retrieve the persistent states of content items and how to atomically save a set of changes to the persistent state.
Each workspace of a Jackrabbit content repository uses separate persistence manager to store the content in that workspace. Also the Jackrabbit version handler uses a separate persistence manager. The persistence managers in use are configured in the Jackrabbit XML configuration files. The configured persistence managers are instantiated and initialized using the JavaBeans conventions.
The life cycle of a persistence manager instance contains four phases:
init
method
is invoked to bind the persistence manager with a given
context
.
close
method is invoked
to close the persistence manager and release all acquired
resources.
Method Summary | |
void |
close()
Closes the persistence manager. |
NodeState |
createNew(NodeId id)
Creates a new node state instance with the given id. |
PropertyState |
createNew(PropertyId id)
Creates a new property state instance with the given id. |
boolean |
exists(NodeId id)
Checks whether the identified node exists. |
boolean |
exists(NodeReferencesId targetId)
Checks whether references of the identified target node exist. |
boolean |
exists(PropertyId id)
Checks whether the identified property exists. |
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 |
store(ChangeLog changeLog)
Atomically saves the given set of changes. |
Method Detail |
public 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 context
Exception
- if the persistence manager intialization 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 createNew(NodeId id)
id
- node id
public PropertyState createNew(PropertyId id)
id
- property id
public NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException
id
- node id
NoSuchItemStateException
- if the node state does not exist
ItemStateException
- if another error occurspublic PropertyState load(PropertyId id) throws NoSuchItemStateException, ItemStateException
id
- property id
NoSuchItemStateException
- if the property state does not exist
ItemStateException
- if another error occurspublic NodeReferences load(NodeReferencesId id) throws NoSuchItemStateException, ItemStateException
id
- reference target node id
NoSuchItemStateException
- if the target node does not exist
ItemStateException
- if another error occurspublic boolean exists(NodeId id) throws ItemStateException
id
- node id
true
if the node exists,
false
otherwise
ItemStateException
- on persistence manager errorspublic boolean exists(PropertyId id) throws ItemStateException
id
- property id
true
if the property exists,
false
otherwise
ItemStateException
- on persistence manager errorspublic boolean exists(NodeReferencesId targetId) throws ItemStateException
targetId
- target node id
true
if the references exist,
false
otherwise
ItemStateException
- on persistence manager errorspublic void store(ChangeLog changeLog) throws ItemStateException
changeLog
- change log containing states that were changed
ItemStateException
- if the changes could not be saved
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |