|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.ItemImpl
public abstract class ItemImpl
ItemImpl...
| Field Summary | |
|---|---|
protected java.util.Map |
listeners
Listeners (weak references) |
protected SessionImpl |
session
The session that created this item. |
| Constructor Summary | |
|---|---|
ItemImpl(SessionImpl session,
ItemState state,
ItemLifeCycleListener[] listeners)
|
|
| Method Summary | |
|---|---|
abstract void |
accept(javax.jcr.ItemVisitor visitor)
|
protected void |
checkIsWritable()
Checks if the repository supports level 2 (writing) and the status of this item. |
protected void |
checkStatus()
Performs a sanity check on this item and the associated session. |
javax.jcr.Item |
getAncestor(int depth)
|
int |
getDepth()
|
protected ItemManager |
getItemManager()
Returns the ItemManager associated with this item's Session. |
protected ItemState |
getItemState()
Returns the item-state associated with this Item. |
abstract java.lang.String |
getName()
|
javax.jcr.Node |
getParent()
|
java.lang.String |
getPath()
|
javax.jcr.Session |
getSession()
|
boolean |
isModified()
|
boolean |
isNew()
|
abstract boolean |
isNode()
|
boolean |
isSame(javax.jcr.Item otherItem)
|
protected boolean |
isWritable()
Returns true if the repository supports level 2 (writing). |
void |
refresh(boolean keepChanges)
|
void |
remove()
|
void |
save()
|
void |
statusChanged(ItemState state,
int previousStatus)
Called after an ItemState has changed its status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SessionImpl session
protected final java.util.Map listeners
| Constructor Detail |
|---|
public ItemImpl(SessionImpl session,
ItemState state,
ItemLifeCycleListener[] listeners)
| Method Detail |
|---|
public java.lang.String getPath()
throws javax.jcr.RepositoryException
getPath in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getPath()
public abstract java.lang.String getName()
throws javax.jcr.RepositoryException
getName in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getName()
public javax.jcr.Item getAncestor(int depth)
throws javax.jcr.ItemNotFoundException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
getAncestor in interface javax.jcr.Itemjavax.jcr.ItemNotFoundException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryExceptionItem.getAncestor(int)
public javax.jcr.Node getParent()
throws javax.jcr.ItemNotFoundException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
getParent in interface javax.jcr.Itemjavax.jcr.ItemNotFoundException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryExceptionItem.getParent()
public int getDepth()
throws javax.jcr.RepositoryException
getDepth in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getDepth()
public javax.jcr.Session getSession()
throws javax.jcr.RepositoryException
getSession in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getSession()public boolean isNew()
isNew in interface javax.jcr.ItemItem.isNew()public boolean isModified()
isModified in interface javax.jcr.ItemItem.isModified()
public boolean isSame(javax.jcr.Item otherItem)
throws javax.jcr.RepositoryException
isSame in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.isSame(Item)
public abstract void accept(javax.jcr.ItemVisitor visitor)
throws javax.jcr.RepositoryException
accept in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.accept(ItemVisitor)public abstract boolean isNode()
isNode in interface javax.jcr.ItemItem.isNode()
public void save()
throws javax.jcr.AccessDeniedException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.InvalidItemStateException,
javax.jcr.ReferentialIntegrityException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
save in interface javax.jcr.Itemjavax.jcr.AccessDeniedException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.InvalidItemStateException
javax.jcr.ReferentialIntegrityException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.RepositoryExceptionItem.save()
public void refresh(boolean keepChanges)
throws javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
refresh in interface javax.jcr.Itemjavax.jcr.InvalidItemStateException
javax.jcr.RepositoryExceptionItem.refresh(boolean)
public void remove()
throws javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
remove in interface javax.jcr.Itemjavax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryExceptionItem.remove()
public void statusChanged(ItemState state,
int previousStatus)
ItemStateLifeCycleListenerItemState has changed its status. The new
status can be retrieved by calling ItemState.getStatus().
statusChanged in interface ItemStateLifeCycleListenerstate - previousStatus -
protected void checkStatus()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - if this item has been rendered invalid for some reason
protected void checkIsWritable()
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
javax.jcr.nodetype.ConstraintViolationExceptionItemStateValidator
protected boolean isWritable()
throws javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException - if the sanity check on this item fails.
See checkStatus().ItemStateValidatorprotected ItemState getItemState()
Item.
Itemprotected ItemManager getItemManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||