public class LinkProvider extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PORTAL_OWNER
Hacks for unit test to work.
|
static String |
HAS_CONNECTION_ICON |
static String |
JAVASCRIPT_RESOURCE_URL |
static String |
PROFILE_DEFAULT_AVATAR_URL |
static String |
RESOURCE_URL |
static String |
ROUTE_DELIMITER |
static String |
SPACE_DEFAULT_AVATAR_URL |
static String |
SPACE_MANAGER_ICON |
static String |
SPACE_MEMBER_ICON |
static String |
SPACE_WAITING_CONFIRM_ICON |
static String |
STARTER_ACTIVITY_AVATAR |
static String |
STARTER_ACTIVITY_IMAGE |
static String |
WAITING_CONFIRMATION_ICON |
Constructor and Description |
---|
LinkProvider(org.exoplatform.container.xml.InitParams params)
Constructor with parameter to inject the default portal owner name.
|
Modifier and Type | Method and Description |
---|---|
static String |
buildAvatarImageUri(org.exoplatform.social.core.model.AvatarAttachment avatarAttachment)
Builds URI to the avatar image from avatarAttachment.
|
static String |
buildAvatarImageUri(org.exoplatform.social.core.space.model.Space space)
Gets URI to the provided space's avatar.
|
static String |
buildAvatarImageUri(String identityName)
Gets URI to an avatar from the identity name.
|
static String |
escapeJCRSpecialCharacters(String string)
Escapes the JCR special characters.
|
static String |
getAbsoluteProfileUrl(String userName,
String portalName,
String portalOwner,
String host)
Gets an absolute profile URL of a user.
|
static String |
getActivityUri(String providerId,
String remoteId)
Gets URI to an activity stream of space or user.
|
static String |
getActivityUriForSpace(String remoteId,
String groupId)
Gets an activity URI of the space.
|
static String |
getAvatarImageSource(PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Profile profile)
Deprecated.
use
Profile.getAvatarUrl() . Will be removed by 4.0.x. |
static String |
getAvatarImageSource(org.exoplatform.social.core.identity.model.Profile profile)
Deprecated.
use
Profile.getAvatarUrl() . Will be removed by 4.0.x. |
static String |
getProfileLink(String username)
Gets a link to the user profile.
|
static String |
getProfileLink(String username,
String portalOwner)
Gets a link to the user profile on a portal.
|
static String |
getProfileUri(String username)
Gets URI to a user profile by username.
|
static String |
getProfileUri(String username,
String portalOwner)
Gets URI to a user profile by username and owner portal.
|
static String |
getRedirectUri(String type)
Gets the link of all spaces page
|
static String |
getSingleActivityUrl(String activityId) |
static String |
getSpaceUri(String prettyName)
Gets URI to a space profile by its pretty name.
|
static String |
getUserActivityUri(String remoteId)
Gets the activity URI of a user.
|
static String |
getUserConnectionsUri(String remoteId)
Gets URI to connections of a user and all people.
|
static String |
getUserConnectionsYoursUri(String remoteId)
Gets URI to connections of a user.
|
static String |
getUserNotificationSettingUri(String remoteId)
Gets the link of notification settings page
|
static String |
getUserProfileUri(String remoteId)
Gets URI to a user profile.
|
public static final String RESOURCE_URL
public static final String JAVASCRIPT_RESOURCE_URL
public static final String PROFILE_DEFAULT_AVATAR_URL
public static final String SPACE_DEFAULT_AVATAR_URL
public static final String HAS_CONNECTION_ICON
public static final String WAITING_CONFIRMATION_ICON
public static final String SPACE_MANAGER_ICON
public static final String SPACE_MEMBER_ICON
public static final String SPACE_WAITING_CONFIRM_ICON
public static final String STARTER_ACTIVITY_AVATAR
public static final String STARTER_ACTIVITY_IMAGE
public static final String ROUTE_DELIMITER
public static String DEFAULT_PORTAL_OWNER
public LinkProvider(org.exoplatform.container.xml.InitParams params)
params
- The params got from configuration.public static String getSpaceUri(String prettyName)
prettyName
- The pretty name of space.public static String getProfileUri(String username)
username
- The name of user (remoteId).public static String getProfileUri(String username, String portalOwner)
username
- The name of user (remoteId).portalOwner
- The portal owner (for example, classic or public).public static String getProfileLink(String username)
username
- The name of user (remoteId).public static String getProfileLink(String username, String portalOwner)
username
- The name of user (remoteId).portalOwner
- The portal owner (for example, classic or public).public static String getAbsoluteProfileUrl(String userName, String portalName, String portalOwner, String host)
username
- The name of user (remoteId).portalName
- The name of current portal.portalOwner
- The portal owner (for example, classic or public).host
- The name of the provided host.public static String getUserActivityUri(String remoteId)
remoteId
- Name of the user, for example root.public static String getUserConnectionsUri(String remoteId)
remoteId
- Name of the user (remoteId), for example root.public static String getUserConnectionsYoursUri(String remoteId)
remoteId
- The name of user (remoteId), for example root.public static String getUserProfileUri(String remoteId)
remoteId
- The name of user (remoteId), for example root.public static String getActivityUri(String providerId, String remoteId)
providerId
- The provider information.remoteId
- Id of the target identity, for example organization:root or space:abc_def.public static String getSingleActivityUrl(String activityId)
activityId
- public static String getActivityUriForSpace(String remoteId, String groupId)
remoteId
- The Id of target space.groupId
- The group Id of target space.public static String buildAvatarImageUri(org.exoplatform.social.core.model.AvatarAttachment avatarAttachment)
avatarAttachment
- The attachment used to build the link to avatar.public static String buildAvatarImageUri(org.exoplatform.social.core.space.model.Space space)
space
- The target object to get its avatar based on the attachment information.public static String buildAvatarImageUri(String identityName)
identityName
- The name of target identity to build the URL link to the avatar.public static String escapeJCRSpecialCharacters(String string)
string
- The set of characters to be escaped.public static String getAvatarImageSource(PortalContainer portalContainer, org.exoplatform.social.core.identity.model.Profile profile)
Profile.getAvatarUrl()
. Will be removed by 4.0.x.profile
- The user profile.portalContainer
- The portal container.public static String getAvatarImageSource(org.exoplatform.social.core.identity.model.Profile profile)
Profile.getAvatarUrl()
. Will be removed by 4.0.x.profile
- The user profile.public static String getUserNotificationSettingUri(String remoteId)
remoteId
- Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.