org.apache.camel.util
Class URISupport

java.lang.Object
  extended by org.apache.camel.util.URISupport

public final class URISupport
extends Object

URI utilities.

Version:
$Revision: 17248 $

Method Summary
static String createQueryString(Map<Object,Object> options)
           
static URI createRemainingURI(URI originalURI, Map<Object,Object> params)
          Creates a URI from the original URI and the remaining parameters

Used by various Camel components

static URI createURIWithQuery(URI uri, String query)
          Creates a URI with the given query
static String normalizeUri(String uri)
          Normalizes the uri by reordering the parameters so they are sorted and thus we can use the uris for endpoint matching.
static Map<String,Object> parseParameters(URI uri)
           
static Map<String,Object> parseQuery(String uri)
           
static String stripPrefix(String value, String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseQuery

public static Map<String,Object> parseQuery(String uri)
                                     throws URISyntaxException
Throws:
URISyntaxException

parseParameters

public static Map<String,Object> parseParameters(URI uri)
                                          throws URISyntaxException
Throws:
URISyntaxException

createURIWithQuery

public static URI createURIWithQuery(URI uri,
                                     String query)
                              throws URISyntaxException
Creates a URI with the given query

Throws:
URISyntaxException

stripPrefix

public static String stripPrefix(String value,
                                 String prefix)

createQueryString

public static String createQueryString(Map<Object,Object> options)
                                throws URISyntaxException
Throws:
URISyntaxException

createRemainingURI

public static URI createRemainingURI(URI originalURI,
                                     Map<Object,Object> params)
                              throws URISyntaxException
Creates a URI from the original URI and the remaining parameters

Used by various Camel components

Throws:
URISyntaxException

normalizeUri

public static String normalizeUri(String uri)
                           throws URISyntaxException
Normalizes the uri by reordering the parameters so they are sorted and thus we can use the uris for endpoint matching.

Parameters:
uri - the uri
Returns:
the normalized uri
Throws:
URISyntaxException - in thrown if the uri syntax is invalid


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.