Class UserNotificationUtil

java.lang.Object
com.skava.util.UserNotificationUtil

public final class UserNotificationUtil extends Object
This is a Utility class which is used for triggering an event details.
Author:
Infosys Equinox
  • 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 - Holds EventClientComponent object which is used send event to topic which is used to send notification.
      userEventPayLoad - Holds UsersEventPayLoad object which contains payload details.
      routingKey - Indicates the routing key of the event triggered.
      usersList - Holds List of Users object which is used to send the notification for all the list of user.
      collection - Holds Collection 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 - Holds EventClientComponent object which is used send event to topic which is used to send notification.
      authToken - to authorize user.
      collectionId - Holds CollectionId object which is used to get colletion id and business id for events.
      collectionCommonServices -
      usersEntity -
    • deleteCustomProperties

      public static void deleteCustomProperties(Users user)
      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 - Holds List of CollectionAttributeEntity which is used to get property value from database.
      collectionPropertyRepository - Holds CollectionPropertyRepository 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 - Holds List of CollectionAttributeEntity object.
      collection - Indicates the collection.
      collectionCommonServices - Holds CollectionCommonServices 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.