public interface SessionManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeSession()
Closes the current session and discard the changes done during the session.
|
boolean |
closeSession(boolean save)
Closes the current session and optionally saves its content.
|
javax.jcr.Session |
createSession()
Create a new Session
|
<T> T |
execute(JCRTask<T> jcrTask)
Execute a readonly jcr task.
|
<T> T |
executeAndSave(JCRTask<T> jcrTask)
Execute an jcr task and persists the changes.
|
javax.jcr.Session |
getCurrentSession()
Returns the session currently associated with the current thread of execution.
The current session is set with openSession() |
javax.jcr.Session |
getSession(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
This method is here for backward compatibility, but will be removed to get rid of SessionProvider
|
javax.jcr.Session |
openSession()
Open and returns a session to the model.
|
javax.jcr.Session openSession()
Open and returns a session to the model. When the current thread is already associated with a previously opened session the method will throw an IllegalStateException.
javax.jcr.Session getSession(org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
sessionProvider - javax.jcr.Session getCurrentSession()
Returns the session currently associated with the current thread of execution.
The current session is set with openSession()
javax.jcr.Session createSession()
boolean closeSession()
Closes the current session and discard the changes done during the session.
closeSession(boolean)boolean closeSession(boolean save)
Closes the current session and optionally saves its content. If no session is associated then this method has no effects and returns false.
save - if the session must be saved<T> T executeAndSave(JCRTask<T> jcrTask)
Session.save() is called on the current at the end.T - jcrTask - <T> T execute(JCRTask<T> jcrTask)
Session.save()is called on the current session after the call.T - jcrTask - Copyright © 2003–2015 eXo Platform SAS. All rights reserved.