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
Modifier and TypeFieldDescriptionstatic final String
Constant for content metadata.static final String
Constant for display metadata.static final String
Constant for variants metadata.static final String
Constant for word metadata.Fields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE
-
Constructor Summary
ConstructorDescriptionDefaultDefinition
(javax.jcr.Node node, String parentPath, DefaultDefinitionFactory factory) Create aDefaultDefinition
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get 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.void
setContent
(String content) Set the content.void
setDisplayOnText
(boolean displayOnText) Set the displayOnText.void
setVariants
(Collection<String> variants) Set the variants.void
Set 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, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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
- theDefaultDefinitionFactory
which creates the AmetysObject.
-
-
Method Details
-
getWord
Description copied from interface:Definition
Get the word.- Specified by:
getWord
in interfaceDefinition
- Returns:
- the word
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWord
Description copied from interface:Definition
Set the word.- Specified by:
setWord
in interfaceDefinition
- Parameters:
word
- the word to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
getVariants
Description copied from interface:Definition
Get the variants.- Specified by:
getVariants
in interfaceDefinition
- Returns:
- the variants
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setVariants
Description copied from interface:Definition
Set the variants.- Specified by:
setVariants
in interfaceDefinition
- Parameters:
variants
- the variants to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
getContent
Description copied from interface:Definition
Get the content.- Specified by:
getContent
in interfaceDefinition
- Returns:
- _the content
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setContent
Description copied from interface:Definition
Set the content.- Specified by:
setContent
in interfaceDefinition
- Parameters:
content
- the content to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
displayOnText
Description copied from interface:Definition
Get the displayOnText.- Specified by:
displayOnText
in interfaceDefinition
- Returns:
- _the displayOnText
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDisplayOnText
Description copied from interface:Definition
Set the displayOnText.- Specified by:
setDisplayOnText
in interfaceDefinition
- Parameters:
displayOnText
- the displayOnText to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
getAllForms
Description copied from interface:Definition
Get all forms.- Specified by:
getAllForms
in interfaceDefinition
- Returns:
- a list of all the word forms (word + variants).
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSite
Description copied from interface:SiteAwareAmetysObject
Returns this object's site.- Specified by:
getSite
in interfaceSiteAwareAmetysObject
- Returns:
- this object's site
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSiteName
Description copied from interface:SiteAwareAmetysObject
Returns this object's site name.- Specified by:
getSiteName
in interfaceSiteAwareAmetysObject
- Returns:
- this object's site name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLanguage
Get the definition language.- Returns:
- the definition language.
-