public interface BridgeConfig
BridgeConfig represents the set of values a portlet can configure for a given bridge instance. Currently, by
spec, the portlet passes most of this configuration to the bridge using PortletContext attributes. The bridge,
in its init() method, is responsible for packaging all this configuration information into a BridgeConfig. It
must then only reference such configuration information from this object. I.e. it no longer makes reference to the
PortletContext attributes. This allows replaceable pieces of the bridge implementation to always have a
consistent object to retrieve configuration information from.| Modifier and Type | Method and Description |
|---|---|
boolean |
doPreventSelfClosingScriptTag()
Gets whether or not the bridge should prevent script tags from being rendered as self-closing in the page HEAD.
|
Map<String,Object> |
getAttributes()
This
Map is a place to put extra (implementation specific) bridge state or anything else whose lifetime
matches this scope. |
String |
getDefaultRenderKitId()
By spec, the portlet can configure the specific renderkit it uses vs others in the app as a Portlet init parameter.
|
Map<String,String> |
getDefaultViewMappings()
Gets the
Map describing the mapping between each supported PortletMode and its default Faces
View (id). |
BridgeEventHandler |
getEventHandler()
Gets the
BridgeEventHandler that the bridge calls to handle any portlet event it processes. |
List<String> |
getExcludedRequestAttributes()
Gets the
List of attributes to be excluded from the bridge's request scope. |
Map<Class<? extends Throwable>,String> |
getFacesErrorViewMappings()
Gets the
Map of Exception classes to Faces views (information taken from web.xml). |
List<String> |
getFacesServletMappings()
Gets the
List of Servlet mappings to the Faces servlet (information taken from web.xml). |
List<String> |
getFacesSuffixes()
gets the
List of the possible suffixes that Faces recognizes as Faces processed targets. |
String |
getLifecycleId() |
BridgeLogger |
getLogger()
Gets the
BridgeLogger that the bridge uses to log diagnostic and warning messages. |
javax.portlet.PortletConfig |
getPortletConfig()
Gets the
PortletConfig object of the portlet that is utilizing this bridge. |
BridgePublicRenderParameterHandler |
getPublicRenderParameterHandler()
Gets the
BridgePublicRenderParameterHandler that the bridge calls to handle post processing recalculations
following the bridge pushing incoming portlet public render parameters to their models. |
Map<String,String> |
getPublicRenderParameterMappings()
Gets the
Map containing the mappings between portlet public render parameter names and a corresponding Faces
EL statement. |
String |
getSessionIdParameterName()
Get the name of the parameter for the session id.
|
String |
getViewIdRenderParameterName()
Gets the name of the parameter used by the bridge to encode the target viewId.
|
String |
getViewIdResourceParameterName()
Gets the name of the parameter used by the bridge to encode the target viewIdwhen encoding a Resource URL.
|
Class<? extends BridgeWriteBehindResponse> |
getWriteBehindRenderResponseWrapper()
Gets the
Class that the bridge uses to wrap the response when rendering a JSP to implement the
Faces implementation specific support for handling interleaved response writing. |
Class<? extends BridgeWriteBehindResponse> |
getWriteBehindResourceResponseWrapper()
Gets the
Class that the bridge uses to wrap the response when rendering a JSP resource to
implement the Faces implementation specific support for handling interleaved response writing. |
boolean |
hasPreserveActionParameters()
Gets whether or not the bridge should carry action parameters forward into subsequent renders.
|
boolean |
hasPublicRenderParameterMappings() |
boolean |
isBridgeScopeEnabledOnAjaxRequest()
Gets whether or not the bridge scope should store the result of an ajax request.
|
boolean |
isBridgeScopePreservedPostRender()
Gets whether or not the bridge scope should be retained at the completion of a Render Request.
|
boolean |
isComponentNamespaceShortened()
Gets whether or not the namespace added to components should be shortened.
|
boolean |
isFacesMessagesStoredOnAjaxRequest()
Gets whether or not Faces Messages should be stored in the bridge scope at the end of an ajax request.
|
boolean |
isJsf22Runtime()
Gets whether or not the bridge is running with a JSF 2.2 runtime.
|
boolean |
isViewParamHandlingDisabled()
Gets whether or not the bridge should disable support for
f:viewParam execution. |
void |
setBridgeScopeEnabledOnAjaxRequest(boolean bridgeScopeEnabledOnAjaxRequest)
Sets whether or not the bridge scope should store the result of an ajax request.
|
void |
setBridgeScopePreservedPostRender(boolean bridgeScopePreservedPostRender)
Sets whether or not the bridge scope should be retained at the end of a Render Request for future use.
|
void |
setComponentNamespaceShortened(boolean componentNamespaceShortened)
Sets whether or not the namespace added to components should be shortened to make them easier to read and reduce
the bandwidth requirements for transport to the browser.
|
void |
setDefaultViewMappings(Map<String,String> defaultMappings)
Sets the
Map describing the mapping between each supported PortletMode and its default Faces
View (id). |
void |
setEventHandler(BridgeEventHandler handler)
Sets the
BridgeEventHandler that the bridge calls to handle any portlet event it processes. |
void |
setExcludedRequestAttributes(List<String> excludedAttributes)
Sets the
List of attributes to be excluded from the bridge's request scope. |
void |
setFacesErrorViewMappings(Map<Class<? extends Throwable>,String> errorViewMappings)
Sets the
Map of Exception classes to Faces views (information taken from web.xml). |
void |
setFacesMessagesStoredOnAjaxRequest(boolean facesMessagesStoredOnAjaxRequest)
Sets whether or not Faces Messages should be stored in the bridge scope at the end of an ajax request.
|
void |
setFacesServletMappings(List<String> mappings)
Sets the
List of Servlet mappings to the Faces servlet (information taken from web.xml). |
void |
setFacesSuffixes(List<String> suffixes)
Sets the
List of the possible suffixes that Faces recognizes as Faces processed targets. |
void |
setJsf22Runtime(boolean jsf22Runtime)
Sets whether or not the bridge is running with a JSF 2.2 runtime.
|
void |
setLifecyleId(String id)
Sets the id of the lifecycle the portlet should use for executing Faces requests.
|
void |
setLogger(BridgeLogger logger)
Sets the
BridgeLogger that the bridge uses to log diagnostic and warning messages. |
void |
setPortletConfig(javax.portlet.PortletConfig config)
Sets the
PortletConfig object of the portlet that is utilizing this bridge. |
void |
setPreserveActionParameters(boolean preserve)
Sets whether or not the bridge should carry action parameters forward into subsequent renders.
|
void |
setPreserveActionParameters(Boolean preserve)
Sets whether or not the bridge should carry action parameters forward into subsequent renders.
|
void |
setPreventSelfClosingScriptTag(boolean preventSelfClosingScriptTag)
Sets whether or not the bridge should prevent script tags from being rendered as self-closing in the page HEAD.
|
void |
setPublicRenderParameterHandler(BridgePublicRenderParameterHandler handler)
Sets the
BridgePublicRenderParameterHandler that the bridge calls to handle post processing recalculations
following the bridge pushing incoming portlet public render parameters to their models. |
void |
setPublicRenderParameterMappings(Map<String,String> prpMappings)
Sets the
Map containing the mappings between portlet public render parameter names and a corresponding Faces
EL statement. |
void |
setSessionIdParameterName(String sessionIdParameterName)
Set the name of the parameter for the session id.
|
void |
setViewIdRenderParameterName(String name)
Sets the name of the parameter used by the bridge to encode the target viewId.
|
void |
setViewIdResourceParameterName(String name)
Sets the name of the parameter used by the bridge to encode the target viewId when encoding a Resource URL.
|
void |
setViewParamHandlingDisabled(boolean viewParamHandlingDisabled)
Sets whether or not the bridge should disable support for
f:viewParam execution. |
void |
setWriteBehindRenderResponseWrapper(Class<? extends BridgeWriteBehindResponse> renderResponseWrapper)
Sets the
Class that the bridge uses to wrap the response when rendering a JSP to implement the
Faces implementation specific support for handling interleaved response writing. |
void |
setWriteBehindResourceResponseWrapper(Class<? extends BridgeWriteBehindResponse> resourceResponseWrapper)
Sets the
Class that the bridge uses to wrap the response when rendering a JSP resource to
implement the Faces implementation specific support for handling interleaved response writing. |
void setPortletConfig(javax.portlet.PortletConfig config)
PortletConfig object of the portlet that is utilizing this bridge.config - the config object.javax.portlet.PortletConfig getPortletConfig()
PortletConfig object of the portlet that is utilizing this bridge.void setDefaultViewMappings(Map<String,String> defaultMappings)
Map describing the mapping between each supported PortletMode and its default Faces
View (id). When the bridge receives a request that isn't directly encoded with the target Faces view (such as the initial
render request), the bridge relies on these default mappings to determine the target. There is one mapping per
PortletMode supported by the portlet (and handled by Faces). The key to the each entry in the map is the
String name of the associated PortletMode;defaultMappings - between each supported PortletMode and the default Faces target.Map<String,String> getDefaultViewMappings()
Map describing the mapping between each supported PortletMode and its default Faces
View (id). When the bridge receives a request that isn't directly encoded with the target Faces view (such as the initial
render request), the bridge relies on these default mappings to determine the target. There is one mapping per
PortletMode supported by the portlet (and handled by Faces). The key to the each entry in the map is the
String name of the associated PortletMode;PortletMode and the default Faces target.void setFacesServletMappings(List<String> mappings)
List of Servlet mappings to the Faces servlet (information taken from web.xml). The
bridge uses these mappings to both detect whether a given URL is handled by Faces or not and to deal with mapping between
viewIds and their underlying resources.mappings - the various servlet mappings for the FacesServlet.List<String> getFacesServletMappings()
List of Servlet mappings to the Faces servlet (information taken from web.xml). The
bridge uses these mappings to both detect whether a given URL is handled by Faces or not and to deal with mapping between
viewIds and their underlying resources.FacesServlet.void setFacesErrorViewMappings(Map<Class<? extends Throwable>,String> errorViewMappings)
Map of Exception classes to Faces views (information taken from web.xml).errorViewMappings - the various exception to jsf view mappings for errorsMap<Class<? extends Throwable>,String> getFacesErrorViewMappings()
Map of Exception classes to Faces views (information taken from web.xml).void setViewIdRenderParameterName(String name)
name - parameter name that holds the bridge encoded target viewId.String getViewIdRenderParameterName()
void setViewIdResourceParameterName(String name)
name - parameter name that holds the bridge encoded target viewId.String getViewIdResourceParameterName()
void setLogger(BridgeLogger logger)
BridgeLogger that the bridge uses to log diagnostic and warning messages.logger - BridgeLogger.BridgeLogger getLogger()
BridgeLogger that the bridge uses to log diagnostic and warning messages.BridgeLogger.void setEventHandler(BridgeEventHandler handler)
BridgeEventHandler that the bridge calls to handle any portlet event it processes.handler - BridgeEventHandler getEventHandler()
BridgeEventHandler that the bridge calls to handle any portlet event it processes.BridgeEventHandlervoid setPublicRenderParameterHandler(BridgePublicRenderParameterHandler handler)
BridgePublicRenderParameterHandler that the bridge calls to handle post processing recalculations
following the bridge pushing incoming portlet public render parameters to their models.handler - BridgePublicRenderParameterHandler getPublicRenderParameterHandler()
BridgePublicRenderParameterHandler that the bridge calls to handle post processing recalculations
following the bridge pushing incoming portlet public render parameters to their models.BridgePublicRenderParameterHandlervoid setPreserveActionParameters(boolean preserve)
preserve - true indicates the action parameters are preserved. false indicates they are
not.void setPreserveActionParameters(Boolean preserve)
preserve - Boolean.TRUE indicates the action parameters are preserved. Boolean.FALSE
indicates they are not.boolean hasPreserveActionParameters()
false.true indicates the action parameters are preserved. false indicates they are not.void setExcludedRequestAttributes(List<String> excludedAttributes)
List of attributes to be excluded from the bridge's request scope. This list includes both the
attributes configured in the portlet.xml (portlet init parameter) as well as any configured in any of this web
application's faces-config.xml(s). It doesn't include any of the predefined attributes as defined by the specification. A
list entry is either the fully qualified name of the attribute that should be excluded or a wildcard terminated (package)
path. In the latter case, all attributes whose names reside in this package (non-recursive) are excluded.excludedAttributes - List of request attribute names that are to be excluded from the bridge's managed
request scope.List<String> getExcludedRequestAttributes()
List of attributes to be excluded from the bridge's request scope. This list includes both the
attributes configured in the portlet.xml (portlet init parameter) as well as any configured in any of this web
application's faces-config.xml(s). It doesn't include any of the predefined attributes as defined by the specification. A
list entry is either the fully qualified name of the attribute that should be excluded or a wildcard terminated (package)
path. In the latter case, all attributes whose names reside in this package (non-recusive) are excluded.List of request attribute names that are to be excluded from the bridge's managed request scope. If
no entries an empty List is returned.void setPublicRenderParameterMappings(Map<String,String> prpMappings)
Map containing the mappings between portlet public render parameter names and a corresponding Faces
EL statement. The Faces EL is expected to resolve to a managed bean property allowing the bridge to push/pull public
render parameter values directly from managed bean properties. This configuration information is extracted from the
faces-config.xml(s).prpMappings - Map. The key is the name of the portlet public render parameter for this
mapping. If prefixed with portletName: the mapping only pertains to the specifically named portlet, otherwise the
mapping pertains to all portlets in the web application. The value is a Faces EL that resolves to a managed bean
property.Map<String,String> getPublicRenderParameterMappings()
Map containing the mappings between portlet public render parameter names and a corresponding Faces
EL statement. The Faces EL is expected to resolve to a managed bean property allowing the bridge to push/pull public
render parameter values directly from managed bean properties. This configuration information is extracted from the
faces-config.xml(s).Map. The key is the name of the portlet public render parameter for this mapping. If
prefixed with portletName: the mapping only pertains to the specifically named portlet, otherwise the mapping
pertains to all portlets in the web application. The value is a Faces EL that resolves to a managed bean
property.boolean hasPublicRenderParameterMappings()
true if the config has public render parameter mappings.void setWriteBehindRenderResponseWrapper(Class<? extends BridgeWriteBehindResponse> renderResponseWrapper)
Class that the bridge uses to wrap the response when rendering a JSP to implement the
Faces implementation specific support for handling interleaved response writing.renderResponseWrapper - Class that implements the BridgeWritebehindResponse interface and is a proper
portlet render response wrapper.Class<? extends BridgeWriteBehindResponse> getWriteBehindRenderResponseWrapper()
Class that the bridge uses to wrap the response when rendering a JSP to implement the
Faces implementation specific support for handling interleaved response writing.Class that implements the BridgeWritebehindResponse interface and is a proper portlet
render response wrapper.void setWriteBehindResourceResponseWrapper(Class<? extends BridgeWriteBehindResponse> resourceResponseWrapper)
Class that the bridge uses to wrap the response when rendering a JSP resource to
implement the Faces implementation specific support for handling interleaved response writing.resourceResponseWrapper - Class that implements the BridgeWritebehindResponse interface and is a proper
portlet resource response wrapper.Class<? extends BridgeWriteBehindResponse> getWriteBehindResourceResponseWrapper()
Class that the bridge uses to wrap the response when rendering a JSP resource to
implement the Faces implementation specific support for handling interleaved response writing.Class that implements the BridgeWritebehindResponse interface and is a proper portlet
resource response wrapper.void setFacesSuffixes(List<String> suffixes)
List of the possible suffixes that Faces recognizes as Faces processed targets. Since JSF
2.0 the default suffix mapping Faces recognizes is a list rather than a single value. This information comes from the
web.xml and is used to help the bridge map between viewIds and their underlying resources.suffixes - List of the suffixes Faces recognizes as Faces targets.List<String> getFacesSuffixes()
List of the possible suffixes that Faces recognizes as Faces processed targets. Since JSF
2.0 the default suffix mapping Faces recognizes is a list rather than a single value. This information comes from the
web.xml and is used to help the bridge map between viewIds and their underlying resources.List of the suffixes Faces recognizes as Faces targets.void setLifecyleId(String id)
id - String getLifecycleId()
LifecycleFactory.DEFAULT_LIFECYCLE is returned.Map<String,Object> getAttributes()
Map is a place to put extra (implementation specific) bridge state or anything else whose lifetime
matches this scope.Map of bridge context scoped attributesString getDefaultRenderKitId()
void setPreventSelfClosingScriptTag(boolean preventSelfClosingScriptTag)
preventSelfClosingScriptTag - Boolean.TRUE indicates the script tag will not be self-closing.
Boolean.FALSE indicates they are self-closing.boolean doPreventSelfClosingScriptTag()
false.true the script tag will not be self-closing. false indicates they are self-closing.void setJsf22Runtime(boolean jsf22Runtime)
jsf22Runtime - Boolean.TRUE indicates we are running with a JSF 2.2 runtime.
Boolean.FALSE indicates we are NOT running with a JSF 2.2 runtime.boolean isJsf22Runtime()
false.true if its a JSF 2.2 runtime. false indicates it is not.void setViewParamHandlingDisabled(boolean viewParamHandlingDisabled)
f:viewParam execution.viewParamHandlingDisabled - Boolean.TRUE indicates f:viewParam will be disabled.
Boolean.FALSE indicates f:viewParam is enabled.boolean isViewParamHandlingDisabled()
f:viewParam execution.true if f:viewParam is disabled. false indicates it is enabled.void setBridgeScopeEnabledOnAjaxRequest(boolean bridgeScopeEnabledOnAjaxRequest)
bridgeScopeEnabledOnAjaxRequest - Boolean.TRUE indicates the data should be stored in the bridge scope.
Boolean.FALSE indicates the data will not be stored in the bridge scope.boolean isBridgeScopeEnabledOnAjaxRequest()
false.true if ajax request data should be retained in bridge scope. false indicates
it should not.void setFacesMessagesStoredOnAjaxRequest(boolean facesMessagesStoredOnAjaxRequest)
isBridgeScopeEnabledOnAjaxRequest is set to true.facesMessagesStoredOnAjaxRequest - Boolean.TRUE indicates the messages should be stored.
Boolean.FALSE indicates the messages should not be stored.boolean isFacesMessagesStoredOnAjaxRequest()
true.true if faces messages should be stored in bridge scope, false indicates they
should not.void setSessionIdParameterName(String sessionIdParameterName)
jsessionid.sessionIdParameterName - String getSessionIdParameterName()
jsessionid.void setBridgeScopePreservedPostRender(boolean bridgeScopePreservedPostRender)
bridgeScopePreservedPostRender - Boolean.TRUE indicates scope should be retained.
Boolean.FALSE indicates scope should be removed.boolean isBridgeScopePreservedPostRender()
false.true if bridge scope should be retained. false indicates it should not.void setComponentNamespaceShortened(boolean componentNamespaceShortened)
componentNamespaceShortened - Boolean.TRUE indicates the namespace should be shortened.
Boolean.FALSE indicates the namespace should not be shortened.boolean isComponentNamespaceShortened()
true.true if the namespace should be shortened. false indicates it should not.Copyright © 2015 JBoss by Red Hat. All rights reserved.