public class Session extends java.lang.Object implements SessionMBean
NAME, TYPE| Constructor and Description |
|---|
Session(ConfigServiceImpl configService, SessionManager sessionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitSession(java.lang.String session)
Commits a session
|
void |
commitSession(java.lang.String session, SessionConflicts expectedConflicts)
Commits a session only if the concurrent modification conflicts are not different from the expected conflicts.
|
void |
createSession(java.lang.String session)
Creates a new session with an arbitrary user given name
|
void |
createSessionWithUndo(java.lang.String session, java.lang.String taskId)
Creates a new session with the given name, and performs undo of the given taskId in that session
|
void |
createTransientSession(java.lang.String session)
Creates a new transient session with an arbitrary user given name.
|
void |
discardSession(java.lang.String session)
Deletes the session without activating the changes.
|
java.lang.String |
getDescription(java.lang.String session)
Returns the description for the session
|
java.util.List<SessionInfo> |
getSessionInfos()
Returns information about all the existing sessions
|
java.util.Set<java.lang.String> |
getSessions()
Returns the names of all the sessions
|
boolean |
isSessionReadyForCommit(java.lang.String session)
Returns true if there are no critical conflicts in the session so the session can be activated.
|
boolean |
sessionExists(java.lang.String session)
Returns true if a session with the given session exists
|
void |
setDescription(java.lang.String session, java.lang.String description)
Set a description for a session.
|
public Session(ConfigServiceImpl configService, SessionManager sessionManager) throws java.lang.Exception
java.lang.Exceptionpublic void createSession(java.lang.String session)
throws java.lang.Exception
SessionMBeancreateSession in interface SessionMBeansession - name of the session to createjava.lang.Exceptionpublic void createTransientSession(java.lang.String session)
throws java.lang.Exception
SessionMBeancreateTransientSession in interface SessionMBeansession - name of the session to createjava.lang.Exceptionpublic void createSessionWithUndo(java.lang.String session,
java.lang.String taskId)
throws java.lang.Exception
SessionMBeancreateSessionWithUndo in interface SessionMBeansession - name of the session to cratetaskId - the id of the task to be undonejava.lang.Exceptionpublic boolean sessionExists(java.lang.String session)
SessionMBeansessionExists in interface SessionMBeanpublic void discardSession(java.lang.String session)
throws java.lang.Exception
SessionMBeandiscardSession in interface SessionMBeanjava.lang.Exceptionpublic void setDescription(java.lang.String session,
java.lang.String description)
throws java.lang.Exception
SessionMBeansetDescription in interface SessionMBeanjava.lang.Exceptionpublic java.lang.String getDescription(java.lang.String session)
SessionMBeangetDescription in interface SessionMBeanpublic java.util.Set<java.lang.String> getSessions()
SessionMBeangetSessions in interface SessionMBeanpublic void commitSession(java.lang.String session)
throws java.lang.Exception
SessionMBeancommitSession in interface SessionMBeanjava.lang.Exceptionpublic void commitSession(java.lang.String session,
SessionConflicts expectedConflicts)
throws java.lang.Exception
SessionMBeancommitSession in interface SessionMBeanexpectedConflicts - activate session only if there are no new conflicts with respect to base conflicts. This method simply obtains the diff between the current set of conflicts and the expected conflicts (via SessionConflicts.diff(com.bea.wli.config.session.SessionConflicts, com.bea.wli.config.session.SessionConflicts)) and throws exception if there are additional conflicts on top of what the user is expectingjava.lang.Exceptionpublic boolean isSessionReadyForCommit(java.lang.String session)
throws java.lang.Exception
SessionMBeanisSessionReadyForCommit in interface SessionMBeanjava.lang.Exceptioncom.bea.wli.config.session.SessionConflicts#hasCriticalConflicts()}public java.util.List<SessionInfo> getSessionInfos()
SessionMBeangetSessionInfos in interface SessionMBean