Interface AccountPermissionContextValidator<P extends AccountPermission>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.springframework.validation.Errors validateCreate​(P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates a create operation is allowed in the current context.
      void validateCreate​(P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates a create operation is allowed in the current context.
      org.springframework.validation.Errors validateDelete​(P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates a delete operation is allowed in the current context.
      void validateDelete​(P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates a delete operation is allowed in the current context.
      org.springframework.validation.Errors validateUpdate​(String id, P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates an update operation is allowed in the current context.
      void validateUpdate​(String id, P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates an update operation is allowed in the current context.
    • Method Detail

      • validateCreate

        org.springframework.validation.Errors validateCreate​(P permission,
                                                             @Nullable
                                                             com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates a create operation is allowed in the current context.
        Parameters:
        permission - The permission to validate
        contextInfo - The current context
        Returns:
        An Errors object bound to a {code permission}
        See Also:
        validateCreate(AccountPermission, Errors, ContextInfo)
      • validateUpdate

        org.springframework.validation.Errors validateUpdate​(String id,
                                                             P permission,
                                                             @Nullable
                                                             com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates an update operation is allowed in the current context.
        Parameters:
        id - the id of the permission being updated, explicitly provided such that it can be used to find the existing record even if AccountPermission.getId() is unsupplied in permission.
        permission - The permission to validate
        contextInfo - The current context
        Returns:
        An Errors object bound to a {code permission}
        See Also:
        validateUpdate(String, AccountPermission, Errors, ContextInfo)
      • validateDelete

        org.springframework.validation.Errors validateDelete​(P permission,
                                                             @Nullable
                                                             com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates a delete operation is allowed in the current context.
        Parameters:
        permission - the permission being deleted to validate
        contextInfo - The current context
        Returns:
        An Errors object bound to a {code permission}
        See Also:
        validateDelete(AccountPermission, Errors, ContextInfo)
      • validateCreate

        void validateCreate​(P permission,
                            org.springframework.validation.Errors errors,
                            @Nullable
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates a create operation is allowed in the current context.
        Parameters:
        permission - The permission to validate
        errors - An errors object bound to the permission to be validated
        contextInfo - The current context
      • validateUpdate

        void validateUpdate​(String id,
                            P permission,
                            org.springframework.validation.Errors errors,
                            @Nullable
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates an update operation is allowed in the current context.
        Parameters:
        id - the id of the permission being updated, explicitly provided such that it can be used to find the existing record even if AccountPermission.getId() is unsupplied in permission.
        permission - The permission to validate
        errors - An errors object bound to the permission to be validated
        contextInfo - The current context
      • validateDelete

        void validateDelete​(P permission,
                            org.springframework.validation.Errors errors,
                            @Nullable
                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validates a delete operation is allowed in the current context.
        Parameters:
        permission - The permission being deleted to validate
        errors - An errors object bound to the permission to be validated
        contextInfo - The current context