Package com.skava.util
Class UserNotificationUtil
java.lang.Object
com.skava.util.UserNotificationUtil
This is a Utility class which is used for triggering an event details.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deleteCustomProperties
(Users user) This deletes the custom properties for security violationstatic String
getPropertyFromDB
(List<CollectionAttributeEntity> collectionAttributes, CollectionPropertyRepository collectionPropertyRepository, long collectionId, String name) This method is used to load property from DBstatic UsersEventPayLoad
getRequiredParamsForEvent
(boolean inviteUserFlag, List<CollectionAttributeEntity> collectionAttributes, Collection collection, CollectionCommonServices collectionCommonServices, boolean isLoadCollectionProperties) This method is used to get required params for event.static void
sendingNotificationForUser
(com.skava.core.event.EventClientComponent eventClientComponent, UsersEventPayLoad userEventPayLoad, String routingKey, List<Users> usersList, Collection collection, long storeId, String authToken) This method is used to send Notification in invite user.static void
sendingNotificationForUser
(com.skava.core.event.EventClientComponent eventClientComponent, String authToken, long collectionId, CollectionCommonServices collectionCommonServices, UsersEntity usersEntity) This method is used to send Notification in invite user.
-
Method Details
-
sendingNotificationForUser
public static void sendingNotificationForUser(com.skava.core.event.EventClientComponent eventClientComponent, UsersEventPayLoad userEventPayLoad, String routingKey, List<Users> usersList, Collection collection, long storeId, String authToken) This method is used to send Notification in invite user. This will send an event to Notification services through message queue.- Parameters:
eventClientComponent
- HoldsEventClientComponent
object which is used send event to topic which is used to send notification.userEventPayLoad
- HoldsUsersEventPayLoad
object which contains payload details.routingKey
- Indicates the routing key of the event triggered.usersList
- HoldsList
ofUsers
object which is used to send the notification for all the list of user.collection
- HoldsCollection
object which is used to get colletion id and business id for events.storeId
- Indicates the storeid.authToken
- to authorize user.
-
sendingNotificationForUser
public static void sendingNotificationForUser(com.skava.core.event.EventClientComponent eventClientComponent, String authToken, long collectionId, CollectionCommonServices collectionCommonServices, UsersEntity usersEntity) This method is used to send Notification in invite user. This will send an event to Notification services through message queue.- Parameters:
eventClientComponent
- HoldsEventClientComponent
object which is used send event to topic which is used to send notification.authToken
- to authorize user.collectionId
- HoldsCollectionId
object which is used to get colletion id and business id for events.collectionCommonServices
-usersEntity
-
-
deleteCustomProperties
This deletes the custom properties for security violation- Parameters:
user
- the user object
-
getPropertyFromDB
public static String getPropertyFromDB(List<CollectionAttributeEntity> collectionAttributes, CollectionPropertyRepository collectionPropertyRepository, long collectionId, String name) This method is used to load property from DB- Parameters:
collectionAttributes
- HoldsList
ofCollectionAttributeEntity
which is used to get property value from database.collectionPropertyRepository
- HoldsCollectionPropertyRepository
which is used to get property value from database.collectionId
- Holds collection is which is used to get property value from database.name
- Indicates the name of the property for which the value gets loaded.- Returns:
- The valid property value
-
getRequiredParamsForEvent
public static UsersEventPayLoad getRequiredParamsForEvent(boolean inviteUserFlag, List<CollectionAttributeEntity> collectionAttributes, Collection collection, CollectionCommonServices collectionCommonServices, boolean isLoadCollectionProperties) This method is used to get required params for event. It will load activation redirect url, reset redirect url, activation param expiry, reset param expiry from collection properties.- Parameters:
inviteUserFlag
- Indicates whether the user is invite user or not.collectionAttributes
- HoldsList
ofCollectionAttributeEntity
object.collection
- Indicates the collection.collectionCommonServices
- HoldsCollectionCommonServices
object.isLoadCollectionProperties
- Boolean value which is used to load value from collection properties or not.- Returns:
- The
UsersEventPayLoad
object which contains payload details for triggering event.
-