com.atlassian.jira.rest.api.expand
Class PagedListWrapper<T,Z>

java.lang.Object
  extended by com.atlassian.jira.rest.api.expand.PagedListWrapper<T,Z>
All Implemented Interfaces:
com.atlassian.plugins.rest.common.expand.entity.ListWrapper<T>
Direct Known Subclasses:
FilterSubscriptionBeanListWrapper, PagedListWrapper.PagedListWrapperDocExample, UserBeanListWrapper, UserJsonBeanListWrapper

public abstract class PagedListWrapper<T,Z>
extends Object
implements com.atlassian.plugins.rest.common.expand.entity.ListWrapper<T>

This ListWrapper will use any expansion varibales to restrict the size of the list. You pass expansion variables like ?expand=sharedUsers[10:40] This returns a ListWrapper with an offset of 10 and an end index of 40. The indexes are bound within the range of size

Since:
v6.0

Nested Class Summary
static class PagedListWrapper.PagedListWrapperDocExample<T,Z>
          This class is for documentation purpose only, do not use it.
 
Field Summary
protected  int endIndex
           
protected  int size
           
protected  int startIndex
           
 
Constructor Summary
PagedListWrapper(int size, int maxResults)
           
 
Method Summary
abstract  T fromBackedObject(Z backedObject)
           
abstract  int getBackingListSize()
           
 com.atlassian.plugins.rest.common.expand.entity.ListWrapperCallback<T> getCallback()
           
 int getMaxResults()
           
abstract  List<Z> getOrderedList(int startIndex, int endIndex)
           
 com.atlassian.plugins.rest.common.expand.entity.ListWrapperCallback<T> getPagingCallback()
           
 int getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size

startIndex

protected int startIndex

endIndex

protected int endIndex
Constructor Detail

PagedListWrapper

public PagedListWrapper(int size,
                        int maxResults)
Method Detail

getSize

public int getSize()

getMaxResults

public int getMaxResults()

getCallback

public final com.atlassian.plugins.rest.common.expand.entity.ListWrapperCallback<T> getCallback()
Specified by:
getCallback in interface com.atlassian.plugins.rest.common.expand.entity.ListWrapper<T>

getPagingCallback

public com.atlassian.plugins.rest.common.expand.entity.ListWrapperCallback<T> getPagingCallback()

fromBackedObject

public abstract T fromBackedObject(Z backedObject)

getBackingListSize

public abstract int getBackingListSize()

getOrderedList

public abstract List<Z> getOrderedList(int startIndex,
                                       int endIndex)


Copyright © 2002-2013 Atlassian. All Rights Reserved.