Package io.goobi.viewer.managedbeans
Class CollectionViewBean
java.lang.Object
io.goobi.viewer.managedbeans.CollectionViewBean
- All Implemented Interfaces:
Serializable
Creates and stored
CollectionView
s for a session.- Author:
- florian
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCollection
(CMSCollectionContent content) Get theCollectionView
of 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 String
getCollectionId
(CMSCollectionContent content) getCollectionId.getCollectionIfStored.getCollections
(String field) get a list of allCollectionView
s with the given solr field which are already loaded viagetCollection(CMSCollectionContent, int, boolean, boolean, boolean)
.getColletionMap
(CMSCollectionContent content) getColletionMap.getLoadedCollectionsForPage.List<javax.faces.model.SelectItem>
Queries Solr for a list of all values of the set collectionField which my serve as a collection.List<javax.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.void
invalidate.boolean
removeCollection
(CMSCollectionContent content) removeCollection.void
removeCollectionsForPage.
-
Constructor Details
-
CollectionViewBean
public CollectionViewBean()
-
-
Method Details
-
getCollection
public CollectionView getCollection(CMSCollectionContent content) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Get theCollectionView
of 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
- aCMSCollectionContent
instance 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:
PresentationException
IndexUnreachableException
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
- aCMSCollectionContent
objecttopVisibleElement
- aString
object- Returns:
- a
CollectionView
object - 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:
PresentationException
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollectionId
getCollectionId.
- Parameters:
content
- aCMSCollectionContent
object- Returns:
- a
String
object
-
getCollectionIfStored
getCollectionIfStored.
- Parameters:
content
- aCMSCollectionContent
object- Returns:
- a
Optional
object
-
removeCollection
removeCollection.
- Parameters:
content
- aCMSCollectionContent
object- 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:
PresentationException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
IndexUnreachableException
-
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
- aCMSCollectionContent
objecttopVisibleElement
- aString
object- Returns:
- a
CollectionView
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getPossibleIgnoreCollectionList
public List<javax.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
- aCMSCollectionContent
objectincludeSubcollections
-- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.
-
getPossibleBaseCollectionList
public List<javax.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
List
object. - Throws:
IndexUnreachableException
- if any.
-
getColletionMap
public Map<String,CollectionResult> getColletionMap(CMSCollectionContent content) throws IndexUnreachableException getColletionMap.
- Parameters:
content
- aCMSCollectionContent
object- Returns:
- Map<String, CollectionResult>
- Throws:
IndexUnreachableException
-
removeCollectionsForPage
removeCollectionsForPage.
- Parameters:
page
- aCMSPage
object
-
getLoadedCollectionsForPage
getLoadedCollectionsForPage.
-
getCollections
get a list of allCollectionView
s 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
List
object.
-
invalidate
public void invalidate()invalidate.
-