Class PersistentCMSComponent
java.lang.Object
io.goobi.viewer.model.cms.pages.content.PersistentCMSComponent
- All Implemented Interfaces:
IPolyglott
,Serializable
,Comparable<PersistentCMSComponent>
@Entity
public class PersistentCMSComponent
extends Object
implements IPolyglott, Serializable, Comparable<PersistentCMSComponent>
- See Also:
-
Constructor Summary
ConstructorDescriptionJPA constructor.PersistentCMSComponent
(CMSComponent component) PersistentCMSComponent
(CMSComponent template, Collection<CMSContent> contentData) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(CMSContent content) int
boolean
<T extends CMSContent>
List<T>getAllContentOfType
(Class<? extends CMSContent> clazz) getAttribute
(String key) getContentByItemId
(String itemId) <T extends CMSContent>
TgetFirstContentOfType
(Class<? extends CMSContent> clazz) getId()
getOrder()
int
hashCode()
boolean
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
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classboolean
isPaged()
boolean
Only meaningfull for the default language for which all required fields must be filledvoid
setAttribute
(String key, String value) void
setAttributes
(Map<String, String> attributes) void
void
void
setOwningPage
(CMSPage ownerPage) void
setOwningTemplate
(CMSPageTemplate template) void
setPublicationState
(ContentItemPublicationState publicationState) void
setSelectedLocale
(Locale locale) Set the locale to use for display and editingvoid
setTemplateFilename
(String templateFilename) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
PersistentCMSComponent
public PersistentCMSComponent()JPA constructor. -
PersistentCMSComponent
-
PersistentCMSComponent
-
PersistentCMSComponent
-
-
Method Details
-
getId
-
setId
-
getPublicationState
- Returns:
- the publicationState
-
setPublicationState
- Parameters:
publicationState
- the publicationState to set
-
getOrder
- Returns:
- the order
-
setOrder
- Parameters:
order
- the order to set
-
getContentItems
- Returns:
- the contentItems
-
getOwningPage
-
setOwningPage
-
setOwningTemplate
-
getOwningTemplate
-
getTemplateFilename
-
setTemplateFilename
-
addContent
-
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
-
getTranslatableContentItems
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PersistentCMSComponent>
-
setAttribute
-
getAttribute
-
getAttributes
-
setAttributes
-
getContentByItemId
-
getFirstContentOfType
-
getAllContentOfType
-
isPaged
public boolean isPaged() -
hashCode
public int hashCode() -
equals
-