|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.setup.xml.A_CmsSetupXmlUpdate
public abstract class A_CmsSetupXmlUpdate
Skeleton for xml update plugins.
| Constructor Summary | |
|---|---|
A_CmsSetupXmlUpdate()
|
|
| Method Summary | |
|---|---|
void |
execute(CmsSetupBean setupBean)
Execute the change. |
protected boolean |
executeUpdate(Document document,
String xpath)
Executes the adding/updating changes on the given document. |
String |
getCodeToChange(CmsSetupBean setupBean)
Returns the code to be added OR removed in the xml file. |
protected String |
getCommonPath()
Returns a parent path that is common for all nodes to modify. |
protected List |
getXPathsToRemove()
Returns a list of xpaths for the nodes to remove. |
protected List |
getXPathsToUpdate()
Returns a list of xpaths for the nodes to add/update. |
protected Document |
prepareDoc(Document doc)
Prepares a new document. |
protected void |
updateDoc(Document document,
Document newDoc,
String xpath)
Updates the given doc inserting the given node corresponding to the given xpath. |
boolean |
validate(CmsSetupBean setupBean)
Validates the need to apply this change. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opencms.setup.xml.I_CmsSetupXmlUpdate |
|---|
getName, getXmlFilename |
| Constructor Detail |
|---|
public A_CmsSetupXmlUpdate()
| Method Detail |
|---|
public void execute(CmsSetupBean setupBean)
throws Exception
I_CmsSetupXmlUpdate
execute in interface I_CmsSetupXmlUpdatesetupBean - the setup bean
Exception - if something goes wrongI_CmsSetupXmlUpdate.execute(org.opencms.setup.CmsSetupBean)
public String getCodeToChange(CmsSetupBean setupBean)
throws Exception
I_CmsSetupXmlUpdate
getCodeToChange in interface I_CmsSetupXmlUpdatesetupBean - the setup bean
Exception - if something goes wrongI_CmsSetupXmlUpdate.getCodeToChange(org.opencms.setup.CmsSetupBean)
protected void updateDoc(Document document,
Document newDoc,
String xpath)
document - the original document to updatenewDoc - the document to updatexpath - the corresponding xpathprotected String getCommonPath()
public boolean validate(CmsSetupBean setupBean)
throws Exception
I_CmsSetupXmlUpdate
validate in interface I_CmsSetupXmlUpdatesetupBean - the setup bean
true if needed
Exception - if something goes wrongI_CmsSetupXmlUpdate.validate(org.opencms.setup.CmsSetupBean)
protected boolean executeUpdate(Document document,
String xpath)
Only needs to be overriden if getXPathsToUpdate() is not empty.
document - the document to apply the changes toxpath - the xpath to execute the changes for
protected List getXPathsToRemove()
protected List getXPathsToUpdate()
protected Document prepareDoc(Document doc)
doc - the original document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||