Class ChangePrimaryType

  • All Implemented Interfaces:
    Action

    public class ChangePrimaryType
    extends Object
    implements Action
    Changes the jcr:primaryType of a node.
    Author:
    Sajith
    • Field Detail

      • newPrimaryType

        protected String newPrimaryType
    • Constructor Detail

      • ChangePrimaryType

        public ChangePrimaryType​(@Nonnull
                                 String newPrimaryType)
        Constructor
        Parameters:
        newPrimaryType - new type
    • 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