io.gravitee.policy.callout.configuration.CalloutHttpPolicyConfiguration Maven / Gradle / Ivy
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gravitee.policy.callout.configuration;
import io.gravitee.common.http.HttpMethod;
import io.gravitee.common.http.HttpStatusCode;
import io.gravitee.policy.api.PolicyConfiguration;
import java.util.ArrayList;
import java.util.List;
/**
* @author David BRASSELY (david.brassely at graviteesource.com)
* @author GraviteeSource Team
*/
public class CalloutHttpPolicyConfiguration implements PolicyConfiguration {
private String url;
private List headers = new ArrayList<>();
private String body;
private HttpMethod method;
private List variables = new ArrayList<>();
private boolean exitOnError;
private String errorCondition;
private int errorStatusCode = HttpStatusCode.INTERNAL_SERVER_ERROR_500;
private String errorContent;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public List getHeaders() {
return headers;
}
public void setHeaders(List headers) {
this.headers = headers;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public HttpMethod getMethod() {
return method;
}
public void setMethod(HttpMethod method) {
this.method = method;
}
public List getVariables() {
return variables;
}
public void setVariables(List variables) {
this.variables = variables;
}
public boolean isExitOnError() {
return exitOnError;
}
public void setExitOnError(boolean exitOnError) {
this.exitOnError = exitOnError;
}
public String getErrorCondition() {
return errorCondition;
}
public void setErrorCondition(String errorCondition) {
this.errorCondition = errorCondition;
}
public int getErrorStatusCode() {
return errorStatusCode;
}
public void setErrorStatusCode(int errorStatusCode) {
this.errorStatusCode = errorStatusCode;
}
public String getErrorContent() {
return errorContent;
}
public void setErrorContent(String errorContent) {
this.errorContent = errorContent;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy