Class AuthValidatorComponent

java.lang.Object
com.skava.auth.service.validator.AuthValidatorComponent
All Implemented Interfaces:
com.skava.core.EcommComponent, com.skava.core.validation.ValidatorComponent
Direct Known Subclasses:
AddPrivilegeSetToRoleValidator, AddPrivilegeToPrivilegeSetValidator, AddRolesToClientsValidator, AddRolesToUsersValidator, AddRoleToAuthGroupServiceValidator, ClientRoleValidator, CollectionCreateAndUpdateValidator, CollectionPropertiesUpdateValidator, CreateClientSessionValidator, CreateRoleValidator, CreateSessionValidator, CreateUpdateFeaturesRoleMappingValidator, DeleteSessionValidator, UserRoleValidator

public class AuthValidatorComponent extends Object implements com.skava.core.validation.ValidatorComponent
A class to define the service for validating basic validation for all request.
Author:
Infosys Equinox
  • Field Details

    • collectionRepository

      @Autowired protected CollectionRepository collectionRepository
      The collection repository.
    • messageSource

      @Autowired protected org.springframework.context.MessageSource messageSource
  • Constructor Details

    • AuthValidatorComponent

      public AuthValidatorComponent()
  • Method Details

    • preProcess

      public void preProcess(com.skava.core.validation.InputModel model)
      Specified by:
      preProcess in interface com.skava.core.validation.ValidatorComponent
    • validateCollectionId

      public CollectionVO validateCollectionId(Long collectionId)
      Parameters:
      collectionId - a identifier of the collection need to verified.
      Returns:
      a collection if available.
    • validateRole

      public Role validateRole(String roleName, Long collectionId, Long businessId)
    • validateCollection

      public Collection validateCollection(Long collectionId, Long businessId)
      Parameters:
      collectionId - a Long object.
      businessId - a Long object.
      Returns:
      a Collection object.
    • validateBusinessIdForRole

      public void validateBusinessIdForRole(Role role, Long businessId)
      This method validate the business identifier of the custom role.
      Parameters:
      role - a Role object.
      businessId - a Long object.
    • validateRole

      public Role validateRole(Long collectionId, Long businessId, Map<Long,Map<String,Role>> businessRolesMap, String roleName)
      This method validate the roles availability.
      Parameters:
      collectionId - a Long object.
      businessId - a Long object.
      businessRolesMap - a Map object.
      roleName - a String object.
      Returns:
      a Role object.
    • validateRole

      public void validateRole(String roleName, UserRoleVO userRole, Long collectionId, Map<Long,Map<String,Role>> businessRolesMap)
      Validates the role availability.
      Parameters:
      roleName - a String object.
      userRole - a UserRoleVO object.
      collectionId - a Long object.
      businessRolesMap - a Map object.
    • validateClientRole

      public void validateClientRole(String roleName, ClientRoleVO clientRole, Long collectionId, Map<Long,Map<String,Role>> businessRolesMap)
      Validates the role availability.
      Parameters:
      roleName - a String object.
      clientRole - a ClientRoleVO object.
      collectionId - a Long object.
      businessRolesMap - a Map object.