Package evolaris.framework.smsservices.datamodel

Examples of evolaris.framework.smsservices.datamodel.ImageRecognitionCommandEntry


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

   
    ImageRecognitionCommandEntry commandEntry = new ImageRecognitionCommandEntry();
    Group group = groupFromSession(req);
    checkAccessRights(req, group);
    commandEntry.setGroup(group);
    commandEntry.setSortLabel(f.getSortLabel());
    commandEntry.setFolderSuffix(Integer.parseInt(f.getFolderSuffix()));
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": Created image recognition entry ");
    setCommandEntryInRequest(req, commandEntry);
    return mapping.findForward("created");
  }
View Full Code Here


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

    ImageRecognitionInteractionEnterOrEditForm f = (ImageRecognitionInteractionEnterOrEditForm)form;

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

    f.setCommandEntryId(commandEntry.getId());
    f.setSortLabel(commandEntry.getSortLabel());
    f.setFolderSuffix(Integer.toString(commandEntry.getFolderSuffix()));

    req.getSession().setAttribute("enterOrEdit", "edit");
    req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath"));
    return mapping.findForward("edit");
  }
View Full Code Here

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

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

    commentCommandEntry.setSortLabel(f.getSortLabel());
    commentCommandEntry.setFolderSuffix(Integer.parseInt(f.getFolderSuffix()));
    LOGGER.info("User " + req.getUserPrincipal().getName().toLowerCase() + ": comment entry #" + commandEntryId + " has been modified;");
    setCommandEntryInRequest(req, commentCommandEntry);
    return mapping.findForward("modified");
  }
View Full Code Here

TOP

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

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.