org.jboss.resteasy.util
Class PathHelper

java.lang.Object
  extended by org.jboss.resteasy.util.PathHelper

public class PathHelper
extends java.lang.Object

A utility class for handling URI template parameters. As the Java regulare expressions package does not handle named groups, this class attempts to simulate that functionality by using groups.

Since:
1.0 Nov 8, 2006
Author:
Ryan J. McDonough, Bill Burke

Field Summary
static java.lang.String URI_PARAM_NAME_REGEX
           
static java.util.regex.Pattern URI_PARAM_PATTERN
           
static java.lang.String URI_PARAM_REGEX
           
static java.lang.String URI_PARAM_REGEX_REGEX
           
static java.lang.String URI_PARAM_WITH_REGEX
           
static java.util.regex.Pattern URI_PARAM_WITH_REGEX_PATTERN
           
static java.lang.String URI_PARAM_WITHOUT_REGEX
           
static java.util.regex.Pattern URI_PARAM_WITHOUT_REGEX_PATTERN
           
static java.util.regex.Pattern URI_TEMPLATE_PATTERN
          A regex pattern that searches for a URI template parameter in the form of {*}
static java.lang.String URI_TEMPLATE_REPLACE_PATTERN
           
 
Constructor Summary
PathHelper()
           
 
Method Summary
static java.lang.String createRegularExpressionFromPathExpression(java.lang.String path)
           
static java.lang.String getEncodedPathInfo(java.lang.String path, java.lang.String contextPath)
           
static void main(java.lang.String[] args)
           
static java.lang.String uriParam(java.lang.String path, java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI_PARAM_NAME_REGEX

public static final java.lang.String URI_PARAM_NAME_REGEX
See Also:
Constant Field Values

URI_PARAM_REGEX_REGEX

public static final java.lang.String URI_PARAM_REGEX_REGEX
See Also:
Constant Field Values

URI_PARAM_REGEX

public static final java.lang.String URI_PARAM_REGEX
See Also:
Constant Field Values

URI_PARAM_WITH_REGEX

public static final java.lang.String URI_PARAM_WITH_REGEX
See Also:
Constant Field Values

URI_PARAM_WITHOUT_REGEX

public static final java.lang.String URI_PARAM_WITHOUT_REGEX
See Also:
Constant Field Values

URI_PARAM_PATTERN

public static final java.util.regex.Pattern URI_PARAM_PATTERN

URI_PARAM_WITH_REGEX_PATTERN

public static final java.util.regex.Pattern URI_PARAM_WITH_REGEX_PATTERN

URI_PARAM_WITHOUT_REGEX_PATTERN

public static final java.util.regex.Pattern URI_PARAM_WITHOUT_REGEX_PATTERN

URI_TEMPLATE_PATTERN

public static final java.util.regex.Pattern URI_TEMPLATE_PATTERN
A regex pattern that searches for a URI template parameter in the form of {*}


URI_TEMPLATE_REPLACE_PATTERN

public static final java.lang.String URI_TEMPLATE_REPLACE_PATTERN
See Also:
Constant Field Values
Constructor Detail

PathHelper

public PathHelper()
Method Detail

createRegularExpressionFromPathExpression

public static java.lang.String createRegularExpressionFromPathExpression(java.lang.String path)

getEncodedPathInfo

public static java.lang.String getEncodedPathInfo(java.lang.String path,
                                                  java.lang.String contextPath)

uriParam

public static java.lang.String uriParam(java.lang.String path,
                                        java.lang.String name,
                                        java.lang.String value)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.