Package ch.iterate.openstack.swift.exception

Examples of ch.iterate.openstack.swift.exception.NotFoundException


        if(response.getStatusCode() == HttpStatus.SC_OK) {
            return response.getResponseBodyAsStream();
        }
        else if(response.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            method.abort();
            throw new NotFoundException(response);
        }
        else {
            method.abort();
            throw new GenericException(response);
        }
View Full Code Here


        if(response.getStatusCode() == HttpStatus.SC_PARTIAL_CONTENT) {
            return response.getResponseBodyAsStream();
        }
        else if(response.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            method.abort();
            throw new NotFoundException(response);
        }
        else {
            method.abort();
            throw new GenericException(response);
        }
View Full Code Here

        if(response.getStatusCode() == HttpStatus.SC_OK) {
            return response.getResponseBodyAsStream();
        }
        else if(response.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            method.abort();
            throw new NotFoundException(response);
        }
        else {
            method.abort();
            throw new GenericException(response);
        }
View Full Code Here

        if(response.getStatusCode() == HttpStatus.SC_PARTIAL_CONTENT) {
            return response.getResponseBodyAsStream();
        }
        else if(response.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            method.abort();
            throw new NotFoundException(response);
        }
        else {
            method.abort();
            throw new GenericException(response);
        }
View Full Code Here

        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT) {
            return new ArrayList<Container>();
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException(new Response(response));
View Full Code Here

                }
            }
            return metadata;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException(new Response(response));
View Full Code Here

                }
            }
            return result;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException(new Response(response));
View Full Code Here

        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT) {
            return Collections.emptyList();
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException(new Response(response));
View Full Code Here

        final int statusCode = statusLine.getStatusCode();
        if(statusCode >= HttpStatus.SC_OK && statusCode < HttpStatus.SC_MULTIPLE_CHOICES) {
            return new Response(response);
        }
        else if(statusCode == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(statusCode == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException(new Response(response));
View Full Code Here

        final int statusCode = statusLine.getStatusCode();
        if(statusCode >= HttpStatus.SC_OK && statusCode < HttpStatus.SC_MULTIPLE_CHOICES) {
            return new Response(response);
        }
        else if(statusCode == HttpStatus.SC_NOT_FOUND) {
            throw new NotFoundException(new Response(response));
        }
        else if(statusCode == HttpStatus.SC_UNAUTHORIZED) {
            throw new AuthorizationException(new Response(response));
        }
        throw new GenericException("Unexpected response", response.getAllHeaders(), statusLine);
View Full Code Here

TOP

Related Classes of ch.iterate.openstack.swift.exception.NotFoundException

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.