public class CmsXmlUpdateMenuRules extends A_CmsXmlWorkplace
| 构造器和说明 |
|---|
CmsXmlUpdateMenuRules() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
executeUpdate(org.dom4j.Document document,
java.lang.String xpath,
boolean forReal)
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.
|
java.lang.String |
getName()
Returns the nice name for the change.
|
protected java.util.List<java.lang.String> |
getXPathsToUpdate()
Returns a list of xpaths for the nodes to add/update.
|
protected void |
updateMenuRule(org.dom4j.Element elem,
java.lang.String className)
Updates a single context menu entry's rules.
|
boolean |
validate(CmsSetupBean setupBean)
Validates the need to apply this change.
|
protected java.lang.String |
xpathForMenuItemRule(java.lang.String name,
java.lang.String className)
Returns the xpath for a specific menu item rule.
|
protected java.lang.String |
xpathForMenuRule(java.lang.String name)
Returns the xpath for a specific menu rule.
|
protected java.lang.String |
xpathForType(java.lang.String explorerType)
Returns the xpath for a specific explorer type.
|
createEtNewResource, createExplorerType, getXmlFilename, setAccessEntry, setMenuEntrycreateElementFromXml, execute, getCodeToChange, getXPathsToRemove, prepareDoc, updateDocpublic java.lang.String getName()
I_CmsSetupXmlUpdateI_CmsSetupXmlUpdate.getName()public boolean validate(CmsSetupBean setupBean) throws java.lang.Exception
I_CmsSetupXmlUpdatevalidate 在接口中 I_CmsSetupXmlUpdatevalidate 在类中 A_CmsSetupXmlUpdatesetupBean - the setup beantrue if neededjava.lang.Exception - if something goes wrongI_CmsSetupXmlUpdate.validate(org.opencms.setup.CmsSetupBean)protected boolean executeUpdate(org.dom4j.Document document,
java.lang.String xpath,
boolean forReal)
A_CmsSetupXmlUpdate
Only needs to be overriden if A_CmsSetupXmlUpdate.getXPathsToUpdate() is not empty.
executeUpdate 在类中 A_CmsSetupXmlUpdatedocument - the document to apply the changes toxpath - the xpath to execute the changes forforReal - is false, it is only on a empty doc to display the changes to the userA_CmsSetupXmlUpdate.executeUpdate(org.dom4j.Document, java.lang.String, boolean)protected java.lang.String getCommonPath()
A_CmsSetupXmlUpdategetCommonPath 在类中 A_CmsSetupXmlUpdateA_CmsSetupXmlUpdate.getCommonPath()protected java.util.List<java.lang.String> getXPathsToUpdate()
A_CmsSetupXmlUpdategetXPathsToUpdate 在类中 A_CmsSetupXmlUpdateA_CmsSetupXmlUpdate.getXPathsToUpdate()protected void updateMenuRule(org.dom4j.Element elem,
java.lang.String className)
elem - the parent elementclassName - the class nameprotected java.lang.String xpathForMenuItemRule(java.lang.String name,
java.lang.String className)
name - the name of the menu ruleclassName - the class of the menu item ruleprotected java.lang.String xpathForMenuRule(java.lang.String name)
name - the menu ruleprotected java.lang.String xpathForType(java.lang.String explorerType)
explorerType - the explorer type