Package com.skava.auth.service.validator
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 Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionRepository
The collection repository.protected org.springframework.context.MessageSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
preProcess
(com.skava.core.validation.InputModel model) void
validateBusinessIdForRole
(Role role, Long businessId) This method validate the business identifier of the custom role.void
validateClientRole
(String roleName, ClientRoleVO clientRole, Long collectionId, Map<Long, Map<String, Role>> businessRolesMap) Validates the role availability.validateCollection
(Long collectionId, Long businessId) validateCollectionId
(Long collectionId) validateRole
(Long collectionId, Long businessId, Map<Long, Map<String, Role>> businessRolesMap, String roleName) This method validate the roles availability.void
validateRole
(String roleName, UserRoleVO userRole, Long collectionId, Map<Long, Map<String, Role>> businessRolesMap) Validates the role availability.validateRole
(String roleName, Long collectionId, Long businessId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommComponent
destroy, init, onEvent
Methods inherited from interface com.skava.core.validation.ValidatorComponent
postProcess, preProcess
-
Field Details
-
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 interfacecom.skava.core.validation.ValidatorComponent
-
validateCollectionId
- Parameters:
collectionId
- a identifier of the collection need to verified.- Returns:
- a collection if available.
-
validateRole
-
validateCollection
- Parameters:
collectionId
- aLong
object.businessId
- aLong
object.- Returns:
- a
Collection
object.
-
validateBusinessIdForRole
This method validate the business identifier of the custom role. -
validateRole
public Role validateRole(Long collectionId, Long businessId, Map<Long, Map<String, Role>> businessRolesMap, String roleName) This method validate the roles availability. -
validateRole
public void validateRole(String roleName, UserRoleVO userRole, Long collectionId, Map<Long, Map<String, Role>> businessRolesMap) Validates the role availability.- Parameters:
roleName
- aString
object.userRole
- aUserRoleVO
object.collectionId
- aLong
object.businessRolesMap
- aMap
object.
-
validateClientRole
public void validateClientRole(String roleName, ClientRoleVO clientRole, Long collectionId, Map<Long, Map<String, Role>> businessRolesMap) Validates the role availability.- Parameters:
roleName
- aString
object.clientRole
- aClientRoleVO
object.collectionId
- aLong
object.businessRolesMap
- aMap
object.
-