Package evolaris.platform.smssvc.web.form

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


   *      org.apache.struts.action.ActionForm,
   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    AccessCheckInteractionEnterOrEditForm timeCheckForm = (AccessCheckInteractionEnterOrEditForm)form;
    timeCheckForm.setSortLabel(sortLabelProposalFromSession(req));
    req.getSession().setAttribute("enterOrEdit", "enter");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("enter");
  }
View Full Code Here


   *      org.apache.struts.action.ActionForm,
   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    AccessCheckInteractionEnterOrEditForm accessCheckForm = (AccessCheckInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    AccessCheckCommandEntry accessCheckCommandEntry = accessCheckForm.toEntry(new AccessCheckCommandEntry(), group, locale, session, resources);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created access check entry. id: " + accessCheckCommandEntry.getId() + " begin DateTime: " + accessCheckForm.getBeginDate() + " end DateTime: " + accessCheckForm.getEndDate());
    setCommandEntryInRequest(req, accessCheckCommandEntry);
    return mapping.findForward("created");
  }
View Full Code Here

    return mapping.findForward("created");
  }
 
 
  protected ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
    AccessCheckInteractionEnterOrEditForm accessCheckForm = (AccessCheckInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    AccessCheckCommandEntry commandEntry = (AccessCheckCommandEntry)commandEntryFromRequest(req);
    if(commandEntry == null){
      throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
    }
    checkAccessRights(req, commandEntry.getGroup());
    accessCheckForm.initialize(commandEntry, locale, session, getResources(req));
    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("edit");
  }
View Full Code Here

   *      org.apache.struts.action.ActionForm,
   *      javax.servlet.http.HttpServletRequest,
   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward modify(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    AccessCheckInteractionEnterOrEditForm accessCheckForm = (AccessCheckInteractionEnterOrEditForm)form;
    MessageResources resources = getResources(req);
    long commandEntryId = accessCheckForm.getCommandEntryId();
    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof AccessCheckCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }
    AccessCheckCommandEntry accessCheckCommandEntry = (AccessCheckCommandEntry)commandEntry;
    checkAccessRights(req, accessCheckCommandEntry.getGroup());
    commandEntryManager.evict(accessCheckCommandEntry)// do not modify in this session yet (might be erroneous)
    accessCheckForm.toEntry(accessCheckCommandEntry, accessCheckCommandEntry.getGroup(), locale, session, resources);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Command Entry with id: " + commandEntryId + " has been modified");
    setCommandEntryInRequest(req, accessCheckCommandEntry);
    return mapping.findForward("modified");
  }
View Full Code Here

TOP

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

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.