Package org.apache.roller

Examples of org.apache.roller.RollerException


    {
        String pingTargetId = rreq.getRequest().getParameter(RollerRequest.PINGTARGETID_KEY);
        PingTargetManager pingTargetMgr = RollerFactory.getRoller().getPingTargetManager();
        if (pingTargetId == null || pingTargetId.length() == 0)
        {
            throw new RollerException("Missing ping target id: " + pingTargetId);
        }

        PingTargetData pingTarget = pingTargetMgr.getPingTarget(pingTargetId);
        if (pingTarget == null)
        {
            throw new RollerException("No such ping target id: " + pingTargetId);
        }
        return pingTarget;
    }
View Full Code Here


        } catch(ResourceNotFoundException ex) {
            // just rethrow
            throw ex;
        } catch(Exception ex) {
            // wrap this as a roller exception
            throw new RollerException("Error getting velocity template", ex);
        }
       
        return outty;
    }
View Full Code Here

            } catch (ResourceNotFoundException ex) {
                // just rethrow
                throw ex;
            } catch (Exception ex) {
                // wrap as a RollerException
                throw new RollerException("error getting no-op decorator", ex);
            }
        }
       
        return decorator;
    }
View Full Code Here

     * @param new2 Confirm this matches new password
     * @author Dave Johnson
     */
    public void resetPassword(Roller roller, String new1, String new2) throws RollerException {
        if (!new1.equals(new2)) {
            throw new RollerException("newUser.error.mismatchedPasswords");
        }
       
        String encrypt = RollerConfig.getProperty("passwds.encryption.enabled");
        String algorithm = RollerConfig.getProperty("passwds.encryption.algorithm");
        if (new Boolean(encrypt).booleanValue()) {
View Full Code Here

            out.write( sw.toString().getBytes() );
            out.flush();
        }
        catch ( FileNotFoundException e )
        {
            throw new RollerException( "Unable to write to: " + outputFile.getAbsolutePath(), e );
        }
        finally
        {
            try
            {
View Full Code Here

        {
            tagPatternWithBookmark = Pattern.compile(tagRegexWithBookmark);
        }
        catch (PatternSyntaxException e)
        {
            throw new RollerException("Invalid regular expression for topic tags with bookmark '" +
                tagRegexWithBookmark + "': " + e.getMessage());
        }
        int groupCount = tagPatternWithBookmark.matcher("").groupCount();
        if (groupCount != 2)
        {
            throw new RollerException("Regular expression for topic tags with bookmark '" + tagRegexWithBookmark +
                "' contains wrong number of capture groups.  Must have exactly 2.  Contains " + groupCount);
        }

        try
        {
            tagPatternWithoutBookmark = Pattern.compile(tagRegexWithoutBookmark);
        }
        catch (PatternSyntaxException e)
        {
            throw new RollerException("Invalid regular expression for topic tags without bookmark '" +
                tagRegexWithoutBookmark + "': " + e.getMessage());
        }
        groupCount = tagPatternWithoutBookmark.matcher("").groupCount();
        if (groupCount != 1)
        {
            throw new RollerException("Regular expression for topic tags without bookmark '" + tagRegexWithoutBookmark +
                "' contains wrong number of capture groups.  Must have exactly 1.  Contains " + groupCount);
        }

        // Create link format from format string
        setLinkFormat(new MessageFormat(linkFormatString));
View Full Code Here

                    // notify cache
                    CacheManager.invalidate(template);
                } else {
                   
                    // someone trying to remove a required template
                    throw new RollerException("Cannot remove required page");
                }
               
                addModelObjects(
                        request, response, mapping, template.getWebsite());
                actionForm.reset(mapping, request);
View Full Code Here

    {
        String pingTargetId = rreq.getRequest().getParameter(RollerRequest.PINGTARGETID_KEY);
        PingTargetManager pingTargetMgr = RollerFactory.getRoller().getPingTargetManager();
        if (pingTargetId == null || pingTargetId.length() == 0)
        {
            throw new RollerException("Missing ping target id: " + pingTargetId);
        }

        PingTargetData pingTarget = pingTargetMgr.getPingTarget(pingTargetId);
        if (pingTarget == null)
        {
            throw new RollerException("No such ping target id: " + pingTargetId);
        }
        return pingTarget;
    }
View Full Code Here

            String start = queryForm.getStartDateString();
            if (null != start && start.trim().length() > 0) {
                try {
                    startDate = DateUtil.getStartOfDay(df.parse(start));
                } catch (ParseException e) {
                    throw new RollerException("ERROR parsing start date.");
                }
            }

            String end = queryForm.getEndDateString();
            if (null != end && end.trim().length() > 0) {
                try {
                    endDate = DateUtil.getEndOfDay(df.parse(end));
                } catch (ParseException e) {
                    throw new RollerException("ERROR parsing end date.");
                }
            }

            this.status = "ALL".equals(queryForm.getStatus()) ? null: queryForm.getStatus();   
            this.maxEntries = maxEntries;
View Full Code Here

                {
                    entry.putEntryAttribute(name, value[0]);
                }
                catch (Exception e)
                {
                    throw new RollerException("ERROR setting attributes",e);
                }
            }
        }
    }
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.