Package org.apache.airavata.registry.api.exception.gateway

Examples of org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException


            status = response.getStatus();

            if (status == ClientConstant.HTTP_BAD_REQUEST){
                logger.debug("Descriptor already exists...");
                throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName());
            } else if (status != ClientConstant.HTTP_OK) {
                logger.error(response.getEntity(String.class));
                throw new RuntimeException("Failed : HTTP error code : "
                        + status);
            } else {
                if (response.getCookies().size() > 0) {
                    cookie = response.getCookies().get(0).toCookie();
                    CookieManager.setCookie(cookie);
                }
            }
        } else if (status == ClientConstant.HTTP_BAD_REQUEST){
            logger.debug("Descriptor already exists...");
            throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName());
        } else {
            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }
View Full Code Here


                    MediaType.APPLICATION_JSON).post(ClientResponse.class, applicationDescriptor);
            status = response.getStatus();

            if (status == ClientConstant.HTTP_BAD_REQUEST){
                logger.debug("Descriptor already exists...");
                throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
            } else if (status != ClientConstant.HTTP_OK && status != ClientConstant.HTTP_UNAUTHORIZED) {
                logger.error(response.getEntity(String.class));
                throw new RuntimeException("Failed : HTTP error code : "
                        + status);
            } else {
                if (response.getCookies().size() > 0) {
                    cookie = response.getCookies().get(0).toCookie();
                    CookieManager.setCookie(cookie);
                }
            }
        } else if (status == ClientConstant.HTTP_BAD_REQUEST){
            logger.debug("Descriptor already exists...");
            throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
        } else {
            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }
View Full Code Here

                    MediaType.APPLICATION_JSON).post(ClientResponse.class, applicationDescriptor);
            status = response.getStatus();

            if (status == ClientConstant.HTTP_BAD_REQUEST){
                logger.debug("Descriptor already exists...");
                throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
            } else if (status != ClientConstant.HTTP_OK) {
                logger.error(response.getEntity(String.class));
                throw new RuntimeException("Failed : HTTP error code : "
                        + status);
            } else {
                if (response.getCookies().size() > 0) {
                    cookie = response.getCookies().get(0).toCookie();
                    CookieManager.setCookie(cookie);
                }
            }
        } else if (status == ClientConstant.HTTP_BAD_REQUEST){
            logger.debug("Descriptor already exists...");
            throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
        } else {
            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException

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.