public class JcrItemModel<T extends javax.jcr.Item>
extends org.apache.wicket.model.LoadableDetachableModel<T>
Item
s. The model tracks the Item as well as it can, using the
first referenceable ancestor plus a relative path as the identification/retrieval method.
When the Item (or one of its ancestors) is moved, this is transparent.
In development, when the model is serialized, it checks whether it has been detached properly.
Constructor and Description |
---|
JcrItemModel(String path,
boolean property) |
JcrItemModel(T item) |
Modifier and Type | Method and Description |
---|---|
void |
detach() |
boolean |
equals(Object object) |
boolean |
exists()
Determine whether the Item exists.
|
JcrItemModel<javax.jcr.Node> |
getParentModel()
Retrieve the JcrItemModel for the parent
Node . |
String |
getPath()
The absolute JCR path for the Item.
|
String |
getRelativePath()
Retrieve the JCR path for the Item, relative to the first referencable ancestor
|
String |
getUuid()
Retrieve the identifier (UUID) of the first referencable ancestor node
|
int |
hashCode() |
protected T |
load() |
protected T |
loadModel() |
String |
toString() |
public JcrItemModel(T item)
public JcrItemModel(String path, boolean property)
public String getUuid()
public String getRelativePath()
public String getPath()
public boolean exists()
IModel.getObject()
), but has since
been removed, the returned information may be incorrect.public JcrItemModel<javax.jcr.Node> getParentModel()
Node
.protected T load()
load
in class org.apache.wicket.model.LoadableDetachableModel<T extends javax.jcr.Item>
protected T loadModel()
public void detach()
detach
in interface org.apache.wicket.model.IDetachable
detach
in class org.apache.wicket.model.LoadableDetachableModel<T extends javax.jcr.Item>
public String toString()
toString
in class org.apache.wicket.model.LoadableDetachableModel<T extends javax.jcr.Item>
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.