use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.
the class DynamicRoutingGatewayTest method register.
@Override
public void register(PolicyPluginManager policyPluginManager) {
super.register(policyPluginManager);
PolicyPlugin dynamicRoutingPolicy = PolicyBuilder.build("dynamic-routing", DynamicRoutingPolicy.class);
policyPluginManager.register(dynamicRoutingPolicy);
}
use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.
the class OverrideMethodGatewayTest method register.
@Override
public void register(PolicyPluginManager policyPluginManager) {
super.register(policyPluginManager);
PolicyPlugin dynamicRoutingPolicy = PolicyBuilder.build("override-method", OverrideMethodPolicy.class);
policyPluginManager.register(dynamicRoutingPolicy);
}
use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.
the class OverrideRequestContentGatewayTest method register.
@Override
public void register(PolicyPluginManager policyPluginManager) {
super.register(policyPluginManager);
PolicyPlugin rewriteRequestStreamPolicy = PolicyBuilder.build("override-request-content", OverrideRequestContentPolicy.class);
policyPluginManager.register(rewriteRequestStreamPolicy);
}
use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.
the class OverrideResponseContentGatewayTest method register.
@Override
public void register(PolicyPluginManager policyPluginManager) {
super.register(policyPluginManager);
PolicyPlugin rewriteResponseStreamPolicy = PolicyBuilder.build("override-response-content", OverrideResponseContentPolicy.class);
policyPluginManager.register(rewriteResponseStreamPolicy);
}
use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-management-rest-api by gravitee-io.
the class PolicyServiceImpl method findAll.
@Override
public Set<PolicyEntity> findAll() {
try {
LOGGER.debug("List all policies");
final Collection<PolicyPlugin> policyDefinitions = policyManager.findAll();
return policyDefinitions.stream().map(policyDefinition -> convert(policyDefinition, false)).collect(Collectors.toSet());
} catch (Exception ex) {
LOGGER.error("An error occurs while trying to list all policies", ex);
throw new TechnicalManagementException("An error occurs while trying to list all policies", ex);
}
}
Aggregations