com.isti.util
Class AbstractQueryStringProcessor

java.lang.Object
  extended by com.isti.util.AbstractQueryStringProcessor
All Implemented Interfaces:
StringConstants

public abstract class AbstractQueryStringProcessor
extends java.lang.Object
implements StringConstants

Abstract class AbstractQueryStringProcessor processes the query string in a URL.

A URL containing a query string is as follows:

scheme://domain/path?query_string

The 'processNameValue' method must be implemented to process the name-value pairs.

See Also:
processNameValue(String, String)

Field Summary
static java.lang.String DEFAULT_NAME_VALUE_PAIR_SERIES_SEPARATOR
          The default name value pair series separator.
static java.lang.String DEFAULT_NAME_VALUE_SEPARATOR
          The default name value separator.
static java.lang.String DEFAULT_QUERY_STRING_SEPARATOR
          The default query string separator.
 
Fields inherited from interface com.isti.util.StringConstants
ALPHA_CAP_CHARS, ALPHA_CHARS, ALPHA_LOW_CHARS, ALPHANUM_CHARS_STRING, ALPHANUMERIC_CHARS, BOOLEAN_FALSE_TEXT, BOOLEAN_TRUE_TEXT, DATE_FORMAT_AMPM_STR, DATE_FORMAT_RFC_822_STR, DATE_FORMAT24_STR, DEFAULT_JAVA_VERSION_STRING, DEFAULT_NULL_STR, DEFAULT_SEP_STR, EFLOAT_CHARS, EMPTY_STRING, FLOAT_CHARS, HEX_ALPHA_CAP_CHARS, HEX_ALPHA_LOW_CHARS, HEX_CHARS, INTEGER_CHARS, INVALID_FILENAME_CHARS, QUOTE_STRING, SIGNED_EFLOAT_CHARS, SIGNED_FLOAT_CHARS, SIGNED_INT_CHARS, SPACE_STRING, TOD_CHARS, WHITE_SPACE_CHARS, WILDCARD_ALL_CHAR, WILDCARD_CHARS, WILDCARD_SINGLE_CHAR
 
Constructor Summary
AbstractQueryStringProcessor()
           
 
Method Summary
 java.lang.String getNameValuePairSeriesSeparator()
          Get the name value pair series separator.
 java.lang.String getNameValueSeparator()
          Get the name value separator.
 java.lang.String getParamsStartText()
          Get the query string separator.
 boolean isDecodeFlag()
          Determines if the code flag is set.
abstract  boolean processNameValue(java.lang.String name, java.lang.String value)
          Process the name value.
 void processQueryString(java.lang.String urlText)
          Process the query string in the URL text.
 void processQueryString(java.net.URL url)
          Process the query string in the URL.
 void setDecodeFlag(boolean decodeFlag)
          Set the decode flag.
 void setNameValuePairSeriesSeparator(java.lang.String nameValuePairSeriesSeparator)
          Set the name value pair series separator.
 void setNameValueSeparator(java.lang.String nameValueSeparator)
          Set the name value separator.
 void setParamsStartText(java.lang.String queryStringSeparator)
          Set the query string separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME_VALUE_PAIR_SERIES_SEPARATOR

public static final java.lang.String DEFAULT_NAME_VALUE_PAIR_SERIES_SEPARATOR
The default name value pair series separator.

See Also:
Constant Field Values

DEFAULT_NAME_VALUE_SEPARATOR

public static final java.lang.String DEFAULT_NAME_VALUE_SEPARATOR
The default name value separator.

See Also:
Constant Field Values

DEFAULT_QUERY_STRING_SEPARATOR

public static final java.lang.String DEFAULT_QUERY_STRING_SEPARATOR
The default query string separator.

See Also:
Constant Field Values
Constructor Detail

AbstractQueryStringProcessor

public AbstractQueryStringProcessor()
Method Detail

getNameValuePairSeriesSeparator

public java.lang.String getNameValuePairSeriesSeparator()
Get the name value pair series separator.

Returns:
the name value pair series separator.

getNameValueSeparator

public java.lang.String getNameValueSeparator()
Get the name value separator.

Returns:
the name value separator.

getParamsStartText

public java.lang.String getParamsStartText()
Get the query string separator.

Returns:
the query string separator.

isDecodeFlag

public boolean isDecodeFlag()
Determines if the code flag is set.

Returns:
true if decoding, false otherwise.

processNameValue

public abstract boolean processNameValue(java.lang.String name,
                                         java.lang.String value)
Process the name value.

Parameters:
name - the name.
value - the value.
Returns:
true if the processing should continue, false otherwise.

processQueryString

public void processQueryString(java.lang.String urlText)
Process the query string in the URL text.

Parameters:
urlText - the URL text.

processQueryString

public void processQueryString(java.net.URL url)
Process the query string in the URL.

Parameters:
url - the URL.

setDecodeFlag

public void setDecodeFlag(boolean decodeFlag)
Set the decode flag.

Parameters:
decodeFlag - true if decoding, false otherwise.

setNameValuePairSeriesSeparator

public void setNameValuePairSeriesSeparator(java.lang.String nameValuePairSeriesSeparator)
Set the name value pair series separator.

Parameters:
the - name value pair series separator.

setNameValueSeparator

public void setNameValueSeparator(java.lang.String nameValueSeparator)
Set the name value separator.

Parameters:
the - name value separator.

setParamsStartText

public void setParamsStartText(java.lang.String queryStringSeparator)
Set the query string separator.

Parameters:
the - query string separator.