public class PropertyDelegate extends ItemDelegate
PropertyDelegate
serve as internal representations of Property
s.
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() |
java.lang.String |
getDate() |
@NotNull PropertyState |
getMultiState() |
@NotNull java.lang.String |
getName()
Get the name of this item
|
@Nullable NodeDelegate |
getParent()
Get the parent of this item or
null . |
@NotNull java.lang.String |
getPath()
Get the path of this item
|
@NotNull PropertyState |
getPropertyState() |
@NotNull PropertyState |
getSingleState() |
@Nullable Tree.Status |
getStatus()
Get the status of this item.
|
java.lang.String |
getString() |
boolean |
isProtected() |
boolean |
remove()
Remove the property
|
void |
setState(@NotNull PropertyState propertyState) |
java.lang.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, save
protected void update()
state
reference will be null
.update
in class ItemDelegate
@NotNull public @NotNull java.lang.String getName()
ItemDelegate
getName
in class ItemDelegate
@NotNull public @NotNull java.lang.String getPath()
ItemDelegate
getPath
in class ItemDelegate
@Nullable public @Nullable NodeDelegate getParent()
ItemDelegate
null
.getParent
in class ItemDelegate
null
for root or if the parent
is not accessible.public boolean exists()
ItemDelegate
exists
in class ItemDelegate
true
the underlying tree exists, false
otherwise.@Nullable public @Nullable Tree.Status getStatus()
ItemDelegate
getStatus
in class ItemDelegate
Tree.Status
of this item or null
if not available.public boolean isProtected() throws InvalidItemStateException
isProtected
in class ItemDelegate
InvalidItemStateException
@NotNull public @NotNull PropertyState getPropertyState() throws InvalidItemStateException
InvalidItemStateException
@NotNull public @NotNull PropertyState getSingleState() throws InvalidItemStateException, ValueFormatException
public boolean getBoolean() throws ValueFormatException, InvalidItemStateException
public java.lang.String getString() throws ValueFormatException, InvalidItemStateException
public java.lang.String getDate() throws ValueFormatException, InvalidItemStateException
@NotNull public @NotNull PropertyState getMultiState() throws InvalidItemStateException, ValueFormatException
public void setState(@NotNull @NotNull PropertyState propertyState)
public boolean remove()
remove
in class ItemDelegate
true
if this item was removed;
or false
if this is the root node that can't be removedpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.