public class CmsContainerConfigurationWriter
extends java.lang.Object
构造器和说明 |
---|
CmsContainerConfigurationWriter() |
限定符和类型 | 方法和说明 |
---|---|
protected CmsContainerConfiguration |
createConfigurationBean(boolean newOrdering,
java.util.List<CmsContainerElementBean> elements,
java.util.Set<java.lang.String> parentKeys)
Converts a list of container elements into a bean which should be saved to the inherited container configuration.
|
protected java.util.Map<java.lang.String,CmsXmlContentProperty> |
getSettingConfiguration(CmsObject cms,
CmsResource resource)
Gets the setting configuration of an element.
|
protected void |
removeExistingEntry(CmsObject cms,
CmsXmlContent content,
java.util.Locale locale,
java.lang.String name)
Removes an existing inheritance container entry with a given name from the configuration file.
|
void |
save(CmsObject cms,
java.lang.String name,
boolean newOrdering,
CmsResource pageResource,
java.util.List<CmsContainerElementBean> elements)
Saves a list of container element beans to a file in the VFS.
|
protected CmsXmlContent |
saveInContentObject(CmsObject cms,
CmsXmlContent content,
java.util.Locale locale,
java.lang.String name,
CmsContainerConfiguration configuration)
Saves a single container configuration in an XML content object, but doesn't write it to the VFS.
|
org.dom4j.Element |
serializeSingleConfiguration(CmsObject cms,
java.lang.String name,
CmsContainerConfiguration config,
org.dom4j.Element parentElement)
Serializes a single container configuration into an XML element.
|
public void save(CmsObject cms, java.lang.String name, boolean newOrdering, CmsResource pageResource, java.util.List<CmsContainerElementBean> elements) throws CmsException
cms
- the current CMS contextname
- the name of the configuration to savenewOrdering
- true if a new ordering needs to be savedpageResource
- a container page or folderelements
- the elements whose data should be savedCmsException
- if something goes wrongpublic org.dom4j.Element serializeSingleConfiguration(CmsObject cms, java.lang.String name, CmsContainerConfiguration config, org.dom4j.Element parentElement) throws CmsException
cms
- the current CMS contextname
- the configuration nameconfig
- the configuration beanparentElement
- the parent element to which the new element should be attachedCmsException
protected CmsContainerConfiguration createConfigurationBean(boolean newOrdering, java.util.List<CmsContainerElementBean> elements, java.util.Set<java.lang.String> parentKeys)
newOrdering
- if true, save a new orderingelements
- the elements which should be convertedparentKeys
- the keys for new elements defined in the parent configurationsprotected java.util.Map<java.lang.String,CmsXmlContentProperty> getSettingConfiguration(CmsObject cms, CmsResource resource) throws CmsException
cms
- the current CMS contextresource
- the resource for which the setting configuration should be returnedCmsException
- if something goes wrongprotected void removeExistingEntry(CmsObject cms, CmsXmlContent content, java.util.Locale locale, java.lang.String name)
This does nothing if no such entry actually exists.
cms
- the current CMS contextcontent
- the XML contentlocale
- the locale from which to remove the entryname
- the name of the entryprotected CmsXmlContent saveInContentObject(CmsObject cms, CmsXmlContent content, java.util.Locale locale, java.lang.String name, CmsContainerConfiguration configuration) throws CmsException
If the XML content passed as a parameter is null, a new XML content object will be created
cms
- the current CMS contextcontent
- the XML contentlocale
- the locale in which the configuration should be writtenname
- the name of the configurationconfiguration
- the configuration to writeCmsException
- if something goes wrong