com.atlassian.jira.util
Class JiraUrlCodec

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

public class JiraUrlCodec
extends 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 String encode(String value)
          Encodes the value string to a safe url string using the character encoding in the JIRA application properties.
static String encodeWithSpacesAsHexValue(String value)
          Encodes the value string to a safe url string using the character encoding in the JIRA application properties.
 
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 String encode(String value)
Encodes the value string to a safe url string using the character encoding in the JIRA application properties. Spaces are encoded as the '+' character.

Parameters:
value - the String value to encode
Returns:
the url safe encoded string, with spaces as '+'

encodeWithSpacesAsHexValue

public static String encodeWithSpacesAsHexValue(String value)
Encodes the value string to a safe url string using the character encoding in the JIRA application properties. Spaces are encoded as their hex value (%20).

Parameters:
value - the String value to encode
Returns:
the url safe encoded string, with spaces as %20


Copyright © 2002-2009 Atlassian. All Rights Reserved.