Class AddRolesToUsersServiceImpl

java.lang.Object
com.skava.auth.service.impl.userrole.AddRolesToUsersServiceImpl
All Implemented Interfaces:
AddRolesToUsersService, com.skava.core.EcommService<AddRolesToUsersRequest,com.skava.core.ResponseModel>

@Service public class AddRolesToUsersServiceImpl extends Object implements AddRolesToUsersService
This service class implements AddRolesToUsersService and handles the add user to role service request, process it and save the details in DB. It also implements business logic required to add user to requested role.
Version:
$Id: $Id
Author:
Infosys Equinox
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.MessageSource
    message source for message localization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The class constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.skava.core.validation.ValidatorComponent>
    This method return the list of validation components to validate the request of user's role addition.
    com.skava.core.ResponseModel
    This method process the user's role addition request and adds roles to users whether given request is valid.
    This method saves the all the user role details into the database.

    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.EcommService

    getValidateException, getValidator
  • Field Details

    • messageSource

      @Autowired protected org.springframework.context.MessageSource messageSource
      message source for message localization.
  • Constructor Details

    • AddRolesToUsersServiceImpl

      public AddRolesToUsersServiceImpl()
      The class constructor.
  • Method Details

    • process

      @SendEvent(eventType="authservice/userrole/create", identifier="request_userRoles.userId") public com.skava.core.ResponseModel process(AddRolesToUsersRequest input)
      This method process the user's role addition request and adds roles to users whether given request is valid.
      Specified by:
      process in interface com.skava.core.EcommService<AddRolesToUsersRequest,com.skava.core.ResponseModel>
      Parameters:
      input - a AddRolesToUsersRequest object.
      Returns:
      a ResponseModel object.
    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method return the list of validation components to validate the request of user's role addition.
      Specified by:
      getValidator in interface com.skava.core.EcommService<AddRolesToUsersRequest,com.skava.core.ResponseModel>
      Returns:
      a List of ValidatorComponent objects.
    • saveAllUserAttribute

      public List<UserRole> saveAllUserAttribute(List<UserRole> userRoles)
      This method saves the all the user role details into the database.
      Parameters:
      userRoles - a List of UserRole objects.
      Returns:
      a List of UserRole objects.