com.atlassian.jira.util
Class JiraUrlCodec

java.lang.Object
  extended by com.atlassian.jira.util.JiraUrlCodec

public class JiraUrlCodec
extends java.lang.Object

Class to wrap around the encoding of query strings. This has ordinarily been done by using the JIRA encoding.


Constructor Summary
JiraUrlCodec()
           
 
Method Summary
static java.lang.String decode(java.lang.String value)
          URL decode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding.
static java.lang.String decode(java.lang.String value, java.lang.String encoding)
          URL decode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding.
static java.lang.String encode(java.lang.String value)
          URL encode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding.
static java.lang.String encode(java.lang.String value, boolean spacesEncodedasHexValue)
          URL encode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding.
static java.lang.String encode(java.lang.String value, java.lang.String encoding)
          URL encode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding.
static java.lang.String encode(java.lang.String value, java.lang.String encoding, boolean spacesEncodedasHexValue)
          URL encode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraUrlCodec

public JiraUrlCodec()
Method Detail

encode

public static java.lang.String encode(java.lang.String value,
                                      java.lang.String encoding,
                                      boolean spacesEncodedasHexValue)
URL encode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding.

Parameters:
value - the value to encode.
encoding - the character encoding to use
spacesEncodedasHexValue - if true spaces are encoded with the the hex value '%20', otherwise if false then the character '+'.
Returns:
the encoded value.

encode

public static java.lang.String encode(java.lang.String value,
                                      java.lang.String encoding)
URL encode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding. Spaces are encoded as the '+' character.

Parameters:
value - the value to encode.
encoding - the character encoding to use
Returns:
the encoded value.

encode

public static java.lang.String encode(java.lang.String value)
URL encode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding. Spaces are encoded as the '+' character.

Parameters:
value - the value to encode.
Returns:
the encoded value.

encode

public static java.lang.String encode(java.lang.String value,
                                      boolean spacesEncodedasHexValue)
URL encode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding.

Parameters:
spacesEncodedasHexValue - if true spaces are encoded with the the hex value '%20', otherwise if false then the character '+'.
value - the value to encode.
Returns:
the encoded value.

decode

public static java.lang.String decode(java.lang.String value,
                                      java.lang.String encoding)
URL decode the passed value using the passed character encoding, or if the encoding doesn't exist, the system encoding.

Parameters:
value - the value to decode.
encoding - the character encoding to use
Returns:
the decoded value.

decode

public static java.lang.String decode(java.lang.String value)
URL decode the passed value using the configured JIRA character encoding, or if the encoding doesn't exist, the system encoding.

Parameters:
value - the value to decode.
Returns:
the decoded value.


Copyright © 2002-2010 Atlassian. All Rights Reserved.