Package com.emc.documentum.rest.dfc
Class SessionAwareAbstractManager
java.lang.Object
com.emc.documentum.rest.dfc.SessionAwareAbstractManager
An abstract class containing the autowired bean of the
RepositorySession
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <V> V
executeWithSession
(ContextSessionManager.SessionCallable<V> callable) execute the SessionCallable with a shared session, and the session will be automatically releasedprotected <V> V
executeWithSession
(ContextSessionManager.SessionCallable<V> callable, boolean usePrivate) execute the SessionCallable with the session, and the session will be automatically releasedprotected RepositorySession
Returns the instance of RepositorySessionprotected void
setSessionRepository
(RepositorySession dfcSessionRepository) Set the instance of RepositorySession
-
Constructor Details
-
SessionAwareAbstractManager
public SessionAwareAbstractManager()
-
-
Method Details
-
getSessionRepository
Returns the instance of RepositorySession- Returns:
- the instance of RepositorySession
-
setSessionRepository
Set the instance of RepositorySession- Parameters:
dfcSessionRepository
- the instance of RepositorySession
-
executeWithSession
protected <V> V executeWithSession(ContextSessionManager.SessionCallable<V> callable, boolean usePrivate) throws com.documentum.fc.common.DfException execute the SessionCallable with the session, and the session will be automatically released- Type Parameters:
V
- the execution return type- Parameters:
callable
- the SessionCallable objectusePrivate
- whether privately use the session- Returns:
- the result of SessionCallable
- Throws:
com.documentum.fc.common.DfException
- the exception during execution
-
executeWithSession
protected <V> V executeWithSession(ContextSessionManager.SessionCallable<V> callable) throws com.documentum.fc.common.DfException execute the SessionCallable with a shared session, and the session will be automatically released- Type Parameters:
V
- the execution return type- Parameters:
callable
- the SessionCallable object- Returns:
- the result of SessionCallable
- Throws:
com.documentum.fc.common.DfException
- the exception during execution
-