|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.social.webui.Utils
public class Utils
Contains some common methods for using as utility.
| Field Summary | |
|---|---|
static String |
ACTIVITY_STREAM_TAB_SELECTED_COOKIED
. |
static String |
ACTIVITY_STREAM_VISITED_PREFIX_COOKIED
|
static String |
FROM
|
static String |
LAST_UPDATED_ACTIVITIES_NUM
|
static String |
NOT_SEEN_ACTIVITIES_COOKIES
. |
static String |
OLD_FROM
|
static String |
SEEN_ACTIVITIES_COOKIES
|
static String |
TO
|
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static String |
centerTrunc(String str,
int head,
int tail)
Truncates large Strings showing a portion of the String's head and tail with the center cut out and replaced with '...'. |
static org.exoplatform.social.core.manager.ActivityManager |
getActivityManager()
Gets activityManager |
static String |
getCookies(String key)
|
static org.exoplatform.social.core.manager.IdentityManager |
getIdentityManager()
Gets identityManager |
static long |
getLastVisited(String key,
String mode)
|
static List<org.exoplatform.social.core.identity.model.Identity> |
getOwnerFriends()
Gets list of friends of owner user |
static org.exoplatform.social.core.identity.model.Identity |
getOwnerIdentity()
Gets identity of owner user. |
static org.exoplatform.social.core.identity.model.Identity |
getOwnerIdentity(boolean loadProfile)
Gets identity of owner user. |
static String |
getOwnerRemoteId()
Gets remote id of owner user (depends on URL: .../remoteId). |
static org.exoplatform.social.core.identity.model.Identity |
getOwnerSpaceIdentity()
Gets space identity of the owner space (from remote id) |
static org.exoplatform.social.core.relationship.model.Relationship |
getRelationship(org.exoplatform.social.core.identity.model.Identity identity)
|
static org.exoplatform.social.core.manager.RelationshipManager |
getRelationshipManager()
Gets relationshipManager |
static String |
getSelectedNode()
Gets selected node name. |
static org.exoplatform.social.core.space.model.Space |
getSpaceByContext()
|
static String |
getSpaceHomeURL(org.exoplatform.social.core.space.model.Space space)
Gets the space home url of a space. |
static org.exoplatform.social.core.space.spi.SpaceService |
getSpaceService()
Gets spaceService |
static String |
getSpaceURL(org.exoplatform.portal.mop.user.UserNode node)
Get the space url. |
static String |
getSpaceUrlByContext()
Gets the space url based on the current context. |
static String |
getURI(String url)
Get the uri. |
static org.exoplatform.social.core.identity.model.Identity |
getUserIdentity(String userName,
boolean loadProfile)
Gets identity from the remote id (user name) |
static List<org.exoplatform.social.core.identity.model.Identity> |
getViewerFriends()
Gets list of friends of viewer user |
static org.exoplatform.social.core.identity.model.Identity |
getViewerIdentity()
Gets identity of viewer user (logged-in user). |
static org.exoplatform.social.core.identity.model.Identity |
getViewerIdentity(boolean loadProfile)
Gets identity of viewer user (logged-in user). |
static String |
getViewerRemoteId()
Gets remote id of viewer user. |
static boolean |
hasCookies(String key)
|
static void |
initUserProfilePopup(String uiActivityId)
Initializes user profile popup. |
static boolean |
isHomePage()
Determines current displayed page is Home or not base on selected node. |
static boolean |
isOwner()
Checks if the owner user is the viewer user. |
static boolean |
isRefreshPage()
Checks the page in refresh context or switch from other one to it. |
static boolean |
isSpaceContext()
Check whether is being in a space context or not. |
static String |
listToString(List<String> list,
String separator)
|
static String |
normalizeString(String str)
Trim space characters at the beginning and end of string. |
static void |
resizeHomePage()
Resizes the height of Home page. |
static void |
setCookies(String key,
String value)
|
static void |
setCurrentNavigationData(String siteType,
String siteName,
String path)
|
static void |
setLastVisited(String mode)
|
static String |
trunc(String str,
int head)
Truncates large Strings showing a portion of the String's head and tail with the head cut out and replaced with '...'. |
static void |
updateWorkingWorkSpace()
Updates working work space. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ACTIVITY_STREAM_TAB_SELECTED_COOKIED
public static final String ACTIVITY_STREAM_VISITED_PREFIX_COOKIED
public static final String LAST_UPDATED_ACTIVITIES_NUM
public static final String FROM
public static final String OLD_FROM
public static final String TO
public static final String NOT_SEEN_ACTIVITIES_COOKIES
public static final String SEEN_ACTIVITIES_COOKIES
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static String getOwnerRemoteId()
public static String getViewerRemoteId()
public static boolean isOwner()
public static org.exoplatform.social.core.identity.model.Identity getOwnerIdentity(boolean loadProfile)
loadProfile -
public static org.exoplatform.social.core.identity.model.Identity getViewerIdentity(boolean loadProfile)
loadProfile -
public static org.exoplatform.social.core.identity.model.Identity getOwnerIdentity()
public static org.exoplatform.social.core.identity.model.Identity getViewerIdentity()
public static org.exoplatform.social.core.identity.model.Identity getUserIdentity(String userName,
boolean loadProfile)
userName - loadProfile -
public static org.exoplatform.social.core.identity.model.Identity getOwnerSpaceIdentity()
public static List<org.exoplatform.social.core.identity.model.Identity> getOwnerFriends()
throws Exception
Exception
public static List<org.exoplatform.social.core.identity.model.Identity> getViewerFriends()
throws Exception
Exceptionpublic static void updateWorkingWorkSpace()
public static final org.exoplatform.social.core.manager.ActivityManager getActivityManager()
public static final org.exoplatform.social.core.manager.IdentityManager getIdentityManager()
public static final org.exoplatform.social.core.manager.RelationshipManager getRelationshipManager()
public static final org.exoplatform.social.core.relationship.model.Relationship getRelationship(org.exoplatform.social.core.identity.model.Identity identity)
throws Exception
identity -
Exceptionpublic static final org.exoplatform.social.core.space.spi.SpaceService getSpaceService()
public static String getURI(String url)
url -
public static String getSelectedNode()
public static String getSpaceURL(org.exoplatform.portal.mop.user.UserNode node)
node -
public static String getSpaceHomeURL(org.exoplatform.social.core.space.model.Space space)
space -
public static void setCookies(String key,
String value)
value - public static String getCookies(String key)
value - public static boolean hasCookies(String key)
public static long getLastVisited(String key,
String mode)
public static void setLastVisited(String mode)
public static String listToString(List<String> list,
String separator)
public static void setCurrentNavigationData(String siteType,
String siteName,
String path)
requestNavData - public static boolean isRefreshPage()
public static boolean isHomePage()
public static final String centerTrunc(String str,
int head,
int tail)
str - the string to truncatehead - the amount of the head to displaytail - the amount of the tail to display
public static final String trunc(String str,
int head)
str - the string to truncatehead - the amount of the head to display
public static String normalizeString(String str)
str -
public static boolean isSpaceContext()
public static String getSpaceUrlByContext()
public static void resizeHomePage()
public static void initUserProfilePopup(String uiActivityId)
uiActivityId - Id of activity component.public static org.exoplatform.social.core.space.model.Space getSpaceByContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||