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 metadata.static final StringConstant for display metadata.static final StringConstant for variants metadata.static final StringConstant for word metadata.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.Get the variants.getWord()Get the word.voidsetContent(String content) Set the content.voidsetDisplayOnText(boolean displayOnText) Set the displayOnText.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
-
METADATA_WORD
Constant for word metadata.- See Also:
-
METADATA_VARIANTS
Constant for variants metadata.- See Also:
-
METADATA_CONTENT
Constant for content metadata.- See Also:
-
METADATA_DISPLAY
Constant for display metadata.- 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.
-