Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceException


            selector = (ServiceSelector) this.manager.lookup( InputModule.ROLE + "Selector" );
            inputModule = (InputModule) selector.select( inputModuleName );
            obj = inputModule.getAttribute( attributeName, null, this.objectModel );

        } catch ( ServiceException e ) {
            throw new SourceException( "Could not find an InputModule of the type " +
                                       inputModuleName , e );
        } catch ( ConfigurationException e ) {
            throw new SourceException( "Could not find an attribute: " + attributeName +
                                       " from the InputModule " + inputModuleName, e );
        } finally {
            if ( inputModule != null ) selector.release( inputModule );
            this.manager.release( selector );
        }
View Full Code Here


        }
        catch (SourceException e) {
            throw e;
        }
        catch (IOException e) {
            throw new SourceException("Failure getting child", e);
        }
       
        if (!isCollection()) {
            throw new SourceException("Source is not a collection");
        }
       
        return createSource(getChildURI(super.uri, name), child);
    }
View Full Code Here

        }
        catch (SourceException e) {
            throw e;
        }
        catch (IOException e) {
            throw new SourceException("Failure getting child", e);
        }
       
        if (!isCollection()) {
            throw new SourceException("Source is not a collection");
        }
       
        final Collection result = new ArrayList();
        final TraversableSourceMeta meta = (TraversableSourceMeta) super.response.getExtra();
        final String[] children = meta.getChildren();
        for (int i = 0; i < children.length; i++) {
            Source child;
            try {
                child = this.tsource.getChild(children[i]);
            }
            catch (IOException e) {
                throw new SourceException("Failure getting child", e);
            }
            result.add(createSource(getChildURI(super.uri, children[i]), child));
        }
       
        return result;
View Full Code Here

        }
        catch (SourceException e) {
            throw e;
        }
        catch (IOException e) {
            throw new SourceException("Failure getting parent", e);
        }
       
        return createSource(getParentURI(super.uri), parent);
    }
View Full Code Here

        ContainerUtil.enableLogging(source, getLogger());
        try {
            ContainerUtil.service(source, super.manager);
            ContainerUtil.initialize(source);
        } catch (Exception e) {
            throw new SourceException("Unable to initialize source.", e);
        }
        return source;
    }
View Full Code Here

            if (e.getReasonCode() == HttpStatus.SC_NOT_FOUND) {
                throw new SourceNotFoundException("Not found: " + getSecureURI(), e);
            }
            final String msg = "Could not initialize webdav resource. Server responded "
                + e.getReasonCode() + " (" + e.getReason() + ") - " + e.getMessage();
            throw new SourceException(msg, e);
       } catch (IOException e) {
            throw new SourceException("Could not initialize webdav resource", e);
       }
    }
View Full Code Here

                    throw new HttpException(getSecureURI() + " does not exist");
                }
                return bi;
            }
        } catch (HttpException he) {
            throw new SourceException("Could not get WebDAV resource " + getSecureURI(), he);
        } catch (Exception e) {
            throw new SourceException("Could not get WebDAV resource" + getSecureURI(), e);
        }
    }
View Full Code Here

     *
     * @see org.apache.excalibur.source.TraversableSource#getChild(java.lang.String)
     */
    public Source getChild(String childName) throws SourceException {
        if (!isCollection()) {
            throw new SourceException(getSecureURI() + " is not a collection.");
        }
        try {
            HttpURL childURL;
            if (this.url instanceof HttpsURL) {
                childURL = new HttpsURL((HttpsURL) this.url, childName);
            } else {
                childURL = new HttpURL(this.url, childName);
            }
            return WebDAVSource.newWebDAVSource(childURL, this.protocol, getLogger());
        } catch (URIException e) {
            throw new SourceException("Failed to create child", e);
        }       
    }
View Full Code Here

                    "Unable to get WebDAV children. Server responded " +
                    e.getReasonCode() + " (" + e.getReason() + ") - "
                    + e.getMessage();
                getLogger().debug(message);
            }
            throw new SourceException("Failed to get WebDAV collection children.", e);
        } catch (SourceException e) {
            throw e;
        } catch (IOException e) {
            throw new SourceException("Failed to get WebDAV collection children.", e);
        }
        return children;
    }
View Full Code Here

            } else {
                parentURL = new HttpURL(this.url, path);
            }
            return WebDAVSource.newWebDAVSource(parentURL, this.protocol, getLogger());
        } catch (URIException e) {
            throw new SourceException("Failed to create parent", e);
        }
    }
View Full Code Here

TOP

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

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.