com.atlassian.confluence.servlet.simpledisplay
Class ConvertedPath

java.lang.Object
  extended by com.atlassian.confluence.servlet.simpledisplay.ConvertedPath

public class ConvertedPath
extends java.lang.Object

Encapsulates the result of a path conversion.


Constructor Summary
ConvertedPath(java.lang.String url)
          Construct a ConvertedPath which will render (getPath(Map)) by appending any added parameters as query parameters to the supplied url.
ConvertedPath(java.lang.String pathTemplate, VelocityEngineResolver resolver)
          Deprecated. since Confluence 4.3. The resolver parameter is no longer necessary. We prefer to construct ConvertedPath by simply appending query parameters rather than rendering Velocity
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
           
 java.util.Map getParameters()
           
 java.lang.String getPath()
           
 java.lang.String getPath(java.util.Map<java.lang.String,java.lang.String[]> queryParameters)
          Get the converted path with the supplied query parameters also included.
 java.lang.String getUrl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertedPath

public ConvertedPath(java.lang.String url)
Construct a ConvertedPath which will render (getPath(Map)) by appending any added parameters as query parameters to the supplied url.

Parameters:
url - a url with no query parameters

ConvertedPath

@Deprecated
public ConvertedPath(java.lang.String pathTemplate,
                                VelocityEngineResolver resolver)
Deprecated. since Confluence 4.3. The resolver parameter is no longer necessary. We prefer to construct ConvertedPath by simply appending query parameters rather than rendering Velocity

Construct a ConvertedPath which will render (getPath()) by rendering the supplied Velocity template.

Parameters:
pathTemplate - a Velocity template representing a URL.
resolver - the Velocity resolver to be used to render the pathTemplate parameter.
Method Detail

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)

getUrl

public java.lang.String getUrl()

getPath

public java.lang.String getPath()

getPath

public java.lang.String getPath(java.util.Map<java.lang.String,java.lang.String[]> queryParameters)
Get the converted path with the supplied query parameters also included. If the ConvertedPath includes query parameters that are duplicated by those in the queryParameters parameter then those within the ConvertedPath will take precedence (and those supplied will be occluded).

Parameters:
queryParameters -
Returns:
the generated path.

getParameters

public java.util.Map getParameters()
Returns:
only the parameters that are added via addParameter(String, String). These parameters will be URL encoded


Copyright © 2003-2014 Atlassian. All Rights Reserved.