Package org.apache.roller.model

Examples of org.apache.roller.model.ThemeManager


                    "basic",        // theme
                    "en_US_WIN",    // locale
                    "America/Los_Angeles" // timezone
                    );
       
        ThemeManager themeMgr = getRoller().getThemeManager();
        Theme usersTheme = themeMgr.getTheme(website.getEditorTheme());
        themeMgr.saveThemePages(website, usersTheme);
       
        return ud;
    }
View Full Code Here


       
        // first check if this user has selected a theme
        // if so then return the themes Weblog template
        if(this.editorTheme != null && !this.editorTheme.equals(Theme.CUSTOM)) {
            try {
                ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
                Theme usersTheme = themeMgr.getTheme(this.editorTheme);
               
                // this is a bit iffy :/
                // we assume that all theme use "Weblog" for a default template
                template = usersTheme.getTemplate("Weblog");
               
View Full Code Here

           
            // only continue if this looks like a theme id
            // and the theme name matches this users current theme
            if(split.length == 2 && split[0].equals(this.editorTheme)) {
                try {
                    ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
                    Theme usersTheme = themeMgr.getTheme(this.editorTheme);
                    template = usersTheme.getTemplate(split[1]);
                   
                } catch(ThemeNotFoundException tnfe) {
                    // i sure hope not!
                    mLogger.error(tnfe);
View Full Code Here

        // first check if this user has selected a theme
        // if so then return the proper theme template
        if(this.editorTheme != null && !this.editorTheme.equals(Theme.CUSTOM)) {
           
            try {
                ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
                Theme usersTheme = themeMgr.getTheme(this.editorTheme);
                template = usersTheme.getTemplate(name);
               
            } catch(ThemeNotFoundException tnfe) {
                // i sure hope not!
                mLogger.error(tnfe);
View Full Code Here

        // first check if this user has selected a theme
        // if so then return the proper theme template
        if(this.editorTheme != null && !this.editorTheme.equals(Theme.CUSTOM)) {
           
            try {
                ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
                Theme usersTheme = themeMgr.getTheme(this.editorTheme);
                template = usersTheme.getTemplateByLink(link);
               
            } catch(ThemeNotFoundException tnfe) {
                // i sure hope not!
                mLogger.error(tnfe);
View Full Code Here

       
        // now get theme pages if needed and put them in place of db pages
        if(this.editorTheme != null && !this.editorTheme.equals(Theme.CUSTOM)) {
            try {
                Template template = null;
                ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
                Theme usersTheme = themeMgr.getTheme(this.editorTheme);
                Iterator themePages = usersTheme.getTemplates().iterator();
                while(themePages.hasNext()) {
                    template = (Template) themePages.next();
                   
                    // note that this will put theme pages over custom
View Full Code Here

            String[] split = name.split(":", 2);
            if(split.length < 2)
                throw new ResourceNotFoundException("Invalid ThemeRL key "+name);
           
            // lookup the template from the proper theme
            ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
            Theme theme = themeMgr.getTheme(split[0]);
            ThemeTemplate template = theme.getTemplate(split[1]);
           
            if(template == null)
                throw new ResourceNotFoundException("Template ["+split[1]+
                        "] doesn't seem to be part of theme ["+split[0]+"]");
View Full Code Here

            String[] split = name.split(":", 2);
            if(split.length < 2)
                return last_mod;
           
            // lookup the template from the proper theme
            ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
            Theme theme = themeMgr.getTheme(split[0]);
            ThemeTemplate template = theme.getTemplate(split[1]);
           
            if(template == null)
                return last_mod;
           
View Full Code Here

        // try getting the preview theme
        String themeName = request.getParameter("theme");
        if (themeName != null) {
            try {
                Roller roller = RollerFactory.getRoller();
                ThemeManager themeMgr = roller.getThemeManager();
                previewTheme = themeMgr.getTheme(themeName);
               
            } catch(ThemeNotFoundException tnfe) {
                // bogus theme specified ... don't worry about it
                // possibly "custom", but we'll handle that below
            } catch(RollerException re) {
View Full Code Here

                        "themeEditor.title", request, response, mapping);
                request.setAttribute("model",pageModel);         
                   
                // get users current theme and our themes list
                Roller roller = RollerFactory.getRoller();
                ThemeManager themeMgr = roller.getThemeManager();
               
                String username = rses.getAuthenticatedUser().getUserName();
                String currentTheme = website.getEditorTheme();
                List themes = themeMgr.getEnabledThemesList();
               
                // this checks if the website has a default page template
                // if not then we don't allow for a custom theme
                boolean allowCustomTheme = true;
                if(website.getDefaultPageId() == null
View Full Code Here

TOP

Related Classes of org.apache.roller.model.ThemeManager

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.