|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.state.ItemState
public abstract class ItemState
ItemState represents the state of an Item.
| Constructor Summary | |
|---|---|
protected |
ItemState(HierarchyEntry entry,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
Constructs an item state |
protected |
ItemState(int initialStatus,
HierarchyEntry entry,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
Constructs an item state |
| Method Summary | |
|---|---|
void |
addListener(ItemStateLifeCycleListener listener)
Add an ItemStateLifeCycleListener |
HierarchyEntry |
getHierarchyEntry()
The HierarchyEntry corresponding to this ItemState. |
abstract ItemId |
getId()
Utility method: Returns the identifier of this item state. |
Iterator |
getListeners()
Unmodifiable iterator over the listeners present on this item state. |
Name |
getName()
Utility method: Returns the name of this state. |
NodeState |
getParent()
Utility method: Shortcut for calling 'getParent().getNodeState()' on the hierarchy entry. |
Path |
getQPath()
Utility method: Returns the qualified path of this item state. |
int |
getStatus()
Returns the status of this item. |
abstract ItemId |
getWorkspaceId()
Utility method: Returns the identifier of this item state. |
abstract boolean |
isNode()
Utility method: Determines if this item state represents a node. |
boolean |
isValid()
Returns true if this item state is valid, that is its status
is one of:
Status.EXISTING
Status.EXISTING_MODIFIED
Status.NEW
|
abstract boolean |
merge(ItemState another,
boolean keepChanges)
Merge all data from the given state into this state. |
void |
reload(boolean keepChanges)
Retrieved a fresh ItemState from the persistent layer and merge its data with this state in order to reload it. |
void |
removeListener(ItemStateLifeCycleListener listener)
Remove an ItemStateLifeCycleListener |
abstract boolean |
revert()
Revert all transient modifications made to this ItemState. |
void |
setStatus(int newStatus)
Sets the new status of this item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ItemState(HierarchyEntry entry,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
entry - isf - definitionProvider -
protected ItemState(int initialStatus,
HierarchyEntry entry,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
entry - isf - definitionProvider - | Method Detail |
|---|
public HierarchyEntry getHierarchyEntry()
HierarchyEntry corresponding to this ItemState.
HierarchyEntry corresponding to this ItemState.public boolean isValid()
true if this item state is valid, that is its status
is one of:
public abstract boolean isNode()
public Name getName()
hierarchy entry.
public abstract ItemId getId()
hierarchy entry.
public abstract ItemId getWorkspaceId()
public Path getQPath()
throws RepositoryException
hierarchy entry.
RepositoryException - if an error occurs
public NodeState getParent()
throws ItemNotFoundException,
RepositoryException
hierarchy entry.
ItemNotFoundException
RepositoryExceptionpublic final int getStatus()
public void setStatus(int newStatus)
newStatus - the new status
public abstract boolean merge(ItemState another,
boolean keepChanges)
keepChanges' is true, transient modifications present on
this state are not touched. Otherwise this state is completely reset
according to the given other state.
another - keepChanges -
public abstract boolean revert()
public void addListener(ItemStateLifeCycleListener listener)
ItemStateLifeCycleListener
listener - the new listener to be informed on modificationspublic void removeListener(ItemStateLifeCycleListener listener)
ItemStateLifeCycleListener
listener - an existing listenerpublic Iterator getListeners()
public void reload(boolean keepChanges)
keepChanges -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||