Package evolaris.platform.smssvc.web.form

Examples of evolaris.platform.smssvc.web.form.SendTaskDetailForm


   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form,
      HttpServletRequest req, HttpServletResponse resp) {

    SendTaskDetailForm detailForm = (SendTaskDetailForm)form;
    UserManagerBase userManager = new UserManager(locale,session);
    User user = userManager.getUserDetails(req.getUserPrincipal().getName().toLowerCase());

    String idParam = req.getParameter("id");
    if (idParam == null) {
      throw new BugException("missing id parameter");
    }
    long id = Long.parseLong(idParam);
    detailForm.setId(id);

    SendTaskManager sendTaskMgm = new SendTaskManager(locale, session);

    SendTask sendTask = sendTaskMgm.getSendTask(id);
    if (sendTask == null || !accessAllowed(user, sendTask)) {
      throw new InputException(getResources(req).getMessage(locale, "smssvc.sendTaskNotAvailable"));
    }

    SendTaskReceiver[] receivers = sendTaskMgm.getReceivers(sendTask, detailForm.getShowFailed(), detailForm.getShowPending(), detailForm.getShowRelayed(), detailForm.getShowSending());
    req.setAttribute("task", sendTask);
    req.setAttribute("task_content", sendTask.getContent().replace("\n", "<br />"));
    req.setAttribute("receivers", receivers);
    return mapping.findForward("list");
  }
View Full Code Here

TOP

Related Classes of evolaris.platform.smssvc.web.form.SendTaskDetailForm

Copyright © 2018 www.massapicom. 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.