Examples of TaskForm


Examples of com.centraview.projects.task.TaskForm

  /**
   * Constructor handling ActionForm
   * @param form ActionForm
   */
  public TaskVOX(String tz, ActionForm form) {
    TaskForm dynaForm = (TaskForm)form;

    setTitle(dynaForm.getTitle());
    setActivityDetails(dynaForm.getDescription());

    if (dynaForm.getTaskid() != null) {
      setTaskid(dynaForm.getTaskid());
      setActivityID(Integer.parseInt(dynaForm.getTaskid()));
    }

    setProjectID(Integer.parseInt(dynaForm.getProjectid()));
    setProjectName(dynaForm.getProject());

    if (dynaForm.getParenttaskid() != null && dynaForm.getParenttaskid().equals("")) {
      setParentID(0);
    } else {
      setParentID(Integer.parseInt(dynaForm.getParenttaskid()));
    }

    String status = dynaForm.getStatus();

    if (status != null && !status.equals("")) {
      setStat(Integer.parseInt(status), "");
      setStatus(Integer.parseInt(status));
    }

    String percent = dynaForm.getPercentComplete().trim();

    if ((!percent.trim().equals("")) && (percent.length() > 0)) {
      setPercentComplete(Integer.parseInt(percent.substring(0, percent.length() - 1)));
    }

    setIsMileStone(dynaForm.getMilestone());

    setIndividualID(Integer.parseInt(dynaForm.getManagerID()));

    if (!dynaForm.getStartyear().equals("")) {
      Timestamp startTS = DateUtility.createTimestamp(dynaForm.getStartyear(), dynaForm
          .getStartmonth(), dynaForm.getStartday());
      setStart(CVUtility.convertTimeZone(startTS, TimeZone.getTimeZone(tz), TimeZone
          .getTimeZone("EST")));
    }
    if (!dynaForm.getEndyear().equals("")) {
      Timestamp endTS = DateUtility.createTimestamp(dynaForm.getEndyear(), dynaForm.getEndmonth(),
          dynaForm.getEndday());
      setEnd(CVUtility
          .convertTimeZone(endTS, TimeZone.getTimeZone(tz), TimeZone.getTimeZone("EST")));
    }

    String[] AssignedTo = dynaForm.getAssignedTo();
    String[] SendTo = dynaForm.getSendTo();

    if (AssignedTo != null) {
      for (int i = 0; i < AssignedTo.length; i++) {
        if (!AssignedTo[i].trim().equals(""))
          setAssignedTo(Integer.parseInt(AssignedTo[i]), "");
      }
    }

    if (dynaForm.getSendAlert().trim().equals("Yes")) {
      setSetSendAlert("Yes");

      if (dynaForm.getAlertTypeAlert().equals("on")) {
        setActivityAction(getActivityActionVO(ActivityActionVO.AA_ALERT, dynaForm.getSendTo()));
      }

      if (dynaForm.getAlertTypeEmail().equals("on")) {
        setActivityAction(getActivityActionVO(ActivityActionVO.AA_EMAIL, dynaForm.getSendTo()));
      }

      // if (dynaForm.getAlertTypeEmail().equals("on"))
      {
        if (SendTo != null) {
View Full Code Here

Examples of com.wordpress.salaboy.smarttasks.formbuilder.api.output.TaskForm

    ConnectionData connectionData = new ConnectionData(entity);
    helper.connect(connectionData);
    String taskType = this.getTaskType();

    String stringTaskform = helper.getTaskForm(id, taskType, profile);
    TaskForm deserializedForm = (TaskForm) yaml.load(stringTaskform);
    taskInfo = deserializedForm.getInputs();

    taskOutput = deserializedForm.getOutputs();
  }
View Full Code Here

Examples of com.wordpress.salaboy.smarttasks.formbuilder.api.output.TaskForm

        helper.connect(connectionData);
//        taskHelper = helper.getTaskSupportHelper(id, name.trim(), profile);
        try {
            String stringTaskInfo = helper.getTaskForm(id, name.trim(), profile);
            Yaml yaml = new Yaml();
            TaskForm deserializedInfo = (TaskForm) yaml
                    .load(stringTaskInfo);
            Map<String, Object> taskInfo = deserializedInfo.getInputs();
           
            Map<String, Object> taskOutput = deserializedInfo.getOutputs();
            TaskOperationsDefinition operationsDef = helper
                    .getTaskOperations(id);
            model.addAttribute("operations", operationsDef);
            model.addAttribute("taskInput", taskInfo);
            model.addAttribute("taskOutput", taskOutput);
View Full Code Here

Examples of net.sf.pmr.struts.agilePlanning.task.form.TaskForm

        // get the service
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();

        // populate the form
        TaskForm taskForm = (TaskForm) form;
        taskForm.setStoryPersistanceId(Integer.parseInt((String) request.getParameter("storyPersistanceId")));
       
        // find the Story... if needed
        if (StringUtils.isNotEmpty((String) request.getParameter("persistanceId"))) {

            Task task = storyService.findTaskByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));

            taskForm.setDaysEstimated(task.getDaysEstimated());
            taskForm.setPersistanceId(task.getPersistanceId());
            taskForm.setPersistanceVersion(task.getPersistanceVersion());
            taskForm.setShortDescription(task.getShortDescription());
           
            taskForm.setDaysCompleted(task.daysCompleted());
            taskForm.setDaysRemaining(task.daysRemaining());
            taskForm.setDifferenceInPercentBetweenEstimateAndCharge(task.differenceInPercentBetweenEstimateAndCharge());
            taskForm.setDifferenceOfDaysBetweenEstimateAndCharge(task.differenceOfDaysBetweenEstimateAndCharge());
            taskForm.setPercentCompleted(task.percentCompleted());
            taskForm.setPercentRemaining(task.percentRemaining());
            taskForm.setWarning(task.warning());
           
            if (task.getOwner() != null) {
                taskForm.setDevelopperPersistanceId(task.getOwner().getPersistanceId());
            }
        }   
   
        //populate listBox
        populateListBox(request);
View Full Code Here

Examples of net.sf.pmr.struts.agilePlanning.task.form.TaskForm

        // get the service
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();

        // get the form
        TaskForm taskForm = (TaskForm) form;

        // TODO faire une seul m�thode taskService.save ?
        Errors errors = null;
        // save the story
        if (taskForm.getPersistanceId() == 0) {
            // add
            errors = storyService.addTask(taskForm.getStoryPersistanceId(),
                                          taskForm.getDaysEstimated(),
                                          taskForm.getShortDescription(),
                                          taskForm.getDevelopperPersistanceId());
        } else {
            // update
            errors = storyService.updateTask(taskForm.getStoryPersistanceId(),
                                             taskForm.getDaysEstimated(),
                                             taskForm.getShortDescription(),
                                             taskForm.getDevelopperPersistanceId(),
                                             taskForm.getPersistanceId(),
                                             taskForm.getPersistanceVersion());
        }

        // Convert into struts action errors
        ActionMessages actionMessages = new ActionMessages();

        if (errors.hasErrors()) {

            for (Iterator iterator = errors.getAllErrorsMessageParameters().iterator(); iterator.hasNext();) {

                MessageParameters messageParameters = (MessageParameters) iterator.next();

                actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(messageParameters.getErrorCode(),
                                                                                    messageParameters.getErrorArguments()));

            }

            saveErrors(request, actionMessages);

        }

        // forward
        if (actionMessages.isEmpty() == false) {
           
            //put the persistanceId in the request
            request.setAttribute("persistanceId", Integer.valueOf(taskForm.getPersistanceId()));
           
            // populate the list box
            populateListBox(request);
           
            // populate the summary
            populateSummary(request);
           
            return mapping.findForward("taskDetail");

        } else {
           
            // set the storyPersistanceId in request
            request.setAttribute("storyPersistanceId", String.valueOf(taskForm.getStoryPersistanceId()));
           
            return this.list(mapping, form, request, response);
        }

    }
View Full Code Here

Examples of net.sf.pmr.struts.agilePlanning.task.form.TaskForm

        // get the service
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();

        // get the form
        TaskForm taskForm = (TaskForm) form;

        Errors errors = null;
        // save the story
        if (taskForm.getPersistanceId() != 0) {
           
            errors = storyService.deleteTask(taskForm.getStoryPersistanceId(), taskForm.getPersistanceId(), taskForm.getPersistanceVersion());
           
        }

        // Convert into struts action errors
        ActionMessages actionMessages = new ActionMessages();

        if (errors.hasErrors()) {

            for (Iterator iterator = errors.getAllErrorsMessageParameters().iterator(); iterator.hasNext();) {

                MessageParameters messageParameters = (MessageParameters) iterator.next();

                actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(messageParameters.getErrorCode(),
                                                                                    messageParameters.getErrorArguments()));

            }

            saveErrors(request, actionMessages);

        }

        // forward
        if (actionMessages.isEmpty() == false) {
           
            //put the persistanceId in the request
            request.setAttribute("persistanceId", Integer.valueOf(taskForm.getPersistanceId()));
           
//            // populate the list box
//            populateListBox(request);
//           
//            // populate the summary
//            populateSummary(request);
           
            return this.detail(mapping, form, request, response);
           
            // return mapping.findForward("taskDetail");

        } else {
           
            // set the storyPersistanceId in request
            request.setAttribute("storyPersistanceId", String.valueOf(taskForm.getStoryPersistanceId()));
           
            return this.list(mapping, form, request, response);
        }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.