Package org.hippoecm.frontend.model
Class ChildNodeProvider
- java.lang.Object
-
- org.hippoecm.frontend.model.ItemModelWrapper<T>
-
- org.hippoecm.frontend.model.AbstractProvider<javax.jcr.Node,JcrNodeModel>
-
- org.hippoecm.frontend.model.ChildNodeProvider
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<javax.jcr.Node>
,org.apache.wicket.util.io.IClusterable
public class ChildNodeProvider extends AbstractProvider<javax.jcr.Node,JcrNodeModel>
AnIDataProvider
that provides a list of models for child nodes, based on aIFieldDescriptor
and aJcrNodeModel
. A prototype is used to add new child nodes.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hippoecm.frontend.model.AbstractProvider
elements
-
-
Constructor Summary
Constructors Constructor Description ChildNodeProvider(IFieldDescriptor descriptor, JcrNodeModel prototype, JcrItemModel<javax.jcr.Node> itemModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNew()
Add a new element.void
detach()
IFieldDescriptor
getDescriptor()
ModelPathElement
getFieldElement(JcrNodeModel model)
Retrieve theModelPathElement
to access an element.protected void
loadElements()
Method to be overridden by subclasses, to populate the list of elements.void
moveToBottom(JcrNodeModel model)
Move a model to the bottom of the list.void
moveToTop(JcrNodeModel model)
Move a model to the top of the list.void
moveUp(JcrNodeModel model)
Move a model up one position.void
remove(JcrNodeModel model)
Remove a model from the list.-
Methods inherited from class org.hippoecm.frontend.model.AbstractProvider
iterator, load, refresh, setItemModel, size
-
Methods inherited from class org.hippoecm.frontend.model.ItemModelWrapper
getItemModel, getObject, setObject
-
-
-
-
Constructor Detail
-
ChildNodeProvider
public ChildNodeProvider(IFieldDescriptor descriptor, JcrNodeModel prototype, JcrItemModel<javax.jcr.Node> itemModel)
-
-
Method Detail
-
getDescriptor
public IFieldDescriptor getDescriptor()
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
- Specified by:
detach
in interfaceorg.apache.wicket.model.IModel<javax.jcr.Node>
- Overrides:
detach
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
-
addNew
public void addNew()
Description copied from class:AbstractProvider
Add a new element.- Specified by:
addNew
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
-
remove
public void remove(JcrNodeModel model)
Description copied from class:AbstractProvider
Remove a model from the list.- Specified by:
remove
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
- Parameters:
model
- the model to remove
-
moveUp
public void moveUp(JcrNodeModel model)
Description copied from class:AbstractProvider
Move a model up one position.- Specified by:
moveUp
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
- Parameters:
model
- the model to move
-
moveToTop
public void moveToTop(JcrNodeModel model)
Description copied from class:AbstractProvider
Move a model to the top of the list.- Specified by:
moveToTop
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
- Parameters:
model
- the model to move
-
moveToBottom
public void moveToBottom(JcrNodeModel model)
Description copied from class:AbstractProvider
Move a model to the bottom of the list.- Specified by:
moveToBottom
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
- Parameters:
model
- the model to move
-
getFieldElement
public ModelPathElement getFieldElement(JcrNodeModel model)
Description copied from class:AbstractProvider
Retrieve theModelPathElement
to access an element.- Specified by:
getFieldElement
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
- Parameters:
model
- the element to be made accessible- Returns:
- the ModelPathElement for the element
-
loadElements
protected void loadElements()
Description copied from class:AbstractProvider
Method to be overridden by subclasses, to populate the list of elements.- Specified by:
loadElements
in classAbstractProvider<javax.jcr.Node,JcrNodeModel>
-
-