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
See Also:
  • Constructor Details

    • CmsRecordNoteEditBean

      public CmsRecordNoteEditBean()
  • Method Details

    • getNote

      public CMSRecordNote getNote()
      Returns:
      the note
    • setNote

      public void setNote(CMSRecordNote note)
      Parameters:
      note - the note to set
    • 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()
      Returns:
      the returnUrl
    • setReturnUrl

      public void setReturnUrl(String returnUrl)
      Parameters:
      returnUrl - the returnUrl to set
    • isRecordSelected

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

      public boolean save()
      Save the selected note to the database
      Returns:
      false if saving was not successful
    • 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 -
      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
      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 meaningfull for the default language for which all required fields must be filled
      Specified by:
      isValid in interface IPolyglott
      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
      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
      Set the locale to use for display and editing
      Specified by:
      setSelectedLocale in interface IPolyglott
    • getCurrentNoteType

      public String getCurrentNoteType()
      Returns:
      the currentNoteType
    • setCurrentNoteType

      public void setCurrentNoteType(String currentNoteType)
      Parameters:
      currentNoteType - the currentNoteType to set
    • isMultiRecordNote

      public boolean isMultiRecordNote()
    • isSingleRecordNote

      public boolean isSingleRecordNote()