Package com.skava.service.impl
Class CreateUserServiceImplHelper
java.lang.Object
com.skava.service.impl.CreateUserServiceImplHelper
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateGuestUser
(Users usersVO, CollectionEntity collectionEntity) Used to creates the guest user by checking the guest flag in user object from request.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.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.
-
Field Details
-
MERGE_USER
MERGE_USER- See Also:
-
-
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 theList
ofUsers
object which contains user model object from request that is used for creating an user.createdUsers
- Holds theList
ofUsers
object which contains list of register user object.existUsers
- Holds theList
ofUsers
object which contains list of existing user object.guestUsers
- Holds theList
ofUsers
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
- HoldsCollection
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 theList
ofUsers
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
- HoldsCollection
object for creating an user in specified collection id.request
- HoldsUserRequest
object for getting user object for merging an user.collectionAttributes
- Holds theList
ofCollectionAttributeEntity
object for loading the collection properties.enableUserMerge
- indicates whether user needs to be merged or not.- Returns:
- The
List
ofUsers
object which contains the created user list.
-
createGuestUser
Used to creates the guest user by checking the guest flag in user object from request.- Parameters:
usersVO
- Instance ofUsers
object which is from request used for creating the guest user.collectionEntity
- Instance ofCollectionEntity
object used for creating guest user.- Returns:
- Instance of
UsersEntity
object which contains guest user entity object.
-