Package io.goobi.viewer.managedbeans
Class CollectionViewBean
java.lang.Object
io.goobi.viewer.managedbeans.CollectionViewBean
- All Implemented Interfaces:
Serializable
Creates and stored
CollectionViews for a session.- Author:
- florian
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCollection(CMSCollectionContent content) Get theCollectionViewof the given content item in the given page.getCollection(CMSCollectionContent content, int collectionBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy) Deprecated.getCollection(CMSCollectionContent content, int collectionBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy, String topVisibleElement) Deprecated.getCollection(CMSCollectionContent content, String topVisibleElement) getCollection.static StringgetCollectionId(CMSCollectionContent content) getCollectionId.getCollectionIfStored.getCollections(String field) get a list of allCollectionViews with the given solr field which are already loaded viagetCollection(CMSCollectionContent, int, boolean, boolean, boolean).getColletionMap(CMSCollectionContent content) getColletionMap.getLoadedCollectionsForPage.List<jakarta.faces.model.SelectItem> Queries Solr for a list of all values of the set collectionField which my serve as a collection.List<jakarta.faces.model.SelectItem> getPossibleIgnoreCollectionList(CMSCollectionContent content, boolean includeSubcollections) Queries Solr for a list of all values of the set collectionField which my serve as a collection.initializeCollection(CMSCollectionContent content, int numBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy, String topVisibleElement) Deprecated.initializeCollection(CMSCollectionContent content, String topVisibleElement) Creates a collection view object from the item's collection related properties.voidinvalidate.booleanremoveCollection(CMSCollectionContent content) removeCollection.voidremoveCollectionsForPage.
-
Constructor Details
-
CollectionViewBean
public CollectionViewBean()
-
-
Method Details
-
getCollection
public CollectionView getCollection(CMSCollectionContent content) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Get theCollectionViewof the given content item in the given page. If the view hasn't been initialized yet, do so and add it to the Bean's CollectionView map- Parameters:
content- aCMSCollectionContentinstance providing the base data for this collection- Returns:
- The CollectionView or null if no matching ContentItem was found
- Throws:
PresentationException- if any.IndexUnreachableException- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollection
@Deprecated(since="24.08") public CollectionView getCollection(CMSCollectionContent content, int collectionBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Deprecated.- Throws:
PresentationExceptionIndexUnreachableExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollection
public CollectionView getCollection(CMSCollectionContent content, String topVisibleElement) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException getCollection.
- Parameters:
content- aCMSCollectionContentobjecttopVisibleElement- aStringobject- Returns:
- a
CollectionViewobject - Throws:
PresentationException- if any.IndexUnreachableException- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException- if any.
-
getCollection
@Deprecated(since="24.08") public CollectionView getCollection(CMSCollectionContent content, int collectionBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy, String topVisibleElement) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Deprecated.- Throws:
PresentationExceptionIndexUnreachableExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollectionId
getCollectionId.
- Parameters:
content- aCMSCollectionContentobject- Returns:
- a
Stringobject
-
getCollectionIfStored
getCollectionIfStored.
- Parameters:
content- aCMSCollectionContentobject- Returns:
- a
Optionalobject
-
removeCollection
removeCollection.
- Parameters:
content- aCMSCollectionContentobject- Returns:
- a boolean
-
initializeCollection
@Deprecated(since="24.08") public CollectionView initializeCollection(CMSCollectionContent content, int numBaseLevels, boolean openExpanded, boolean displayParents, boolean ignoreHierarchy, String topVisibleElement) throws PresentationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, IndexUnreachableException Deprecated.- Throws:
PresentationExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptionIndexUnreachableException
-
initializeCollection
public CollectionView initializeCollection(CMSCollectionContent content, String topVisibleElement) throws PresentationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, IndexUnreachableException Creates a collection view object from the item's collection related properties.- Parameters:
content- aCMSCollectionContentobjecttopVisibleElement- aStringobject- Returns:
- a
CollectionViewobject. - Throws:
PresentationException- if any.IndexUnreachableException- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getPossibleIgnoreCollectionList
public List<jakarta.faces.model.SelectItem> getPossibleIgnoreCollectionList(CMSCollectionContent content, boolean includeSubcollections) throws IndexUnreachableException Queries Solr for a list of all values of the set collectionField which my serve as a collection.- Parameters:
content- aCMSCollectionContentobjectincludeSubcollections-- Returns:
- a
Listobject. - Throws:
IndexUnreachableException- if any.
-
getPossibleBaseCollectionList
public List<jakarta.faces.model.SelectItem> getPossibleBaseCollectionList(CMSCollectionContent content) throws IndexUnreachableException Queries Solr for a list of all values of the set collectionField which my serve as a collection.- Parameters:
content-- Returns:
- a
Listobject. - Throws:
IndexUnreachableException- if any.
-
getColletionMap
public Map<String,CollectionResult> getColletionMap(CMSCollectionContent content) throws IndexUnreachableException getColletionMap.
- Parameters:
content- aCMSCollectionContentobject- Returns:
- Map<String, CollectionResult>
- Throws:
IndexUnreachableException
-
removeCollectionsForPage
removeCollectionsForPage.
- Parameters:
page- aCMSPageobject
-
getLoadedCollectionsForPage
getLoadedCollectionsForPage.
-
getCollections
get a list of allCollectionViews with the given solr field which are already loaded viagetCollection(CMSCollectionContent, int, boolean, boolean, boolean).- Parameters:
field- The solr field the collection is based on- Returns:
- a
Listobject.
-
invalidate
public void invalidate()invalidate.
-