public abstract class BaseChromatticPersister extends Object implements ChromatticPersister
ChromatticPersister.PortletNameFormatter, ChromatticPersister.QNameFormatter| Modifier and Type | Field and Description |
|---|---|
static String |
PORTLET_STATES_WORKSPACE_NAME |
protected static String |
REPOSITORY_NAME |
protected String |
workspaceName |
static String |
WSRP_WORKSPACE_NAME |
| Constructor and Description |
|---|
BaseChromatticPersister(String workspaceName) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession(boolean save)
Closes the current ChromatticSession, saving the associated operations if so specified
|
<T> boolean |
delete(T toDelete,
StoresByPathManager<T> manager)
Deletes the specified object from the specified manager, the manager being, most of the time, the parent of the object to be deleted.
|
org.chromattic.api.ChromatticSession |
getSession()
Retrieves the current ChromatticSession or open a new one if none already existed.
|
void |
initializeBuilderFor(List<Class> mappingClasses)
Initializes Chromattic with the specified mapping classes.
|
boolean |
isSessionClosed()
Checks whether the current session is closed.
|
void |
save()
Saves the modifications made in the context of the current session but keep the session open.
|
protected abstract void |
setBuilderOptions(org.chromattic.api.ChromatticBuilder builder) |
public static final String WSRP_WORKSPACE_NAME
public static final String PORTLET_STATES_WORKSPACE_NAME
protected static final String REPOSITORY_NAME
protected String workspaceName
public BaseChromatticPersister(String workspaceName)
public void initializeBuilderFor(List<Class> mappingClasses) throws Exception
mappingClasses - the list of mapping classes this ChromatticPersister will be able to deal with.Exceptionprotected abstract void setBuilderOptions(org.chromattic.api.ChromatticBuilder builder)
public org.chromattic.api.ChromatticSession getSession()
ChromatticPersistergetSession in interface ChromatticPersisterpublic void closeSession(boolean save)
ChromatticPersistercloseSession in interface ChromatticPersistersave - whether or not to save the operations associated with the sessionpublic boolean isSessionClosed()
ChromatticPersisterisSessionClosed in interface ChromatticPersistertrue if no current session exists or if it's closed, false otherwisepublic void save()
ChromatticPersistersave in interface ChromatticPersisterpublic <T> boolean delete(T toDelete,
StoresByPathManager<T> manager)
ChromatticPersisterdelete in interface ChromatticPersisterT - the type of the object to deletetoDelete - the object to deletemanager - the StoresByPathManager object that needs to be notified (to be updated) of the deletionnull if no such object existed in persistenceCopyright © 2006-2014 GateIn. All Rights Reserved.