com.waveset.util
Class URLBuilder

java.lang.Object
  extended bycom.waveset.util.URLBuilder

public class URLBuilder
extends java.lang.Object


Field Summary
static java.lang.String CNTRY
           
static char EQUALS
           
static java.lang.String LANG
           
static char QUERY
           
static char START
           
 
Constructor Summary
URLBuilder()
           
URLBuilder(java.lang.String url)
           
 
Method Summary
 java.lang.String get(java.lang.String name)
           
 java.lang.String getBase()
           
 java.util.Locale getLocale()
           
 java.lang.String getRaw(java.lang.String name)
           
 void put(java.lang.String name, java.lang.String value)
          Addes a query attribute to the URL.
 void putAll(java.util.Map map)
           
 void putAllRaw(java.util.Map map)
           
 void putRaw(java.lang.String name, java.lang.String value)
          Addes a query attribute to the URL.
 java.lang.String remove(java.lang.String name)
          Removes the element specified by name.
 java.lang.String removeRaw(java.lang.String name)
          Removes the element specified by name.
 void setBase(java.lang.String base)
           
 void setLocale(java.util.Locale locale)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START

public static final char START
See Also:
Constant Field Values

QUERY

public static final char QUERY
See Also:
Constant Field Values

EQUALS

public static final char EQUALS
See Also:
Constant Field Values

LANG

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

CNTRY

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

URLBuilder

public URLBuilder()

URLBuilder

public URLBuilder(java.lang.String url)
Method Detail

put

public void put(java.lang.String name,
                java.lang.String value)
Addes a query attribute to the URL. Name and value are encoded.

Parameters:
name - - the attr
value - - the value

putRaw

public void putRaw(java.lang.String name,
                   java.lang.String value)
Addes a query attribute to the URL. No encoding conversion will take place when the data is added.

Parameters:
name - - the attr
value - - the value

get

public java.lang.String get(java.lang.String name)
Parameters:
name -
Returns:
the query attribute and decodes it on the way out. For both name and value.

getRaw

public java.lang.String getRaw(java.lang.String name)
Parameters:
name -
Returns:
the raw form of the query attribute.

remove

public java.lang.String remove(java.lang.String name)
Removes the element specified by name.

Parameters:
name -
Returns:
any previous value.

removeRaw

public java.lang.String removeRaw(java.lang.String name)
Removes the element specified by name.

Parameters:
name -
Returns:
any previous value.

putAll

public void putAll(java.util.Map map)
Parameters:
map -

putAllRaw

public void putAllRaw(java.util.Map map)
Parameters:
map -

toString

public java.lang.String toString()

getBase

public java.lang.String getBase()
Returns:
Returns the base path of the URL.

setBase

public void setBase(java.lang.String base)
Parameters:
base - Sets the base path of the URL.

getLocale

public java.util.Locale getLocale()
Returns:
Returns the locale.

setLocale

public void setLocale(java.util.Locale locale)
Parameters:
locale - The locale to set.