/**
   * * Create a new User.
   *
   * @param user
   * @return
   * @throws Exception
   */
  public String createUser(UserFull user) throws Exception {
    try {
      // Get a DomainDriver instance
      DomainDriver domainDriver = this.getDomainDriver(idAsInt(user.getDomainId()));

      // Create User in specific domain
      String sUserId = domainDriver.createUser(user);

      return sUserId;
    } catch (AdminException e) {
      throw new AdminException(
          "DomainDriverManager.createUser",
          SilverpeasException.ERROR,
          "admin.EX_ERR_ADD_USER",
          user.getFirstName() + " " + user.getLastName(),
          e);
    }
  }
  /**
   * @param user
   * @throws Exception
   */
  @Override
  public void updateUserFull(UserFull user) throws Exception {
    try {
      // Get a DomainDriver instance
      DomainDriver domainDriver = this.getDomainDriver(idAsInt(user.getDomainId()));
      // Update User detail in specific domain
      domainDriver.updateUserFull(user);

      // index informations relative to given user
      indexUser(user.getId());
    } catch (AdminException e) {
      throw new AdminException(
          "DomainDriverManager.updateUser",
          SilverpeasException.ERROR,
          "admin.EX_ERR_UPDATE_USER",
          user.getFirstName() + " " + user.getLastName(),
          e);
    }
  }
  @Override
  public UserFull getUserFull(String userId) throws Exception {
    UserFull uf = null;
    try {
      // Set the OrganizationSchema (if not already done)
      getOrganizationSchema();
      // Get the user information
      UserRow ur = getOrganization().user.getUser(idAsInt(userId));
      if (ur == null) {
        throw new AdminException(
            "DomainDriverManager.getUser",
            SilverpeasException.ERROR,
            "admin.EX_ERR_USER_NOT_FOUND",
            "user Id: '" + userId + "'");
      }
      // Get a DomainDriver instance
      DomainDriver domainDriver = this.getDomainDriver(ur.domainId);
      // Get User detail from specific domain
      try {
        uf = domainDriver.getUserFull(ur.specificId);
      } catch (AdminException e) {
        SilverTrace.error(
            "admin",
            "DomainDriverManager.getUser",
            "admin.MSG_ERR_GET_USER",
            "user Id: '" + userId + "', domain Id: '" + ur.domainId + "'",
            e);
        uf = new UserFull(domainDriver);
        uf.setLogin(ur.login);
        uf.setFirstName(ur.firstName);
        uf.setLastName(ur.lastName);
        uf.seteMail(ur.eMail);
      }

      // Fill silverpeas info of user details
      uf.setLogin(ur.login);
      uf.setId(userId);
      uf.setSpecificId(ur.specificId);
      uf.setDomainId(idAsString(ur.domainId));
      uf.setAccessLevel(ur.accessLevel);
      uf.setLoginQuestion(ur.loginQuestion);
      uf.setLoginAnswer(ur.loginAnswer);
    } catch (AdminException e) {
      throw new AdminException(
          "DomainDriverManager.getUser",
          SilverpeasException.ERROR,
          "admin.EX_ERR_GET_USER",
          "user Id: '" + userId + "', domain Id: '" + userId + "'",
          e);
    } finally {
      releaseOrganizationSchema();
    }
    return uf;
  }