Package com.mossle.cms.domain

Examples of com.mossle.cms.domain.CmsCatalog


    }

    public void renderDetail(CmsArticle cmsArticle) {
        try {
            Map<String, Object> data = new HashMap<String, Object>();
            CmsCatalog cmsCatalog = cmsArticle.getCmsCatalog();
            data.put("article", cmsArticle);
            data.put("catalog", cmsCatalog);

            String html = templateService.render(
                    cmsCatalog.getTemplateDetail(), data);
            String path = baseDir + "/cms/html/" + cmsArticle.getId() + ".html";
            PrintWriter writer = new PrintWriter(new OutputStreamWriter(
                    new FileOutputStream(path), "UTF-8"));
            writer.print(html);
            writer.flush();
View Full Code Here


        }
    }

    public String view(CmsArticle cmsArticle) {
        Map<String, Object> data = new HashMap<String, Object>();
        CmsCatalog cmsCatalog = cmsArticle.getCmsCatalog();
        data.put("article", cmsArticle);
        data.put("catalog", cmsCatalog);

        return templateService.render(cmsCatalog.getTemplateDetail(), data);
    }
View Full Code Here

        return "cms/index";
    }

    @RequestMapping("catalog")
    public String catalog(@RequestParam("id") Long id, Model model) {
        CmsCatalog cmsCatalog = cmsCatalogManager.get(id);
        model.addAttribute("cmsCatalog", cmsCatalog);

        return "cms/catalog";
    }
View Full Code Here

    @RequestMapping("cms-catalog-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            CmsCatalog cmsCatalog = cmsCatalogManager.get(id);
            model.addAttribute("model", cmsCatalog);
        }

        return "cms/cms-catalog-input";
    }
View Full Code Here

    @RequestMapping("cms-catalog-save")
    public String save(@ModelAttribute CmsCatalog cmsCatalog,
            RedirectAttributes redirectAttributes) {
        Long id = cmsCatalog.getId();
        CmsCatalog dest = null;

        if (id != null) {
            dest = cmsCatalogManager.get(id);
            beanMapper.copy(cmsCatalog, dest);
        } else {
View Full Code Here

        if (id != null) {
            hql = "from CmsCatalog where name=? and id<>?";
            params = new Object[] { name, id };
        }

        CmsCatalog cmsCatalog = cmsCatalogManager.findUnique(hql, params);

        boolean result = (cmsCatalog == null);

        return result;
    }
View Full Code Here

TOP

Related Classes of com.mossle.cms.domain.CmsCatalog

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.