|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.portal.provider.v2.render.PortletRendererUtil
public class PortletRendererUtil
Contains utilities useful for rendering.
Field Summary | |
---|---|
static int |
BACK_LINK
|
static int |
DESIGN_LINK
|
static int |
EVENT_LINK
|
static int |
LOGIN_LINK
|
static int |
PAGE_LINK
|
static java.lang.String |
PORTLET_PARAMETER_PREFIX
prefix used for url parameters that correspond to private portlet parameters. |
static int |
REQUEST_LINK
|
Constructor Summary | |
---|---|
PortletRendererUtil()
|
Method Summary | |
---|---|
static java.lang.String |
absoluteLink(PortletRenderRequest pr,
java.lang.String relativePath)
Deprecated. use UrlUtils.absoluteLink(PortletRenderRequest, String) |
static java.lang.String |
constructDetailLink(PortletRenderRequest pr,
NameValue[] params,
boolean encodeParams,
boolean replaceParams)
Deprecated. use UrlUtils.constructDetailHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean) |
static java.lang.String |
constructHelpLink(PortletRenderRequest pr,
NameValue[] params,
boolean encodeParams,
boolean replaceParams)
Deprecated. use UrlUtils.constructHelpHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean) |
static java.lang.String |
constructLink(PortletRenderRequest pr,
java.lang.String link,
NameValue[] params,
boolean encodeParams,
boolean replaceParams)
Deprecated. use UrlUtils.constructLink(
PortletRenderRequest, String, NameValue[], boolean, boolean) |
static java.lang.String |
emitHiddenField(java.lang.String name,
java.lang.String value)
Deprecated. use UrlUtils.emitHiddenField(String, String) |
static java.lang.String |
encodeParameter(java.lang.String param,
PortletRenderRequest pr)
Deprecated. use UrlUtils.encodeParameter(String, PortletRenderRequest) |
static java.lang.Object |
getEditData(PortletRenderRequest pr)
Utility for getting the customization data for a particular edit request. |
static java.lang.Object |
getEditDefaultData(PortletRenderRequest pr)
Returns the edit defaults data for a particular edit request. |
static java.lang.String |
getEditFormParameter(PortletRenderRequest pr)
Retrieves the RenderManager defaulted/set customize form action
parameter name. |
static java.lang.String |
getModeName(int mode)
Returns the name of the render mode given its value. |
static java.lang.String |
getModeTitle(PortletRenderRequest request)
gets the default title for a portlet based on the mode being rendered |
static int |
getModeValue(java.lang.String name)
Returns the render mode for the given render mode name. |
static java.lang.String |
getShortTitle(PortletRenderRequest pr)
Retrieves the short title of this portlet. |
static java.lang.String |
getTitle(PortletRenderRequest pr)
Retrieves the title of this portlet. |
static java.lang.String |
htmlFormActionLink(PortletRenderRequest pr,
int linkType)
Deprecated. use UrlUtils.htmlFormActionLink(PortletRenderRequest, int) |
static java.lang.String |
htmlFormActionLink(java.lang.String ref)
Deprecated. use UrlUtils.htmlFormActionLink(String) |
static java.lang.String |
htmlFormHiddenFields(PortletRenderRequest pr,
int linkType)
Deprecated. use UrlUtils.htmlFormHiddenFields(PortletRenderRequest, int) |
static java.lang.String |
htmlFormHiddenFields(java.lang.String ref)
Deprecated. use UrlUtils.htmlFormHiddenFields(String) |
static java.lang.String |
parameterizeLink(PortletRenderRequest pr,
int linkType,
java.lang.String queryString)
Deprecated. use UrlUtils.parameterizeLink(PortletRenderRequest, int, String) |
static java.lang.String |
parameterizeLink(java.lang.String link,
java.lang.String queryString)
Deprecated. use UrlUtils.parameterizeLink(String, String) |
static java.lang.String |
portletParameter(PortletRenderRequest request,
java.lang.String param)
Utility that turns a query string parameter name into fully qualified (unique) name. |
static void |
renderCustomizeFormFooter(PortletRenderRequest request,
java.io.Writer writer)
Deprecated. use PortletContainerRenderer.renderEditFooter() |
static void |
renderCustomizeFormHeader(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String title,
java.lang.String actionParam,
java.lang.String additionalHidden,
java.lang.String helpURL)
Deprecated. use DefaultContainerRenderer.renderEditHeader() |
static void |
renderError(PortletRenderRequest request,
java.io.Writer writer,
java.util.Locale locale,
java.lang.String errorText)
Convenience method to display a single error message using the standard Portal style sheet |
static void |
renderErrorFooter(PortletRenderRequest request,
java.io.Writer writer)
Utility to display a standard footer for error messages. |
static void |
renderErrorHeader(PortletRenderRequest request,
java.io.Writer writer)
Utility to display a standard header before any error text. |
static void |
renderErrorLine(PortletRenderRequest request,
java.io.Writer writer,
java.util.Locale locale,
java.lang.String errorText)
Utility to display a single error message using the standard Portal style sheet. |
static void |
renderInformationFormFooter(PortletRenderRequest request,
java.io.Writer writer)
Deprecated. use DefaultContainerRenderer.renderInformationFormFooter() |
static void |
renderInformationFormHeader(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String formName,
java.lang.String title,
java.lang.String actionParam,
java.lang.String helpURL)
Deprecated. use DefaultContainerRenderer.renderInformationFormHeader() |
static void |
renderPortletFooter(PortletRenderRequest request,
boolean renderCustomize)
Deprecated. use PortletContainerRenderer.renderPortletFooter() |
static void |
renderPortletFooter(PortletRenderRequest request,
java.io.Writer writer)
Deprecated. use PortletContainerRenderer.renderPortletFooter() |
static void |
renderPortletHeader(PortletRenderRequest request,
boolean renderCustomize,
java.lang.String param)
Deprecated. use PortletContainerRenderer.renderPortletHeader() |
static void |
renderPortletHeader(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String title)
Deprecated. use PortletContainerRenderer.renderPortletHeader() |
static void |
renderPortletHeader(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String title,
int renderMode)
Deprecated. use PortletContainerRenderer.renderPortletHeader() |
static void |
renderPortletTitlebar(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String title)
Renders a portlet's titlebar. |
static void |
renderPortletTitlebar(PortletRenderRequest request,
java.io.Writer writer,
java.lang.String title,
int renderMode)
Renders a portlet's titlebar. |
static void |
submitEditData(PortletRenderRequest pr,
java.lang.Object o)
Utility for submitting the customization data for a particular edit request. |
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
public static final java.lang.String PORTLET_PARAMETER_PREFIX
Constructor Detail |
---|
public PortletRendererUtil()
Method Detail |
---|
public static void renderCustomizeFormHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, java.lang.String actionParam, java.lang.String additionalHidden, java.lang.String helpURL) throws java.io.IOException
DefaultContainerRenderer.renderEditHeader()
request
- the portlet render request.writer
- the response writer used to output the customize form header.title
- the to display in the header (titlebar)actionParam
- the name of the hidden field that will hold the value
that indicates which button was clicked. The value is 'OK' if the OK button
was clicked. The value is 'APPLY' if the APPLY button is clickedadditionalHidden
- a String containing the HTML for additional hidden fields
needed by the client.helpURL
- a URL to this customize form's help screen. If null the help link
is not displayed.
java.io.IOException
public static void renderCustomizeFormFooter(PortletRenderRequest request, java.io.Writer writer) throws java.io.IOException
PortletContainerRenderer.renderEditFooter()
request
- the portlet render request.writer
- the response writer used to output the customize form header.
java.io.IOException
public static void renderInformationFormHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String formName, java.lang.String title, java.lang.String actionParam, java.lang.String helpURL) throws java.io.IOException
DefaultContainerRenderer.renderInformationFormHeader()
java.io.IOException
public static void renderInformationFormFooter(PortletRenderRequest request, java.io.Writer writer) throws java.io.IOException
DefaultContainerRenderer.renderInformationFormFooter()
request
- the portlet render request.writer
- the response writer used to output the customize form header.
java.io.IOException
public static void renderPortletHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title) throws java.io.IOException
PortletContainerRenderer.renderPortletHeader()
request
- the portlet render requesttitle
- the titlebar label. If null the portlet's static title is used.
java.io.IOException
public static void renderPortletHeader(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, int renderMode) throws java.io.IOException
PortletContainerRenderer.renderPortletHeader()
request
- the portlet render requesttitle
- the titlebar label. If null the portlet's static title is used.renderMode
- the mode currently being rendered. Used to control
rendering of the title bar so it does not include
active links in preview mode
java.io.IOException
public static void renderPortletFooter(PortletRenderRequest request, java.io.Writer writer) throws java.io.IOException
PortletContainerRenderer.renderPortletFooter()
request
- the portlet render request
java.io.IOException
public static void renderPortletTitlebar(PortletRenderRequest request, java.io.Writer writer, java.lang.String title) throws java.io.IOException
request
- the portlet render requesttitle
- the label that should be displayed as the title. if null then
the method will render the static title retrieved via Portlet.getTitle();
java.io.IOException
public static void renderPortletTitlebar(PortletRenderRequest request, java.io.Writer writer, java.lang.String title, int renderMode) throws java.io.IOException
request
- the portlet render requesttitle
- the label that should be displayed as the title. if null then
the method will render the static title retrieved via Portlet.getTitle();
java.io.IOException
public static void renderPortletHeader(PortletRenderRequest request, boolean renderCustomize, java.lang.String param) throws AccessControlException, java.io.IOException
PortletContainerRenderer.renderPortletHeader()
PortletRenderRequest
. Setting renderCustomize
to false
will give the developer control over rendering the
header for the edit and edit defaults modes. If the
developer chooses to let this method render the customize headers, a
String must be supplied for the action parameter.
request
- a PortletRenderRequest
.renderCustomize
- boolean flag indicating whether or not to render
the header for the customize modes.param
- the name of the action parameter for the customize forms.
AccessControlException
java.io.IOException
public static void renderPortletFooter(PortletRenderRequest request, boolean renderCustomize) throws AccessControlException, java.io.IOException
PortletContainerRenderer.renderPortletFooter()
PortletRenderRequest
. Setting renderCustomize
to false
will give the developer control over rendering the
footer for the edit and edit defaults modes.
request
- a PortletRenderRequest
.renderCustomize
- boolean flag indicating whether or not to render
the footer for the customize modes.
AccessControlException
java.io.IOException
public static java.lang.String parameterizeLink(PortletRenderRequest pr, int linkType, java.lang.String queryString) throws java.lang.IllegalArgumentException
UrlUtils.parameterizeLink(PortletRenderRequest, int, String)
pr
- the request.linkType
- the id for the link we want to parameterize. ID constants are defined
in PortletRendererUtil.queryString
- the parameters to be added in properly encodes queryString form.
the String should begin with the first parameter name not a "?".
java.lang.IllegalArgumentException
public static java.lang.String parameterizeLink(java.lang.String link, java.lang.String queryString)
UrlUtils.parameterizeLink(String, String)
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)
UrlUtils.absoluteLink(PortletRenderRequest, String)
pr
- the PortletRenderRequestrelativePath
- the path we want to make absolutepublic static java.lang.String htmlFormActionLink(java.lang.String ref)
UrlUtils.htmlFormActionLink(String)
ref
- the URI to be transformedpublic static java.lang.String htmlFormActionLink(PortletRenderRequest pr, int linkType) throws java.lang.IllegalArgumentException
UrlUtils.htmlFormActionLink(PortletRenderRequest, int)
pr
- the PortletRenderRequestlinkType
- the link in this request that should be used.
java.lang.IllegalArgumentException
public static java.lang.String htmlFormHiddenFields(PortletRenderRequest pr, int linkType) throws java.lang.IllegalArgumentException
UrlUtils.htmlFormHiddenFields(PortletRenderRequest, int)
pr
- the requestlinkType
- the link to use. Constants representing these types are defined in PortletRendererUtil.
java.lang.IllegalArgumentException
public static java.lang.String htmlFormHiddenFields(java.lang.String ref)
UrlUtils.htmlFormHiddenFields(String)
ref
- the URIpublic static java.lang.String constructDetailLink(PortletRenderRequest pr, NameValue[] params, boolean encodeParams, boolean replaceParams) throws PortletException
UrlUtils.constructDetailHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)
pr
- the render request.params
- an array of NameValue objects representing the
parameter names and associated values. Names cannot be NULLencodeParams
- flag indicating whether the parameter names and values
should be URL encoded using the multibyte URL encoder.
PortletException
public static java.lang.String constructHelpLink(PortletRenderRequest pr, NameValue[] params, boolean encodeParams, boolean replaceParams) throws PortletException
UrlUtils.constructHelpHTMLLink(oracle.portal.provider.v2.render.PortletRenderRequest, oracle.portal.utils.NameValue[], java.lang.String, java.lang.String, boolean, boolean)
pr
- the render request.params
- an array of NameValue objects representing the
parameter names and associated values. Names cannot be NULLencodeParams
- flag indicating whether the parameter names and values
should be URL encoded using the multibyte URL encoder.
PortletException
public static java.lang.String constructLink(PortletRenderRequest pr, java.lang.String link, NameValue[] params, boolean encodeParams, boolean replaceParams) throws java.lang.IllegalArgumentException, java.io.IOException
UrlUtils.constructLink(
PortletRenderRequest, String, NameValue[], boolean, boolean)
pr
- render requestlink
- the link to be parameterizedparams
- array of NameValue 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
java.lang.IllegalArgumentException
java.io.IOException
public static java.lang.String getModeName(int mode) throws java.lang.IllegalArgumentException
mode
- render mode value
java.lang.IllegalArgumentException
public static int getModeValue(java.lang.String name) throws java.lang.IllegalArgumentException
name
- render mode name
java.lang.IllegalArgumentException
public static java.lang.Object getEditData(PortletRenderRequest pr) throws PortletNotFoundException, java.io.IOException, AccessControlException
pr
- the request.
PortletNotFoundException
java.io.IOException
AccessControlException
public static java.lang.Object getEditDefaultData(PortletRenderRequest pr) throws PortletNotFoundException, java.io.IOException, AccessControlException
pr
- the request.
PortletNotFoundException
java.io.IOException
AccessControlException
public static void renderError(PortletRenderRequest request, java.io.Writer writer, java.util.Locale locale, java.lang.String errorText) throws java.io.IOException
java.io.IOException
public static void renderErrorHeader(PortletRenderRequest request, java.io.Writer writer) throws java.io.IOException
renderErrorHeader
and renderErrorLine
java.io.IOException
public static void renderErrorLine(PortletRenderRequest request, java.io.Writer writer, java.util.Locale locale, java.lang.String errorText) throws java.io.IOException
renderErrorHeader()
and
renderErrorFooter()
when you need to display multiple error messages.
java.io.IOException
public static void renderErrorFooter(PortletRenderRequest request, java.io.Writer writer) throws java.io.IOException
renderErrorHeader
and renderErrorLine
java.io.IOException
public static void submitEditData(PortletRenderRequest pr, java.lang.Object o) throws java.io.IOException, AccessControlException
pr
- the request.o
- object holding the customization data.
java.io.IOException
AccessControlException
public static java.lang.String portletParameter(PortletRenderRequest request, java.lang.String param)
request
- the current request.param
- the name of the parameter to be qualified.public static java.lang.String getEditFormParameter(PortletRenderRequest pr)
RenderManager
defaulted/set customize form action
parameter name. If this Portlet does not use RenderManager
as
its PortletRenderer
, null is returned.
pr
- a PortletRenderRequest
public static java.lang.String getTitle(PortletRenderRequest pr) throws AccessControlException
pr
- a PortletRenderRequest
.
AccessControlException
public static java.lang.String getShortTitle(PortletRenderRequest pr) throws AccessControlException
pr
- a PortletRenderRequest
.
null
is returned.
AccessControlException
public static java.lang.String getModeTitle(PortletRenderRequest request)
public static java.lang.String encodeParameter(java.lang.String param, PortletRenderRequest pr) throws java.io.IOException
UrlUtils.encodeParameter(String, PortletRenderRequest)
param
- the parameter to be encodedpr
- PortletRenderRequest object for this request
java.io.IOException
public static java.lang.String emitHiddenField(java.lang.String name, java.lang.String value)
UrlUtils.emitHiddenField(String, String)
name
- the name of the hidden fieldvalue
- the value of the hidden field
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |