Class MoveResourceToPathRegex

  • All Implemented Interfaces:
    Action

    public class MoveResourceToPathRegex
    extends Object
    implements Action
    Action class for moving resources via regex
    Author:
    Roxana Muresan
    • Constructor Detail

      • MoveResourceToPathRegex

        public MoveResourceToPathRegex​(@Nonnull
                                       String matchPattern,
                                       @Nonnull
                                       String targetPathExpr,
                                       @Nonnull
                                       BindingContext context)
        Constructor
        Parameters:
        matchPattern - regex pattern
        targetPathExpr - target regex
        context - binding context
    • Method Detail

      • doAction

        public String doAction​(@Nonnull
                               org.apache.sling.api.resource.Resource resource)
                        throws org.apache.sling.api.resource.PersistenceException
        Description copied from interface: Action
        Runs an action.
        Specified by:
        doAction in interface Action
        Parameters:
        resource - resource to run action on
        Returns:
        output message
        Throws:
        org.apache.sling.api.resource.PersistenceException - error saving to JCR