org.exoplatform.social.client.api.service
Interface ActivityService<Activity>

All Superinterfaces:
Service<Activity>
All Known Implementing Classes:
ActivityServiceImplV1Alpha1, ActivityServiceImplV1Alpha2, ActivityServiceImplV1Alpha3

public interface ActivityService<Activity>
extends Service<Activity>

Activity Service.

Since:
May 19, 2011
Author:
hoatle (hoatlevan at gmail dot com)

Method Summary
 RestActivity create(RestActivity newActivity, QueryParams queryParams)
          Create new Activity from current Identity to targetIdentity
 RestComment createComment(Activity existingActivity, RestComment newRestComment)
          Creates a new comment to this activity.
 RestComment deleteComment(RestComment existingRestComment)
          Deletes an existing comment.
 Activity get(String activityId, QueryParams queryParams)
          Gets an existing instance by its activityId and limit the number of comment/like by by input parameter .
 RealtimeListAccess<Activity> getActivityStream(RestIdentity ownerStreamRestIdentity)
          Gets activity stream from an owner stream identity.
 RealtimeListAccess<RestActivity> getActivityStream(RestIdentity restIdentity, QueryParams queryParams)
          Get Activity Stream with input parameter (limit, number of comment, number of like);
 RestComment getComment(String commentId)
          Gets an existing comment by its id.
 RealtimeListAccess<Activity> getConnectionsActivityStream(RestIdentity userRestIdentity)
          Gets all connections' activities aggregated into one stream.
 RealtimeListAccess<RestActivity> getConnectionsActivityStream(RestIdentity restIdentity, QueryParams queryParams)
          Gets all connections' activities aggregated into one stream with input parameter (limit, number of comment, number of like);
 RealtimeListAccess<Activity> getFeedActivityStream(RestIdentity userRestIdentity)
          Gets all activities from a stream owner, his connections and spaces aggregated into one stream.
 RealtimeListAccess<RestActivity> getFeedActivityStream(RestIdentity restIdentity, QueryParams queryParams)
          Gets all activities from a stream owner, his connections and spaces aggregated into one stream with input parameter (limit, number of comment, number of like);
 RealtimeListAccess<Activity> getSpacesActivityStream(RestIdentity userRestIdentity)
          Gets all activities from spaces which a user is a member of that space aggregated into one stream.
 RealtimeListAccess<RestActivity> getSpacesActivityStream(RestIdentity restIdentity, QueryParams queryParams)
          Gets all activities from spaces which a user is a member of that space aggregated into one stream with input parameter (limit, number of comment, number of like);
 RestLike like(Activity existingActivity)
          The authenticate identity likes an existing activity.
 RestLike unlike(Activity existingActivity)
          The authenticated identity unlikes an existing activity.
 
Methods inherited from interface org.exoplatform.social.client.api.service.Service
create, delete, get, update
 

Method Detail

getActivityStream

RealtimeListAccess<Activity> getActivityStream(RestIdentity ownerStreamRestIdentity)
                                               throws SocialClientLibException
Gets activity stream from an owner stream identity. For example:
    RestIdentity demoIdentity = identityService.get("123456789abcdef");
    RealtimeListAccess activityListAccess = activityService.getActivityStream(demoIdentity);
 
or:
   RestIdentity spaceIdentity = new RestIdentityImpl();
   spaceIdentity.setProviderId("space");
   spaceIdentity.setRemoteId("hello_world");
   RealtimeListAccess activityListAccess = activityService.getActivitySream(spaceIdentity);
 

Parameters:
ownerStreamRestIdentity - the owner stream identity, could be a user or space identity.
Returns:
the real time list access
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

getActivityStream

RealtimeListAccess<RestActivity> getActivityStream(RestIdentity restIdentity,
                                                   QueryParams queryParams)
                                                   throws SocialClientLibException
Get Activity Stream with input parameter (limit, number of comment, number of like);

Parameters:
restIdentity -
queryParams -
Returns:
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
1.0.0-alpha2

create

RestActivity create(RestActivity newActivity,
                    QueryParams queryParams)
                    throws SocialClientLibException
Create new Activity from current Identity to targetIdentity

Parameters:
newActivity - Activity
queryParams - the query params
Returns:
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
1.0.0-alpha2

getSpacesActivityStream

RealtimeListAccess<Activity> getSpacesActivityStream(RestIdentity userRestIdentity)
                                                     throws SocialClientLibException
Gets all activities from spaces which a user is a member of that space aggregated into one stream.

Parameters:
userRestIdentity - the associated user identity
Returns:
the real time list access
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

getSpacesActivityStream

RealtimeListAccess<RestActivity> getSpacesActivityStream(RestIdentity restIdentity,
                                                         QueryParams queryParams)
                                                         throws SocialClientLibException
Gets all activities from spaces which a user is a member of that space aggregated into one stream with input parameter (limit, number of comment, number of like);

Parameters:
restIdentity -
queryParams -
Returns:
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
1.0.0-alpha2

getConnectionsActivityStream

RealtimeListAccess<Activity> getConnectionsActivityStream(RestIdentity userRestIdentity)
                                                          throws SocialClientLibException
Gets all connections' activities aggregated into one stream.

Parameters:
userRestIdentity - the associated user identity
Returns:
the real time list access
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

getConnectionsActivityStream

RealtimeListAccess<RestActivity> getConnectionsActivityStream(RestIdentity restIdentity,
                                                              QueryParams queryParams)
                                                              throws SocialClientLibException
Gets all connections' activities aggregated into one stream with input parameter (limit, number of comment, number of like);

Parameters:
restIdentity -
queryParams -
Returns:
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
1.0.0-alpha2

getFeedActivityStream

RealtimeListAccess<Activity> getFeedActivityStream(RestIdentity userRestIdentity)
                                                   throws SocialClientLibException
Gets all activities from a stream owner, his connections and spaces aggregated into one stream.

Parameters:
userRestIdentity - the associated user identity
Returns:
the realtime list access
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

getFeedActivityStream

RealtimeListAccess<RestActivity> getFeedActivityStream(RestIdentity restIdentity,
                                                       QueryParams queryParams)
                                                       throws SocialClientLibException
Gets all activities from a stream owner, his connections and spaces aggregated into one stream with input parameter (limit, number of comment, number of like);

Parameters:
restIdentity -
queryParams -
Returns:
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
1.0.0-alpha2

createComment

RestComment createComment(Activity existingActivity,
                          RestComment newRestComment)
                          throws SocialClientLibException
Creates a new comment to this activity.

Parameters:
existingActivity - the existing activity
newRestComment - the new created comment
Returns:
the created comment
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

getComment

RestComment getComment(String commentId)
                       throws SocialClientLibException
Gets an existing comment by its id.

Parameters:
commentId - the comment id
Returns:
the existing comment with the specified id
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

deleteComment

RestComment deleteComment(RestComment existingRestComment)
                          throws SocialClientLibException
Deletes an existing comment.

Parameters:
existingRestComment - the existing comment
Returns:
the deleted comment
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

like

RestLike like(Activity existingActivity)
              throws SocialClientLibException
The authenticate identity likes an existing activity.

Parameters:
existingActivity - the existing activity
Returns:
the created RestLike instance
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

unlike

RestLike unlike(Activity existingActivity)
                throws SocialClientLibException
The authenticated identity unlikes an existing activity.

Parameters:
existingActivity - the existing activity
Returns:
the deleted RestLike instance.
Throws:
AccessDeniedException
ServiceException
SocialClientLibException

get

Activity get(String activityId,
             QueryParams queryParams)
             throws SocialClientLibException
Gets an existing instance by its activityId and limit the number of comment/like by by input parameter .

Parameters:
activityId - the activityId
queryParams - the query params
Returns:
an existing instance
Throws:
AccessDeniedException
ServiceException
SocialClientLibException
Since:
v1-alpha2


Copyright © 2011-2012 eXo Platform. All Rights Reserved.