Package org.ametys.plugins.glossary
Class DefaultDefinition
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<DefaultDefinitionFactory>
org.ametys.plugins.glossary.DefaultDefinition
- All Implemented Interfaces:
Definition,AmetysObject,JCRAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,SiteAwareAmetysObject
public class DefaultDefinition
extends SimpleAmetysObject<DefaultDefinitionFactory>
implements Definition, SiteAwareAmetysObject
Repository implementation of a glossary definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for content attribute.static final StringConstant for display attribute.static final StringConstant for themes attribute.static final StringConstant for variants attribute.static final StringConstant for word attribute.Fields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDefinition(javax.jcr.Node node, String parentPath, DefaultDefinitionFactory factory) Create aDefaultDefinition. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the displayOnText.Get all forms.Get the content.Get the definition language.getSite()Returns this object's site.Returns this object's site name.String[]Get the themes.Get the variants.getWord()Get the word.voidremoveTheme(String themeId) Remove theme if existvoidsetContent(String content) Set the content.voidsetDisplayOnText(boolean displayOnText) Set the displayOnText.voidSet the themes.voidsetVariants(Collection<String> variants) Set the variants.voidSet the word.Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Field Details
-
ATTRIBUTE_WORD
Constant for word attribute.- See Also:
-
ATTRIBUTE_VARIANTS
Constant for variants attribute.- See Also:
-
ATTRIBUTE_CONTENT
Constant for content attribute.- See Also:
-
ATTRIBUTE_DISPLAY
Constant for display attribute.- See Also:
-
ATTRIBUTE_THEMES
Constant for themes attribute.- See Also:
-
-
Constructor Details
-
DefaultDefinition
Create aDefaultDefinition.- Parameters:
node- the node backing thisAmetysObject.parentPath- the parent path in the Ametys hierarchy.factory- theDefaultDefinitionFactorywhich creates the AmetysObject.
-
-
Method Details
-
getWord
Description copied from interface:DefinitionGet the word.- Specified by:
getWordin interfaceDefinition- Returns:
- the word
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWord
Description copied from interface:DefinitionSet the word.- Specified by:
setWordin interfaceDefinition- Parameters:
word- the word to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getVariants
Description copied from interface:DefinitionGet the variants.- Specified by:
getVariantsin interfaceDefinition- Returns:
- the variants
- Throws:
AmetysRepositoryException- if an error occurs.
-
setVariants
Description copied from interface:DefinitionSet the variants.- Specified by:
setVariantsin interfaceDefinition- Parameters:
variants- the variants to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getContent
Description copied from interface:DefinitionGet the content.- Specified by:
getContentin interfaceDefinition- Returns:
- _the content
- Throws:
AmetysRepositoryException- if an error occurs.
-
setContent
Description copied from interface:DefinitionSet the content.- Specified by:
setContentin interfaceDefinition- Parameters:
content- the content to set- Throws:
AmetysRepositoryException- if an error occurs.
-
displayOnText
Description copied from interface:DefinitionGet the displayOnText.- Specified by:
displayOnTextin interfaceDefinition- Returns:
- _the displayOnText
- Throws:
AmetysRepositoryException- if an error occurs.
-
setDisplayOnText
Description copied from interface:DefinitionSet the displayOnText.- Specified by:
setDisplayOnTextin interfaceDefinition- Parameters:
displayOnText- the displayOnText to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getAllForms
Description copied from interface:DefinitionGet all forms.- Specified by:
getAllFormsin interfaceDefinition- Returns:
- a list of all the word forms (word + variants).
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSite
Description copied from interface:SiteAwareAmetysObjectReturns this object's site.- Specified by:
getSitein interfaceSiteAwareAmetysObject- Returns:
- this object's site
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSiteName
Description copied from interface:SiteAwareAmetysObjectReturns this object's site name.- Specified by:
getSiteNamein interfaceSiteAwareAmetysObject- Returns:
- this object's site name.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getLanguage
Get the definition language.- Returns:
- the definition language.
-
getThemes
Description copied from interface:DefinitionGet the themes.- Specified by:
getThemesin interfaceDefinition- Returns:
- the themes in an Array
- Throws:
AmetysRepositoryException- if an error occurs.
-
setThemes
Description copied from interface:DefinitionSet the themes.- Specified by:
setThemesin interfaceDefinition- Parameters:
themes- the themes to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
removeTheme
Description copied from interface:DefinitionRemove theme if exist- Specified by:
removeThemein interfaceDefinition- Parameters:
themeId- The id of theme to remove- Throws:
AmetysRepositoryException- if an error occurs
-