|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.ItemManager
public class ItemManager
There's one ItemManager instance per Session
instance. It is the factory for Node and Property
instances.
ItemManager's responsabilities are:
Item instances by ItemId
whereas Node and Item are only providing relative access.
Node or Property,
given its absolute path.
Node
or Property that doesn't exist yet and needs to be created first.
Node or Property associated with the same
Session instance.
Session in all methods.
Session is an XASession, there is
one ItemManager instance per started global transaction.
| Field Summary | |
|---|---|
protected SessionImpl |
session
|
| Constructor Summary | |
|---|---|
protected |
ItemManager(SessionItemStateManager itemStateProvider,
HierarchyManager hierMgr,
SessionImpl session,
NodeDefinition rootNodeDef,
NodeId rootNodeId)
Creates a new per-session instance ItemManager instance. |
| Method Summary | |
|---|---|
protected VersionHistoryImpl |
createVersionHistoryInstance(NodeId id,
NodeState state,
NodeDefinition def,
ItemLifeCycleListener[] listeners)
Create a version history instance. |
protected VersionImpl |
createVersionInstance(NodeId id,
NodeState state,
NodeDefinition def,
ItemLifeCycleListener[] listeners)
Create a version instance. |
void |
dump(PrintStream ps)
Dumps the state of this instance in a human readable format for diagnostic purposes. |
ItemImpl |
getItem(ItemId id)
|
ItemImpl |
getItem(ItemState state)
Returns the item instance for the given item state. |
ItemImpl |
getItem(Path path)
|
void |
itemCreated(ItemImpl item)
Called when an ItemImpl instance has been created. |
void |
itemDestroyed(ItemId id,
ItemImpl item)
Called when an ItemImpl instance has been destroyed
(i.e. |
boolean |
itemExists(ItemId id)
Checks if the item with the given id exists. |
boolean |
itemExists(Path path)
Checks if the item with the given path exists. |
void |
itemInvalidated(ItemId id,
ItemImpl item)
Called when an ItemImpl instance has been invalidated
(i.e. |
void |
stateCreated(ItemState created)
Called when an ItemState has successfully
been created (i.e. |
void |
stateDestroyed(ItemState destroyed)
Called when an ItemState has successfully been
removed (i.e. |
void |
stateDiscarded(ItemState discarded)
Called when an ItemState has been discarded (i.e. |
void |
stateModified(ItemState modified)
Called when an ItemState has successfully
been modified (i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SessionImpl session
| Constructor Detail |
|---|
protected ItemManager(SessionItemStateManager itemStateProvider,
HierarchyManager hierMgr,
SessionImpl session,
NodeDefinition rootNodeDef,
NodeId rootNodeId)
ItemManager instance.
itemStateProvider - the item state provider associated with
the new instancesession - the session associated with the new instancerootNodeDef - the definition of the root noderootNodeId - the id of the root node| Method Detail |
|---|
public boolean itemExists(Path path)
path - path to the item to be checked
public boolean itemExists(ItemId id)
id - id of the item to be checked
public ItemImpl getItem(Path path)
throws PathNotFoundException,
AccessDeniedException,
RepositoryException
path -
PathNotFoundException
AccessDeniedException
RepositoryException
public ItemImpl getItem(ItemId id)
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
id -
RepositoryException
ItemNotFoundException
AccessDeniedException
public ItemImpl getItem(ItemState state)
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
state - the item state
state.
RepositoryException
ItemNotFoundException
AccessDeniedException
protected VersionImpl createVersionInstance(NodeId id,
NodeState state,
NodeDefinition def,
ItemLifeCycleListener[] listeners)
throws RepositoryException
id - node idstate - node statedef - node definitionlisteners - listeners
RepositoryException - if an error occurs
protected VersionHistoryImpl createVersionHistoryInstance(NodeId id,
NodeState state,
NodeDefinition def,
ItemLifeCycleListener[] listeners)
throws RepositoryException
id - node idstate - node statedef - node definitionlisteners - listeners
RepositoryException - if an error occurspublic void itemCreated(ItemImpl item)
ItemImpl instance has been created.
itemCreated in interface ItemLifeCycleListeneritem - the instance which has been created
public void itemInvalidated(ItemId id,
ItemImpl item)
ItemImpl instance has been invalidated
(i.e. it has been temporarily rendered 'invalid').
Note that most Item,
Node and Property
methods will throw an InvalidItemStateException when called
on an 'invalidated' item.
itemInvalidated in interface ItemLifeCycleListenerid - the id of the instance that has been discardeditem - the instance which has been discarded
public void itemDestroyed(ItemId id,
ItemImpl item)
ItemImpl instance has been destroyed
(i.e. it has been permanently rendered 'invalid').
Note that most Item,
Node and Property
methods will throw an InvalidItemStateException when called
on a 'destroyed' item.
itemDestroyed in interface ItemLifeCycleListenerid - the id of the instance that has been destroyeditem - the instance which has been destroyedpublic void dump(PrintStream ps)
dump in interface Dumpableps - stream to dump state topublic void stateCreated(ItemState created)
ItemState has successfully
been created (i.e. its underlying persistent state was created).
stateCreated in interface ItemStateListenercreated - the ItemState that has been 'created'public void stateModified(ItemState modified)
ItemState has successfully
been modified (i.e. its underlying persistent state has changed).
stateModified in interface ItemStateListenermodified - the ItemState that has been 'modified'public void stateDestroyed(ItemState destroyed)
ItemState has successfully been
removed (i.e. its underlying persistent state has been destroyed).
stateDestroyed in interface ItemStateListenerdestroyed - the ItemState that has been 'destroyed'public void stateDiscarded(ItemState discarded)
ItemState has been discarded (i.e. it has
been rendered 'invalid').
stateDiscarded in interface ItemStateListenerdiscarded - the ItemState that has been discardedItemState.discard()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||