Search in sources :

Example 1 with ResourceNotFoundException

use of io.gravitee.management.service.exceptions.ResourceNotFoundException in project gravitee-management-rest-api by gravitee-io.

the class ResourceServiceImpl method findById.

@Override
public ResourceEntity findById(String resource) {
    LOGGER.debug("Find resource by ID: {}", resource);
    ResourcePlugin resourceDefinition = resourcePluginManager.get(resource);
    if (resourceDefinition == null) {
        throw new ResourceNotFoundException(resource);
    }
    return convert(resourceDefinition, true);
}
Also used : ResourcePlugin(io.gravitee.plugin.resource.ResourcePlugin) ResourceNotFoundException(io.gravitee.management.service.exceptions.ResourceNotFoundException)

Aggregations

ResourceNotFoundException (io.gravitee.management.service.exceptions.ResourceNotFoundException)1 ResourcePlugin (io.gravitee.plugin.resource.ResourcePlugin)1