public class PropertyDelegate extends ItemDelegate
PropertyDelegate serve as internal representations of Propertys.
Most methods of this class throw an InvalidItemStateException
exception if the instance is stale. An instance is stale if the underlying
items does not exist anymore.sessionDelegate| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Determine whether the underlying item exists
|
boolean |
getBoolean() |
String |
getDate() |
@NotNull org.apache.jackrabbit.oak.api.PropertyState |
getMultiState() |
@NotNull String |
getName()
Get the name of this item
|
@Nullable NodeDelegate |
getParent()
Get the parent of this item or
null. |
@NotNull String |
getPath()
Get the path of this item
|
@NotNull org.apache.jackrabbit.oak.api.PropertyState |
getPropertyState() |
@NotNull org.apache.jackrabbit.oak.api.PropertyState |
getSingleState() |
@Nullable org.apache.jackrabbit.oak.api.Tree.Status |
getStatus()
Get the status of this item.
|
String |
getString() |
boolean |
isProtected() |
boolean |
remove()
Remove the property
|
void |
setState(@NotNull org.apache.jackrabbit.oak.api.PropertyState propertyState) |
String |
toString() |
protected void |
update()
The session has been updated since the last time this property delegate
was accessed, so we need to re-retrieve the property state to get any
potential updates.
|
checkAlive, checkUpdate, saveprotected void update()
state reference will be null.update in class ItemDelegate@NotNull public @NotNull String getName()
ItemDelegategetName in class ItemDelegate@NotNull public @NotNull String getPath()
ItemDelegategetPath in class ItemDelegate@Nullable public @Nullable NodeDelegate getParent()
ItemDelegatenull.getParent in class ItemDelegatenull for root or if the parent
is not accessible.public boolean exists()
ItemDelegateexists in class ItemDelegatetrue the underlying tree exists, false otherwise.@Nullable public @Nullable org.apache.jackrabbit.oak.api.Tree.Status getStatus()
ItemDelegategetStatus in class ItemDelegateTree.Status of this item or null if not available.public boolean isProtected()
throws InvalidItemStateException
isProtected in class ItemDelegateInvalidItemStateException@NotNull public @NotNull org.apache.jackrabbit.oak.api.PropertyState getPropertyState() throws InvalidItemStateException
InvalidItemStateException@NotNull public @NotNull org.apache.jackrabbit.oak.api.PropertyState getSingleState() throws InvalidItemStateException, ValueFormatException
public boolean getBoolean()
throws ValueFormatException,
InvalidItemStateException
public String getString() throws ValueFormatException, InvalidItemStateException
public String getDate() throws ValueFormatException, InvalidItemStateException
@NotNull public @NotNull org.apache.jackrabbit.oak.api.PropertyState getMultiState() throws InvalidItemStateException, ValueFormatException
public void setState(@NotNull
@NotNull org.apache.jackrabbit.oak.api.PropertyState propertyState)
public boolean remove()
remove in class ItemDelegatetrue if this item was removed;
or false if this is the root node that can't be removedCopyright © 2012–2020 The Apache Software Foundation. All rights reserved.