|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidad.config.Configurator
org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl
public final class GlobalConfiguratorImpl
This is the implementation of the Trinidad's Global configurator. It provides the entry point for all other configurators. This class is responsible for enforcing the contract outlined by the Configurator abstract class, but allows a more "relaxed" implementation of the APIs called for by the Configurator class, making it more convenient to use ConfiguratorServices from within the Trinidad renderkit. Where appropriate, these differences will be documented for the benifit of the Trindad developer.
Configurator| Method Summary | |
|---|---|
void |
beginRequest(javax.faces.context.ExternalContext ec)
Executes the beginRequest methods of all of the configurator services. |
void |
destroy()
Cleans up the current configurator. |
void |
endRequest(javax.faces.context.ExternalContext ec)
Ends the currently begun request. |
javax.faces.context.ExternalContext |
getExternalContext(javax.faces.context.ExternalContext ec)
Returns an externalContext for this configurator and all of the configurator services. |
static GlobalConfiguratorImpl |
getInstance()
Returns a GlobalConfigurator instance for the current context's class loader. |
void |
init(javax.faces.context.ExternalContext ec)
Initializes the global configurator and the configurator services. |
static boolean |
isRequestStarted(javax.faces.context.ExternalContext ec)
Returns true if the request has not been stated for the current "virtual" request. |
| Methods inherited from class org.apache.myfaces.trinidad.config.Configurator |
|---|
disableConfiguratorServices, isConfiguratorServiceDisabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final GlobalConfiguratorImpl getInstance()
init(ExternalContext) is called multiple times, the global
configurator will call all subordinate configurators only once.
Likewise, the GlobalConfigurator will return exceptions when the contract is expressly violated
(like if getExternalContext(ExternalContext) is called before a {beginRequest(ExternalContext).
null is one was unable to be obtained.public static boolean isRequestStarted(javax.faces.context.ExternalContext ec)
beginRequest(ExternalContext) is executed and before
endRequest(ExternalContext) is executed. This will generally
happen once per request. In the Portlet Environment, the request must be
be started and ended at the beginning and end of both the actionRequest
and the RenderRequest.
ec -
public void beginRequest(javax.faces.context.ExternalContext ec)
init(ExternalContext) method directly.
This method also ensures that the requestContext is attached before the beginRequest methods
are called, so there is no reason to initialize the request context before calling this method.
In portal environments, it is important to execute this method once for each Portlet action and
render request so that the requestContext may be properly initialized even though the
underlying services will be called only once per physical request.
beginRequest in class org.apache.myfaces.trinidad.config.Configuratorec - the externalContext to use to begin the request.Configurator.beginRequest(javax.faces.context.ExternalContext)public void destroy()
destroy in class org.apache.myfaces.trinidad.config.ConfiguratorConfigurator.destroy()public void endRequest(javax.faces.context.ExternalContext ec)
endRequest in class org.apache.myfaces.trinidad.config.ConfiguratorConfigurator.endRequest(javax.faces.context.ExternalContext)public javax.faces.context.ExternalContext getExternalContext(javax.faces.context.ExternalContext ec)
beginRequest(ExternalContext) then this method will call
beginRequest(). It is important to note, however, that even though beginRequest does not need
to be explicitly called, {endRequest(ExternalContext) does need to be called when the
request has completed or the contract to the configurators will be broken.
getExternalContext in class org.apache.myfaces.trinidad.config.Configuratorec - the ExternalContext object that should be wrapped.
public void init(javax.faces.context.ExternalContext ec)
beginRequest(ExternalContext) if needed. It
is also possible to execute this method more then once, although if initialization has already
happened then a call to this method will not do anything. To re-initialize this class, call
destroy() first and then call this method.
init in class org.apache.myfaces.trinidad.config.Configuratorec - the externalContext needed to initialize this classConfigurator.init(javax.faces.context.ExternalContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||