aerogear-controller 1.0.1

org.jboss.aerogear.controller.router.rest.pagination
Class RequestPathParser

java.lang.Object
  extended by org.jboss.aerogear.controller.router.rest.pagination.RequestPathParser

public class RequestPathParser
extends Object

RequestPathParser is able to replace, or add query parameters related to pagination.


Field Summary
private  PaginationInfo pgInfo
           
private  String requestPath
           
 
Constructor Summary
RequestPathParser(PaginationInfo paginationInfo, String requestPath)
           
 
Method Summary
private  boolean paramMissingFromQueryPath(int idx)
           
 String replace(int offset, int limit)
          Replaces the offset and limit for the current request.
private  String replaceParam(String paramName, String paramValue, String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pgInfo

private final PaginationInfo pgInfo

requestPath

private final String requestPath
Constructor Detail

RequestPathParser

public RequestPathParser(PaginationInfo paginationInfo,
                         String requestPath)
Method Detail

replace

public String replace(int offset,
                      int limit)
Replaces the offset and limit for the current request.

Parameters:
offset - the new offset value.
limit - the new limit value.
Returns:
String the updated request url, containing the full url with query string.

replaceParam

private String replaceParam(String paramName,
                            String paramValue,
                            String path)

paramMissingFromQueryPath

private boolean paramMissingFromQueryPath(int idx)

aerogear-controller 1.0.1

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.