Package org.apache.roller.weblogger.pojos

Examples of org.apache.roller.weblogger.pojos.ThemeTemplate


                mLogger.error("error getting weblog pages", ex);
            }
           
            Iterator pageIter = pages.iterator();
            while (pageIter.hasNext()) {
                ThemeTemplate page = (ThemeTemplate) pageIter.next();
                mPageMap.put(page.getName(),ThemeTemplateWrapper.wrap(page));
            }
        }
    }
View Full Code Here


        mLogger.debug("looking up page ["+pageName+"]");
       
        String template_id = null;
       
        try {
            ThemeTemplate pd = mWebsite.getTheme().getTemplateByName(pageName);
            if(pd != null) {
                template_id = pd.getId();
            }
        } catch(Exception e) {
            mLogger.error(e);
        }
       
View Full Code Here

        if(this.weblogRequest == null) {
            throw new WebloggerException("expected weblogRequest from init data");
        }
       
        if (weblogRequest instanceof WeblogPageRequest) {
            ThemeTemplate weblogPage = ((WeblogPageRequest)weblogRequest).getWeblogPage();
            pageLink = (weblogPage != null) ? weblogPage.getLink() : null;
            pageNum = ((WeblogPageRequest)weblogRequest).getPageNum();
            tags = ((WeblogPageRequest)weblogRequest).getTags();
        } else if (weblogRequest instanceof WeblogFeedRequest) {
            this.feedRequest = (WeblogFeedRequest) weblogRequest;
            tags = feedRequest.getTags();
View Full Code Here

            // add it to the theme
            setResource(resourcePath, new SharedThemeResourceFromDir(resourcePath, resourceFile));
        }
       
        // go through templates and read in contents to a ThemeTemplate
        ThemeTemplate theme_template = null;
        ThemeMetadataTemplate templateMetadata = null;
        Iterator templatesIter = themeMetadata.getTemplates().iterator();
        while (templatesIter.hasNext()) {
            templateMetadata = (ThemeMetadataTemplate) templatesIter.next();
           
View Full Code Here

       
        Map pages = new TreeMap();
       
        // first get the pages from the db
        try {
            ThemeTemplate template = null;
            UserManager userMgr = WebloggerFactory.getWeblogger().getUserManager();
            Iterator dbPages = userMgr.getPages(this.weblog).iterator();
            while(dbPages.hasNext()) {
                template = (ThemeTemplate) dbPages.next();
                pages.put(template.getName(), template);
            }
        } catch(Exception e) {
            // db error
            log.error(e);
        }
       
       
        // now get theme pages if needed and put them in place of db pages
        try {
            ThemeTemplate template = null;
            Iterator themePages = this.theme.getTemplates().iterator();
            while(themePages.hasNext()) {
                template = (ThemeTemplate) themePages.next();
               
                // note that this will put theme pages over custom
                // pages in the pages list, which is what we want
                pages.put(template.getName(), template);
            }
        } catch(Exception e) {
            // how??
            log.error(e);
        }
View Full Code Here

        if(this.weblogRequest == null) {
            throw new WebloggerException("expected weblogRequest from init data");
        }
       
        if (weblogRequest instanceof WeblogPageRequest) {
            ThemeTemplate weblogPage = ((WeblogPageRequest)weblogRequest).getWeblogPage();
            pageLink = (weblogPage != null) ? weblogPage.getLink() : null;
            pageNum = ((WeblogPageRequest)weblogRequest).getPageNum();
       
       
        // look for url strategy
        urlStrategy = (URLStrategy) initData.get("urlStrategy");
View Full Code Here

        // stylesheet is handled differently than other templates because with
        // the stylesheet we want to return the weblog custom version if it
        // exists, otherwise we return the shared theme version
       
        // load from theme first to see if we even support a stylesheet
        ThemeTemplate stylesheet = this.theme.getStylesheet();
        if(stylesheet != null) {
            // now try getting custom version from weblog
            UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
            ThemeTemplate override = umgr.getPageByLink(this.weblog, stylesheet.getLink());
            if(override != null) {
                stylesheet = override;
            }
        }
       
View Full Code Here

    public ThemeTemplate getTemplateByName(String name) throws WebloggerException {
       
        if(name == null)
            return null;
       
        ThemeTemplate template = null;
       
        // if name refers to the stylesheet then return result of getStylesheet()
        ThemeTemplate stylesheet = getStylesheet();
        if(stylesheet != null && name.equals(stylesheet.getName())) {
            return stylesheet;
        }
       
        // first check if this user has selected a theme
        // if so then return the proper theme template
View Full Code Here

    public ThemeTemplate getTemplateByLink(String link) throws WebloggerException {
       
        if(link == null)
            return null;
       
        ThemeTemplate template = null;
       
        // if name refers to the stylesheet then return result of getStylesheet()
        ThemeTemplate stylesheet = getStylesheet();
        if(stylesheet != null && link.equals(stylesheet.getLink())) {
            return stylesheet;
        }
       
        // first check if this user has selected a theme
        // if so then return the proper theme template
View Full Code Here

       
        try {
            UserManager userMgr = roller.getUserManager();
           
            Set importedActionTemplates = new HashSet();
            ThemeTemplate themeTemplate = null;
            ThemeTemplate stylesheetTemplate = theme.getStylesheet();
            Iterator iter = theme.getTemplates().iterator();
            while ( iter.hasNext() ) {
                themeTemplate = (ThemeTemplate) iter.next();
               
                WeblogTemplate template = null;
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.pojos.ThemeTemplate

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.