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
-
Method Summary
Modifier and TypeMethodDescriptioncreateRecordTitle
(de.intranda.metadata.multilanguage.IMetadataValue label) getNote()
boolean
isComplete
(Locale locale) Return true if text and title are both complete (not empty) for both title and text.boolean
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classboolean
boolean
boolean
boolean
boolean
Only meaningfull for the default language for which all required fields must be filledboolean
save()
Save the selected note to the databasevoid
setCurrentNoteType
(String currentNoteType) void
setNote
(CMSRecordNote note) void
void
void
setRecordQuery
(String query) void
setReturnUrl
(String returnUrl) void
setSelectedLocale
(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, wait
Methods 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
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
-
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:
isComplete
in interfaceIPolyglott
- Returns:
- true if title and text of the note are complete; false otherwise;
-
isValid
Description copied from interface:IPolyglott
Only meaningfull for the default language for which all required fields must be filled- Specified by:
isValid
in interfaceIPolyglott
- Returns:
- true if all required fields contain a value in the given locale
-
isEmpty
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 interfaceIPolyglott
- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocale
in interfaceIPolyglott
- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglott
Set the locale to use for display and editing- Specified by:
setSelectedLocale
in interfaceIPolyglott
-
getCurrentNoteType
- Returns:
- the currentNoteType
-
setCurrentNoteType
- Parameters:
currentNoteType
- the currentNoteType to set
-
isMultiRecordNote
public boolean isMultiRecordNote() -
isSingleRecordNote
public boolean isSingleRecordNote()
-