ICEfaces Core 3.3.0
Java API Documentation

org.icefaces.application
Class ResourceRegistry

java.lang.Object
  extended by javax.faces.application.ResourceHandler
      extended by javax.faces.application.ResourceHandlerWrapper
          extended by org.icefaces.application.ResourceRegistry
All Implemented Interfaces:
javax.faces.FacesWrapper<javax.faces.application.ResourceHandler>

public class ResourceRegistry
extends javax.faces.application.ResourceHandlerWrapper

The ResourceRegistry allows an application to register javax.faces.application.Resource instances at runtime. Each Resource is registered in a specified scope (Application, Session, View, Flash Window) so that the resource can be garbage collected when the scope expires.


Field Summary
 
Fields inherited from class javax.faces.application.ResourceHandler
LOCALE_PREFIX, RESOURCE_EXCLUDES_DEFAULT_VALUE, RESOURCE_EXCLUDES_PARAM_NAME, RESOURCE_IDENTIFIER
 
Constructor Summary
ResourceRegistry(javax.faces.application.ResourceHandler wrapped)
           
 
Method Summary
static java.lang.String addApplicationResource(javax.faces.application.Resource resource)
          Add the provided resource in application scope.
static java.lang.String addFlashResource(javax.faces.application.Resource resource)
          Add the provided resource in flash scope.
static java.lang.String addResource(java.util.Map scopeMap, javax.faces.application.Resource resource)
          Add the provided resource to the custom scope Map.
static java.lang.String addSessionResource(javax.faces.application.Resource resource)
          Add the provided resource in session scope.
static java.lang.String addViewResource(javax.faces.application.Resource resource)
          Add the provided resource in view scope.
static java.lang.String addWindowResource(javax.faces.application.Resource resource)
          Add the provided resource in window scope.
static javax.faces.application.Resource getResourceByPath(javax.faces.context.FacesContext facesContext, java.lang.String resPath)
           
 javax.faces.application.ResourceHandler getWrapped()
           
 void handleResourceRequest(javax.faces.context.FacesContext facesContext)
           
 
Methods inherited from class javax.faces.application.ResourceHandlerWrapper
createResource, createResource, createResource, getRendererTypeForResourceName, isResourceRequest, libraryExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceRegistry

public ResourceRegistry(javax.faces.application.ResourceHandler wrapped)
Method Detail

getWrapped

public javax.faces.application.ResourceHandler getWrapped()
Specified by:
getWrapped in interface javax.faces.FacesWrapper<javax.faces.application.ResourceHandler>
Overrides:
getWrapped in class javax.faces.application.ResourceHandlerWrapper

handleResourceRequest

public void handleResourceRequest(javax.faces.context.FacesContext facesContext)
                           throws java.io.IOException
Overrides:
handleResourceRequest in class javax.faces.application.ResourceHandlerWrapper
Throws:
java.io.IOException

addResource

public static java.lang.String addResource(java.util.Map scopeMap,
                                           javax.faces.application.Resource resource)
Add the provided resource to the custom scope Map. This is intended to be used only in cases not covered by the other scope-specific methods.

Parameters:
scopeMap - the resource
scopeMap - the resource
Returns:
the requestPath of the resource

getResourceByPath

public static javax.faces.application.Resource getResourceByPath(javax.faces.context.FacesContext facesContext,
                                                                 java.lang.String resPath)

addApplicationResource

public static java.lang.String addApplicationResource(javax.faces.application.Resource resource)
Add the provided resource in application scope.

Parameters:
resource - the resource
Returns:
the requestPath of the resource

addSessionResource

public static java.lang.String addSessionResource(javax.faces.application.Resource resource)
Add the provided resource in session scope. Note that session scope resources should be Serializable to support cluster replication and session passivation.

Parameters:
resource - the resource
Returns:
the requestPath of the resource

addFlashResource

public static java.lang.String addFlashResource(javax.faces.application.Resource resource)
Add the provided resource in flash scope.

Parameters:
resource - the resource
Returns:
the requestPath of the resource

addViewResource

public static java.lang.String addViewResource(javax.faces.application.Resource resource)
Add the provided resource in view scope.

Parameters:
resource - the resource
Returns:
the requestPath of the resource

addWindowResource

public static java.lang.String addWindowResource(javax.faces.application.Resource resource)
Add the provided resource in window scope.

Parameters:
resource - the resource
Returns:
the requestPath of the resource

ICEfaces Core 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.