Package org.b3log.solo.model.sitemap

Examples of org.b3log.solo.model.sitemap.Sitemap


    public void sitemap(final HTTPRequestContext context) {
        final TextXMLRenderer renderer = new TextXMLRenderer();

        context.setRenderer(renderer);

        final Sitemap sitemap = new Sitemap();

        try {
            addArticles(sitemap);
            addNavigations(sitemap);
            addTags(sitemap);
            addArchives(sitemap);

            LOGGER.log(Level.INFO, "Generating sitemap....");
            final String content = sitemap.toString();

            LOGGER.log(Level.INFO, "Generated sitemap");
            renderer.setContent(content);
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Get blog article feed error", e);
View Full Code Here


    @RequestProcessing(value = {"/sitemap.xml"}, method = HTTPRequestMethod.GET)
    public void sitemap(final HTTPRequestContext context) {
        final TextXMLRenderer renderer = new TextXMLRenderer();
        context.setRenderer(renderer);

        final Sitemap sitemap = new Sitemap();

        try {
            final JSONObject preference = preferenceQueryService.getPreference();

            addArticles(sitemap, preference);
            addPages(sitemap, preference);
            addTags(sitemap, preference);
            addArchives(sitemap, preference);

            LOGGER.log(Level.INFO, "Generating sitemap....");
            final String content = sitemap.toString();
            LOGGER.log(Level.INFO, "Generated sitemap");
            renderer.setContent(content);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, "Get blog article feed error", e);
View Full Code Here

TOP

Related Classes of org.b3log.solo.model.sitemap.Sitemap

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.