|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.portlet.GenericPortlet com.endeca.portlet.EndecaPortlet
public class EndecaPortlet
Base portlet class for portlets that want to make use of Endeca or Latitude Studio functionality. These include:
<portlet:resourceURL var="javascriptUrl" escapeXml="false"
id="/js/endeca-results-table.js"/>
will retrieve the file "endeca-results-table.js" in the "js" directory under
the root of the portlet bundle.
You can also use resources to generate & return your own dynamic resources.
This is very useful for portlet's that make heavy use of ajax. You can
map a method to respond to a resource id using the \@ProcessResource
annotation.
Example:
<portlet:resourceURL var="javascriptUrl" escapeXml="false"
id="my_ajax_resource"/>
\@ProcessResource(resourceId = "my_ajax_resource")
public void getRecords(ResourceRequest request, ResourceResponse response)
throws PortletException, IOException {
…
}
DataSource
Field Summary | |
---|---|
protected java.lang.String |
apiErrorJSP
|
protected java.lang.String |
dataSourceErrorJSP
|
protected java.lang.String |
dataSourceSelectorJSP
|
protected java.lang.String |
defaultDataSourceId
|
static java.lang.String |
EDIT_JSP
|
protected java.lang.String |
editJSP
|
protected static java.lang.String |
ENDECA_PORTLET_ACTION_REQUEST_ATTRIBUTE
|
static java.lang.String |
HELP_JSP
|
protected java.lang.String |
helpJSP
|
protected static java.lang.String |
MSG_DATASOURCE_BINDING_CHANGED_SUCCESSFULLY
|
protected static java.lang.String |
MSG_DATASOURCE_BINDING_ERROR
|
protected static java.lang.String |
MSG_DATASOURCE_BINDING_UNCHANGED
|
protected static java.lang.String |
MSG_DATASOURCE_BINDING_UNCHANGED_UNSUPPORTED_API
|
protected static java.lang.String |
MSG_NO_DATASOURCE_SELECTED
|
protected static java.lang.String |
MSG_NO_DATASOURCE_SELECTED_FOR_POWER_USER
|
protected static java.lang.String |
MSG_NO_DATASOURCE_SPECIFIED
|
protected static java.lang.String |
MSG_PORTLET_DOES_NOT_SUPPORT_DATASOURCE_API
|
protected static java.lang.String |
MSG_SAVE_PREFS_ERROR
|
protected static java.lang.String |
MSG_SAVE_PREFS_SUCCESS
|
protected java.lang.String |
postRenderJSP
|
protected java.lang.String |
preRenderJSP
|
static java.lang.String |
REQUIRES_DATA_SOURCE
Represents the name of the init-param, in portlet.xml, that controls whether or not this portlet requires a binding to a MDEX data source. |
protected java.lang.String |
requiresDataSource
|
protected static java.util.List<java.lang.String> |
reservedSessionAttributes
|
static java.lang.String |
SUPPORTS_DISCOVERY_SERVICE
Represents the name of the init-param, in portlet.xml, that controls whether or not this portlet supports connections to a MDEX 7 data source via the Endeca Conversation Service, aka the Endeca Discovery Service. |
protected java.lang.String |
supportsDiscoveryService
|
static java.lang.String |
VIEW_JSP
|
protected java.lang.String |
viewJSP
|
Constructor Summary | |
---|---|
EndecaPortlet()
|
Method Summary | |
---|---|
protected boolean |
checkDataSourceRequired()
This method denotes whether or not this portlet requires a binding to a MDEX data source. |
void |
clientDoneLoading(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
|
protected void |
deserializePortletState(EndecaPortletState state,
javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response)
Deserializes portlet state (see notes in serializePortletState(PortletRequest, StateAwareResponse) above) |
void |
doEdit(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
doHelp(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
java.util.Set<java.lang.String> |
getAllPublishedEventNames(javax.portlet.RenderRequest request)
Gets the set of event names that this portlet should trigger. |
protected Container |
getContainer()
|
protected DataSource |
getDataSource(javax.portlet.PortletRequest request)
Retrieve the DataSource instance this portlet listens to. |
protected java.lang.String |
getFirstParam(javax.portlet.PortletRequest request,
java.lang.String key)
|
protected java.lang.String |
getParamValue(javax.portlet.PortletRequest request,
java.lang.String paramName,
java.lang.String defaultVal)
Retrieves the given parameter from the request, returning the given default value if the value in the request is null or the empty string |
java.lang.String |
getPortalContext()
Retrieves the context path for the root portal web application; typically "/". |
protected java.lang.String |
getPortletId(javax.portlet.PortletRequest request)
|
protected UserSession |
getUserSession(javax.portlet.PortletRequest request)
|
protected java.util.List<java.lang.String> |
getValidSessionAttributes()
|
protected java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getViewTransitionParameters(javax.portlet.PortletRequest request)
|
protected void |
handleActionViewRenderRequest(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Subclasses can override this method to perform action specific rendering. |
protected void |
handleBookmarkCreation(Bookmark bookmark,
javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response)
Handles a bookmark's creation for this particular portlet; Default implementation is to store serialized session attributes as a single JSON String |
protected void |
handleBookmarkLoad(Bookmark bookmark,
javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response)
Handles a bookmark load for this particular portlet; Default implementation is to load a JSON String representation of this portlet's state by setting session attributes |
protected ModelAndView |
handleEditRenderRequest(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Builds a ModelAndView object. |
protected ModelAndView |
handleHelpRenderRequest(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Builds a ModelAndView object. |
void |
handlePageTransitionParameters(javax.portlet.ActionRequest request,
java.lang.String viewTransitionPageContext,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
Stores parameters in user session, to make them available after a page transition. |
void |
handlePageTransitionRedirect(javax.portlet.ActionResponse response,
java.lang.String viewTransitionPageContext)
Triggers a redirect on the passed in ActionResponse, to the page specified in the viewTransitionPageContext parameter. |
protected void |
handleQueryException(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
java.lang.Exception e)
|
protected ModelAndView |
handleViewRenderRequest(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Builds a ModelAndView object for a given QueryState . |
protected void |
include(java.lang.String path,
javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
|
void |
init(javax.portlet.PortletConfig config)
|
protected boolean |
isAsync()
|
protected boolean |
isEmpty(java.lang.String value)
|
protected boolean |
isRequestDeferrable(javax.portlet.PortletRequest request)
This method denotes whether or not this portlet supports deferred rendering. |
void |
pageTransition(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Invokes pageTransition(ActionRequest, ActionResponse, String, Map)
with the parameter map from the provided request object, and the target
page transition context retrieved from request parameter with key
Constants.REQUEST_PARAMETER_VIEW_TRANSITION_PAGE_CONTEXT . |
void |
pageTransition(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
java.lang.String viewTransitionPageContext,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
Triggers a page transition. |
protected boolean |
portletSupportsAsync()
This method denotes whether or not this portlet supports async mode. |
protected boolean |
portletSupportsDiscoveryService()
This method denotes whether or not this portlet supports connections to a MDEX 7 data source via the Endeca Conversation Service, aka the Endeca Discovery Service. |
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
void |
processCreateEndecaBookmarkEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
Event-processing method for bookmark creation |
void |
processEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
|
void |
processLoadEndecaBookmarkEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
Event-processing method for bookmark loading |
void |
render(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
resetPortletState(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Children can override this method to reset preferences or variables that are attached to the data source. |
protected EndecaPortletState |
serializePortletState(javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response)
Default implementation of portlet state serialization TODO: Is PortletRequest sufficient here? |
void |
serveResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
Called by the portlet container to allow the portlet to serve a resource request. |
void |
serveResourceSetSessionState(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
Updates arbitrary session attributes in this portlet's session state Request parameters: df.sessionAttributeName: a String that represents the name of the session attribute df.sessionAttributeValue: a String that represents the value of the session attribute df.sessionAttributes: a JSON array of name, value pairs [{"attrName":"attrValue"},...] |
void |
setSavePrefsFailureMessage(javax.portlet.PortletRequest request)
Convenience wrapper for setSavePrefsFailureMessage(PortletRequest, String) . |
void |
setSavePrefsFailureMessage(javax.portlet.PortletRequest request,
java.lang.String failureMessage)
Sets request attributes indicating that the status of saving preferences was an error/failure, and sets a failure message for display. |
protected void |
setSavePrefsStatusMessage(javax.portlet.PortletRequest request,
java.lang.String status,
java.lang.String message)
Sets the save preferences status and message as request attributes based on the passed in parameters. |
void |
setSavePrefsSuccessMessage(javax.portlet.PortletRequest request)
Convenience wrapper for setSavePrefsSuccessMessage(PortletRequest, String) . |
void |
setSavePrefsSuccessMessage(javax.portlet.PortletRequest request,
java.lang.String successMessage)
Sets request attributes indicating that the status of saving preferences was successful, and sets a success message for display. |
void |
triggerEvent(javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response,
javax.xml.namespace.QName name,
java.io.Serializable value)
This method should be used instead of response.setEvent(QName, Serializable), and provides functionality to store event state in the session if required |
void |
triggerEvent(javax.portlet.PortletRequest request,
javax.portlet.StateAwareResponse response,
java.lang.String name,
java.io.Serializable value)
This method should be used instead of response.setEvent(String, Serializable), and provides functionality to store event state in the session if required |
void |
updateDataSourceBinding(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
Methods inherited from class javax.portlet.GenericPortlet |
---|
destroy, doDispatch, doHeaders, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String MSG_PORTLET_DOES_NOT_SUPPORT_DATASOURCE_API
protected static final java.lang.String MSG_NO_DATASOURCE_SELECTED
protected static final java.lang.String MSG_NO_DATASOURCE_SELECTED_FOR_POWER_USER
protected static final java.lang.String MSG_NO_DATASOURCE_SPECIFIED
protected static final java.lang.String MSG_DATASOURCE_BINDING_UNCHANGED
protected static final java.lang.String MSG_DATASOURCE_BINDING_UNCHANGED_UNSUPPORTED_API
protected static final java.lang.String MSG_DATASOURCE_BINDING_CHANGED_SUCCESSFULLY
protected static final java.lang.String MSG_DATASOURCE_BINDING_ERROR
protected static final java.lang.String MSG_SAVE_PREFS_SUCCESS
protected static final java.lang.String MSG_SAVE_PREFS_ERROR
protected static final java.lang.String ENDECA_PORTLET_ACTION_REQUEST_ATTRIBUTE
protected static final java.util.List<java.lang.String> reservedSessionAttributes
public static final java.lang.String VIEW_JSP
public static final java.lang.String EDIT_JSP
public static final java.lang.String HELP_JSP
public static final java.lang.String REQUIRES_DATA_SOURCE
public static final java.lang.String SUPPORTS_DISCOVERY_SERVICE
protected java.lang.String viewJSP
protected java.lang.String editJSP
protected java.lang.String helpJSP
protected java.lang.String requiresDataSource
protected java.lang.String supportsDiscoveryService
protected java.lang.String dataSourceSelectorJSP
protected java.lang.String dataSourceErrorJSP
protected java.lang.String apiErrorJSP
protected java.lang.String preRenderJSP
protected java.lang.String postRenderJSP
protected java.lang.String defaultDataSourceId
Constructor Detail |
---|
public EndecaPortlet()
Method Detail |
---|
public void init(javax.portlet.PortletConfig config) throws javax.portlet.PortletException
init
in interface javax.portlet.Portlet
init
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
public void render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, java.io.IOException
render
in interface javax.portlet.Portlet
render
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, java.io.IOException
doView
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
Checks for {@link DataSource} existence, defers rendering when necessary
(for ajax), and calls out to {@link #handleViewRenderRequest} to get the
{@link ModelAndView} that should be used to render.
Overriding this method is discouraged: most portlets should be able
to accomplish what they need by overriding {@link #handleViewRenderRequest} or {@link #handleActionViewRenderRequest}
protected void handleActionViewRenderRequest(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, java.io.IOException
doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
javax.portlet.PortletException
java.io.IOException
public void doEdit(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, java.io.IOException
doEdit
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
Defers rendering when necessary (for ajax), and calls out to
{@link #handleViewRenderRequest} to get the
{@link ModelAndView} that should be used to render.
Overriding this method is discouraged: most portlets should be able
to accomplish what they need by overriding {@link #handleEditRenderRequest}.
public void doHelp(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, java.io.IOException
doHelp
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
Defers rendering when necessary (for ajax), and calls out to
{@link #handleViewRenderRequest} to get the
{@link ModelAndView} that should be used to render.
Overriding this method is discouraged: most portlets should be able
to accomplish what they need by overriding {@link #handleViewRenderRequest}.
public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, java.io.IOException
processAction
in interface javax.portlet.Portlet
processAction
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
public void serveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws javax.portlet.PortletException, java.io.IOException
RenderResponse.createResourceURL()
method.
The default implementation tries to dispatch to a method
annotated with @ProcessResource
that matches the resource
id or, if no such method is found, tries to find the resource on disk,
and otherwise throws a PortletException
.
Note that the annotated methods needs to be public in order
to be allowed to be called by EndecaPortlet
.
serveResource
in interface javax.portlet.ResourceServingPortlet
serveResource
in class javax.portlet.GenericPortlet
request
- the resource requestresponse
- the resource response
javax.portlet.PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problempublic void clientDoneLoading(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws java.io.IOException
java.io.IOException
protected ModelAndView handleViewRenderRequest(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws java.lang.Exception
ModelAndView
object for a given QueryState
. This method
is intended to be overridden by a subclass-- if it is not, an empty ModelAndView
object will be returned with the viewJSP
specified as the target view.
request
- the RenderRequestresponse
- the RenderResponse
java.lang.Exception
protected ModelAndView handleEditRenderRequest(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws java.lang.Exception
ModelAndView
object. This method
is intended to be overridden by a subclass-- if it is not, an empty ModelAndView
object will be returned with the editJSP
specified as the target view.
request
- the RenderRequestresponse
- the RenderResponse
java.lang.Exception
protected ModelAndView handleHelpRenderRequest(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws java.lang.Exception
ModelAndView
object. This method
is intended to be overridden by a subclass-- if it is not, an empty ModelAndView
object will be returned with the helpJSP
specified as the target view.
request
- the RenderRequestresponse
- the RenderResponse
java.lang.Exception
protected void handleQueryException(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, java.lang.Exception e) throws javax.portlet.PortletException, java.io.IOException
javax.portlet.PortletException
java.io.IOException
public java.util.Set<java.lang.String> getAllPublishedEventNames(javax.portlet.RenderRequest request)
request
- the portlet request
public void processEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws javax.portlet.PortletException, java.io.IOException
processEvent
in interface javax.portlet.EventPortlet
processEvent
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
java.io.IOException
public void triggerEvent(javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response, javax.xml.namespace.QName name, java.io.Serializable value)
request
- response
- name
- value
- public void triggerEvent(javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response, java.lang.String name, java.io.Serializable value)
request
- response
- name
- value
- public void processCreateEndecaBookmarkEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws java.io.IOException, javax.portlet.PortletException
request
- response
-
java.io.IOException
javax.portlet.PortletException
public void processLoadEndecaBookmarkEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws java.io.IOException, javax.portlet.PortletException
request
- response
-
java.io.IOException
javax.portlet.PortletException
protected void handleBookmarkCreation(Bookmark bookmark, javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response) throws javax.portlet.PortletException
bookmark
- request
- response
-
javax.portlet.PortletException
protected void handleBookmarkLoad(Bookmark bookmark, javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response) throws javax.portlet.PortletException
bookmark
- request
- response
-
javax.portlet.PortletException
protected EndecaPortletState serializePortletState(javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response) throws javax.portlet.PortletException
javax.portlet.PortletException
protected void deserializePortletState(EndecaPortletState state, javax.portlet.PortletRequest request, javax.portlet.StateAwareResponse response) throws javax.portlet.PortletException
serializePortletState(PortletRequest, StateAwareResponse)
above)
state
- request
- response
-
javax.portlet.PortletException
public void updateDataSourceBinding(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, java.io.IOException
javax.portlet.PortletException
java.io.IOException
public void resetPortletState(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws javax.portlet.PortletException, java.io.IOException
request
- response
-
javax.portlet.PortletException
java.io.IOException
public void pageTransition(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException
pageTransition(ActionRequest, ActionResponse, String, Map)
with the parameter map from the provided request object, and the target
page transition context retrieved from request parameter with key
Constants.REQUEST_PARAMETER_VIEW_TRANSITION_PAGE_CONTEXT
.
request
- ActionRequest for action invoking the page transition.response
- ActionResponse for action invoking the page transition.
javax.portlet.PortletException
- Exception thrown if page view parameters cannot be saved in
session, or if the redirect cannot be sent on the response.public void pageTransition(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, java.lang.String viewTransitionPageContext, java.util.Map<java.lang.String,java.lang.String[]> parameterMap) throws javax.portlet.PortletException
handlePageTransitionParameters(ActionRequest, String, Map)
,
which stores the parameters in the parameterMap argument in the user session. Parameters in the map are expected
to contain a single String value, even though an array is supported. Only the first item in the array is stored.
Then, handlePageTransitionRedirect(ActionResponse, String)
is invoked, causing the redirect to be triggered
on the response. Note: the first method invocation returns a String, which is a qualified version of the target
page transition context (i.e. either the passed in context, if it's a full path, or a page name appended to the
default context), and this is passed to the redirect page as the redirect target.
request
- ActionRequest for action invoking the page transition.response
- ActionResponse for action invoking the page transition.viewTransitionPageContext
- Target page context for redirect. Full context paths should start with "/", while
relative page paths should not (i.e. "/web/guest/mypage" or "mypage").parameterMap
- Request parameters to store and make available after the page transition. Only single-item
arrays are supported.
javax.portlet.PortletException
- Exception thrown if page view parameters cannot be saved in
session, or if the redirect cannot be sent on the response.public void handlePageTransitionParameters(javax.portlet.ActionRequest request, java.lang.String viewTransitionPageContext, java.util.Map<java.lang.String,java.lang.String[]> parameterMap) throws javax.portlet.PortletException
request
- ActionRequest for action invoking the page transition.viewTransitionPageContext
- Target page context for redirect. Full context paths should start with "/", while
relative page paths should not (i.e. "/web/guest/mypage" or "mypage").parameterMap
- Request parameters to store and make available after the page transition. Only single-item
arrays are supported.
javax.portlet.PortletException
- Exception thrown if page view parameters cannot be saved in
session.public void handlePageTransitionRedirect(javax.portlet.ActionResponse response, java.lang.String viewTransitionPageContext) throws javax.portlet.PortletException
handlePageTransitionParameters(ActionRequest, String, Map)
.
response
- ActionResponse for action invoking the page transition.viewTransitionPageContext
- Target page context for redirect. Context paths should start with "/" (e.g. "/web/guest/mypage").
javax.portlet.PortletException
- Exception thrown if the redirect cannot be sent on the response.protected java.util.List<java.lang.String> getValidSessionAttributes()
public void serveResourceSetSessionState(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws javax.portlet.PortletException
private static ListAny session attributes not in this list will fail.validSessionAttributes = Arrays.asList( new String[]{REQUEST_PARAMETER_FOO, REQUEST_PARAMETER_BAR} ); @Override
protected List
getValidSessionAttributes() { return validSessionAttributes; }
request
- the ResourceRequestresponse
- the ResourceResponse
javax.portlet.PortletException
java.io.IOException
protected UserSession getUserSession(javax.portlet.PortletRequest request) throws UserSessionException
UserSessionException
protected DataSource getDataSource(javax.portlet.PortletRequest request) throws DataSourceException
DataSource
instance this portlet listens to.
request
-
DataSourceException
protected java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String>> getViewTransitionParameters(javax.portlet.PortletRequest request) throws javax.portlet.PortletException
javax.portlet.PortletException
protected boolean isRequestDeferrable(javax.portlet.PortletRequest request)
request
- the current request object
public void setSavePrefsSuccessMessage(javax.portlet.PortletRequest request, java.lang.String successMessage)
setSavePrefsStatusMessage(PortletRequest, String, String)
with a success status.
request
- PortletRequest for the portlet updating preferences.successMessage
- Success message to set as a request attribute. If null, the default
success message is used.public void setSavePrefsSuccessMessage(javax.portlet.PortletRequest request)
setSavePrefsSuccessMessage(PortletRequest, String)
.
Passes null as the second argument, resulting in the default success message
being used.
request
- PortletRequest for the portlet updating preferences.public void setSavePrefsFailureMessage(javax.portlet.PortletRequest request, java.lang.String failureMessage)
setSavePrefsStatusMessage(PortletRequest, String, String)
with a failure status.
request
- PortletRequest for the portlet updating preferences.failureMessage
- Failure message to set as a request attribute. If null, the default
failure message is used.public void setSavePrefsFailureMessage(javax.portlet.PortletRequest request)
setSavePrefsFailureMessage(PortletRequest, String)
.
Passes null as the second argument, resulting in the default success message
being used.
request
- PortletRequest for the portlet updating preferences.protected void setSavePrefsStatusMessage(javax.portlet.PortletRequest request, java.lang.String status, java.lang.String message)
Constants.REQUEST_PARAMETER_SAVE_PREFERENCES_STATUS
and message is stored in the request attribute keyed by Constants.REQUEST_PARAMETER_SAVE_PREFERENCES_STATUS_MSG
.
request
- PortletRequest for the portlet updating preferences.status
- Status to set as a request attribute. Typically, either success or failure.message
- Status message to set as a request attribute.protected java.lang.String getPortletId(javax.portlet.PortletRequest request)
protected Container getContainer()
protected boolean isAsync()
protected boolean portletSupportsAsync()
protected boolean portletSupportsDiscoveryService()
protected boolean checkDataSourceRequired()
portletSupportsDiscoveryService()
public java.lang.String getPortalContext()
protected void include(java.lang.String path, javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws java.io.IOException, javax.portlet.PortletException
java.io.IOException
javax.portlet.PortletException
protected java.lang.String getParamValue(javax.portlet.PortletRequest request, java.lang.String paramName, java.lang.String defaultVal)
protected java.lang.String getFirstParam(javax.portlet.PortletRequest request, java.lang.String key)
protected boolean isEmpty(java.lang.String value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |