Package evolaris.framework.smsservices.datamodel

Examples of evolaris.framework.smsservices.datamodel.InteractionLogCommandEntry


    MessageResources resources = getResources(req);
    if (interactionLogForm.getSortLabel() == null ||  interactionLogForm.getSortLabel().equals("")){
      throw new InputException(resources.getMessage(locale, "smssvc.labelMustBeProvided"));
    }

    InteractionLogCommandEntry commandEntry = new InteractionLogCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);

    evaluateForm(req, interactionLogForm, commandEntry);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Create interaction log entry with operation: " + commandEntry.getOperation() + "; parameter: " + commandEntry.getParameter());
    setCommandEntryInRequest(req, commandEntry);
    return mapping.findForward("created");
  }
View Full Code Here


  public ActionForward edit(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {

    InteractionLogInteractionEnterOrEditForm interactionLogForm = (InteractionLogInteractionEnterOrEditForm)form;

    InteractionLogCommandEntry commandEntry = (InteractionLogCommandEntry)commandEntryFromRequest(req);
    if(commandEntry == null){
      MessageResources resources = getResources(req);
      throw new InputException(resources.getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"));
    }
    checkAccessRights(req, commandEntry.getGroup());

    interactionLogForm.setCommandEntryId(commandEntry.getId());
    interactionLogForm.setCommandType(commandEntry.getInteractionLogCommandEntryType());
    interactionLogForm.setOperation(commandEntry.getOperation());
    interactionLogForm.setParameterSelection(commandEntry.getInteractionLogCommandEntryType() == 0 ? commandEntry.getParameterFromContent() : null);
    interactionLogForm.setParameter(commandEntry.getParameter());
    interactionLogForm.setUserSetId(commandEntry.getLogUserSet() == null ? -1 : commandEntry.getLogUserSet().getId() );
    if (commandEntry.getLogCurrentUserSet() == 1) {
      interactionLogForm.setUserSetId(-2)
    }
    interactionLogForm.setLogContact(commandEntry.getLogContact() != 0);
    interactionLogForm.setSortLabel(commandEntry.getSortLabel());

    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    req.getSession().setAttribute("userSets", new UserSetManager(locale,session).getUserSets(commandEntry.getGroup()));
    return mapping.findForward("edit");
  }
View Full Code Here

    CommandEntry commandEntry = commandEntryManager.getCommandEntry(commandEntryId);
    if (commandEntry == null || !(commandEntry instanceof InteractionLogCommandEntry)){
      throw new InputException(getResources(req).getMessage(locale, "smssvc.editedInteractionDoesNotExistAnymore"))// may have been deleted
    }

    InteractionLogCommandEntry interactionLogCommandEntry = (InteractionLogCommandEntry)commandEntry;
    checkAccessRights(req, interactionLogCommandEntry.getGroup());
    commandEntryManager.evict(interactionLogCommandEntry)// do not modify in this session yet (might be erroneous)

    evaluateForm(req, interactionLogForm, interactionLogCommandEntry);
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Interaction Log  entry #" + commandEntryId + " has been modified to operation: " + interactionLogCommandEntry.getOperation() + "; parameter: " + interactionLogCommandEntry.getParameter());
    setCommandEntryInRequest(req, interactionLogCommandEntry);
    return mapping.findForward("modified");
  }
View Full Code Here

        breakLabel = sortLabel;
      }
     
      // add operation prefix to interaction log descriptions and check for empty operation values unless the list is a fragment
      if (commandEntry instanceof InteractionLogCommandEntry){
        InteractionLogCommandEntry interactionLogCommandEntry = (InteractionLogCommandEntry)commandEntry;
        if (!interaction.isError() && !isFragment && operationPrefix == null && interactionLogCommandEntry.getOperation() == null){
          interaction.setError(true);
          interaction.setErrorDescription(messages.getString("smssvc.OperationValueMissing"));
        }
        interaction.setInteractionDescription(((InteractionLogCommandEntryExtender) commandEntryExtender).readableCommandDescription(req,operationPrefix));
      }
View Full Code Here

TOP

Related Classes of evolaris.framework.smsservices.datamodel.InteractionLogCommandEntry

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.