org.cloudfoundry.client.lib.CloudServiceBrokerException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudfoundry-client-lib Show documentation
Show all versions of cloudfoundry-client-lib Show documentation
A Cloud Foundry client library for Java
The newest version!
package org.cloudfoundry.client.lib;
import java.text.MessageFormat;
import org.springframework.http.HttpStatus;
public class CloudServiceBrokerException extends CloudOperationException {
private static final long serialVersionUID = 1L;
private static final String DEFAULT_SERVICE_BROKER_ERROR_MESSAGE = "Service broker operation failed: {0}";
public CloudServiceBrokerException(CloudOperationException cloudOperationException) {
super(cloudOperationException.getStatusCode(),
cloudOperationException.getStatusText(),
cloudOperationException.getDescription(),
cloudOperationException);
}
public CloudServiceBrokerException(HttpStatus statusCode) {
super(statusCode);
}
public CloudServiceBrokerException(HttpStatus statusCode, String statusText) {
super(statusCode, statusText);
}
public CloudServiceBrokerException(HttpStatus statusCode, String statusText, String description) {
super(statusCode, statusText, description);
}
@Override
public String getMessage() {
return decorateExceptionMessage(super.getMessage());
}
private String decorateExceptionMessage(String exceptionMessage) {
return MessageFormat.format(DEFAULT_SERVICE_BROKER_ERROR_MESSAGE, exceptionMessage);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy