Class TraversData
- java.lang.Object
-
- de.valtech.aecu.core.groovy.console.bindings.traversers.TraversData
-
- Direct Known Subclasses:
ForChildResourcesOf,ForDescendantResourcesOf,ForQuery,ForResources
public abstract class TraversData extends Object
- Author:
- Roxana Muresan, Roland Gruber
-
-
Constructor Summary
Constructors Constructor Description TraversData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidapplyActionsOnResource(org.apache.sling.api.resource.Resource resource, de.valtech.aecu.api.groovy.console.bindings.filters.FilterBy filter, List<Action> actions, StringBuilder output, boolean dryRun)Applies the actions on the given resource.protected booleanisResourceValid(org.apache.sling.api.resource.Resource resource)Checks if the resource is still valid.abstract voidtraverse(BindingContext context, de.valtech.aecu.api.groovy.console.bindings.filters.FilterBy filter, List<Action> actions, StringBuilder stringBuffer, boolean dryRun)Traverses the resources and performs the filters and actions.
-
-
-
Method Detail
-
traverse
public abstract void traverse(@Nonnull BindingContext context, de.valtech.aecu.api.groovy.console.bindings.filters.FilterBy filter, @Nonnull List<Action> actions, @Nonnull StringBuilder stringBuffer, boolean dryRun) throws org.apache.sling.api.resource.PersistenceException, de.valtech.aecu.api.service.AecuException
Traverses the resources and performs the filters and actions.- Parameters:
context- binding contextfilter- filteractions- list of actionsstringBuffer- output bufferdryRun- dry run- Throws:
org.apache.sling.api.resource.PersistenceException- error traversing nodesde.valtech.aecu.api.service.AecuException- other error
-
isResourceValid
protected boolean isResourceValid(org.apache.sling.api.resource.Resource resource)
Checks if the resource is still valid. E.g. this returns false if it was already deleted.- Parameters:
resource- resource- Returns:
- valid
-
applyActionsOnResource
protected void applyActionsOnResource(@Nonnull org.apache.sling.api.resource.Resource resource, de.valtech.aecu.api.groovy.console.bindings.filters.FilterBy filter, List<Action> actions, StringBuilder output, boolean dryRun) throws org.apache.sling.api.resource.PersistenceException, de.valtech.aecu.api.service.AecuException
Applies the actions on the given resource.- Parameters:
resource- resourcefilter- filteractions- list of actionsoutput- outputdryRun- dry-run active- Throws:
org.apache.sling.api.resource.PersistenceException- error during executionde.valtech.aecu.api.service.AecuException- other error
-
-