Class CMSMediumTextContent
java.lang.Object
io.goobi.viewer.model.cms.pages.content.CMSContent
io.goobi.viewer.model.cms.pages.content.types.CMSMediumTextContent
- All Implemented Interfaces:
TranslatableCMSContent
,IPolyglott
CMS content for longer texts, holding up to 16,777,215 characters (all translations combined)
- Author:
- florian
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
exportHtmlFragment
(String outputFolderPath, String namingScheme) Writes HTML fragment value as file for re-indexing.getText()
handlePageLoad
(boolean resetResults, CMSComponent component) Method to call when loading a CMSPage including this content itemboolean
isComplete
(Locale locale) If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)
also returns trueboolean
isEmpty()
boolean
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classboolean
Only meaningfull for the default language for which all required fields must be filledvoid
setSelectedLocale
(Locale locale) Set the locale to use for display and editingvoid
setText
(TranslatedText text) Methods inherited from class io.goobi.viewer.model.cms.pages.content.CMSContent
getBackendComponentLibrary, getData, getId, getItemId, getOwningComponent, getOwningPage, isRequired, setId, setItemId, setOwningComponent, setRequired
Methods 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
Methods inherited from interface io.goobi.viewer.model.cms.pages.content.TranslatableCMSContent
getTranslation, isRequired
-
Constructor Details
-
CMSMediumTextContent
public CMSMediumTextContent() -
CMSMediumTextContent
-
-
Method Details
-
getBackendComponentName
- Specified by:
getBackendComponentName
in classCMSContent
-
getTranslation
- Specified by:
getTranslation
in interfaceTranslatableCMSContent
-
getText
- Specified by:
getText
in interfaceTranslatableCMSContent
-
setText
- Specified by:
setText
in interfaceTranslatableCMSContent
-
copy
- Specified by:
copy
in classCMSContent
-
isComplete
Description copied from interface:IPolyglott
If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)
also returns true- Specified by:
isComplete
in interfaceIPolyglott
- Returns:
- true if
IPolyglott.isValid(Locale)
returns true for the given locale and all fields contain a value which have a value in the default locale. For the default locale,IPolyglott.isComplete(Locale)
andIPolyglott.isValid(Locale)
are identical. For implementations with only one field, both methods are also always identical
-
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
-
exportHtmlFragment
public List<File> exportHtmlFragment(String outputFolderPath, String namingScheme) throws IOException, ViewerConfigurationException Description copied from class:CMSContent
Writes HTML fragment value as file for re-indexing. HTML/text fragments are exported directly. Attached media items are exported as long as their content type is one of the supported text document formats.- Specified by:
exportHtmlFragment
in classCMSContent
- Parameters:
outputFolderPath
- aString
object.namingScheme
- aString
object.- Returns:
- Exported Files
- Throws:
IOException
- if any.ViewerConfigurationException
-
handlePageLoad
public String handlePageLoad(boolean resetResults, CMSComponent component) throws PresentationException Description copied from class:CMSContent
Method to call when loading a CMSPage including this content item- Specified by:
handlePageLoad
in classCMSContent
- Returns:
- a JSF action response
- Throws:
PresentationException
-
getData
- Specified by:
getData
in classCMSContent
- Returns:
- a string representing this contentItem for use in frontend-components. May be an empty string for content with no clear String representation
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classCMSContent
-