Class AbstractReferencesDataProvider
java.lang.Object
org.hippoecm.frontend.model.NodeModelWrapper<Node>
org.hippoecm.frontend.editor.workflow.model.AbstractReferencesDataProvider
- All Implemented Interfaces:
Serializable
,org.apache.wicket.markup.repeater.data.IDataProvider<DocumentReference>
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<Node>
,org.apache.wicket.util.io.IClusterable
,ISelectableDataProvider<DocumentReference>
- Direct Known Subclasses:
AbstractNodeReferenceDataProvider
,SiteReferencesDataProvider
public abstract class AbstractReferencesDataProvider
extends NodeModelWrapper<Node>
implements ISelectableDataProvider<DocumentReference>
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<DocumentReference>
protected int
protected final AbstractReferencesDataProvider.ReferenceType
protected final List<org.apache.wicket.model.IModel<DocumentReference>>
Fields inherited from class org.hippoecm.frontend.model.NodeModelWrapper
nodeModel
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractReferencesDataProvider
(JcrNodeModel nodeModel, AbstractReferencesDataProvider.ReferenceType referenceType, String locale) -
Method Summary
Modifier and TypeMethodDescriptionprotected ReferenceDetail
getComponentReferenceDetail
(ComponentReference reference) Returns the first matchingReferenceDetail
for the givenComponentReference
.protected ReferenceDetail
getDocumentReferenceDetail
(DocumentReference documentReference) int
getLimit()
Returns the maximum number of items that can be returned.int
Returns the estimate of the total number of results.abstract ReferenceDetail
getReferenceDetail
(DocumentReference documentReference) Returns theReferenceDetail
for the givenDocumentReference
.abstract List<DocumentReference>
getReferences
(Node handle) Returns the list ofDocumentReference
s for the givenhandle
.List<org.apache.wicket.model.IModel<DocumentReference>>
Returns the selected items.protected List<DocumentReference>
getUnifiedSiteReferences
(Node handle) iterator
(long first, long count) org.apache.wicket.model.IModel<DocumentReference>
model
(DocumentReference reference) long
size()
Methods inherited from class org.hippoecm.frontend.model.NodeModelWrapper
detach, getNode, getNodeModel, getObject, setNodeModel, setObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.markup.repeater.data.IDataProvider
detach
Methods inherited from interface org.apache.wicket.model.IModel
as, combineWith, filter, flatMap, isPresent, map, orElse, orElseGet
-
Field Details
-
referenceType
-
selectedItems
-
numberOfResults
protected transient int numberOfResults -
data
-
-
Constructor Details
-
AbstractReferencesDataProvider
public AbstractReferencesDataProvider(JcrNodeModel nodeModel, AbstractReferencesDataProvider.ReferenceType referenceType, String locale)
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceorg.apache.wicket.markup.repeater.data.IDataProvider<DocumentReference>
-
getNumberOfResults
public int getNumberOfResults()Description copied from interface:ISelectableDataProvider
Returns the estimate of the total number of results. When this number is unknown or equal to the hard limit of 1000, then -1 is returned.- Specified by:
getNumberOfResults
in interfaceISelectableDataProvider<DocumentReference>
-
getLimit
public int getLimit()Description copied from interface:ISelectableDataProvider
Returns the maximum number of items that can be returned.- Specified by:
getLimit
in interfaceISelectableDataProvider<DocumentReference>
-
size
public long size()- Specified by:
size
in interfaceorg.apache.wicket.markup.repeater.data.IDataProvider<DocumentReference>
-
model
- Specified by:
model
in interfaceorg.apache.wicket.markup.repeater.data.IDataProvider<DocumentReference>
-
getSelectedItems
Description copied from interface:ISelectableDataProvider
Returns the selected items.- Specified by:
getSelectedItems
in interfaceISelectableDataProvider<DocumentReference>
-
getReferenceType
-
getUnifiedSiteReferences
- Throws:
RepositoryException
-
getDocumentReferenceDetail
-
getComponentReferenceDetail
Returns the first matchingReferenceDetail
for the givenComponentReference
.- Parameters:
reference
- the component reference that is either a xpage or a hst component- Returns:
- reference detail
-
getReferences
Returns the list ofDocumentReference
s for the givenhandle
.- Parameters:
handle
- the document handle- Returns:
- list of document references
- Throws:
RepositoryException
-
getReferenceDetail
Returns theReferenceDetail
for the givenDocumentReference
.- Parameters:
documentReference
- the reference- Returns:
- reference detail
-