Class ResourceValidatorProcessActionHandler

  • All Implemented Interfaces:
    IProcessActionHandler, IParameters

    public class ResourceValidatorProcessActionHandler
    extends ProcessActionHandler<Source<?>>
    Does not allow resources to have duplicated names.
    Since:
    4.0.10
    Version:
    $Revision: 11180 $ $Date: 2009-12-04 18:13:02 -0200 (Fri, 04 Dec 2009) $
    • Constructor Detail

      • ResourceValidatorProcessActionHandler

        public ResourceValidatorProcessActionHandler()
    • Method Detail

      • processAction

        public void processAction()
                           throws PortalException
        If the name is in use by another resource in same service instance, throws an exception.
        Throws:
        PortalException
        Since:
        4.0.10
      • isNameInUse

        public boolean isNameInUse​(java.lang.String contentName,
                                   java.lang.String serviceInstanceId,
                                   java.lang.String itemId)
                            throws PortalException
        Indicates if a name is in use by another resource.
        Parameters:
        contentName - the name of the resource.
        serviceInstanceId - the resource's service instance identifier.
        itemId - the resource's identifier if it is being edited, or null if it is being added.
        Returns:
        true if it is in use, false otherwise.
        Throws:
        PortalException
        Since:
        5.5.0