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 Object

Divers utilities related to request paths.

Since:
0.2.1
Author:
Alin Dreghiciu

Method Summary
static String normalizePattern(String pattern)
          Normalizes a pattern = prepends the path with slash (/) if the path does not start with a slash.
static String[] normalizePatterns(String[] urlPatterns)
          Normalize an array of patterns.
static String normalizeResourcePath(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 String normalizeResourcePath(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 String[] normalizePatterns(String[] urlPatterns)
Normalize an array of patterns.

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

normalizePattern

public static String normalizePattern(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.