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, 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).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, 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
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.
-
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
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).- Parameters:
field- The solr field the collection is based on- Returns:
- a
Listobject.
-
invalidate
public void invalidate()invalidate.
-