org.opencms.setup.xml
Class CmsXmlUpdateDefaultProperties

java.lang.Object
  extended by org.opencms.setup.xml.A_CmsSetupXmlUpdate
      extended by org.opencms.setup.xml.CmsXmlUpdateDefaultProperties
All Implemented Interfaces:
I_CmsSetupXmlUpdate

public class CmsXmlUpdateDefaultProperties
extends A_CmsSetupXmlUpdate

Update the default properties, from 6.2.3 to 7.0.x.

Since:
6.9.2
Version:
$Revision: 1.4 $
Author:
Michael Moossen

Constructor Summary
CmsXmlUpdateDefaultProperties()
           
 
Method Summary
protected  boolean executeUpdate(org.dom4j.Document document, java.lang.String xpath)
          Executes the adding/updating changes on the given document.
protected  java.lang.String getCommonPath()
          Returns a parent path that is common for all nodes to modify.
protected  java.util.List getKeys()
          Returns a list of keys for creating the new nodes.
 java.lang.String getName()
          Returns the nice name for the change.
 java.lang.String getXmlFilename()
          Returns the affected xml configuration file name.
protected  java.util.List getXPathsToRemove()
          Returns a list of xpaths for the nodes to remove.
protected  java.util.List getXPathsToUpdate()
          Returns a list of xpaths for the nodes to add/update.
 
Methods inherited from class org.opencms.setup.xml.A_CmsSetupXmlUpdate
execute, getCodeToChange, prepareDoc, updateDoc, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsXmlUpdateDefaultProperties

public CmsXmlUpdateDefaultProperties()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: I_CmsSetupXmlUpdate
Returns the nice name for the change.

Returns:
the nice name
See Also:
I_CmsSetupXmlUpdate.getName()

getXmlFilename

public java.lang.String getXmlFilename()
Description copied from interface: I_CmsSetupXmlUpdate
Returns the affected xml configuration file name.

Returns:
the xml file name
See Also:
I_CmsSetupXmlUpdate.getXmlFilename()

executeUpdate

protected boolean executeUpdate(org.dom4j.Document document,
                                java.lang.String xpath)
Description copied from class: A_CmsSetupXmlUpdate
Executes the adding/updating changes on the given document.

Only needs to be overriden if A_CmsSetupXmlUpdate.getXPathsToUpdate() is not empty.

Overrides:
executeUpdate in class A_CmsSetupXmlUpdate
Parameters:
document - the document to apply the changes to
xpath - the xpath to execute the changes for
Returns:
if something was modified
See Also:
A_CmsSetupXmlUpdate.executeUpdate(org.dom4j.Document, java.lang.String)

getCommonPath

protected java.lang.String getCommonPath()
Description copied from class: A_CmsSetupXmlUpdate
Returns a parent path that is common for all nodes to modify.

Overrides:
getCommonPath in class A_CmsSetupXmlUpdate
Returns:
common parent path
See Also:
A_CmsSetupXmlUpdate.getCommonPath()

getKeys

protected java.util.List getKeys()
Returns a list of keys for creating the new nodes.

Returns:
a list of pairs (resource type, property name)

getXPathsToRemove

protected java.util.List getXPathsToRemove()
Description copied from class: A_CmsSetupXmlUpdate
Returns a list of xpaths for the nodes to remove.

Overrides:
getXPathsToRemove in class A_CmsSetupXmlUpdate
Returns:
a list of strings
See Also:
A_CmsSetupXmlUpdate.getXPathsToRemove()

getXPathsToUpdate

protected java.util.List getXPathsToUpdate()
Description copied from class: A_CmsSetupXmlUpdate
Returns a list of xpaths for the nodes to add/update.

Overrides:
getXPathsToUpdate in class A_CmsSetupXmlUpdate
Returns:
a list of strings
See Also:
A_CmsSetupXmlUpdate.getXPathsToUpdate()