|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.portal.provider.v1.PortletRendererUtil
Contains utilities useful for rendering.
| Field Summary | |
static int |
BACK_LINK
|
static java.lang.String |
CUSTOMIZE_FORM_NAME
|
static int |
DESIGN_LINK
|
static int |
LOGIN_LINK
|
static int |
PAGE_LINK
|
static int |
REQUEST_LINK
|
| Constructor Summary | |
PortletRendererUtil()
|
|
| 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 |
constructDetailLink(PortletRenderRequest pr,
NameValuePair[] params,
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 |
constructHelpLink(PortletRenderRequest pr,
NameValuePair[] params,
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 |
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 |
emitHiddenFields(java.lang.String queryString)
Utility to emit a set of HTML hidden fields based on a query string |
static java.lang.String |
encodeParameter(java.lang.String param,
PortletRenderRequest pr)
Encodes a parameter for inclusion in a URL. |
static java.lang.Object |
getEditData(PortletRenderRequest pr)
Utility for getting the customization 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 |
getURLPrefix(java.lang.String url)
Utility to strip the query parameters from 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)
Encodes the parameters in the query string of the passed URL as hidden form fields. |
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 |
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. |
static java.lang.String |
portletParameter(PortletReference ref,
java.lang.String param)
Utility that turns a query string parameter name into fully qualified (unique) name. |
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#renderPortletFooter() |
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 PortletContainerRenderer#renderPortletHeader() |
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 DefaultContainerRenderer#renderPortletFooter() |
static void |
renderPortletHeader(PortletRenderRequest request,
boolean renderCustomize,
java.lang.String param)
Deprecated. use PortletContainerRenderer.renderPortletHeader(
PortletRenderRequest, ParameterMap) |
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 java.lang.String CUSTOMIZE_FORM_NAME
| 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
PortletContainerRenderer#renderPortletHeader()
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.
public static void renderCustomizeFormFooter(PortletRenderRequest request,
java.io.Writer writer)
throws java.io.IOException
PortletContainerRenderer#renderPortletFooter()
request - the portlet render request.writer - the response writer used to output the customize form header.
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()
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.
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.
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
public static void renderPortletFooter(PortletRenderRequest request,
java.io.Writer writer)
throws java.io.IOException
DefaultContainerRenderer#renderPortletFooter()
request - the portlet render request
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();
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();
public static java.lang.String constructDetailLink(PortletRenderRequest pr,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws PortletException
pr - the render request.params - an array of NameValuePair 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.
public static java.lang.String constructHelpLink(PortletRenderRequest pr,
NameValuePair[] params,
boolean encodeParams,
boolean replaceParams)
throws PortletException
pr - the render request.params - an array of NameValuePair 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.
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
parameterizeLink methodspr - render requestlink - the link to be parameterizedmode - 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 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 PortletRendererUtil.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 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 htmlFormHiddenFields(PortletRenderRequest pr,
int linkType)
throws java.lang.IllegalArgumentException
pr - the requestlinkType - the link to use. Constants representing these types are defined in PortletRendererUtil.public static java.lang.String htmlFormHiddenFields(java.lang.String ref)
ref - the URI
public static java.lang.String getModeName(int mode)
throws java.lang.IllegalArgumentException
mode - render mode value
public static int getModeValue(java.lang.String name)
throws java.lang.IllegalArgumentException
name - render mode name
public static java.lang.Object getEditData(PortletRenderRequest pr)
throws java.io.IOException,
AccessControlException
pr - the request.
public static void renderError(PortletRenderRequest request,
java.io.Writer writer,
java.util.Locale locale,
java.lang.String errorText)
throws java.io.IOException
public static void renderErrorHeader(PortletRenderRequest request,
java.io.Writer writer)
throws java.io.IOException
renderErrorHeader and renderErrorLine
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.
public static void renderErrorFooter(PortletRenderRequest request,
java.io.Writer writer)
throws java.io.IOException
renderErrorHeader and renderErrorLinepublic static java.lang.String getModeTitle(PortletRenderRequest request)
public static void submitEditData(PortletRenderRequest pr,
java.lang.Object o)
throws java.io.IOException,
AccessControlException
pr - the request.o - object holding the customization data.
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 portletParameter(PortletReference ref,
java.lang.String param)
ref - the current portlet reference used to qualify the parameter name.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 void renderPortletHeader(PortletRenderRequest request,
boolean renderCustomize,
java.lang.String param)
throws AccessControlException,
java.io.IOException
PortletContainerRenderer.renderPortletHeader(
PortletRenderRequest, ParameterMap)
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.pr - 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.
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.
public static java.lang.String getTitle(PortletRenderRequest pr)
throws AccessControlException
pr - a PortletRenderRequest.
public static java.lang.String getShortTitle(PortletRenderRequest pr)
throws AccessControlException
pr - a PortletRenderRequest.null
is returned.
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 getURLPrefix(java.lang.String url)
throws java.io.IOException
url - the URL string to be strippedpublic static java.lang.String emitHiddenFields(java.lang.String queryString)
queryString - the list of parameters to be emitted in the form of
a URL query string
public static java.lang.String emitHiddenField(java.lang.String name,
java.lang.String value)
name - the name of the hidden fieldvalue - the value of the hidden field
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||