Class CreateUserServiceImplHelper

java.lang.Object
com.skava.service.impl.CreateUserServiceImplHelper

@Service public class CreateUserServiceImplHelper extends Object
This service class implements CreateUserService and handles the create user service request, process it and save the details in DB. It also implements business logic required to create user in a collection.
Author:
Infosys Equinox
  • Field Details

  • Constructor Details

    • CreateUserServiceImplHelper

      public CreateUserServiceImplHelper()
      Default Constructor
  • Method Details

    • validationUserList

      public void validationUserList(List<Users> users, List<Users> createdUsers, List<Users> existUsers, List<Users> guestUsers, String locale, Collection collection, boolean validate)
      This method is used to get existing user list and creating user list by checking the user email and phone number in database and check needs to create whether guest or register user.
      Parameters:
      users - Holds the List of Users object which contains user model object from request that is used for creating an user.
      createdUsers - Holds the List of Users object which contains list of register user object.
      existUsers - Holds the List of Users object which contains list of existing user object.
      guestUsers - Holds the List of Users object which contains list of guest user object.
      locale - API Response and error messages will be responded in the locale mentioned in this parameter.
      collection - Holds Collection object used to get collection id which is used for checking identities.
      validate - Boolean value which checks whether to validate only or not.
    • createRegisteredUser

      @Transactional public List<Users> createRegisteredUser(List<Users> usersVO, boolean inviteUserFlag, Collection collection, UserRequest request, List<CollectionAttributeEntity> collectionAttributes, String enableUserMerge)
      This method is used to create an user in active state or not activated state based on inviteUserFlag.
      Parameters:
      usersVO - Holds the List of Users object which contains user model object which is from request that is used for creating an user.
      inviteUserFlag - Boolean value which indicates whether the user is invite user or not.
      collection - Holds Collection object for creating an user in specified collection id.
      request - Holds UserRequest object for getting user object for merging an user.
      collectionAttributes - Holds the List of CollectionAttributeEntity object for loading the collection properties.
      enableUserMerge - indicates whether user needs to be merged or not.
      Returns:
      The List of Users object which contains the created user list.
    • createGuestUser

      public UsersEntity createGuestUser(Users usersVO, CollectionEntity collectionEntity)
      Used to creates the guest user by checking the guest flag in user object from request.
      Parameters:
      usersVO - Instance of Users object which is from request used for creating the guest user.
      collectionEntity - Instance of CollectionEntity object used for creating guest user.
      Returns:
      Instance of UsersEntity object which contains guest user entity object.