|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.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(ItemStateManager itemStateProvider,
HierarchyManager hierMgr,
SessionImpl session,
NodeDefinition rootNodeDef,
NodeId rootNodeId)
Creates a new per-session instance ItemManager instance. |
Method Summary | |
protected AbstractVersionHistory |
createVersionHistoryInstance(NodeId id,
NodeState state,
NodeDefinition def,
ItemLifeCycleListener[] listeners)
Create a version history instance. |
protected AbstractVersion |
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(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. it has been permanently rendered 'invalid').
Note that most ,
and
methods will throw an InvalidItemStateException when called
on a 'destroyed' item. |
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. it has been temporarily rendered 'invalid').
Note that most ,
and
methods will throw an InvalidItemStateException when called
on an 'invalidated' item. |
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(ItemStateManager 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 nodeMethod 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
protected AbstractVersion createVersionInstance(NodeId id, NodeState state, NodeDefinition def, ItemLifeCycleListener[] listeners) throws RepositoryException
id
- node idstate
- node statedef
- node definitionlisteners
- listeners
RepositoryException
- if an error occursprotected AbstractVersionHistory 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 ItemLifeCycleListener
item
- the instance which has been createdpublic 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 ItemLifeCycleListener
id
- the id of the instance that has been discardeditem
- the instance which has been discardedpublic 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 ItemLifeCycleListener
id
- the id of the instance that has been destroyeditem
- the instance which has been destroyedpublic void dump(PrintStream ps)
dump
in interface Dumpable
ps
- stream to dump state to
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |