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 Type
    Method
    Description
    Get 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.DfException
      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'
      Otherwise, the obtained session is shared.
      The session must be explicitly released by the caller. It is recommended to call DfcSessions.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 call DfcSessions.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

      IDfCloseableSession getCloseableSession() throws com.documentum.fc.common.DfException
      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'
      Otherwise, the obtained session is shared.
      The session must be explicitly released by the caller. It is recommended to call DfcSessions.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 call DfcSessions.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