Package io.goobi.viewer.managedbeans
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRecordTitle(de.intranda.metadata.multilanguage.IMetadataValue label) getNote()booleanisComplete(Locale locale) Return true if text and title are both complete (not empty) for both title and text.booleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class.booleanbooleanbooleanbooleanbooleanOnly meaningful for the default language for which all required fields must be filled.voidsave()Saves the selected note to the database.voidsetCurrentNoteType(String currentNoteType) voidsetNote(CMSRecordNote note) voidvoidvoidsetRecordQuery(String query) voidsetReturnUrl(String returnUrl) voidsetSelectedLocale(Locale locale) Sets the locale to use for display and editing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
CmsRecordNoteEditBean
public CmsRecordNoteEditBean()
-
-
Method Details
-
getNote
-
setNote
-
setNoteId
- Throws:
DAOException
-
getNoteId
-
setRecordIdentifier
-
setRecordQuery
-
getRecordIdentifier
-
getRecordQuery
-
getReturnUrl
-
setReturnUrl
-
isRecordSelected
public boolean isRecordSelected()- Returns:
- true if
noteis 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
-
createRecordTitle
- Parameters:
label- Metadata value containing the record title- Returns:
TranslatedText
-
isComplete
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:
isCompletein interfaceIPolyglott- Parameters:
locale- the locale for which to check completeness- Returns:
- true if title and text of the note are complete; false otherwise;
-
isValid
Description copied from interface:IPolyglottOnly meaningful for the default language for which all required fields must be filled.- Specified by:
isValidin interfaceIPolyglott- Parameters:
locale- the locale to validate required fields for- Returns:
- true if all required fields contain a value in the given locale
-
isEmpty
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class.- Specified by:
isEmptyin interfaceIPolyglott- Parameters:
locale- the locale to check for empty fields- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocalein interfaceIPolyglott- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglottSets the locale to use for display and editing.- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale- the locale to select
-
getCurrentNoteType
-
setCurrentNoteType
-
isMultiRecordNote
public boolean isMultiRecordNote() -
isSingleRecordNote
public boolean isSingleRecordNote()
-