Package com.bradmcevoy.http

Examples of com.bradmcevoy.http.DeletableResource


        }
    }

    public boolean delete() {
        if( r instanceof DeletableResource ) {
            DeletableResource dr = (DeletableResource) r;
            try {
                dr.delete();
            } catch( NotAuthorizedException ex ) {
                log.warn( "can't delete, not authorised" );
                return false;
            } catch( ConflictException ex ) {
                log.warn( "can't delete, conflct" );
View Full Code Here


                        ReplaceableResource rr = (ReplaceableResource) existing;
                        rr.replaceContent(in, null);
                    } else {
                        log.trace("existing resource is not replaceable, will be deleted");
                        if( existing instanceof DeletableResource ) {
                            DeletableResource dr = (DeletableResource) existing;
                            dr.delete();
                        } else {
                            log.trace("existing resource could not be deleted, is not deletable");
                        }
                    }
                } else {
View Full Code Here

    }

    private Result doDelete( Resource r ) {
        if( r instanceof DeletableResource ) {
            try {
                DeletableResource dr = (DeletableResource) r;
                dr.delete();
                return result( "deleted: " + r.getName() );
            } catch( NotAuthorizedException e ) {
                return result( "not authorised to delete: " + e.getResource().getName());
            } catch( ConflictException e ) {
                return result( "conflict deleting: " + e.getResource().getName());
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.DeletableResource

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.