|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.contact.DistributionLists
This class represents a distribution list. A distribution list is a grouping of contacts. The distribution list collection may be used to iterate through lists and sub-lists and associated contacts.
The distribution list collection may also be used for searching. The following code segment shows how to reduce the distribution list that are returned in the collection to ones with a particular name and implies sorting:
ContactSession s = ContactSession.getSession(user); DistributionLists lists = s.getDistributionLists(); DistributionListFilter filter = new DistributionListFilter(); filter.setName("Friends"); lists.setFilter(filter); lists.sort(SortOrder.ASCENDING, DistributionListProperty.NAME); Iterator it = lists.lists().iterator(); while(it.hasNext()) { DistributionList dl = (DistributionList) it.next(); ... }
Method Summary | |
DistributionList |
add()
Adds a distribution list to the collection. |
void |
clearFilter()
Clears the distribution list filter for this collection of lists. |
void |
clearSort()
Clears the sorting for this collection of lists. |
int |
getCount()
Gets the number of lists in the collection. |
int |
getCurrentPageNumber()
Gets the number of the current page. |
DistributionList |
getDistributionList(long id)
Gets a distribution list with the given id. |
DistributionListFilter |
getFilter()
Gets the distribution list filter. |
int |
getNextPageNumber()
Gets the number of the next page. |
int |
getPageCount()
Gets the total number of pages in the object for pagination. |
int |
getPageSize()
Gets the number of lists to appear on a single page. |
int |
getPreviousPageNumber()
Gets the number of the previous page. |
int |
getShowingFrom()
Gets the from index. |
int |
getShowingTo()
Gets the to index. |
SortOrder |
getSort()
Gets the sort order. |
DistributionListProperty |
getSortProperty()
Gets the sort property. |
boolean |
isFirstPage()
Checks if current page is the first page. |
boolean |
isLastPage()
Checks if current page is the last page. |
java.util.List |
lists()
Gets the list of all lists the authenticated user has READ access to. |
java.util.List |
lists(int iPageNumber)
Gets the sublist of lists on the specified page number. |
java.util.List |
lists(int iFromIndex,
int iToIndex)
Gets the sublist of lists between the specified iFromIndex and iToIndex . |
void |
setFilter(DistributionListFilter filter)
Sets the distribution list filter. |
void |
setPageSize(int iPageSize)
Sets the number of lists to appear on a single page. |
void |
sort(SortOrder order,
DistributionListProperty property)
Sorts the lists in the collection. |
java.lang.String |
toString()
Returns the string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public DistributionList add() throws java.security.AccessControlException
null
if create failspublic void setFilter(DistributionListFilter filter)
clearFilter()
.null
)public DistributionListFilter getFilter()
null
if no filter is setpublic void clearFilter()
public int getPageSize()
getPageSize
in interface com.compoze.common.IPagination
public void setPageSize(int iPageSize)
setPageSize
in interface com.compoze.common.IPagination
iPageSize
- the number of lists on a single page (must be greater than zero)public int getPageCount()
getPageCount
in interface com.compoze.common.IPagination
public int getShowingFrom()
lists() methods, the from index is returned.
- Specified by:
getShowingFrom
in interface com.compoze.common.IPagination
- Returns:
- the from index or -1 if all lists were returned
- See Also:
lists()
,
lists(int)
,
lists(int, int)
public int getShowingTo()
lists() methods, the to index is returned.
- Specified by:
getShowingTo
in interface com.compoze.common.IPagination
- Returns:
- the from index or -1 if all lists were returned
- See Also:
lists()
,
lists(int)
,
lists(int, int)
public int getCurrentPageNumber()
getCurrentPageNumber
in interface com.compoze.common.IPagination
public int getNextPageNumber()
getNextPageNumber
in interface com.compoze.common.IPagination
public int getPreviousPageNumber()
getPreviousPageNumber
in interface com.compoze.common.IPagination
public boolean isFirstPage()
isFirstPage
in interface com.compoze.common.IPagination
true
if this is the first page; false
otherwisepublic boolean isLastPage()
isLastPage
in interface com.compoze.common.IPagination
true
if this is the last page; false
otherwisepublic java.util.List lists(int iPageNumber)
getPageSize()
.iPageNumber
- the page number (must be greater than zero and less than the total page count)DistributionList
objectsgetPageCount()
public java.util.List lists()
READ
access to.DistributionList
objectspublic java.util.List lists(int iFromIndex, int iToIndex)
iFromIndex
and iToIndex
.iFromIndex
- the from index endpoint (inclusive) of the listiToIndex
- the to index highpoint (exclusive) of the listDistributionList
objectspublic int getCount()
public DistributionList getDistributionList(long id) throws java.security.AccessControlException
id
- the distribution list idnull
if not foundpublic void sort(SortOrder order, DistributionListProperty property)
sortOrder
- the sort orderproperty
- the property to sort bypublic void clearSort()
public SortOrder getSort()
null
if not sorting is imposedpublic DistributionListProperty getSortProperty()
null
if no property setpublic java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |