public class PortletLifecycleFactory extends LifecycleFactory
PortletLifecycleFactory
is a factory object that creates (if
needed) and returns PortletLifecycle
instances.DEFAULT_LIFECYCLE
Constructor and Description |
---|
PortletLifecycleFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addLifecycle(String lifecycleId,
Lifecycle lifecycle)
Register a new
PortletLifecycle instance, associated with the
specified lifecycleId , to be supported by this
PortletLifecycleFactory . |
Lifecycle |
getLifecycle(String lifecycleId)
Create (if needed) and return a
PortletLifecycle instance for the
specified lifecycle identifier. |
Iterator<String> |
getLifecycleIds()
Return an
Iterator over the set of lifecycle identifiers
supported by this factory. |
getWrapped
public void addLifecycle(String lifecycleId, Lifecycle lifecycle)
PortletLifecycle
instance, associated with the
specified lifecycleId
, to be supported by this
PortletLifecycleFactory
. This method may be called at any
time, and makes the corresponding PortletLifecycle
instance
available throughout the remaining lifetime of the application.addLifecycle
in class LifecycleFactory
lifecycleId
- Identifier of the new PortletLifecycle
lifecycle
- PortletLifecycle
instance that we are registeringIllegalArgumentException
- if a PortletLifecycle
with the specified
lifecycleId
has already been registeredNullPointerException
- if lifecycleId
or lifecycle
is nullpublic Lifecycle getLifecycle(String lifecycleId)
PortletLifecycle
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 application, returns the
same PortletLifecycle
instance.getLifecycle
in class LifecycleFactory
lifecycleId
- Lifecycle identifier of the requested PortletLifecycle
instanceIllegalArgumentException
- if no PortletLifecycle
instance can be returned for
the specified identifierNullPointerException
- if lifecycleId
is nullpublic Iterator<String> getLifecycleIds()
Iterator
over the set of lifecycle identifiers
supported by this factory.getLifecycleIds
in class LifecycleFactory
Iterator