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 |
|---|---|
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 |
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() |
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 |
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 |
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 |
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 |
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 |
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.wbrClass - 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.wbrClass - 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()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.