Package org.ametys.cms.data.holder.group
Interface IndexableRepeater
- All Superinterfaces:
ModelAwareRepeater,Repeater
- All Known Subinterfaces:
ModifiableIndexableRepeater
- All Known Implementing Classes:
DefaultModelAwareRepeater,DefaultModifiableModelAwareRepeater
Interface for indexable repeaters
-
Method Summary
Modifier and TypeMethodDescriptionList<? extends IndexableRepeaterEntry>Retrieves the repeater entries, sorted by positiongetEntry(int position) Retrieves the repeater entry at the given position.Retrieves the parent of the currentRepeaterRetrieves the rootDataHolderof the current repeaterdefault List<org.apache.solr.common.SolrInputDocument>indexData(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootDocument, String solrFieldPrefix) Indexes all data and properties of thisRepeaterList<org.apache.solr.common.SolrInputDocument>indexData(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootDocument, String solrFieldPrefix, IndexableDataContext context) Indexes all data and properties of thisRepeaterMethods inherited from interface org.ametys.plugins.repository.data.holder.group.ModelAwareRepeater
dataToJSON, dataToJSON, dataToJSON, dataToJSON, dataToJSONForEdition, dataToSAX, dataToSAX, dataToSAX, dataToSAX, dataToSAXForEdition, getDifferences, getDifferences, getModel, hasDifferences, hasDifferencesMethods inherited from interface org.ametys.plugins.repository.data.holder.group.Repeater
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getRepositoryData, getSize, hasEntry, hasToMoveEntries
-
Method Details
-
indexData
default List<org.apache.solr.common.SolrInputDocument> indexData(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootDocument, String solrFieldPrefix) throws BadItemTypeException Indexes all data and properties of thisRepeater- Parameters:
document- the solr document representing thRepeaterrootDocument- the solr document of the root object.solrFieldPrefix- the prefix of the solr field- Returns:
- additional solr documents that may have been created (ex: repeater entries)
- Throws:
BadItemTypeException- if the saxed value's type does not matches the stored data
-
indexData
List<org.apache.solr.common.SolrInputDocument> indexData(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootDocument, String solrFieldPrefix, IndexableDataContext context) throws BadItemTypeException Indexes all data and properties of thisRepeater- Parameters:
document- the solr document representing thisRepeaterrootDocument- the solr document of the root object.solrFieldPrefix- the prefix of the solr fieldcontext- The context of the data to index- Returns:
- additional solr documents that may have been created (ex: repeater entries)
- Throws:
BadItemTypeException- if the saxed value's type does not matches the stored data
-
getEntries
List<? extends IndexableRepeaterEntry> getEntries()Description copied from interface:RepeaterRetrieves the repeater entries, sorted by position- Specified by:
getEntriesin interfaceModelAwareRepeater- Specified by:
getEntriesin interfaceRepeater- Returns:
- the repeater entries
-
getEntry
Description copied from interface:RepeaterRetrieves the repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to get an entry from the beginning Or the position can an integer between 0 and - the repeater size to get an entry from the end (0 means at the end, -1 means before the last one and so on)- Specified by:
getEntryin interfaceModelAwareRepeater- Specified by:
getEntryin interfaceRepeater- Parameters:
position- the position of the entry to retrieve- Returns:
- the repeater entry,
nullif there is no entry at this position
-
getParentDataHolder
Description copied from interface:RepeaterRetrieves the parent of the currentRepeater- Specified by:
getParentDataHolderin interfaceModelAwareRepeater- Specified by:
getParentDataHolderin interfaceRepeater- Returns:
- the parent of the current
Repeater
-
getRootDataHolder
Description copied from interface:RepeaterRetrieves the rootDataHolderof the current repeater- Specified by:
getRootDataHolderin interfaceModelAwareRepeater- Specified by:
getRootDataHolderin interfaceRepeater- Returns:
- the root
DataHolder
-