Package org.apache.roller.business

Examples of org.apache.roller.business.Roller


                String newTheme = null;
               
                // lookup what theme the user wants first
                String theme = request.getParameter("theme");
                try {
                    Roller roller = RollerFactory.getRoller();
                    ThemeManager themeMgr = roller.getThemeManager();
                    Theme previewTheme = themeMgr.getTheme(theme);
                   
                    if(previewTheme.isEnabled()) {
                        newTheme = previewTheme.getName();
                    } else {
View Full Code Here


                BasePageModel pageModel = new BasePageModel(
                        "themeEditor.title", request, response, mapping);
                request.setAttribute("model",pageModel);         
                   
                // copy down current theme to weblog templates
                Roller roller = RollerFactory.getRoller();
                ThemeManager themeMgr = roller.getThemeManager();
               
                String username = rses.getAuthenticatedUser().getUserName();
               
                try {
                    Theme usersTheme = themeMgr.getTheme(website.getEditorTheme());
View Full Code Here

     * Migrate data from the old roller config.
     * This is called only if the existing runtime properties are empty.
     */
    private Map migrateOldRollerConfig(Map props) {
        // try to get the old config
        Roller roller = RollerFactory.getRoller();
        RollerConfigData rollerConfig = null;
       
        try {
            rollerConfig = roller.getConfigManager().getRollerConfig();
        } catch (Exception e) {
            // We currently treat any exception obtaining the roller config
            // as if we had not found it.
            log.error(e);
        }
View Full Code Here

        int entryCount =
                RollerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries");
       
        List results = new ArrayList();
        try {            
            Roller roller = RollerFactory.getRoller();
            WeblogManager wmgr = roller.getWeblogManager();
            List entries = wmgr.getWeblogEntries(
                    weblog,
                    null,
                    null,
                    new Date(),
View Full Code Here

    public static class MemberPermissionsPageModel extends BasePageModel {
        private List permissions = new ArrayList();
        public MemberPermissionsPageModel(HttpServletRequest request,
                HttpServletResponse response, ActionMapping mapping) throws RollerException {
            super("memberPermissions.title", request, response, mapping);
            Roller roller = RollerFactory.getRoller();
            RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rollerSession = RollerSession.getRollerSession(request);
            WebsiteData website = rreq.getWebsite();
            permissions = roller.getUserManager().getAllPermissions(website);
        }
View Full Code Here

            this.limit = hits.length() - this.offset;
        }
       
        try {
            TreeSet categories = new TreeSet();
            Roller roller = RollerFactory.getRoller();
            WeblogManager weblogMgr = roller.getWeblogManager();
           
            WeblogEntryData entry = null;
            Document doc = null;
            String handle = null;
            Timestamp now = new Timestamp(new Date().getTime());
View Full Code Here

        mWebsite = website;
        mDate = date;
        mFolder = folder;
       
        // init plugins
        Roller roller = RollerFactory.getRoller();
        PluginManager ppmgr = roller.getPagePluginManager();
        mPagePlugins = ppmgr.getWeblogEntryPlugins(mWebsite);
    }
View Full Code Here

            ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws IOException, ServletException {
        ActionForward forward = mapping.findForward("planetSubscriptions.page");
        try {
            if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm;
                if (request.getParameter("feedUrl") != null) {
                    String feedUrl = request.getParameter("feedUrl");
                    PlanetSubscriptionData sub =
                            planet.getSubscription(feedUrl);
View Full Code Here

            ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws IOException, ServletException {
        ActionForward forward = mapping.findForward("planetSubscriptions.page");
        try {
            if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm;
               
                form.doReset(mapping, request);
               
                String groupHandle = request.getParameter("groupHandle");
View Full Code Here

            HttpServletResponse response) throws IOException, ServletException {
        ActionForward forward = mapping.findForward("planetSubscriptions.page");
        try {
            //RollerRequest rreq = RollerRequest.getRollerRequest(request);
            if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetSubscriptionFormEx form = (PlanetSubscriptionFormEx)actionForm;
                if (form.getId() != null) {
                    PlanetSubscriptionData sub =
                            planet.getSubscriptionById(form.getId());
                   
                    String groupHandle = request.getParameter("groupHandle");
                    groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle;
                    groupHandle = (groupHandle == null) ? "external" : groupHandle;
                   
                    PlanetGroupData targetGroup = planet.getGroup(groupHandle);
                   
                    targetGroup.getSubscriptions().remove(sub);
                    planet.deleteSubscription(sub);
                    roller.flush();
                    // TODO: why release here?
                    roller.release();
                   
                    form.doReset(mapping, request);
                   
                    form.setGroupHandle(groupHandle);
                    request.setAttribute("model",
View Full Code Here

TOP

Related Classes of org.apache.roller.business.Roller

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.