Package com.jada.util

Examples of com.jada.util.JSONEscapeObject


      homePageDetail.setFeatureData(hasFeature ? Constants.ACTIVE_NO : Constants.VALUE_YES);
      homePage.getHomePageDetails().add(homePageDetail);
      em.persist(homePageDetail);
    }
   
    JSONEscapeObject JSONEscapeObject = new JSONEscapeObject();
    JSONEscapeObject.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    form.setStream(true);
    form.setStreamData(JSONEscapeObject.toHtmlString());
    return null;
  }
View Full Code Here


        found = true;
        break;
      }
    }
    if (found) {
      JSONEscapeObject jsonResult = new JSONEscapeObject();
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.record.duplicate"));
      streamWebService(response, jsonResult.toHtmlString());
    }
    Category category = CategoryDAO.load(siteId, Format.getLong(form.getCatId()));
    if (category == null) {
      JSONEscapeObject jsonResult = new JSONEscapeObject();
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.category.notexist"));
      streamWebService(response, jsonResult.toHtmlString());
    }
    coupon.getCategories().add(category);
    String result = getJSONCategoryList(coupon);
    streamWebService(response, result);
    return null;
View Full Code Here

        }
        homePage.getHomePageDetails().remove(homePageDetail);
        em.remove(homePageDetail);
      }
    }
    JSONEscapeObject JSONEscapeObject = new JSONEscapeObject();
    JSONEscapeObject.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    form.setStream(true);
    form.setStreamData(JSONEscapeObject.toHtmlString());
    return null;
  }
View Full Code Here

    content = ContentDAO.load(site.getSiteId(), Format.getLong(form.getContentId()));
    content.setContentHitCounter(new Integer(0));
    content.setRecUpdateBy(adminBean.getUser().getUserId());
    content.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
   
      JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    this.streamWebService(response, jsonString);
    em.getTransaction().commit();
      return null;
  }
View Full Code Here

    AdminBean adminBean = getAdminBean(request);
    Site site = adminBean.getSite();

    Content content = new Content();
    content = ContentDAO.load(site.getSiteId(), Format.getLong(form.getContentId()));
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    Iterator<?> iterator = content.getComments().iterator();
    Vector<JSONEscapeObject> comments = new Vector<JSONEscapeObject>();
    while (iterator.hasNext()) {
      Comment comment = (Comment) iterator.next();
      JSONEscapeObject jsonComment = new JSONEscapeObject();
      jsonComment.put("commentId", comment.getCommentId());
      jsonComment.put("commentTitle", comment.getCommentTitle());
      jsonComment.put("comment", comment.getComment());
      jsonComment.put("moderation", comment.getModeration());
      jsonComment.put("commentApproved", comment.getCommentApproved());
      jsonComment.put("custEmail", comment.getCustomer().getCustEmail());
      jsonComment.put("custPublicName", comment.getCustomer().getCustPublicName());
      jsonComment.put("recCreateDatetime", Format.getFullDatetime(comment.getRecCreateDatetime()));
      jsonComment.put("agreeCount", comment.getAgreeCustomers().size());
      jsonComment.put("disagreeCount", comment.getDisagreeCustomers().size());
      comments.add(jsonComment);
    }
    jsonResult.put("comments", comments);
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
View Full Code Here

    Site site = adminBean.getSite();
    ContentMaintActionForm form = (ContentMaintActionForm) actionForm;
    initSiteProfiles(form, adminBean.getSite());
    Content content = new Content();
    content = ContentDAO.load(site.getSiteId(), Format.getLong(form.getContentId()));
    JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    String jsonString = jsonResult.toHtmlString();
    this.streamWebService(response, jsonString);
    return null;
  }
View Full Code Here

        content.getCategories().add(category);
        content.setRecUpdateBy(adminBean.getUser().getUserId());
        content.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      }
    }
      JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
      return null;
  }
View Full Code Here

      return null;
  }

 
  public JSONEscapeObject createJsonSelectedCategories(String siteId, Content content) throws Exception {
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    Vector<JSONEscapeObject> categories = new Vector<JSONEscapeObject>();
    for (Category category : content.getCategories()) {
      JSONEscapeObject categoryObject = new JSONEscapeObject();
      categoryObject.put("catId", category.getCatId());
      categoryObject.put("catTitle", category.getCategoryLanguage().getCatTitle());
      categoryObject.put("catShortTitle", category.getCategoryLanguage().getCatShortTitle());
      categories.add(categoryObject);
    }
    jsonResult.put("categories", categories);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
View Full Code Here

    }
   
    content.setRecUpdateBy(adminBean.getUser().getUserId());
    content.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
 
      JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
    return null;
  }
View Full Code Here

    em.getTransaction().commit();
    return null;
  }
 
  public JSONEscapeObject createJsonSelectedMenus(String siteId, Content content, Long siteProfileClassId) throws Exception {
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    Iterator<?> iterator = content.getMenus().iterator();
    Vector<JSONEscapeObject> menus = new Vector<JSONEscapeObject>();
    while (iterator.hasNext()) {
      Menu menu = (Menu) iterator.next();
      JSONEscapeObject menuObject = new JSONEscapeObject();
      menuObject.put("menuId", menu.getMenuId());
      menuObject.put("menuLongDesc", Utility.formatMenuName(siteId, menu.getMenuId(), siteProfileClassId));
      menuObject.put("siteDomainName", menu.getSiteDomain().getSiteDomainLanguage().getSiteName());
      menus.add(menuObject);
    }
    jsonResult.put("menus", menus);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
View Full Code Here

TOP

Related Classes of com.jada.util.JSONEscapeObject

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.