Class TraversData

    • Constructor Detail

      • TraversData

        public TraversData()
    • 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 context
        filter - filter
        actions - list of actions
        stringBuffer - output buffer
        dryRun - dry run
        Throws:
        org.apache.sling.api.resource.PersistenceException - error traversing nodes
        de.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 - resource
        filter - filter
        actions - list of actions
        output - output
        dryRun - dry-run active
        Throws:
        org.apache.sling.api.resource.PersistenceException - error during execution
        de.valtech.aecu.api.service.AecuException - other error