/**
   * @param _sTeam
   * @param _sLoginUser
   * @throws PureException
   */
  public void delete(Team _sTeam, IUser _sLoginUser) throws PureException {
    ITeamMgr teamMgr = (ITeamMgr) ArkContentHelper.getContentMgrOf(SRMTypes.TEAM);
    this.deleteAllMember(_sTeam.getId());
    this.deleteAllDepts(_sTeam);

    if (_sTeam.isFromFormal()) {
      teamMgr.delete(_sTeam);
    } else {
      teamMgr.deleteTempById(_sTeam.getId());
    }
  }
  /**
   * @param _sTeam
   * @param _sLoginUser
   * @throws PureException
   */
  public void doEditFromFormal(Team _sTeam, IUser _sLoginUser) throws PureException {
    ITeamMgr teamMgr = (ITeamMgr) ArkContentHelper.getContentMgrOf(SRMTypes.TEAM);

    List list = _sTeam.getMemberList();
    teamMgr.save(_sTeam);
    this.deleteAllMember(_sTeam.getId());
    this.saveMember(_sTeam.getId(), list);

    List deptList = _sTeam.getDeptList();
    this.deleteAllDepts(_sTeam);
    this.saveDepts(_sTeam, deptList);
  }
  /**
   * @param _sTeam
   * @param _sLoginUser
   * @throws PureException
   */
  public void doEditFromTemp(Team _sTeam, IUser _sLoginUser) throws PureException {
    if (logger.isDebugEnabled()) {
      logger.debug("doEditFromTemp...");
    }

    ITeamMgr teamMgr = (ITeamMgr) ArkContentHelper.getContentMgrOf(SRMTypes.TEAM);

    List list = _sTeam.getMemberList();

    teamMgr.saveToTemp(_sTeam, false);
    this.deleteAllMember(_sTeam.getId());
    this.saveMember(_sTeam.getId(), list);

    List deptList = _sTeam.getDeptList();
    this.deleteAllDepts(_sTeam);
    this.saveDepts(_sTeam, deptList);
  }