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
ConstructorsConstructorDescriptionJPA constructor.PersistentCMSComponent(CMSComponent component) PersistentCMSComponent(CMSComponent template, Collection<CMSContent> contentData) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(CMSContent content) intboolean<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()inthashCode()booleanisComplete(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 truebooleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classbooleanisPaged()booleanOnly meaningful for the default language for which all required fields must be filledvoidsetAttribute(String key, String value) voidsetAttributes(Map<String, String> attributes) voidvoidvoidsetOwningPage(CMSPage ownerPage) voidsetOwningTemplate(CMSPageTemplate template) voidsetPublicationState(ContentItemPublicationState publicationState) voidsetSelectedLocale(Locale locale) Set the locale to use for display and editingvoidsetTemplateFilename(String templateFilename) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:IPolyglottIf 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:
isCompletein interfaceIPolyglott- Parameters:
locale-- 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: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-
-
getTranslatableContentItems
-
compareTo
- Specified by:
compareToin interfaceComparable<PersistentCMSComponent>
-
setAttribute
-
getAttribute
-
getAttributes
-
setAttributes
-
getContentByItemId
-
getFirstContentOfType
-
getAllContentOfType
-
isPaged
public boolean isPaged() -
hashCode
public int hashCode() -
equals
-