Class CmsTagReplaceSettings
java.lang.Object
org.opencms.workplace.tools.content.CmsTagReplaceSettings
Bean to hold the settings needed for the operation of replacing HTML Tags of xmlpage resources in
the OpenCms VFS.
- Since:
- 6.1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty for the tag-replace contentool to know the files that have been processed before in case of early terminaton in previous runs. -
Constructor Summary
ConstructorsConstructorDescriptionCmsTagReplaceSettings(org.opencms.file.CmsObject cms) Bean constructor with cms object for path validation. -
Method Summary
Modifier and TypeMethodDescriptionprotected SetReturns the Set<Tag> to delete from transformed output.Returns the value of the sharedPROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.Returns the replacements to perform in form of a comma-separated List of "key=value" tokens.Returns the path under which files will be processed recursively.protected booleanreplace(org.htmlparser.Tag tag) Transforms the given Tag into the one it has to become by changing it's name and/or attributes.voidsetPropertyValueTagReplaceID(String propertyValueTagreplaceID) Sets the value of the sharedPROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.voidsetReplacements(SortedMap replacements) Sets the replacements to perform in form of a comma-separated List of "key=value" tokens.voidsetWorkPath(String workPath) Sets the path under which files will be processed recursively.
-
Field Details
-
PROPERTY_CONTENTOOLS_TAGREPLACE
Property for the tag-replace contentool to know the files that have been processed before in case of early terminaton in previous runs.- See Also:
-
-
Constructor Details
-
CmsTagReplaceSettings
Bean constructor with cms object for path validation.- Parameters:
cms- used to test the working path for valididty.
-
-
Method Details
-
getPropertyValueTagReplaceID
Returns the value of the sharedPROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.- Returns:
- the value of the shared
PROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.
-
getReplacements
Returns the replacements to perform in form of a comma-separated List of "key=value" tokens.- Returns:
- the replacements to perform in form of a comma-separated List of "key=value" tokens.
-
getWorkPath
Returns the path under which files will be processed recursively.- Returns:
- the path under which files will be processed recursively.
-
setPropertyValueTagReplaceID
public void setPropertyValueTagReplaceID(String propertyValueTagreplaceID) throws org.opencms.main.CmsIllegalArgumentException Sets the value of the sharedPROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.- Parameters:
propertyValueTagreplaceID- the value of the sharedPROPERTY_CONTENTOOLS_TAGREPLACEto set on resources that have been processed with these settings.- Throws:
org.opencms.main.CmsIllegalArgumentException- if the argument is not valid.
-
setReplacements
public void setReplacements(SortedMap replacements) throws org.opencms.main.CmsIllegalArgumentException Sets the replacements to perform in form of a comma-separated List of "key=value" tokens.- Parameters:
replacements- the replacements to perform in form of a comma-separated List of "key=value" tokens.- Throws:
org.opencms.main.CmsIllegalArgumentException- if the argument is not valid.
-
setWorkPath
Sets the path under which files will be processed recursively.- Parameters:
workPath- the path under which files will be processed recursively.- Throws:
org.opencms.main.CmsIllegalArgumentException- if the argument is not valid.
-
getDeleteTags
Returns the Set<Tag> to delete from transformed output.- Returns:
- the Set<
Tag> to delete from transformed output.
-
replace
Transforms the given Tag into the one it has to become by changing it's name and/or attributes.- Parameters:
tag- the tag to be transformed.- Returns:
- true if the given tag was modified, false else.
-