Package com.appspot.finajjarane.framework.models

Examples of com.appspot.finajjarane.framework.models.ToolModelForDao


      @RequestParam("toolDescription_fr_FR"String      toolDescription_fr_FR,
      HttpServletRequest httpServletRequest){



    ToolModelForDao toolModel = new ToolModelForDao();
    Map<String, Text> description = new HashMap<String, Text>();

    description.put("ar_AR", new Text(toolDescription_ar_AR));
    description.put("en_US", new Text(toolDescription_en_US));
    description.put("fr_FR", new Text(toolDescription_fr_FR));

    toolModel.setTitle(toolTitle.trim());
    toolModel.setTags(toolTags);
    toolModel.setDescription(description);
    toolModel.setImage(iImageService.getImageKeyUploaded(httpServletRequest, "toolImage"));

    Map<String, Object> data = new HashMap<String, Object>();

    try {
      iToolService.toolCreateNew(toolModel);
View Full Code Here


      @RequestParam(value="toolDeleteImage", required = false)       boolean      toolDeleteImage,
      HttpServletRequest httpServletRequest){

    Map<String, Object> data = new HashMap<String, Object>();

    ToolModelForDao toolModelFroDao = new ToolModelForDao();

    try {
      Map<String, Text> description = new HashMap<String, Text>();
      ToolModel toolModel = iToolService.getTool(toolId);

      description.put("ar_AR", new Text(toolDescription_ar_AR));
      description.put("en_US", new Text(toolDescription_en_US));
      description.put("fr_FR", new Text(toolDescription_fr_FR));


      toolModelFroDao.setId(toolId);
      toolModelFroDao.setTitle(toolTitle.trim());
      toolModelFroDao.setDescription(description);
      toolModelFroDao.setTags(toolTags);

      String keyImage = iImageService.getImageKeyUploaded(httpServletRequest, "toolImage");



      if(toolDeleteImage){
        toolModelFroDao.setImage(null);
      }
      else if(null!=keyImage && !keyImage.isEmpty()){
        toolModelFroDao.setImage(keyImage);
      }
      else{
        toolModelFroDao.setImage(this.iToolService.getTool(toolModel.getId()).getImage());
      }

      iToolService.toolUpdate(toolModelFroDao);

    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.appspot.finajjarane.framework.models.ToolModelForDao

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.