public abstract class ViewHandlerWrapper extends ViewHandler implements FacesWrapper<ViewHandler>
Provides a simple implementation of ViewHandler that can be
subclassed by developers wishing to provide specialized behavior to an existing ViewHandler instance. The
default implementation of all methods is to call through to the wrapped ViewHandler.
Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped() to
access the instance being wrapped.
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, DISABLE_FACELET_JSF_VIEWHANDLER_PARAM_NAME, FACELETS_BUFFER_SIZE_PARAM_NAME, FACELETS_DECORATORS_PARAM_NAME, FACELETS_LIBRARIES_PARAM_NAME, FACELETS_REFRESH_PERIOD_PARAM_NAME, FACELETS_SKIP_COMMENTS_PARAM_NAME, FACELETS_SUFFIX_PARAM_NAME, FACELETS_VIEW_MAPPINGS_PARAM_NAME| Constructor and Description |
|---|
ViewHandlerWrapper()
Deprecated.
Use the other constructor taking the implementation being wrapped.
|
ViewHandlerWrapper(ViewHandler wrapped)
If this view handler has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. |
| Modifier and Type | Method and Description |
|---|---|
void |
addProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call
ViewHandler.addProtectedView(java.lang.String) on the wrapped
ViewHandler object. |
java.lang.String |
calculateCharacterEncoding(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateCharacterEncoding(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object. |
java.util.Locale |
calculateLocale(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateLocale(jakarta.faces.context.FacesContext) on the wrapped ViewHandler object. |
java.lang.String |
calculateRenderKitId(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateRenderKitId(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object. |
UIViewRoot |
createView(FacesContext context,
java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.createView(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler object. |
java.lang.String |
deriveLogicalViewId(FacesContext context,
java.lang.String requestViewId)
The default behavior of this method is to call
|
java.lang.String |
deriveViewId(FacesContext context,
java.lang.String requestViewId)
The default behavior of this method is to call
ViewHandler.deriveViewId(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object. |
java.lang.String |
getActionURL(FacesContext context,
java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.getActionURL(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object. |
java.lang.String |
getBookmarkableURL(FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
The default behavior of this method is to call
ViewHandler.getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) on the
wrapped ViewHandler object. |
java.util.Set<java.lang.String> |
getProtectedViewsUnmodifiable()
The default behavior of this method is to call
ViewHandler.getProtectedViewsUnmodifiable() on the wrapped
ViewHandler object. |
java.lang.String |
getRedirectURL(FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
The default behavior of this method is to call
ViewHandler.getRedirectURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) on the wrapped
ViewHandler object. |
java.lang.String |
getResourceURL(FacesContext context,
java.lang.String path)
The default behavior of this method is to call
ViewHandler.getResourceURL(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object. |
ViewDeclarationLanguage |
getViewDeclarationLanguage(FacesContext context,
java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.getViewDeclarationLanguage(jakarta.faces.context.FacesContext, java.lang.String) on the wrapped
ViewHandler object. |
java.util.stream.Stream<java.lang.String> |
getViews(FacesContext context,
java.lang.String path,
int maxDepth,
ViewVisitOption... options)
The default behavior of this method is to call
ViewHandler.getViews(FacesContext, String, int, ViewVisitOption...) on the wrapped ViewHandler
object. |
java.util.stream.Stream<java.lang.String> |
getViews(FacesContext context,
java.lang.String path,
ViewVisitOption... options)
The default behavior of this method is to call
ViewHandler.getViews(FacesContext, String, ViewVisitOption...)
on the wrapped ViewHandler object. |
java.lang.String |
getWebsocketURL(FacesContext context,
java.lang.String channel)
The default behavior of this method is to call
ViewHandler.getWebsocketURL(FacesContext, String) on the
wrapped ViewHandler object. |
ViewHandler |
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped. |
void |
initView(FacesContext context)
The default behavior of this method is to call
ViewHandler.initView(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object. |
boolean |
removeProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call
ViewHandler.removeProtectedView(java.lang.String) on the wrapped
ViewHandler object. |
void |
renderView(FacesContext context,
UIViewRoot viewToRender)
The default behavior of this method is to call
ViewHandler.renderView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot) on the wrapped
ViewHandler object. |
UIViewRoot |
restoreView(FacesContext context,
java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.restoreView(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object. |
void |
writeState(FacesContext context)
The default behavior of this method is to call
ViewHandler.writeState(jakarta.faces.context.FacesContext) on
the wrapped ViewHandler object. |
public ViewHandlerWrapper(ViewHandler wrapped)
If this view handler has been decorated, the implementation doing the decorating should push the implementation being
wrapped to this constructor. The getWrapped() will then return the implementation being wrapped.
wrapped - The implementation being wrapped.@Deprecated public ViewHandlerWrapper()
public ViewHandler getWrapped()
FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped in interface FacesWrapper<ViewHandler>public void initView(FacesContext context) throws FacesException
The default behavior of this method is to call ViewHandler.initView(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object.
initView in class ViewHandlercontext - the Faces context.FacesException - if a problem occurs setting the encoding, such as the
UnsupportedEncodingException thrown by the underlying Jakarta Servlet or Portlet technology when the
encoding is not supported.ViewHandler.initView(jakarta.faces.context.FacesContext)public UIViewRoot restoreView(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.restoreView(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object.
restoreView in class ViewHandlercontext - FacesContext for the current requestviewId - the view identifier for the current requestViewHandler.restoreView(jakarta.faces.context.FacesContext, String)public UIViewRoot createView(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.createView(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler object.
createView in class ViewHandlercontext - the Faces context.viewId - the view id.ViewHandler.createView(jakarta.faces.context.FacesContext, String)public void renderView(FacesContext context, UIViewRoot viewToRender) throws java.io.IOException, FacesException
The default behavior of this method is to call
ViewHandler.renderView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot) on the wrapped
ViewHandler object.
renderView in class ViewHandlercontext - FacesContext for the current requestviewToRender - the view to renderjava.io.IOException - if an input/output error occursFacesException - if a Jakarta Servlet error occursViewHandler.renderView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot)public java.lang.String calculateCharacterEncoding(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateCharacterEncoding(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object.
calculateCharacterEncoding in class ViewHandlercontext - the Faces context.nullViewHandler.calculateCharacterEncoding(jakarta.faces.context.FacesContext)public java.util.Locale calculateLocale(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateLocale(jakarta.faces.context.FacesContext) on the wrapped ViewHandler object.
calculateLocale in class ViewHandlercontext - FacesContext for the current requestViewHandler.calculateLocale(jakarta.faces.context.FacesContext)public java.lang.String deriveViewId(FacesContext context, java.lang.String requestViewId)
The default behavior of this method is to call
ViewHandler.deriveViewId(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object.
deriveViewId in class ViewHandlercontext - the FacesContext for this requestrequestViewId - the viewId to derive,ViewHandler.deriveViewId(jakarta.faces.context.FacesContext, String)public java.lang.String deriveLogicalViewId(FacesContext context, java.lang.String requestViewId)
The default behavior of this method is to call
ViewHandler.deriveLogicalViewId(jakarta.faces.context.FacesContext, String) on the wrapped
ViewHandler object.
deriveLogicalViewId in class ViewHandlercontext - the FacesContext for this requestrequestViewId - the viewId to derive,ViewHandler.deriveLogicalViewId(jakarta.faces.context.FacesContext, String)public java.lang.String calculateRenderKitId(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateRenderKitId(jakarta.faces.context.FacesContext) on the wrapped ViewHandler
object.
calculateRenderKitId in class ViewHandlercontext - FacesContext for the current requestViewHandler.calculateRenderKitId(jakarta.faces.context.FacesContext)public java.lang.String getActionURL(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.getActionURL(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object.
getActionURL in class ViewHandlercontext - FacesContext for this requestviewId - View identifier of the desired viewViewHandler.getActionURL(jakarta.faces.context.FacesContext, String)public java.util.Set<java.lang.String> getProtectedViewsUnmodifiable()
The default behavior of this method is to call ViewHandler.getProtectedViewsUnmodifiable() on the wrapped
ViewHandler object.
getProtectedViewsUnmodifiable in class ViewHandlerViewHandler.getProtectedViewsUnmodifiable()public void addProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call ViewHandler.addProtectedView(java.lang.String) on the wrapped
ViewHandler object.
addProtectedView in class ViewHandlerurlPattern - the url-pattern to add.ViewHandler.addProtectedView(java.lang.String)public boolean removeProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call ViewHandler.removeProtectedView(java.lang.String) on the wrapped
ViewHandler object.
removeProtectedView in class ViewHandlerurlPattern - the url-pattern to remove.true if in the Set, false otherwise.ViewHandler.removeProtectedView(java.lang.String)public java.lang.String getRedirectURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters, boolean includeViewParams)
The default behavior of this method is to call
ViewHandler.getRedirectURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) on the wrapped
ViewHandler object.
getRedirectURL in class ViewHandlercontext - The FacesContext processing this requestviewId - The view identifier of the target pageparameters - A mapping of parameter names to one or more valuesincludeViewParams - A flag indicating whether view parameters should be encoded into this URLViewHandler.getRedirectURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)public java.lang.String getBookmarkableURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters, boolean includeViewParams)
The default behavior of this method is to call
ViewHandler.getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean) on the
wrapped ViewHandler object.
getBookmarkableURL in class ViewHandlercontext - The FacesContext processing this requestviewId - The view identifier of the target pageparameters - A mapping of parameter names to one or more valuesincludeViewParams - A flag indicating whether view parameters should be encoded into this URLViewHandler.getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)public java.lang.String getResourceURL(FacesContext context, java.lang.String path)
The default behavior of this method is to call
ViewHandler.getResourceURL(jakarta.faces.context.FacesContext, String) on the wrapped ViewHandler
object.
getResourceURL in class ViewHandlercontext - FacesContext for the current requestpath - Resource path to convert to a URLViewHandler.getResourceURL(jakarta.faces.context.FacesContext, String)public java.lang.String getWebsocketURL(FacesContext context, java.lang.String channel)
The default behavior of this method is to call ViewHandler.getWebsocketURL(FacesContext, String) on the
wrapped ViewHandler object.
getWebsocketURL in class ViewHandlercontext - FacesContext for the current request.channel - The channel name of the websocket.ViewHandler.getWebsocketURL(FacesContext, String)public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call ViewHandler.getViewDeclarationLanguage(jakarta.faces.context.FacesContext, java.lang.String) on the wrapped
ViewHandler object.
getViewDeclarationLanguage in class ViewHandlercontext - the FacesContext for this request.viewId - the logical view id, as returned from ViewHandler.deriveLogicalViewId(jakarta.faces.context.FacesContext, java.lang.String)
for which the ViewDeclarationLanguage should be returned.public java.util.stream.Stream<java.lang.String> getViews(FacesContext context, java.lang.String path, ViewVisitOption... options)
The default behavior of this method is to call ViewHandler.getViews(FacesContext, String, ViewVisitOption...)
on the wrapped ViewHandler object.
getViews in class ViewHandlercontext - The FacesContext for this request.path - The initial path from which to start looking for view ids.options - The options to influence the traversal. See ViewVisitOption for details on those.Stream of view idspublic java.util.stream.Stream<java.lang.String> getViews(FacesContext context, java.lang.String path, int maxDepth, ViewVisitOption... options)
The default behavior of this method is to call
ViewHandler.getViews(FacesContext, String, int, ViewVisitOption...) on the wrapped ViewHandler
object.
getViews in class ViewHandlercontext - The FacesContext for this request.path - The initial path from which to start looking for view ids.maxDepth - The absolute maximum depth of nested directories to visit counted from the root (/).options - The options to influence the traversal. See ViewVisitOption for details on those.Stream of view idspublic void writeState(FacesContext context) throws java.io.IOException
The default behavior of this method is to call ViewHandler.writeState(jakarta.faces.context.FacesContext) on
the wrapped ViewHandler object.
writeState in class ViewHandlercontext - FacesContext for the current requestjava.io.IOException - if an input/output error occursViewHandler.writeState(jakarta.faces.context.FacesContext)