Class CmsRecordNoteEditBean

java.lang.Object
io.goobi.viewer.managedbeans.CmsRecordNoteEditBean
All Implemented Interfaces:
IPolyglott, Serializable

@Named @ViewScoped public class CmsRecordNoteEditBean extends Object implements Serializable, IPolyglott
Author:
Florian Alpers
See Also:
  • Constructor Details

    • CmsRecordNoteEditBean

      public CmsRecordNoteEditBean()
  • Method Details

    • getNote

      public CMSRecordNote getNote()
    • setNote

      public void setNote(CMSRecordNote note)
    • setNoteId

      public void setNoteId(Long id) throws DAOException
      Throws:
      DAOException
    • getNoteId

      public Long getNoteId()
    • setRecordIdentifier

      public void setRecordIdentifier(String pi)
    • setRecordQuery

      public void setRecordQuery(String query)
    • getRecordIdentifier

      public String getRecordIdentifier()
    • getRecordQuery

      public String getRecordQuery()
    • getReturnUrl

      public String getReturnUrl()
    • setReturnUrl

      public void setReturnUrl(String returnUrl)
    • isRecordSelected

      public boolean isRecordSelected()
      Returns:
      true if note is not null, because it always has a record identifier
    • save

      public void save()
      Saves the selected note to the database.
    • isNewNote

      public boolean isNewNote()
      Returns:
      true if either no note has been created yet (record identifier not yet entered) or if the note has not been persisted yet.
    • getMetadataElement

      public MetadataElement getMetadataElement()
    • createRecordTitle

      public TranslatedText createRecordTitle(de.intranda.metadata.multilanguage.IMetadataValue label)
      Parameters:
      label - Metadata value containing the record title
      Returns:
      TranslatedText
    • isComplete

      public boolean isComplete(Locale locale)
      Return true if text and title are both complete (not empty) for both title and text. If locale is not the default locale, text/title counts as complete if they are empty as long as the corresponding field in the default language is also empty.
      Specified by:
      isComplete in interface IPolyglott
      Parameters:
      locale - the locale for which to check completeness
      Returns:
      true if title and text of the note are complete; false otherwise;
    • isValid

      public boolean isValid(Locale locale)
      Description copied from interface: IPolyglott
      Only meaningful for the default language for which all required fields must be filled.
      Specified by:
      isValid in interface IPolyglott
      Parameters:
      locale - the locale to validate required fields for
      Returns:
      true if all required fields contain a value in the given locale
    • isEmpty

      public boolean isEmpty(Locale locale)
      Description copied from interface: IPolyglott
      If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class.
      Specified by:
      isEmpty in interface IPolyglott
      Parameters:
      locale - the locale to check for empty fields
      Returns:
      true if no fields are filled for the given locale
    • getSelectedLocale

      public Locale getSelectedLocale()
      Specified by:
      getSelectedLocale in interface IPolyglott
      Returns:
      the locale currently set by IPolyglott.setSelectedLocale(Locale)
    • setSelectedLocale

      public void setSelectedLocale(Locale locale)
      Description copied from interface: IPolyglott
      Sets the locale to use for display and editing.
      Specified by:
      setSelectedLocale in interface IPolyglott
      Parameters:
      locale - the locale to select
    • getCurrentNoteType

      public String getCurrentNoteType()
    • setCurrentNoteType

      public void setCurrentNoteType(String currentNoteType)
    • isMultiRecordNote

      public boolean isMultiRecordNote()
    • isSingleRecordNote

      public boolean isSingleRecordNote()