Class ArchiveMetadataBean

java.lang.Object
io.goobi.viewer.managedbeans.ArchiveMetadataBean
All Implemented Interfaces:
Serializable

@Named @ViewScoped public class ArchiveMetadataBean extends Object implements Serializable
Short lived bean to store metadata lists for archiveEntries.
See Also:
  • Constructor Details

    • ArchiveMetadataBean

      public ArchiveMetadataBean()
      default constructor using local configuration to load metadata list
    • ArchiveMetadataBean

      public ArchiveMetadataBean(Configuration config)
      Constructor for testing. Receives custom config object of which only the method Configuration.getArchiveMetadata() is used
      Parameters:
      config -
  • Method Details

    • isMetadataLoaded

      public boolean isMetadataLoaded(String entryId)
      Check if metadata for the ArchiveEntry with 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

      public ArchiveEntryMetadataList getMetadata(ArchiveEntry entry) throws PresentationException
      Get the ArchiveEntryMetadataList for the given ArchiveEntry. 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

      public void setUnitDate(ArchiveEntry entry)