Class DefaultTheme
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<DefaultThemeFactory>
-
- org.ametys.plugins.linkdirectory.repository.DefaultTheme
-
- All Implemented Interfaces:
Theme
,AmetysObject
,JCRAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableAmetysObject
,RemovableAmetysObject
,SiteAwareAmetysObject
public class DefaultTheme extends SimpleAmetysObject<DefaultThemeFactory> implements Theme, SiteAwareAmetysObject
Repository implementation of a link directory theme.
-
-
Field Summary
Fields Modifier and Type Field Description static String
METADATA_LABEL
Constant for label metadata.
-
Constructor Summary
Constructors Constructor Description DefaultTheme(Node node, String parentPath, DefaultThemeFactory factory)
Create aDefaultTheme
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Get the theme label.String
getLanguage()
Get the theme language.Site
getSite()
Returns this object's site.String
getSiteName()
Returns this object's site name.void
setLabel(String label)
Set the theme label.-
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 Detail
-
METADATA_LABEL
public static final String METADATA_LABEL
Constant for label metadata.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultTheme
public DefaultTheme(Node node, String parentPath, DefaultThemeFactory factory)
Create aDefaultTheme
.- Parameters:
node
- the node backing thisAmetysObject
.parentPath
- the parent path in the Ametys hierarchy.factory
- theDefaultThemeFactory
which creates the AmetysObject.
-
-
Method Detail
-
getLabel
public String getLabel() throws AmetysRepositoryException
Description copied from interface:Theme
Get the theme label.- Specified by:
getLabel
in interfaceTheme
- Returns:
- the theme label.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLabel
public void setLabel(String label) throws AmetysRepositoryException
Description copied from interface:Theme
Set the theme label.- Specified by:
setLabel
in interfaceTheme
- Parameters:
label
- the theme label to set.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSite
public Site getSite() throws AmetysRepositoryException
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
public String getSiteName() throws AmetysRepositoryException
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
public String getLanguage()
Get the theme language.- Returns:
- the theme language.
-
-