Package org.apache.wiki.api.exceptions

Examples of org.apache.wiki.api.exceptions.ProviderException


                        //  Sanity check - shouldn't really be happening, unless
                        //  you mess with the repository directly.
                        //
                        if( att == null )
                        {
                            throw new ProviderException("Attachment disappeared while reading information:"+
                                                        " if you did not touch the repository, there is a serious bug somewhere. "+
                                                        "Attachment = "+attachments[i]+
                                                        ", decoded = "+attachmentName );
                        }
View Full Code Here


    {
        File attDir = new File( m_storageDir );

        if( !attDir.exists() )
        {
            throw new ProviderException("Specified attachment directory "+m_storageDir+" does not exist!");
        }

        ArrayList<Attachment> list = new ArrayList<Attachment>();

        String[] pagesWithAttachments = attDir.list( new AttachmentFilter() );
View Full Code Here

            return null;
        }
        catch( IOException e )
        {
            log.error("Can't read page properties", e );
            throw new ProviderException("Cannot read page properties: "+e.getMessage());
        }
        // FIXME: Check for existence of this particular version.

        return att;
    }
View Full Code Here

                getPageProperties( p );
            }
            catch( IOException e )
            {
                log.error("Unable to read page properties", e );
                throw new ProviderException("Unable to read page properties, check logs.");
            }
        }

        return p;
    }
View Full Code Here

                    result = FileUtil.readContents( in, m_encoding );
                }
                catch( IOException e )
                {
                    log.error("Failed to read", e);
                    throw new ProviderException("I/O error: "+e.getMessage());
                }
                finally
                {
                  IOUtils.closeQuietly( in );
                }
            }
            else
            {
                log.warn("Failed to read page from '"+pagedata.getAbsolutePath()+"', possibly a permissions problem");
                throw new ProviderException("I cannot read the requested page.");
            }
        }
        else
        {
            // This is okay.
View Full Code Here

            putPageProperties( page.getName(), props );
        }
        catch( IOException e )
        {
            log.error( "Saving failed", e );
            throw new ProviderException("Could not save page text: "+e.getMessage());
        }
    }
View Full Code Here

                putPageProperties( page, props );
            }
            catch( IOException e )
            {
                log.error("Unable to modify page properties",e);
                throw new ProviderException("Could not modify page properties: " + e.getMessage());
            }

            // We can let the FileSystemProvider take care
            // of the actual deletion
            super.deleteVersion( page, WikiPageProvider.LATEST_VERSION );
View Full Code Here

        //  or aliases.  We cannot store an attachment to a non-existent 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( 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

TOP

Related Classes of org.apache.wiki.api.exceptions.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.