org.wso2.carbon.registry.core.pagination
Class PaginationUtils

java.lang.Object
  extended by org.wso2.carbon.registry.core.pagination.PaginationUtils

public class PaginationUtils
extends Object


Field Summary
static org.apache.commons.logging.Log log
           
 
Constructor Summary
PaginationUtils()
           
 
Method Summary
static void copyPaginationContext(org.apache.axis2.client.ServiceClient serviceClient)
          Copy the pagination context details to ServiceClient.
static int getRowCount(org.apache.axis2.client.ServiceClient client)
           
static PaginationContext initPaginationContext(org.apache.axis2.context.MessageContext messageContext)
          Create PaginationContext from MessageContext
static boolean isPaginationAnnotationFound(String annotation)
          Check the resource get method is paginated or not.
static boolean isPaginationHeadersExist(org.apache.axis2.context.MessageContext messageContext)
          Check the availability of the pagination details in messageContext.
static void setRowCount(org.apache.axis2.context.MessageContext messageContext, String count)
          Set row count to messageContext as property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.commons.logging.Log log
Constructor Detail

PaginationUtils

public PaginationUtils()
Method Detail

copyPaginationContext

public static void copyPaginationContext(org.apache.axis2.client.ServiceClient serviceClient)
                                  throws org.apache.axis2.AxisFault
Copy the pagination context details to ServiceClient.

Parameters:
serviceClient - ServiceClient
Throws:
org.apache.axis2.AxisFault - if failed to pagination details

initPaginationContext

public static PaginationContext initPaginationContext(org.apache.axis2.context.MessageContext messageContext)
Create PaginationContext from MessageContext

Parameters:
messageContext - MessageContext
Returns:
PaginationContext

isPaginationHeadersExist

public static boolean isPaginationHeadersExist(org.apache.axis2.context.MessageContext messageContext)
Check the availability of the pagination details in messageContext.

Parameters:
messageContext - MessageContext
Returns:
true if pagination headers exist.

isPaginationAnnotationFound

public static boolean isPaginationAnnotationFound(String annotation)
Check the resource get method is paginated or not.

Parameters:
annotation - method annotation name
Returns:
true if the method id paginated.

setRowCount

public static void setRowCount(org.apache.axis2.context.MessageContext messageContext,
                               String count)
Set row count to messageContext as property.

Parameters:
messageContext - MessageContext
count - row count for pagination

getRowCount

public static int getRowCount(org.apache.axis2.client.ServiceClient client)
                       throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault


Copyright © 2014 WSO2 Inc. All Rights Reserved.