public class PropertyEntryImpl extends Object implements PropertyEntry
PropertyEntryImpl implements a reference to a property state.| Modifier and Type | Field and Description | 
|---|---|
protected EntryFactory | 
factory
The item state factory to create the item state. 
 | 
protected Name | 
name
The name of the target item state. 
 | 
protected NodeEntryImpl | 
parent
Hard reference to the parent  
NodeEntry. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
calculateStatus()
Calculates the status of the underlying  
ItemState: any pending
 changes to the underlying ItemState are applied. | 
void | 
complete(Operation operation)
Clean up this entry upon  
Operation.undo() or Operation.persisted(). | 
boolean | 
denotesNode()
Returns false. 
 | 
long | 
getGeneration()
The required generation of this  
HierarchyEntry . | 
PropertyId | 
getId()  | 
protected IdFactory | 
getIdFactory()
Shortcut for  
EntryFactory.getIdFactory() | 
protected EntryFactory.InvalidationStrategy | 
getInvalidationStrategy()  | 
ItemState | 
getItemState()
If this  
HierarchyEntry has already been resolved before
 (see HierarchyEntry.isAvailable()), that ItemState is returned. | 
protected TransientItemStateFactory | 
getItemStateFactory()
Shortcut for  
EntryFactory.getItemStateFactory() | 
Name | 
getName()  | 
NodeEntry | 
getParent()
Returns the  
NodeEntry being parent to this
 HierarchyEntry. | 
Path | 
getPath()  | 
protected PathFactory | 
getPathFactory()
Shortcut for  
EntryFactory.getPathFactory() | 
PropertyState | 
getPropertyState()  | 
int | 
getStatus()
If this  
HierarchyEntry provides an underlying
 ItemState this method returns the status of that state,
 otherwise it returns Status._UNDEFINED_. | 
PropertyId | 
getWorkspaceId()
Returns the ID that must be used for resolving this entry OR loading its
 children entries from the persistent layer. 
 | 
Path | 
getWorkspacePath()  | 
void | 
invalidate(boolean recursive)
Invalidates the underlying  
ItemState if available and if it
 is not transiently modified. | 
protected void | 
invalidateInternal(boolean recursive)
Invalidates the underlying  
ItemState. | 
boolean | 
isAvailable()
Returns  
true if the referenced ItemState is
 available. | 
void | 
reload(boolean recursive)
Reloads this hierarchy entry and the corresponding ItemState, if this
 entry has already been resolved. 
 | 
void | 
remove()
Removes this  
HierarchyEntry from its parent and sets the
 status of the underlying ItemState to Status.REMOVED or to
 Status.STALE_DESTROYED, respectively. | 
void | 
revert()
Traverses the hierarchy and reverts all transient modifications such as
 adding, modifying or removing item states. 
 | 
void | 
setItemState(ItemState state)
Set the ItemState this hierarchyEntry will be resolved to. 
 | 
void | 
transientRemove()
Traverses the hierarchy and marks all available item states as transiently
 removed. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateStatus, getGeneration, getItemState, getName, getParent, getPath, getStatus, getWorkspacePath, invalidate, isAvailable, reload, remove, revert, setItemState, transientRemoveprotected Name name
protected NodeEntryImpl parent
NodeEntry.protected final EntryFactory factory
public PropertyId getId() throws javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
getId in interface PropertyEntryNodeId of this child node entry.javax.jcr.InvalidItemStateExceptionjavax.jcr.RepositoryExceptionPropertyEntry.getId()public PropertyId getWorkspaceId() throws javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
PropertyEntrygetId() unless any of its ancestors has been transiently
 moved.getWorkspaceId in interface PropertyEntryjavax.jcr.InvalidItemStateExceptionjavax.jcr.RepositoryExceptionPropertyEntry.getWorkspaceId()public PropertyState getPropertyState() throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
getPropertyState in interface PropertyEntryPropertyState.javax.jcr.ItemNotFoundException - if the PropertyState does not
 exist anymore.javax.jcr.RepositoryException - if an error occurs while retrieving the
 PropertyState.PropertyEntry.getPropertyState()public boolean denotesNode()
denotesNode in interface HierarchyEntryHierarchyEntry.denotesNode()public void complete(Operation operation) throws javax.jcr.RepositoryException
HierarchyEntryOperation.undo() or Operation.persisted().complete in interface HierarchyEntryjavax.jcr.RepositoryExceptionHierarchyEntry.complete(Operation)protected TransientItemStateFactory getItemStateFactory()
EntryFactory.getItemStateFactory()protected PathFactory getPathFactory()
EntryFactory.getPathFactory()protected IdFactory getIdFactory()
EntryFactory.getIdFactory()protected EntryFactory.InvalidationStrategy getInvalidationStrategy()
protected void invalidateInternal(boolean recursive)
ItemState. If recursive is
 true also invalidates the underlying item states of all child entries.recursive - public Name getName()
getName in interface HierarchyEntryHierarchyEntry.getName()public Path getPath() throws javax.jcr.RepositoryException
getPath in interface HierarchyEntryjavax.jcr.RepositoryExceptionHierarchyEntry.getPath()public Path getWorkspacePath() throws javax.jcr.RepositoryException
getWorkspacePath in interface HierarchyEntryHierarchyEntry.getPath(). In case of moved items this method return the
 original path as it is present on the persistent layer.javax.jcr.RepositoryExceptionHierarchyEntry.getWorkspacePath()public NodeEntry getParent()
HierarchyEntryNodeEntry being parent to this
 HierarchyEntry.getParent in interface HierarchyEntryHierarchyEntryHierarchyEntry.getParent()public int getStatus()
HierarchyEntryHierarchyEntry provides an underlying
 ItemState this method returns the status of that state,
 otherwise it returns Status._UNDEFINED_.getStatus in interface HierarchyEntryStatus._UNDEFINED_ if this
 entry has not been resolved yet.HierarchyEntry.getStatus()public boolean isAvailable()
HierarchyEntrytrue if the referenced ItemState is
 available. That is, the referenced ItemState has already
 been resolved.isAvailable in interface HierarchyEntrytrue if the ItemState is available;
 otherwise false.HierarchyEntry.isAvailable()public ItemState getItemState() throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
HierarchyEntry has already been resolved before
 (see HierarchyEntry.isAvailable()), that ItemState is returned.
 Note however, that the validity of the State is not asserted.ItemState
 or if the corresponding state has been removed in the mean time.getItemState in interface HierarchyEntryItemState.javax.jcr.ItemNotFoundException - if the ItemState does not
 exist anymore.javax.jcr.RepositoryException - If an error occurs while retrieving the
 ItemState.HierarchyEntry.getItemState()public void setItemState(ItemState state)
setItemState in interface HierarchyEntryHierarchyEntry.setItemState(ItemState)public void invalidate(boolean recursive)
ItemState if available and if it
 is not transiently modified. If the recursive flag is true,
 also invalidates the child entries recursively.HierarchyEntry.reload(boolean)
 this method only sets the status of this item state to Status.INVALIDATED and does not actually update it with the persistent
 state in the repository.invalidate in interface HierarchyEntryHierarchyEntry.invalidate(boolean)public void calculateStatus()
HierarchyEntryItemState: any pending
 changes to the underlying ItemState are applied.calculateStatus in interface HierarchyEntrypublic void revert()
            throws javax.jcr.RepositoryException
Status.EXISTING.revert in interface HierarchyEntryjavax.jcr.RepositoryException - if an error occurs.HierarchyEntry.revert()public void reload(boolean recursive)
recursive' the complete
 hierarchy below this entry is reloaded as well.reload in interface HierarchyEntryHierarchyEntry.reload(boolean)public void transientRemove()
                     throws javax.jcr.InvalidItemStateException,
                            javax.jcr.RepositoryException
Status.EXISTING_REMOVED if
 the item is existing in the persistent storage or Status.REMOVED
 if the item has been transiently added before. In the latter case, the
 corresponding HierarchyEntries can be removed as well from their parent.transientRemove in interface HierarchyEntryjavax.jcr.InvalidItemStateException - if this entry has been removed in the
 mean time.javax.jcr.RepositoryException - if an error occurs while removing any of the item
 states e.g. an item state is not valid anymore.HierarchyEntry.transientRemove()public void remove()
HierarchyEntryHierarchyEntry from its parent and sets the
 status of the underlying ItemState to Status.REMOVED or to
 Status.STALE_DESTROYED, respectively. If this entry is a
 NodeEntry all descending ItemStates must get their status changed as well.remove in interface HierarchyEntryHierarchyEntry.remove()public long getGeneration()
HierarchyEntryHierarchyEntry . This is used by the
 ItemInfoCache to determine whether an item info in the cache is up to date or not.
 That is whether the generation of the item info in the cache is the same or more recent
 as the required generation of this entry.getGeneration in interface HierarchyEntryCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.