|
||||||||||
| 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<ItemLifeCycleListener,ItemLifeCycleListener> |
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(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. |
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()
|
Node |
getParent()
|
java.lang.String |
getPath()
|
Session |
getSession()
Note: as of 2.x this method returns the session irrespective of the item's status. |
boolean |
isModified()
|
boolean |
isNew()
|
abstract boolean |
isNode()
|
boolean |
isSame(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<ItemLifeCycleListener,ItemLifeCycleListener> listeners
| Constructor Detail |
|---|
public ItemImpl(SessionImpl session,
ItemState state,
ItemLifeCycleListener[] listeners)
| Method Detail |
|---|
public java.lang.String getPath()
throws RepositoryException
getPath in interface ItemRepositoryExceptionItem.getPath()
public abstract java.lang.String getName()
throws RepositoryException
getName in interface ItemRepositoryExceptionItem.getName()
public Item getAncestor(int depth)
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
getAncestor in interface ItemItemNotFoundException
AccessDeniedException
RepositoryExceptionItem.getAncestor(int)
public Node getParent()
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
getParent in interface ItemItemNotFoundException
AccessDeniedException
RepositoryExceptionItem.getParent()
public int getDepth()
throws RepositoryException
getDepth in interface ItemRepositoryExceptionItem.getDepth()
public Session getSession()
throws RepositoryException
getSession in interface ItemRepositoryExceptionItem.getSession(),
Issue JCR-2529public boolean isNew()
isNew in interface ItemItem.isNew()public boolean isModified()
isModified in interface ItemItem.isModified()
public boolean isSame(Item otherItem)
throws RepositoryException
isSame in interface ItemRepositoryExceptionItem.isSame(Item)
public abstract void accept(ItemVisitor visitor)
throws RepositoryException
accept in interface ItemRepositoryExceptionItem.accept(ItemVisitor)public abstract boolean isNode()
isNode in interface ItemItem.isNode()
public void save()
throws AccessDeniedException,
ConstraintViolationException,
InvalidItemStateException,
ReferentialIntegrityException,
VersionException,
LockException,
RepositoryException
save in interface ItemAccessDeniedException
ConstraintViolationException
InvalidItemStateException
ReferentialIntegrityException
VersionException
LockException
RepositoryExceptionItem.save()
public void refresh(boolean keepChanges)
throws InvalidItemStateException,
RepositoryException
refresh in interface ItemInvalidItemStateException
RepositoryExceptionItem.refresh(boolean)
public void remove()
throws VersionException,
LockException,
ConstraintViolationException,
RepositoryException
remove in interface ItemVersionException
LockException
ConstraintViolationException
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 RepositoryException
RepositoryException - if this item has been rendered invalid for some reason
protected void checkIsWritable()
throws UnsupportedRepositoryOperationException,
ConstraintViolationException,
RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
ConstraintViolationExceptionItemStateValidator
protected boolean isWritable()
throws RepositoryException
UnsupportedRepositoryOperationException
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 | |||||||||