|
The PDK Java API is part of the Portal Developer Kit on Portal Studio | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.portal.provider.v2.url.UrlUtils
Contains utility methods and constants for urls.
| Field Summary | |
static int |
BACK_LINK
|
static int |
DESIGN_LINK
|
static int |
EVENT_LINK
|
static int |
LOGIN_LINK
|
static int |
PAGE_LINK
|
static int |
REQUEST_LINK
|
| Constructor Summary | |
UrlUtils()
|
|
| Method Summary | |
static java.lang.String |
absoluteLink(PortletRenderRequest pr,
java.lang.String relativePath)
Returns a fully-qualified URI for a path relative to the current request. |
static java.lang.String |
constructDetailHTMLLink(PortletRenderRequest pr,
NameValuePair[] params,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
boolean encodeParams,
boolean replaceParams)
Create a parameterized link for a portlet detail page By default, a portlet can have a single "detail" page that allows you to view portlet information in a full-screen mode. |
static java.lang.String |
constructHelpHTMLLink(PortletRenderRequest pr,
NameValuePair[] params,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
boolean encodeParams,
boolean replaceParams)
Create a parameterized link for a portlet help page By default, a portlet can have a single "help" page that allows you to display help information for your portlet in a full-screen mode. |
static java.lang.String |
constructHTMLLink(PortletRenderRequest pr,
int linkType,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
Generic utility to build a HTML link. |
static java.lang.String |
constructJavascriptLink(PortletRenderRequest pr,
int linkType,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
Generic utility to generate a javascript call that append parameters to a link. |
static java.lang.String |
constructLink(PortletRenderRequest pr,
int linkType,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
Generic utility to append parameters to a link. |
static java.lang.String |
constructLink(PortletRenderRequest pr,
java.lang.String link,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
Generic utility to append parameters to a link. |
static java.lang.String |
emitHiddenField(java.lang.String name,
java.lang.String value)
Utility to emit a single HTML hidden field with a specified name and value. |
static java.lang.String |
encodeParameter(java.lang.String param,
PortletRenderRequest pr)
Encodes a parameter for inclusion in a URL. |
static java.lang.String |
htmlFormActionLink(PortletRenderRequest pr,
int linkType)
Transforms one of the various URIs known to the request into the appropriate form to be used in a FORM action tag. |
static java.lang.String |
htmlFormActionLink(java.lang.String ref)
Transforms a URI into the appropriate form to be used in a FORM action tag. |
static java.lang.String |
htmlFormHiddenFields(PortletRenderRequest pr,
int linkType)
Enables the parameters in the query string to be POSTED when the form is submited. |
static java.lang.String |
htmlFormHiddenFields(PortletRenderRequest pr,
int linkType,
java.lang.String formName)
Enables the parameters in the query string to be POSTED when the form is submited. |
static java.lang.String |
htmlFormHiddenFields(java.lang.String ref)
Encodes the parameters in the query string of the passed URL as hidden form fields. |
static java.lang.String |
htmlFormName(PortletRenderRequest pr,
java.lang.String formWithinPortletName)
Generic utility to construct a unique name for a form on a portlet page The form name is "f" + portletRef + formWithinPortletName eg f73_35680_73_35673_35673 |
static java.lang.String |
parameterizeLink(PortletRenderRequest pr,
int linkType,
java.lang.String queryString)
Adds new parameters to an existing link. |
static java.lang.String |
parameterizeLink(java.lang.String link,
java.lang.String queryString)
Adds new parameters to an existing link. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PAGE_LINK
public static final int DESIGN_LINK
public static final int REQUEST_LINK
public static final int LOGIN_LINK
public static final int BACK_LINK
public static final int EVENT_LINK
| Constructor Detail |
public UrlUtils()
| Method Detail |
public static java.lang.String constructHTMLLink(PortletRenderRequest pr,
int linkType,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws java.lang.IllegalArgumentException,
java.io.IOException
<A onclick=javascriptMethod(params, replaceParams)
otherHtmlAttributes>displayText</A>
otherwise
<A href=link+params otherHtmlAttributes>displayText
</A>
either way the generated HTML links behave in the same way.pr - render requestlinkType - the link to use. Constants representing these types are
defined in UrlUtils.displayText - text displayed for this linkotherHtmlAttributes - other attributes for the HTML link. No need
for pre or end spaces in the string.params - array of NameValuePair objects representing the parametersencodeParams - flag indicating whether parameter names and values
should be encodedreplaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters<A ...>displayText</A>
public static java.lang.String constructJavascriptLink(PortletRenderRequest pr,
int linkType,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws java.lang.IllegalArgumentException,
java.io.IOException
pr - render requestlinkType - the link to use. Constants representing these types
are defined in UrlUtils.params - array of NameValuePair objects representing the parametersencodeParams - flag indicating whether parameter names and values
should be encodedreplaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters
public static java.lang.String htmlFormName(PortletRenderRequest pr,
java.lang.String formWithinPortletName)
pr - render requestformWithinPortletName - There may be more than one form per portlet
this name is used to destinguish between different
forms within a portlet. This may be null or empty
if there is only one form in a portlet.
public static java.lang.String constructLink(PortletRenderRequest pr,
int linkType,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws java.lang.IllegalArgumentException,
java.io.IOException
pr - render requestlinkType - the link to use. Constants representing these types are
defined in UrlUtils.mode - the portlet mode to be associated with this linkparams - array of NameValuePair objects representing the parametersencodeParams - flag indicating whether parameter names and values
should be encodedreplaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters
public static java.lang.String constructLink(PortletRenderRequest pr,
java.lang.String link,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws java.lang.IllegalArgumentException,
java.io.IOException
pr - render requestlink - the link to be parameterizedparams - array of NameValuePair objects representing the parametersencodeParams - flag indicating whether parameter names and values
should be encodedreplaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters
public static java.lang.String htmlFormHiddenFields(PortletRenderRequest pr,
int linkType)
throws java.lang.IllegalArgumentException
pr - the requestlinkType - the link to use. Constants representing these
types are defined in UrlUtils.formName - unique name of a form within a page. Use htmlFormName()
to generate this name.
public static java.lang.String htmlFormHiddenFields(PortletRenderRequest pr,
int linkType,
java.lang.String formName)
throws java.lang.IllegalArgumentException
pr - the requestlinkType - the link to use. Constants representing these types
are defined in PortletRendererUtil.formName - unique name of a form within a page. Use htmlFormName()
to generate this name.public static java.lang.String htmlFormHiddenFields(java.lang.String ref)
ref - the URI
public static java.lang.String emitHiddenField(java.lang.String name,
java.lang.String value)
name - the encoded name of the hidden fieldvalue - the encoded value of the hidden field
public static java.lang.String encodeParameter(java.lang.String param,
PortletRenderRequest pr)
throws java.io.IOException
param - the parameter to be encodedpr - PortletRenderRequest object for this request
public static java.lang.String parameterizeLink(PortletRenderRequest pr,
int linkType,
java.lang.String queryString)
throws java.lang.IllegalArgumentException
pr - the request.linkType - the id for the link we want to parameterize.
ID constants are defined IN UrlUtilsqueryString - the parameters to be added in properly encodes
queryString form. the String should begin with the first parameter
name not a "?".
public static java.lang.String parameterizeLink(java.lang.String link,
java.lang.String queryString)
link - the link to add parameters to.queryString - the parameters to be added in properly encodes
queryString form. The String should begin with the first parameter
name not a "?".
public static java.lang.String absoluteLink(PortletRenderRequest pr,
java.lang.String relativePath)
pr - the PortletRenderRequestrelativePath - the path we want to make absolutepublic static java.lang.String htmlFormActionLink(java.lang.String ref)
ref - the URI to be transformed
public static java.lang.String htmlFormActionLink(PortletRenderRequest pr,
int linkType)
throws java.lang.IllegalArgumentException
pr - the PortletRenderRequestlinkType - the link in this request that should be used.
public static java.lang.String constructDetailHTMLLink(PortletRenderRequest pr,
NameValuePair[] params,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
boolean encodeParams,
boolean replaceParams)
throws PortletException,
java.io.IOException
pr - the render request.params - an array of NameValuePair objects representing the
parameter names and associated values. Names cannot be NULLdisplayText - text displayed for this linkotherHtmlAttributes - other attributes for the HTML link. No need
for pre or end spaces in the string.encodeParams - flag indicating whether the parameter names and values
should be URL encoded using the multibyte URL encoder.replaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters
public static java.lang.String constructHelpHTMLLink(PortletRenderRequest pr,
NameValuePair[] params,
java.lang.String displayText,
java.lang.String otherHtmlAttributes,
boolean encodeParams,
boolean replaceParams)
throws PortletException,
java.io.IOException
pr - the render request.params - an array of NameValuePair objects representing the
parameter names and associated values. Names cannot be NULLdisplayText - text displayed for this linkotherHtmlAttributes - other attributes for the HTML link. No need
for pre or end spaces in the string.encodeParams - flag indicating whether the parameter names and values
should be URL encoded using the multibyte URL encoder.replaceParams - flag indicating whether parameters contained in the
params array should replace existing parameters of
the same name. true = replace or overwrite existing
parameters. false = simply add parameters
|
The PDK Java API is part of the Portal Developer Kit on Portal Studio | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||