public class ChromatticLifeCycle
extends org.exoplatform.container.component.BaseComponentPlugin
The chromattic life cycle objets is a plugin that allow to bootstrap a chromattic builder and make it managed either locally or globally.
It is allowed to create subclasses of this class to override the methods onOpenSession(SessionContext) or
onCloseSession(SessionContext) to perform additional treatment on the session context at a precise phase of its life
cycle.
The life cycle domain uniquely identifies the chromattic domain among all domain registered against the
ChromatticManager manager.
InitParams as parameter that contains the following
entries:
domain-name string that is the life cycle domain nameworkspace-name string that is the repository workspace name associated with this life cycleentities list value that contains the list of chromattic entities that will be registered against the
builder chromattic builder| Constructor and Description |
|---|
ChromatticLifeCycle(org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeContext(boolean save) |
org.chromattic.api.Chromattic |
getChromattic() |
SessionContext |
getContext()
Returns
#getContext(false). |
SessionContext |
getContext(boolean peek)
A best effort to return a session context whether it's local or global.
|
String |
getDomainName() |
ChromatticManager |
getManager() |
String |
getRepositoryName() |
String |
getWorkspaceName() |
protected void |
onCloseSession(SessionContext context) |
protected void |
onOpenSession(SessionContext context) |
SessionContext |
openContext()
Opens a context and returns it.
|
void |
start() |
void |
stop() |
public ChromatticLifeCycle(org.exoplatform.container.xml.InitParams params)
public String getDomainName()
public final String getRepositoryName()
public final String getWorkspaceName()
public final org.chromattic.api.Chromattic getChromattic()
public final ChromatticManager getManager()
public final SessionContext getContext()
#getContext(false).getContext(boolean)public final SessionContext getContext(boolean peek)
peek - true if no context should be automatically createdpublic final SessionContext openContext()
public final void closeContext(boolean save)
protected void onOpenSession(SessionContext context)
protected void onCloseSession(SessionContext context)
public final void stop()
Copyright © 2017 JBoss by Red Hat. All Rights Reserved.