Package org.apache.wiki.providers

Examples of org.apache.wiki.providers.ProviderException


    public String getPageText( String pageName, int version )
        throws ProviderException
    {
        if( pageName == null || pageName.length() == 0 )
        {
            throw new ProviderException("Illegal page name");
        }

        String text = null;

        try
View Full Code Here


    public void putPageText( WikiPage page, String content )
        throws ProviderException
    {
        if( page == null || page.getName() == null || page.getName().length() == 0 )
        {
            throw new ProviderException("Illegal page name");
        }

        m_provider.putPageText( page, content );
    }
View Full Code Here

    public WikiPage getPageInfo( String pageName, int version )
        throws ProviderException
    {
        if( pageName == null || pageName.length() == 0 )
        {
            throw new ProviderException("Illegal page name '"+pageName+"'");
        }

        WikiPage page = null;

        try
View Full Code Here

    public boolean pageExists( String pageName )
        throws ProviderException
    {
        if( pageName == null || pageName.length() == 0 )
        {
            throw new ProviderException("Illegal page name");
        }

        return m_provider.pageExists( pageName );
    }
View Full Code Here

    public boolean pageExists( String pageName, int version )
        throws ProviderException
    {
        if( pageName == null || pageName.length() == 0 )
        {
            throw new ProviderException("Illegal page name");
        }

        if( version == WikiProvider.LATEST_VERSION )
            return pageExists( pageName );
View Full Code Here

        }
        catch( Exception e )
        {
            String msg = "Could not get LuceneAnalyzer class " + m_analyzerClass + ", reason: ";
            log.error( msg, e );
            throw new ProviderException( msg + e );
        }
    }
View Full Code Here

        }
        catch( ParseException e )
        {
            log.info("Broken query; cannot parse query ",e);

            throw new ProviderException("You have entered a query Lucene cannot process: "+e.getMessage());
        }
        catch( InvalidTokenOffsetsException e )
        {
            log.error("Tokens are incompatible with provided text ",e);
        }
View Full Code Here

        //  or aliases.  We cannot store an attachment to a non-existant page.
        //
        if( !m_engine.getPageManager().pageExists( att.getParentName() ) )
        {
            // the caller should catch the exception and use the exception text as an i18n key
            throw new ProviderException"attach.parent.not.exist"  );
        }
       
        m_provider.putAttachmentData( att, in );

        m_engine.getReferenceManager().updateReferences( att.getName(),
View Full Code Here

            }
            catch( ProviderException pe )
            {
                // this is a kludge, the exception that is caught here contains the i18n key
                // here we have the context available, so we can internationalize it properly :
                throw new ProviderException( Preferences.getBundle( context, InternationalizationManager.CORE_BUNDLE )
                                                        .getString( pe.getMessage() ) );
            }

            log.info( "User " + user + " uploaded attachment to " + parentPage +
                      " called "+filename+", size " + att.getSize() );
View Full Code Here

    public String getPageText( String pageName, int version )
        throws ProviderException
    {
        if( pageName == null || pageName.length() == 0 )
        {
            throw new ProviderException("Illegal page name");
        }

        String text = null;

        try
View Full Code Here

TOP

Related Classes of org.apache.wiki.providers.ProviderException

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.