public interface ContentUpgrade
| Modifier and Type | Method and Description |
|---|---|
ContentUpgrade |
doActivateContainingPage()
Activates the page where the resource is located.
|
ContentUpgrade |
doAddValuesToMultiValueProperty(String name,
String[] values)
Adds values to a multivalue property.
|
ContentUpgrade |
doCopyPropertyToRelativePath(String name,
String newName,
String relativeResourcePath)
Copies a property to a relative path.
|
ContentUpgrade |
doCopyResourceToRelativePath(String relativePath)
Copies a resource to a relative path.
|
ContentUpgrade |
doCustomResourceBasedAction(CustomResourceAction action)
Performs a custom action with providing a function.
|
ContentUpgrade |
doDeactivateContainingPage()
Deactivates the page where the resource is located.
|
ContentUpgrade |
doDeleteContainingPage()
Deletes the page where the resource is located.
|
ContentUpgrade |
doDeleteProperty(String name)
Deletes a property if existing.
|
ContentUpgrade |
doDeleteResource()
Deletes the resource.
|
ContentUpgrade |
doMovePropertyToRelativePath(String name,
String newName,
String relativeResourcePath)
Moves a property to a relative path.
|
ContentUpgrade |
doMoveResourceToRelativePath(String relativePath)
Moves a resource to a relative path.
|
ContentUpgrade |
doRemoveValuesOfMultiValueProperty(String name,
String[] values)
Removes values of a multivalue property.
|
ContentUpgrade |
doRenameProperty(String oldName,
String newName)
Renames a property if existing.
|
ContentUpgrade |
doReplaceValuesOfMultiValueProperty(String name,
String[] oldValues,
String[] newValues)
Replaces values in a multivalue property.
|
ContentUpgrade |
doSetProperty(String name,
Object value)
Sets a property value.
|
StringBuffer |
dryRun()
Performs a dry-run.
|
ContentUpgrade |
filterByHasProperty(String name)
Filters by existence of a single property.
|
ContentUpgrade |
filterByMultiValuePropContains(String name,
Object[] conditionValues)
Filters by multi-value with the given name containing the given conditionValues
|
ContentUpgrade |
filterByNodeName(String nodeName)
Filters by node name exact match.
|
ContentUpgrade |
filterByNodeNameRegex(String regex)
Filters by node name using regular expression.
|
ContentUpgrade |
filterByProperties(Map<String,Object> conditionProperties)
Filters by properties.
|
ContentUpgrade |
filterByProperty(String name,
Object value)
Filters by a single property.
|
ContentUpgrade |
filterWith(FilterBy filter)
Filters by using the given filter.
|
ContentUpgrade |
forChildResourcesOf(String path)
Loops for all child resources of the given path.
|
ContentUpgrade |
forDescendantResourcesOf(String path)
Loops recursive for all child resources of the given path.
|
ContentUpgrade |
forResources(String[] paths)
Loops for given list of resources.
|
ContentUpgrade |
forResourcesInSubtree(String path)
Loops recursive over all resources contained in the subtree at the given path.
|
ContentUpgrade |
printPath()
Print path
|
StringBuffer |
run()
Saves all changes to repository.
|
StringBuffer |
run(boolean dryRun)
Executes a run or a dryRun depending on the dryRun parameter value.
|
ContentUpgrade forResources(String[] paths)
paths - list of pathsContentUpgrade forChildResourcesOf(String path)
path - pathContentUpgrade forDescendantResourcesOf(String path)
path - pathContentUpgrade forResourcesInSubtree(String path)
path - pathContentUpgrade filterByHasProperty(String name)
name - property nameContentUpgrade filterByProperty(String name, Object value)
name - property namevalue - property valueContentUpgrade filterByProperties(Map<String,Object> conditionProperties)
conditionProperties - properties to filterContentUpgrade filterByMultiValuePropContains(String name, Object[] conditionValues)
name - name of the multi-value propertyconditionValues - values to search forContentUpgrade filterByNodeName(String nodeName)
nodeName - node nameContentUpgrade filterByNodeNameRegex(String regex)
regex - regular expression (Java standard pattern)ContentUpgrade filterWith(FilterBy filter)
filter - filterContentUpgrade doSetProperty(String name, Object value)
name - property namevalue - property valueContentUpgrade doDeleteProperty(String name)
name - property nameContentUpgrade doRenameProperty(String oldName, String newName)
oldName - old property namenewName - new property nameContentUpgrade doCopyPropertyToRelativePath(String name, String newName, String relativeResourcePath)
name - property namenewName - new property namerelativeResourcePath - relative pathContentUpgrade doMovePropertyToRelativePath(String name, String newName, String relativeResourcePath)
name - property namenewName - new property namerelativeResourcePath - relative pathContentUpgrade doAddValuesToMultiValueProperty(String name, String[] values)
name - property namevalues - valuesContentUpgrade doRemoveValuesOfMultiValueProperty(String name, String[] values)
name - property namevalues - values to removeContentUpgrade doReplaceValuesOfMultiValueProperty(String name, String[] oldValues, String[] newValues)
name - property nameoldValues - values to removenewValues - values to addContentUpgrade doCopyResourceToRelativePath(String relativePath)
relativePath - pathContentUpgrade doMoveResourceToRelativePath(String relativePath)
relativePath - pathContentUpgrade doDeleteResource()
ContentUpgrade doCustomResourceBasedAction(CustomResourceAction action)
action - action to perform on resourceContentUpgrade doActivateContainingPage()
ContentUpgrade doDeactivateContainingPage()
ContentUpgrade doDeleteContainingPage()
ContentUpgrade printPath()
StringBuffer run() throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException - error during executionStringBuffer dryRun() throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException - error doing dry-runStringBuffer run(boolean dryRun) throws org.apache.sling.api.resource.PersistenceException
dryRun - dryRun optionorg.apache.sling.api.resource.PersistenceException - error during executionCopyright © 2018. All rights reserved.