Class ReplaceResourcePropertyValues

    • Constructor Detail

      • ReplaceResourcePropertyValues

        public ReplaceResourcePropertyValues​(@Nonnull
                                             String oldValue,
                                             @Nonnull
                                             String newValue,
                                             @Nonnull
                                             List<String> propertyNames)
        Constructor
        Parameters:
        oldValue - old value
        newValue - new value
        propertyNames - property names to check
    • 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
      • valueMatches

        protected boolean valueMatches​(String value)
        Checks if the value matches the searched value.
        Parameters:
        value - content property value
        Returns:
        matches condition
      • getNewValue

        protected String getNewValue​(String propertyValue)
        Returns the new property value.
        Parameters:
        propertyValue - old property value
        Returns:
        new value