org.apache.shindig.social.opensocial.spi
Class CollectionOptions

java.lang.Object
  extended by org.apache.shindig.social.opensocial.spi.CollectionOptions
Direct Known Subclasses:
VirtualOrganizationCollectionOptions

public class CollectionOptions
extends Object

Data structure representing many of the RPC/REST requests we receive.


Constructor Summary
CollectionOptions()
           
CollectionOptions(RequestItem request)
           
 
Method Summary
 boolean equals(Object o)
           
 String getFilter()
           This filter can be any field of the object being filtered or the special js filters, hasApp or topFriends.
 FilterOperation getFilterOperation()
           
 String getFilterValue()
          Where a field filter has been specified (ie a non special filter) then this is the value of the filter.
 int getFirst()
          When paginating, the index of the first item to fetch.
 int getMax()
          The maximum number of items to fetch; defaults to 20.
 String getSortBy()
          This sortBy can be any field of the object being sorted or the special js sort of topFriends.
 SortOrder getSortOrder()
           
 Date getUpdatedSince()
           
 int hashCode()
           
 void setFilter(String filter)
           
 void setFilterOperation(FilterOperation filterOperation)
           
 void setFilterValue(String filterValue)
           
 void setFirst(int first)
           
 void setMax(int max)
           
 void setSortBy(String sortBy)
           
 void setSortOrder(SortOrder sortOrder)
           
 void setUpdatedSince(Date updatedSince)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionOptions

public CollectionOptions()

CollectionOptions

public CollectionOptions(RequestItem request)
Method Detail

getSortBy

public String getSortBy()
This sortBy can be any field of the object being sorted or the special js sort of topFriends.

Returns:
The field to sort by

setSortBy

public void setSortBy(String sortBy)

getSortOrder

public SortOrder getSortOrder()

setSortOrder

public void setSortOrder(SortOrder sortOrder)

getFilter

public String getFilter()

This filter can be any field of the object being filtered or the special js filters, hasApp or topFriends. Other special Filters are

all
Retrieves all friends
hasApp
Retrieves all friends with any data for this application.
'topFriends
Retrieves only the user's top friends.
isFriendsWith
Will filter the people requested by checking if they are friends with the given idSpec. Expects a filterOptions parameter to be passed with the following fields defined: - idSpec The idSpec that each person must be friends with.

Returns:
The field to filter by

setFilter

public void setFilter(String filter)

getFilterOperation

public FilterOperation getFilterOperation()

setFilterOperation

public void setFilterOperation(FilterOperation filterOperation)

getFilterValue

public String getFilterValue()
Where a field filter has been specified (ie a non special filter) then this is the value of the filter. The exception is the isFriendsWith filter where this contains the value of the id who the all the results need to be friends with.

Returns:
the filter value

setFilterValue

public void setFilterValue(String filterValue)

getFirst

public int getFirst()
When paginating, the index of the first item to fetch.

Returns:
the value of first

setFirst

public void setFirst(int first)

getMax

public int getMax()
The maximum number of items to fetch; defaults to 20. If set to a larger number, a container may honor the request, or may limit the number to a container-specified limit of at least 20.

Returns:
the value of max

setMax

public void setMax(int max)

getUpdatedSince

public Date getUpdatedSince()

setUpdatedSince

public void setUpdatedSince(Date updatedSince)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2012. All Rights Reserved.