Search in sources :

Example 1 with PolicyNotFoundException

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

the class PolicyServiceImpl method findById.

@Override
public PolicyEntity findById(String policyId) {
    LOGGER.debug("Find policy by ID: {}", policyId);
    PolicyPlugin policyDefinition = policyManager.get(policyId);
    if (policyDefinition == null) {
        throw new PolicyNotFoundException(policyId);
    }
    return convert(policyDefinition, true);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin) PolicyNotFoundException(io.gravitee.management.service.exceptions.PolicyNotFoundException)

Aggregations

PolicyNotFoundException (io.gravitee.management.service.exceptions.PolicyNotFoundException)1 PolicyPlugin (io.gravitee.plugin.policy.PolicyPlugin)1