Package io.goobi.viewer.managedbeans
Class ArchiveMetadataBean
java.lang.Object
io.goobi.viewer.managedbeans.ArchiveMetadataBean
- All Implemented Interfaces:
Serializable
Short lived bean to store
metadata lists for archiveEntries.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptiondefault constructor using local configuration to load metadata listArchiveMetadataBean(Configuration config) Constructor for testing. -
Method Summary
Modifier and TypeMethodDescriptiongetMetadata(ArchiveEntry entry) Get theArchiveEntryMetadataListfor the givenArchiveEntry.booleanisMetadataLoaded(String entryId) Check if metadata for theArchiveEntrywith the given id has already been cached in the beanvoidsetUnitDate(ArchiveEntry entry)
-
Constructor Details
-
ArchiveMetadataBean
public ArchiveMetadataBean()default constructor using local configuration to load metadata list -
ArchiveMetadataBean
Constructor for testing. Receives custom config object of which only the methodConfiguration.getArchiveMetadata()is used- Parameters:
config-
-
-
Method Details
-
isMetadataLoaded
Check if metadata for theArchiveEntrywith the given id has already been cached in the bean- Parameters:
entryId- id of the archive entry- Returns:
- true if metadata for the entry is stored in the bean
-
getMetadata
Get theArchiveEntryMetadataListfor the givenArchiveEntry. If the metadata is not already stored in the bean, it is created using the entry's solr document and the metadata list of the bean, and stored within the bean- Parameters:
entry- The entry which metadata to return- Returns:
- the metadata list for the given entry
- Throws:
PresentationException- If the metadata list had to be created and an error occured while doing so
-
setUnitDate
-