Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceException


            if (wsos.source == this) {
                try {
                    wsos.cancel();
                }
                catch (Exception e) {
                    throw new SourceException("Failure cancelling Source", e);
                }
            }
        }
        throw new IllegalArgumentException("The stream is not associated to this source");
    }
View Full Code Here


    public void delete() throws SourceException {
      initResource(WebdavResource.NOACTION, DepthSupport.DEPTH_0);
        try {
            this.resource.deleteMethod();
        } catch (HttpException e) {
            throw new SourceException("Unable to delete source: " + getSecureURI(), e);
        } catch (IOException e) {
            throw new SourceException("Unable to delete source: " + getSecureURI(), e);
        }
    }
View Full Code Here

                if (status != 405) {
                    final String msg =
                        "Unable to create collection " + getSecureURI()
                        + ". Server responded " + this.resource.getStatusCode()
                        + " (" + this.resource.getStatusMessage() + ")";
                    throw new SourceException(msg);
                }
            }
        } catch (HttpException e) {
            throw new SourceException("Unable to create collection(s) " + getSecureURI(), e);
        } catch (SourceException e) {
            throw e;
        } catch (IOException e) {
            throw new SourceException("Unable to create collection(s)"  + getSecureURI(), e);     
        }
    }
View Full Code Here

                     sourceproperties.addElement(srcProperty);
                 }
             }

         } catch (Exception e) {
             throw new SourceException("Error getting properties", e);
         }
         SourceProperty[] sourcepropertiesArray = new SourceProperty[sourceproperties.size()];
         for (int i = 0; i<sourceproperties.size(); i++) {
             sourcepropertiesArray[i] = (SourceProperty) sourceproperties.elementAt(i);
         }
View Full Code Here

                    prop = (Property) props.nextElement();
                    return new SourceProperty(prop.getElement());
                }
            }
        } catch (Exception e) {
            throw new SourceException("Error getting property: "+name, e);
        }
        return null;
    }
View Full Code Here

        initResource(WebdavResource.NOACTION, DepthSupport.DEPTH_0);
       
        try {
            this.resource.proppatchMethod(new PropertyName(namespace, name), "", false);
        } catch (Exception e) {
            throw new SourceException("Could not remove property ", e);
        }
    }
View Full Code Here

            final String message =
                "Unable to set property. Server responded " +
                e.getReasonCode() + " (" + e.getReason() + ") - "
                + e.getMessage();
            getLogger().debug(message);
            throw new SourceException("Could not set property ", e);
        } catch (Exception e) {
            throw new SourceException("Could not set property ", e);
        }
    }
View Full Code Here

        if (source instanceof WebDAVSource) {
            WebDAVSource destination = (WebDAVSource)source;
            try {           
                 this.resource.moveMethod(destination.resource.getHttpURL().getPath());
            } catch (HttpException e) {
                throw new SourceException("Cannot move source '"+getSecureURI()+"'", e);
            } catch (IOException e) {
                throw new SourceException("Cannot move source '"+getSecureURI()+"'", e);
            }
        } else {
            SourceUtil.move(this,source);
        }
    }
View Full Code Here

        if (source instanceof WebDAVSource) {
            WebDAVSource destination = (WebDAVSource)source;
            try {
                this.resource.copyMethod(destination.resource.getHttpURL().getPath());
            } catch (HttpException e) {
                throw new SourceException("Cannot copy source '"+getSecureURI()+"'", e);
            } catch (IOException e) {
                throw new SourceException("Cannot copy source '"+getSecureURI()+"'", e);
            }
        } else {
            SourceUtil.copy(this,source);
        }
    }
View Full Code Here

            return;
        }
        try {
            this.resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
        } catch (ServiceException se) {
            throw new SourceException("Missing service dependency: " + SourceResolver.ROLE, se);
        }
        try {
            this.cache = (Cache) this.manager.lookup(this.cacheRole);
        } catch (ServiceException se) {
            throw new SourceException("Missing service dependency: " + this.cacheRole, se);
        }
        if (this.async) {
            try {
                this.refresher = (Refresher) this.manager.lookup(this.refresherRole);
            } catch (ServiceException se) {
                // clean up
                if (this.resolver != null){
                    this.manager.release(this.resolver);
                    this.resolver = null;
                }
                throw new SourceException("Missing service dependency: " + this.refresherRole, se);
            }
        }
        this.isInitialized = true;
    }
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.