Package org.apache.roller

Examples of org.apache.roller.RollerException


            Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
            Criteria criteria = session.createCriteria(WeblogCategoryAssoc.class);
            criteria.add(Expression.eq("category", cat));
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here


            }
            return range;
           
        } catch (HibernateException e) {
            log.error(e);
            throw new RollerException(e);
        }
    }
View Full Code Here

            throws RollerException {
        final Iterator cats;
        final String[] pathArray = Utilities.stringToStringArray(path, "/");
       
        if (category == null && (null == path || "".equals(path.trim()))) {
            throw new RollerException("Bad arguments.");
        }
       
        if (path.trim().equals("/")) {
            return getRootWeblogCategory(website);
        } else if (category == null || path.trim().startsWith("/")) {
View Full Code Here

    protected HibernateRollerImpl() throws RollerException {
        try {
            strategy = new HibernatePersistenceStrategy();
        } catch(Throwable t) {
            // if this happens then we are screwed
            throw new RollerException(t);
        }
    }
View Full Code Here

            while (referer.hasNext()) {
                this.strategy.remove((RefererData) referer.next());
            }

        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

    /**
     * Apply ignoreWord/spam filters to all referers in website.
     */
    public void applyRefererFilters(WebsiteData website) throws RollerException {
       
        if (null == website) throw new RollerException("website is null");
        if (null == website.getBlacklist()) return;
       
        try {
            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
            Criteria criteria = session.createCriteria(RefererData.class);
           
            String[] blacklist = StringUtils.split(
                    StringUtils.deleteWhitespace(website.getBlacklist()),",");
            if (blacklist.length == 0) return;
           
            Junction or = Expression.disjunction();
            for (int i=0; i<blacklist.length; i++) {
                String ignoreWord = blacklist[i].trim();
                or.add(Expression.ilike("refererUrl","%"+ignoreWord+"%"));
            }
            criteria.add(Expression.conjunction()
            .add(Expression.disjunction().add(Expression.isNull("excerpt")).add(Expression.eq("excerpt", "")))
            .add(Expression.eq("website",website))
            .add(or)
            );
           
            Iterator referer = criteria.list().iterator();
            while (referer.hasNext()) {
                this.strategy.remove((RefererData) referer.next());
            }
           
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            .add(Expression.eq("dateString",dateString))
            .add(Expression.eq("refererPermalink",permalink)));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            .add(Expression.eq("requestUrl",requestUrl))
            .add(Expression.eq("refererUrl",refererUrl)));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

                while ( rs.next() );
            }
            return list;
        } catch (Throwable pe) {
            log.error(msg, pe);
            throw new RollerException(msg, pe);
        }
    }
View Full Code Here

                    "org.apache.roller.pojos.RefererData " +
                    "where h.website.enabled=? and h.website.id=? ");
            q.setParameters(args, types);
            results = q.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
        Object[] resultsArray = (Object[]) results.get(0);
       
        if (resultsArray.length > 0 && type.equals(DAYHITS)) {
            if ( resultsArray[0] != null ) {
View Full Code Here

TOP

Related Classes of org.apache.roller.RollerException

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.