Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceNotFoundException


    /**
     * @see org.apache.excalibur.source.Source#getInputStream()
     */
    public InputStream getInputStream() throws IOException, SourceNotFoundException {
        if (!exists()) {
            throw new SourceNotFoundException("The source [" + getURI() + "] does not exist!");
        }
        try {
            return this.node.getInputStream();
        } catch (TransactionException e) {
            throw new RuntimeException(e);
View Full Code Here


            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(getRealSourceURI());
            if (source.exists()) {
                return source.getContentLength();
            } else {
                throw new SourceNotFoundException("The source [" + getRealSourceURI()
                        + "] does not exist!");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
View Full Code Here

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(getRealSourceURI());
            if (source.exists()) {
                return source.getMimeType();
            } else {
                throw new SourceNotFoundException("The source [" + getRealSourceURI()
                        + "] does not exist!");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
View Full Code Here

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

                CocoonComponentManager.leaveEnvironment();
            }
            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

      if (!isSourceNotFoundException(e))
        throw e;
    }
   
    if (result == null)
      throw new SourceNotFoundException("Global profile does not exist.");
   
    // change references to objects where no delta has been applied
    result.adjustReferences(global);
   
        // FIXME
View Full Code Here

                CocoonComponentManager.leaveEnvironment();
            }
            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

                CocoonComponentManager.leaveEnvironment();
            }
            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

      if (!isSourceNotFoundException(e))
        throw e;
    }
   
    if (result == null)
      throw new SourceNotFoundException("Global "+keyMap.get("profile")+" does not exist.");
   
    // change references to objects where no delta has been applied
    result.adjustReferences(global);
   
    service.setAttribute(location, result);
View Full Code Here

            if (!uri.endsWith("/")) {
                sb.append('/');
            }

        } catch (IOException e) {
            throw new SourceNotFoundException("Cannot resolve catalogue base URI <" + base + ">", e);
        } finally {
            this.resolver.release(src);
        }

        // Append catalogue name
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.