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
- 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' classbooleanbooleanbooleanbooleanbooleanOnly meaningful for the default language for which all required fields must be filledvoidsave()Save the selected note to the databasevoidsetCurrentNoteType(String currentNoteType) voidsetNote(CMSRecordNote note) voidvoidvoidsetRecordQuery(String query) voidsetReturnUrl(String returnUrl) voidsetSelectedLocale(Locale locale) Set the locale to use for display and editingMethods 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
- Returns:
- the note
-
setNote
- Parameters:
note- the note to set
-
setNoteId
- Throws:
DAOException
-
getNoteId
-
setRecordIdentifier
-
setRecordQuery
-
getRecordIdentifier
-
getRecordQuery
-
getReturnUrl
- Returns:
- the returnUrl
-
setReturnUrl
- Parameters:
returnUrl- the returnUrl to set
-
isRecordSelected
public boolean isRecordSelected()- Returns:
- true if
noteis not null, because it always has a record identifier
-
save
public void save()Save 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-- 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-- 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-- 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-- 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:IPolyglottSet the locale to use for display and editing- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale-
-
getCurrentNoteType
- Returns:
- the currentNoteType
-
setCurrentNoteType
- Parameters:
currentNoteType- the currentNoteType to set
-
isMultiRecordNote
public boolean isMultiRecordNote() -
isSingleRecordNote
public boolean isSingleRecordNote()
-