Package org.apache.roller.weblogger

Examples of org.apache.roller.weblogger.WebloggerException


            if(handle != null) {
                try {
                    UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
                    website = umgr.getWebsiteByHandle(handle, Boolean.TRUE);
                    if (website == null)
                        throw new WebloggerException();               
                } catch (WebloggerException ex) {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND, "Weblog handle not found.");
                    return;
                }   
            }
View Full Code Here


           
            // init velocity
            RuntimeSingleton.init(velocityProps);
           
        } catch (Exception e) {
            throw new WebloggerException(e);
        }
       
    }
View Full Code Here

                // lookup weblog specified by comment request
                UserManager uMgr = WebloggerFactory.getWeblogger().getUserManager();
                weblog = uMgr.getWebsiteByHandle(trackbackRequest.getWeblogHandle());
               
                if (weblog == null) {
                    throw new WebloggerException("unable to lookup weblog: "+
                            trackbackRequest.getWeblogHandle());
                }
               
                // lookup entry specified by comment request
                WeblogManager weblogMgr = WebloggerFactory.getWeblogger().getWeblogManager();
                entry = weblogMgr.getWeblogEntryByAnchor(weblog, trackbackRequest.getWeblogAnchor());
               
                if (entry == null) {
                    throw new WebloggerException("unable to lookup entry: "+
                            trackbackRequest.getWeblogAnchor());
                }
               
            } catch (Exception e) {
                // some kind of error parsing the request or looking up weblog
View Full Code Here

            // lookup weblog specified by comment request
            UserManager uMgr = WebloggerFactory.getWeblogger().getUserManager();
            weblog = uMgr.getWebsiteByHandle(commentRequest.getWeblogHandle());
           
            if(weblog == null) {
                throw new WebloggerException("unable to lookup weblog: "+
                        commentRequest.getWeblogHandle());
            }
           
            // lookup entry specified by comment request
            entry = commentRequest.getWeblogEntry();
            if(entry == null) {
                throw new WebloggerException("unable to lookup entry: "+
                        commentRequest.getWeblogAnchor());
            }
           
            // we know what the weblog entry is, so setup our urls
            dispatch_url = "/roller-ui/rendering/page/"+weblog.getHandle();
View Full Code Here

                            activationCode = null;
                        }
                    }
                    // In more unlikely event that three retries isn't enough
                    if (activationCode == null){
                        throw new WebloggerException("error.add.user.activationCodeInUse");
                    }
                }
                ud.setActivationCode(activationCode);
            }
           
View Full Code Here

    public void init(Map initData) throws WebloggerException {
       
        // we expect the init data to contain a weblogRequest object
        WeblogRequest weblogRequest = (WeblogRequest) initData.get("parsedRequest");
        if(weblogRequest == null) {
            throw new WebloggerException("expected weblogRequest from init data");
        }
       
        if(weblogRequest instanceof WeblogFeedRequest) {
            this.feedRequest = (WeblogFeedRequest) weblogRequest;
        } else {
            throw new WebloggerException("weblogRequest is not a WeblogFeedRequest."+
                    "  FeedModel only supports feed requests.");
        }
       
        // look for url strategy
        urlStrategy = (URLStrategy) initData.get("urlStrategy");
View Full Code Here

           
            if(categories.size() > 0) {
                this.categories = categories;
            }
        } catch(IOException e) {
            throw new WebloggerException(e);
        }
    }
View Full Code Here

        try {
            pageRequest = new WeblogPageRequest(request);

            weblog = pageRequest.getWeblog();
            if (weblog == null) {
                throw new WebloggerException("unable to lookup weblog: " + pageRequest.getWeblogHandle());
            }

            // is this the site-wide weblog?
            isSiteWide = WebloggerRuntimeConfig.isSiteWideWeblog(pageRequest.getWeblogHandle());
        } catch (Exception e) {
View Full Code Here

    public void init(Map initData) throws WebloggerException {
       
        // we expect the init data to contain a weblogRequest object
        WeblogRequest weblogRequest = (WeblogRequest) initData.get("parsedRequest");
        if(weblogRequest == null) {
            throw new WebloggerException("expected weblogRequest from init data");
        }
       
        // PageModel only works on page requests, so cast weblogRequest
        // into a WeblogPageRequest and if it fails then throw exception
        if(weblogRequest instanceof WeblogFeedRequest) {
            this.feedRequest = (WeblogFeedRequest) weblogRequest;
        } else {
            throw new WebloggerException("weblogRequest is not a WeblogFeedRequest."+
                    "  FeedModel only supports feed requests.");
        }
       
        // look for url strategy
        urlStrategy = (URLStrategy) initData.get("urlStrategy");
View Full Code Here

    public void init(Map initData) throws WebloggerException {
       
        // need a weblog request so that we can know the weblog and locale
        WeblogRequest weblogRequest = (WeblogRequest) initData.get("parsedRequest");
        if(weblogRequest == null) {
            throw new WebloggerException("Expected 'weblogRequest' init param!");
        }
       
        this.weblog = weblogRequest.getWeblog();
        this.locale = weblogRequest.getLocale();
       
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.WebloggerException

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.