Class LinkProviderUtils
- java.lang.Object
-
- org.exoplatform.social.notification.LinkProviderUtils
-
public class LinkProviderUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCEPT_INVITATION_JOIN_SPACEstatic StringCONFIRM_INVITATION_TO_CONNECTstatic StringIGNORE_INVITATION_JOIN_SPACEstatic StringIGNORE_INVITATION_TO_CONNECTstatic StringINVITE_TO_CONNECTstatic StringLOGIN_INITIALURIstatic StringPRIVATE_PATHstatic StringREDIRECT_URLstatic StringREFUSE_SPACE_REQUEST_ACTIONstatic StringREPLY_ACTIVITYstatic StringRESOURCE_URLstatic StringVALIDATE_REQUEST_JOIN_SPACEstatic StringVIEW_FULL_DISCUSSION
-
Constructor Summary
Constructors Constructor Description LinkProviderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringgetAcceptInvitationToJoinSpaceUrl(String spaceId, String userId)Gets the url to the space's home pagestatic StringgetBasePrivateRestUrl()Get private absolute base url of rest servicestatic StringgetBaseRestUrl()Get base url of rest servicestatic StringgetConfirmInvitationToConnectUrl(String senderId, String receiverId)Gets the url to the user's profile page of the senderstatic StringgetDlpRestoredUrl(String reference)Get the Redirect restored item urlstatic StringgetIgnoreInvitationToConnectUrl(String senderId, String receiverId)Gets the url to the connection's tab of the current userstatic StringgetIgnoreInvitationToJoinSpaceUrl(String spaceId, String userId)Gets the url to the space's home pagestatic StringgetInviteToConnectUrl(String receiverId, String senderId)Gets the url to the user's profile page of the receiverstatic StringgetOpenLink(org.exoplatform.social.core.activity.model.ExoSocialActivity activity)Get the open link for each type of notificationstatic StringgetPortalLoginRedirectURL()Get the Redirect login urlstatic StringgetPortalRestUrl(String type, String objectId1, String objectId2)Get the url with the login redirectionstatic StringgetPrivateRestUrl(String type, String objectId1, String objectId2)Deprecated.static StringgetQuarantineRedirectURL(String username)Get the Redirect quarantine page urlstatic StringgetRedirectUrl(String type, String objectId)Gets the associated page of typestatic StringgetRefuseRequestToJoinSpaceUrl(String spaceId, String userId)Gets the url to the space's membersstatic StringgetRestUrl(String type, String objectId1, String objectId2)Gets full rest urlstatic StringgetSpaceAvatarUrl(org.exoplatform.social.core.space.model.Space space)Gets the space's avatar url.static StringgetUserAvatarUrl(org.exoplatform.social.core.identity.model.Profile profile)Gets the user's avatar url.static StringgetValidateRequestToJoinSpaceUrl(String spaceId, String userId)Gets the url to the space's membersstatic StringgetWebNotificationRestUrl(String type, String objectId1, String objectId2)static StringgetWebNotificationRestUrl(String type, String objectId1, String objectId2, String notificationId, String jsonFile)Gets the rest service URI for the specified context
-
-
-
Field Detail
-
RESOURCE_URL
public static final String RESOURCE_URL
- See Also:
- Constant Field Values
-
INVITE_TO_CONNECT
public static final String INVITE_TO_CONNECT
- See Also:
- Constant Field Values
-
CONFIRM_INVITATION_TO_CONNECT
public static final String CONFIRM_INVITATION_TO_CONNECT
- See Also:
- Constant Field Values
-
IGNORE_INVITATION_TO_CONNECT
public static final String IGNORE_INVITATION_TO_CONNECT
- See Also:
- Constant Field Values
-
ACCEPT_INVITATION_JOIN_SPACE
public static final String ACCEPT_INVITATION_JOIN_SPACE
- See Also:
- Constant Field Values
-
IGNORE_INVITATION_JOIN_SPACE
public static final String IGNORE_INVITATION_JOIN_SPACE
- See Also:
- Constant Field Values
-
VALIDATE_REQUEST_JOIN_SPACE
public static final String VALIDATE_REQUEST_JOIN_SPACE
- See Also:
- Constant Field Values
-
REFUSE_SPACE_REQUEST_ACTION
public static final String REFUSE_SPACE_REQUEST_ACTION
- See Also:
- Constant Field Values
-
REPLY_ACTIVITY
public static final String REPLY_ACTIVITY
- See Also:
- Constant Field Values
-
VIEW_FULL_DISCUSSION
public static final String VIEW_FULL_DISCUSSION
- See Also:
- Constant Field Values
-
REDIRECT_URL
public static final String REDIRECT_URL
- See Also:
- Constant Field Values
-
PRIVATE_PATH
public static final String PRIVATE_PATH
- See Also:
- Constant Field Values
-
LOGIN_INITIALURI
public static final String LOGIN_INITIALURI
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInviteToConnectUrl
public static String getInviteToConnectUrl(String receiverId, String senderId)
Gets the url to the user's profile page of the receiver- Parameters:
senderId- remoteId of the senderreceiverId- remoteId of the receiver- 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 senderreceiverId- 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 senderreceiverId- 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 activityobjectId- 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
-
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, ...)
-
getQuarantineRedirectURL
public static String getQuarantineRedirectURL(String username)
Get the Redirect quarantine page url- Returns:
- the quarantine page url
-
-