org.javaswift.joss.model
Interface PaginationMap

All Known Implementing Classes:
AbstractPaginationMap, AccountPaginationMap, ContainerPaginationMap

public interface PaginationMap

Map for a ListHolder on a list of ListSubject. The map holds a mapping for a page number to a marker, which is used by the interface of the OpenStack API for pagination purposes. The PaginationMap is drawn up in one go, which -- regrettably -- is a necessity because of the marker-mechanism. When the underlying data changes and this needs to be reflected by the client, a new map must be generated.


Method Summary
 String getMarker(Integer page)
          Gets the marker text (ie, the name of the last record of the previous page) for navigating to another page.
 int getNumberOfPages()
          Returns the number of pages
 int getNumberOfRecords()
          Returns the number of records
 int getPageSize()
          Returns the page size
 String getPrefix()
          Returns the prefix which is used to search the records
 

Method Detail

getMarker

String getMarker(Integer page)
Gets the marker text (ie, the name of the last record of the previous page) for navigating to another page. The OpenStack API requires this information (why don't they use a regular offset?).

Parameters:
page - the page to get the appropriate marker for
Returns:
the marker for the required page

getNumberOfPages

int getNumberOfPages()
Returns the number of pages

Returns:
number of pages

getPageSize

int getPageSize()
Returns the page size

Returns:
page size

getNumberOfRecords

int getNumberOfRecords()
Returns the number of records

Returns:
the number of records

getPrefix

String getPrefix()
Returns the prefix which is used to search the records

Returns:
the prefix


Copyright © 2012-2014 42 BV. All Rights Reserved.