Package org.apache.roller.model

Examples of org.apache.roller.model.Roller


   
    /**
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() throws JspException {
        Roller roller = RollerFactory.getRoller();
        WeblogEntryData entry = (WeblogEntryData)
            RequestUtils.lookup(pageContext, name, property, scope)
       
        String sourceText = null;
        boolean hasSummary = Utilities.isNotEmpty(entry.getSummary());
        boolean hasText= Utilities.isNotEmpty(entry.getText());
        if (singleEntry) {
            if (hasText) sourceText = entry.getText();
            else if (hasSummary) sourceText = entry.getSummary();
        } else {
            if (hasSummary) sourceText = entry.getSummary();
            else if (hasText) sourceText = entry.getText();
        }
        if (Utilities.isNotEmpty(sourceText)) {
            try {
                String xformed = sourceText;       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    try {
                        PagePluginManager ppmgr = roller.getPagePluginManager();
                        Map plugins = ppmgr.createAndInitPagePlugins(
                                entry.getWebsite(), rctx.getServletContext(),
                                rctx.getAbsoluteContextUrl((HttpServletRequest)pageContext.getRequest()),
                                new VelocityContext());

View Full Code Here


        if (website != null) {
            request.getSession().setAttribute(HANDLE, website.getHandle());
        }
        else {
            String handle = (String)request.getSession().getAttribute(HANDLE);
            Roller roller = RollerFactory.getRoller();
            website = roller.getUserManager().getWebsiteByHandle(handle);
        }
        return website;
    }
View Full Code Here

        ActionForm          actionForm,
        HttpServletRequest  request,
        HttpServletResponse response)
        throws RollerException
    {
        Roller roller = RollerFactory.getRoller();
        BookmarksPageModel pageModel = new BookmarksPageModel(
            request, response, mapping, (BookmarksForm)actionForm);
        WebsiteData website = pageModel.getFolder().getWebsite();
        if (RollerSession.getRollerSession(request).isUserAuthorizedToAuthor(website))
        {
            BookmarkManager bmgr = roller.getBookmarkManager();
            BookmarksForm form = (BookmarksForm)actionForm;

            mLogger.debug("Deleting folders and bookmarks.");

            String folders[] = form.getSelectedFolders();
View Full Code Here

        HttpServletResponse response)
        throws RollerException
    {
        ActionMessages messages = new ActionMessages();
        ActionForward forward = mapping.findForward("BookmarksForm");
        Roller roller = RollerFactory.getRoller();
        BookmarksPageModel pageModel = new BookmarksPageModel(
            request, response, mapping, (BookmarksForm)actionForm);
        request.setAttribute("model", pageModel);
        WebsiteData website = pageModel.getFolder().getWebsite();

        if (RollerSession.getRollerSession(request).isUserAuthorizedToAuthor(website))
        {
            try
            {
                BookmarkManager bmgr = roller.getBookmarkManager();
                BookmarksForm form = (BookmarksForm)actionForm;
   
                mLogger.debug("Moving folders and bookmarks to folder, id="
                    + form.getMoveToFolderId());
   
View Full Code Here

        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

            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetConfigData config = planet.getConfiguration();
                PlanetConfigForm form = (PlanetConfigForm)actionForm;
                if (config != null)
                {
                    form.copyFrom(config, request.getLocale());
View Full Code Here

            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = RollerFactory.getRoller();
                PlanetManager planet = roller.getPlanetManager();
                PlanetConfigData config = planet.getConfiguration();
                if (config == null)
                {
                    config = new PlanetConfigData();
                }
                PlanetConfigForm form = (PlanetConfigForm) actionForm;
                ActionErrors errors = validate(form);
                if (errors.isEmpty())
                {
                    form.copyTo(config, request.getLocale());
                    planet.saveConfiguration(config);
                    if (planet.getGroup("external") == null)
                    {
                        PlanetGroupData group = new PlanetGroupData();
                        group.setHandle("external");
                        group.setTitle("external");
                        planet.saveGroup(group);
                    }
                    roller.flush();
                    ActionMessages messages = new ActionMessages();
                    messages.add(null, new ActionMessage("planetConfig.success.saved"));
                    saveMessages(request, messages);
                }               
                else
View Full Code Here

            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = RollerFactory.getRoller();
                RefreshEntriesTask task = new RefreshEntriesTask();
                task.init(roller, "dummy");
                roller.getThreadManager().executeInBackground(task);
               
                ActionMessages messages = new ActionMessages();
                messages.add(null,
                        new ActionMessage("planetConfig.success.refreshed"));
                saveMessages(request, messages);
View Full Code Here

            if (RollerSession.getRollerSession(request).isGlobalAdminUser())
            {
                BasePageModel pageModel = new BasePageModel(
                    "planetConfig.pageTitle", request, response, mapping);
                request.setAttribute("model",pageModel);               
                Roller roller = (Roller)RollerFactory.getRoller();
                SyncWebsitesTask task = new SyncWebsitesTask();
                task.init(roller, "dummy");
                roller.getThreadManager().executeInBackground(task);
                ActionMessages messages = new ActionMessages();
                messages.add(null,
                        new ActionMessage("planetConfig.success.synced"));
                saveMessages(request, messages);
            }
View Full Code Here

   
    /**
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() throws JspException {
        Roller roller = RollerFactory.getRoller();
        WeblogEntryData entry = (WeblogEntryData)
            RequestUtils.lookup(pageContext, name, property, scope);
        if (Utilities.isNotEmpty(entry.getSummary())) {
            String xformed = entry.getSummary();
            try {       
                if (entry.getPlugins() != null) {
                    RollerContext rctx =
                        RollerContext.getRollerContext();
                    PagePluginManager ppmgr = roller.getPagePluginManager();
                    Map plugins = ppmgr.createAndInitPagePlugins(
                        entry.getWebsite(),
                        rctx.getServletContext(),
                        rctx.getAbsoluteContextUrl((HttpServletRequest)pageContext.getRequest()),
                        new VelocityContext());
View Full Code Here

TOP

Related Classes of org.apache.roller.model.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.