@AccessLevel(value=EXTERNAL)
public class ClientURI
extends java.lang.Object
This class can be used to construct the value of a
URI_SOURCE_PROPERTY
attribute of a link element in a UIM page.
Additional page parameters can be appended to the link in the UIM by using
CONNECT
child elements as normal.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
COLON
Used to identify a URI as external.
|
protected static java.lang.String |
ENCODING
The encoding to be used when escaping URLs.
|
protected java.lang.String |
pageName
The name of the UIM page to link to.
|
protected java.util.Map<java.lang.String,java.lang.String> |
parameters
A map of the page parameters to be used in the link.
|
protected static java.lang.String |
STRUTS_EXT
The Curam standard struts link extension.
|
Constructor and Description |
---|
ClientURI(java.lang.String pageName)
Creates a new URI link.
|
ClientURI(java.lang.String pageName,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates a new URI link with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
appendParam(java.lang.String name,
java.lang.String value)
Appends a parameter to the URI link.
|
static java.lang.String |
escapeURL(java.lang.String url)
Replaces invalid URL characters with URL escape sequences.
|
java.lang.String |
getInternalURI()
Constructs the URI required to populate an internal
URI_SOURCE_PROPERTY attribute. |
java.lang.String |
getPageName()
Retrieves the UIM page name of the link.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Retrieves a map of the page parameters.
|
java.lang.String |
getURI()
Constructs the URI required to populate a
URI_SOURCE_PROPERTY
attribute. |
protected static final java.lang.String ENCODING
protected static final java.lang.String COLON
protected static final java.lang.String STRUTS_EXT
protected final java.lang.String pageName
protected final java.util.Map<java.lang.String,java.lang.String> parameters
public ClientURI(java.lang.String pageName, java.util.Map<java.lang.String,java.lang.String> parameters)
pageName
- The name of the UIM page, this attribute is mandatory and must not
be null
or empty.parameters
- A map of the page parameters to be used in the link, this
attribute is optional.public ClientURI(java.lang.String pageName)
pageName
- The name of the UIM page, this parameter is mandatory and must not
be null
or empty.public java.lang.String getPageName()
public java.util.Map<java.lang.String,java.lang.String> getParameters()
public java.lang.String getURI()
URI_SOURCE_PROPERTY
attribute.public java.lang.String getInternalURI()
URI_SOURCE_PROPERTY
attribute. This method should only be
invoked on internal application pages. An example of where this should be
used is where an application page needs to be opened in a modal. The
constructed URI takes the form:
"curam:" + Page_Name + "Page.do" + Page_Parameters
Note: This should not be invoked on 'mailto:' pages for example, nor
should it be called directly from resolve scripts.public static java.lang.String escapeURL(java.lang.String url)
url
- The string to process.public void appendParam(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value of the parameter.