JSF-Spring

de.mindmatters.faces.lifecycle
Class LifecycleFactoryImpl

java.lang.Object
  extended by javax.faces.lifecycle.LifecycleFactory
      extended by de.mindmatters.faces.lifecycle.LifecycleFactoryImpl

public final class LifecycleFactoryImpl
extends LifecycleFactory

LifecycleFactory is a factory object that creates (if needed) and returns Lifecycle instances. This implementation delivers a default lifecycle for the lifecycle-id LifecycleFactory.DEFAULT_LIFECYCLE and a modified one for the key LifecycleImpl.JSF_SPRING_LIFECYCLE_ID (which will be used for integration purposes of SpringMVC).

Author:
Andreas Kuhrwahl
See Also:
LifecycleImpl

Field Summary
 
Fields inherited from class javax.faces.lifecycle.LifecycleFactory
DEFAULT_LIFECYCLE
 
Constructor Summary
LifecycleFactoryImpl()
          Default Constructor adding the default lifecycle to this factory.
 
Method Summary
 void addLifecycle(java.lang.String lifecycleId, Lifecycle lifecycle)
          

Register a new Lifecycle instance, associated with the specified lifecycleId, to be supported by this LifecycleFactory.

 Lifecycle getLifecycle(java.lang.String lifecycleId)
          

Create (if needed) and return a Lifecycle instance for the specified lifecycle identifier.

 java.util.Iterator getLifecycleIds()
          

Return an Iterator over the set of lifecycle identifiers supported by this factory.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleFactoryImpl

public LifecycleFactoryImpl()
Default Constructor adding the default lifecycle to this factory.

Method Detail

addLifecycle

public void addLifecycle(java.lang.String lifecycleId,
                         Lifecycle lifecycle)

Register a new Lifecycle instance, associated with the specified lifecycleId, to be supported by this LifecycleFactory. This method may be called at any time, and makes the corresponding Lifecycle instance available throughout the remaining lifetime of this web application.

Specified by:
addLifecycle in class LifecycleFactory
Parameters:
lifecycleId - Identifier of the new Lifecycle
lifecycle - Lifecycle instance that we are registering

getLifecycle

public Lifecycle getLifecycle(java.lang.String lifecycleId)

Create (if needed) and return a Lifecycle instance for the specified lifecycle identifier. The set of available lifecycle identifiers is available via the getLifecycleIds() method.

Each call to getLifecycle() for the same lifecycleId, from within the same web application, must return the same Lifecycle instance.

Specified by:
getLifecycle in class LifecycleFactory
Parameters:
lifecycleId - Lifecycle identifier of the requested Lifecycle instance

getLifecycleIds

public java.util.Iterator getLifecycleIds()

Return an Iterator over the set of lifecycle identifiers supported by this factory. This set must include the value specified by LifecycleFactory.DEFAULT_LIFECYCLE.

Specified by:
getLifecycleIds in class LifecycleFactory

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG