Interface ContentUpgrade
- 
@ProviderType public interface ContentUpgradeThis class provides the builder methods to perform a content upgrade.- Author:
 - Roxana Muresan, Roland Gruber
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentUpgradedoActivateContainingPage()Activates the page where the resource is located.ContentUpgradedoActivateResource()Activates the resource.ContentUpgradedoAddMixin(String mixinName)Adds a mixinContentUpgradedoAddTagsToContainingPage(String... tags)Adds tags to the containing page of the matching resource.ContentUpgradedoAddValuesToMultiValueProperty(String name, String[] values)Adds values to a multivalue property.ContentUpgradedoChangePrimaryType(String newPrimaryType)Changes jcr:primaryType.ContentUpgradedoCheckPageRendering()Checks if the containing page renders with status code 200.ContentUpgradedoCheckPageRendering(int code)Checks if the containing page renders with given status code.ContentUpgradedoCheckPageRendering(String textPresent)Checks if the containing page renders with status code 200 and contains given text.ContentUpgradedoCheckPageRendering(String textPresent, String textNotPresent)Checks if the containing page renders with status code 200 and (not) contains given text.ContentUpgradedoCopyPropertyToRelativePath(String name, String newName, String relativeResourcePath)Copies a property to a relative path.ContentUpgradedoCopyResourceToRelativePath(String relativePath)Copies a resource to a relative path.ContentUpgradedoCopyResourceToRelativePath(String relativePath, String newName)Copies a resource to a relative path.ContentUpgradedoCreateResource(String name, String primaryType)Creates a new resource under the current one.ContentUpgradedoCreateResource(String name, String primaryType, String relativePath)Creates a new resource under the current one.ContentUpgradedoCreateResource(String name, String primaryType, Map<String,Object> properties)Creates a new resource under the current one.ContentUpgradedoCreateResource(String name, String primaryType, Map<String,Object> properties, String relativePath)Creates a new resource under the current one.ContentUpgradedoCustomResourceBasedAction(CustomResourceAction action)Performs a custom action with providing a function.ContentUpgradedoDeactivateContainingPage()Deactivates the page where the resource is located.ContentUpgradedoDeactivateResource()Deactivates the resource.ContentUpgradedoDeleteContainingPage()Deletes the page where the resource is located.ContentUpgradedoDeleteProperty(String name)Deletes a property if existing.ContentUpgradedoDeleteProperty(String name, String pathToSubnode)Deletes a property if existing.ContentUpgradedoDeleteResource(String... children)Deletes the child resources if supplied.ContentUpgradedoJoinProperty(String name)Joins a property value into a single value.ContentUpgradedoJoinProperty(String name, Object value)Joins a property value into a single value.ContentUpgradedoJoinProperty(String name, Object value, String separator)Joins a property value into a single value using the given separator.ContentUpgradedoMovePropertyToRelativePath(String name, String newName, String relativeResourcePath)Moves a property to a relative path.ContentUpgradedoMoveResourceToPathRegex(String matchPattern, String targetPathExpr)Moves a resource if its path matches the pattern to the path obtained by applying the replacement expressionContentUpgradedoMoveResourceToRelativePath(String relativePath)Moves a resource to a relative path.ContentUpgradedoRemoveMixin(String mixinName)Removes a mixinContentUpgradedoRemoveTagsFromContainingPage(String... tags)Removes tags from the containing page of the matching resource.ContentUpgradedoRemoveValuesOfMultiValueProperty(String name, String[] values)Removes values of a multivalue property.ContentUpgradedoRename(String newName)Renames a resource to the given name.ContentUpgradedoRenameProperty(String oldName, String newName)Renames a property if existing.ContentUpgradedoRenameProperty(String oldName, String newName, String pathToSubnode)Renames a property if existing.ContentUpgradedoReorderNode(String nameOfNodeToMove, String newSuccessor)Reorders a resource.ContentUpgradedoReplaceValueInAllProperties(String oldValue, String newValue)Replaces a substring in all properties of the matching resource.ContentUpgradedoReplaceValueInAllPropertiesRegex(String searchRegex, String replacement)Replaces a substring in all properties of the matching resource using a regular expression.ContentUpgradedoReplaceValueInProperties(String oldValue, String newValue, String[] propertyNames)Replaces a substring in specific properties of the matching resource.ContentUpgradedoReplaceValueInPropertiesRegex(String searchRegex, String replacement, String[] propertyNames)Replaces a substring in specific properties of the matching resource using a regular expression.ContentUpgradedoReplaceValuesOfMultiValueProperty(String name, String[] oldValues, String[] newValues)Replaces values in a multivalue property.ContentUpgradedoSetProperty(String name, Object value)Sets a property value.ContentUpgradedoSetProperty(String name, Object value, String pathToSubnode)Sets a property value on a subnode.ContentUpgradedoSetProperty(String name, Object value, String pathToSubnode, String primaryType)Sets a property value on a subnode.ContentUpgradedoSetTagsForContainingPage(String... tags)Sets tags for the containing page of the matching resource.ContentUpgradedoTreeActivateContainingPage()Activates the page tree where the resource is located.ContentUpgradedoTreeActivateContainingPage(boolean skipDeactivated)Activates the page tree where the resource is located.voiddryRun()Performs a dry-run.ContentUpgradefilterByAnyPropertyRegex(String regex)Filters by checking if any property matches the given regular expression for the value.ContentUpgradefilterByHasProperty(String name)Filters by existence of a single property.ContentUpgradefilterByMultiValuePropContains(String name, Object[] conditionValues)Filters by multi-value with the given name containing the given condition values.ContentUpgradefilterByNodeExists(String path)Filters by node/subNode exists.ContentUpgradefilterByNodeName(String nodeName)Filters by node name exact match.ContentUpgradefilterByNodeNameRegex(String regex)Filters by matching node name using regular expression.ContentUpgradefilterByNodeNotExists(String path)Filters by node/subNode not exists.ContentUpgradefilterByNodeRootPaths(List<String> rootPaths)Filters by matching the resource path with the rootpathsContentUpgradefilterByNoPropertyRegex(String regex)Filters by checking if any property does not match the given regular expression for the value.ContentUpgradefilterByNotHasProperty(String name)Filters by non-existence of a single property.ContentUpgradefilterByNotMultiValuePropContains(String name, Object[] conditionValues)Filters by multi-value with the given name not containing the given condition values.ContentUpgradefilterByNotNodeName(String nodeName)Filters by node name no exact match.ContentUpgradefilterByNotNodeNameRegex(String regex)Filters by not matching node name using regular expression.ContentUpgradefilterByNotPathRegex(String regex)Filters by not matching node path using regular expression.ContentUpgradefilterByNotProperties(Map<String,Object> conditionProperties)Filters by not matching multiple properties.ContentUpgradefilterByNotProperty(String name, Object value)Filters by not matching a single property.ContentUpgradefilterByNotPropertyRegex(String name, String regex)Filters by not matching a single property using a regular expression for the value.ContentUpgradefilterByPathRegex(String regex)Filters by matching node path using regular expression.ContentUpgradefilterByProperties(Map<String,Object> conditionProperties)Filters by matching multiple properties.ContentUpgradefilterByProperty(String name, Object value)Filters by matching a single property.ContentUpgradefilterByPropertyIsMultiple(String name, Object value)Filters by matching a single property using a regular expression for the value.ContentUpgradefilterByPropertyRegex(String name, String regex)Filters by matching a single property using a regular expression for the value.ContentUpgradefilterNotWith(FilterBy filter)Filters by not matching the given filter.ContentUpgradefilterWith(FilterBy filter)Filters by matching the given filter.ContentUpgradeforChildResourcesOf(String path)Loops for all child resources of the given path.ContentUpgradeforDescendantResourcesOf(String path)Loops recursive for all child resources of the given path.ContentUpgradeforResources(String[] paths)Loops for given list of resources.ContentUpgradeforResourcesByPropertyQuery(String path, Map<String,String> conditionProperties)Loops over resources found by the SQL2 query generated by the path and properties and the default node type "nt:base".ContentUpgradeforResourcesByPropertyQuery(String path, Map<String,String> conditionProperties, String nodeType)Loops over resources found by the SQL2 query generated by the nodeType, path and properties.ContentUpgradeforResourcesBySql2Query(String query)Loops over resources found by SQL2 query.ContentUpgradeforResourcesInSubtree(String path)Loops recursive over all resources contained in the subtree at the given path.ContentUpgradeprintJson()Prints the properties jsonContentUpgradeprintPath()Print pathContentUpgradeprintProperty(String property)Print propertyvoidrun()Saves all changes to repository.voidrun(boolean dryRun)Executes a run or a dryRun depending on the dryRun parameter value. 
 - 
 
- 
- 
Method Detail
- 
forResources
ContentUpgrade forResources(String[] paths)
Loops for given list of resources.- Parameters:
 paths- list of paths- Returns:
 - upgrade object
 
 
- 
forChildResourcesOf
ContentUpgrade forChildResourcesOf(String path)
Loops for all child resources of the given path. The path itself is not included.- Parameters:
 path- path- Returns:
 - upgrade object
 
 
- 
forDescendantResourcesOf
ContentUpgrade forDescendantResourcesOf(String path)
Loops recursive for all child resources of the given path. The path itself is not included.- Parameters:
 path- path- Returns:
 - upgrade object
 
 
- 
forResourcesInSubtree
ContentUpgrade forResourcesInSubtree(String path)
Loops recursive over all resources contained in the subtree at the given path.- Parameters:
 path- path- Returns:
 - upgrade object
 
 
- 
forResourcesBySql2Query
ContentUpgrade forResourcesBySql2Query(String query)
Loops over resources found by SQL2 query.- Parameters:
 query- query string- Returns:
 - upgrade object
 
 
- 
forResourcesByPropertyQuery
ContentUpgrade forResourcesByPropertyQuery(String path, Map<String,String> conditionProperties)
Loops over resources found by the SQL2 query generated by the path and properties and the default node type "nt:base".- Parameters:
 path- search pathconditionProperties- properties to generate AND conditions (values containing % will be matched using LIKE)- Returns:
 - upgrade object
 
 
- 
forResourcesByPropertyQuery
ContentUpgrade forResourcesByPropertyQuery(String path, Map<String,String> conditionProperties, String nodeType)
Loops over resources found by the SQL2 query generated by the nodeType, path and properties.- Parameters:
 path- search pathconditionProperties- properties to generate AND conditions (values containing % will be matched using LIKE)nodeType- node type (e.g. "nt:base")- Returns:
 - upgrade object
 
 
- 
filterByHasProperty
ContentUpgrade filterByHasProperty(String name)
Filters by existence of a single property.- Parameters:
 name- property name- Returns:
 - upgrade object
 
 
- 
filterByNotHasProperty
ContentUpgrade filterByNotHasProperty(String name)
Filters by non-existence of a single property.- Parameters:
 name- property name- Returns:
 - upgrade object
 
 
- 
filterByProperty
ContentUpgrade filterByProperty(String name, Object value)
Filters by matching a single property.- Parameters:
 name- property namevalue- property value- Returns:
 - upgrade object
 
 
- 
filterByNotProperty
ContentUpgrade filterByNotProperty(String name, Object value)
Filters by not matching a single property.- Parameters:
 name- property namevalue- property value- Returns:
 - upgrade object
 
 
- 
filterByPropertyIsMultiple
ContentUpgrade filterByPropertyIsMultiple(String name, Object value)
Filters by matching a single property using a regular expression for the value. This is intended for single value properties.- Parameters:
 name- property namevalue- attribute value- Returns:
 - upgrade object
 
 
- 
filterByPropertyRegex
ContentUpgrade filterByPropertyRegex(String name, String regex)
Filters by matching a single property using a regular expression for the value. This is intended for single value properties.- Parameters:
 name- property nameregex- regular expression to match value- Returns:
 - upgrade object
 
 
- 
filterByNotPropertyRegex
ContentUpgrade filterByNotPropertyRegex(String name, String regex)
Filters by not matching a single property using a regular expression for the value. This is intended for single value properties.- Parameters:
 name- property nameregex- regular expression to match value- Returns:
 - upgrade object
 
 
- 
filterByAnyPropertyRegex
ContentUpgrade filterByAnyPropertyRegex(String regex)
Filters by checking if any property matches the given regular expression for the value. This is intended for single value properties.- Parameters:
 regex- regular expression to match value- Returns:
 - upgrade object
 
 
- 
filterByNoPropertyRegex
ContentUpgrade filterByNoPropertyRegex(String regex)
Filters by checking if any property does not match the given regular expression for the value. This is intended for single value properties.- Parameters:
 regex- regular expression to match value- Returns:
 - upgrade object
 
 
- 
filterByProperties
ContentUpgrade filterByProperties(Map<String,Object> conditionProperties)
Filters by matching multiple properties. Can be used also for Multi-value properties.- Parameters:
 conditionProperties- properties to filter- Returns:
 - upgrade object
 
 
- 
filterByNotProperties
ContentUpgrade filterByNotProperties(Map<String,Object> conditionProperties)
Filters by not matching multiple properties. Can be used also for Multi-value properties.- Parameters:
 conditionProperties- properties to filter- Returns:
 - upgrade object
 
 
- 
filterByMultiValuePropContains
ContentUpgrade filterByMultiValuePropContains(String name, Object[] conditionValues)
Filters by multi-value with the given name containing the given condition values.- Parameters:
 name- name of the multi-value propertyconditionValues- values to search for- Returns:
 - upgrade object
 
 
- 
filterByNotMultiValuePropContains
ContentUpgrade filterByNotMultiValuePropContains(String name, Object[] conditionValues)
Filters by multi-value with the given name not containing the given condition values.- Parameters:
 name- name of the multi-value propertyconditionValues- values to search for- Returns:
 - upgrade object
 
 
- 
filterByNodeName
ContentUpgrade filterByNodeName(String nodeName)
Filters by node name exact match.- Parameters:
 nodeName- node name- Returns:
 - upgrade object
 
 
- 
filterByNotNodeName
ContentUpgrade filterByNotNodeName(String nodeName)
Filters by node name no exact match.- Parameters:
 nodeName- node name- Returns:
 - upgrade object
 
 
- 
filterByNodeExists
ContentUpgrade filterByNodeExists(String path)
Filters by node/subNode exists.- Parameters:
 path- absolute or relative resource path- Returns:
 - upgrade object
 
 
- 
filterByNodeNotExists
ContentUpgrade filterByNodeNotExists(String path)
Filters by node/subNode not exists.- Parameters:
 path- absolute or relative resource path- Returns:
 - upgrade object
 
 
- 
filterByNodeNameRegex
ContentUpgrade filterByNodeNameRegex(String regex)
Filters by matching node name using regular expression.- Parameters:
 regex- regular expression (Java standard pattern)- Returns:
 - upgrade object
 
 
- 
filterByNotNodeNameRegex
ContentUpgrade filterByNotNodeNameRegex(String regex)
Filters by not matching node name using regular expression.- Parameters:
 regex- regular expression (Java standard pattern)- Returns:
 - upgrade object
 
 
- 
filterByPathRegex
ContentUpgrade filterByPathRegex(String regex)
Filters by matching node path using regular expression.- Parameters:
 regex- regular expression (Java standard pattern)- Returns:
 - upgrade object
 
 
- 
filterByNotPathRegex
ContentUpgrade filterByNotPathRegex(String regex)
Filters by not matching node path using regular expression.- Parameters:
 regex- regular expression (Java standard pattern)- Returns:
 - upgrade object
 
 
- 
filterByNodeRootPaths
ContentUpgrade filterByNodeRootPaths(List<String> rootPaths)
Filters by matching the resource path with the rootpaths- Parameters:
 rootPaths- List of rootPaths to be matched- Returns:
 - upgrade object
 
 
- 
filterWith
ContentUpgrade filterWith(FilterBy filter)
Filters by matching the given filter.- Parameters:
 filter- filter- Returns:
 - upgrade object
 
 
- 
filterNotWith
ContentUpgrade filterNotWith(FilterBy filter)
Filters by not matching the given filter.- Parameters:
 filter- filter- Returns:
 - upgrade object
 
 
- 
doSetProperty
ContentUpgrade doSetProperty(String name, Object value)
Sets a property value.- Parameters:
 name- property namevalue- property value- Returns:
 - upgrade object
 
 
- 
doSetProperty
ContentUpgrade doSetProperty(String name, Object value, String pathToSubnode)
Sets a property value on a subnode.- Parameters:
 name- property namevalue- property valuepathToSubnode- path to subnode where property will be set- Returns:
 - upgrade object
 
 
- 
doSetProperty
ContentUpgrade doSetProperty(String name, Object value, String pathToSubnode, String primaryType)
Sets a property value on a subnode.- Parameters:
 name- property namevalue- property valuepathToSubnode- path to subnode where property will be setprimaryType- primary type if subnode or intermediate nodes need to be created- Returns:
 - upgrade object
 
 
- 
doJoinProperty
ContentUpgrade doJoinProperty(String name)
Joins a property value into a single value. Uses "," to join multiple values. Deletes properties with empty array values.- Parameters:
 name- property name- Returns:
 - upgrade object
 
 
- 
doJoinProperty
ContentUpgrade doJoinProperty(String name, Object value)
Joins a property value into a single value. Uses "," to join multiple values.- Parameters:
 name- property namevalue- property value fall back for empty arrays. Use null to delete the property.- Returns:
 - upgrade object
 
 
- 
doJoinProperty
ContentUpgrade doJoinProperty(String name, Object value, String separator)
Joins a property value into a single value using the given separator.- Parameters:
 name- property namevalue- property value fall back for empty arrays. Use null to delete the property.separator- separator (e.g. ",")- Returns:
 - upgrade object
 
 
- 
doDeleteProperty
ContentUpgrade doDeleteProperty(String name)
Deletes a property if existing.- Parameters:
 name- property name- Returns:
 - upgrade object
 
 
- 
doDeleteProperty
ContentUpgrade doDeleteProperty(String name, String pathToSubnode)
Deletes a property if existing.- Parameters:
 name- property namepathToSubnode- path to subnode where property will be set- Returns:
 - upgrade object
 
 
- 
doRenameProperty
ContentUpgrade doRenameProperty(String oldName, String newName)
Renames a property if existing.- Parameters:
 oldName- old property namenewName- new property name- Returns:
 - upgrade object
 
 
- 
doRenameProperty
ContentUpgrade doRenameProperty(String oldName, String newName, String pathToSubnode)
Renames a property if existing.- Parameters:
 oldName- old property namenewName- new property namepathToSubnode- path to subnode where property will be set- Returns:
 - upgrade object
 
 
- 
doCopyPropertyToRelativePath
ContentUpgrade doCopyPropertyToRelativePath(String name, String newName, String relativeResourcePath)
Copies a property to a relative path.- Parameters:
 name- property namenewName- new property namerelativeResourcePath- relative path- Returns:
 - upgrade object
 
 
- 
doMovePropertyToRelativePath
ContentUpgrade doMovePropertyToRelativePath(String name, String newName, String relativeResourcePath)
Moves a property to a relative path.- Parameters:
 name- property namenewName- new property namerelativeResourcePath- relative path- Returns:
 - upgrade object
 
 
- 
doAddValuesToMultiValueProperty
ContentUpgrade doAddValuesToMultiValueProperty(String name, String[] values)
Adds values to a multivalue property.- Parameters:
 name- property namevalues- values- Returns:
 - upgrade object
 
 
- 
doRemoveValuesOfMultiValueProperty
ContentUpgrade doRemoveValuesOfMultiValueProperty(String name, String[] values)
Removes values of a multivalue property.- Parameters:
 name- property namevalues- values to remove- Returns:
 - upgrade object
 
 
- 
doReplaceValuesOfMultiValueProperty
ContentUpgrade doReplaceValuesOfMultiValueProperty(String name, String[] oldValues, String[] newValues)
Replaces values in a multivalue property.- Parameters:
 name- property nameoldValues- values to removenewValues- values to add- Returns:
 - upgrade object
 
 
- 
doReplaceValueInAllProperties
ContentUpgrade doReplaceValueInAllProperties(String oldValue, String newValue)
Replaces a substring in all properties of the matching resource. Only applies to String properties.- Parameters:
 oldValue- old valuenewValue- new value- Returns:
 - upgrade object
 
 
- 
doReplaceValueInProperties
ContentUpgrade doReplaceValueInProperties(String oldValue, String newValue, String[] propertyNames)
Replaces a substring in specific properties of the matching resource. Only applies to String properties.- Parameters:
 oldValue- old valuenewValue- new valuepropertyNames- property names that should be checked- Returns:
 - upgrade object
 
 
- 
doReplaceValueInAllPropertiesRegex
ContentUpgrade doReplaceValueInAllPropertiesRegex(String searchRegex, String replacement)
Replaces a substring in all properties of the matching resource using a regular expression. Only applies to String properties.- Parameters:
 searchRegex- regex to match old valuereplacement- new value, may contain matcher groups (e.g. $1)- Returns:
 - upgrade object
 
 
- 
doReplaceValueInPropertiesRegex
ContentUpgrade doReplaceValueInPropertiesRegex(String searchRegex, String replacement, String[] propertyNames)
Replaces a substring in specific properties of the matching resource using a regular expression. Only applies to String properties.- Parameters:
 searchRegex- regex to match old valuereplacement- new value, may contain matcher groups (e.g. $1)propertyNames- property names that should be checked- Returns:
 - upgrade object
 
 
- 
doChangePrimaryType
ContentUpgrade doChangePrimaryType(String newPrimaryType)
Changes jcr:primaryType.- Parameters:
 newPrimaryType- jcr:primaryType value- Returns:
 - upgrade object
 
 
- 
doRename
ContentUpgrade doRename(String newName)
Renames a resource to the given name.- Parameters:
 newName- path- Returns:
 - newName new name
 
 
- 
doCopyResourceToRelativePath
ContentUpgrade doCopyResourceToRelativePath(String relativePath)
Copies a resource to a relative path.- Parameters:
 relativePath- path- Returns:
 - upgrade object
 
 
- 
doCopyResourceToRelativePath
ContentUpgrade doCopyResourceToRelativePath(String relativePath, String newName)
Copies a resource to a relative path.- Parameters:
 relativePath- pathnewName- name for the new resource. If not provided the name of the source resource will be used.- Returns:
 - upgrade object
 
 
- 
doMoveResourceToRelativePath
ContentUpgrade doMoveResourceToRelativePath(String relativePath)
Moves a resource to a relative path.- Parameters:
 relativePath- path- Returns:
 - upgrade object
 
 
- 
doMoveResourceToPathRegex
ContentUpgrade doMoveResourceToPathRegex(String matchPattern, String targetPathExpr)
Moves a resource if its path matches the pattern to the path obtained by applying the replacement expression- Parameters:
 matchPattern- regular expression for matching the resource pathtargetPathExpr- expression to calculate the target path, can contain matched group references $1, $2, ...- Returns:
 - upgrade object
 
 
- 
doReorderNode
ContentUpgrade doReorderNode(String nameOfNodeToMove, String newSuccessor)
Reorders a resource.- Parameters:
 nameOfNodeToMove- entry name to movenewSuccessor- entry will be put before this node (null to move at the end)- Returns:
 - upgrade object
 
 
- 
doDeleteResource
ContentUpgrade doDeleteResource(String... children)
Deletes the child resources if supplied. If no children are specified it deletes the resource itself.- Parameters:
 children- delete children (resource itself if empty)- Returns:
 - upgrade object
 
 
- 
doCreateResource
ContentUpgrade doCreateResource(String name, String primaryType)
Creates a new resource under the current one.- Parameters:
 name- resource nameprimaryType- jcr:primaryType- Returns:
 - upgrade object
 
 
- 
doCreateResource
ContentUpgrade doCreateResource(String name, String primaryType, Map<String,Object> properties)
Creates a new resource under the current one.- Parameters:
 name- resource nameprimaryType- jcr:primaryTypeproperties- properties excl. jcr:primaryType- Returns:
 - upgrade object
 
 
- 
doCreateResource
ContentUpgrade doCreateResource(String name, String primaryType, String relativePath)
Creates a new resource under the current one.- Parameters:
 name- resource nameprimaryType- jcr:primaryTyperelativePath- relative path- Returns:
 - upgrade object
 
 
- 
doCreateResource
ContentUpgrade doCreateResource(String name, String primaryType, Map<String,Object> properties, String relativePath)
Creates a new resource under the current one.- Parameters:
 name- resource nameprimaryType- jcr:primaryTypeproperties- properties excl. jcr:primaryTyperelativePath- relative path- Returns:
 - upgrade object
 
 
- 
doActivateResource
ContentUpgrade doActivateResource()
Activates the resource.- Returns:
 - upgrade object
 
 
- 
doDeactivateResource
ContentUpgrade doDeactivateResource()
Deactivates the resource.- Returns:
 - upgrade object
 
 
- 
doCustomResourceBasedAction
ContentUpgrade doCustomResourceBasedAction(CustomResourceAction action)
Performs a custom action with providing a function.- Parameters:
 action- action to perform on resource- Returns:
 - upgrade object
 
 
- 
doActivateContainingPage
ContentUpgrade doActivateContainingPage()
Activates the page where the resource is located.- Returns:
 - upgrade object
 
 
- 
doTreeActivateContainingPage
ContentUpgrade doTreeActivateContainingPage()
Activates the page tree where the resource is located.- Returns:
 - upgrade object
 
 
- 
doTreeActivateContainingPage
ContentUpgrade doTreeActivateContainingPage(boolean skipDeactivated)
Activates the page tree where the resource is located.- Parameters:
 skipDeactivated- skip pages that are deactivated- Returns:
 - upgrade object
 
 
- 
doDeactivateContainingPage
ContentUpgrade doDeactivateContainingPage()
Deactivates the page where the resource is located.- Returns:
 - upgrade object
 
 
- 
doDeleteContainingPage
ContentUpgrade doDeleteContainingPage()
Deletes the page where the resource is located. This will not work if called multiple times for the same page.- Returns:
 - upgrade object
 
 
- 
doAddTagsToContainingPage
ContentUpgrade doAddTagsToContainingPage(String... tags)
Adds tags to the containing page of the matching resource.- Parameters:
 tags- tag IDs or paths- Returns:
 - upgrade object
 
 
- 
doSetTagsForContainingPage
ContentUpgrade doSetTagsForContainingPage(String... tags)
Sets tags for the containing page of the matching resource. All existing tags are overwritten.- Parameters:
 tags- tag IDs or paths- Returns:
 - upgrade object
 
 
- 
doRemoveTagsFromContainingPage
ContentUpgrade doRemoveTagsFromContainingPage(String... tags)
Removes tags from the containing page of the matching resource.- Parameters:
 tags- tag IDs or paths- Returns:
 - upgrade object
 
 
- 
doCheckPageRendering
ContentUpgrade doCheckPageRendering()
Checks if the containing page renders with status code 200.- Returns:
 - upgrade object
 
 
- 
doCheckPageRendering
ContentUpgrade doCheckPageRendering(int code)
Checks if the containing page renders with given status code.- Parameters:
 code- status code- Returns:
 - upgrade object
 
 
- 
doCheckPageRendering
ContentUpgrade doCheckPageRendering(String textPresent)
Checks if the containing page renders with status code 200 and contains given text.- Parameters:
 textPresent- page content must include this text- Returns:
 - upgrade object
 
 
- 
doCheckPageRendering
ContentUpgrade doCheckPageRendering(String textPresent, String textNotPresent)
Checks if the containing page renders with status code 200 and (not) contains given text.- Parameters:
 textPresent- page content must include this text (can be null)textNotPresent- page content must not include this text (can be null)- Returns:
 - upgrade object
 
 
- 
doAddMixin
ContentUpgrade doAddMixin(String mixinName)
Adds a mixin- Parameters:
 mixinName- valid mixin name- Returns:
 - upgrade object
 
 
- 
doRemoveMixin
ContentUpgrade doRemoveMixin(String mixinName)
Removes a mixin- Parameters:
 mixinName- valid mixin name present on the node- Returns:
 - upgrade object
 
 
- 
printPath
ContentUpgrade printPath()
Print path- Returns:
 - upgrade object
 
 
- 
printProperty
ContentUpgrade printProperty(String property)
Print property- Parameters:
 property- property name- Returns:
 - upgrade object
 
 
- 
printJson
ContentUpgrade printJson()
Prints the properties json- Returns:
 - upgrade object
 
 
- 
run
void run() throws org.apache.sling.api.resource.PersistenceException, AecuExceptionSaves all changes to repository.- Throws:
 org.apache.sling.api.resource.PersistenceException- error during executionAecuException- other error
 
- 
dryRun
void dryRun() throws org.apache.sling.api.resource.PersistenceException, AecuExceptionPerforms a dry-run. No changes are written to CRX.- Throws:
 org.apache.sling.api.resource.PersistenceException- error doing dry-runAecuException- other error
 
- 
run
void run(boolean dryRun) throws org.apache.sling.api.resource.PersistenceException, AecuExceptionExecutes a run or a dryRun depending on the dryRun parameter value.- Parameters:
 dryRun- dryRun option- Throws:
 org.apache.sling.api.resource.PersistenceException- error during executionAecuException- other error
 
 - 
 
 -