|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.ade.containerpage.inherited.CmsContainerConfigurationWriter
public class CmsContainerConfigurationWriter
A helper class for writing inherited container configuration back to a VFS file.
| Constructor Summary | |
|---|---|
CmsContainerConfigurationWriter()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsContainerConfigurationWriter()
| Method Detail |
|---|
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 saved
CmsException - if something goes wrong
public 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 attached
CmsException
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 configurations
protected 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 returned
CmsException - if something goes wrong
protected 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 entry
protected 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 write
CmsException - if something goes wrong
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||