|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.portlet.GenericURL com.bea.portlet.PostbackURL com.bea.portlet.WindowURL com.bea.portlet.StandalonePortletURL
public class StandalonePortletURL
The StandalonePortletURL
class creates URLs used to render individual portlets. URLs created
by this class preserve contextual information from the originating Portal such as Look and Feel and Theme.
The intended use cases for StandalonePortletURL
involve the rendering of portlets outside of
the main Portal page, such as in popup windows, IFRAMEs or non-Portal HTML pages.
StandalonePortletURL
can be used to produce three main types of URLs:
StandalonePortletURL
will create URLs that reference the "current" portlet. This
type of URL can only be created from within the context of a portlet, and can be used to render the current
portlet in an alternative state or mode. When a StandalonePortletURL
is created with a specific
windowLabel
the URL will reference the specified portlet.
By specifying a portletUri
when creating a StandalonePortletURL
a Detached Portlet
URL will be created. Detached Portlets are external to the Portal, but these mechanisms allow for such portlets
to share some context with the Portal (such as Look and Feel). NOTE that Detached Portlets created from
a customized Desktop will actually reference the primary instance of the portlet.
For all types of StandalonePortletURL
three different levels of decoration can be used:
StandalonePortletURL
will create URLs that cause the referenced portlet to render with
all normal portal decoration, such as titlebars, borders and other expected visual aspects of the portal such
as colors and fonts. When created with the contentOnly
property set to true, the resulting URL will
cause the referenced portlet to be rendered as an HTML fragment consisting of only the content of the portlet.
This level of decoration may be appropriate for use cases that want to incorporate portlet content into an
existing document by using DHTML mechanisms. Alternatively, the contentMode
property can be set
to FRAGMENT
to cause the referenced portlet to be rendered as an HTML document. This level of
decoration may be appropriate for use cases that want to display portlet content in a popup window or an
embedded iframe.
Nested Class Summary | |
---|---|
static class |
StandalonePortletURL.ContentMode
Enumeration of valid values for the KEY_CONTENT_MODE parameter |
Field Summary | |
---|---|
static String |
KEY_ASYNC
|
static String |
KEY_ASYNC_MODE
|
static String |
KEY_CONTENT_MODE
|
static String |
KEY_CONTENT_ONLY
|
static String |
KEY_DEFAULT_WINDOW_ICON
|
static String |
KEY_DEFAULT_WINDOW_ICON_PATH
|
static String |
KEY_DISC_ENABLED
|
static String |
KEY_PORTAL_CONTENT_TYPE
|
static String |
KEY_PORTLET_INSTANCE_LABEL
|
static String |
KEY_SKELETON
|
static String |
KEY_SKELETON_CHROMOSOME
|
static String |
KEY_SKELETON_PATH
|
static String |
KEY_SKIN
|
static String |
KEY_SKIN_CHROMOSOME
|
static String |
KEY_SKIN_PATH
|
static String |
KEY_STREAMING
this attribute is true if the url is to a streamed portlet. |
static String |
KEY_THEME_ALT_SKELETON
|
static String |
KEY_THEME_ALT_SKIN
|
static String |
KEY_THEME_NAME
|
static String |
KEY_THEME_SKELETON_CHROMOSOME
|
static String |
KEY_THEME_SKIN_CHROMOSOME
|
static String |
KEY_TITLE
|
Fields inherited from class com.bea.portlet.GenericURL |
---|
COMMUNITY_ADMIN_FLAG_PARAM, COMMUNITY_DESKTOP, CONTROL_STATE_PARAM, CURRENT_PAGE, domain, DOMAIN, EVENT_NAME_PARAM, httpRequest, httpResponse, httpsDomain, LOADSTATE_PARAM, MODE_PARAM, PAGE_LABEL_PARAM, params, PATH, PORT, PORTLET_SUB_INSTANCE_ID, POSTBACK_PARAM, PREFIX, QUERY_STRING, SCHEME, SECURE_PORT, STATE_PARAM, TREE_OPTIMIZATION_PARAM, URL_COMPRESSION, WINDOW_LABEL_PARAM |
Constructor Summary | |
---|---|
protected |
StandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Constructs a self-referencing StandalonePortletURL. |
protected |
StandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
String windowLabel)
Constructs a StandalonePortletURL that references the specified portlet. |
Method Summary | |
---|---|
void |
addParameter(String name,
String value)
Adds a query parameter to the URL. |
void |
addParameter(String name,
String value,
boolean encodeName,
boolean encodeValue)
Add a parameter. |
Object |
clone()
Returns a deep copy of this StandalonePortletURL. |
static StandalonePortletURL |
createStandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Returns a self-referencing StandalonePortletURL. |
static StandalonePortletURL |
createStandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
String windowLabel)
Returns a StandalonePortletURL that references the specified portlet. |
StandalonePortletURL.ContentMode |
getContentMode()
Returns the content mode used to render the Portlet. |
String |
getPortletServletName()
Deprecated |
boolean |
isContentOnly()
Returns true if only the content of the Portlet will be rendered. |
void |
setContentMode(StandalonePortletURL.ContentMode contentMode)
Sets the content mode used to render the portlet. |
void |
setContentOnly(boolean contentOnly)
Set to true to render only the content of the portlet. |
void |
setDesktopStateShared(boolean desktopStateShared)
Deprecated Provided only for backward compatibility |
void |
setPortletServletName(String servletPortletName)
Deprecated |
void |
setPortletUri(String portletUri)
Used to create a "detached" Portlet. |
void |
setWindowLabel(String windowLabel)
Equivalent to using the three-argument factory method to create a URL. |
Methods inherited from class com.bea.portlet.WindowURL |
---|
createWindowURL, createWindowURL, getWindowLabel, getWindowMode, getWindowState, removeSharedParameter, setWindowMode, setWindowState |
Methods inherited from class com.bea.portlet.PostbackURL |
---|
createPostbackURL |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String KEY_STREAMING
public static final String KEY_TITLE
public static final String KEY_SKELETON
public static final String KEY_SKELETON_PATH
public static final String KEY_SKELETON_CHROMOSOME
public static final String KEY_SKIN
public static final String KEY_SKIN_PATH
public static final String KEY_SKIN_CHROMOSOME
public static final String KEY_DEFAULT_WINDOW_ICON
public static final String KEY_DEFAULT_WINDOW_ICON_PATH
public static final String KEY_THEME_NAME
public static final String KEY_THEME_ALT_SKELETON
public static final String KEY_THEME_ALT_SKIN
public static final String KEY_THEME_SKELETON_CHROMOSOME
public static final String KEY_THEME_SKIN_CHROMOSOME
public static final String KEY_PORTAL_CONTENT_TYPE
public static final String KEY_PORTLET_INSTANCE_LABEL
public static final String KEY_CONTENT_ONLY
public static final String KEY_CONTENT_MODE
public static final String KEY_ASYNC
public static final String KEY_ASYNC_MODE
public static final String KEY_DISC_ENABLED
Constructor Detail |
---|
protected StandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
Constructs a self-referencing StandalonePortletURL.
httpRequest
- HTTP requesthttpResponse
- HTTP responseprotected StandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String windowLabel)
Constructs a StandalonePortletURL that references the specified portlet.
httpRequest
- HTTP requesthttpResponse
- HTTP responsewindowLabel
- window labelMethod Detail |
---|
public static StandalonePortletURL createStandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
Returns a self-referencing StandalonePortletURL.
httpRequest
- HTTP requesthttpResponse
- HTTP response
public static StandalonePortletURL createStandalonePortletURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String windowLabel)
Returns a StandalonePortletURL that references the specified portlet.
httpRequest
- HTTP requesthttpResponse
- HTTP responsewindowLabel
- the window label of the portlet that is the target of this URL.
@Deprecated public void setPortletServletName(String servletPortletName)
@Deprecated public String getPortletServletName()
public boolean isContentOnly()
public void setContentOnly(boolean contentOnly)
contentOnly
- if true
, only the content of the portlet will
be rendered.public StandalonePortletURL.ContentMode getContentMode()
public void setContentMode(StandalonePortletURL.ContentMode contentMode)
StandalonePortletURL.ContentMode.FRAGMENT
if not specified.
contentMode
- the content mode to use when rendering the portlet if only the
portlet's content is to be rendered.setContentOnly(boolean)
@Deprecated public void setDesktopStateShared(boolean desktopStateShared)
public void setWindowLabel(String windowLabel)
This method and the setPortletUri(String)
method are mutually exclusive
setWindowLabel
in class WindowURL
windowLabel
- the window label of the portlet to be the target of this URLcreateStandalonePortletURL(HttpServletRequest, HttpServletResponse, String)
public void setPortletUri(String portletUri)
This method and the setWindowLabel(String)
method are mutually exclusive
portletUri
- Webapp-relative path to the .portlet filepublic Object clone()
Returns a deep copy of this StandalonePortletURL.
clone
in class WindowURL
public void addParameter(String name, String value)
Adds a query parameter to the URL. Multiple values for the same parameter can be set by calling this method multiple times with the same name.
This method URL encodes the parameter name and value.
addParameter
in class GenericURL
name
- the name of the query parameter.value
- the value of the query parameter.public void addParameter(String name, String value, boolean encodeName, boolean encodeValue)
Add a parameter. Multiple values for the same parameter can be set by calling this method multiple times with the same name.
If the encodeName boolean argument is true, this method URL encodes the parameter name. If the encodeValue boolean argument is true, this method URL encodes the parameter value.
addParameter
in class GenericURL
name
- parameter's namevalue
- parameter's valueencodeName
- true if the parameter's name should be encodedencodeValue
- true if the parameter's value should be encoded
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |