Class LinkProviderUtils

java.lang.Object
org.exoplatform.social.notification.LinkProviderUtils

public class LinkProviderUtils extends Object
  • Field Details

  • Constructor Details

    • LinkProviderUtils

      public LinkProviderUtils()
  • Method Details

    • getInviteToConnectUrl

      public static String getInviteToConnectUrl(String receiverId, String senderId)
      Gets the url to the user's profile page of the receiver
      Parameters:
      receiverId - remoteId of the receiver
      senderId - remoteId of the sender
      Returns:
    • getConfirmInvitationToConnectUrl

      public static String getConfirmInvitationToConnectUrl(String senderId, String receiverId)
      Gets the url to the user's profile page of the sender
      Parameters:
      senderId - remoteId of the sender
      receiverId - remoteId of the receiver
      Returns:
    • getIgnoreInvitationToConnectUrl

      public static String getIgnoreInvitationToConnectUrl(String senderId, String receiverId)
      Gets the url to the connection's tab of the current user
      Parameters:
      senderId - remoteId of the sender
      receiverId - remoteId of the receiver
      Returns:
    • getAcceptInvitationToJoinSpaceUrl

      public static String getAcceptInvitationToJoinSpaceUrl(String spaceId, String userId)
      Gets the url to the space's home page
      Parameters:
      spaceId -
      userId -
      Returns:
    • getIgnoreInvitationToJoinSpaceUrl

      public static String getIgnoreInvitationToJoinSpaceUrl(String spaceId, String userId)
      Gets the url to the space's home page
      Parameters:
      spaceId -
      userId - remoteId of the user
      Returns:
    • getValidateRequestToJoinSpaceUrl

      public static String getValidateRequestToJoinSpaceUrl(String spaceId, String userId)
      Gets the url to the space's members
      Parameters:
      spaceId -
      userId - remoteId of the user
      Returns:
    • getRefuseRequestToJoinSpaceUrl

      public static String getRefuseRequestToJoinSpaceUrl(String spaceId, String userId)
      Gets the url to the space's members
      Parameters:
      spaceId -
      userId - remoteId of the user
      Returns:
    • getRedirectUrl

      public static String getRedirectUrl(String type, String objectId)
      Gets the associated page of type
      Parameters:
      type - type of the page : user or space or activity
      objectId - can be a space's id or user's id or activity's id
      Returns:
    • getWebNotificationRestUrl

      public static String getWebNotificationRestUrl(String type, String objectId1, String objectId2)
    • getWebNotificationRestUrl

      public static String getWebNotificationRestUrl(String type, String objectId1, String objectId2, String notificationId, String jsonFile)
      Gets the rest service URI for the specified context
      Parameters:
      type -
      objectId1 -
      objectId2 -
      jsonFile - the json file name
      Returns:
    • getRestUrl

      public static String getRestUrl(String type, String objectId1, String objectId2)
      Gets full rest url
      Parameters:
      type -
      objectId1 -
      objectId2 -
      Returns:
    • getBaseRestUrl

      public static String getBaseRestUrl()
      Get base url of rest service
      Returns:
      base rest url like : http://localhost:8080/rest
    • getBaseUrl

      public static String getBaseUrl()
      Get the portal base url
      Returns:
      base url like : http://localhost:8080/portal
    • getPortalRestUrl

      public static String getPortalRestUrl(String type, String objectId1, String objectId2)
      Get the url with the login redirection
      Parameters:
      type -
      objectId1 -
      objectId2 -
      Returns:
    • getPortalLoginRedirectURL

      public static String getPortalLoginRedirectURL()
      Get the Redirect login url
      Returns:
      url http://localhost:8080/portal/login?initialURI=/portal/rest
    • getPrivateRestUrl

      @Deprecated public static String getPrivateRestUrl(String type, String objectId1, String objectId2)
      Deprecated.
      Gets private absolute rest url
      Parameters:
      type -
      objectId1 -
      objectId2 -
      Returns:
    • getBasePrivateRestUrl

      public static String getBasePrivateRestUrl()
      Get private absolute base url of rest service
      Returns:
      base rest url like : http://localhost:8080/rest/private
    • getUserAvatarUrl

      public static String getUserAvatarUrl(org.exoplatform.social.core.identity.model.Profile profile)
      Gets the user's avatar url. In case this url is null, we take the default url
      Parameters:
      profile - user profile
      Returns:
    • getSpaceAvatarUrl

      public static String getSpaceAvatarUrl(org.exoplatform.social.core.space.model.Space space)
      Gets the space's avatar url. In case this url is null, we take the default url
      Parameters:
      space -
      Returns:
    • getOpenLink

      public static String getOpenLink(org.exoplatform.social.core.activity.model.ExoSocialActivity activity)
      Get the open link for each type of notification
      Parameters:
      activity - The activity of the notification
      Returns:
      The link to open the related resource (file, event, wiki page, ...)