|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.framework.resource.view.AbstractResourceActionHandler
public abstract class AbstractResourceActionHandler
Provides an abstract base class implementing ResourceActionHandler for custom resource action handlers to be written. This class also provides some utility functions which may be of use when developing a resource action handler.
WebCenter provides two resource action handlers which extend this class:
The resource action handler can be specified in adf-config.xml as follows:
<wpsC:adf-service-config xmlns="http://xmlns.oracle.com/webcenter/framework/service"> <resource-handler class="oracle.webcenter.framework.resource.view.PopUpResourceActionHandler"/> </wpsC:adf-service-config>
If no class is specified, the DefaultResourceActionHandler is used.
The resourceActioned() API can be overridden in the concrete resource action handler to invoke the ADF inline popup or RAH navigation APIs when the resource is actioned. By default, resourceActioned() returns DEFAULT so that the built in ADF inline pop-up behavior can be controlled via the attribute display-as-popup in the <resource-handler> element in adf-config. The ADF inline pop-up is provided by the WebCenter RAH system itself but is disabled by default in WebCenter Portal applications, add the attribute display-as-popup="true" to enable it, or override resourceActioned() to give the handler more control over whether to display the inline popup or perform an RAH navigation.
The display-as-popup value in adf-config.xml can be overridden in a taskflow's usage of RAH in the resourceActionBehavior tag via the useResourcePopup attribute which takes the values: "never", "appDefault" or "always".
WebCenter Service Taskflows can be customized to change this value if it is not appropriate for the specific use case in the Portal application.
This allows complex decisions to be made on a service, referrer or resource basis using a combination of the resourceActioned() API, display-as-popup setting and the resourceActionBehavior useResourcePopup attribute.
When writing a custom ResourceActionHandler, extend this class and implement the launchDialog() method to perform the desired navigation action for the given resource and viewId.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface oracle.webcenter.framework.resource.view.ResourceActionHandler |
---|
ResourceActionHandler.ResourceActionedResult |
Field Summary | |
---|---|
protected static java.lang.String |
DIALOG_RESOURCE_TITLE The constant used in the Dialog parameters to represent the resource title. |
protected static java.lang.String |
DIALOG_TASKFLOW_PARAMETERS_MAP The constant used in the Dialog parameters to represent the Map of task flow parameters. |
protected static java.lang.String |
DIALOG_VIEW_RENDERER The constant used in the Dialog parameters to represent the View Renderer. |
static java.lang.String |
INLINE_POPUP_REFERER Resource Referer used for when the inline ADF resource viewer popup invokes the full screen view of the resource via RAH. |
protected static java.lang.String |
REFRESH_NEEDED Add the boolean value true to the page flow scope using this key to explicitly tell the pageDef of the launching source view to refresh itself so that the view port handling will be done successfully. |
protected static TaskFlowId |
RESOURCE_VIEWER_TASKFLOW_ID The TaskFlow representing the built-in resourceViewer. |
protected static java.lang.String |
RESOURCE_VIEWER_TASKFLOW_LOCAL_ID The id of the built-in resource viewer taskflow which contains a dynamically assigned taskflow used to display the resource view of a service invoked by RAH. |
protected static java.lang.String |
RESOURCE_VIEWER_TASKFLOW_PATH The path to the built-in resource viewer taskflow which contains a dynamically assigned taskflow used to display the resource view of a service invoked by RAH. |
protected static java.lang.String |
URL_PARAM_RESOURCE_ID The URL parameter that represents the resource id. |
protected static java.lang.String |
URL_PARAM_RESOURCE_REFERER The URL parameter that represents the resource referrer. |
protected static java.lang.String |
URL_PARAM_RESOURCE_SCOPE The URL parameter that represents the resource scope. |
protected static java.lang.String |
URL_PARAM_RESOURCE_TYPE The URL parameter that represents the resource type. |
Constructor Summary | |
---|---|
AbstractResourceActionHandler() |
Method Summary | |
---|---|
protected void |
appendURIParameter(java.lang.StringBuilder targetURI, java.lang.String name, java.lang.String value) A utility method which is used to append url parameters to the given targetURI modifying the targetURI by appending either a ? or & followed by the name parameter value and the URL encoded value. |
protected java.util.Map<java.lang.String,java.lang.Object> |
getDialogParams(java.lang.String viewRenderer, java.lang.String resourceTitle, java.util.Map<java.lang.String,java.lang.Object> taskFlowParams) Returns a Map of Strings and objects which may be passed to the dialog after the navigation has occurred. |
protected java.util.Map<java.lang.String,java.lang.Object> |
getTaskFlowParams(ResourceActionRenderContext resource) Returns a Map of task flow parameters which may be passed down to the resource view taskflow after navigation has occurred. |
protected java.util.Map<java.lang.String,java.lang.Object> |
getValueMapParams(ResourceActionRenderContext resource) Returns a Map of the serializable value map parameters which may be added to either the task flow parameters or the dialog parameters as appropriate. |
protected abstract void |
launchDialog(ResourceActionRenderContext resource, java.lang.String viewId) Abstract API which should be implemented by subclasses to perform the navigation action with the given resource and viewId. |
ResourceActionHandler.ResourceActionedResult |
resourceActioned(javax.faces.event.ActionEvent action, ResourceActionRenderContext resource) Override this API to allow the resource action handler to specify whether the resource being actioned will open in the ADF inline popup (where available) or that the resource action handler should be invoked via viewTaskflow(), viewPage(), or viewResourceAsPage() in the RAH class. |
void |
viewPage(ResourceActionRenderContext resource) This is how the handler will implement the viewing of a page, if the service declares its Resource View to be a page. |
void |
viewResourceAsPage(ResourceActionRenderContext resource) This is how the handler will implement the viewing of a resource when interpreted as a page, if the service declares no Resource Views and the service ID is understood to allow for this to happen. |
void |
viewTaskFlow(ResourceActionRenderContext resource, TaskFlowId taskFlowId) This is how the handler will implement the viewing of a task flow, if the service declares its Resource View to be a task flow. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INLINE_POPUP_REFERER
protected static final java.lang.String REFRESH_NEEDED
protected static final java.lang.String DIALOG_TASKFLOW_PARAMETERS_MAP
protected static final java.lang.String DIALOG_VIEW_RENDERER
protected static final java.lang.String DIALOG_RESOURCE_TITLE
protected static final java.lang.String RESOURCE_VIEWER_TASKFLOW_PATH
protected static final java.lang.String RESOURCE_VIEWER_TASKFLOW_LOCAL_ID
protected static final TaskFlowId RESOURCE_VIEWER_TASKFLOW_ID
protected static final java.lang.String URL_PARAM_RESOURCE_ID
protected static final java.lang.String URL_PARAM_RESOURCE_TYPE
protected static final java.lang.String URL_PARAM_RESOURCE_SCOPE
protected static final java.lang.String URL_PARAM_RESOURCE_REFERER
Constructor Detail |
---|
public AbstractResourceActionHandler()
Method Detail |
---|
protected abstract void launchDialog(ResourceActionRenderContext resource, java.lang.String viewId)
serviceId = ResourceActionUtils.normalizeServiceId(resource.getGroupId());
Map<String, Object> taskFlowParams = getTaskFlowParams(resource); Map<String, Object> dialogParams = getDialogParams( resource.getViewRenderer(), resource.getTitle(), taskFlowParams);
Map<String, Object> valueMap = getValueMapParams(resource);
taskFlowParams.putAll(valueMap);
protected void appendURIParameter(java.lang.StringBuilder targetURI, java.lang.String name, java.lang.String value)
targetURI
- the URI to append toname
- the parameter name to appendvalue
- the parameter value to append (this will be encoded by this API).protected java.util.Map<java.lang.String,java.lang.Object> getDialogParams(java.lang.String viewRenderer, java.lang.String resourceTitle, java.util.Map<java.lang.String,java.lang.Object> taskFlowParams)
viewRenderer
- the view renderer usually obtained using resource.getViewRenderer()resourceTitle
- the title of resource being navigated totaskFlowParams
- the Map of parameters to pass to the taskflowprotected java.util.Map<java.lang.String,java.lang.Object> getTaskFlowParams(ResourceActionRenderContext resource)
resource
- The resource being navigated toprotected java.util.Map<java.lang.String,java.lang.Object> getValueMapParams(ResourceActionRenderContext resource)
resource
- The resource being navigated topublic void viewTaskFlow(ResourceActionRenderContext resource, TaskFlowId taskFlowId)
viewTaskFlow
in interface ResourceActionHandler
resource
- The necessary information on how the rendering of the resource will take placetaskFlowId
- The ID of the task flow to be viewedpublic void viewPage(ResourceActionRenderContext resource)
viewPage
in interface ResourceActionHandler
resource
- The necessary information on how the rendering of the resource will take placepublic void viewResourceAsPage(ResourceActionRenderContext resource)
viewResourceAsPage
in interface ResourceActionHandler
resource
- The necessary information on how the rendering of the resource will take placepublic ResourceActionHandler.ResourceActionedResult resourceActioned(javax.faces.event.ActionEvent action, ResourceActionRenderContext resource)
resourceActioned
in interface ResourceActionHandler
action
- The UI ActionEvent objectresource
- The resource being actioned
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |