org.exoplatform.social.webui
Class Utils

java.lang.Object
  extended by org.exoplatform.social.webui.Utils

public class Utils
extends Object

Contains some common methods for using as utility.


Constructor Summary
Utils()
           
 
Method Summary
static org.exoplatform.social.core.manager.ActivityManager getActivityManager()
          Gets activityManager
static org.exoplatform.social.core.manager.IdentityManager getIdentityManager()
          Gets identityManager
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.manager.RelationshipManager getRelationshipManager()
          Gets relationshipManager
static String getSelectedNode()
          Gets selected node name.
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 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 isOwner()
          Checks if the owner user is the viewer user.
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
 

Constructor Detail

Utils

public Utils()
Method Detail

getOwnerRemoteId

public static String getOwnerRemoteId()
Gets remote id of owner user (depends on URL: .../remoteId). If owner user is null, return viewer remote id

Returns:
remoteId of owner user
Since:
1.2.0 GA

getViewerRemoteId

public static String getViewerRemoteId()
Gets remote id of viewer user.

Returns:
remote id
Since:
1.2.0 GA

isOwner

public static boolean isOwner()
Checks if the owner user is the viewer user.

Returns:
true if the viewer user is the same as owner user.
Since:
1.2.0 GA

getOwnerIdentity

public static org.exoplatform.social.core.identity.model.Identity getOwnerIdentity(boolean loadProfile)
Gets identity of owner user.

Parameters:
loadProfile -
Returns:
identity
Since:
1.2.0 GA

getViewerIdentity

public static org.exoplatform.social.core.identity.model.Identity getViewerIdentity(boolean loadProfile)
Gets identity of viewer user (logged-in user).

Parameters:
loadProfile -
Returns:
identity
Since:
1.2.0 GA

getOwnerIdentity

public static org.exoplatform.social.core.identity.model.Identity getOwnerIdentity()
Gets identity of owner user. Do not load profile.

Returns:
identity
Since:
1.2.0 GA

getViewerIdentity

public static org.exoplatform.social.core.identity.model.Identity getViewerIdentity()
Gets identity of viewer user (logged-in user). Do not load profile.

Returns:
identity
Since:
1.2.0 GA

getUserIdentity

public static org.exoplatform.social.core.identity.model.Identity getUserIdentity(String userName,
                                                                                  boolean loadProfile)
Gets identity from the remote id (user name)

Parameters:
userName -
loadProfile -
Returns:
identity
Since:
1.2.0 GA

getOwnerSpaceIdentity

public static org.exoplatform.social.core.identity.model.Identity getOwnerSpaceIdentity()
Gets space identity of the owner space (from remote id)

Returns:
space identity
Since:
1.2.0 GA

getOwnerFriends

public static List<org.exoplatform.social.core.identity.model.Identity> getOwnerFriends()
                                                                                 throws Exception
Gets list of friends of owner user

Returns:
list of friends
Throws:
Exception
Since:
1.2.0 GA

getViewerFriends

public static List<org.exoplatform.social.core.identity.model.Identity> getViewerFriends()
                                                                                  throws Exception
Gets list of friends of viewer user

Returns:
list of friends
Throws:
Exception
Since:
1.2.0 GA

updateWorkingWorkSpace

public static void updateWorkingWorkSpace()
Updates working work space.

Since:
1.2.0 GA

getActivityManager

public static final org.exoplatform.social.core.manager.ActivityManager getActivityManager()
Gets activityManager

Returns:
activityManager
Since:
1.2.0 GA

getIdentityManager

public static final org.exoplatform.social.core.manager.IdentityManager getIdentityManager()
Gets identityManager

Returns:
identityManager
Since:
1.2.0 GA

getRelationshipManager

public static final org.exoplatform.social.core.manager.RelationshipManager getRelationshipManager()
Gets relationshipManager

Returns:
relationshipManager
Since:
1.2.0 GA

getSpaceService

public static final org.exoplatform.social.core.space.spi.SpaceService getSpaceService()
Gets spaceService

Returns:
spaceService
Since:
1.2.0 GA

getURI

public static String getURI(String url)
Get the uri.

Parameters:
url -
Returns:
Since:
1.2.1

getSelectedNode

public static String getSelectedNode()
Gets selected node name.

Since:
1.2.2

getSpaceURL

public static String getSpaceURL(org.exoplatform.portal.mop.user.UserNode node)
Get the space url.

Parameters:
node -
Returns:
Since:
1.2.1

getSpaceHomeURL

public static String getSpaceHomeURL(org.exoplatform.social.core.space.model.Space space)
Gets the space home url of a space.

Parameters:
space -
Returns:
Since:
1.2.1


Copyright © 2013 eXo Platform SAS. All Rights Reserved.