public class DefaultDefinition extends SimpleAmetysObject<DefaultDefinitionFactory> implements Definition, SiteAwareAmetysObject
Modifier and Type | Field and Description |
---|---|
static String |
METADATA_CONTENT
Constant for content metadata.
|
static String |
METADATA_DISPLAY
Constant for display metadata.
|
static String |
METADATA_VARIANTS
Constant for variants metadata.
|
static String |
METADATA_WORD
Constant for word metadata.
|
Constructor and Description |
---|
DefaultDefinition(Node node,
String parentPath,
DefaultDefinitionFactory factory)
Create a
DefaultDefinition . |
Modifier and Type | Method and Description |
---|---|
boolean |
displayOnText()
Get the displayOnText.
|
Set<String> |
getAllForms()
Get all forms.
|
String |
getContent()
Get the content.
|
String |
getLanguage()
Get the definition language.
|
Site |
getSite()
Returns this object's site.
|
String |
getSiteName()
Returns this object's site name.
|
Set<String> |
getVariants()
Get the variants.
|
String |
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 |
setWord(String word)
Set the word.
|
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getId, getName, getParent, getParentPath, getPath, hashCode
public static final String METADATA_WORD
public static final String METADATA_VARIANTS
public static final String METADATA_CONTENT
public static final String METADATA_DISPLAY
public DefaultDefinition(Node node, String parentPath, DefaultDefinitionFactory factory)
DefaultDefinition
.node
- the node backing this AmetysObject
.parentPath
- the parent path in the Ametys hierarchy.factory
- the DefaultDefinitionFactory
which creates the AmetysObject.public String getWord() throws AmetysRepositoryException
Definition
getWord
in interface Definition
AmetysRepositoryException
- if an error occurs.public void setWord(String word) throws AmetysRepositoryException
Definition
setWord
in interface Definition
word
- the word to setAmetysRepositoryException
- if an error occurs.public Set<String> getVariants() throws AmetysRepositoryException
Definition
getVariants
in interface Definition
AmetysRepositoryException
- if an error occurs.public void setVariants(Collection<String> variants) throws AmetysRepositoryException
Definition
setVariants
in interface Definition
variants
- the variants to setAmetysRepositoryException
- if an error occurs.public String getContent() throws AmetysRepositoryException
Definition
getContent
in interface Definition
AmetysRepositoryException
- if an error occurs.public void setContent(String content) throws AmetysRepositoryException
Definition
setContent
in interface Definition
content
- the content to setAmetysRepositoryException
- if an error occurs.public boolean displayOnText() throws AmetysRepositoryException
Definition
displayOnText
in interface Definition
AmetysRepositoryException
- if an error occurs.public void setDisplayOnText(boolean displayOnText) throws AmetysRepositoryException
Definition
setDisplayOnText
in interface Definition
displayOnText
- the displayOnText to setAmetysRepositoryException
- if an error occurs.public Set<String> getAllForms() throws AmetysRepositoryException
Definition
getAllForms
in interface Definition
AmetysRepositoryException
- if an error occurs.public Site getSite() throws AmetysRepositoryException
SiteAwareAmetysObject
getSite
in interface SiteAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getSiteName() throws AmetysRepositoryException
SiteAwareAmetysObject
getSiteName
in interface SiteAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getLanguage()