Exemplo n.º 1
0
  /**
   * @param rundata
   * @param context
   * @param msgList
   * @return
   * @throws ALPageNotFoundException
   * @throws ALDBErrorException
   */
  @Override
  protected boolean setFormData(RunData rundata, Context context, List<String> msgList)
      throws ALPageNotFoundException, ALDBErrorException {
    boolean res = super.setFormData(rundata, context, msgList);
    if (res) {
      int tmp_access_flag = (int) access_flag.getValue();
      if (tmp_access_flag == MsgboardUtils.ACCESS_PUBLIC_ALL
          || tmp_access_flag == MsgboardUtils.ACCESS_SEACRET_SELF) {
        memberList.add(login_user);
      } else {
        String str[] = rundata.getParameters().getStrings("member_to");
        if (str == null || str.length == 0) {
          return res;
        }

        boolean containsLoginUser = false;
        String str_loginuserid = login_user.getName().getValue();
        int strsize = str.length;
        for (int i = 0; i < strsize; i++) {
          if (str_loginuserid.equals(str[i])) {
            containsLoginUser = true;
            break;
          }
        }
        if (!containsLoginUser) {
          memberList.add(login_user);
        }

        SelectQuery<TurbineUser> query = Database.query(TurbineUser.class);
        Expression exp = ExpressionFactory.inExp(TurbineUser.LOGIN_NAME_PROPERTY, str);
        query.setQualifier(exp);
        memberList.addAll(ALEipUtils.getUsersFromSelectQuery(query));
      }
    }
    return res;
  }
Exemplo n.º 2
0
 public void setUpdateUser(ALEipUser user) {
   update_user = user.getName();
 }
Exemplo n.º 3
0
 public void setCreateUser(ALEipUser user) {
   create_user = user.getName();
 }