Class SessionAwareAbstractManager

java.lang.Object
com.emc.documentum.rest.dfc.SessionAwareAbstractManager

public abstract class SessionAwareAbstractManager extends Object
An abstract class containing the autowired bean of the RepositorySession.
  • Constructor Details

    • SessionAwareAbstractManager

      public SessionAwareAbstractManager()
  • Method Details

    • getSessionRepository

      protected RepositorySession getSessionRepository()
      Returns the instance of RepositorySession
      Returns:
      the instance of RepositorySession
    • setSessionRepository

      protected void setSessionRepository(RepositorySession dfcSessionRepository)
      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 object
      usePrivate - 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