Package slash.navigation.catalog.domain.exception

Examples of slash.navigation.catalog.domain.exception.NotFoundException


        Post request = prepareAddCategory(categoryUrl, name);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot add category " + name, categoryUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot add category " + name, categoryUrl);
        if (request.isForbidden())
            throw new DuplicateNameException("Cannot add category " + name, categoryUrl);
        if (!request.isSuccessful())
            throw new IOException("POST on " + categoryUrl + " with payload " + name + " not successful: " + result);
        return request.getLocation();
View Full Code Here


        Put request = prepareUpdateCategory(categoryUrl, parentUrl, name);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot update category to " + name, categoryUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot update category to " + name, categoryUrl);
        if (request.isForbidden())
            throw new NotOwnerException("Cannot update category to " + name, categoryUrl);
        if (!request.isSuccessful())
            throw new IOException("PUT on " + categoryUrl + " with payload " + name + " not successful: " + result);
        return request.getLocation();
View Full Code Here

        Delete request = prepareDelete(categoryUrl);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot delete category", categoryUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot delete category", categoryUrl);
        if (request.isForbidden())
            throw new NotOwnerException("Cannot delete category", categoryUrl);
        if (!request.isSuccessful())
            throw new IOException("DELETE on " + categoryUrl + " not successful: " + result);
    }
View Full Code Here

        Delete request = prepareDelete(fileUrl);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot delete file", fileUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot delete file", fileUrl);
        if (request.isForbidden())
            throw new NotOwnerException("Cannot delete file", fileUrl);
        if (!request.isSuccessful())
            throw new IOException("DELETE on " + fileUrl + " not successful: " + result);
    }
View Full Code Here

        Put request = prepareUpdateRoute(categoryUrl, routeUrl, description, fileUrl);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot update route to " + description, routeUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot update route to " + description, routeUrl);
        if (request.isForbidden())
            throw new NotOwnerException("Cannot update route to " + description, routeUrl);
        if (!request.isSuccessful())
            throw new IOException("PUT on " + routeUrl + " with payload " + description + " not successful: " + result);
    }
View Full Code Here

        Delete request = prepareDelete(routeUrl);
        String result = request.executeAsString();
        if (request.isUnAuthorized())
            throw new UnAuthorizedException("Cannot delete route", routeUrl);
        if (request.isNotFound())
            throw new NotFoundException("Cannot delete route", routeUrl);
        if (request.isForbidden())
            throw new NotOwnerException("Cannot delete route", routeUrl);
        if (!request.isSuccessful())
            throw new IOException("DELETE on " + routeUrl + " not successful: " + result);
    }
View Full Code Here

TOP

Related Classes of slash.navigation.catalog.domain.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.