public class RestUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVITIES_TYPE |
static String |
ADMIN_GROUP |
static String |
COMMENTS_TYPE |
static int |
DEFAULT_LIMIT |
static int |
DEFAULT_OFFSET |
static int |
HARD_LIMIT |
static String |
IDENTITIES_TYPE |
static String |
KEY |
static String |
LIKES_TYPE |
static String |
SPACE_ACTIVITY_TYPE |
static String |
SPACES_MEMBERSHIP_TYPE |
static String |
SPACES_TYPE |
static String |
SUPPORT_TYPE |
static String |
USER_ACTIVITY_TYPE |
static String |
USERS_RELATIONSHIP_TYPE |
static String |
USERS_TYPE |
static String |
VALUE |
| Constructor and Description |
|---|
RestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
buildEntityFromActivity(org.exoplatform.social.core.activity.model.ExoSocialActivity activity,
String restPath,
String expand)
Get a hash map from an activity in order to build a json object for the rest service
|
static Map<String,Object> |
buildEntityFromIdentity(org.exoplatform.social.core.identity.model.Identity identity,
String restPath,
String expand)
Get a hash map from an identity in order to build a json object for the rest service
|
static Map<String,Object> |
buildEntityFromRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship,
String restPath,
String expand,
boolean isSymetric)
Get a hash map from a relationship in order to build a json object for the rest service
|
static Map<String,Object> |
buildEntityFromSpace(org.exoplatform.social.core.space.model.Space space,
String userId,
String restPath,
String expand)
Get a hash map from a space in order to build a json object for the rest service
|
static Map<String,Object> |
buildEntityFromSpaceMembership(org.exoplatform.social.core.space.model.Space space,
String userId,
String type,
String restPath,
String expand)
Get a hash map from a space in order to build a json object for the rest service
|
static Map<String,String> |
getActivityStream(org.exoplatform.social.core.activity.model.ExoSocialActivity activity,
org.exoplatform.social.core.identity.model.Identity authentiatedUsed)
Get the activityStream's information related to the activity.
|
static org.exoplatform.social.core.identity.model.Identity |
getCurrentIdentity()
Returns the social identity of the authenticated user
|
static String |
getCurrentUsername()
Returns the username of the authenticated user
|
static javax.ws.rs.core.MediaType |
getJsonMediaType()
Gets the json media type
|
static boolean |
isMemberOfAdminGroup()
Check if the authenticated user is a member of the admin group
|
public static final int DEFAULT_LIMIT
public static final int DEFAULT_OFFSET
public static final int HARD_LIMIT
public static final String USERS_TYPE
public static final String USERS_RELATIONSHIP_TYPE
public static final String USER_ACTIVITY_TYPE
public static final String IDENTITIES_TYPE
public static final String SPACES_TYPE
public static final String SPACES_MEMBERSHIP_TYPE
public static final String SPACE_ACTIVITY_TYPE
public static final String ACTIVITIES_TYPE
public static final String COMMENTS_TYPE
public static final String LIKES_TYPE
public static final String KEY
public static final String VALUE
public static final String SUPPORT_TYPE
public static final String ADMIN_GROUP
public static Map<String,Object> buildEntityFromIdentity(org.exoplatform.social.core.identity.model.Identity identity, String restPath, String expand)
identity - the provided identitypublic static Map<String,Object> buildEntityFromSpace(org.exoplatform.social.core.space.model.Space space, String userId, String restPath, String expand)
space - the provided spaceuserId - the user's remote idpublic static Map<String,Object> buildEntityFromSpaceMembership(org.exoplatform.social.core.space.model.Space space, String userId, String type, String restPath, String expand)
space - the provided spaceuserId - the user's remote idtype - membership typepublic static Map<String,Object> buildEntityFromActivity(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, String restPath, String expand)
activity - the provided activityexpand - public static Map<String,Object> buildEntityFromRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship, String restPath, String expand, boolean isSymetric)
relationship - the provided relationshippublic static Map<String,String> getActivityStream(org.exoplatform.social.core.activity.model.ExoSocialActivity activity, org.exoplatform.social.core.identity.model.Identity authentiatedUsed)
authentiatedUsed - the vieweractivity - public static javax.ws.rs.core.MediaType getJsonMediaType()
public static boolean isMemberOfAdminGroup()
public static String getCurrentUsername()
public static org.exoplatform.social.core.identity.model.Identity getCurrentIdentity()
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.