org.exoplatform.social.client.core.service
Class ActivitiesRealtimeListAccessV1Alpha2

java.lang.Object
  extended by org.exoplatform.social.client.core.service.ActivitiesRealtimeListAccessV1Alpha2
All Implemented Interfaces:
ListAccess<RestActivity>, RealtimeListAccess<RestActivity>

public class ActivitiesRealtimeListAccessV1Alpha2
extends Object
implements RealtimeListAccess<RestActivity>

Created by The eXo Platform SAS Author : phuonglm phuonglm@exoplatform.com Jul 5, 2011


Nested Class Summary
static class ActivitiesRealtimeListAccessV1Alpha2.ActivityType
          The activity type.
 
Constructor Summary
ActivitiesRealtimeListAccessV1Alpha2(RestIdentity ownerIdentity, ActivitiesRealtimeListAccessV1Alpha2.ActivityType activityType, QueryParams queryParams)
          The constructor.
 
Method Summary
 ActivitiesRealtimeListAccessV1Alpha2.ActivityType getActivityType()
          Gets the activity type.
 int getNumberOfNewer(RestActivity baseElement)
          Gets the number of newer elements based on the provided element.
 int getNumberOfOlder(RestActivity baseElement)
          Gets the number of older elements based on the provided element.
 RestIdentity getOwnerIdentity()
          Gets the identity.
 int getSize()
          Returns the list size.
 boolean hasNewer(RestActivity baseElement)
          Checks if there is newer elements than the provided element.
 boolean hasOlder(RestActivity baseElement)
          Checks if there is older elements than the provided element.
 RestActivity[] load(int index, int limit)
          Retrieves an array of objects from the list access.
 List<RestActivity> loadAsList(int index, int limit)
          Retrieves a list of objects from the list access.
 RestActivity[] loadNewer(RestActivity baseElement, int limit)
          Loads newer elements based on the provided element.
 List<RestActivity> loadNewerAsList(RestActivity baseElement, int limit)
          Loads newer elements based on the provided element.
 RestActivity[] loadOlder(RestActivity baseElement, int limit)
          Loads older elements based on the provided based element.
 List<RestActivity> loadOlderAsList(RestActivity baseElement, int limit)
          Loads older elements based on the provided based element.
 void setActivityType(ActivitiesRealtimeListAccessV1Alpha2.ActivityType activityType)
          Sets the activity type.
 void setOwnerIdentity(RestIdentity ownerIdentity)
          Sets the identity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivitiesRealtimeListAccessV1Alpha2

public ActivitiesRealtimeListAccessV1Alpha2(RestIdentity ownerIdentity,
                                            ActivitiesRealtimeListAccessV1Alpha2.ActivityType activityType,
                                            QueryParams queryParams)
The constructor.

Parameters:
ownerIdentity -
activityType -
Method Detail

getNumberOfNewer

public int getNumberOfNewer(RestActivity baseElement)
Gets the number of newer elements based on the provided element.

Specified by:
getNumberOfNewer in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the provided based element
Returns:
number of newer elements if any

getNumberOfOlder

public int getNumberOfOlder(RestActivity baseElement)
Gets the number of older elements based on the provided element.

Specified by:
getNumberOfOlder in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the provided element
Returns:
number of older elements if any

hasNewer

public boolean hasNewer(RestActivity baseElement)
                 throws SocialClientLibException
Checks if there is newer elements than the provided element.

Specified by:
hasNewer in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
Returns:
true if there is any newer element, otherwise, false
Throws:
SocialClientLibException

hasOlder

public boolean hasOlder(RestActivity baseElement)
                 throws SocialClientLibException
Checks if there is older elements than the provided element.

Specified by:
hasOlder in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
Returns:
true if there is any older element, otherwise, false
Throws:
SocialClientLibException

loadNewer

public RestActivity[] loadNewer(RestActivity baseElement,
                                int limit)
                         throws SocialClientLibException
Loads newer elements based on the provided element.

Specified by:
loadNewer in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
limit - number of newer elements to load
Returns:
an array of newer elements
Throws:
SocialClientLibException

loadNewerAsList

public List<RestActivity> loadNewerAsList(RestActivity baseElement,
                                          int limit)
                                   throws SocialClientLibException
Loads newer elements based on the provided element.

Specified by:
loadNewerAsList in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
limit - number of newer elements to load
Returns:
a list of newer elements
Throws:
SocialClientLibException

loadOlder

public RestActivity[] loadOlder(RestActivity baseElement,
                                int limit)
                         throws SocialClientLibException
Loads older elements based on the provided based element.

Specified by:
loadOlder in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
limit - number of older elements to load
Returns:
an array of older elements
Throws:
SocialClientLibException

loadOlderAsList

public List<RestActivity> loadOlderAsList(RestActivity baseElement,
                                          int limit)
                                   throws SocialClientLibException
Loads older elements based on the provided based element.

Specified by:
loadOlderAsList in interface RealtimeListAccess<RestActivity>
Parameters:
baseElement - the based element
limit - number of older elements to load
Returns:
a list of older elements
Throws:
SocialClientLibException

getSize

public int getSize()
Returns the list size.

Specified by:
getSize in interface ListAccess<RestActivity>
Returns:
the size

load

public RestActivity[] load(int index,
                           int limit)
                    throws SocialClientLibException

Retrieves an array of objects from the list access.

The index value and the lenght value cannot be negative, and the sum of the index and the length cannot be greater than the list size. Those values are considered as non correct.

Specified by:
load in interface ListAccess<RestActivity>
Parameters:
index - the index
limit - the limit
Returns:
the array
Throws:
SocialClientLibException

loadAsList

public List<RestActivity> loadAsList(int index,
                                     int limit)
                              throws SocialClientLibException
Retrieves a list of objects from the list access.

Specified by:
loadAsList in interface ListAccess<RestActivity>
Returns:
a list
Throws:
SocialClientLibException

getActivityType

public ActivitiesRealtimeListAccessV1Alpha2.ActivityType getActivityType()
Gets the activity type.

Returns:

setActivityType

public void setActivityType(ActivitiesRealtimeListAccessV1Alpha2.ActivityType activityType)
Sets the activity type.

Parameters:
activityType -

getOwnerIdentity

public RestIdentity getOwnerIdentity()
Gets the identity.

Returns:

setOwnerIdentity

public void setOwnerIdentity(RestIdentity ownerIdentity)
Sets the identity.

Parameters:
ownerIdentity -


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