Пример #1
0
  public String saveGROUPHTM() throws ProcessingException {
    String sReturnValue = null;

    logMessage(FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::saveGROUPHTM");

    try {
      String groupid = this.getServletRequestParameter("groupid");
      ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
      IUSERBValueObject currentUser = objectManager.getCurrentUSERB();
      Collection colOption = USERBProxy.getOptionUser(currentUser.getUserid());
      Collection selecteduser = USERBProxy.getGroupUser(groupid);
      ArrayList optionArr = new ArrayList();
      if (colOption != null && selecteduser != null) {
        ArrayList tempA = new ArrayList(colOption);
        ArrayList tempB = new ArrayList(selecteduser);
        IUSERBValueObject optionuser = null;
        IUSERBValueObject selectuser = null;
        boolean flag = false;
        for (int i = 0; i < tempA.size(); i++) {
          flag = true;
          optionuser = (IUSERBValueObject) tempA.get(i);
          for (int j = 0; j < tempB.size(); j++) {
            selectuser = (IUSERBValueObject) tempB.get(j);
            if (optionuser.getUserid().equals(selectuser.getUserid())) {
              flag = false;
            }
          }
          if (flag) {
            optionArr.add(optionuser);
          }
        }
      }
      this.getHttpServletRequest().setAttribute("optionusers", optionArr);
      if (selecteduser != null) {
        this.getHttpServletRequest().setAttribute("selectedusers", new ArrayList(selecteduser));
      } else {
        this.getHttpServletRequest().setAttribute("selectedusers", new ArrayList());
      }

    } catch (Exception exc) {
      throw new ProcessingException("GROUPWorkerBean:saveGROUPHTM() - " + exc, exc);
    }

    return (sReturnValue);
  }
Пример #2
0
  public String createGROUPHTM() throws ProcessingException {
    String sReturnValue = null;

    logMessage(
        FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::createGROUPHTM");

    try {
      ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
      IUSERBValueObject currentUser = objectManager.getCurrentUSERB();
      Collection coll = USERBProxy.getOptionUser(currentUser.getUserid());
      objectManager.setUSERBs(coll);
    } catch (Exception exc) {
      throw new ProcessingException("GROUPWorkerBean:saveGROUP() - " + exc, exc);
    }

    return (sReturnValue);
  }