Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceNotFoundException


                }
            }
        } while (document != null && found == false);

        if (document == null) {
            throw new SourceNotFoundException(
                "The document "
                    + documentName
                    + " is not in the archive "
                    + this.archive.getURI());
        }
View Full Code Here


        {
            return new FileInputStream(m_file);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new SourceNotFoundException(m_uri + " doesn't exist.", fnfe);
        }
    }
View Full Code Here

     */
    public void delete() throws SourceException
    {
        if (!m_file.exists())
        {
            throw new SourceNotFoundException("Cannot delete non-existing file " + m_file.toString());
        }
       
        if (!m_file.delete())
        {
            throw new SourceException("Could not delete " + m_file.toString() + " (unknown reason)");
View Full Code Here

            error.append( m_uri );
            error.append( " (" );
            error.append( response );
            error.append( ")" );

            throw new SourceNotFoundException( error.toString() );
        }
       
        return method.getResponseBodyAsStream();
    }
View Full Code Here

                    }
                }
            }
       } catch (HttpException e) {
            if (e.getReasonCode() == HttpStatus.SC_NOT_FOUND) {
                throw new SourceNotFoundException("Not found: " + getSecureURI(), e);
            }
            if (e.getReasonCode() == HttpStatus.SC_BAD_REQUEST) {
              throw new SourceException("Server doesn't appear to understand WebDAV: "+getSecureURI(), e);
            }
            final String msg = "Could not initialize webdav resource at " + getSecureURI()
View Full Code Here

            if (status == ST_COLLECTION) {
                this.collectionToSAX(handler);
            } else if (status == ST_RESOURCE) {
                this.resourceToSAX(handler);
            } else {
                throw new SourceNotFoundException(getURI());
            }
        } catch (SAXException se) {
            throw se;
        } catch (Exception e) {
            throw new SAXException("Error processing " + getURI(), e);
View Full Code Here

     */
    public String createId() throws SourceException {
        try {
            setup();
            if (status != ST_COLLECTION) {
                throw new SourceNotFoundException("Collection for createId not found: " + getURI());
            }
            return collection.createId();
        } catch(XMLDBException xdbe) {
            throw new SourceException("Cannot get Id for " + getURI(), xdbe);
        } finally {
View Full Code Here

     */
    public InputStream getInputStream() throws IOException, SourceException {
        try {
            return this.source.getInputStream();
        } catch (ResourceNotFoundException rnfe) {
            throw new SourceNotFoundException("Source not found.", rnfe);
        } catch (ProcessingException pe) {
            throw new SourceException("ProcessingException", pe);
        }
    }
View Full Code Here

            }

            return new ByteArrayInputStream(os.toByteArray());

        } catch (ResourceNotFoundException e) {
            throw new SourceNotFoundException("Exception during processing of " + this.systemId, e);
        } catch (Exception e) {
            throw new SourceException("Exception during processing of " + this.systemId, e);
        } finally {
            // Unhide wrapped environment output stream
            this.environment.setOutputStream(null);
View Full Code Here

        {
            return part.getInputStream();
        }
        catch (Exception ex)
        {
            throw new SourceNotFoundException("The part source can not be found.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceNotFoundException

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.