org.ops4j.pax.web.service.spi.util
Class Path

java.lang.Object
  extended by org.ops4j.pax.web.service.spi.util.Path

public class Path
extends java.lang.Object

Divers utilities related to request paths.

Since:
0.2.1
Author:
Alin Dreghiciu

Method Summary
static java.lang.String normalizePattern(java.lang.String pattern)
          Normalizes a pattern = prepends the path with slash (/) if the path does not start with a slash.
static java.lang.String[] normalizePatterns(java.lang.String[] urlPatterns)
          Normalize an array of patterns.
static java.lang.String normalizeResourcePath(java.lang.String path)
          Normalize the path for accesing a resource, meaning that will replace consecutive slashes and will remove a leading slash if present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalizeResourcePath

public static java.lang.String normalizeResourcePath(java.lang.String path)
Normalize the path for accesing a resource, meaning that will replace consecutive slashes and will remove a leading slash if present.

Parameters:
path - path to normalize
Returns:
normalized path or the original path if there is nothing to be replaced.

normalizePatterns

public static java.lang.String[] normalizePatterns(java.lang.String[] urlPatterns)
Normalize an array of patterns.

Parameters:
urlPatterns - to mormalize
Returns:
array of nomalized patterns

normalizePattern

public static java.lang.String normalizePattern(java.lang.String pattern)
Normalizes a pattern = prepends the path with slash (/) if the path does not start with a slash.

Parameters:
pattern - to normalize
Returns:
normalized pattern


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.