Package org.apache.roller.weblogger

Examples of org.apache.roller.weblogger.WebloggerException


     * @inheritDoc
     */
    public WeblogCategory getRootWeblogCategory(Weblog website)
    throws WebloggerException {
        if (website == null)
            throw new WebloggerException("website is null");
       
        Query q = strategy.getNamedQuery(
                "WeblogCategory.getByWebsite&ParentNull");
        q.setParameter(1, website);
        try {
View Full Code Here


     * @inheritDoc
     */
    public List getWeblogCategories(Weblog website, boolean includeRoot)
    throws WebloggerException {
        if (website == null)
            throw new WebloggerException("website is null");
       
        if (includeRoot) return getWeblogCategories(website);
       
        Query q = strategy.getNamedQuery(
                "WeblogCategory.getByWebsite&ParentNotNull");
View Full Code Here

     * @inheritDoc
     */
    public List getWeblogCategories(Weblog website)
    throws WebloggerException {
        if (website == null)
            throw new WebloggerException("website is null");
       
        Query q = strategy.getNamedQuery(
                "WeblogCategory.getByWebsite");
        q.setParameter(1, website);
        return q.getResultList();
View Full Code Here

     */
    public WeblogEntry getWeblogEntryByAnchor(Weblog website,
            String anchor) throws WebloggerException {
       
        if (website == null)
            throw new WebloggerException("Website is null");
       
        if (anchor == null)
            throw new WebloggerException("Anchor is null");
       
        // mapping key is combo of weblog + anchor
        String mappingKey = website.getHandle()+":"+anchor;
       
        // check cache first
View Full Code Here

     * @inheritDoc
     */
    public void updateTagCount(String name, Weblog website, int amount)
    throws WebloggerException {
        if(amount == 0) {
            throw new WebloggerException("Tag increment amount cannot be zero.");
        }
       
        if(website == null) {
            throw new WebloggerException("Website cannot be NULL.");
        }
       
        // The reason why add order lastUsed desc is to make sure we keep picking the most recent
        // one in the case where we have multiple rows (clustered environment)
        // eventually that second entry will have a very low total (most likely 1) and
View Full Code Here

     */
    public void incrementHitCount(Weblog weblog, int amount)
    throws WebloggerException {
       
        if(amount == 0) {
            throw new WebloggerException("Tag increment amount cannot be zero.");
        }
       
        if(weblog == null) {
            throw new WebloggerException("Website cannot be NULL.");
        }
       
        Query q = strategy.getNamedQuery("WeblogHitCount.getByWeblog");
        q.setParameter(1, weblog);
        WeblogHitCount hitCount = null;
View Full Code Here

       
        this.pageRequest = pRequest;
        try {
            this.weblog = pageRequest.getWeblog();           
            if(weblog == null) {
                throw new WebloggerException("unable to lookup weblog: "+
                        pageRequest.getWeblogHandle());
            }
            pageLink = pageRequest.getWeblogPageName();           
//            day = DateUtil.parseWeblogURLDateString(pageRequest.getWeblogDate(),
//                    weblog.getTimeZoneInstance(), weblog.getLocaleInstance());
View Full Code Here

            // parse the incoming request and extract the relevant data
            resourceRequest = new WeblogPreviewResourceRequest(request);

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

        } catch(Exception e) {
            // invalid resource request or weblog doesn't exist
View Full Code Here

            // parse the incoming request and extract the relevant data
            resourceRequest = new WeblogResourceRequest(request);

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

        } catch(Exception e) {
            // invalid resource request or weblog doesn't exist
View Full Code Here

                // lookup weblog specified by comment request
                weblog = WebloggerFactory.getWeblogger().getWeblogManager()
                        .getWeblogByHandle(trackbackRequest.getWeblogHandle());
               
                if (weblog == null) {
                    throw new WebloggerException("unable to lookup weblog: "+
                            trackbackRequest.getWeblogHandle());
                }
               
                // lookup entry specified by comment request
                WeblogEntryManager weblogMgr = WebloggerFactory.getWeblogger().getWeblogEntryManager();
                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

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.