/**
   * @param request : request)
   * @return String : String
   */
  private String getDynamicExtensionsURL(HttpServletRequest request) {
    // Get Dynamic extensions URL
    String dynamicExtensionsURL = request.getContextPath() + WebUIManager.getCreateContainerURL();

    final SessionDataBean sessionbean =
        (SessionDataBean)
            request
                .getSession()
                .getAttribute(edu.wustl.catissuecore.util.global.Constants.SESSION_DATA);

    final String userId = sessionbean.getUserId().toString();
    // request.getSession().getAttribute("SESSION_DATA").toString();
    String isAuthenticatedUser = "******";
    if (userId != null) {
      isAuthenticatedUser = "******";
    }
    // append container id if any
    if (request.getParameter("containerId") == null) {
      // append callback parameter
      dynamicExtensionsURL =
          dynamicExtensionsURL
              + "?"
              + WebUIManager.getCallbackURLParamName()
              + "="
              + request.getContextPath()
              + AnnotationConstants.CALLBACK_URL_PATH_ANNOTATION_DEFN
              + "&isAuthenticatedUser="******"?"
              + WebUIManagerConstants.CONATINER_IDENTIFIER_PARAMETER_NAME
              + "="
              + request.getParameter("containerId");
      dynamicExtensionsURL =
          dynamicExtensionsURL
              + "&"
              + WebUIManager.getCallbackURLParamName()
              + "="
              + request.getContextPath()
              + AnnotationConstants.CALLBACK_URL_PATH_ANNOTATION_DEFN
              + "&isAuthenticatedUser="
              + isAuthenticatedUser;
    }
    return dynamicExtensionsURL;
  }
  /**
   * This method will be used to establish the session with the database. Declared in AbstractDAO
   * class.
   *
   * @throws DAOException
   */
  public void openSession(SessionDataBean sessionDataBean) throws DAOException {
    // Logger.out.info("Session opened:------------------------");
    try {
      session = DBUtil.currentSession();

      // Logger.out.info("Transaction begin:---------------------");
      transaction = session.beginTransaction();

      auditManager = new AuditManager();

      if (sessionDataBean != null) {
        auditManager.setUserId(sessionDataBean.getUserId());
        auditManager.setIpAddress(sessionDataBean.getIpAddress());
      } else {
        auditManager.setUserId(null);
      }
    } catch (HibernateException dbex) {
      Logger.out.error(dbex.getMessage(), dbex);
      throw handleError(Constants.GENERIC_DATABASE_ERROR, dbex);
    }
  }