Package com.emc.documentum.rest.dfc
Interface RepositorySession
public interface RepositorySession
An interface to provide the functions to get the DFC session.
Implementation beans for this interface could be autowired in callers.
Below is the right usage of methods in
ContextSessionManager
.
@Autowired
RepositorySession repositorySession;
IDfSession session = null;
try {
// get DFC session
session = repositorySession.getSession();
// do whatever DFC operations using RepositorySession
// ...
} catch(DfException e) {
// error handling
// ...
} finally {
// release session
DfcSessions.release(session);
}
-
Method Summary
Modifier and TypeMethodDescriptionGet the DFC session by the user identity from the repository context.getCloseableSession
(boolean usePrivate) Get the DFC session by the user identity from the repository context.Return the underlying DFC repository session manager associated with this repository session.com.documentum.fc.client.IDfSession
Get the DFC session by the user identity from the repository context.com.documentum.fc.client.IDfSession
getSession
(boolean usePrivate) Get the DFC session by the user identity from the repository context.
-
Method Details
-
getSession
com.documentum.fc.client.IDfSession getSession() throws com.documentum.fc.common.DfExceptionGet the DFC session by the user identity from the repository context. The obtained session is private if any of following conditions is met:- transaction is enabled in ContextSessionManager
- runtime property "rest.dfc.session.use" is not set
- runtime property "rest.dfc.session.use" is set to 'private'
The session must be explicitly released by the caller. It is recommended to callDfcSessions.release(com.documentum.fc.client.IDfSession)
to release the session.- Returns:
- the DFC session instance
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation- See Also:
-
getSession
com.documentum.fc.client.IDfSession getSession(boolean usePrivate) throws com.documentum.fc.common.DfException Get the DFC session by the user identity from the repository context.- Parameters:
usePrivate
- TRUE indicates to get private session; FALSE to get shared session; when FALSE, the obtained session is still be private if transaction is enabled
The session must be explicitly released by the caller. It is recommended to callDfcSessions.release(com.documentum.fc.client.IDfSession)
to release the session.- Returns:
- the DFC session instance
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation- See Also:
-
getCloseableSession
Get the DFC session by the user identity from the repository context. The obtained session is private if any of following conditions is met:- transaction is enabled in ContextSessionManager
- runtime property "rest.dfc.session.use" is not set
- runtime property "rest.dfc.session.use" is set to 'private'
The session must be explicitly released by the caller. It is recommended to callDfcSessions.release(com.documentum.fc.client.IDfSession)
to release the session.- Returns:
- the IDfCloseableSession session instance
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation- See Also:
-
getCloseableSession
IDfCloseableSession getCloseableSession(boolean usePrivate) throws com.documentum.fc.common.DfException Get the DFC session by the user identity from the repository context.- Parameters:
usePrivate
- TRUE indicates to get private session; FALSE to get shared session; when FALSE, the obtained session is still be private if transaction is enabled
The session must be explicitly released by the caller. It is recommended to callDfcSessions.release(com.documentum.fc.client.IDfSession)
to release the session.- Returns:
- the IDfCloseableSession session instance
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation- See Also:
-
getRepositorySessionManager
RepositorySessionManager getRepositorySessionManager()Return the underlying DFC repository session manager associated with this repository session.- Returns:
- the DFC session manager
-