Class ConvertedPath
- java.lang.Object
-
- com.atlassian.confluence.servlet.simpledisplay.ConvertedPath
-
public class ConvertedPath extends Object
Encapsulates the result of a path conversion.
-
-
Constructor Summary
Constructors Constructor Description ConvertedPath(String url)
Construct a ConvertedPath which will forward to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.ConvertedPath(String url, PathConversionAction action)
Construct a ConvertedPath which will forward or redirect to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.ConvertedPath(String url, PathConversionAction action, boolean encodeAnchor)
Construct a ConvertedPath which will forward or redirect to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.ConvertedPath(String pathTemplate, VelocityEngineResolver resolver)
Deprecated.since 4.3.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addParameter(String name, String value)
PathConversionAction
getAction()
Map
getParameters()
String
getPath()
String
getPath(Map<String,String[]> queryParameters)
Deprecated.since 6.0.String
getUrl()
-
-
-
Constructor Detail
-
ConvertedPath
public ConvertedPath(String url)
Construct a ConvertedPath which will forward to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.- Parameters:
url
- a url with no query parameters
-
ConvertedPath
public ConvertedPath(String url, PathConversionAction action)
Construct a ConvertedPath which will forward or redirect to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.- Parameters:
url
- a url with no query parametersaction
- the action to take on the new path
-
ConvertedPath
public ConvertedPath(String url, PathConversionAction action, boolean encodeAnchor)
Construct a ConvertedPath which will forward or redirect to (getPath(Map)
) by appending any added parameters as query parameters to the supplied url.- Parameters:
url
- a url with no query parametersaction
- the action to take on the new path
-
ConvertedPath
@Deprecated public ConvertedPath(String pathTemplate, VelocityEngineResolver resolver)
Deprecated.since 4.3. The resolver parameter is no longer necessary. We prefer to construct ConvertedPath by simply appending query parameters rather than rendering VelocityConstruct a ConvertedPath which will forward to (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
-
getUrl
public String getUrl()
-
getAction
public PathConversionAction getAction()
-
getPath
public String getPath()
-
getPath
@Deprecated public String getPath(Map<String,String[]> queryParameters)
Deprecated.since 6.0. queryParameters is always passed null, usegetPath()
instead
-
getParameters
public Map getParameters()
- Returns:
- only the parameters that are added via
addParameter(String, String)
. These parameters will be URL encoded
-
-