use of io.gravitee.definition.model.flow.PathOperator in project gravitee-management-rest-api by gravitee-io.
the class APIV1toAPIV2Converter method createFlow.
@NotNull
private Flow createFlow(String path, Set<HttpMethod> methods) {
// If contains all methods of HttpMethod enum or all methods without OTHER
Set<HttpMethod> flowMethods = methods.containsAll(HTTP_METHODS) ? Collections.emptySet() : methods;
final Flow flow = new Flow();
flow.setName("");
flow.setCondition("");
flow.setEnabled(true);
final PathOperator pathOperator = new PathOperator();
pathOperator.setPath(path);
pathOperator.setOperator(Operator.STARTS_WITH);
flow.setPathOperator(pathOperator);
flow.setMethods(flowMethods);
return flow;
}
use of io.gravitee.definition.model.flow.PathOperator in project gravitee-management-rest-api by gravitee-io.
the class OAIToAPIV2Converter method createFlow.
private Flow createFlow(String path, Set<HttpMethod> methods) {
final Flow flow = new Flow();
flow.setName("");
flow.setCondition("");
flow.setEnabled(true);
final PathOperator pathOperator = new PathOperator();
pathOperator.setPath(path);
pathOperator.setOperator(Operator.EQUALS);
flow.setPathOperator(pathOperator);
flow.setMethods(methods);
return flow;
}
Aggregations