コード例 #1
0
 /**
  * @param user
  * @throws Exception
  */
 @Override
 public void updateUserDetail(UserDetail user) throws Exception {
   try {
     // Get a DomainDriver instance
     DomainDriver domainDriver = this.getDomainDriver(idAsInt(user.getDomainId()));
     // Update User detail in specific domain
     domainDriver.updateUserDetail(user);
   } catch (AdminException e) {
     throw new AdminException(
         "DomainDriverManager.updateUser",
         SilverpeasException.ERROR,
         "admin.EX_ERR_UPDATE_USER",
         user.getFirstName() + " " + user.getLastName(),
         e);
   }
 }
コード例 #2
0
  /**
   * Create a new User.
   *
   * @param user
   * @return
   * @throws Exception
   */
  @Override
  public String createUser(UserDetail 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);
    }
  }