Class CmsSitePlugin
- java.lang.Object
-
- org.opencms.ade.configuration.plugins.CmsSitePlugin
-
public class CmsSitePlugin extends java.lang.Object
Immutable collection of template plugins, normally read from a file of type site-plugin.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
N_DESCRIPTION
Content value node name.static java.lang.String
N_NICE_NAME
Content value node name.static java.lang.String
N_PLUGIN
Content value node name.
-
Constructor Summary
Constructors Constructor Description CmsSitePlugin(CmsUUID id, java.lang.String niceName, java.lang.String description, java.util.List<CmsTemplatePlugin> plugins, java.lang.String origin)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Gets the description.CmsUUID
getId()
Gets the id.java.lang.String
getNiceName()
Gets the nice name.java.lang.String
getOrigin()
Gets the origin, for debugging purposes.java.util.List<CmsTemplatePlugin>
getPlugins()
Gets the immutable list of plugins.static CmsSitePlugin
read(CmsObject cms, CmsResource res)
Reads a site plugin from a file.static CmsSitePlugin
readSitePlugin(CmsObject cms, CmsXmlContent content)
Reads a list of plugins from the given XML content.java.lang.String
toString()
-
-
-
Field Detail
-
N_DESCRIPTION
public static final java.lang.String N_DESCRIPTION
Content value node name.- See Also:
- Constant Field Values
-
N_NICE_NAME
public static final java.lang.String N_NICE_NAME
Content value node name.- See Also:
- Constant Field Values
-
N_PLUGIN
public static final java.lang.String N_PLUGIN
Content value node name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsSitePlugin
public CmsSitePlugin(CmsUUID id, java.lang.String niceName, java.lang.String description, java.util.List<CmsTemplatePlugin> plugins, java.lang.String origin)
Creates a new instance.- Parameters:
id
- the id of the plugin groupniceName
- the nice namedescription
- the descriptionplugins
- the list of pluginsorigin
- the origin (for debugging purposes)
-
-
Method Detail
-
read
public static CmsSitePlugin read(CmsObject cms, CmsResource res) throws CmsException
Reads a site plugin from a file.- Parameters:
cms
- the CMS context to useres
- the resource- Returns:
- the site plugin read from the file
- Throws:
CmsException
- if something goes wrong
-
readSitePlugin
public static CmsSitePlugin readSitePlugin(CmsObject cms, CmsXmlContent content)
Reads a list of plugins from the given XML content.- Parameters:
cms
- the CMS contextcontent
- the XML content object- Returns:
- the template plugin group
-
getDescription
public java.lang.String getDescription()
Gets the description.- Returns:
- the description
-
getId
public CmsUUID getId()
Gets the id.Normally, this is the structure id of the file from which this group was read.
- Returns:
- the id
-
getNiceName
public java.lang.String getNiceName()
Gets the nice name.- Returns:
- the nice name
-
getOrigin
public java.lang.String getOrigin()
Gets the origin, for debugging purposes.- Returns:
- the origin
-
getPlugins
public java.util.List<CmsTemplatePlugin> getPlugins()
Gets the immutable list of plugins.- Returns:
- the list of plugins in this collection
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-