requires = new ArrayList<>();
@@ -232,4 +232,5 @@ public class ServiceDefinition {
.plans(modelPlans)
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceSchema.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceSchema.java
index cb64e28c..9f075af2 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceSchema.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceSchema.java
@@ -19,8 +19,8 @@ package org.springframework.cloud.servicebroker.autoconfigure.web;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
/**
- * Internal class for marshaling {@link ServiceBrokerProperties} configuration properties
- * that describes service instance JSON Schemas.
+ * Internal class for marshaling {@link ServiceBrokerProperties} configuration properties that describes service
+ * instance JSON Schemas.
*
* @author Sam Gunaratne
* @author Roy Clarkson
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadata.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadata.java
index 361c2ec1..8baf82cb 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadata.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadata.java
@@ -35,10 +35,9 @@ import org.springframework.util.StringUtils;
* Internal class for marshaling {@link ServiceBrokerProperties} configuration properties that describes a service
* offered by this broker.
*
- * @see
- * Service Metadata API Specification
- *
* @author Roy Clarkson
+ * @see
+ * Service Metadata API Specification
* @see org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition
*/
public class ServiceMetadata {
@@ -204,7 +203,7 @@ public class ServiceMetadata {
private String base64EncodeImageData(String filename) {
String formattedImageData = null;
ClassPathResource resource = new ClassPathResource(filename);
- try(InputStream stream = resource.getInputStream()) {
+ try (InputStream stream = resource.getInputStream()) {
byte[] imageBytes = StreamUtils.copyToByteArray(stream);
String imageData = Base64Utils.encodeToString(imageBytes);
formattedImageData = String.format(IMAGE_DATA_FORMAT, imageData);
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/CatalogDefinitionDoesNotExistException.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/CatalogDefinitionDoesNotExistException.java
index bb39cb7e..169273af 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/CatalogDefinitionDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/CatalogDefinitionDoesNotExistException.java
@@ -22,4 +22,5 @@ package org.springframework.cloud.servicebroker.autoconfigure.web.exception;
public class CatalogDefinitionDoesNotExistException extends RuntimeException {
private static final long serialVersionUID = -6345978650178340540L;
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/ServiceInstanceServiceBeanDoesNotExistException.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/ServiceInstanceServiceBeanDoesNotExistException.java
index e549de38..a5d4fd5a 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/ServiceInstanceServiceBeanDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/exception/ServiceInstanceServiceBeanDoesNotExistException.java
@@ -22,4 +22,5 @@ package org.springframework.cloud.servicebroker.autoconfigure.web.exception;
public class ServiceInstanceServiceBeanDoesNotExistException extends RuntimeException {
private static final long serialVersionUID = -5517038451033555513L;
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/package-info.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/package-info.java
index 7a6a04b4..6287d48a 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/package-info.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/package-info.java
@@ -17,4 +17,4 @@
/**
* Support for Spring Boot auto-configuration in web environments
*/
-package org.springframework.cloud.servicebroker.autoconfigure.web;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.autoconfigure.web;
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFilter.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFilter.java
index f883c268..17874da0 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFilter.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFilter.java
@@ -55,8 +55,7 @@ public class ApiVersionWebFilter implements WebFilter {
}
/**
- * Construct a filter that validates the API version passed in request headers to the
- * configured version.
+ * Construct a filter that validates the API version passed in request headers to the configured version.
*
* @param version the API version supported by the broker.
*/
@@ -65,8 +64,8 @@ public class ApiVersionWebFilter implements WebFilter {
}
/**
- * Process the web request and validate the API version in the header. If the API version
- * does not match, then set an HTTP 412 status and write the error message to the response.
+ * Process the web request and validate the API version in the header. If the API version does not match, then set
+ * an HTTP 412 status and write the error message to the response.
*
* @param exchange {@inheritDoc}
* @param chain {@inheritDoc}
@@ -117,4 +116,4 @@ public class ApiVersionWebFilter implements WebFilter {
return buffer;
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfiguration.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfiguration.java
index 42bc0d06..0a044ce2 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfiguration.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfiguration.java
@@ -31,13 +31,11 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * {@link EnableAutoConfiguration Auto-configuration} for the service broker API
- * validation. Configures support for any service broker API version if a version is not
- * specifically configured.
+ * {@link EnableAutoConfiguration Auto-configuration} for the service broker API validation. Configures support for any
+ * service broker API version if a version is not specifically configured.
*
*
- * API validation may be disabled completely by setting the following configuration
- * property:
+ * API validation may be disabled completely by setting the following configuration property:
*
*
* spring.cloud.openservicebroker.api-version-check-enabled = false
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceBrokerWebFluxAutoConfiguration.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceBrokerWebFluxAutoConfiguration.java
index 89477a04..d27748ba 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceBrokerWebFluxAutoConfiguration.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceBrokerWebFluxAutoConfiguration.java
@@ -38,8 +38,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * {@link EnableAutoConfiguration Auto-configuration} for the service broker REST API
- * endpoints.
+ * {@link EnableAutoConfiguration Auto-configuration} for the service broker REST API endpoints.
*
* @author Roy Clarkson
*/
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/package-info.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/package-info.java
index 3a411040..77fdc7eb 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/package-info.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/package-info.java
@@ -17,4 +17,4 @@
/**
* Auto-configuration to support Spring WebFlux
*/
-package org.springframework.cloud.servicebroker.autoconfigure.web.reactive;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.autoconfigure.web.reactive;
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptor.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptor.java
index 8d889274..5740c4ce 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptor.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptor.java
@@ -26,8 +26,8 @@ import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
/**
- * {@link HandlerInterceptor} that inspects the service broker API version passed in all request headers
- * and compares it to the API version supported by the broker.
+ * {@link HandlerInterceptor} that inspects the service broker API version passed in all request headers and compares it
+ * to the API version supported by the broker.
*
* @author Scott Frederick
*/
@@ -43,8 +43,7 @@ public class ApiVersionInterceptor extends HandlerInterceptorAdapter {
}
/**
- * Construct an interceptor that validates the API version passed in request headers to the
- * configured version.
+ * Construct an interceptor that validates the API version passed in request headers to the configured version.
*
* @param version the API version supported by the broker.
*/
@@ -59,8 +58,8 @@ public class ApiVersionInterceptor extends HandlerInterceptorAdapter {
* @param request {@inheritDoc}
* @param response {@inheritDoc}
* @param handler {@inheritDoc}
- * @throws ServiceBrokerApiVersionException if the API version header value does not match the version
- * supported by the broker
+ * @throws ServiceBrokerApiVersionException if the API version header value does not match the version supported
+ * by the broker
*/
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfiguration.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfiguration.java
index 14d8d88c..3d295884 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfiguration.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfiguration.java
@@ -31,13 +31,11 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * {@link EnableAutoConfiguration Auto-configuration} for the service broker API
- * validation. Configures support for any service broker API version if a version is not
- * specifically configured.
+ * {@link EnableAutoConfiguration Auto-configuration} for the service broker API validation. Configures support for any
+ * service broker API version if a version is not specifically configured.
*
*
- * API validation may be disabled completely by setting the following configuration
- * property:
+ * API validation may be disabled completely by setting the following configuration property:
*
*
* spring.cloud.openservicebroker.api-version-check-enabled = false
@@ -49,7 +47,7 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
-@ConditionalOnBean({ ServiceInstanceService.class })
+@ConditionalOnBean({ServiceInstanceService.class})
@ConditionalOnProperty(prefix = "spring.cloud.openservicebroker", name = "api-version-check-enabled", havingValue = "true", matchIfMissing = true)
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
@EnableConfigurationProperties(ServiceBrokerProperties.class)
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcConfigurerAdapter.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcConfigurerAdapter.java
index 43218ce7..7a6741d5 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcConfigurerAdapter.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcConfigurerAdapter.java
@@ -33,6 +33,7 @@ public class ApiVersionWebMvcConfigurerAdapter implements WebMvcConfigurer {
/**
* Auto-wire the expected beans
+ *
* @param apiVersionInterceptor the ApiVersionInterceptor bean
*/
protected ApiVersionWebMvcConfigurerAdapter(ApiVersionInterceptor apiVersionInterceptor) {
@@ -44,4 +45,4 @@ public class ApiVersionWebMvcConfigurerAdapter implements WebMvcConfigurer {
registry.addInterceptor(this.apiVersionInterceptor).addPathPatterns(V2_API_PATH_PATTERN);
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceBrokerWebMvcAutoConfiguration.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceBrokerWebMvcAutoConfiguration.java
index 2e535b0e..560e3331 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceBrokerWebMvcAutoConfiguration.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceBrokerWebMvcAutoConfiguration.java
@@ -38,8 +38,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * {@link EnableAutoConfiguration Auto-configuration} for the service broker REST API
- * endpoints.
+ * {@link EnableAutoConfiguration Auto-configuration} for the service broker REST API endpoints.
*
* @author Benjamin Ihrig
* @author Roy Clarkson
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/package-info.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/package-info.java
index 12404053..edc47b2e 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/package-info.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/package-info.java
@@ -17,4 +17,4 @@
/**
* Auto-configuration to support Spring MVC
*/
-package org.springframework.cloud.servicebroker.autoconfigure.web.servlet;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.autoconfigure.web.servlet;
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/util/package-info.java b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/util/package-info.java
index c0654b00..428b8fd9 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/util/package-info.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/main/java/org/springframework/cloud/servicebroker/autoconfigure/web/util/package-info.java
@@ -17,4 +17,4 @@
/**
* utilities
*/
-package org.springframework.cloud.servicebroker.autoconfigure.web.util;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.autoconfigure.web.util;
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogReactiveBase.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogReactiveBase.java
index bf0bdf9c..4d3e4209 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogReactiveBase.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogReactiveBase.java
@@ -61,7 +61,7 @@ public class CatalogReactiveBase {
@SpringBootApplication(scanBasePackageClasses = {
ServiceBrokerAutoConfiguration.class,
- ServiceBrokerWebFluxAutoConfiguration.class }, exclude = ServiceBrokerWebMvcAutoConfiguration.class)
+ ServiceBrokerWebFluxAutoConfiguration.class}, exclude = ServiceBrokerWebMvcAutoConfiguration.class)
protected static class TestApplication {
@Bean
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogServletBase.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogServletBase.java
index 74375232..fb6c022e 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogServletBase.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/CatalogServletBase.java
@@ -61,7 +61,7 @@ public class CatalogServletBase {
@SpringBootApplication(scanBasePackageClasses = {
ServiceBrokerAutoConfiguration.class,
- ServiceBrokerWebMvcAutoConfiguration.class }, exclude = ServiceBrokerWebFluxAutoConfiguration.class)
+ ServiceBrokerWebMvcAutoConfiguration.class}, exclude = ServiceBrokerWebFluxAutoConfiguration.class)
protected static class TestApplication {
@Bean
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceReactiveBase.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceReactiveBase.java
index e1cd4a3b..03b5792e 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceReactiveBase.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceReactiveBase.java
@@ -61,7 +61,7 @@ public class InstanceReactiveBase {
@SpringBootApplication(scanBasePackageClasses = {
ServiceBrokerAutoConfiguration.class,
- ServiceBrokerWebFluxAutoConfiguration.class }, exclude = ServiceBrokerWebMvcAutoConfiguration.class)
+ ServiceBrokerWebFluxAutoConfiguration.class}, exclude = ServiceBrokerWebMvcAutoConfiguration.class)
protected static class TestApplication {
@Bean
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceServletBase.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceServletBase.java
index d6d77c00..4e95415f 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceServletBase.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/contract/InstanceServletBase.java
@@ -61,7 +61,7 @@ public class InstanceServletBase {
@SpringBootApplication(scanBasePackageClasses = {
ServiceBrokerAutoConfiguration.class,
- ServiceBrokerWebMvcAutoConfiguration.class }, exclude = ServiceBrokerWebFluxAutoConfiguration.class)
+ ServiceBrokerWebMvcAutoConfiguration.class}, exclude = ServiceBrokerWebFluxAutoConfiguration.class)
protected static class TestApplication {
@Bean
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceBrokerWebAutoConfigurationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceBrokerWebAutoConfigurationTest.java
index 9844b33f..61f729fc 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceBrokerWebAutoConfigurationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceBrokerWebAutoConfigurationTest.java
@@ -90,6 +90,7 @@ public abstract class AbstractServiceBrokerWebAutoConfigurationTest {
public EventFlowRegistries eventFlowRegistries() {
return new EventFlowRegistries();
}
+
}
@TestConfiguration
@@ -110,6 +111,7 @@ public abstract class AbstractServiceBrokerWebAutoConfigurationTest {
public EventFlowRegistries eventFlowRegistries() {
return new EventFlowRegistries();
}
+
}
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceBindingControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceBindingControllerIntegrationTest.java
index 69e99141..707ef6cd 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceBindingControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceBindingControllerIntegrationTest.java
@@ -35,8 +35,8 @@ import org.springframework.cloud.servicebroker.model.binding.GetServiceInstanceB
import org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.BDDMockito.then;
import static org.mockito.BDDMockito.given;
+import static org.mockito.BDDMockito.then;
public abstract class AbstractServiceInstanceBindingControllerIntegrationTest extends ServiceInstanceBindingIntegrationTest {
@@ -47,7 +47,8 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
protected ServiceInstanceBindingService serviceInstanceBindingService;
protected void setupServiceInstanceBindingService(CreateServiceInstanceBindingResponse createResponse) {
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willReturn(Mono.just(createResponse));
}
@@ -57,7 +58,8 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
}
protected void setupServiceInstanceBindingService(DeleteServiceInstanceBindingResponse deleteResponse) {
- given(serviceInstanceBindingService.deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
.willReturn(Mono.just(deleteResponse));
}
@@ -67,17 +69,20 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
}
protected void setupServiceInstanceBindingService(ServiceBrokerCreateOperationInProgressException exception) {
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willReturn(Mono.error(exception));
}
protected void setupServiceInstanceBindingService(ServiceBrokerDeleteOperationInProgressException exception) {
- given(serviceInstanceBindingService.deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
.willReturn(Mono.error(exception));
}
protected CreateServiceInstanceBindingRequest verifyCreateBinding() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateServiceInstanceBindingRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(CreateServiceInstanceBindingRequest.class);
then(serviceInstanceBindingService)
.should()
.createServiceInstanceBinding(argumentCaptor.capture());
@@ -85,7 +90,8 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
}
protected GetServiceInstanceBindingRequest verifyGetBinding() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(GetServiceInstanceBindingRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(GetServiceInstanceBindingRequest.class);
then(serviceInstanceBindingService)
.should()
.getServiceInstanceBinding(argumentCaptor.capture());
@@ -93,7 +99,8 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
}
protected DeleteServiceInstanceBindingRequest verifyDeleteBinding() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(DeleteServiceInstanceBindingRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(DeleteServiceInstanceBindingRequest.class);
then(serviceInstanceBindingService)
.should()
.deleteServiceInstanceBinding(argumentCaptor.capture());
@@ -101,10 +108,12 @@ public abstract class AbstractServiceInstanceBindingControllerIntegrationTest ex
}
protected GetLastServiceBindingOperationRequest verifyLastOperation() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(GetLastServiceBindingOperationRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(GetLastServiceBindingOperationRequest.class);
then(serviceInstanceBindingService)
.should()
.getLastOperation(argumentCaptor.capture());
return argumentCaptor.getValue();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceControllerIntegrationTest.java
index 1d80d381..fa9d4c1d 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/AbstractServiceInstanceControllerIntegrationTest.java
@@ -185,32 +185,38 @@ public abstract class AbstractServiceInstanceControllerIntegrationTest extends C
}
protected CreateServiceInstanceRequest verifyCreateServiceInstance() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateServiceInstanceRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(CreateServiceInstanceRequest.class);
Mockito.verify(serviceInstanceService).createServiceInstance(argumentCaptor.capture());
return argumentCaptor.getValue();
}
protected GetServiceInstanceRequest verifyGetServiceInstance() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(GetServiceInstanceRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(GetServiceInstanceRequest.class);
Mockito.verify(serviceInstanceService).getServiceInstance(argumentCaptor.capture());
return argumentCaptor.getValue();
}
protected DeleteServiceInstanceRequest verifyDeleteServiceInstance() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(DeleteServiceInstanceRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(DeleteServiceInstanceRequest.class);
Mockito.verify(serviceInstanceService).deleteServiceInstance(argumentCaptor.capture());
return argumentCaptor.getValue();
}
protected UpdateServiceInstanceRequest verifyUpdateServiceInstance() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(UpdateServiceInstanceRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(UpdateServiceInstanceRequest.class);
Mockito.verify(serviceInstanceService).updateServiceInstance(argumentCaptor.capture());
return argumentCaptor.getValue();
}
protected GetLastServiceOperationRequest verifyLastOperation() {
- ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(GetLastServiceOperationRequest.class);
+ ArgumentCaptor argumentCaptor = ArgumentCaptor
+ .forClass(GetLastServiceOperationRequest.class);
Mockito.verify(serviceInstanceService).getLastOperation(argumentCaptor.capture());
return argumentCaptor.getValue();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/EventFlowsAutoConfigurationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/EventFlowsAutoConfigurationTest.java
index c4d6aa6c..e24167a8 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/EventFlowsAutoConfigurationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/EventFlowsAutoConfigurationTest.java
@@ -232,7 +232,7 @@ public class EventFlowsAutoConfigurationTest {
}
private void assertEventFlowBeans(EventFlowRegistry, ?, ?, ?, ?> registry, int initializationFlowCount,
- int completionFlowCount, int errorFlowCount) {
+ int completionFlowCount, int errorFlowCount) {
List> initializationFlows = (List>) ReflectionTestUtils
.getField(registry, "initializationFlows");
assertThat(initializationFlows.size()).isEqualTo(initializationFlowCount);
@@ -307,7 +307,7 @@ public class EventFlowsAutoConfigurationTest {
return new CreateServiceInstanceCompletionFlow() {
@Override
public Mono complete(CreateServiceInstanceRequest request,
- CreateServiceInstanceResponse response) {
+ CreateServiceInstanceResponse response) {
return Mono.empty();
}
};
@@ -322,6 +322,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -342,7 +343,7 @@ public class EventFlowsAutoConfigurationTest {
return new UpdateServiceInstanceCompletionFlow() {
@Override
public Mono complete(UpdateServiceInstanceRequest request,
- UpdateServiceInstanceResponse response) {
+ UpdateServiceInstanceResponse response) {
return Mono.empty();
}
};
@@ -357,6 +358,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -377,7 +379,7 @@ public class EventFlowsAutoConfigurationTest {
return new DeleteServiceInstanceCompletionFlow() {
@Override
public Mono complete(DeleteServiceInstanceRequest request,
- DeleteServiceInstanceResponse response) {
+ DeleteServiceInstanceResponse response) {
return Mono.empty();
}
};
@@ -402,6 +404,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -422,7 +425,7 @@ public class EventFlowsAutoConfigurationTest {
return new AsyncOperationServiceInstanceCompletionFlow() {
@Override
public Mono complete(GetLastServiceOperationRequest request,
- GetLastServiceOperationResponse response) {
+ GetLastServiceOperationResponse response) {
return Mono.empty();
}
};
@@ -433,7 +436,7 @@ public class EventFlowsAutoConfigurationTest {
return new AsyncOperationServiceInstanceCompletionFlow() {
@Override
public Mono complete(GetLastServiceOperationRequest request,
- GetLastServiceOperationResponse response) {
+ GetLastServiceOperationResponse response) {
return Mono.empty();
}
};
@@ -448,6 +451,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -468,7 +472,7 @@ public class EventFlowsAutoConfigurationTest {
return new CreateServiceInstanceBindingCompletionFlow() {
@Override
public Mono complete(CreateServiceInstanceBindingRequest request,
- CreateServiceInstanceBindingResponse response) {
+ CreateServiceInstanceBindingResponse response) {
return Mono.empty();
}
};
@@ -483,6 +487,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -503,7 +508,7 @@ public class EventFlowsAutoConfigurationTest {
return new DeleteServiceInstanceBindingCompletionFlow() {
@Override
public Mono complete(DeleteServiceInstanceBindingRequest request,
- DeleteServiceInstanceBindingResponse response) {
+ DeleteServiceInstanceBindingResponse response) {
return Mono.empty();
}
};
@@ -518,6 +523,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
@TestConfiguration
@@ -538,7 +544,7 @@ public class EventFlowsAutoConfigurationTest {
return new AsyncOperationServiceInstanceBindingCompletionFlow() {
@Override
public Mono complete(GetLastServiceBindingOperationRequest request,
- GetLastServiceBindingOperationResponse response) {
+ GetLastServiceBindingOperationResponse response) {
return Mono.empty();
}
};
@@ -549,7 +555,7 @@ public class EventFlowsAutoConfigurationTest {
return new AsyncOperationServiceInstanceBindingCompletionFlow() {
@Override
public Mono complete(GetLastServiceBindingOperationRequest request,
- GetLastServiceBindingOperationResponse response) {
+ GetLastServiceBindingOperationResponse response) {
return Mono.empty();
}
};
@@ -564,5 +570,7 @@ public class EventFlowsAutoConfigurationTest {
}
};
}
+
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/MethodSchemaTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/MethodSchemaTest.java
index 2ba780f6..d439a518 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/MethodSchemaTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/MethodSchemaTest.java
@@ -25,14 +25,15 @@ import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
+@SuppressWarnings("unchecked")
public class MethodSchemaTest {
-
- @Test
- public void convertsParametersNumberedMapToArray() {
- //given the properties converted from yml, with array converted to numbered map
- // Simplified example adapted from https://json-schema.org/understanding-json-schema/UnderstandingJSONSchema.pdf
- // section 4.6 "array"
+ @Test
+ public void convertsParametersNumberedMapToArray() {
+ //given the properties converted from yml, with array converted to numbered map
+
+ // Simplified example adapted from https://json-schema.org/understanding-json-schema/UnderstandingJSONSchema.pdf
+ // section 4.6 "array"
/*
{
"type": "object",
@@ -48,41 +49,44 @@ public class MethodSchemaTest {
*/
- MethodSchema methodSchema = new MethodSchema();
- methodSchema.getParameters().put("type", "object");
- Map properties = new HashMap<>();
- properties.put("type", "number");
- Map number = new HashMap<>();
- number.put("type", "number");
- Map streetType = new HashMap<>();
- streetType.put("type", "string");
- Map enumMap = new HashMap<>();
- enumMap.put("0", "Street");
- enumMap.put("1", "Avenue");
- enumMap.put("2", "Boulevard");
- streetType.put("enum", enumMap);
- properties.put("street_type", streetType);
- methodSchema.getParameters().put("properties", properties);
-
- //when
- org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
+ MethodSchema methodSchema = new MethodSchema();
+ methodSchema.getParameters().put("type", "object");
+ Map properties = new HashMap<>();
+ properties.put("type", "number");
+ Map number = new HashMap<>();
+ number.put("type", "number");
+ Map streetType = new HashMap<>();
+ streetType.put("type", "string");
+ Map enumMap = new HashMap<>();
+ enumMap.put("0", "Street");
+ enumMap.put("1", "Avenue");
+ enumMap.put("2", "Boulevard");
+ streetType.put("enum", enumMap);
+ properties.put("street_type", streetType);
+ methodSchema.getParameters().put("properties", properties);
- //then
- assertThat(model.getParameters()).contains(entry("type", "object"));
- assertThat(model.getParameters().get("properties")).isInstanceOf(Map.class);
- @SuppressWarnings("unchecked") Map readProperties = (Map) model.getParameters().get("properties");
- assertThat(readProperties.get("street_type")).isInstanceOf(Map.class);
- @SuppressWarnings("unchecked") Map readStreetType = (Map) readProperties.get("street_type");
- assertThat(readStreetType.get("enum")).isInstanceOf(List.class);
- @SuppressWarnings("unchecked") List readEnum = (List) readStreetType.get("enum");
- assertThat(readEnum).contains("Street", "Avenue", "Boulevard");
- }
+ //when
+ org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
- @Test
- public void convertsNestedParametersNumberedMapToArray() {
- //given the properties converted from yml, with array converted to numbered map
+ //then
+ assertThat(model.getParameters()).contains(entry("type", "object"));
+ assertThat(model.getParameters().get("properties")).isInstanceOf(Map.class);
- // Simplified example adapted from https://json-schema.org/understanding-json-schema/UnderstandingJSONSchema.pdf
+ Map readProperties = (Map) model.getParameters()
+ .get("properties");
+ assertThat(readProperties.get("street_type")).isInstanceOf(Map.class);
+ Map readStreetType = (Map) readProperties
+ .get("street_type");
+ assertThat(readStreetType.get("enum")).isInstanceOf(List.class);
+ List readEnum = (List) readStreetType.get("enum");
+ assertThat(readEnum).contains("Street", "Avenue", "Boulevard");
+ }
+
+ @Test
+ public void convertsNestedParametersNumberedMapToArray() {
+ //given the properties converted from yml, with array converted to numbered map
+
+ // Simplified example adapted from https://json-schema.org/understanding-json-schema/UnderstandingJSONSchema.pdf
/*
{
"type": "array",
@@ -97,56 +101,57 @@ public class MethodSchemaTest {
*/
- MethodSchema methodSchema = new MethodSchema();
- methodSchema.getParameters().put("type", "array");
- Map itemsArray= new HashMap<>();
- Map firstItem = new HashMap<>();
- firstItem.put("type", "string");
- itemsArray.put("0", firstItem);
- Map enumMap = new HashMap<>();
- enumMap.put("0", "Street");
- enumMap.put("1", "Avenue");
- enumMap.put("2", "Boulevard");
- firstItem.put("enum", enumMap);
- methodSchema.getParameters().put("items", itemsArray);
+ MethodSchema methodSchema = new MethodSchema();
+ methodSchema.getParameters().put("type", "array");
+ Map itemsArray = new HashMap<>();
+ Map firstItem = new HashMap<>();
+ firstItem.put("type", "string");
+ itemsArray.put("0", firstItem);
+ Map enumMap = new HashMap<>();
+ enumMap.put("0", "Street");
+ enumMap.put("1", "Avenue");
+ enumMap.put("2", "Boulevard");
+ firstItem.put("enum", enumMap);
+ methodSchema.getParameters().put("items", itemsArray);
- //when
- org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
+ //when
+ org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
- //then
- assertThat(model.getParameters()).contains(entry("type", "array"));
- assertThat(model.getParameters().get("items")).isInstanceOf(List.class);
- @SuppressWarnings("unchecked") List items = (List) model.getParameters().get("items");
- assertThat(items.get(0)).isInstanceOf(Map.class);
- @SuppressWarnings("unchecked") Map readfirstItem= (Map) items.get(0);
- assertThat(readfirstItem).contains(entry("type", "string"));
- assertThat(readfirstItem.get("enum")).isInstanceOf(List.class);
- @SuppressWarnings("unchecked") List readEnum = (List) readfirstItem.get("enum");
- assertThat(readEnum).contains("Street", "Avenue", "Boulevard");
- }
+ //then
+ assertThat(model.getParameters()).contains(entry("type", "array"));
+ assertThat(model.getParameters().get("items")).isInstanceOf(List.class);
+ List items = (List) model.getParameters().get("items");
+ assertThat(items.get(0)).isInstanceOf(Map.class);
+ Map readfirstItem = (Map) items.get(0);
+ assertThat(readfirstItem).contains(entry("type", "string"));
+ assertThat(readfirstItem.get("enum")).isInstanceOf(List.class);
+ List readEnum = (List) readfirstItem.get("enum");
+ assertThat(readEnum).contains("Street", "Avenue", "Boulevard");
+ }
- @Test
- public void doesNotConvertOthersParameters() {
- //given the properties converted from yml, with array converted to numbered map
- MethodSchema methodSchema = new MethodSchema();
- methodSchema.getParameters().put("type", "Object");
- Map enumMap = new HashMap<>();
- enumMap.put("property1", "value1");
- enumMap.put("property2", "value2");
- enumMap.put("property3", "value3");
- methodSchema.getParameters().put("properties", enumMap);
+ @Test
+ public void doesNotConvertOthersParameters() {
+ //given the properties converted from yml, with array converted to numbered map
+ MethodSchema methodSchema = new MethodSchema();
+ methodSchema.getParameters().put("type", "Object");
+ Map enumMap = new HashMap<>();
+ enumMap.put("property1", "value1");
+ enumMap.put("property2", "value2");
+ enumMap.put("property3", "value3");
+ methodSchema.getParameters().put("properties", enumMap);
- //when
- org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
+ //when
+ org.springframework.cloud.servicebroker.model.catalog.MethodSchema model = methodSchema.toModel();
- //then
- assertThat(model.getParameters()).contains(entry("type", "Object"));
- assertThat(model.getParameters().get("properties")).isInstanceOf(Map.class);
- @SuppressWarnings("unchecked") Map propertiesMap = (Map) model.getParameters().get("properties");
- assertThat(propertiesMap).containsOnly(
- entry("property1", "value1"),
- entry("property2", "value2"),
- entry("property3", "value3"));
- }
+ //then
+ assertThat(model.getParameters()).contains(entry("type", "Object"));
+ assertThat(model.getParameters().get("properties")).isInstanceOf(Map.class);
+ Map propertiesMap = (Map) model.getParameters()
+ .get("properties");
+ assertThat(propertiesMap).containsOnly(
+ entry("property1", "value1"),
+ entry("property2", "value2"),
+ entry("property3", "value3"));
+ }
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerAutoConfigurationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerAutoConfigurationTest.java
index e08efc4f..f326cae8 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerAutoConfigurationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerAutoConfigurationTest.java
@@ -124,7 +124,7 @@ public class ServiceBrokerAutoConfigurationTest {
this.contextRunner
.withUserConfiguration(MissingInstanceServiceConfiguration.class)
.run(context -> assertThat(context.getStartupFailure())
- .isExactlyInstanceOf(UnsatisfiedDependencyException.class));
+ .isExactlyInstanceOf(UnsatisfiedDependencyException.class));
}
@Test
@@ -171,11 +171,15 @@ public class ServiceBrokerAutoConfigurationTest {
assertThat(catalog.getServiceDefinitions()).hasSize(1);
assertThat(catalog.getServiceDefinitions().get(0).getId()).isEqualTo("service-one-id");
assertThat(catalog.getServiceDefinitions().get(0).getName()).isEqualTo("Service One");
- assertThat(catalog.getServiceDefinitions().get(0).getDescription()).isEqualTo("Description for Service One");
+ assertThat(catalog.getServiceDefinitions().get(0).getDescription())
+ .isEqualTo("Description for Service One");
assertThat(catalog.getServiceDefinitions().get(0).getPlans()).hasSize(1);
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getId()).isEqualTo("plan-one-id");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getId())
+ .isEqualTo("plan-one-id");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getName())
+ .isEqualTo("Plan One");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
assertThat(context)
.getBean(CatalogService.class)
.isExactlyInstanceOf(BeanCatalogService.class);
@@ -192,6 +196,7 @@ public class ServiceBrokerAutoConfigurationTest {
@TestConfiguration
public static class MinimalWithCatalogConfiguration {
+
@Bean
public Catalog catalog() {
return Catalog.builder().build();
@@ -201,10 +206,12 @@ public class ServiceBrokerAutoConfigurationTest {
public ServiceInstanceService serviceInstanceService() {
return new TestServiceInstanceService();
}
+
}
@TestConfiguration
public static class FullServicesWithCatalogConfiguration {
+
@Bean
public Catalog catalog() {
return Catalog.builder().build();
@@ -219,10 +226,12 @@ public class ServiceBrokerAutoConfigurationTest {
public ServiceInstanceBindingService serviceInstanceBindingService() {
return new TestServiceInstanceBindingService();
}
+
}
@TestConfiguration
public static class FullServicesConfiguration {
+
@Bean
public CatalogService catalogService() {
return new TestCatalogService();
@@ -237,10 +246,12 @@ public class ServiceBrokerAutoConfigurationTest {
public ServiceInstanceBindingService serviceInstanceBindingService() {
return new TestServiceInstanceBindingService();
}
+
}
@TestConfiguration
public static class CatalogAndCatalogServiceConfiguration {
+
@Bean
public Catalog catalog() {
return Catalog.builder().build();
@@ -255,6 +266,7 @@ public class ServiceBrokerAutoConfigurationTest {
public ServiceInstanceService serviceInstanceService() {
return new TestServiceInstanceService();
}
+
}
@TestConfiguration
@@ -270,6 +282,7 @@ public class ServiceBrokerAutoConfigurationTest {
public Catalog catalog() {
return Catalog.builder().build();
}
+
}
@TestConfiguration
@@ -285,6 +298,7 @@ public class ServiceBrokerAutoConfigurationTest {
public ServiceInstanceService serviceInstanceService() {
return new TestServiceInstanceService();
}
+
}
@TestConfiguration
@@ -298,6 +312,7 @@ public class ServiceBrokerAutoConfigurationTest {
this.catalogService = catalogService;
this.serviceInstanceService = serviceInstanceService;
}
+
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesBindingTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesBindingTest.java
index aae6bfbf..46cb2043 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesBindingTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesBindingTest.java
@@ -74,7 +74,8 @@ public class ServiceBrokerPropertiesBindingTest {
assertThat(catalog.getServices().get(0).getPlans()).hasSize(1);
assertThat(catalog.getServices().get(0).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(catalog.getServices().get(0).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServices().get(0).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(catalog.getServices().get(0).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
//Mandatory fields should have a default set when unspecified in configuration
assertThat(catalog.getServices().get(0).isBindable()).isNotNull();
@@ -138,15 +139,19 @@ public class ServiceBrokerPropertiesBindingTest {
assertThat(catalog.getServices().get(0).getTags()).containsOnly("tag1", "tag2");
assertThat(catalog.getServices().get(0).getDashboardClient().getId()).isEqualTo("dashboard-id");
assertThat(catalog.getServices().get(0).getDashboardClient().getSecret()).isEqualTo("dashboard-secret");
- assertThat(catalog.getServices().get(0).getDashboardClient().getRedirectUri()).isEqualTo("dashboard-redirect-uri");
+ assertThat(catalog.getServices().get(0).getDashboardClient().getRedirectUri())
+ .isEqualTo("dashboard-redirect-uri");
}
private void validateServiceOneMetadata(Catalog catalog) {
assertThat(catalog.getServices().get(0).getMetadata().getDisplayName()).isEqualTo("service display name");
assertThat(catalog.getServices().get(0).getMetadata().getImageUrl()).isEqualTo("image-uri");
- assertThat(catalog.getServices().get(0).getMetadata().getLongDescription()).isEqualTo("service long description");
- assertThat(catalog.getServices().get(0).getMetadata().getProviderDisplayName()).isEqualTo("service provider display name");
- assertThat(catalog.getServices().get(0).getMetadata().getDocumentationUrl()).isEqualTo("service-documentation-url");
+ assertThat(catalog.getServices().get(0).getMetadata().getLongDescription())
+ .isEqualTo("service long description");
+ assertThat(catalog.getServices().get(0).getMetadata().getProviderDisplayName())
+ .isEqualTo("service provider display name");
+ assertThat(catalog.getServices().get(0).getMetadata().getDocumentationUrl())
+ .isEqualTo("service-documentation-url");
assertThat(catalog.getServices().get(0).getMetadata().getSupportUrl()).isEqualTo("service-support-url");
Object licenses = catalog.getServices().get(0).getMetadata().getProperties().get("licenses");
@@ -169,32 +174,44 @@ public class ServiceBrokerPropertiesBindingTest {
assertThat(catalog.getServices().get(0).getPlans()).hasSize(2);
assertThat(catalog.getServices().get(0).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(catalog.getServices().get(0).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServices().get(0).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(catalog.getServices().get(0).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
assertThat(catalog.getServices().get(0).getPlans().get(0).getMaintenanceInfo().getVersion()).isEqualTo("1.0.1");
- assertThat(catalog.getServices().get(0).getPlans().get(0).getMaintenanceInfo().getDescription()).isEqualTo("Description for maintenance info");
+ assertThat(catalog.getServices().get(0).getPlans().get(0).getMaintenanceInfo().getDescription())
+ .isEqualTo("Description for maintenance info");
assertThat(catalog.getServices().get(0).getPlans().get(1).getId()).isEqualTo("plan-two-id");
assertThat(catalog.getServices().get(0).getPlans().get(1).getName()).isEqualTo("Plan Two");
- assertThat(catalog.getServices().get(0).getPlans().get(1).getDescription()).isEqualTo("Description for Plan Two");
- assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getProperties()).containsOnly(entry("key1", "value1"), entry("key2", "value2"));
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getDescription())
+ .isEqualTo("Description for Plan Two");
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getProperties())
+ .containsOnly(entry("key1", "value1"), entry("key2", "value2"));
assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getCosts()).hasSize(1);
- assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getUnit()).isEqualTo("MONTHLY");
- assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getAmount()).contains(entry("usd", 649.0));
- assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getDisplayName()).isEqualTo("sample display name");
- assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getBullets()).containsExactlyInAnyOrder("bullet1", "bullet2");
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getUnit())
+ .isEqualTo("MONTHLY");
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getAmount())
+ .contains(entry("usd", 649.0));
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getDisplayName())
+ .isEqualTo("sample display name");
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getMetadata().getBullets())
+ .containsExactlyInAnyOrder("bullet1", "bullet2");
assertThat(catalog.getServices().get(0).getPlans().get(1).isBindable()).isTrue();
assertThat(catalog.getServices().get(0).getPlans().get(1).isFree()).isTrue();
assertThat(catalog.getServices().get(0).getPlans().get(1).isPlanUpdateable()).isTrue();
- assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters())
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate()
+ .getParameters())
.contains(entry("$schema", "https://json-schema.org/draft-04/schema#"),
entry("type", "string"));
- Object enumMap = catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters().get("enum");
+ Object enumMap = catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate()
+ .getParameters().get("enum");
assertThat(enumMap).isInstanceOf(Map.class);
@SuppressWarnings("unchecked")
- Map castedMap = (Map ) enumMap;
- assertThat(castedMap).containsOnly(entry("0","one"),entry("1", "two"), entry("2", "three"));
- assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getUpdate().getParameters())
+ Map castedMap = (Map) enumMap;
+ assertThat(castedMap).containsOnly(entry("0", "one"), entry("1", "two"), entry("2", "three"));
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getUpdate()
+ .getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
- assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceBinding().getCreate().getParameters())
+ assertThat(catalog.getServices().get(0).getPlans().get(1).getSchemas().getServiceBinding().getCreate()
+ .getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
assertThat(catalog.getServices().get(0).getPlans().get(1).getMaximumPollingDuration()).isEqualTo(120);
}
@@ -206,7 +223,8 @@ public class ServiceBrokerPropertiesBindingTest {
assertThat(catalog.getServices().get(1).getPlans()).hasSize(1);
assertThat(catalog.getServices().get(1).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(catalog.getServices().get(1).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServices().get(1).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(catalog.getServices().get(1).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
}
@Configuration
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesTest.java
index 6b4c94d8..ed4fe619 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceBrokerPropertiesTest.java
@@ -82,9 +82,12 @@ public class ServiceBrokerPropertiesTest {
map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.properties[key2]", "value2");
map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.displayName", "service display name");
map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.imageUrl", "image-uri");
- map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.longDescription", "service long description");
- map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.providerDisplayName", "service provider display name");
- map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.documentationUrl", "service-documentation-url");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.longDescription",
+ "service long description");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.providerDisplayName",
+ "service provider display name");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.documentationUrl",
+ "service-documentation-url");
map.put("spring.cloud.openservicebroker.catalog.services[0].metadata.supportUrl", "service-support-url");
map.put("spring.cloud.openservicebroker.catalog.services[0].requires[0]", "syslog_drain");
map.put("spring.cloud.openservicebroker.catalog.services[0].requires[1]", "route_forwarding");
@@ -92,18 +95,21 @@ public class ServiceBrokerPropertiesTest {
map.put("spring.cloud.openservicebroker.catalog.services[0].tags[1]", "tag2");
map.put("spring.cloud.openservicebroker.catalog.services[0].dashboard-client.id", "dashboard-id");
map.put("spring.cloud.openservicebroker.catalog.services[0].dashboard-client.secret", "dashboard-secret");
- map.put("spring.cloud.openservicebroker.catalog.services[0].dashboard-client.redirect-uri", "dashboard-redirect-uri");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].dashboard-client.redirect-uri",
+ "dashboard-redirect-uri");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].id", "plan-one-id");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].name", "Plan One");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].description", "Description for Plan One");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].maintenance_info.version", "1.0.1");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].maintenance_info.description", "Description for maintenance info");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[0].maintenance_info.description",
+ "Description for maintenance info");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].id", "plan-two-id");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].name", "Plan Two");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].description", "Description for Plan Two");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.properties[key1]", "value1");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.properties[key2]", "value2");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.displayName", "sample display name");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.displayName",
+ "sample display name");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.bullets[0]", "bullet1");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.bullets[1]", "bullet2");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].metadata.costs[0].amount[usd]", "649.0");
@@ -111,15 +117,24 @@ public class ServiceBrokerPropertiesTest {
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].bindable", "true");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].free", "true");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].planUpdateable", "true");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[$schema]", "https://json-schema.org/draft-04/schema#");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[type]", "string");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].0", "one");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].1", "two");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].2", "three");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.update.parameters[$schema]", "https://json-schema.org/draft-04/schema#");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.update.parameters[type]", "object");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.servicebinding.create.parameters[$schema]", "https://json-schema.org/draft-04/schema#");
- map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.servicebinding.create.parameters[type]", "object");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[$schema]",
+ "https://json-schema.org/draft-04/schema#");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[type]",
+ "string");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].0",
+ "one");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].1",
+ "two");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.create.parameters[enum].2",
+ "three");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.update.parameters[$schema]",
+ "https://json-schema.org/draft-04/schema#");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.serviceinstance.update.parameters[type]",
+ "object");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.servicebinding.create.parameters[$schema]",
+ "https://json-schema.org/draft-04/schema#");
+ map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].schemas.servicebinding.create.parameters[type]",
+ "object");
map.put("spring.cloud.openservicebroker.catalog.services[0].plans[1].maximumPollingDuration", "200");
map.put("spring.cloud.openservicebroker.catalog.services[1].id", "service-two-id");
map.put("spring.cloud.openservicebroker.catalog.services[1].name", "Service Two");
@@ -134,58 +149,85 @@ public class ServiceBrokerPropertiesTest {
assertThat(properties.getCatalog().getServices()).hasSize(2);
assertThat(properties.getCatalog().getServices().get(0).getId()).isEqualTo("service-one-id");
assertThat(properties.getCatalog().getServices().get(0).getName()).isEqualTo("Service One");
- assertThat(properties.getCatalog().getServices().get(0).getDescription()).isEqualTo("Description for Service One");
+ assertThat(properties.getCatalog().getServices().get(0).getDescription())
+ .isEqualTo("Description for Service One");
assertThat(properties.getCatalog().getServices().get(0).isBindable()).isTrue();
assertThat(properties.getCatalog().getServices().get(0).isBindingsRetrievable()).isTrue();
assertThat(properties.getCatalog().getServices().get(0).isAllowContextUpdates()).isFalse();
assertThat(properties.getCatalog().getServices().get(0).isInstancesRetrievable()).isTrue();
assertThat(properties.getCatalog().getServices().get(0).isPlanUpdateable()).isTrue();
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getDisplayName()).isEqualTo("service display name");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getDisplayName())
+ .isEqualTo("service display name");
assertThat(properties.getCatalog().getServices().get(0).getMetadata().getImageUrl()).isEqualTo("image-uri");
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getLongDescription()).isEqualTo("service long description");
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getProviderDisplayName()).isEqualTo("service provider display name");
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getDocumentationUrl()).isEqualTo("service-documentation-url");
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getSupportUrl()).isEqualTo("service-support-url");
- assertThat(properties.getCatalog().getServices().get(0).getMetadata().getProperties()).containsOnly(entry("key1", "value1"), entry("key2", "value2"));
- assertThat(properties.getCatalog().getServices().get(0).getRequires()).containsOnly("syslog_drain", "route_forwarding");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getLongDescription())
+ .isEqualTo("service long description");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getProviderDisplayName())
+ .isEqualTo("service provider display name");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getDocumentationUrl())
+ .isEqualTo("service-documentation-url");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getSupportUrl())
+ .isEqualTo("service-support-url");
+ assertThat(properties.getCatalog().getServices().get(0).getMetadata().getProperties())
+ .containsOnly(entry("key1", "value1"), entry("key2", "value2"));
+ assertThat(properties.getCatalog().getServices().get(0).getRequires())
+ .containsOnly("syslog_drain", "route_forwarding");
assertThat(properties.getCatalog().getServices().get(0).getTags()).containsOnly("tag1", "tag2");
assertThat(properties.getCatalog().getServices().get(0).getDashboardClient().getId()).isEqualTo("dashboard-id");
- assertThat(properties.getCatalog().getServices().get(0).getDashboardClient().getSecret()).isEqualTo("dashboard-secret");
- assertThat(properties.getCatalog().getServices().get(0).getDashboardClient().getRedirectUri()).isEqualTo("dashboard-redirect-uri");
+ assertThat(properties.getCatalog().getServices().get(0).getDashboardClient().getSecret())
+ .isEqualTo("dashboard-secret");
+ assertThat(properties.getCatalog().getServices().get(0).getDashboardClient().getRedirectUri())
+ .isEqualTo("dashboard-redirect-uri");
assertThat(properties.getCatalog().getServices().get(0).getPlans()).hasSize(2);
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getMaintenanceInfo().getVersion()).isEqualTo("1.0.1");
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getMaintenanceInfo().getDescription()).isEqualTo("Description for maintenance info");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getMaintenanceInfo().getVersion())
+ .isEqualTo("1.0.1");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(0).getMaintenanceInfo().getDescription())
+ .isEqualTo("Description for maintenance info");
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getId()).isEqualTo("plan-two-id");
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getName()).isEqualTo("Plan Two");
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getDescription()).isEqualTo("Description for Plan Two");
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getProperties()).containsOnly(entry("key1", "value1"), entry("key2", "value2"));
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getBullets()).contains("bullet1", "bullet2");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getDescription())
+ .isEqualTo("Description for Plan Two");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getProperties())
+ .containsOnly(entry("key1", "value1"), entry("key2", "value2"));
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getBullets())
+ .contains("bullet1", "bullet2");
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getCosts()).hasSize(1);
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getAmount().get("usd")).isEqualTo(649.0d);
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0).getUnit()).isEqualTo("MONTHLY");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0)
+ .getAmount().get("usd")).isEqualTo(649.0d);
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMetadata().getCosts().get(0)
+ .getUnit()).isEqualTo("MONTHLY");
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).isBindable()).isTrue();
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).isFree()).isTrue();
assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).isPlanUpdateable()).isTrue();
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters())
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance()
+ .getCreate().getParameters())
.contains(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "string"));
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters().get("enum")).isInstanceOf(Map.class);
- @SuppressWarnings("unchecked") Map enumMap = (Map) properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters().get("enum");
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance()
+ .getCreate().getParameters().get("enum")).isInstanceOf(Map.class);
+ @SuppressWarnings("unchecked") Map enumMap = (Map) properties.getCatalog()
+ .getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getCreate().getParameters()
+ .get("enum");
assertThat(enumMap).containsOnly(entry("0", "one"), entry("1", "two"), entry("2", "three"));
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance().getUpdate().getParameters())
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceInstance()
+ .getUpdate().getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceBinding().getCreate().getParameters())
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getSchemas().getServiceBinding()
+ .getCreate().getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
- assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMaximumPollingDuration()).isEqualTo(200);
+ assertThat(properties.getCatalog().getServices().get(0).getPlans().get(1).getMaximumPollingDuration())
+ .isEqualTo(200);
assertThat(properties.getCatalog().getServices().get(1).getId()).isEqualTo("service-two-id");
assertThat(properties.getCatalog().getServices().get(1).getName()).isEqualTo("Service Two");
- assertThat(properties.getCatalog().getServices().get(1).getDescription()).isEqualTo("Description for Service Two");
+ assertThat(properties.getCatalog().getServices().get(1).getDescription())
+ .isEqualTo("Description for Service Two");
assertThat(properties.getCatalog().getServices().get(1).getPlans()).hasSize(1);
assertThat(properties.getCatalog().getServices().get(1).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(properties.getCatalog().getServices().get(1).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(properties.getCatalog().getServices().get(1).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(properties.getCatalog().getServices().get(1).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
}
private void validateCatalogModel(Catalog catalog) {
@@ -197,27 +239,43 @@ public class ServiceBrokerPropertiesTest {
assertThat(catalog.getServiceDefinitions().get(0).isAllowContextUpdates()).isFalse();
assertThat(catalog.getServiceDefinitions().get(0).isInstancesRetrievable()).isTrue();
assertThat(catalog.getServiceDefinitions().get(0).isPlanUpdateable()).isTrue();
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata()).contains(entry("key1", "value1"), entry("key2", "value2"));
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("displayName")).isEqualTo("service display name");
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata())
+ .contains(entry("key1", "value1"), entry("key2", "value2"));
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("displayName"))
+ .isEqualTo("service display name");
assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("imageUrl")).isEqualTo("image-uri");
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("longDescription")).isEqualTo("service long description");
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("providerDisplayName")).isEqualTo("service provider display name");
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("documentationUrl")).isEqualTo("service-documentation-url");
- assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("supportUrl")).isEqualTo("service-support-url");
- assertThat(catalog.getServiceDefinitions().get(0).getRequires()).containsOnly("syslog_drain", "route_forwarding");
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("longDescription"))
+ .isEqualTo("service long description");
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("providerDisplayName"))
+ .isEqualTo("service provider display name");
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("documentationUrl"))
+ .isEqualTo("service-documentation-url");
+ assertThat(catalog.getServiceDefinitions().get(0).getMetadata().get("supportUrl"))
+ .isEqualTo("service-support-url");
+ assertThat(catalog.getServiceDefinitions().get(0).getRequires())
+ .containsOnly("syslog_drain", "route_forwarding");
assertThat(catalog.getServiceDefinitions().get(0).getTags()).containsOnly("tag1", "tag2");
assertThat(catalog.getServiceDefinitions().get(0).getDashboardClient().getId()).isEqualTo("dashboard-id");
- assertThat(catalog.getServiceDefinitions().get(0).getDashboardClient().getSecret()).isEqualTo("dashboard-secret");
- assertThat(catalog.getServiceDefinitions().get(0).getDashboardClient().getRedirectUri()).isEqualTo("dashboard-redirect-uri");
+ assertThat(catalog.getServiceDefinitions().get(0).getDashboardClient().getSecret())
+ .isEqualTo("dashboard-secret");
+ assertThat(catalog.getServiceDefinitions().get(0).getDashboardClient().getRedirectUri())
+ .isEqualTo("dashboard-redirect-uri");
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getMaintenanceInfo().getVersion().toString()).isEqualTo("1.0.1");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getMaintenanceInfo().getDescription()).isEqualTo("Description for maintenance info");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
+ assertThat(
+ catalog.getServiceDefinitions().get(0).getPlans().get(0).getMaintenanceInfo().getVersion().toString())
+ .isEqualTo("1.0.1");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(0).getMaintenanceInfo().getDescription())
+ .isEqualTo("Description for maintenance info");
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getId()).isEqualTo("plan-two-id");
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getName()).isEqualTo("Plan Two");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getDescription()).isEqualTo("Description for Plan Two");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata()).contains(entry("key1", "value1"), entry("key2", "value2"), entry("displayName", "sample display name"));
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getDescription())
+ .isEqualTo("Description for Plan Two");
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata())
+ .contains(entry("key1", "value1"), entry("key2", "value2"),
+ entry("displayName", "sample display name"));
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata().get("costs")).isNotNull();
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata().get("bullets")).isNotNull();
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata())
@@ -235,15 +293,20 @@ public class ServiceBrokerPropertiesTest {
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).isBindable()).isTrue();
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).isFree()).isTrue();
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).isPlanUpdateable()).isTrue();
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema().getCreateMethodSchema().getParameters())
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema()
+ .getCreateMethodSchema().getParameters())
.contains(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "string"));
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema().getCreateMethodSchema().getParameters().get("enum")).isInstanceOf(List.class);
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema()
+ .getCreateMethodSchema().getParameters().get("enum")).isInstanceOf(List.class);
@SuppressWarnings("unchecked")
- List enumList = (List) catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema().getCreateMethodSchema().getParameters().get("enum");
+ List enumList = (List) catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas()
+ .getServiceInstanceSchema().getCreateMethodSchema().getParameters().get("enum");
assertThat(enumList).containsOnly("one", "two", "three");
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema().getUpdateMethodSchema().getParameters())
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceInstanceSchema()
+ .getUpdateMethodSchema().getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
- assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceBindingSchema().getCreateMethodSchema().getParameters())
+ assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getSchemas().getServiceBindingSchema()
+ .getCreateMethodSchema().getParameters())
.containsOnly(entry("$schema", "https://json-schema.org/draft-04/schema#"), entry("type", "object"));
assertThat(catalog.getServiceDefinitions().get(0).getPlans().get(1).getMaximumPollingDuration()).isEqualTo(200);
assertThat(catalog.getServiceDefinitions().get(1).getId()).isEqualTo("service-two-id");
@@ -251,7 +314,8 @@ public class ServiceBrokerPropertiesTest {
assertThat(catalog.getServiceDefinitions().get(1).getDescription()).isEqualTo("Description for Service Two");
assertThat(catalog.getServiceDefinitions().get(1).getPlans().get(0).getId()).isEqualTo("plan-one-id");
assertThat(catalog.getServiceDefinitions().get(1).getPlans().get(0).getName()).isEqualTo("Plan One");
- assertThat(catalog.getServiceDefinitions().get(1).getPlans().get(0).getDescription()).isEqualTo("Description for Plan One");
+ assertThat(catalog.getServiceDefinitions().get(1).getPlans().get(0).getDescription())
+ .isEqualTo("Description for Plan One");
}
private ServiceBrokerProperties bindProperties() {
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceBindingIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceBindingIntegrationTest.java
index ec00c0ec..9ef1853e 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceBindingIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceInstanceBindingIntegrationTest.java
@@ -24,9 +24,9 @@ import org.springframework.web.util.UriComponentsBuilder;
public abstract class ServiceInstanceBindingIntegrationTest extends ControllerIntegrationTest {
- public static final String SERVICE_INSTANCE_BINDING_ID = "service-instance-binding-id";
+ protected static final String SERVICE_INSTANCE_BINDING_ID = "service-instance-binding-id";
- protected static final String SERVICE_INSTANCES_ROOT_PATH = "/v2/service_instances/";
+ private static final String SERVICE_INSTANCES_ROOT_PATH = "/v2/service_instances/";
protected String createRequestBody;
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadataTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadataTest.java
index 92831157..fd1f70b1 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadataTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/ServiceMetadataTest.java
@@ -66,4 +66,4 @@ public class ServiceMetadataTest {
assertThat(actual).isEqualTo(BASE64_ENCODED_IMAGE_DATA);
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/fixture/ServiceFixture.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/fixture/ServiceFixture.java
index 3f025a9d..7d280d47 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/fixture/ServiceFixture.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/fixture/ServiceFixture.java
@@ -111,4 +111,5 @@ public final class ServiceFixture {
.description("Description for Plan Three")
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfigurationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfigurationTest.java
index 8ef1feee..309ad961 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfigurationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ApiVersionWebFluxAutoConfigurationTest.java
@@ -90,7 +90,8 @@ public class ApiVersionWebFluxAutoConfigurationTest {
@Test
public void apiVersionBeansAreCreatedFromCustomVersionProperty() {
webApplicationContextRunner()
- .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromProperty.class)
+ .withUserConfiguration(ServicesConfiguration.class,
+ CustomBrokerApiVersionConfigurationFromProperty.class)
.run((context) -> {
assertThat(context).getBean(BrokerApiVersion.class)
.hasFieldOrPropertyWithValue("apiVersion", "42.321");
@@ -101,7 +102,8 @@ public class ApiVersionWebFluxAutoConfigurationTest {
@Test
public void apiVersionBeansAreCreatedFromCustomVersionBeanOverridesProperty() {
webApplicationContextRunner()
- .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromBeanAndProperty.class)
+ .withUserConfiguration(ServicesConfiguration.class,
+ CustomBrokerApiVersionConfigurationFromBeanAndProperty.class)
.run((context) -> {
assertThat(context).getBean(BrokerApiVersion.class)
.hasFieldOrPropertyWithValue("apiVersion", "99.999");
@@ -123,18 +125,22 @@ public class ApiVersionWebFluxAutoConfigurationTest {
@Configuration
public static class ServicesConfiguration {
+
@Bean
public ServiceInstanceService serviceInstanceService() {
return new TestServiceInstanceService();
}
+
}
@Configuration
public static class CustomBrokerApiVersionConfigurationFromBean {
+
@Bean
public BrokerApiVersion version() {
return new BrokerApiVersion(API_VERSION_CURRENT);
}
+
}
@Configuration
@@ -146,10 +152,12 @@ public class ApiVersionWebFluxAutoConfigurationTest {
@Configuration
@PropertySource("classpath:apiversion.properties")
public static class CustomBrokerApiVersionConfigurationFromBeanAndProperty {
+
@Bean
public BrokerApiVersion version() {
return new BrokerApiVersion("99.999");
}
+
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathDoubleIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathDoubleIntegrationTest.java
index bbb51600..0920666c 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathDoubleIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathDoubleIntegrationTest.java
@@ -47,4 +47,5 @@ public class BasePathDoubleIntegrationTest extends AbstractBasePathWebApplicatio
public void basePathWithAdditionalSegmentsNotFound() {
assertNotFound("/api/broker/123/456");
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathEmptyIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathEmptyIntegrationTest.java
index b035a1f1..22049d10 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathEmptyIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathEmptyIntegrationTest.java
@@ -20,21 +20,22 @@ package org.springframework.cloud.servicebroker.autoconfigure.web.reactive;
import org.junit.jupiter.api.Test;
public class BasePathEmptyIntegrationTest extends AbstractBasePathWebApplicationIntegrationTest {
-
+
@Test
public void noBasePathFound() {
assertFound("", "null");
}
-
+
@Test
public void noBasePathWithPlatformIdFound() {
assertFound("/123", "123");
}
-
+
@Test
public void alternativeDoublePathNotFound() {
assertNotFound("/api/broker");
}
+
@Test
public void alternativeTriplePathNotFound() {
assertNotFound("/api/broker/123");
@@ -44,4 +45,5 @@ public class BasePathEmptyIntegrationTest extends AbstractBasePathWebApplication
public void alternativeQuadruplePathNotFound() {
assertNotFound("/api/broker/123/456");
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathSimpleIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathSimpleIntegrationTest.java
index 38174eaf..5377063d 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathSimpleIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/BasePathSimpleIntegrationTest.java
@@ -58,4 +58,5 @@ public class BasePathSimpleIntegrationTest extends AbstractBasePathWebApplicatio
public void basePathWithPrefixAndMultipleSuffixSegmentsNotFound() {
assertNotFound("/api/broker/123/456");
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/CatalogControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/CatalogControllerIntegrationTest.java
index 5a609ca5..d2fecab8 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/CatalogControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/CatalogControllerIntegrationTest.java
@@ -81,9 +81,12 @@ public class CatalogControllerIntegrationTest {
private void assertCatalog(final String uri) {
List plans = serviceDefinition.getPlans();
Schemas schemas = plans.get(1).getSchemas();
- Map createServiceInstanceSchema = schemas.getServiceInstanceSchema().getCreateMethodSchema().getParameters();
- Map updateServiceInstanceSchema = schemas.getServiceInstanceSchema().getUpdateMethodSchema().getParameters();
- Map createServiceBindingSchema = schemas.getServiceBindingSchema().getCreateMethodSchema().getParameters();
+ Map createServiceInstanceSchema = schemas.getServiceInstanceSchema().getCreateMethodSchema()
+ .getParameters();
+ Map updateServiceInstanceSchema = schemas.getServiceInstanceSchema().getUpdateMethodSchema()
+ .getParameters();
+ Map createServiceBindingSchema = schemas.getServiceBindingSchema().getCreateMethodSchema()
+ .getParameters();
client.get().uri(uri)
.accept(MediaType.APPLICATION_JSON)
@@ -114,7 +117,8 @@ public class CatalogControllerIntegrationTest {
.jsonPath("$.services[0].plans[0].free").isEqualTo(plans.get(0).isFree())
.jsonPath("$.services[0].plans[0].maintenance_info").isNotEmpty()
.jsonPath("$.services[0].plans[0].maintenance_info.version").isEqualTo("1.0.0-alpha+001")
- .jsonPath("$.services[0].plans[0].maintenance_info.description").isEqualTo("Description for maintenance info")
+ .jsonPath("$.services[0].plans[0].maintenance_info.description")
+ .isEqualTo("Description for maintenance info")
.jsonPath("$.services[0].plans[1].id").isEqualTo(plans.get(1).getId())
.jsonPath("$.services[0].plans[1].name").isEqualTo(plans.get(1).getName())
.jsonPath("$.services[0].plans[1].description").isEqualTo(plans.get(1).getDescription())
@@ -122,17 +126,21 @@ public class CatalogControllerIntegrationTest {
.jsonPath("$.services[0].plans[1].bindable").isEqualTo(plans.get(1).isBindable())
.jsonPath("$.services[0].plans[1].free").isEqualTo(plans.get(1).isFree())
.jsonPath("$.services[0].plans[1].plan_updateable").isEqualTo(plans.get(1).isPlanUpdateable())
- .jsonPath("$.services[0].plans[1].schemas.service_instance.create.parameters").isEqualTo(createServiceInstanceSchema)
- .jsonPath("$.services[0].plans[1].schemas.service_instance.update.parameters").isEqualTo(updateServiceInstanceSchema)
- .jsonPath("$.services[0].plans[1].schemas.service_binding.create.parameters").isEqualTo(createServiceBindingSchema)
- .jsonPath("$.services[0].plans[1].maximum_polling_duration").isEqualTo(plans.get(1).getMaximumPollingDuration())
+ .jsonPath("$.services[0].plans[1].schemas.service_instance.create.parameters")
+ .isEqualTo(createServiceInstanceSchema)
+ .jsonPath("$.services[0].plans[1].schemas.service_instance.update.parameters")
+ .isEqualTo(updateServiceInstanceSchema)
+ .jsonPath("$.services[0].plans[1].schemas.service_binding.create.parameters")
+ .isEqualTo(createServiceBindingSchema)
+ .jsonPath("$.services[0].plans[1].maximum_polling_duration")
+ .isEqualTo(plans.get(1).getMaximumPollingDuration())
.jsonPath("$.services[0].plans[1].maintenance_info").doesNotExist()
- .jsonPath("$.services[0].plans[2].id").isEqualTo(plans.get(2).getId())
- .jsonPath("$.services[0].plans[2].name").isEqualTo(plans.get(2).getName())
- .jsonPath("$.services[0].plans[2].description").isEqualTo(plans.get(2).getDescription())
- .jsonPath("$.services[0].plans[2].free").isEqualTo(plans.get(2).isFree())
+ .jsonPath("$.services[0].plans[2].id").isEqualTo(plans.get(2).getId())
+ .jsonPath("$.services[0].plans[2].name").isEqualTo(plans.get(2).getName())
+ .jsonPath("$.services[0].plans[2].description").isEqualTo(plans.get(2).getDescription())
+ .jsonPath("$.services[0].plans[2].free").isEqualTo(plans.get(2).isFree())
.jsonPath("$.services[0].plans[2].maintenance_info").doesNotExist()
- .jsonPath("$.services[0].plans[3]").doesNotExist()
+ .jsonPath("$.services[0].plans[3]").doesNotExist()
.jsonPath("$.services[1]").doesNotExist();
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceBindingControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceBindingControllerIntegrationTest.java
index 64a0c4fd..b48b1e80 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceBindingControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceBindingControllerIntegrationTest.java
@@ -95,13 +95,13 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
.build());
client.put().uri(buildCreateUrl(PLATFORM_INSTANCE_ID, false))
- .contentType(MediaType.APPLICATION_JSON)
- .bodyValue(createRequestBody)
- .header(API_INFO_LOCATION_HEADER, API_INFO_LOCATION)
- .header(ORIGINATING_IDENTITY_HEADER, buildOriginatingIdentityHeader())
- .accept(MediaType.APPLICATION_JSON)
- .exchange()
- .expectStatus().isCreated();
+ .contentType(MediaType.APPLICATION_JSON)
+ .bodyValue(createRequestBody)
+ .header(API_INFO_LOCATION_HEADER, API_INFO_LOCATION)
+ .header(ORIGINATING_IDENTITY_HEADER, buildOriginatingIdentityHeader())
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus().isCreated();
CreateServiceInstanceBindingRequest actualRequest = verifyCreateBinding();
assertThat(actualRequest.getPlan().getId()).isEqualTo(actualRequest.getPlanId());
@@ -203,11 +203,11 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
.build());
client.put().uri(buildCreateUrl())
- .contentType(MediaType.APPLICATION_JSON)
- .bodyValue(createRequestBody)
- .accept(MediaType.APPLICATION_JSON)
- .exchange()
- .expectStatus().isCreated();
+ .contentType(MediaType.APPLICATION_JSON)
+ .bodyValue(createRequestBody)
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus().isCreated();
CreateServiceInstanceBindingRequest actualRequest = verifyCreateBinding();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -259,7 +259,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void createBindingWithUnknownServiceInstanceIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceDoesNotExistException(SERVICE_INSTANCE_ID));
client.put().uri(buildCreateUrl())
@@ -294,7 +295,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void createBindingWithDuplicateIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceBindingExistsException(SERVICE_INSTANCE_ID, SERVICE_INSTANCE_BINDING_ID));
client.put().uri(buildCreateUrl())
@@ -306,7 +308,9 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
.expectStatus().isEqualTo(HttpStatus.CONFLICT)
.expectBody()
.jsonPath("$.description").isNotEmpty()
- .consumeWith(result -> assertDescriptionContains(result, String.format("serviceInstanceId=%s, bindingId=%s", SERVICE_INSTANCE_ID, SERVICE_INSTANCE_BINDING_ID)));
+ .consumeWith(result -> assertDescriptionContains(result,
+ String.format("serviceInstanceId=%s, bindingId=%s", SERVICE_INSTANCE_ID,
+ SERVICE_INSTANCE_BINDING_ID)));
}
@Test
@@ -412,15 +416,15 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
setupCatalogService();
setupServiceInstanceBindingService(DeleteServiceInstanceBindingResponse.builder()
- .build());
+ .build());
client.delete().uri(buildDeleteUrl(PLATFORM_INSTANCE_ID, false))
- .header(API_INFO_LOCATION_HEADER, API_INFO_LOCATION)
- .header(ORIGINATING_IDENTITY_HEADER, buildOriginatingIdentityHeader())
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .json("{}");
+ .header(API_INFO_LOCATION_HEADER, API_INFO_LOCATION)
+ .header(ORIGINATING_IDENTITY_HEADER, buildOriginatingIdentityHeader())
+ .exchange()
+ .expectStatus().isOk()
+ .expectBody()
+ .json("{}");
then(serviceInstanceBindingService)
.should()
@@ -480,7 +484,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void deleteBindingWithUnknownInstanceIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceDoesNotExistException(SERVICE_INSTANCE_ID));
client.delete().uri(buildDeleteUrl())
@@ -496,7 +501,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void deleteBindingWithUnknownBindingIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceBindingDoesNotExistException(SERVICE_INSTANCE_BINDING_ID));
client.delete().uri(buildDeleteUrl())
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceControllerIntegrationTest.java
index 4bb62cb6..9e165f2c 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/reactive/ServiceInstanceControllerIntegrationTest.java
@@ -218,11 +218,11 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.build());
client.put().uri(buildCreateUpdateUrl())
- .contentType(MediaType.APPLICATION_JSON)
- .bodyValue(createRequestBody)
- .accept(MediaType.APPLICATION_JSON)
- .exchange()
- .expectStatus().isCreated();
+ .contentType(MediaType.APPLICATION_JSON)
+ .bodyValue(createRequestBody)
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus().isCreated();
CreateServiceInstanceRequest actualRequest = verifyCreateServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -243,7 +243,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.expectStatus().isEqualTo(HttpStatus.BAD_REQUEST)
.expectBody()
.jsonPath("$.description").isNotEmpty()
- .consumeWith(result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
+ .consumeWith(
+ result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
}
@Test
@@ -262,7 +263,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.expectBody()
.jsonPath("$.description").isNotEmpty()
.consumeWith(result -> assertDescriptionContains(result,
- String.format("serviceInstanceId=%s, serviceDefinitionId=%s", SERVICE_INSTANCE_ID, serviceDefinition.getId())));
+ String.format("serviceInstanceId=%s, serviceDefinitionId=%s", SERVICE_INSTANCE_ID,
+ serviceDefinition.getId())));
}
@Test
@@ -440,11 +442,11 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.build());
client.delete().uri(buildDeleteUrl())
- .accept(MediaType.APPLICATION_JSON)
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .json("{}");
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus().isOk()
+ .expectBody()
+ .json("{}");
DeleteServiceInstanceRequest actualRequest = verifyDeleteServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -476,7 +478,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.expectStatus().isEqualTo(HttpStatus.BAD_REQUEST)
.expectBody()
.jsonPath("$.description").isNotEmpty()
- .consumeWith(result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
+ .consumeWith(
+ result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
}
@Test
@@ -568,16 +571,16 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
setupCatalogService();
setupServiceInstanceService(UpdateServiceInstanceResponse.builder()
- .build());
+ .build());
client.patch().uri(buildCreateUpdateUrl())
- .contentType(MediaType.APPLICATION_JSON)
- .bodyValue(updateRequestBodyWithPlan)
- .accept(MediaType.APPLICATION_JSON)
- .exchange()
- .expectStatus().isOk()
- .expectBody()
- .json("{}");
+ .contentType(MediaType.APPLICATION_JSON)
+ .bodyValue(updateRequestBodyWithPlan)
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus().isOk()
+ .expectBody()
+ .json("{}");
UpdateServiceInstanceRequest actualRequest = verifyUpdateServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -639,7 +642,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.expectHeader().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)
.expectBody()
.jsonPath("$.description").isNotEmpty()
- .consumeWith(result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
+ .consumeWith(
+ result -> assertDescriptionContains(result, String.format("id=%s", serviceDefinition.getId())));
}
@Test
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorIntegrationTest.java
index 48bf07f7..ca491b0e 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorIntegrationTest.java
@@ -111,4 +111,5 @@ public class ApiVersionInterceptorIntegrationTest {
.setControllerAdvice(ServiceBrokerWebMvcExceptionHandler.class)
.setMessageConverters(new MappingJackson2HttpMessageConverter()).build();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorTest.java
index 826a97b7..2da2f4c0 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionInterceptorTest.java
@@ -94,4 +94,5 @@ public class ApiVersionInterceptorTest {
ApiVersionInterceptor interceptor = new ApiVersionInterceptor(brokerApiVersion);
assertThat(interceptor.preHandle(request, response, null)).isTrue();
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfigurationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfigurationTest.java
index 6df01372..fe5b82c0 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfigurationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ApiVersionWebMvcAutoConfigurationTest.java
@@ -92,7 +92,8 @@ public class ApiVersionWebMvcAutoConfigurationTest {
@Test
public void apiVersionBeansAreCreatedFromCustomVersionProperty() {
webApplicationContextRunner()
- .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromProperty.class)
+ .withUserConfiguration(ServicesConfiguration.class,
+ CustomBrokerApiVersionConfigurationFromProperty.class)
.run((context) -> {
assertThat(context).getBean(BrokerApiVersion.class)
.hasFieldOrPropertyWithValue("apiVersion", "42.321");
@@ -104,7 +105,8 @@ public class ApiVersionWebMvcAutoConfigurationTest {
@Test
public void apiVersionBeansAreCreatedFromCustomVersionBeanOverridesProperty() {
webApplicationContextRunner()
- .withUserConfiguration(ServicesConfiguration.class, CustomBrokerApiVersionConfigurationFromBeanAndProperty.class)
+ .withUserConfiguration(ServicesConfiguration.class,
+ CustomBrokerApiVersionConfigurationFromBeanAndProperty.class)
.run((context) -> {
assertThat(context).getBean(BrokerApiVersion.class)
.hasFieldOrPropertyWithValue("apiVersion", "99.999");
@@ -127,18 +129,22 @@ public class ApiVersionWebMvcAutoConfigurationTest {
@Configuration
public static class ServicesConfiguration {
+
@Bean
public ServiceInstanceService serviceInstanceService() {
return new TestServiceInstanceService();
}
+
}
@Configuration
public static class CustomBrokerApiVersionConfigurationFromBean {
+
@Bean
public BrokerApiVersion version() {
return new BrokerApiVersion(API_VERSION_CURRENT);
}
+
}
@Configuration
@@ -150,10 +156,12 @@ public class ApiVersionWebMvcAutoConfigurationTest {
@Configuration
@PropertySource("classpath:apiversion.properties")
public static class CustomBrokerApiVersionConfigurationFromBeanAndProperty {
+
@Bean
public BrokerApiVersion version() {
return new BrokerApiVersion("99.999");
}
+
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathDoubleIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathDoubleIntegrationTest.java
index e84136ab..7db25c8f 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathDoubleIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathDoubleIntegrationTest.java
@@ -37,7 +37,7 @@ public class BasePathDoubleIntegrationTest extends AbstractBasePathWebApplicatio
public void noBasePathNotFound() throws Exception {
assertNotFound("");
}
-
+
@Test
public void noBasePathWithPlatformIdNotFound() throws Exception {
assertNotFound("/123");
@@ -47,4 +47,5 @@ public class BasePathDoubleIntegrationTest extends AbstractBasePathWebApplicatio
public void basePathWithAdditionalSegmentsNotFound() throws Exception {
assertNotFound("/api/broker/123/456");
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathEmptyIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathEmptyIntegrationTest.java
index d49ff7f4..8a1a11fe 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathEmptyIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathEmptyIntegrationTest.java
@@ -20,21 +20,22 @@ package org.springframework.cloud.servicebroker.autoconfigure.web.servlet;
import org.junit.jupiter.api.Test;
public class BasePathEmptyIntegrationTest extends AbstractBasePathWebApplicationIntegrationTest {
-
+
@Test
public void noBasePathFound() throws Exception {
assertFound("", "null");
}
-
+
@Test
public void noBasePathWithPlatformIdFound() throws Exception {
assertFound("/123", "123");
}
-
+
@Test
public void alternativeDoublePathNotFound() throws Exception {
assertNotFound("/api/broker");
}
+
@Test
public void alternativeTriplePathNotFound() throws Exception {
assertNotFound("/api/broker/123");
@@ -44,4 +45,5 @@ public class BasePathEmptyIntegrationTest extends AbstractBasePathWebApplication
public void alternativeQuadruplePathNotFound() throws Exception {
assertNotFound("/api/broker/123/456");
}
+
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathSimpleIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathSimpleIntegrationTest.java
index 34198f23..8401dfc4 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathSimpleIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/BasePathSimpleIntegrationTest.java
@@ -37,12 +37,12 @@ public class BasePathSimpleIntegrationTest extends AbstractBasePathWebApplicatio
public void noBasePathNotFound() throws Exception {
assertNotFound("");
}
-
+
@Test
public void alternativePathNotFound() throws Exception {
assertNotFound("/123");
}
-
+
@Test
public void basePathWithPrefixSegmentNotFound() throws Exception {
assertNotFound("/api/broker");
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/CatalogControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/CatalogControllerIntegrationTest.java
index 89e27482..79ad9d43 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/CatalogControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/CatalogControllerIntegrationTest.java
@@ -109,9 +109,12 @@ public class CatalogControllerIntegrationTest {
List plans = serviceDefinition.getPlans();
Schemas schemas = plans.get(1).getSchemas();
- Map createServiceInstanceSchema = schemas.getServiceInstanceSchema().getCreateMethodSchema().getParameters();
- Map updateServiceInstanceSchema = schemas.getServiceInstanceSchema().getUpdateMethodSchema().getParameters();
- Map createServiceBindingSchema = schemas.getServiceBindingSchema().getCreateMethodSchema().getParameters();
+ Map createServiceInstanceSchema = schemas.getServiceInstanceSchema().getCreateMethodSchema()
+ .getParameters();
+ Map updateServiceInstanceSchema = schemas.getServiceInstanceSchema().getUpdateMethodSchema()
+ .getParameters();
+ Map createServiceBindingSchema = schemas.getServiceBindingSchema().getCreateMethodSchema()
+ .getParameters();
ResultActions resultActions = this.mockMvc.perform(asyncDispatch(mvcResult));
@@ -130,20 +133,32 @@ public class CatalogControllerIntegrationTest {
))
.andExpect(jsonPath("$.services[*].metadata.features[*]", contains(features.get(0), features.get(1))))
.andExpect(jsonPath("$.services[*].plans[*]", hasSize(3)))
- .andExpect(jsonPath("$.services[*].plans[*].id", containsInAnyOrder(plans.get(0).getId(), plans.get(1).getId(), plans.get(2).getId())))
- .andExpect(jsonPath("$.services[*].plans[*].name", containsInAnyOrder(plans.get(0).getName(), plans.get(1).getName(), plans.get(2).getName())))
- .andExpect(jsonPath("$.services[*].plans[*].description", containsInAnyOrder(plans.get(0).getDescription(), plans.get(1).getDescription(), plans.get(2).getDescription())))
+ .andExpect(jsonPath("$.services[*].plans[*].id",
+ containsInAnyOrder(plans.get(0).getId(), plans.get(1).getId(), plans.get(2).getId())))
+ .andExpect(jsonPath("$.services[*].plans[*].name",
+ containsInAnyOrder(plans.get(0).getName(), plans.get(1).getName(), plans.get(2).getName())))
+ .andExpect(jsonPath("$.services[*].plans[*].description",
+ containsInAnyOrder(plans.get(0).getDescription(), plans.get(1).getDescription(),
+ plans.get(2).getDescription())))
.andExpect(jsonPath("$.services[*].plans[*].metadata", contains(plans.get(1).getMetadata())))
.andExpect(jsonPath("$.services[*].plans[*].bindable", hasSize(1)))
.andExpect(jsonPath("$.services[*].plans[*].bindable", contains(plans.get(1).isBindable())))
- .andExpect(jsonPath("$.services[*].plans[*].free", containsInAnyOrder(plans.get(0).isFree(), plans.get(1).isFree(), plans.get(2).isFree())))
- .andExpect(jsonPath("$.services[*].plans[*].plan_updateable", contains(plans.get(1).isPlanUpdateable())))
- .andExpect(jsonPath("$.services[*].plans[*].maximum_polling_duration", contains(plans.get(1).getMaximumPollingDuration())))
- .andExpect(jsonPath("$.services[*].plans[*].schemas.service_instance.create.parameters", contains(createServiceInstanceSchema)))
- .andExpect(jsonPath("$.services[*].plans[*].schemas.service_instance.update.parameters", contains(updateServiceInstanceSchema)))
- .andExpect(jsonPath("$.services[*].plans[*].schemas.service_binding.create.parameters", contains(createServiceBindingSchema)))
- .andExpect(jsonPath("$.services[*].plans[*].maintenance_info.version", contains(plans.get(0).getMaintenanceInfo().getVersion())))
- .andExpect(jsonPath("$.services[*].plans[*].maintenance_info.description", contains(plans.get(0).getMaintenanceInfo().getDescription())));
+ .andExpect(jsonPath("$.services[*].plans[*].free",
+ containsInAnyOrder(plans.get(0).isFree(), plans.get(1).isFree(), plans.get(2).isFree())))
+ .andExpect(
+ jsonPath("$.services[*].plans[*].plan_updateable", contains(plans.get(1).isPlanUpdateable())))
+ .andExpect(jsonPath("$.services[*].plans[*].maximum_polling_duration",
+ contains(plans.get(1).getMaximumPollingDuration())))
+ .andExpect(jsonPath("$.services[*].plans[*].schemas.service_instance.create.parameters",
+ contains(createServiceInstanceSchema)))
+ .andExpect(jsonPath("$.services[*].plans[*].schemas.service_instance.update.parameters",
+ contains(updateServiceInstanceSchema)))
+ .andExpect(jsonPath("$.services[*].plans[*].schemas.service_binding.create.parameters",
+ contains(createServiceBindingSchema)))
+ .andExpect(jsonPath("$.services[*].plans[*].maintenance_info.version",
+ contains(plans.get(0).getMaintenanceInfo().getVersion())))
+ .andExpect(jsonPath("$.services[*].plans[*].maintenance_info.description",
+ contains(plans.get(0).getMaintenanceInfo().getDescription())));
}
}
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceBindingControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceBindingControllerIntegrationTest.java
index 92a1aafe..4d6b9970 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceBindingControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceBindingControllerIntegrationTest.java
@@ -52,8 +52,8 @@ import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.StringContains.containsString;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.doThrow;
-import static org.mockito.BDDMockito.then;
import static org.mockito.BDDMockito.given;
+import static org.mockito.BDDMockito.then;
import static org.springframework.cloud.servicebroker.model.ServiceBrokerRequest.API_INFO_LOCATION_HEADER;
import static org.springframework.cloud.servicebroker.model.ServiceBrokerRequest.ORIGINATING_IDENTITY_HEADER;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.asyncDispatch;
@@ -122,7 +122,7 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
.andReturn();
mockMvc.perform(asyncDispatch(mvcResult))
- .andExpect(status().isCreated());
+ .andExpect(status().isCreated());
CreateServiceInstanceBindingRequest actualRequest = verifyCreateBinding();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -279,7 +279,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void createBindingWithUnknownServiceInstanceIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceDoesNotExistException(SERVICE_INSTANCE_ID));
MvcResult mvcResult = mockMvc.perform(put(buildCreateUrl())
@@ -314,7 +315,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
public void createBindingWithDuplicateIdFails() throws Exception {
setupCatalogService();
- given(serviceInstanceBindingService.createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
+ given(serviceInstanceBindingService
+ .createServiceInstanceBinding(any(CreateServiceInstanceBindingRequest.class)))
.willThrow(new ServiceInstanceBindingExistsException(SERVICE_INSTANCE_ID, SERVICE_INSTANCE_BINDING_ID));
MvcResult mvcResult = mockMvc.perform(put(buildCreateUrl())
@@ -514,8 +516,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
.andReturn();
mockMvc.perform(asyncDispatch(mvcResult))
- .andExpect(status().isOk())
- .andExpect(content().string("{}"));
+ .andExpect(status().isOk())
+ .andExpect(content().string("{}"));
then(serviceInstanceBindingService)
.should()
@@ -532,7 +534,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
setupCatalogService();
doThrow(new ServiceInstanceDoesNotExistException(SERVICE_INSTANCE_ID))
- .when(serviceInstanceBindingService).deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class));
+ .when(serviceInstanceBindingService)
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class));
MvcResult mvcResult = mockMvc.perform(delete(buildDeleteUrl())
.contentType(MediaType.APPLICATION_JSON))
@@ -549,7 +552,8 @@ public class ServiceInstanceBindingControllerIntegrationTest extends AbstractSer
setupCatalogService();
doThrow(new ServiceInstanceBindingDoesNotExistException(SERVICE_INSTANCE_BINDING_ID))
- .when(serviceInstanceBindingService).deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class));
+ .when(serviceInstanceBindingService)
+ .deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class));
MvcResult mvcResult = mockMvc.perform(delete(buildDeleteUrl())
.contentType(MediaType.APPLICATION_JSON))
diff --git a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceControllerIntegrationTest.java b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceControllerIntegrationTest.java
index 0e439978..1bd53b59 100644
--- a/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceControllerIntegrationTest.java
+++ b/spring-cloud-open-service-broker-autoconfigure/src/test/java/org/springframework/cloud/servicebroker/autoconfigure/web/servlet/ServiceInstanceControllerIntegrationTest.java
@@ -255,7 +255,7 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.andReturn();
mockMvc.perform(asyncDispatch(mvcResult))
- .andExpect(status().isCreated());
+ .andExpect(status().isCreated());
CreateServiceInstanceRequest actualRequest = verifyCreateServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -388,7 +388,7 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
@Test
public void getServiceInstanceSucceeds() throws Exception {
setupServiceInstanceService(GetServiceInstanceResponse.builder()
- .build());
+ .build());
MvcResult mvcResult = mockMvc.perform(get(buildCreateUpdateUrl(PLATFORM_INSTANCE_ID, false))
.header(API_INFO_LOCATION_HEADER, API_INFO_LOCATION)
@@ -504,8 +504,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.andReturn();
mockMvc.perform(asyncDispatch(mvcResult))
- .andExpect(status().isOk())
- .andExpect(content().string("{}"));
+ .andExpect(status().isOk())
+ .andExpect(content().string("{}"));
DeleteServiceInstanceRequest actualRequest = verifyDeleteServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
@@ -646,8 +646,8 @@ public class ServiceInstanceControllerIntegrationTest extends AbstractServiceIns
.andReturn();
mockMvc.perform(asyncDispatch(mvcResult))
- .andExpect(status().isOk())
- .andExpect(content().string("{}"));
+ .andExpect(status().isOk())
+ .andExpect(content().string("{}"));
UpdateServiceInstanceRequest actualRequest = verifyUpdateServiceInstance();
assertThat(actualRequest.isAsyncAccepted()).isEqualTo(false);
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/ServiceBrokerRestController.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/ServiceBrokerRestController.java
index 375831ba..3fb96f90 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/ServiceBrokerRestController.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/ServiceBrokerRestController.java
@@ -16,22 +16,24 @@
package org.springframework.cloud.servicebroker.annotation;
-import org.springframework.core.annotation.AliasFor;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.springframework.core.annotation.AliasFor;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RestController
@RequestMapping("${spring.cloud.openservicebroker.base-path:}")
public @interface ServiceBrokerRestController {
+
@AliasFor(annotation = RestController.class)
String value() default "";
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/package-info.java
index e3790b58..880e6e84 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/annotation/package-info.java
@@ -17,4 +17,4 @@
/**
* Annotations to support configuring Service Brokers
*/
-package org.springframework.cloud.servicebroker.annotation;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.annotation;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/BaseController.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/BaseController.java
index 83c6e593..47553922 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/BaseController.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/BaseController.java
@@ -56,6 +56,7 @@ public class BaseController {
/**
* Construct a new {@link BaseController}
+ *
* @param catalogService the catalog service
*/
public BaseController(CatalogService catalogService) {
@@ -64,6 +65,7 @@ public class BaseController {
/**
* Sets common headers for the request
+ *
* @param request the request in which to set the headers
* @param platformInstanceId the platform instance ID
* @param apiInfoLocation location of the API info endpoint of the platform instance
@@ -71,7 +73,7 @@ public class BaseController {
* @return the request with the applied headers
*/
protected Mono configureCommonRequestFields(ServiceBrokerRequest request, String platformInstanceId,
- String apiInfoLocation, String originatingIdentityString) {
+ String apiInfoLocation, String originatingIdentityString) {
request.setPlatformInstanceId(platformInstanceId);
request.setApiInfoLocation(apiInfoLocation);
request.setOriginatingIdentity(parseOriginatingIdentity(originatingIdentityString));
@@ -80,6 +82,7 @@ public class BaseController {
/**
* Sets common headers for the request
+ *
* @param request the request in which to set the headers
* @param platformInstanceId the platform instance ID
* @param apiInfoLocation location of the API info endpoint of the platform instance
@@ -88,8 +91,7 @@ public class BaseController {
* @return the request with the applied headers
*/
protected Mono configureCommonRequestFields(AsyncServiceBrokerRequest request, String platformInstanceId,
- String apiInfoLocation, String originatingIdentityString,
- boolean asyncAccepted) {
+ String apiInfoLocation, String originatingIdentityString, boolean asyncAccepted) {
request.setAsyncAccepted(asyncAccepted);
return configureCommonRequestFields(request, platformInstanceId, apiInfoLocation, originatingIdentityString)
.cast(AsyncServiceBrokerRequest.class);
@@ -97,6 +99,7 @@ public class BaseController {
/**
* Find the Service Definition for the provided ID. Emits an error if not found.
+ *
* @param serviceDefinitionId the service definition ID
* @return the Service Definition
*/
@@ -107,6 +110,7 @@ public class BaseController {
/**
* Find the Service Definition for the provided ID, or empty if not found.
+ *
* @param serviceDefinitionId the service definition ID
* @return the Service Definition
*/
@@ -116,6 +120,7 @@ public class BaseController {
/**
* Find the Plan for the Service Definition and Plan ID, or empty if not found.
+ *
* @param serviceDefinition the Service Definition
* @param planId the plan ID
* @return the Plan
@@ -130,6 +135,7 @@ public class BaseController {
/**
* Find the Plan for the Service Definition and Plan ID. Emits an error if not found.
+ *
* @param serviceDefinition the Service Definition
* @param planId the plan ID
* @return the Plan
@@ -204,11 +210,12 @@ public class BaseController {
private Map readJsonFromString(String value) throws IOException {
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().build();
- return objectMapper.readValue(value, new TypeReference>() {});
+ return objectMapper.readValue(value, new TypeReference>() {});
}
/**
* If an asynchronous request is received, then return HTTP 202 Accepted, otherwise HTTP 200 OK
+ *
* @param response the response
* @return the HTTP status
*/
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/CatalogController.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/CatalogController.java
index 73a32e83..e9e53809 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/CatalogController.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/CatalogController.java
@@ -28,10 +28,10 @@ import org.springframework.web.bind.annotation.GetMapping;
/**
* Provide endpoints for the catalog API.
*
- * @see Open Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
@ServiceBrokerRestController
public class CatalogController extends BaseController {
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandler.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandler.java
index b992a3f5..3d245c16 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandler.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandler.java
@@ -318,6 +318,7 @@ public abstract class ServiceBrokerExceptionHandler {
/**
* Format an error message for the exception
+ *
* @param ex the exception
* @return the error message
*/
@@ -328,6 +329,7 @@ public abstract class ServiceBrokerExceptionHandler {
/**
* Format an error message for the exception
+ *
* @param ex the exception
* @return the error message
*/
@@ -337,6 +339,7 @@ public abstract class ServiceBrokerExceptionHandler {
/**
* Create an error message object
+ *
* @param message the text of the message
* @return the error message
*/
@@ -346,6 +349,7 @@ public abstract class ServiceBrokerExceptionHandler {
/**
* Creates an error message for binding errors
+ *
* @param ex the exception
* @param result the binding result
* @return the error message
@@ -359,5 +363,4 @@ public abstract class ServiceBrokerExceptionHandler {
return getErrorResponse(message.toString());
}
-
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandler.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandler.java
index 1b3b61cc..6bb2661f 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandler.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandler.java
@@ -73,4 +73,5 @@ public class ServiceBrokerWebMvcExceptionHandler extends ServiceBrokerExceptionH
LOG.error(UNPROCESSABLE_REQUEST, ex);
return getErrorResponse(ex.getMessage());
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingController.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingController.java
index 34257277..ec768ecd 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingController.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingController.java
@@ -16,9 +16,10 @@
package org.springframework.cloud.servicebroker.controller;
-import javax.validation.Valid;
import java.util.Map;
+import javax.validation.Valid;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Mono;
@@ -52,12 +53,12 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* Provide endpoints for the service bindings API.
- *
- * @see Open Service Broker API specification
*
* @author sgreenberg@pivotal.io
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service Broker
+ * API specification
*/
@ServiceBrokerRestController
public class ServiceInstanceBindingController extends BaseController {
@@ -116,13 +117,15 @@ public class ServiceInstanceBindingController extends BaseController {
return request;
}))
.cast(AsyncServiceBrokerRequest.class)
- .flatMap(req -> configureCommonRequestFields(req, pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE),
+ .flatMap(req -> configureCommonRequestFields(req,
+ pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE),
apiInfoLocation, originatingIdentityString, acceptsIncomplete))
.cast(CreateServiceInstanceBindingRequest.class)
.flatMap(req -> service.createServiceInstanceBinding(req)
.doOnRequest(v -> LOG.debug("Creating a service instance binding: request={}", req))
- .doOnSuccess(response -> LOG.debug("Creating a service instance binding succeeded: serviceInstanceId={}, bindingId={}, response={}",
- serviceInstanceId, bindingId, response)))
+ .doOnSuccess(response -> LOG
+ .debug("Creating a service instance binding succeeded: serviceInstanceId={}, bindingId={}, response={}",
+ serviceInstanceId, bindingId, response)))
.map(response -> new ResponseEntity<>(response, getCreateResponseCode(response)))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.CREATED)));
}
@@ -166,7 +169,8 @@ public class ServiceInstanceBindingController extends BaseController {
.build())
.flatMap(req -> service.getServiceInstanceBinding(req)
.doOnRequest(v -> LOG.debug("Getting a service instance binding: request={}", req))
- .doOnSuccess(response -> LOG.debug("Getting a service instance binding succeeded: bindingId={}", bindingId)))
+ .doOnSuccess(response -> LOG
+ .debug("Getting a service instance binding succeeded: bindingId={}", bindingId)))
.map(response -> new ResponseEntity<>(response, HttpStatus.OK))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.OK)))
.onErrorResume(e -> {
@@ -214,13 +218,17 @@ public class ServiceInstanceBindingController extends BaseController {
.originatingIdentity(parseOriginatingIdentity(originatingIdentityString))
.build())
.flatMap(request -> service.getLastOperation(request)
- .doOnRequest(v -> LOG.debug("Getting service instance binding last operation: request={}", request))
- .doOnSuccess(aVoid -> LOG.debug("Getting service instance binding last operation succeeded: serviceInstanceId={}, bindingId={}",
- serviceInstanceId, bindingId))
+ .doOnRequest(
+ v -> LOG.debug("Getting service instance binding last operation: request={}", request))
+ .doOnSuccess(aVoid -> LOG
+ .debug("Getting service instance binding last operation succeeded: serviceInstanceId={}, bindingId={}",
+ serviceInstanceId, bindingId))
.doOnError(e -> LOG.debug(e.getMessage(), e)))
- .flatMap(response -> Mono.just(response.getState().equals(OperationState.SUCCEEDED) && response.isDeleteOperation())
+ .flatMap(response -> Mono
+ .just(response.getState().equals(OperationState.SUCCEEDED) && response.isDeleteOperation())
.flatMap(isSuccessfulDelete ->
- Mono.just(new ResponseEntity<>(response, isSuccessfulDelete ? HttpStatus.GONE : HttpStatus.OK))));
+ Mono.just(new ResponseEntity<>(response,
+ isSuccessfulDelete ? HttpStatus.GONE : HttpStatus.OK))));
}
/**
@@ -258,13 +266,15 @@ public class ServiceInstanceBindingController extends BaseController {
.planId(planId)
.serviceDefinition(serviceDefinition)
.asyncAccepted(acceptsIncomplete)
- .platformInstanceId(pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE))
+ .platformInstanceId(
+ pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE))
.apiInfoLocation(apiInfoLocation)
.originatingIdentity(parseOriginatingIdentity(originatingIdentityString))
.build()))
.flatMap(req -> service.deleteServiceInstanceBinding(req)
.doOnRequest(v -> LOG.debug("Deleting a service instance binding: request={}", req))
- .doOnSuccess(aVoid -> LOG.debug("Deleting a service instance binding succeeded: bindingId={}", bindingId))
+ .doOnSuccess(aVoid -> LOG
+ .debug("Deleting a service instance binding succeeded: bindingId={}", bindingId))
.doOnError(e -> LOG.debug(e.getMessage(), e)))
.map(response -> new ResponseEntity<>(response, getAsyncResponseCode(response)))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.OK)))
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceController.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceController.java
index 98f852b5..806ccb7a 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceController.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceController.java
@@ -16,9 +16,10 @@
package org.springframework.cloud.servicebroker.controller;
-import javax.validation.Valid;
import java.util.Map;
+import javax.validation.Valid;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Mono;
@@ -54,11 +55,11 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* Provide endpoints for the service instances API.
*
- * @see Open Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
@ServiceBrokerRestController
public class ServiceInstanceController extends BaseController {
@@ -112,7 +113,8 @@ public class ServiceInstanceController extends BaseController {
req.setServiceDefinition(serviceDefinition);
return req;
}))
- .flatMap(req -> configureCommonRequestFields(req, pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE), apiInfoLocation,
+ .flatMap(req -> configureCommonRequestFields(req,
+ pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE), apiInfoLocation,
originatingIdentityString, acceptsIncomplete))
.cast(CreateServiceInstanceRequest.class)
.flatMap(req -> service.createServiceInstance(req)
@@ -160,8 +162,9 @@ public class ServiceInstanceController extends BaseController {
.build())
.flatMap(request -> service.getServiceInstance(request)
.doOnRequest(v -> LOG.debug("Getting service instance: request={}", request))
- .doOnSuccess(response -> LOG.debug("Getting service instance succeeded: serviceInstanceId={}, response={}",
- serviceInstanceId, response)))
+ .doOnSuccess(response -> LOG
+ .debug("Getting service instance succeeded: serviceInstanceId={}, response={}",
+ serviceInstanceId, response)))
.map(response -> new ResponseEntity<>(response, HttpStatus.OK))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.OK)))
.onErrorResume(e -> {
@@ -206,11 +209,13 @@ public class ServiceInstanceController extends BaseController {
.build())
.flatMap(request -> service.getLastOperation(request)
.doOnRequest(v -> LOG.debug("Getting service instance last operation: request={}", request))
- .doOnSuccess(response -> LOG.debug("Getting service instance last operation succeeded: serviceInstanceId={}, response={}",
- serviceInstanceId, response))
+ .doOnSuccess(response -> LOG
+ .debug("Getting service instance last operation succeeded: serviceInstanceId={}, response={}",
+ serviceInstanceId, response))
)
.map(response -> {
- boolean isSuccessfulDelete = response.getState().equals(OperationState.SUCCEEDED) && response.isDeleteOperation();
+ boolean isSuccessfulDelete = response.getState().equals(OperationState.SUCCEEDED) && response
+ .isDeleteOperation();
return new ResponseEntity<>(response, isSuccessfulDelete ? HttpStatus.GONE : HttpStatus.OK);
});
}
@@ -245,14 +250,16 @@ public class ServiceInstanceController extends BaseController {
.planId(planId)
.serviceDefinition(serviceDefinition)
.asyncAccepted(acceptsIncomplete)
- .platformInstanceId(pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE))
+ .platformInstanceId(
+ pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE))
.apiInfoLocation(apiInfoLocation)
.originatingIdentity(parseOriginatingIdentity(originatingIdentityString))
.build()))
.flatMap(request -> service.deleteServiceInstance(request)
.doOnRequest(v -> LOG.debug("Deleting a service instance: request={}", request))
- .doOnSuccess(response -> LOG.debug("Deleting a service instance succeeded: serviceInstanceId={}, response={}",
- serviceInstanceId, response))
+ .doOnSuccess(response -> LOG
+ .debug("Deleting a service instance succeeded: serviceInstanceId={}, response={}",
+ serviceInstanceId, response))
.doOnError(e -> LOG.debug("Service instance does not exist: ", e)))
.map(response -> new ResponseEntity<>(response, getAsyncResponseCode(response)))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.OK)))
@@ -297,13 +304,15 @@ public class ServiceInstanceController extends BaseController {
req.setServiceDefinition(serviceDefinition);
return req;
}))
- .flatMap(req -> configureCommonRequestFields(req, pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE), apiInfoLocation,
+ .flatMap(req -> configureCommonRequestFields(req,
+ pathVariables.get(ServiceBrokerRequest.PLATFORM_INSTANCE_ID_VARIABLE), apiInfoLocation,
originatingIdentityString, acceptsIncomplete))
.cast(UpdateServiceInstanceRequest.class)
.flatMap(req -> service.updateServiceInstance(req)
.doOnRequest(v -> LOG.debug("Updating a service instance: request={}", request))
- .doOnSuccess(response -> LOG.debug("Updating a service instance succeeded: serviceInstanceId={}, response={}",
- serviceInstanceId, response)))
+ .doOnSuccess(response -> LOG
+ .debug("Updating a service instance succeeded: serviceInstanceId={}, response={}",
+ serviceInstanceId, response)))
.map(response -> new ResponseEntity<>(response, getAsyncResponseCode(response)))
.switchIfEmpty(Mono.just(new ResponseEntity<>(HttpStatus.OK)));
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/package-info.java
index 1bf80377..b8315c29 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/package-info.java
@@ -17,4 +17,4 @@
/**
* Provides Service Broker API endpoints
*/
-package org.springframework.cloud.servicebroker.controller;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.controller;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessage.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessage.java
index 5d806e36..75c1b412 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessage.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessage.java
@@ -17,8 +17,8 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Provides a formatted message indicating that the service broker does not support the version of the
- * Open Service Broker API provided by the platform.
+ * Provides a formatted message indicating that the service broker does not support the version of the Open Service
+ * Broker API provided by the platform.
*/
public final class ServiceBrokerApiVersionErrorMessage {
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java
index fcf7036b..f131e27e 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java
@@ -17,14 +17,15 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that the version of the API supported by the broker doesn't match the version
- * provided by the platform.
+ * Thrown to indicate that the version of the API supported by the broker doesn't match the version provided by the
+ * platform.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 412 PRECONDITION FAILED}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 412 PRECONDITION FAILED} being returned to the
+ * platform.
*/
public class ServiceBrokerApiVersionException extends ServiceBrokerException {
+
private static final long serialVersionUID = -6792404679608443775L;
/**
@@ -47,4 +48,5 @@ public class ServiceBrokerApiVersionException extends ServiceBrokerException {
public ServiceBrokerApiVersionException(String errorCode, String expectedVersion, String providedVersion) {
super(errorCode, ServiceBrokerApiVersionErrorMessage.from(expectedVersion, providedVersion).toString());
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionMissingException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionMissingException.java
index afac98b4..17129225 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionMissingException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionMissingException.java
@@ -20,8 +20,8 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that the API version header is missing from the request.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST} being returned to the
+ * platform.
*/
public class ServiceBrokerApiVersionMissingException extends ServiceBrokerException {
@@ -45,4 +45,5 @@ public class ServiceBrokerApiVersionMissingException extends ServiceBrokerExcept
public ServiceBrokerApiVersionMissingException(String errorCode, String expectedVersion) {
super(errorCode, ServiceBrokerApiVersionErrorMessage.from(expectedVersion, "null").toString());
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerAsyncRequiredException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerAsyncRequiredException.java
index e7826722..566d32bf 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerAsyncRequiredException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerAsyncRequiredException.java
@@ -18,15 +18,20 @@ package org.springframework.cloud.servicebroker.exception;
/**
* Thrown to indicate that a service broker requires that the platform support asynchronous processing of operations.
- * This requires that the {@literal accepts_incomplete} request parameter be {@literal true} in requests
- * from the platform.
- *
+ * This requires that the {@literal accepts_incomplete} request parameter be {@literal true} in requests from the
+ * platform.
+ *
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*/
public class ServiceBrokerAsyncRequiredException extends ServiceBrokerException {
+
private static final long serialVersionUID = -6116656797448174365L;
+
+ /**
+ * Error code representing that asynchronous processing is required by the service broker
+ */
public final static String ASYNC_REQUIRED_ERROR = "AsyncRequired";
/**
@@ -37,4 +42,5 @@ public class ServiceBrokerAsyncRequiredException extends ServiceBrokerException
public ServiceBrokerAsyncRequiredException(String message) {
super(ASYNC_REQUIRED_ERROR, "Service broker requires async operations: " + message);
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerBindingRequiresAppException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerBindingRequiresAppException.java
index d7070494..4be2c2c6 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerBindingRequiresAppException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerBindingRequiresAppException.java
@@ -17,17 +17,22 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that the service broker received a binding request without an application resource,
- * but only supports binding to applications.
+ * Thrown to indicate that the service broker received a binding request without an application resource, but only
+ * supports binding to applications.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*
* @author Scott Frederick
*/
public class ServiceBrokerBindingRequiresAppException extends ServiceBrokerException {
+
private static final long serialVersionUID = -5605297457258622988L;
+
+ /**
+ * Error code representing that the service broker received a binding request without an application resource
+ */
public final static String APP_REQUIRED_ERROR = "RequiresApp";
/**
@@ -48,4 +53,5 @@ public class ServiceBrokerBindingRequiresAppException extends ServiceBrokerExcep
public ServiceBrokerBindingRequiresAppException(String message, Throwable cause) {
super(APP_REQUIRED_ERROR, message, cause);
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerConcurrencyException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerConcurrencyException.java
index c5ef2ac5..be63458b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerConcurrencyException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerConcurrencyException.java
@@ -20,13 +20,18 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that the service broker received concurrent requests to modify a resource.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*
* @author Scott Frederick
*/
public class ServiceBrokerConcurrencyException extends ServiceBrokerException {
+
private static final long serialVersionUID = -2521415489841815405L;
+
+ /**
+ * Error code indicating the service broker received concurrent requests to modify a resource
+ */
public final static String CONCURRENCY_ERROR = "ConcurrencyError";
/**
@@ -47,4 +52,5 @@ public class ServiceBrokerConcurrencyException extends ServiceBrokerException {
public ServiceBrokerConcurrencyException(String message, Throwable cause) {
super(CONCURRENCY_ERROR, message, cause);
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerCreateOperationInProgressException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerCreateOperationInProgressException.java
index a0900dc0..a62845fc 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerCreateOperationInProgressException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerCreateOperationInProgressException.java
@@ -17,12 +17,11 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request to create a service instance or binding was received while
- * asynchronous creation of the identical service instance or binding is in progress.
+ * Thrown to indicate that a request to create a service instance or binding was received while asynchronous creation of
+ * the identical service instance or binding is in progress.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED} being returned to the platform.
*
* @author Roy Clarkson
*/
@@ -62,4 +61,5 @@ public class ServiceBrokerCreateOperationInProgressException extends ServiceBrok
private static String prependMessagePrefix(String operation) {
return MESSAGE_PREFIX + ": operation=" + operation;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerDeleteOperationInProgressException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerDeleteOperationInProgressException.java
index 0ff7c902..cf95a7f0 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerDeleteOperationInProgressException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerDeleteOperationInProgressException.java
@@ -17,12 +17,11 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request to delete a service instance or binding was received while
- * asynchronous deletion of the identical service instance or binding is in progress.
+ * Thrown to indicate that a request to delete a service instance or binding was received while asynchronous deletion of
+ * the identical service instance or binding is in progress.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED} being returned to the platform.
*
* @author Roy Clarkson
*/
@@ -62,4 +61,5 @@ public class ServiceBrokerDeleteOperationInProgressException extends ServiceBrok
private static String prependMessagePrefix(String operation) {
return MESSAGE_PREFIX + ": operation=" + operation;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerException.java
index 24c9cf03..8cec3dd1 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerException.java
@@ -19,18 +19,19 @@ package org.springframework.cloud.servicebroker.exception;
import org.springframework.cloud.servicebroker.model.error.ErrorMessage;
/**
- * Thrown to indicate underlying service broker errors (like connectivity to the service
- * being brokered) not covered by a more specific exception.
+ * Thrown to indicate underlying service broker errors (like connectivity to the service being brokered) not covered by
+ * a more specific exception.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 500 INTERNAL SERVER ERROR}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 500 INTERNAL SERVER ERROR} being returned to the
+ * platform.
*
* @author sgreenberg@pivotal.io
*/
public class ServiceBrokerException extends RuntimeException {
private static final long serialVersionUID = -5544859893499349135L;
+
private final ErrorMessage errorMessage;
/**
@@ -90,4 +91,5 @@ public class ServiceBrokerException extends RuntimeException {
public ErrorMessage getErrorMessage() {
return errorMessage;
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidOriginatingIdentityException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidOriginatingIdentityException.java
index 5030d394..5b160195 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidOriginatingIdentityException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidOriginatingIdentityException.java
@@ -17,12 +17,12 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that parameters passed in the originating identity header are not
- * understood by the service broker.
+ * Thrown to indicate that parameters passed in the originating identity header are not understood by the service
+ * broker.
*
*
- * Throwing this exception will result in an HTTP status code
- * {@literal 422 UNPROCESSABLE ENTITY} being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*
* @author Roy Clarkson
*/
@@ -56,4 +56,5 @@ public class ServiceBrokerInvalidOriginatingIdentityException
private static String prependMessagePrefix(String message) {
return MESSAGE_PREFIX + ": " + message;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidParametersException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidParametersException.java
index 08bf125b..5bd379d4 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidParametersException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerInvalidParametersException.java
@@ -20,13 +20,15 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that parameters passed in a create or update request are not understood by the service broker.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*
* @author Scott Frederick
*/
public class ServiceBrokerInvalidParametersException extends ServiceBrokerException {
+
private static final long serialVersionUID = 4719676639792071582L;
+
private static final String MESSAGE_PREFIX = "Service broker parameters are invalid";
/**
@@ -81,4 +83,5 @@ public class ServiceBrokerInvalidParametersException extends ServiceBrokerExcept
private static String prependMessagePrefix(String message) {
return MESSAGE_PREFIX + ": " + message;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerOperationInProgressException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerOperationInProgressException.java
index c65dbe0e..a342372c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerOperationInProgressException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerOperationInProgressException.java
@@ -17,17 +17,18 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request for a service instance or binding was received while
- * asynchronous creation of the service instance or binding is in progress.
+ * Thrown to indicate that a request for a service instance or binding was received while asynchronous creation of the
+ * service instance or binding is in progress.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 404 NOT FOUND}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 404 NOT FOUND} being returned to the platform.
*
* @author Scott Frederick
*/
public class ServiceBrokerOperationInProgressException extends ServiceBrokerException {
+
private static final long serialVersionUID = -1879753092397657116L;
+
private static final String MESSAGE_PREFIX = "Service broker operation is in progress " +
"for the requested service instance or binding";
@@ -60,4 +61,5 @@ public class ServiceBrokerOperationInProgressException extends ServiceBrokerExce
private static String prependMessagePrefix(String operation) {
return MESSAGE_PREFIX + ": operation=" + operation;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUnavailableException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUnavailableException.java
index 3e607ceb..4150074a 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUnavailableException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUnavailableException.java
@@ -17,17 +17,19 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a service broker is able to accept requests from the platform but is temporarily unable
- * to process those requests.
+ * Thrown to indicate that a service broker is able to accept requests from the platform but is temporarily unable to
+ * process those requests.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 503 SERVICE UNAVAILABLE}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 503 SERVICE UNAVAILABLE} being returned to the
+ * platform.
*
* @author Scott Frederick
*/
public class ServiceBrokerUnavailableException extends ServiceBrokerException {
+
private static final long serialVersionUID = -6387820141285204722L;
+
private static final String MESSAGE_PREFIX = "Service broker is temporarily unavailable";
/**
@@ -82,4 +84,5 @@ public class ServiceBrokerUnavailableException extends ServiceBrokerException {
private static String prependMessagePrefix(String message) {
return MESSAGE_PREFIX + ": " + message;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUpdateOperationInProgressException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUpdateOperationInProgressException.java
index 914f4f8b..bf13e591 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUpdateOperationInProgressException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerUpdateOperationInProgressException.java
@@ -17,12 +17,11 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request to update a service instance was received while
- * asynchronous updating of the identical service instance is in progress.
+ * Thrown to indicate that a request to update a service instance was received while asynchronous updating of the
+ * identical service instance is in progress.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 202 ACCEPTED} being returned to the platform.
*
* @author Roy Clarkson
*/
@@ -62,4 +61,5 @@ public class ServiceBrokerUpdateOperationInProgressException extends ServiceBrok
private static String prependMessagePrefix(String operation) {
return MESSAGE_PREFIX + ": operation=" + operation;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionDoesNotExistException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionDoesNotExistException.java
index 46b21232..d9d08eea 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionDoesNotExistException.java
@@ -17,12 +17,12 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request includes a service definition ID that does not exist in the
- * service broker catalog.
+ * Thrown to indicate that a request includes a service definition ID that does not exist in the service broker
+ * catalog.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST} being returned to the
+ * platform.
*
* @author sgreenberg@pivotal.io
*/
@@ -40,8 +40,7 @@ public class ServiceDefinitionDoesNotExistException extends ServiceBrokerExcepti
}
/**
- * Construct an exception with an error code and default message that includes the
- * provided service definition ID.
+ * Construct an exception with an error code and default message that includes the provided service definition ID.
*
* @param errorCode a single word in camel case that uniquely identifies the error condition
* @param serviceDefinitionId the service definition ID
@@ -53,4 +52,5 @@ public class ServiceDefinitionDoesNotExistException extends ServiceBrokerExcepti
private static String buildMessage(String serviceDefinitionId) {
return "Service definition does not exist: id=" + serviceDefinitionId;
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionPlanDoesNotExistException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionPlanDoesNotExistException.java
index 7fa65034..cfa50302 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionPlanDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceDefinitionPlanDoesNotExistException.java
@@ -17,12 +17,11 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a request includes a plan ID that does not exist in the
- * service broker catalog.
+ * Thrown to indicate that a request includes a plan ID that does not exist in the service broker catalog.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 400 BAD REQUEST} being returned to the
+ * platform.
*
* @author vvpishh2
*/
@@ -40,8 +39,7 @@ public class ServiceDefinitionPlanDoesNotExistException extends ServiceBrokerExc
}
/**
- * Construct an exception with an error code and default message that includes the
- * provided plan ID.
+ * Construct an exception with an error code and default message that includes the provided plan ID.
*
* @param errorCode a single word in camel case that uniquely identifies the error condition
* @param planId the plan ID
@@ -53,4 +51,5 @@ public class ServiceDefinitionPlanDoesNotExistException extends ServiceBrokerExc
private static String buildMessage(String planId) {
return "Service Definition Plan does not exist: id=" + planId;
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingDoesNotExistException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingDoesNotExistException.java
index 89f801e8..a82401a1 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingDoesNotExistException.java
@@ -20,8 +20,8 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that a request includes a service binding ID that is not known to the service broker.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*/
public class ServiceInstanceBindingDoesNotExistException extends ServiceBrokerException {
@@ -49,4 +49,5 @@ public class ServiceInstanceBindingDoesNotExistException extends ServiceBrokerEx
private static String buildMessage(String bindingId) {
return "Service binding does not exist: id=" + bindingId;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingExistsException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingExistsException.java
index 664bbb99..24b7c000 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingExistsException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceBindingExistsException.java
@@ -17,12 +17,11 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a service binding create request was received for a binding that already exists
- * with parameters that are different from the existing binding.
+ * Thrown to indicate that a service binding create request was received for a binding that already exists with
+ * parameters that are different from the existing binding.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 409 CONFLICT}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 409 CONFLICT} being returned to the platform.
*
* @author sgreenberg@pivotal.io
*/
@@ -56,4 +55,5 @@ public class ServiceInstanceBindingExistsException extends ServiceBrokerExceptio
+ "serviceInstanceId=" + serviceInstanceId
+ ", bindingId=" + bindingId;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceDoesNotExistException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceDoesNotExistException.java
index a10b7b70..80fbe3ba 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceDoesNotExistException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceDoesNotExistException.java
@@ -20,8 +20,8 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that a request includes a service instance ID that is not known to the service broker.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*
* @author sgreenberg@pivotal.io
*/
@@ -39,8 +39,7 @@ public class ServiceInstanceDoesNotExistException extends ServiceBrokerException
}
/**
- * Construct an exception with an error code and default message that includes the
- * provided service instance ID.
+ * Construct an exception with an error code and default message that includes the provided service instance ID.
*
* @param errorCode a single word in camel case that uniquely identifies the error condition
* @param serviceInstanceId the service instance ID
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceExistsException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceExistsException.java
index eb8a33b4..38a3e181 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceExistsException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceExistsException.java
@@ -17,16 +17,16 @@
package org.springframework.cloud.servicebroker.exception;
/**
- * Thrown to indicate that a service instance create request was received for an instance that already exists
- * with parameters that are different from the existing instance.
+ * Thrown to indicate that a service instance create request was received for an instance that already exists with
+ * parameters that are different from the existing instance.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 409 CONFLICT}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 409 CONFLICT} being returned to the platform.
*
* @author sgreenberg@pivotal.io
*/
public class ServiceInstanceExistsException extends ServiceBrokerException {
+
private static final long serialVersionUID = -914571358227517785L;
/**
@@ -55,4 +55,5 @@ public class ServiceInstanceExistsException extends ServiceBrokerException {
"serviceInstanceId=" + serviceInstanceId +
", serviceDefinitionId=" + serviceDefinitionId;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceUpdateNotSupportedException.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceUpdateNotSupportedException.java
index 3254c68f..c2718a26 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceUpdateNotSupportedException.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceInstanceUpdateNotSupportedException.java
@@ -20,12 +20,13 @@ package org.springframework.cloud.servicebroker.exception;
* Thrown to indicate that a request to update a service instance can not be fulfilled by the service broker.
*
*
- * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY}
- * being returned to the platform.
+ * Throwing this exception will result in an HTTP status code {@literal 422 UNPROCESSABLE ENTITY} being returned to the
+ * platform.
*/
public class ServiceInstanceUpdateNotSupportedException extends ServiceBrokerException {
private static final long serialVersionUID = 4719676639792071582L;
+
private static final String MESSAGE_PREFIX = "Service instance update not supported";
/**
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/package-info.java
index 3c5c4c88..446edb73 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/exception/package-info.java
@@ -17,4 +17,4 @@
/**
* Exceptions for Service Broker error conditions
*/
-package org.springframework.cloud.servicebroker.exception;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.exception;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequest.java
index 52eaba88..3564dd5e 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequest.java
@@ -28,6 +28,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
*/
public abstract class AsyncServiceBrokerRequest extends ServiceBrokerRequest {
+ /**
+ * Async request parameter key
+ */
public final static String ASYNC_REQUEST_PARAMETER = "accepts_incomplete";
@JsonIgnore //accepts_incomplete Osb field passed as query param in most subclasses
@@ -49,14 +52,13 @@ public abstract class AsyncServiceBrokerRequest extends ServiceBrokerRequest {
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
protected AsyncServiceBrokerRequest(boolean asyncAccepted, String platformInstanceId,
- String apiInfoLocation, Context originatingIdentity) {
+ String apiInfoLocation, Context originatingIdentity) {
super(platformInstanceId, apiInfoLocation, originatingIdentity);
this.asyncAccepted = asyncAccepted;
}
/**
- * Get the value indicating whether the platform allows the broker to complete the request
- * asynchronously.
+ * Get the value indicating whether the platform allows the broker to complete the request asynchronously.
*
*
* This value is set from the {@literal async_accepted} request parameter of the request from the platform.
@@ -72,11 +74,11 @@ public abstract class AsyncServiceBrokerRequest extends ServiceBrokerRequest {
}
/**
- * This method is intended to be used internally only; use a {@literal builder} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use a {@literal builder} to construct an object of this type
+ * and set all field values.
*
* @param asyncAccepted the value indicating whether the platform allows the broker to complete the request
- * asynchronously
+ * asynchronously
*/
public void setAsyncAccepted(boolean asyncAccepted) {
this.asyncAccepted = asyncAccepted;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponse.java
index 1ec76aaf..f4df621d 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponse.java
@@ -42,6 +42,7 @@ public class AsyncServiceBrokerResponse {
/**
* Create a new AsyncServiceBrokerResponse
+ *
* @param async is the operation asynchronous
* @param operation description of the operation being performed
* @throws IllegalArgumentException if operation length exceeds 10,000 characters
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java
index eba033d8..d000b106 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java
@@ -17,13 +17,23 @@
package org.springframework.cloud.servicebroker.model;
/**
- *
+ * Object for configuring the version of the API supported by the service broker
*/
public class BrokerApiVersion {
+
+ /**
+ * API Version header
+ */
public final static String DEFAULT_API_VERSION_HEADER = "X-Broker-Api-Version";
+ /**
+ * API Version value representing any version
+ */
public final static String API_VERSION_ANY = "*";
+ /**
+ * Current API Version supported by this library
+ */
public final static String API_VERSION_CURRENT = "2.14";
private final String brokerApiVersionHeader;
@@ -33,10 +43,10 @@ public class BrokerApiVersion {
/**
* Specify the name of the service broker API version header and the API version supported by the service broker.
*
- * @param apiVersionHeader the name of the HTTP header field expected to contain the
- * service broker API version of the service broker client
- * @param apiVersion the version of the service broker API supported by the broker; a value of
- * {@literal null} or {@literal API_VERSION_ANY} will disable API version validation
+ * @param apiVersionHeader the name of the HTTP header field expected to contain the service broker API version of
+ * the service broker client
+ * @param apiVersion the version of the service broker API supported by the broker; a value of {@literal null} or
+ * {@literal API_VERSION_ANY} will disable API version validation
*/
public BrokerApiVersion(String apiVersionHeader, String apiVersion) {
this.brokerApiVersionHeader = apiVersionHeader;
@@ -46,8 +56,8 @@ public class BrokerApiVersion {
/**
* Specify the service broker API version supported by the service broker.
*
- * @param apiVersion the version of the broker API supported by the broker; a value of {@literal null}
- * or {@literal API_VERSION_ANY} will disable API version validation
+ * @param apiVersion the version of the broker API supported by the broker; a value of {@literal null} or
+ * {@literal API_VERSION_ANY} will disable API version validation
*/
public BrokerApiVersion(String apiVersion) {
this(DEFAULT_API_VERSION_HEADER, apiVersion);
@@ -77,4 +87,5 @@ public class BrokerApiVersion {
public String getBrokerApiVersionHeader() {
return brokerApiVersionHeader;
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/CloudFoundryContext.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/CloudFoundryContext.java
index 67006c92..7be7fb94 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/CloudFoundryContext.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/CloudFoundryContext.java
@@ -37,16 +37,34 @@ import org.springframework.util.StringUtils;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public final class CloudFoundryContext extends Context {
+ /**
+ * Cloud Foundry platform key
+ */
public static final String CLOUD_FOUNDRY_PLATFORM = "cloudfoundry";
+ /**
+ * Organization GUID key
+ */
public static final String ORGANIZATION_GUID_KEY = "organizationGuid";
+ /**
+ * Organization Name key
+ */
public static final String ORGANIZATION_NAME_KEY = "organizationName";
+ /**
+ * Space GUID key
+ */
public static final String SPACE_GUID_KEY = "spaceGuid";
+ /**
+ * Space Name key
+ */
public static final String SPACE_NAME_KEY = "spaceName";
+ /**
+ * Instance Name key
+ */
public static final String INSTANCE_NAME_KEY = "instanceName";
private CloudFoundryContext() {
@@ -55,6 +73,7 @@ public final class CloudFoundryContext extends Context {
/**
* Create a new CloudFoundryContext
+ *
* @param organizationGuid the organization GUID
* @param organizationName the organization name
* @param spaceGuid the space GUID
@@ -63,7 +82,7 @@ public final class CloudFoundryContext extends Context {
* @param properties additional properties
*/
public CloudFoundryContext(String organizationGuid, String organizationName, String spaceGuid, String spaceName,
- String instanceName, Map properties) {
+ String instanceName, Map properties) {
super(CLOUD_FOUNDRY_PLATFORM, properties);
if (StringUtils.hasText(organizationGuid)) {
setOrganizationGuid(organizationGuid);
@@ -82,12 +101,13 @@ public final class CloudFoundryContext extends Context {
}
}
- /**
- * Avoid polluting the serialized context with duplicated keys
+ /**
+ * Avoid polluting the serialized context with duplicated keys
+ *
* @return a map of properties
- */
+ */
@JsonAnyGetter
- public Map getSerializableProperties() {
+ public Map getSerializableProperties() {
HashMap properties = new HashMap<>(super.getProperties());
properties.remove(ORGANIZATION_GUID_KEY);
properties.remove(ORGANIZATION_NAME_KEY);
@@ -180,7 +200,7 @@ public final class CloudFoundryContext extends Context {
/**
* Provides a fluent API for constructing a {@link CloudFoundryContext}
*/
- public static class CloudFoundryContextBuilder extends ContextBaseBuilder {
+ public static final class CloudFoundryContextBuilder extends ContextBaseBuilder {
private String organizationGuid;
@@ -261,5 +281,7 @@ public final class CloudFoundryContext extends Context {
return new CloudFoundryContext(organizationGuid, organizationName, spaceGuid, spaceName, instanceName,
properties);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/Context.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/Context.java
index ceee634b..70cdfcac 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/Context.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/Context.java
@@ -38,10 +38,13 @@ import org.springframework.util.CollectionUtils;
property = Context.PLATFORM_KEY, visible = true, defaultImpl = PlatformContext.class)
@JsonSubTypes({
@JsonSubTypes.Type(value = CloudFoundryContext.class, name = CloudFoundryContext.CLOUD_FOUNDRY_PLATFORM),
- @JsonSubTypes.Type(value = KubernetesContext.class, name = KubernetesContext.KUBERNETES_PLATFORM),
+ @JsonSubTypes.Type(value = KubernetesContext.class, name = KubernetesContext.KUBERNETES_PLATFORM)
})
public class Context {
+ /**
+ * Platform key
+ */
public static final String PLATFORM_KEY = "platform";
protected final String platform;
@@ -58,6 +61,7 @@ public class Context {
/**
* Create a new Context
+ *
* @param platform the name of the platform
* @param properties collection of properties
*/
@@ -99,6 +103,7 @@ public class Context {
/**
* Get the String value of a property in the context with the given key.
+ *
* @param key the key of the property to retrieve
* @return the value of the property, or {@literal null} if the key is not present in the request
*/
@@ -169,6 +174,7 @@ public class Context {
/**
* Construct a builder
+ *
* @return the builder
*/
protected abstract B createBuilder();
@@ -185,8 +191,8 @@ public class Context {
}
/**
- * Add a set of properties from the provided {@literal Map} to the context properties
- * as would be provided in the request from the platform.
+ * Add a set of properties from the provided {@literal Map} to the context properties as would be provided in
+ * the request from the platform.
*
* @param properties the properties to add
* @return the builder
@@ -216,5 +222,7 @@ public class Context {
* @return the newly constructed {@link Context} implementation
*/
public abstract R build();
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/KubernetesContext.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/KubernetesContext.java
index e729914e..f2ef12ba 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/KubernetesContext.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/KubernetesContext.java
@@ -34,10 +34,19 @@ import org.springframework.util.StringUtils;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public final class KubernetesContext extends Context {
+ /**
+ * Kubernetes platform name
+ */
public static final String KUBERNETES_PLATFORM = "kubernetes";
+ /**
+ * Kubernetes Namespace key
+ */
public static final String NAMESPACE_KEY = "namespace";
+ /**
+ * Kubernetes Cluster ID key
+ */
public static final String CLUSTERID_KEY = "clusterid";
private KubernetesContext() {
@@ -46,6 +55,7 @@ public final class KubernetesContext extends Context {
/**
* Create a new KubernetesContext
+ *
* @param namespace the kubernetes namespace
* @param clusterid the kubernetes clusterid
* @param properties a collection of properties
@@ -115,7 +125,7 @@ public final class KubernetesContext extends Context {
/**
* Builder class for KubernetesContext
*/
- public static class KubernetesContextBuilder extends ContextBaseBuilder {
+ public static final class KubernetesContextBuilder extends ContextBaseBuilder {
private String namespace;
@@ -156,4 +166,7 @@ public final class KubernetesContext extends Context {
public KubernetesContext build() {
return new KubernetesContext(namespace, clusterid, properties);
}
- }}
+
+ }
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/PlatformContext.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/PlatformContext.java
index e3693327..4a53408d 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/PlatformContext.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/PlatformContext.java
@@ -33,6 +33,7 @@ public class PlatformContext extends Context {
/**
* Construct a new {@link PlatformContext}
+ *
* @param platform the name of the platform
* @param properties collection of properties
*/
@@ -61,7 +62,7 @@ public class PlatformContext extends Context {
/**
* Provides a fluent API for constructing a {@link PlatformContext}.
*/
- public static class PlatformContextBuilder extends ContextBaseBuilder {
+ public static final class PlatformContextBuilder extends ContextBaseBuilder {
private PlatformContextBuilder() {
super();
@@ -81,5 +82,7 @@ public class PlatformContext extends Context {
public PlatformContext build() {
return new PlatformContext(platform, properties);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequest.java
index 4c657e0c..24b3e43c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequest.java
@@ -29,12 +29,40 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming;
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class ServiceBrokerRequest {
+
+ /**
+ * API Info Location header
+ */
public final static String API_INFO_LOCATION_HEADER = "X-Api-Info-Location";
+
+ /**
+ * API Originating Identity header
+ */
public final static String ORIGINATING_IDENTITY_HEADER = "X-Broker-API-Originating-Identity";
+
+ /**
+ * Instance ID path variable name
+ */
public static final String INSTANCE_ID_PATH_VARIABLE = "instanceId";
+
+ /**
+ * Binding ID path variable name
+ */
public static final String BINDING_ID_PATH_VARIABLE = "bindingId";
+
+ /**
+ * Service ID parameter name
+ */
public static final String SERVICE_ID_PARAMETER = "service_id";
+
+ /**
+ * Plan ID parameter name
+ */
public static final String PLAN_ID_PARAMETER = "plan_id";
+
+ /**
+ * Platform Instance ID variable name
+ */
public static final String PLATFORM_INSTANCE_ID_VARIABLE = "platformInstanceId";
@JsonIgnore //relative path to Osb query path, not to include in Json body
@@ -68,11 +96,11 @@ public class ServiceBrokerRequest {
/**
* Get the ID used to identify the platform instance.
- *
+ *
* This is useful when the service broker is registered to multiple instances of a platform.
- *
- * This value is set from any path element that precedes {@literal /v2} in the request from the platform.
- * Will be {@literal null} if the service broker is not registered with an instance ID in the registration URL.
+ *
+ * This value is set from any path element that precedes {@literal /v2} in the request from the platform. Will be
+ * {@literal null} if the service broker is not registered with an instance ID in the registration URL.
*
* @return the platform instance ID, or {@literal null} if not provided
*/
@@ -81,8 +109,8 @@ public class ServiceBrokerRequest {
}
/**
- * This method is intended to be used internally only; use a {@literal builder} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use a {@literal builder} to construct an object of this type
+ * and set all field values.
*
* @param platformInstanceId the platform instance ID
*/
@@ -92,10 +120,10 @@ public class ServiceBrokerRequest {
/**
* Get the location of the API info endpoint of the platform instance.
- *
+ *
* This endpoint can be used to retrieve additional information about the platform making the request on platforms
* that support the header.
- *
+ *
* This value is set from the {@literal X-Api-Info-Location} header in the request from the platform.
*
* @return the API info endpoint location, or {@literal null} if not provided
@@ -105,8 +133,8 @@ public class ServiceBrokerRequest {
}
/**
- * This method is intended to be used internally only; use a {@literal builder} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use a {@literal builder} to construct an object of this type
+ * and set all field values.
*
* @param apiInfoLocation location of the API info endpoint of the platform instance
*/
@@ -116,7 +144,7 @@ public class ServiceBrokerRequest {
/**
* Get the identity of the user that initiated the request from the platform.
- *
+ *
* This value is set from the {@literal X-Broker-API-Originating-Identity} header in the request from the platform.
*
* @return the user identity, or {@literal null} if not provided
@@ -126,8 +154,8 @@ public class ServiceBrokerRequest {
}
/**
- * This method is intended to be used internally only; use a {@literal builder} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use a {@literal builder} to construct an object of this type
+ * and set all field values.
*
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/BindResource.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/BindResource.java
index 85861766..d87ea950 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/BindResource.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/BindResource.java
@@ -31,12 +31,12 @@ import org.springframework.util.CollectionUtils;
* Details of any platform resources that a service binding will be associated with.
*
*
- * Objects of this type are constructed by the framework from the message body passed to the
- * service broker by the platform in a service binding request.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the message body passed to the service broker by the
+ * platform in a service binding request.
*
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class BindResource {
@@ -109,8 +109,8 @@ public class BindResource {
* Create a builder that provides a fluent API for constructing a {@link BindResource}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService}
+ * implementations.
*
* @return the builder
*/
@@ -149,9 +149,12 @@ public class BindResource {
/**
* Provides a fluent API for constructing a {@literal BindResource}.
*/
- public static class BindResourceBuilder {
+ public static final class BindResourceBuilder {
+
private String appGuid;
+
private String route;
+
private final Map properties = new HashMap<>();
private BindResourceBuilder() {
@@ -180,8 +183,8 @@ public class BindResource {
}
/**
- * Add a set of properties from the provided {@literal Map} to the bind resource properties
- * as would be provided in the request from the platform.
+ * Add a set of properties from the provided {@literal Map} to the bind resource properties as would be provided
+ * in the request from the platform.
*
* @param properties the properties to add
* @return the builder
@@ -213,5 +216,7 @@ public class BindResource {
public BindResource build() {
return new BindResource(appGuid, route, properties);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponse.java
index ea92bf11..0fdd321b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponse.java
@@ -27,15 +27,15 @@ import java.util.Objects;
* Details of a response to a request to create a new service instance binding associated with an application.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
- * @see Open Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Josh Long
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstanceBindingResponse {
@@ -66,8 +66,8 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
* @param endpoints the set of endpoints
*/
public CreateServiceInstanceAppBindingResponse(boolean async, String operation, boolean bindingExisted,
- Map credentials, String syslogDrainUrl,
- List volumeMounts, List endpoints) {
+ Map credentials, String syslogDrainUrl,
+ List volumeMounts, List endpoints) {
super(async, operation, bindingExisted);
this.credentials = credentials;
this.syslogDrainUrl = syslogDrainUrl;
@@ -98,12 +98,12 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
*
* @return the set of volume mounts
*/
- public List getVolumeMounts() {
+ public List getVolumeMounts() {
return this.volumeMounts;
}
public List getEndpoints() {
- return this.endpoints;
+ return this.endpoints;
}
/**
@@ -158,7 +158,7 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceAppBindingResponse}.
*/
- public static class CreateServiceInstanceAppBindingResponseBuilder {
+ public static final class CreateServiceInstanceAppBindingResponseBuilder {
private final Map credentials = new HashMap<>();
@@ -178,8 +178,8 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
}
/**
- * Add a set of credentials from the provided {@literal Map} to the credentials that the bound application
- * can use to access the service instance.
+ * Add a set of credentials from the provided {@literal Map} to the credentials that the bound application can
+ * use to access the service instance.
*
*
* This value will set the {@literal credentials} field in the body of the response to the platform
@@ -223,8 +223,8 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
}
/**
- * Add a set of volume mounts from the provided {@literal List} to the volume mounts that can be used in
- * an application container file system.
+ * Add a set of volume mounts from the provided {@literal List} to the volume mounts that can be used in an
+ * application container file system.
*
*
* This value will set the {@literal volume_mounts} field in the body of the response to the platform.
@@ -238,8 +238,8 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
}
/**
- * Add a set of volume mounts from the provided array to the volume mounts that can be used in
- * an application container file system.
+ * Add a set of volume mounts from the provided array to the volume mounts that can be used in an application
+ * container file system.
*
*
* This value will set the {@literal volume_mounts} field in the body of the response to the platform.
@@ -254,8 +254,7 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
/**
* Add a set of endpoints from the provided {@literal List} to the endpoints that can be used by an application
- * to
- * connect to the service instance.
+ * to connect to the service instance.
*
*
* This value will set the {@literal endpoints} field in the body of the response to the platform.
@@ -269,8 +268,8 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
}
/**
- * Add a set of endpoints from the provided array to the endpoints that can be used by an application to
- * connect to the service instance.
+ * Add a set of endpoints from the provided array to the endpoints that can be used by an application to connect
+ * to the service instance.
*
*
* This value will set the {@literal endpoints} field in the body of the response to the platform.
@@ -306,12 +305,12 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be
- * determined by the value of {@link #bindingExisted(boolean)}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be determined by the
+ * value of {@link #bindingExisted(boolean)}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
* @see #bindingExisted(boolean)
*/
@@ -321,9 +320,9 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent
- * {@link GetLastServiceBindingOperationRequest} requests.
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceBindingOperationRequest}
+ * requests.
*
*
* This value will set the {@literal operation} field in the body of the response to the platform.
@@ -345,5 +344,7 @@ public class CreateServiceInstanceAppBindingResponse extends CreateServiceInstan
return new CreateServiceInstanceAppBindingResponse(async, operation, bindingExisted, credentials,
syslogDrainUrl, volumeMounts, endpoints);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java
index d80c5b39..72438288 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java
@@ -16,11 +16,12 @@
package org.springframework.cloud.servicebroker.model.binding;
-import javax.validation.constraints.NotEmpty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -35,18 +36,19 @@ import org.springframework.cloud.servicebroker.model.util.ParameterBeanMapperUti
* Details of a request to create a service instance binding.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
- * @see Open Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerRequest {
+
@JsonIgnore //OSB field passed as path param
private transient String serviceInstanceId;
@@ -91,6 +93,7 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
/**
* Construct a new {@link CreateServiceInstanceBindingRequest}
+ *
* @param serviceInstanceId the service instance ID
* @param serviceDefinitionId the service definition ID
* @param planId the plan ID
@@ -106,10 +109,10 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public CreateServiceInstanceBindingRequest(String serviceInstanceId, String serviceDefinitionId, String planId,
- String bindingId, ServiceDefinition serviceDefinition, Plan plan,
- boolean asyncAccepted, BindResource bindResource,
- Map parameters, Context context,
- String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
+ String bindingId, ServiceDefinition serviceDefinition, Plan plan,
+ boolean asyncAccepted, BindResource bindResource,
+ Map parameters, Context context,
+ String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
super(asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.serviceDefinitionId = serviceDefinitionId;
@@ -124,9 +127,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the service instance associated with the binding. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service instance.
+ * Get the ID of the service instance associated with the binding. This value is assigned by the platform. It must
+ * be unique within the platform and can be used to correlate any resources associated with the service instance.
*
*
* This value is set from the {@literal :instance_id} path element of the request from the platform.
@@ -138,8 +140,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceInstanceId the service instance ID associated with the binding
*/
@@ -148,9 +150,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the service binding to create. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service binding.
+ * Get the ID of the service binding to create. This value is assigned by the platform. It must be unique within the
+ * platform and can be used to correlate any resources associated with the service binding.
*
*
* This value is set from the {@literal :binding_id} path element of the request from the platform.
@@ -162,8 +163,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param bindingId the ID of the service binding to create
*/
@@ -172,9 +173,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the service definition for the service instance associated with the binding. This will match one
- * of the service definition IDs provided in the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}.
+ * Get the ID of the service definition for the service instance associated with the binding. This will match one of
+ * the service definition IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}.
*
*
* This value is set from the {@literal service_id} field in the body of the request from the platform
@@ -186,9 +186,9 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the plan for to the service instance associated with the binding. This will match one of the
- * plan IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within
- * the specified {@link ServiceDefinition}.
+ * Get the ID of the plan for to the service instance associated with the binding. This will match one of the plan
+ * IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified
+ * {@link ServiceDefinition}.
*
*
* This value is set from the {@literal plan_id} field in the body of the request from the platform.
@@ -200,8 +200,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the GUID of the application the service instance will be bound to. Will be provided when
- * users bind applications to service instances, or {@literal null} if an application is not being bound.
+ * Get the GUID of the application the service instance will be bound to. Will be provided when users bind
+ * applications to service instances, or {@literal null} if an application is not being bound.
*
*
* This value is set from the {@literal app_guid} field in the body of the request from the platform.
@@ -250,8 +250,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* This value is set from the {@literal parameters} field in the body of the request from the platform.
*
*
- * An object of the specified type will be instantiated, and value from the parameters JSON will be mapped
- * to the object using Java Bean mapping rules.
+ * An object of the specified type will be instantiated, and value from the parameters JSON will be mapped to the
+ * object using Java Bean mapping rules.
*
*
* The platform will pass the user-supplied JSON structure to the service broker as-is. The service broker is
@@ -281,8 +281,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Get the service definition of the service instance associated with the binding.
*
*
- * The service definition is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The service definition is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}
+ * as a convenience.
*
* @return the service definition
*/
@@ -291,8 +291,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceDefinition the service definition of the service instance associated with the binding
*/
@@ -304,8 +304,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Get the plan of the service instance associated with the binding.
*
*
- * The plan is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The plan is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a
+ * convenience.
*
* @return the plan
*/
@@ -314,8 +314,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param plan the plan of the service instance associated with the binding
*/
@@ -327,8 +327,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Create a builder that provides a fluent API for constructing a {@literal CreateServiceInstanceBindingRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService}
+ * implementations.
*
* @return the builder
*/
@@ -390,19 +390,32 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceBindingRequest}.
*/
- public static class CreateServiceInstanceBindingRequestBuilder {
+ public static final class CreateServiceInstanceBindingRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private String planId;
+
private String bindingId;
+
private ServiceDefinition serviceDefinition;
+
private Plan plan;
+
private boolean asyncAccepted;
+
private BindResource bindResource;
+
private final Map parameters = new HashMap<>();
+
private Context context;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private CreateServiceInstanceBindingRequestBuilder() {
@@ -481,8 +494,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Set the value of the flag indicating whether the platform supports asynchronous operations
- * as would be provided in the request from the platform.
+ * Set the value of the flag indicating whether the platform supports asynchronous operations as would be
+ * provided in the request from the platform.
*
* @param asyncAccepted the boolean value of the flag
* @return the builder
@@ -506,8 +519,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Add a set of parameters from the provided {@literal Map} to the request parameters
- * as would be provided in the request from the platform.
+ * Add a set of parameters from the provided {@literal Map} to the request parameters as would be provided in
+ * the request from the platform.
*
* @param parameters the parameters to add
* @return the builder
@@ -589,6 +602,8 @@ public class CreateServiceInstanceBindingRequest extends AsyncServiceBrokerReque
bindingId, serviceDefinition, plan, asyncAccepted, bindResource, parameters, context,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponse.java
index 9c083056..cc25a741 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponse.java
@@ -28,7 +28,7 @@ import org.springframework.cloud.servicebroker.model.instance.CreateServiceInsta
/**
* Details of a response to a service instance binding create request.
- *
+ *
* Service brokers will typically construct one of the subtypes of this class to build a response.
*
* @author Scott Frederick
@@ -99,9 +99,12 @@ public class CreateServiceInstanceBindingResponse extends AsyncServiceBrokerResp
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceResponse}.
*/
- public static class CreateServiceInstanceBindingResponseBuilder {
+ public static final class CreateServiceInstanceBindingResponseBuilder {
+
private boolean bindingExisted;
+
private boolean async;
+
private String operation;
private CreateServiceInstanceBindingResponseBuilder() {
@@ -114,10 +117,9 @@ public class CreateServiceInstanceBindingResponse extends AsyncServiceBrokerResp
* resources were created.
*
*
- * This value will be used to determine the HTTP response code to the platform. If the service broker
- * indicates that it performed the operation synchronously, a {@literal true} value will result in a
- * response code {@literal 200 OK}, and a {@literal false} value will result in a response code
- * {@literal 201 CREATED}.
+ * This value will be used to determine the HTTP response code to the platform. If the service broker indicates
+ * that it performed the operation synchronously, a {@literal true} value will result in a response code
+ * {@literal 200 OK}, and a {@literal false} value will result in a response code {@literal 201 CREATED}.
*
* @param bindingExisted {@literal true} to indicate that the binding exists, {@literal false} otherwise
* @return the builder
@@ -133,12 +135,12 @@ public class CreateServiceInstanceBindingResponse extends AsyncServiceBrokerResp
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be
- * determined by the value of {@link #bindingExisted(boolean)}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be determined by the
+ * value of {@link #bindingExisted(boolean)}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
* @see #bindingExisted(boolean)
*/
@@ -148,9 +150,9 @@ public class CreateServiceInstanceBindingResponse extends AsyncServiceBrokerResp
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent
- * {@link GetLastServiceBindingOperationRequest} requests.
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceBindingOperationRequest}
+ * requests.
*
*
* This value will set the {@literal operation} field in the body of the response to the platform.
@@ -171,6 +173,7 @@ public class CreateServiceInstanceBindingResponse extends AsyncServiceBrokerResp
public CreateServiceInstanceBindingResponse build() {
return new CreateServiceInstanceBindingResponse(async, operation, bindingExisted);
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponse.java
index 02c0bc0c..b85305a2 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponse.java
@@ -22,15 +22,16 @@ import java.util.Objects;
* Details of a response to a request to create a new service instance binding associated with a route.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
- * @see Open Service Broker API specification
- *
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInstanceBindingResponse {
+
private final String routeServiceUrl;
/**
@@ -49,7 +50,7 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
* @param routeServiceUrl the route service URL
*/
public CreateServiceInstanceRouteBindingResponse(boolean async, String operation, boolean bindingExisted,
- String routeServiceUrl) {
+ String routeServiceUrl) {
super(async, operation, bindingExisted);
this.routeServiceUrl = routeServiceUrl;
}
@@ -64,8 +65,7 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
}
/**
- * Create a builder that provides a fluent API for constructing a
- * {@literal CreateServiceInstanceRouteBindingResponse}.
+ * Create a builder that provides a fluent API for constructing a {@literal CreateServiceInstanceRouteBindingResponse}.
*
* @return the builder
*/
@@ -109,10 +109,14 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceAppBindingResponse}.
*/
- public static class CreateServiceInstanceRouteBindingResponseBuilder {
+ public static final class CreateServiceInstanceRouteBindingResponseBuilder {
+
private String routeServiceUrl;
+
private boolean bindingExisted;
+
private boolean async;
+
private String operation;
private CreateServiceInstanceRouteBindingResponseBuilder() {
@@ -155,12 +159,12 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be
- * determined by the value of {@link #bindingExisted(boolean)}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be determined by the
+ * value of {@link #bindingExisted(boolean)}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
* @see #bindingExisted(boolean)
*/
@@ -170,9 +174,9 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent
- * {@link GetLastServiceBindingOperationRequest} requests.
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceBindingOperationRequest}
+ * requests.
*
*
* This value will set the {@literal operation} field in the body of the response to the platform.
@@ -193,5 +197,7 @@ public class CreateServiceInstanceRouteBindingResponse extends CreateServiceInst
public CreateServiceInstanceRouteBindingResponse build() {
return new CreateServiceInstanceRouteBindingResponse(async, operation, bindingExisted, routeServiceUrl);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java
index 9b5be67d..27249508 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java
@@ -27,17 +27,17 @@ import org.springframework.cloud.servicebroker.model.catalog.Plan;
import org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition;
/**
- * Details of a request to delete a service instance binding.
+ * Details of a request to delete a service instance binding.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author krujos
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerRequest {
@@ -61,6 +61,7 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
/**
* Construct a new {@link DeleteServiceInstanceBindingRequest}
+ *
* @param serviceInstanceId the service instance ID
* @param serviceDefinitionId the service definition ID
* @param planId the plan ID
@@ -73,9 +74,9 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public DeleteServiceInstanceBindingRequest(String serviceInstanceId, String serviceDefinitionId, String planId,
- String bindingId, ServiceDefinition serviceDefinition, Plan plan,
- boolean acceptsAsync, String platformInstanceId, String apiInfoLocation,
- Context originatingIdentity) {
+ String bindingId, ServiceDefinition serviceDefinition, Plan plan,
+ boolean acceptsAsync, String platformInstanceId, String apiInfoLocation,
+ Context originatingIdentity) {
super(acceptsAsync, platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.serviceDefinitionId = serviceDefinitionId;
@@ -85,7 +86,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
this.plan = plan;
}
- @JsonProperty(ASYNC_REQUEST_PARAMETER) //in base class field is excluded, as other requests are passing this as query params
+ @JsonProperty(ASYNC_REQUEST_PARAMETER)
+ //in base class field is excluded, as other requests are passing this as query params
@Override
public boolean isAsyncAccepted() {
return super.isAsyncAccepted();
@@ -116,9 +118,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the service definition for the service instance associated with the binding. This will match one
- * of the service definition IDs provided in the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}.
+ * Get the ID of the service definition for the service instance associated with the binding. This will match one of
+ * the service definition IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}.
*
*
* This value is set from the {@literal service_id} field in the body of the request from the platform
@@ -130,9 +131,9 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Get the ID of the plan for to the service instance associated with the binding. This will match one of the
- * plan IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within
- * the specified {@link ServiceDefinition}.
+ * Get the ID of the plan for to the service instance associated with the binding. This will match one of the plan
+ * IDs provided in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified
+ * {@link ServiceDefinition}.
*
*
* This value is set from the {@literal plan_id} field in the body of the request from the platform.
@@ -147,8 +148,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Get the service definition of the service instance associated with the binding.
*
*
- * The service definition is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The service definition is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}
+ * as a convenience.
*
* @return the service definition
*/
@@ -160,8 +161,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Get the plan of the service instance associated with the binding.
*
*
- * The plan is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The plan is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a
+ * convenience.
*
* @return the plan
*/
@@ -173,8 +174,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
* Create a builder that provides a fluent API for constructing a {@literal DeleteServiceInstanceBindingRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService}
+ * implementations.
*
* @return the builder
*/
@@ -228,16 +229,26 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
/**
* Provides a fluent API for constructing a {@link DeleteServiceInstanceBindingRequest}.
*/
- public static class DeleteServiceInstanceBindingRequestBuilder {
+ public static final class DeleteServiceInstanceBindingRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private String planId;
+
private String bindingId;
+
private boolean asyncAccepted;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
+
private ServiceDefinition serviceDefinition;
+
private Plan plan;
private DeleteServiceInstanceBindingRequestBuilder() {
@@ -292,8 +303,8 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
}
/**
- * Set the value of the flag indicating whether the platform supports asynchronous operations
- * as would be provided in the request from the platform.
+ * Set the value of the flag indicating whether the platform supports asynchronous operations as would be
+ * provided in the request from the platform.
*
* @param asyncAccepted the boolean value of the flag
* @return the builder
@@ -374,5 +385,7 @@ public class DeleteServiceInstanceBindingRequest extends AsyncServiceBrokerReque
bindingId, serviceDefinition, plan, asyncAccepted,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponse.java
index 3c17e2e6..b65fbc66 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponse.java
@@ -25,20 +25,20 @@ import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOper
* Details of a response to a request to delete a service instance binding.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
public class DeleteServiceInstanceBindingResponse extends AsyncServiceBrokerResponse {
/**
* Construct a new {@link DeleteServiceInstanceBindingResponse}
*/
- public DeleteServiceInstanceBindingResponse() {
+ public DeleteServiceInstanceBindingResponse() {
this(false, null);
}
@@ -96,8 +96,10 @@ public class DeleteServiceInstanceBindingResponse extends AsyncServiceBrokerResp
/**
* Provides a fluent API for constructing a {@link DeleteServiceInstanceBindingResponse}.
*/
- public static class DeleteServiceInstanceBindingResponseBuilder {
+ public static final class DeleteServiceInstanceBindingResponseBuilder {
+
private boolean async;
+
private String operation;
private DeleteServiceInstanceBindingResponseBuilder() {
@@ -108,12 +110,12 @@ public class DeleteServiceInstanceBindingResponse extends AsyncServiceBrokerResp
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result
- * in a response code {@literal 200 OK}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result in a response
+ * code {@literal 200 OK}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
*/
public DeleteServiceInstanceBindingResponseBuilder async(boolean async) {
@@ -122,8 +124,8 @@ public class DeleteServiceInstanceBindingResponse extends AsyncServiceBrokerResp
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
* requests.
*
*
@@ -145,5 +147,7 @@ public class DeleteServiceInstanceBindingResponse extends AsyncServiceBrokerResp
public DeleteServiceInstanceBindingResponse build() {
return new DeleteServiceInstanceBindingResponse(async, operation);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/Endpoint.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/Endpoint.java
index 895e34c9..f6739718 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/Endpoint.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/Endpoint.java
@@ -16,13 +16,14 @@
package org.springframework.cloud.servicebroker.model.binding;
-import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -31,13 +32,13 @@ import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
/**
- * The network endpoints that the Application uses to connect to the Service Instance. If present, all Service
- * Instance endpoints that are relevant for the Application MUST be in this list, even if endpoints are not
- * reachable or host names are not resolvable from outside the service network.
+ * The network endpoints that the Application uses to connect to the Service Instance. If present, all Service Instance
+ * endpoints that are relevant for the Application MUST be in this list, even if endpoints are not reachable or host
+ * names are not resolvable from outside the service network.
*
* @author Roy Clarkson
* @see Open Service
- * Broker API specification
+ * Broker API specification
*/
public class Endpoint {
@@ -112,8 +113,19 @@ public class Endpoint {
* Values designating the network protocol
*/
public enum Protocol {
+ /**
+ * Supports TCP network protocol
+ */
TCP("tcp"),
+
+ /**
+ * Supports UDP network protocol
+ */
UDP("udp"),
+
+ /**
+ * Accepts all network protocols
+ */
ALL("all");
private final String value;
@@ -168,7 +180,7 @@ public class Endpoint {
/**
* Provides a fluid API for constructing an {@link Endpoint}
*/
- public static class EndpointBuilder {
+ public static final class EndpointBuilder {
private String host;
@@ -253,7 +265,7 @@ public class Endpoint {
/**
* Construct a new {@link ProtocolDeserializer}
*/
- public ProtocolDeserializer(){
+ public ProtocolDeserializer() {
this(null);
}
@@ -262,20 +274,21 @@ public class Endpoint {
*
* @param c the type
*/
- public ProtocolDeserializer(Class> c){
+ public ProtocolDeserializer(Class> c) {
super(c);
}
@Override
public Protocol deserialize(JsonParser jsonParser, DeserializationContext
deserializationContext) throws IOException {
- for(Protocol m : Protocol.values()) {
+ for (Protocol m : Protocol.values()) {
if (m.toString().equalsIgnoreCase(jsonParser.getText())) {
return m;
}
}
throw new IllegalArgumentException("Protocol not defined");
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java
index 2a8ddb17..802ee240 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java
@@ -25,13 +25,13 @@ import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest;
* Details of a request to get the state of the last operation on a service instance binding.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest {
@@ -58,8 +58,8 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public GetLastServiceBindingOperationRequest(String serviceInstanceId, String bindingId, String serviceDefinitionId,
- String planId, String operation, String platformInstanceId,
- String apiInfoLocation, Context originatingIdentity) {
+ String planId, String operation, String platformInstanceId,
+ String apiInfoLocation, Context originatingIdentity) {
super(platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.bindingId = bindingId;
@@ -69,9 +69,8 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
}
/**
- * Get the ID of the service instance associated with the binding. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service instance.
+ * Get the ID of the service instance associated with the binding. This value is assigned by the platform. It must
+ * be unique within the platform and can be used to correlate any resources associated with the service instance.
*
*
* This value is set from the {@literal :instance_id} path element of the request from the platform.
@@ -83,9 +82,8 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
}
/**
- * Get the ID of the service binding. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service binding.
+ * Get the ID of the service binding. This value is assigned by the platform. It must be unique within the platform
+ * and can be used to correlate any resources associated with the service binding.
*
*
* This value is set from the {@literal :binding_id} path element of the request from the platform.
@@ -122,9 +120,9 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
/**
* Get the value of the {@literal operation} field previously provided to the platform.
- *
- * Service brokers can optionally return an {@literal operation} value to the platform in the response from an
- * async create, update, or delete request. The platform will pass this value back to the broker if provided.
+ *
+ * Service brokers can optionally return an {@literal operation} value to the platform in the response from an async
+ * create, update, or delete request. The platform will pass this value back to the broker if provided.
*
*
* This value is set from the {@literal operation} request parameter of the request from the platform.
@@ -139,8 +137,8 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
* Create a builder that provides a fluent API for constructing a {@literal GetLastServiceOperationRequestBuilder}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -192,14 +190,22 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
/**
* Provides a fluent API for constructing a {@link GetLastServiceBindingOperationRequest}.
*/
- public static class GetLastServiceBindingOperationRequestBuilder {
+ public static final class GetLastServiceBindingOperationRequestBuilder {
+
private String serviceInstanceId;
+
private String bindingId;
+
private String serviceDefinitionId;
+
private String planId;
+
private String operation;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private GetLastServiceBindingOperationRequestBuilder() {
@@ -309,6 +315,7 @@ public class GetLastServiceBindingOperationRequest extends ServiceBrokerRequest
return new GetLastServiceBindingOperationRequest(serviceInstanceId, bindingId, serviceDefinitionId, planId,
operation, platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java
index cc13ae4f..446be98f 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java
@@ -28,13 +28,13 @@ import org.springframework.cloud.servicebroker.model.instance.OperationState;
* Details of a response to a request to get the state of the last operation on a service instance binding.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open Service
+ * Broker API specification
*/
@JsonAutoDetect
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -56,6 +56,7 @@ public class GetLastServiceBindingOperationResponse {
/**
* Construct a new {@link GetLastServiceBindingOperationResponse}
+ *
* @param state the current state
* @param description the description
* @param deleteOperation is delete operation
@@ -133,9 +134,12 @@ public class GetLastServiceBindingOperationResponse {
/**
* Provides a fluent API for constructing a {@link GetLastServiceBindingOperationResponse}.
*/
- public static class GetLastServiceBindingOperationResponseBuilder {
+ public static final class GetLastServiceBindingOperationResponseBuilder {
+
private OperationState state;
+
private String description;
+
private boolean deleteOperation;
private GetLastServiceBindingOperationResponseBuilder() {
@@ -145,9 +149,9 @@ public class GetLastServiceBindingOperationResponse {
* Set the current state of the asynchronous operation.
*
*
- * A value of {@link OperationState#IN_PROGRESS} will cause the platform to continue polling the service
- * broker for status. A value of {@link OperationState#SUCCEEDED} or {@link OperationState#FAILED} will
- * cause the platform to stop polling the service broker.
+ * A value of {@link OperationState#IN_PROGRESS} will cause the platform to continue polling the service broker
+ * for status. A value of {@link OperationState#SUCCEEDED} or {@link OperationState#FAILED} will cause the
+ * platform to stop polling the service broker.
*
*
* This value will set the {@literal state} field in the body of the response to the platform.
@@ -161,8 +165,8 @@ public class GetLastServiceBindingOperationResponse {
}
/**
- * Set a user-facing description of the operation that the platform can display to the API client.
- * Can be {@literal null}.
+ * Set a user-facing description of the operation that the platform can display to the API client. Can be
+ * {@literal null}.
*
*
* This value will set the {@literal description} field in the body of the response to the platform.
@@ -176,15 +180,15 @@ public class GetLastServiceBindingOperationResponse {
}
/**
- * Set a boolean value indicating whether the current asynchronous operation is a delete operation.
- * Should be set to true in response to a request for the status of an asynchronous
- * delete request, and false otherwise.
+ * Set a boolean value indicating whether the current asynchronous operation is a delete operation. Should be
+ * set to true in response to a request for the status of an asynchronous delete request, and
+ * false otherwise.
*
*
- * This value is used to determine the HTTP response code to the platform. If the
- * {@link #operationState(OperationState)} is {@link OperationState#SUCCEEDED} and the value provided
- * here is {@literal true} will result in a response code {@literal 410 GONE}. Otherwise the response
- * code will be {@literal 200 OK}.
+ * This value is used to determine the HTTP response code to the platform. If the {@link
+ * #operationState(OperationState)} is {@link OperationState#SUCCEEDED} and the value provided here is {@literal
+ * true} will result in a response code {@literal 410 GONE}. Otherwise the response code will be {@literal 200
+ * OK}.
*
* @param deleteOperation the boolean value
* @return the builder
@@ -202,5 +206,7 @@ public class GetLastServiceBindingOperationResponse {
public GetLastServiceBindingOperationResponse build() {
return new GetLastServiceBindingOperationResponse(state, description, deleteOperation);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponse.java
index 65ed88f4..937d5e9c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponse.java
@@ -27,12 +27,12 @@ import java.util.Objects;
* Details of a response to a request to retrieve a service instance binding associated with an application.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
+ * @see Open Service Broker API
+ * specification
*/
public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBindingResponse {
@@ -58,7 +58,7 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
* @param volumeMounts the set of volume mounts
*/
public GetServiceInstanceAppBindingResponse(Map parameters, Map credentials,
- String syslogDrainUrl, List volumeMounts) {
+ String syslogDrainUrl, List volumeMounts) {
super(parameters);
this.credentials = credentials;
this.syslogDrainUrl = syslogDrainUrl;
@@ -142,18 +142,22 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
/**
* Provides a fluent API for constructing a {@link GetServiceInstanceAppBindingResponse}.
*/
- public static class GetServiceInstanceAppBindingResponseBuilder {
+ public static final class GetServiceInstanceAppBindingResponseBuilder {
+
private final Map credentials = new HashMap<>();
+
private String syslogDrainUrl;
+
private final List volumeMounts = new ArrayList<>();
+
private final Map parameters = new HashMap<>();
private GetServiceInstanceAppBindingResponseBuilder() {
}
/**
- * Add a set of credentials from the provided {@literal Map} to the credentials that the bound application
- * can use to access the service instance.
+ * Add a set of credentials from the provided {@literal Map} to the credentials that the bound application can
+ * use to access the service instance.
*
*
* This value will set the {@literal credentials} field in the body of the response to the platform
@@ -197,8 +201,8 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
}
/**
- * Add a set of volume mounts from the provided {@literal List} to the volume mounts that can be used in
- * an application container file system.
+ * Add a set of volume mounts from the provided {@literal List} to the volume mounts that can be used in an
+ * application container file system.
*
*
* This value will set the {@literal volume_mounts} field in the body of the response to the platform.
@@ -212,8 +216,8 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
}
/**
- * Add a set of volume mounts from the provided array to the volume mounts that can be used in
- * an application container file system.
+ * Add a set of volume mounts from the provided array to the volume mounts that can be used in an application
+ * container file system.
*
*
* This value will set the {@literal volume_mounts} field in the body of the response to the platform.
@@ -227,8 +231,8 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
}
/**
- * Add a set of parameters from the provided {@literal Map} to the request parameters
- * as were provided by the platform at service binding creation.
+ * Add a set of parameters from the provided {@literal Map} to the request parameters as were provided by the
+ * platform at service binding creation.
*
*
* This value will set the {@literal parameters} field in the body of the response to the platform.
@@ -243,8 +247,8 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
}
/**
- * Add a key/value pair to the request parameters as were provided in the request from the platform at
- * service binding creation.
+ * Add a key/value pair to the request parameters as were provided in the request from the platform at service
+ * binding creation.
*
*
* This value will set the {@literal parameters} field in the body of the response to the platform.
@@ -267,5 +271,7 @@ public class GetServiceInstanceAppBindingResponse extends GetServiceInstanceBind
public GetServiceInstanceAppBindingResponse build() {
return new GetServiceInstanceAppBindingResponse(parameters, credentials, syslogDrainUrl, volumeMounts);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java
index 3df0d0ef..bdf4ef54 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java
@@ -25,12 +25,12 @@ import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest;
* Details of a request to retrieve a service instance binding.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author Scott Frederick
+ * @see Open Service Broker API
+ * specification
*/
public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
@@ -48,16 +48,15 @@ public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public GetServiceInstanceBindingRequest(String serviceInstanceId, String bindingId,
- String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
+ String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
super(platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.bindingId = bindingId;
}
/**
- * Get the ID of the service instance associated with the binding. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service instance.
+ * Get the ID of the service instance associated with the binding. This value is assigned by the platform. It must
+ * be unique within the platform and can be used to correlate any resources associated with the service instance.
*
*
* This value is set from the {@literal :instance_id} path element of the request from the platform.
@@ -69,9 +68,8 @@ public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
}
/**
- * Get the ID of the service binding to create. This value is assigned by the platform.
- * It must be unique within the platform and can be used to correlate any resources associated with the
- * service binding.
+ * Get the ID of the service binding to create. This value is assigned by the platform. It must be unique within the
+ * platform and can be used to correlate any resources associated with the service binding.
*
*
* This value is set from the {@literal :binding_id} path element of the request from the platform.
@@ -86,8 +84,8 @@ public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
* Create a builder that provides a fluent API for constructing a {@literal GetServiceInstanceBindingRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceBindingService}
+ * implementations.
*
* @return the builder
*/
@@ -133,11 +131,16 @@ public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceBindingRequest}.
*/
- public static class GetServiceInstanceBindingRequestBuilder {
+ public static final class GetServiceInstanceBindingRequestBuilder {
+
private String serviceInstanceId;
+
private String bindingId;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private GetServiceInstanceBindingRequestBuilder() {
@@ -212,5 +215,7 @@ public class GetServiceInstanceBindingRequest extends ServiceBrokerRequest {
return new GetServiceInstanceBindingRequest(serviceInstanceId, bindingId,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponse.java
index 6b549b5f..b895d43c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponse.java
@@ -25,9 +25,9 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming;
/**
* Details of a response to a request to retrieve a service instance binding.
- *
+ *
* Service brokers will typically construct one of the subtypes of this class to build a response.
- *
+ *
* @author Scott Frederick
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@@ -88,4 +88,5 @@ public class GetServiceInstanceBindingResponse {
"parameters=" + parameters +
'}';
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponse.java
index 327a1719..abc9ce84 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponse.java
@@ -24,12 +24,12 @@ import java.util.Objects;
* Details of a response to a request to create a new service instance binding associated with a route.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
- * @see Open Service Broker API specification
- *
* @author Scott Frederick
+ * @see Open Service Broker API
+ * specification
*/
public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBindingResponse {
@@ -63,8 +63,7 @@ public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBi
}
/**
- * Create a builder that provides a fluent API for constructing a
- * {@literal GetServiceInstanceRouteBindingResponse}.
+ * Create a builder that provides a fluent API for constructing a {@literal GetServiceInstanceRouteBindingResponse}.
*
* @return the builder
*/
@@ -108,8 +107,10 @@ public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBi
/**
* Provides a fluent API for constructing a {@link GetServiceInstanceRouteBindingResponse}.
*/
- public static class GetServiceInstanceRouteBindingResponseBuilder {
+ public static final class GetServiceInstanceRouteBindingResponseBuilder {
+
private String routeServiceUrl;
+
private final Map parameters = new HashMap<>();
private GetServiceInstanceRouteBindingResponseBuilder() {
@@ -130,8 +131,8 @@ public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBi
}
/**
- * Add a set of parameters from the provided {@literal Map} to the request parameters
- * as were provided by the platform at service binding creation.
+ * Add a set of parameters from the provided {@literal Map} to the request parameters as were provided by the
+ * platform at service binding creation.
*
*
* This value will set the {@literal parameters} field in the body of the response to the platform.
@@ -146,8 +147,8 @@ public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBi
}
/**
- * Add a key/value pair to the request parameters as were provided in the request from the platform at
- * service binding creation.
+ * Add a key/value pair to the request parameters as were provided in the request from the platform at service
+ * binding creation.
*
*
* This value will set the {@literal parameters} field in the body of the response to the platform.
@@ -170,5 +171,7 @@ public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBi
public GetServiceInstanceRouteBindingResponse build() {
return new GetServiceInstanceRouteBindingResponse(parameters, routeServiceUrl);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDevice.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDevice.java
index 1a27a879..647749ad 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDevice.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDevice.java
@@ -25,10 +25,10 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming;
/**
* Represents a type of distributed {@link VolumeDevice} which can be mounted on multiple app instances simultaneously.
- *
+ *
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
*/
@@ -114,8 +114,10 @@ public class SharedVolumeDevice extends VolumeDevice {
/**
* Provides a fluent API for constructing a {@link SharedVolumeDevice}.
*/
- public static class SharedVolumeDeviceBuilder {
+ public static final class SharedVolumeDeviceBuilder {
+
private String volumeId;
+
private final Map mountConfig = new HashMap<>();
private SharedVolumeDeviceBuilder() {
@@ -172,5 +174,7 @@ public class SharedVolumeDevice extends VolumeDevice {
public SharedVolumeDevice build() {
return new SharedVolumeDevice(volumeId, mountConfig);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeDevice.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeDevice.java
index 40b10ad1..d77f5312 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeDevice.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeDevice.java
@@ -22,8 +22,10 @@ package org.springframework.cloud.servicebroker.model.binding;
* @author Scott Frederick
*/
public class VolumeDevice {
+
@Override
public String toString() {
return "VolumeDevice()";
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeMount.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeMount.java
index 7994044f..cc054238 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeMount.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/VolumeMount.java
@@ -33,23 +33,31 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
/**
* Details of a volume mount in a service binding response.
- *
- *
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
*
- * @see Open Service Broker API specification
+ *
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VolumeMount {
+
/**
* Values designating whether the mounted volume can be written to or read from.
*/
public enum Mode {
+ /**
+ * Volume is Read-Only
+ */
READ_ONLY("r"),
+
+ /**
+ * Volume is Read-Write
+ */
READ_WRITE("rw");
private final String value;
@@ -98,7 +106,7 @@ public class VolumeMount {
private final DeviceType deviceType;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "device_type")
- @JsonSubTypes({@JsonSubTypes.Type(value = SharedVolumeDevice.class, name = "shared") })
+ @JsonSubTypes({@JsonSubTypes.Type(value = SharedVolumeDevice.class, name = "shared")})
private final VolumeDevice device;
/**
@@ -214,11 +222,16 @@ public class VolumeMount {
/**
* Provides a fluent API for constructing a {@link VolumeMount}.
*/
- public static class VolumeMountBuilder {
+ public static final class VolumeMountBuilder {
+
private String driver;
+
private String containerDir;
+
private Mode mode;
+
private DeviceType deviceType;
+
private VolumeDevice device;
private VolumeMountBuilder() {
@@ -240,7 +253,7 @@ public class VolumeMount {
/**
* Set the directory to mount inside the application container.
- *
+ *
*
* This value will set the {@literal container_dir} field in the body of the response to the platform.
*
@@ -302,6 +315,7 @@ public class VolumeMount {
public VolumeMount build() {
return new VolumeMount(driver, containerDir, mode, deviceType, device);
}
+
}
/**
@@ -314,7 +328,7 @@ public class VolumeMount {
/**
* Construct a new {@link DeviceTypeDeserializer}
*/
- public DeviceTypeDeserializer(){
+ public DeviceTypeDeserializer() {
this(null);
}
@@ -323,20 +337,21 @@ public class VolumeMount {
*
* @param c the type
*/
- public DeviceTypeDeserializer(Class> c){
+ public DeviceTypeDeserializer(Class> c) {
super(c);
}
@Override
public DeviceType deserialize(JsonParser jsonParser,
DeserializationContext deserializationContext) throws IOException {
- for(DeviceType d : DeviceType.values()) {
+ for (DeviceType d : DeviceType.values()) {
if (d.toString().equalsIgnoreCase(jsonParser.getText())) {
return d;
}
}
throw new IllegalArgumentException("DeviceType is not defined");
}
+
}
/**
@@ -349,7 +364,7 @@ public class VolumeMount {
/**
* Construct a new {@link ModeDeserializer}
*/
- public ModeDeserializer(){
+ public ModeDeserializer() {
this(null);
}
@@ -358,20 +373,21 @@ public class VolumeMount {
*
* @param c the type
*/
- public ModeDeserializer(Class> c){
+ public ModeDeserializer(Class> c) {
super(c);
}
@Override
public Mode deserialize(JsonParser jsonParser, DeserializationContext
deserializationContext) throws IOException {
- for(Mode m : Mode.values()) {
+ for (Mode m : Mode.values()) {
if (m.toString().equalsIgnoreCase(jsonParser.getText())) {
return m;
}
}
throw new IllegalArgumentException("Mode not defined");
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/package-info.java
index 5dcc211c..5f0ea1fc 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/package-info.java
@@ -17,4 +17,4 @@
/**
* Service binding models
*/
-package org.springframework.cloud.servicebroker.model.binding;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model.binding;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java
index f32c14d4..9aabd83f 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java
@@ -16,27 +16,26 @@
package org.springframework.cloud.servicebroker.model.catalog;
-import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The catalog of services offered by the service broker.
*
*
- * Objects of this type are constructed by the service broker application, and used to
- * build the response to the platform.
- *
- * @see Open
- * Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author sgreenberg@pivotal.io
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
public class Catalog {
@@ -53,6 +52,7 @@ public class Catalog {
/**
* Construct a new {@link Catalog}
+ *
* @param serviceDefinitions a collection of services
*/
public Catalog(List serviceDefinitions) {
@@ -104,15 +104,16 @@ public class Catalog {
/**
* Provides a fluent API for constructing a {@literal Catalog}.
*/
- public static class CatalogBuilder {
+ public static final class CatalogBuilder {
+
private final List serviceDefinitions = new ArrayList<>();
private CatalogBuilder() {
}
/**
- * Add a set of service offerings from the provided {@literal List} to the
- * service offerings provided by the service broker.
+ * Add a set of service offerings from the provided {@literal List} to the service offerings provided by the
+ * service broker.
*
*
* This value sets the {@literal services} field in the response to the platform.
@@ -126,8 +127,8 @@ public class Catalog {
}
/**
- * Add a set of service offerings from the provided array to the
- * service offerings provided by the service broker.
+ * Add a set of service offerings from the provided array to the service offerings provided by the service
+ * broker.
*
*
* This value sets the {@literal services} field in the response to the platform.
@@ -148,5 +149,7 @@ public class Catalog {
public Catalog build() {
return new Catalog(serviceDefinitions);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClient.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClient.java
index 51f1b795..be803bc7 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClient.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClient.java
@@ -25,9 +25,8 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming;
/**
* The dashboard URI for a {@link ServiceDefinition}
*
- * @see Open
- * Service Broker API specification
+ * @see Open
+ * Service Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -60,9 +59,9 @@ public class DashboardClient {
}
/**
- * The client ID of the dashboard OAuth2 client that the service intends to use. The
- * name must be unique within the platform. If the name is already in use, the
- * platform will return an error to the operator when the service is registered.
+ * The client ID of the dashboard OAuth2 client that the service intends to use. The name must be unique within the
+ * platform. If the name is already in use, the platform will return an error to the operator when the service is
+ * registered.
*
* @return the client ID
*/
@@ -80,8 +79,7 @@ public class DashboardClient {
}
/**
- * A domain for the service dashboard that will be whitelisted by the UAA to enable
- * dashboard SSO.
+ * A domain for the service dashboard that will be whitelisted by the UAA to enable dashboard SSO.
*
* @return the dashboard URI
*/
@@ -90,8 +88,7 @@ public class DashboardClient {
}
/**
- * Create a builder that provides a fluent API for constructing a
- * {@literal DashboardClient}.
+ * Create a builder that provides a fluent API for constructing a {@literal DashboardClient}.
*
* @return the builder
*/
@@ -130,18 +127,21 @@ public class DashboardClient {
/**
* Provides a fluent API for constructing a {@literal DashboardClient}.
*/
- public static class DashboardClientBuilder {
+ public static final class DashboardClientBuilder {
+
private String id;
+
private String secret;
+
private String redirectUri;
private DashboardClientBuilder() {
}
/**
- * The client ID of the dashboard OAuth2 client that the service intends to use. The
- * name must be unique within the platform. If the name is already in use, the
- * platform will return an error to the operator when the service is registered.
+ * The client ID of the dashboard OAuth2 client that the service intends to use. The name must be unique within
+ * the platform. If the name is already in use, the platform will return an error to the operator when the
+ * service is registered.
*
* @param id the client ID
* @return the builder instance
@@ -163,8 +163,7 @@ public class DashboardClient {
}
/**
- * A domain for the service dashboard that will be whitelisted by the UAA to
- * enable dashboard SSO.
+ * A domain for the service dashboard that will be whitelisted by the UAA to enable dashboard SSO.
*
* @param redirectUri the dashboard URI
* @return the builder instance
@@ -182,5 +181,7 @@ public class DashboardClient {
public DashboardClient build() {
return new DashboardClient(id, secret, redirectUri);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfo.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfo.java
index a66ed98f..9626c6f6 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfo.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfo.java
@@ -18,6 +18,7 @@ package org.springframework.cloud.servicebroker.model.catalog;
import java.util.Objects;
import java.util.regex.Pattern;
+
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -26,9 +27,8 @@ import com.fasterxml.jackson.annotation.JsonInclude;
* Maintenance info available for a Plan.
*
* @author ilyavy
- * @see Open
- * Service Broker API specification
+ * @see Open
+ * Service Broker API specification
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MaintenanceInfo {
@@ -45,10 +45,10 @@ public class MaintenanceInfo {
/**
* Constructs a new {@link MaintenanceInfo}
*
- * @param version maintenance version (conforming to a semantic version 2.0)
+ * @param version maintenance version (conforming to a semantic version 2.0)
* @param description description of the impact of the maintenance update
- * @throws IllegalArgumentException if the provided to the builder version does not comply to semantic
- * versioning v2 specification
+ * @throws IllegalArgumentException if the provided to the builder version does not comply to semantic versioning
+ * v2 specification
*/
public MaintenanceInfo(String version, String description) {
if (!SEMANTIC_VERSION_V2_PATTERN.matcher(version).matches()) {
@@ -115,7 +115,8 @@ public class MaintenanceInfo {
/**
* Provides a fluent API for constructing a {@literal MaintenanceInfo}.
*/
- public static class MaintenanceInfoBuilder {
+ public static final class MaintenanceInfoBuilder {
+
private String version;
private String description;
@@ -137,9 +138,9 @@ public class MaintenanceInfo {
/**
* The version of the maintenance update available for a plan.
*
- * @param major MAJOR version when you make incompatible API changes
- * @param minor MINOR version when you add functionality in a backwards-compatible manner
- * @param patch PATCH version when you make backwards-compatible bug fixes
+ * @param major MAJOR version when you make incompatible API changes
+ * @param minor MINOR version when you add functionality in a backwards-compatible manner
+ * @param patch PATCH version when you make backwards-compatible bug fixes
* @param extension additional labels for pre-release and build metadata
* @return the builder instance
*/
@@ -163,10 +164,12 @@ public class MaintenanceInfo {
*
* @return the newly constructed {@literal MaintenanceInfo}
* @throws IllegalArgumentException if the provided to the builder version does not comply to semantic
- * versioning v2 specification
+ * versioning v2 specification
*/
public MaintenanceInfo build() {
return new MaintenanceInfo(version, description);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MethodSchema.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MethodSchema.java
index f22036a0..8d961c6c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MethodSchema.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/MethodSchema.java
@@ -41,6 +41,7 @@ public class MethodSchema {
/**
* Construct a new {@link MethodSchema}
+ *
* @param parameters a collection of parameters
*/
public MethodSchema(Map parameters) {
@@ -57,8 +58,7 @@ public class MethodSchema {
}
/**
- * Create a builder that provides a fluent API for constructing a
- * {@literal MethodSchema}.
+ * Create a builder that provides a fluent API for constructing a {@literal MethodSchema}.
*
* @return the builder
*/
@@ -93,7 +93,8 @@ public class MethodSchema {
/**
* Provides a fluent API for constructing a {@literal MethodSchema}.
*/
- public static class MethodSchemaBuilder {
+ public static final class MethodSchemaBuilder {
+
private final Map parameters = new HashMap<>();
private MethodSchemaBuilder() {
@@ -130,5 +131,7 @@ public class MethodSchema {
public MethodSchema build() {
return new MethodSchema(parameters);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Plan.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Plan.java
index d202afa1..2f616f78 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Plan.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Plan.java
@@ -16,11 +16,12 @@
package org.springframework.cloud.servicebroker.model.catalog;
-import javax.validation.constraints.NotEmpty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
@@ -31,13 +32,11 @@ import org.springframework.util.CollectionUtils;
/**
* A service plan available for a ServiceDefinition
*
- * @see Open
- * Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Scott Frederick
* @author Roy Clarkson
+ * @see Open
+ * Service Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(Include.NON_NULL)
@@ -89,8 +88,8 @@ public class Plan {
* @param maintenanceInfo the maintentance information
*/
public Plan(String id, String name, String description, Map metadata, Boolean free,
- Boolean bindable, Boolean planUpdateable, Schemas schemas, Integer maximumPollingDuration,
- MaintenanceInfo maintenanceInfo) {
+ Boolean bindable, Boolean planUpdateable, Schemas schemas, Integer maximumPollingDuration,
+ MaintenanceInfo maintenanceInfo) {
this.id = id;
this.name = name;
this.description = description;
@@ -104,8 +103,8 @@ public class Plan {
}
/**
- * An identifier used to correlate this plan in future requests to the catalog. This
- * must be unique within the platform. Using a GUID is recommended.
+ * An identifier used to correlate this plan in future requests to the catalog. This must be unique within the
+ * platform. Using a GUID is recommended.
*
* @return the plan ID
*/
@@ -114,8 +113,8 @@ public class Plan {
}
/**
- * A CLI-friendly name of the plan that will appear in the catalog. The value should
- * be all lowercase, with no spaces.
+ * A CLI-friendly name of the plan that will appear in the catalog. The value should be all lowercase, with no
+ * spaces.
*
* @return the plan name
*/
@@ -136,17 +135,15 @@ public class Plan {
* A map of metadata to further describe a service plan.
*
* @return the plan metadata
- * @see Service
- * metadata conventions
+ * @see Service
+ * metadata conventions
*/
public Map getMetadata() {
return this.metadata;
}
/**
- * Indicates whether the plan can be limited by the non_basic_services_allowed field
- * in a platform quota.
+ * Indicates whether the plan can be limited by the non_basic_services_allowed field in a platform quota.
*
* @return true if the plan has no cost
*/
@@ -155,9 +152,8 @@ public class Plan {
}
/**
- * Indicates whether the service with this plan can be bound to applications. This is
- * an optional field. If the value is null, the field will be omitted
- * from the serialized JSON.
+ * Indicates whether the service with this plan can be bound to applications. This is an optional field. If the
+ * value is null, the field will be omitted from the serialized JSON.
*
* @return true if the service with this plan may be bound
*/
@@ -166,10 +162,10 @@ public class Plan {
}
/**
- * Whether the Plan supports upgrade/downgrade/sidegrade to another version. This field is OPTIONAL. If
- * specified, this takes precedence over the Service Offering's plan_updateable field. If not specified, the
- * default is derived from the Service Offering. If the value is null, the field will be omitted
- * from the serialized JSON.
+ * Whether the Plan supports upgrade/downgrade/sidegrade to another version. This field is OPTIONAL. If specified,
+ * this takes precedence over the Service Offering's plan_updateable field. If not specified, the default is derived
+ * from the Service Offering. If the value is null, the field will be omitted from the serialized
+ * JSON.
*
* @return true if the plan may be updated
*/
@@ -187,9 +183,9 @@ public class Plan {
}
/**
- * A duration, in seconds, that the Platform SHOULD use as the Service's maximum polling duration. If the
- * maximum polling duration is reached, the platform should cease polling and the operation state MUST be
- * considered failed. If the value is null, the field will be omitted from the serialized JSON.
+ * A duration, in seconds, that the Platform SHOULD use as the Service's maximum polling duration. If the maximum
+ * polling duration is reached, the platform should cease polling and the operation state MUST be considered failed.
+ * If the value is null, the field will be omitted from the serialized JSON.
*
* @return the maximum polling duration
*/
@@ -198,8 +194,8 @@ public class Plan {
}
/**
- * Maintenance information for a Service Instance which is provisioned using the Service Plan. If provided,
- * a version string MUST be provided and platforms MAY use this when Provisioning or Updating a Service Instance.
+ * Maintenance information for a Service Instance which is provisioned using the Service Plan. If provided, a
+ * version string MUST be provided and platforms MAY use this when Provisioning or Updating a Service Instance.
*
* @return the maintenance info
*/
@@ -262,24 +258,34 @@ public class Plan {
/**
* Provides a fluent API for constructing a {@literal Plan}.
*/
- public static class PlanBuilder {
+ public static final class PlanBuilder {
+
private String id;
+
private String name;
+
private String description;
+
private Map metadata;
+
private Boolean free = true;
+
private Boolean bindable;
+
private Boolean planUpdateable;
+
private Schemas schemas;
+
private Integer maximumPollingDuration;
+
private MaintenanceInfo maintenanceInfo;
private PlanBuilder() {
}
/**
- * An identifier used to correlate this plan in future requests to the catalog.
- * This must be unique within the platform. Using a GUID is recommended.
+ * An identifier used to correlate this plan in future requests to the catalog. This must be unique within the
+ * platform. Using a GUID is recommended.
*
* @param id the unique identifier of the plan
* @return the builder instance
@@ -290,8 +296,8 @@ public class Plan {
}
/**
- * A CLI-friendly name of the plan that will appear in the catalog. The value
- * should be all lowercase, with no spaces.
+ * A CLI-friendly name of the plan that will appear in the catalog. The value should be all lowercase, with no
+ * spaces.
*
* @param name plan name
* @return the builder instance
@@ -317,9 +323,8 @@ public class Plan {
*
* @param metadata plan metadata
* @return the builder instance
- * @see Service
- * metadata conventions
+ * @see Service
+ * metadata conventions
*/
public PlanBuilder metadata(Map metadata) {
if (CollectionUtils.isEmpty(metadata)) {
@@ -338,9 +343,8 @@ public class Plan {
* @param key a unique key
* @param value the value
* @return the builder instance
- * @see Service
- * metadata conventions
+ * @see Service
+ * metadata conventions
*/
public PlanBuilder metadata(String key, Object value) {
if (key == null || value == null) {
@@ -365,9 +369,8 @@ public class Plan {
}
/**
- * Indicates whether the service with this plan can be bound to applications. This
- * is an optional field. If the value is null, the field will be
- * omitted from the serialized JSON.
+ * Indicates whether the service with this plan can be bound to applications. This is an optional field. If the
+ * value is null, the field will be omitted from the serialized JSON.
*
* @param bindable true if the service with this plan may be bound
* @return the builder instance
@@ -401,8 +404,8 @@ public class Plan {
}
/**
- * A duration, in seconds, that the Platform SHOULD use as the Service's maximum polling duration. If the
- * value is null, the field will be omitted from the serialized JSON.
+ * A duration, in seconds, that the Platform SHOULD use as the Service's maximum polling duration. If the value
+ * is null, the field will be omitted from the serialized JSON.
*
* @param maximumPollingDuration the maximum polling duration
* @return the builder instance
@@ -433,5 +436,7 @@ public class Plan {
return new Plan(id, name, description, metadata, free, bindable,
planUpdateable, schemas, maximumPollingDuration, maintenanceInfo);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Schemas.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Schemas.java
index aa7e7efb..f1485195 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Schemas.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Schemas.java
@@ -24,12 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* JSON Schemas available for a Plan.
*
- * @see Open
- * Service Broker API specification
- *
* @author sgunaratne@pivotal.io
* @author Sam Gunaratne
+ * @see Open Service
+ * Broker API specification
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Schemas {
@@ -115,8 +113,10 @@ public class Schemas {
/**
* Provides a fluent API for constructing a {@literal Schemas}.
*/
- public static class SchemasBuilder {
+ public static final class SchemasBuilder {
+
private ServiceInstanceSchema serviceInstanceSchema;
+
private ServiceBindingSchema serviceBindingSchema;
private SchemasBuilder() {
@@ -152,5 +152,7 @@ public class Schemas {
public Schemas build() {
return new Schemas(serviceInstanceSchema, serviceBindingSchema);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceBindingSchema.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceBindingSchema.java
index 9af71dd4..1c466f74 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceBindingSchema.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceBindingSchema.java
@@ -24,12 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Service binding JSON Schemas.
*
- * @see Open
- * Service Broker API specification
- *
* @author sgunaratne@pivotal.io
* @author Sam Gunaratne
+ * @see Open
+ * Service Broker API specification
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ServiceBindingSchema {
@@ -98,7 +96,8 @@ public class ServiceBindingSchema {
/**
* Provides a fluent API for constructing a {@literal ServiceBindingSchema}.
*/
- public static class ServiceBindingSchemaBuilder {
+ public static final class ServiceBindingSchemaBuilder {
+
private MethodSchema createMethodSchema;
private ServiceBindingSchemaBuilder() {
@@ -123,5 +122,7 @@ public class ServiceBindingSchema {
public ServiceBindingSchema build() {
return new ServiceBindingSchema(createMethodSchema);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java
index af43b522..029a2619 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java
@@ -16,7 +16,6 @@
package org.springframework.cloud.servicebroker.model.catalog;
-import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -26,6 +25,8 @@ import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
@@ -35,12 +36,10 @@ import org.springframework.util.CollectionUtils;
/**
* A service offered by this broker.
*
- * @see Open
- * Service Broker API specification
- *
* @author sgreenberg@pivotal.io
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -102,9 +101,9 @@ public class ServiceDefinition {
* @param dashboardClient the service dashboard URI
*/
public ServiceDefinition(String id, String name, String description, boolean bindable, Boolean planUpdateable,
- Boolean instancesRetrievable, Boolean bindingsRetrievable, Boolean allowContextUpdates,
- List plans, List tags, Map metadata, List requires,
- DashboardClient dashboardClient) {
+ Boolean instancesRetrievable, Boolean bindingsRetrievable, Boolean allowContextUpdates,
+ List plans, List tags, Map metadata, List requires,
+ DashboardClient dashboardClient) {
this.id = id;
this.name = name;
this.description = description;
@@ -121,8 +120,8 @@ public class ServiceDefinition {
}
/**
- * An identifier used to correlate this service in future requests to the catalog.
- * This must be unique within the platform. Using a GUID is recommended.
+ * An identifier used to correlate this service in future requests to the catalog. This must be unique within the
+ * platform. Using a GUID is recommended.
*
* @return the service ID
*/
@@ -131,8 +130,8 @@ public class ServiceDefinition {
}
/**
- * A CLI-friendly name of the service that will appear in the catalog. The value
- * should be all lowercase, with no spaces.
+ * A CLI-friendly name of the service that will appear in the catalog. The value should be all lowercase, with no
+ * spaces.
*
* @return the service name
*/
@@ -159,8 +158,8 @@ public class ServiceDefinition {
}
/**
- * Indicates whether the service supports requests to update instances to use a
- * different plan from the one used to provision a service instance.
+ * Indicates whether the service supports requests to update instances to use a different plan from the one used to
+ * provision a service instance.
*
* @return true if the plan may be updated
*/
@@ -187,8 +186,8 @@ public class ServiceDefinition {
}
/**
- * Indicates whether a service instance supports update requests when contextual data for the service instance
- * in the platform changes.
+ * Indicates whether a service instance supports update requests when contextual data for the service instance in
+ * the platform changes.
*
* @return true if the service instances supports context updates
*/
@@ -206,8 +205,7 @@ public class ServiceDefinition {
}
/**
- * A list of tags to aid in categorizing and classifying services with similar
- * characteristics.
+ * A list of tags to aid in categorizing and classifying services with similar characteristics.
*
* @return the tags
*/
@@ -225,10 +223,10 @@ public class ServiceDefinition {
}
/**
- * A list of permissions that the user would have to give the service, if they
- * provision it. See {@link ServiceDefinitionRequires} for supported permissions.
+ * A list of permissions that the user would have to give the service, if they provision it.
*
* @return the required permissions
+ * @see ServiceDefinitionRequires supported permissions
*/
public List getRequires() {
return this.requires;
@@ -305,27 +303,40 @@ public class ServiceDefinition {
/**
* Provides a fluent API for constructing a {@literal ServiceDefinition}.
*/
- public static class ServiceDefinitionBuilder {
+ public static final class ServiceDefinitionBuilder {
+
private String id;
+
private String name;
+
private String description;
+
private boolean bindable;
+
private Boolean planUpdateable;
+
private Boolean instancesRetrievable;
+
private Boolean bindingsRetrievable;
+
private Boolean allowContextUpdates;
+
private final List plans = new ArrayList<>();
+
private List tags;
+
private Map metadata;
+
private List requires;
+
private DashboardClient dashboardClient;
private ServiceDefinitionBuilder() {
}
/**
- * An identifier used to correlate this service in future requests to the catalog.
- * This must be unique within the platform. Using a GUID is recommended.
+ * An identifier used to correlate this service in future requests to the catalog. This must be unique within
+ * the platform. Using a GUID is recommended.
*
* @param id the service ID
* @return the binder instance
@@ -336,8 +347,8 @@ public class ServiceDefinition {
}
/**
- * A CLI-friendly name of the service that will appear in the catalog. The value
- * should be all lowercase, with no spaces.
+ * A CLI-friendly name of the service that will appear in the catalog. The value should be all lowercase, with
+ * no spaces.
*
* @param name the service name
* @return the binder instance
@@ -370,8 +381,8 @@ public class ServiceDefinition {
}
/**
- * Indicates whether the service supports requests to update instances to use a
- * different plan from the one used to provision a service instance.
+ * Indicates whether the service supports requests to update instances to use a different plan from the one used
+ * to provision a service instance.
*
* @param planUpdateable true if the plan may be updated
* @return the binder instance
@@ -437,8 +448,7 @@ public class ServiceDefinition {
}
/**
- * A list of tags to aid in categorizing and classifying services with similar
- * characteristics.
+ * A list of tags to aid in categorizing and classifying services with similar characteristics.
*
* @param tags the tags
* @return the binder instance
@@ -452,8 +462,7 @@ public class ServiceDefinition {
}
/**
- * A list of tags to aid in categorizing and classifying services with similar
- * characteristics.
+ * A list of tags to aid in categorizing and classifying services with similar characteristics.
*
* @param tags the tags
* @return the binder instance
@@ -498,11 +507,11 @@ public class ServiceDefinition {
}
/**
- * A list of permissions that the user would have to give the service, if they
- * provision it. See {@link ServiceDefinitionRequires} for supported permissions.
+ * A list of permissions that the user would have to give the service, if they provision it.
*
* @param requires the required permissions
* @return the binder instance
+ * @see ServiceDefinitionRequires supported permissions
*/
public ServiceDefinitionBuilder requires(String... requires) {
if (this.requires == null) {
@@ -513,11 +522,11 @@ public class ServiceDefinition {
}
/**
- * A list of permissions that the user would have to give the service, if they
- * provision it. See {@link ServiceDefinitionRequires} for supported permissions.
+ * A list of permissions that the user would have to give the service, if they provision it.
*
* @param requires the required permissions
* @return the binder instance
+ * @see ServiceDefinitionRequires supported permissions
*/
public ServiceDefinitionBuilder requires(List requires) {
if (this.requires == null) {
@@ -528,11 +537,11 @@ public class ServiceDefinition {
}
/**
- * A list of permissions that the user would have to give the service, if they
- * provision it. See {@link ServiceDefinitionRequires} for supported permissions.
+ * A list of permissions that the user would have to give the service, if they provision it.
*
* @param requires the required permissions
* @return the binder instance
+ * @see ServiceDefinitionRequires supported permissions
*/
public ServiceDefinitionBuilder requires(ServiceDefinitionRequires... requires) {
if (this.requires == null) {
@@ -565,5 +574,7 @@ public class ServiceDefinition {
instancesRetrievable, bindingsRetrievable, allowContextUpdates,
plans, tags, metadata, requires, dashboardClient);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionRequires.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionRequires.java
index d9a1a0d8..0110c825 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionRequires.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionRequires.java
@@ -21,23 +21,22 @@ package org.springframework.cloud.servicebroker.model.catalog;
*/
public enum ServiceDefinitionRequires {
/**
- * Indicates that the service broker allows the platform to stream logs from bound applications to a
- * service instance. If this permission is provided in a service definition, the broker should provide a
- * non-null value in the CreateServiceInstanceBindingResponse.syslogDrainUrl field in response
- * to a bind request.
+ * Indicates that the service broker allows the platform to stream logs from bound applications to a service
+ * instance. If this permission is provided in a service definition, the broker should provide a non-null value in
+ * the CreateServiceInstanceBindingResponse.syslogDrainUrl field in response to a bind request.
*/
SERVICE_REQUIRES_SYSLOG_DRAIN("syslog_drain"),
/**
- * Indicates that the service broker allows the platform to bind routes to a service instance. If this permission
- * is provided in a service definition, the broker may receive bind requests with a route value in
- * the bindResource field of a CreateServiceInstanceBindingRequest.
+ * Indicates that the service broker allows the platform to bind routes to a service instance. If this permission is
+ * provided in a service definition, the broker may receive bind requests with a route value in the
+ * bindResource field of a CreateServiceInstanceBindingRequest.
*/
SERVICE_REQUIRES_ROUTE_FORWARDING("route_forwarding"),
/**
- * Indicates that the service broker allows the platform to bind volume mounts to an application. If this
- * permission is provided in a service definition, the broker should provide a non-null value in the
+ * Indicates that the service broker allows the platform to bind volume mounts to an application. If this permission
+ * is provided in a service definition, the broker should provide a non-null value in the
* CreateServiceInstanceVolumeBindingResponse.volumeMounts field in response
* to a bind request.
*/
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceInstanceSchema.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceInstanceSchema.java
index a14eaa37..3f2e3445 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceInstanceSchema.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceInstanceSchema.java
@@ -24,11 +24,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Service instance JSON Schemas.
*
- * @see Open
- * Service Broker API specification
- *
* @author Sam Gunaratne
+ * @see Open
+ * Service Broker API specification
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ServiceInstanceSchema {
@@ -48,6 +46,7 @@ public class ServiceInstanceSchema {
/**
* Construct a new {@link ServiceInstanceSchema}
+ *
* @param createMethodSchema the schema
* @param updateMethodSchema the schema
*/
@@ -113,8 +112,10 @@ public class ServiceInstanceSchema {
/**
* Provides a fluent API for constructing a {@literal ServiceInstanceSchema}.
*/
- public static class ServiceInstanceSchemaBuilder {
+ public static final class ServiceInstanceSchemaBuilder {
+
private MethodSchema createMethodSchema;
+
private MethodSchema updateMethodSchema;
private ServiceInstanceSchemaBuilder() {
@@ -150,5 +151,7 @@ public class ServiceInstanceSchema {
public ServiceInstanceSchema build() {
return new ServiceInstanceSchema(createMethodSchema, updateMethodSchema);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/package-info.java
index 4b6f9a3f..e9ec3b1b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/package-info.java
@@ -17,4 +17,4 @@
/**
* Catalog models
*/
-package org.springframework.cloud.servicebroker.model.catalog;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model.catalog;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/ErrorMessage.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/ErrorMessage.java
index 725cce44..162528b4 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/ErrorMessage.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/ErrorMessage.java
@@ -22,12 +22,12 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Details of an error reported to the platform from a service broker.
- *
- * @see Open Service Broker API specification
+ * Details of an error reported to the platform from a service broker.
*
* @author sgreenberg@pivotal.io
* @author Scott Frederick
+ * @see Open
+ * Service Broker API specification
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ErrorMessage {
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/package-info.java
index 20d4bd88..994e599b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/error/package-info.java
@@ -17,4 +17,4 @@
/**
* Error models
*/
-package org.springframework.cloud.servicebroker.model.error;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model.error;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequest.java
index e9d425a9..c538ceee 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequest.java
@@ -21,6 +21,7 @@ import java.util.Map;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonInclude;
+
import org.springframework.cloud.servicebroker.model.AsyncServiceBrokerRequest;
import org.springframework.cloud.servicebroker.model.Context;
import org.springframework.cloud.servicebroker.model.util.ParameterBeanMapperUtils;
@@ -56,8 +57,8 @@ public abstract class AsyncParameterizedServiceInstanceRequest extends AsyncServ
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
protected AsyncParameterizedServiceInstanceRequest(Map parameters, Context context,
- boolean asyncAccepted, String platformInstanceId,
- String apiInfoLocation, Context originatingIdentity) {
+ boolean asyncAccepted, String platformInstanceId,
+ String apiInfoLocation, Context originatingIdentity) {
super(asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity);
if (!CollectionUtils.isEmpty(parameters)) {
this.parameters.putAll(parameters);
@@ -89,8 +90,8 @@ public abstract class AsyncParameterizedServiceInstanceRequest extends AsyncServ
* This value is set from the {@literal parameters} field in the body of the request from the platform.
*
*
- * An object of the specified type will be instantiated, and value from the parameters JSON will be mapped
- * to the object using Java Bean mapping rules.
+ * An object of the specified type will be instantiated, and value from the parameters JSON will be mapped to the
+ * object using Java Bean mapping rules.
*
*
* The platform will pass the user-supplied JSON structure to the service broker as-is. The service broker is
@@ -151,4 +152,5 @@ public abstract class AsyncParameterizedServiceInstanceRequest extends AsyncServ
", context=" + context +
'}';
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java
index d6cda483..bb0f50b5 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java
@@ -16,11 +16,12 @@
package org.springframework.cloud.servicebroker.model.instance;
-import javax.validation.constraints.NotEmpty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -34,13 +35,13 @@ import org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition;
* Details of a request to create a new service instance.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author sgreenberg@pivotal.io
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"})
public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInstanceRequest {
@@ -54,13 +55,13 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
private final String planId;
/**
- * remains in the model for marshalling support but test harnesses should not use
+ * remains in the model for marshalling support but test harnesses should not use
*/
@Deprecated
private final String organizationGuid;
/**
- * remains in the model for marshalling support but test harnesses should not use
+ * remains in the model for marshalling support but test harnesses should not use
*/
@Deprecated
private final String spaceGuid;
@@ -71,7 +72,7 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
@JsonIgnore /*internal field*/
private transient ServiceDefinition serviceDefinition;
- @JsonIgnore /*internal field*/
+ @JsonIgnore /*internal field*/
private transient Plan plan;
/**
@@ -97,18 +98,18 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public CreateServiceInstanceRequest(String serviceDefinitionId, String serviceInstanceId, String planId,
- ServiceDefinition serviceDefinition, Plan plan,
- Map parameters, Context context, boolean asyncAccepted,
- String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
+ ServiceDefinition serviceDefinition, Plan plan,
+ Map parameters, Context context, boolean asyncAccepted,
+ String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
this(serviceDefinitionId, serviceInstanceId, planId, serviceDefinition, plan, parameters, context,
asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity, null, null);
}
private CreateServiceInstanceRequest(String serviceDefinitionId, String serviceInstanceId, String planId,
- ServiceDefinition serviceDefinition, Plan plan,
- Map parameters, Context context, boolean asyncAccepted,
- String platformInstanceId, String apiInfoLocation,
- Context originatingIdentity, String organizationGuid, String spaceGuid) {
+ ServiceDefinition serviceDefinition, Plan plan,
+ Map parameters, Context context, boolean asyncAccepted,
+ String platformInstanceId, String apiInfoLocation,
+ Context originatingIdentity, String organizationGuid, String spaceGuid) {
super(parameters, context, asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceDefinitionId = serviceDefinitionId;
this.serviceInstanceId = serviceInstanceId;
@@ -133,8 +134,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceInstanceId the service instance ID to create
*/
@@ -156,9 +157,9 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Get the ID of the plan for to the service instance to create. This will match one of the plan IDs provided
- * in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified
- * {@link ServiceDefinition}.
+ * Get the ID of the plan for to the service instance to create. This will match one of the plan IDs provided in the
+ * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified {@link
+ * ServiceDefinition}.
*
*
* This value is set from the {@literal plan_id} field in the body of the request from the platform.
@@ -241,8 +242,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Get the service definition of the service to create.
*
*
- * The service definition is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The service definition is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}
+ * as a convenience.
*
* @return the service definition
*/
@@ -251,8 +252,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceDefinition the service definition of the service to create
*/
@@ -264,8 +265,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Get the plan of the service to create
*
*
- * The plan is retreved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The plan is retreved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a
+ * convenience.
*
* @return the plan
*/
@@ -286,8 +287,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Create a builder that provides a fluent API for constructing a {@literal CreateServiceInstanceRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -346,17 +347,28 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceRequest}.
*/
- public static class CreateServiceInstanceRequestBuilder {
+ public static final class CreateServiceInstanceRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private String planId;
+
private ServiceDefinition serviceDefinition;
+
private Plan plan;
+
private Context context;
+
private final Map parameters = new HashMap<>();
+
private boolean asyncAccepted;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private CreateServiceInstanceRequestBuilder() {
@@ -423,8 +435,8 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Add a set of parameters from the provided {@literal Map} to the request parameters
- * as would be provided in the request from the platform.
+ * Add a set of parameters from the provided {@literal Map} to the request parameters as would be provided in
+ * the request from the platform.
*
* @param parameters the parameters to add
* @return the builder
@@ -477,7 +489,7 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
*
* @param platformInstanceId the platform instance ID
* @return the builder
- * @see #getPlatformInstanceId()
+ * @see #getPlatformInstanceId()
*/
public CreateServiceInstanceRequestBuilder platformInstanceId(String platformInstanceId) {
this.platformInstanceId = platformInstanceId;
@@ -518,5 +530,7 @@ public class CreateServiceInstanceRequest extends AsyncParameterizedServiceInsta
serviceDefinition, plan, parameters, context, asyncAccepted,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java
index 3f2fb22f..456aeb02 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java
@@ -29,12 +29,12 @@ import org.springframework.cloud.servicebroker.model.AsyncServiceBrokerResponse;
* Details of a response to a request to create a new service instance.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
@@ -61,7 +61,7 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
* @param instanceExisted true if the instance exists
*/
public CreateServiceInstanceResponse(boolean async, String operation, String dashboardUrl,
- boolean instanceExisted) {
+ boolean instanceExisted) {
super(async, operation);
this.dashboardUrl = dashboardUrl;
this.instanceExisted = instanceExisted;
@@ -134,18 +134,22 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
/**
* Provides a fluent API for constructing a {@link CreateServiceInstanceResponse}.
*/
- public static class CreateServiceInstanceResponseBuilder {
+ public static final class CreateServiceInstanceResponseBuilder {
+
private String dashboardUrl;
+
private boolean instanceExisted;
+
private boolean async;
+
private String operation;
private CreateServiceInstanceResponseBuilder() {
}
/**
- * Set the URL of a web-based management user interface provided by the service broker for the service
- * instance. Can be {@literal null} to indicate that a management dashboard is not provided.
+ * Set the URL of a web-based management user interface provided by the service broker for the service instance.
+ * Can be {@literal null} to indicate that a management dashboard is not provided.
*
*
* This value will set the {@literal dashboard_url} field in the body of the response to the platform.
@@ -164,14 +168,13 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
* were created by the service broker, false indicates that new resources were created.
*
*
- * This value will be used to determine the HTTP response code to the platform. If the service broker
- * indicates that it performed the operation synchronously, a {@literal true} value will result in a
- * response code {@literal 200 OK}, and a {@literal false} value will result in a response code
- * {@literal 201 CREATED}.
+ * This value will be used to determine the HTTP response code to the platform. If the service broker indicates
+ * that it performed the operation synchronously, a {@literal true} value will result in a response code
+ * {@literal 200 OK}, and a {@literal false} value will result in a response code {@literal 201 CREATED}.
*
* @param instanceExisted {@literal true} to indicate that the instance exists, {@literal false} otherwise
* @return the builder
- * @see #async(boolean)
+ * @see #async(boolean)
*/
public CreateServiceInstanceResponseBuilder instanceExisted(boolean instanceExisted) {
this.instanceExisted = instanceExisted;
@@ -183,12 +186,12 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be
- * determined by the value of {@link #instanceExisted(boolean)}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}; otherwise the response code will be determined by the
+ * value of {@link #instanceExisted(boolean)}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
* @see #instanceExisted(boolean)
*/
@@ -198,8 +201,8 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
* requests.
*
*
@@ -221,5 +224,7 @@ public class CreateServiceInstanceResponse extends AsyncServiceBrokerResponse {
public CreateServiceInstanceResponse build() {
return new CreateServiceInstanceResponse(async, operation, dashboardUrl, instanceExisted);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java
index 6704968b..a5f40fe5 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java
@@ -30,13 +30,13 @@ import org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition;
* Details of a request to delete a service instance.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author krujos
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
@@ -69,9 +69,9 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public DeleteServiceInstanceRequest(String serviceInstanceId, String serviceDefinitionId,
- String planId, ServiceDefinition serviceDefinition, Plan plan,
- boolean asyncAccepted, String platformInstanceId,
- String apiInfoLocation, Context originatingIdentity) {
+ String planId, ServiceDefinition serviceDefinition, Plan plan,
+ boolean asyncAccepted, String platformInstanceId,
+ String apiInfoLocation, Context originatingIdentity) {
super(asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.serviceDefinitionId = serviceDefinitionId;
@@ -107,9 +107,9 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
}
/**
- * Get the ID of the plan for to the service instance to delete. This will match one of the plan IDs provided
- * in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified
- * {@link ServiceDefinition}.
+ * Get the ID of the plan for to the service instance to delete. This will match one of the plan IDs provided in the
+ * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified {@link
+ * ServiceDefinition}.
*
*
* This value is set from the {@literal plan_id} request parameter of the request from the platform.
@@ -124,8 +124,8 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
* Get the service definition of the service to delete.
*
*
- * The service definition is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The service definition is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}
+ * as a convenience.
*
* @return the service definition
*/
@@ -133,7 +133,8 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
return this.serviceDefinition;
}
- @JsonProperty(ASYNC_REQUEST_PARAMETER) //in base class field is excluded, as other requests are passing this as query params
+ @JsonProperty(ASYNC_REQUEST_PARAMETER)
+ //in base class field is excluded, as other requests are passing this as query params
@Override
public boolean isAsyncAccepted() {
return super.isAsyncAccepted();
@@ -143,8 +144,8 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
* Get the plan for the service definition to delete
*
*
- * The plan is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The plan is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a
+ * convenience.
*
* @return the plan
*/
@@ -156,8 +157,8 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
* Create a builder that provides a fluent API for constructing a {@literal DeleteServiceInstanceRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -209,15 +210,24 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
/**
* Provides a fluent API for constructing a {@link DeleteServiceInstanceRequest}.
*/
- public static class DeleteServiceInstanceRequestBuilder {
+ public static final class DeleteServiceInstanceRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private ServiceDefinition serviceDefinition;
+
private Plan plan;
+
private String planId;
+
private boolean asyncAccepted;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private DeleteServiceInstanceRequestBuilder() {
@@ -284,8 +294,8 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
}
/**
- * Set the value of the flag indicating whether the platform supports asynchronous operations
- * as would be provided in the request from the platform.
+ * Set the value of the flag indicating whether the platform supports asynchronous operations as would be
+ * provided in the request from the platform.
*
* @param asyncAccepted the boolean value of the flag
* @return the builder
@@ -342,6 +352,7 @@ public class DeleteServiceInstanceRequest extends AsyncServiceBrokerRequest {
serviceDefinition, plan, asyncAccepted,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponse.java
index 669d123f..4327782a 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponse.java
@@ -22,12 +22,12 @@ import org.springframework.cloud.servicebroker.model.AsyncServiceBrokerResponse;
* Details of a response to a request to delete a service instance.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
public class DeleteServiceInstanceResponse extends AsyncServiceBrokerResponse {
@@ -67,8 +67,10 @@ public class DeleteServiceInstanceResponse extends AsyncServiceBrokerResponse {
/**
* Provides a fluent API for constructing a {@link DeleteServiceInstanceResponse}.
*/
- public static class DeleteServiceInstanceResponseBuilder {
+ public static final class DeleteServiceInstanceResponseBuilder {
+
private boolean async;
+
private String operation;
private DeleteServiceInstanceResponseBuilder() {
@@ -79,12 +81,12 @@ public class DeleteServiceInstanceResponse extends AsyncServiceBrokerResponse {
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result
- * in a response code {@literal 200 OK}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result in a response
+ * code {@literal 200 OK}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
*/
public DeleteServiceInstanceResponseBuilder async(boolean async) {
@@ -93,8 +95,8 @@ public class DeleteServiceInstanceResponse extends AsyncServiceBrokerResponse {
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
* requests.
*
*
@@ -116,5 +118,7 @@ public class DeleteServiceInstanceResponse extends AsyncServiceBrokerResponse {
public DeleteServiceInstanceResponse build() {
return new DeleteServiceInstanceResponse(async, operation);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java
index 3edd6441..aa842cf1 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java
@@ -25,14 +25,15 @@ import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest;
* Details of a request to get the state of the last operation on a service instance.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
+
private transient final String serviceInstanceId;
private transient final String serviceDefinitionId;
@@ -53,9 +54,9 @@ public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public GetLastServiceOperationRequest(String serviceInstanceId, String serviceDefinitionId, String planId,
- String operation,
- String platformInstanceId, String apiInfoLocation,
- Context originatingIdentity) {
+ String operation,
+ String platformInstanceId, String apiInfoLocation,
+ Context originatingIdentity) {
super(platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
this.serviceDefinitionId = serviceDefinitionId;
@@ -101,9 +102,9 @@ public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
/**
* Get the value of the {@literal operation} field previously provided to the platform.
- *
- * Service brokers can optionally return an {@literal operation} value to the platform in the response from an
- * async create, update, or delete request. The platform will pass this value back to the broker if provided.
+ *
+ * Service brokers can optionally return an {@literal operation} value to the platform in the response from an async
+ * create, update, or delete request. The platform will pass this value back to the broker if provided.
*
*
* This value is set from the {@literal operation} request parameter of the request from the platform.
@@ -118,8 +119,8 @@ public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
* Create a builder that provides a fluent API for constructing a {@literal GetLastServiceOperationRequestBuilder}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -169,13 +170,20 @@ public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
/**
* Provides a fluent API for constructing a {@link GetLastServiceOperationRequest}.
*/
- public static class GetLastServiceOperationRequestBuilder {
+ public static final class GetLastServiceOperationRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private String planId;
+
private String operation;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private GetLastServiceOperationRequestBuilder() {
@@ -274,6 +282,7 @@ public class GetLastServiceOperationRequest extends ServiceBrokerRequest {
operation,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java
index 00d595ce..52df383b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java
@@ -26,12 +26,12 @@ import com.fasterxml.jackson.annotation.JsonInclude;
* Details of a response to a request to get the state of the last operation on a service instance.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
- * @see Open Service Broker API specification
- *
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
@JsonAutoDetect
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -131,9 +131,12 @@ public class GetLastServiceOperationResponse {
/**
* Provides a fluent API for constructing a {@link GetLastServiceOperationResponse}.
*/
- public static class GetLastServiceOperationResponseBuilder {
+ public static final class GetLastServiceOperationResponseBuilder {
+
private OperationState state;
+
private String description;
+
private boolean deleteOperation;
private GetLastServiceOperationResponseBuilder() {
@@ -143,9 +146,9 @@ public class GetLastServiceOperationResponse {
* Set the current state of the asynchronous operation.
*
*
- * A value of {@link OperationState#IN_PROGRESS} will cause the platform to continue polling the service
- * broker for status. A value of {@link OperationState#SUCCEEDED} or {@link OperationState#FAILED} will
- * cause the platform to stop polling the service broker.
+ * A value of {@link OperationState#IN_PROGRESS} will cause the platform to continue polling the service broker
+ * for status. A value of {@link OperationState#SUCCEEDED} or {@link OperationState#FAILED} will cause the
+ * platform to stop polling the service broker.
*
*
* This value will set the {@literal state} field in the body of the response to the platform.
@@ -159,8 +162,8 @@ public class GetLastServiceOperationResponse {
}
/**
- * Set a user-facing description of the operation that the platform can display to the API client.
- * Can be {@literal null}.
+ * Set a user-facing description of the operation that the platform can display to the API client. Can be
+ * {@literal null}.
*
*
* This value will set the {@literal description} field in the body of the response to the platform.
@@ -174,15 +177,15 @@ public class GetLastServiceOperationResponse {
}
/**
- * Set a boolean value indicating whether the current asynchronous operation is a delete operation.
- * Should be set to true in response to a request for the status of an asynchronous
- * delete request, and false otherwise.
+ * Set a boolean value indicating whether the current asynchronous operation is a delete operation. Should be
+ * set to true in response to a request for the status of an asynchronous delete request, and
+ * false otherwise.
*
*
- * This value is used to determine the HTTP response code to the platform. If the
- * {@link #operationState(OperationState)} is {@link OperationState#SUCCEEDED} and the value provided
- * here is {@literal true} will result in a response code {@literal 410 GONE}. Otherwise the response
- * code will be {@literal 200 OK}.
+ * This value is used to determine the HTTP response code to the platform. If the {@link
+ * #operationState(OperationState)} is {@link OperationState#SUCCEEDED} and the value provided here is {@literal
+ * true} will result in a response code {@literal 410 GONE}. Otherwise the response code will be {@literal 200
+ * OK}.
*
* @param deleteOperation the boolean value
* @return the builder
@@ -200,5 +203,7 @@ public class GetLastServiceOperationResponse {
public GetLastServiceOperationResponse build() {
return new GetLastServiceOperationResponse(state, description, deleteOperation);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java
index 1a238db3..b1de4ad4 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java
@@ -25,12 +25,12 @@ import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest;
* Details of a request to retrieve a service instance.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author Scott Frederick
+ * @see Open Service Broker API
+ * specification
*/
public class GetServiceInstanceRequest extends ServiceBrokerRequest {
@@ -45,7 +45,7 @@ public class GetServiceInstanceRequest extends ServiceBrokerRequest {
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public GetServiceInstanceRequest(String serviceInstanceId, String platformInstanceId,
- String apiInfoLocation, Context originatingIdentity) {
+ String apiInfoLocation, Context originatingIdentity) {
super(platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceInstanceId = serviceInstanceId;
}
@@ -67,8 +67,8 @@ public class GetServiceInstanceRequest extends ServiceBrokerRequest {
* Create a builder that provides a fluent API for constructing a {@literal GetServiceInstanceRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -112,10 +112,14 @@ public class GetServiceInstanceRequest extends ServiceBrokerRequest {
/**
* Provides a fluent API for constructing a {@link GetServiceInstanceRequest}.
*/
- public static class GetServiceInstanceRequestBuilder {
+ public static final class GetServiceInstanceRequestBuilder {
+
private String serviceInstanceId;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private GetServiceInstanceRequestBuilder() {
@@ -178,6 +182,7 @@ public class GetServiceInstanceRequest extends ServiceBrokerRequest {
return new GetServiceInstanceRequest(serviceInstanceId,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java
index 4ac64217..a72848ff 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java
@@ -30,12 +30,12 @@ import com.fasterxml.jackson.databind.annotation.JsonNaming;
* Details of a response to a request to get the details a service instance.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
* @author Scott Frederick
+ * @see Open Service Broker API
+ * specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -43,7 +43,7 @@ public class GetServiceInstanceResponse {
@JsonProperty("service_id")
private final String serviceDefinitionId;
-
+
private final String planId;
private final String dashboardUrl;
@@ -66,7 +66,7 @@ public class GetServiceInstanceResponse {
* @param parameters the parameters
*/
public GetServiceInstanceResponse(String serviceDefinitionId, String planId, String dashboardUrl,
- Map parameters) {
+ Map parameters) {
this.serviceDefinitionId = serviceDefinitionId;
this.planId = planId;
this.dashboardUrl = dashboardUrl;
@@ -103,8 +103,8 @@ public class GetServiceInstanceResponse {
/**
* Get any parameters provided to the service broker when the service instance was created.
*
- * @return the parameters, or {@literal null} if parameters were not provided at creation or retrieval
- * of parameters is not supported by the service broker
+ * @return the parameters, or {@literal null} if parameters were not provided at creation or retrieval of parameters
+ * is not supported by the service broker
*/
public Map getParameters() {
return parameters;
@@ -163,10 +163,14 @@ public class GetServiceInstanceResponse {
/**
* Provides a fluent API for constructing a {@link GetServiceInstanceResponse}.
*/
- public static class GetServiceInstanceResponseBuilder {
+ public static final class GetServiceInstanceResponseBuilder {
+
private String serviceDefinitionId;
+
private String planId;
+
private String dashboardUrl;
+
private final Map parameters = new HashMap<>();
private GetServiceInstanceResponseBuilder() {
@@ -201,8 +205,8 @@ public class GetServiceInstanceResponse {
}
/**
- * Set the URL of a web-based management user interface provided by the service broker for the service
- * instance. Can be {@literal null} to indicate that a management dashboard is not provided.
+ * Set the URL of a web-based management user interface provided by the service broker for the service instance.
+ * Can be {@literal null} to indicate that a management dashboard is not provided.
*
*
* This value will set the {@literal dashboard_url} field in the body of the response to the platform.
@@ -216,8 +220,8 @@ public class GetServiceInstanceResponse {
}
/**
- * Add a set of parameters from the provided {@literal Map} to the parameters
- * as were provided to the service broker at service instance creation.
+ * Add a set of parameters from the provided {@literal Map} to the parameters as were provided to the service
+ * broker at service instance creation.
*
*
* This value will set the {@literal parameters} field in the body of the response to the platform
@@ -253,5 +257,7 @@ public class GetServiceInstanceResponse {
public GetServiceInstanceResponse build() {
return new GetServiceInstanceResponse(serviceDefinitionId, planId, dashboardUrl, parameters);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java
index 525c0be2..743fe1ec 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java
@@ -16,11 +16,12 @@
package org.springframework.cloud.servicebroker.model.instance;
-import javax.validation.constraints.NotEmpty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import javax.validation.constraints.NotEmpty;
+
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
@@ -34,12 +35,12 @@ import org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition;
* Details of a request to update a service instance.
*
*
- * Objects of this type are constructed by the framework from the headers, path variables, query parameters
- * and message body passed to the service broker by the platform.
- *
- * @see Open Service Broker API specification
+ * Objects of this type are constructed by the framework from the headers, path variables, query parameters and message
+ * body passed to the service broker by the platform.
*
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInstanceRequest {
@@ -84,10 +85,10 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* @param originatingIdentity identity of the user that initiated the request from the platform
*/
public UpdateServiceInstanceRequest(String serviceDefinitionId, String serviceInstanceId, String planId,
- ServiceDefinition serviceDefinition, Plan plan,
- PreviousValues previousValues, Map parameters,
- Context context, boolean asyncAccepted,
- String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
+ ServiceDefinition serviceDefinition, Plan plan,
+ PreviousValues previousValues, Map parameters,
+ Context context, boolean asyncAccepted,
+ String platformInstanceId, String apiInfoLocation, Context originatingIdentity) {
super(parameters, context, asyncAccepted, platformInstanceId, apiInfoLocation, originatingIdentity);
this.serviceDefinitionId = serviceDefinitionId;
this.serviceInstanceId = serviceInstanceId;
@@ -111,8 +112,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceInstanceId the service instance ID to update
*/
@@ -134,9 +135,9 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Get the ID of the plan for to the service instance to update. This will match one of the plan IDs provided
- * in the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified
- * {@link ServiceDefinition}.
+ * Get the ID of the plan for to the service instance to update. This will match one of the plan IDs provided in the
+ * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} within the specified {@link
+ * ServiceDefinition}.
*
*
* This value is set from the {@literal plan_id} field in the body of the request from the platform.
@@ -152,7 +153,7 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
*
*
* This value is set from the {@literal previous_values} field in the body of the request from the platform.
- *
+ *
* @return the prior service instance details
*/
public PreviousValues getPreviousValues() {
@@ -163,8 +164,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Get the service definition of the service instance to update.
*
*
- * The service definition is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The service definition is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog}
+ * as a convenience.
*
* @return the service definition
*/
@@ -173,8 +174,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * This method is intended to be used internally only; use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * This method is intended to be used internally only; use {@link #builder()} to construct an object of this type
+ * and set all field values.
*
* @param serviceDefinition the service definition of the service instance to update
*/
@@ -186,8 +187,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Get the plan of the service instance to update
*
*
- * The plan is retrieved from the
- * {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a convenience.
+ * The plan is retrieved from the {@link org.springframework.cloud.servicebroker.model.catalog.Catalog} as a
+ * convenience.
*
* @return the plan
*/
@@ -196,8 +197,7 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * For internal use only. Use {@link #builder()} to construct an object of this
- * type and set all field values.
+ * For internal use only. Use {@link #builder()} to construct an object of this type and set all field values.
*
* @param plan the plan of the service instance to update
*/
@@ -209,8 +209,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Create a builder that provides a fluent API for constructing an {@literal UpdateServiceInstanceRequest}.
*
*
- * This builder is provided to support testing of
- * {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService} implementations.
+ * This builder is provided to support testing of {@link org.springframework.cloud.servicebroker.service.ServiceInstanceService}
+ * implementations.
*
* @return the builder
*/
@@ -287,8 +287,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
* Get the ID of the plan prior to the update request.
*
*
- * This value is set from the {@literal plan_id} field in the {@literal previous_values} field in the
- * body of the request from the platform.
+ * This value is set from the {@literal plan_id} field in the {@literal previous_values} field in the body of
+ * the request from the platform.
*
* @return the plan ID
*/
@@ -319,23 +319,36 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
"planId='" + planId + '\'' +
'}';
}
+
}
/**
* Provides a fluent API for constructing a {@link UpdateServiceInstanceRequest}.
*/
- public static class UpdateServiceInstanceRequestBuilder {
+ public static final class UpdateServiceInstanceRequestBuilder {
+
private String serviceInstanceId;
+
private String serviceDefinitionId;
+
private String planId;
+
private ServiceDefinition serviceDefinition;
+
private Plan plan;
+
private PreviousValues previousValues;
+
private final Map parameters = new HashMap<>();
+
private Context context;
+
private boolean asyncAccepted;
+
private String platformInstanceId;
+
private String apiInfoLocation;
+
private Context originatingIdentity;
private UpdateServiceInstanceRequestBuilder() {
@@ -402,8 +415,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Set the previous values of the service instance details as would be
- * provided in the request from the platform.
+ * Set the previous values of the service instance details as would be provided in the request from the
+ * platform.
*
* @param previousValues the previous values
* @return the builder
@@ -415,8 +428,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Add a set of parameters from the provided {@literal Map} to the request parameters
- * as would be provided in the request from the platform.
+ * Add a set of parameters from the provided {@literal Map} to the request parameters as would be provided in
+ * the request from the platform.
*
* @param parameters the parameters to add
* @return the builder
@@ -453,8 +466,8 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
}
/**
- * Set the value of the flag indicating whether the platform supports asynchronous operations
- * as would be provided in the request from the platform.
+ * Set the value of the flag indicating whether the platform supports asynchronous operations as would be
+ * provided in the request from the platform.
*
* @param asyncAccepted the boolean value of the flag
* @return the builder
@@ -511,5 +524,7 @@ public class UpdateServiceInstanceRequest extends AsyncParameterizedServiceInsta
serviceDefinition, plan, previousValues, parameters, context, asyncAccepted,
platformInstanceId, apiInfoLocation, originatingIdentity);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java
index d53dc8d5..1ff5adc1 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java
@@ -28,12 +28,12 @@ import org.springframework.cloud.servicebroker.model.AsyncServiceBrokerResponse;
* Details of a response to a request to update a service instance.
*
*
- * Objects of this type are constructed by the service broker application,
- * and used to build the response to the platform.
+ * Objects of this type are constructed by the service broker application, and used to build the response to the
+ * platform.
*
- * @see Open Service Broker API specification
- *
* @author Scott Frederick
+ * @see Open Service
+ * Broker API specification
*/
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class UpdateServiceInstanceResponse extends AsyncServiceBrokerResponse {
@@ -115,17 +115,20 @@ public class UpdateServiceInstanceResponse extends AsyncServiceBrokerResponse {
/**
* Provides a fluent API for constructing an {@link UpdateServiceInstanceResponse}.
*/
- public static class UpdateServiceInstanceResponseBuilder {
+ public static final class UpdateServiceInstanceResponseBuilder {
+
private String dashboardUrl;
+
private boolean async;
+
private String operation;
private UpdateServiceInstanceResponseBuilder() {
}
/**
- * Set the URL of a web-based management user interface provided by the service broker for the service
- * instance. Can be {@literal null} to indicate that a management dashboard is not provided.
+ * Set the URL of a web-based management user interface provided by the service broker for the service instance.
+ * Can be {@literal null} to indicate that a management dashboard is not provided.
*
*
* This value will set the {@literal dashboard_url} field in the body of the response to the platform.
@@ -143,12 +146,12 @@ public class UpdateServiceInstanceResponse extends AsyncServiceBrokerResponse {
* asynchronously.
*
*
- * This value will be used to determine the HTTP response code to the platform. A {@literal true} value
- * will result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result
- * in a response code {@literal 200 OK}.
+ * This value will be used to determine the HTTP response code to the platform. A {@literal true} value will
+ * result in a response code {@literal 202 ACCEPTED}, and a {@literal false} value will result in a response
+ * code {@literal 200 OK}.
*
- * @param async {@literal true} to indicate that the operation is being performed asynchronously,
- * {@literal false} to indicate that the operation was completed
+ * @param async {@literal true} to indicate that the operation is being performed asynchronously, {@literal
+ * false} to indicate that the operation was completed
* @return the builder
*/
public UpdateServiceInstanceResponseBuilder async(boolean async) {
@@ -157,8 +160,8 @@ public class UpdateServiceInstanceResponse extends AsyncServiceBrokerResponse {
}
/**
- * Set a value to inform the user of the operation being performed in support of an asynchronous response.
- * This value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
+ * Set a value to inform the user of the operation being performed in support of an asynchronous response. This
+ * value will be passed back to the service broker in subsequent {@link GetLastServiceOperationRequest}
* requests.
*
*
@@ -180,5 +183,7 @@ public class UpdateServiceInstanceResponse extends AsyncServiceBrokerResponse {
public UpdateServiceInstanceResponse build() {
return new UpdateServiceInstanceResponse(async, operation, dashboardUrl);
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/package-info.java
index 62364566..9389864b 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/package-info.java
@@ -17,4 +17,4 @@
/**
* Service instance models
*/
-package org.springframework.cloud.servicebroker.model.instance;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model.instance;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/package-info.java
index 2cf77f35..6d58ed02 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/package-info.java
@@ -17,4 +17,4 @@
/**
* Models that describe the interaction with the Service Broker API
*/
-package org.springframework.cloud.servicebroker.model;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtils.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtils.java
index 36d6bca8..90c735b7 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtils.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtils.java
@@ -50,8 +50,10 @@ public final class ParameterBeanMapperUtils {
beanUtils.populate(bean, parameters);
return bean;
- } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
+ }
+ catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
throw new IllegalArgumentException("Error mapping parameters to class of type " + cls.getName(), e);
}
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/package-info.java
index 23d5e430..28b629e2 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/util/package-info.java
@@ -17,4 +17,4 @@
/**
* Model utilities
*/
-package org.springframework.cloud.servicebroker.model.util;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.model.util;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java
index f79e0f3f..82f19c48 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java
@@ -38,7 +38,7 @@ public interface CatalogService {
/**
* Get a service definition from the catalog by ID.
*
- * @param serviceId The ID of the service definition in the catalog
+ * @param serviceId The ID of the service definition in the catalog
* @return the service definition, or null if it doesn't exist
*/
Mono getServiceDefinition(String serviceId);
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventService.java
index 45d7bc3b..754071a6 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventService.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventService.java
@@ -29,8 +29,8 @@ import org.springframework.cloud.servicebroker.model.binding.GetServiceInstanceB
import org.springframework.cloud.servicebroker.service.events.EventFlowRegistries;
/**
- * Internal implementation of {@link ServiceInstanceBindingService} that attaches event
- * hooks to the requests to create and delete service instance bindings
+ * Internal implementation of {@link ServiceInstanceBindingService} that attaches event hooks to the requests to create
+ * and delete service instance bindings
*
* @author Roy Clarkson
*/
@@ -85,4 +85,5 @@ public class ServiceInstanceBindingEventService implements ServiceInstanceBindin
.flatMap(response -> flows.getDeleteInstanceBindingRegistry().getCompletionFlows(request, response)
.then(Mono.just(response)));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java
index 0e30e48e..7cb5a135 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java
@@ -49,15 +49,16 @@ public interface ServiceInstanceBindingService {
* @param request containing the details of the request
* @return a {@link CreateServiceInstanceBindingResponse} on successful processing of the request
* @throws ServiceInstanceBindingExistsException if a binding with the given ID is already known to the broker
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
- * @throws ServiceBrokerBindingRequiresAppException if the broker only supports application binding but an
- * app GUID is not provided in the request
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
+ * @throws ServiceBrokerBindingRequiresAppException if the broker only supports application binding but an app
+ * GUID is not provided in the request
* @throws ServiceBrokerCreateOperationInProgressException if a an operation is in progress for the service
- * binding
- *
+ * binding
*/
default Mono createServiceInstanceBinding(CreateServiceInstanceBindingRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support creating service bindings."));
+ return Mono.error(new UnsupportedOperationException(
+ "This service broker does not support creating service bindings."));
}
/**
@@ -65,14 +66,16 @@ public interface ServiceInstanceBindingService {
*
* @param request containing the details of the request
* @return a {@link GetServiceInstanceBindingResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceInstanceBindingDoesNotExistException if a binding with the given ID is not known to the broker
* @throws ServiceBrokerOperationInProgressException if a an operation is in progress for the service binding
*/
default Mono getServiceInstanceBinding(GetServiceInstanceBindingRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support retrieving service bindings. " +
- "The service broker should set 'bindings_retrievable:false' in the service catalog, " +
- "or provide an implementation of the fetch binding API."));
+ return Mono.error(new UnsupportedOperationException(
+ "This service broker does not support retrieving service bindings. " +
+ "The service broker should set 'bindings_retrievable:false' in the service catalog, " +
+ "or provide an implementation of the fetch binding API."));
}
/**
@@ -80,14 +83,16 @@ public interface ServiceInstanceBindingService {
*
* @param request containing the details of the request
* @return a {@link GetLastServiceBindingOperationResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceInstanceBindingDoesNotExistException if a binding with the given ID is not known to the broker
*/
default Mono getLastOperation(GetLastServiceBindingOperationRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support getting the status of " +
- "an asynchronous operation. " +
- "If the service broker returns '202 Accepted' in response to a bind or unbind request, " +
- "it must also provide an implementation of the get last operation API."));
+ return Mono
+ .error(new UnsupportedOperationException("This service broker does not support getting the status of " +
+ "an asynchronous operation. " +
+ "If the service broker returns '202 Accepted' in response to a bind or unbind request, " +
+ "it must also provide an implementation of the get last operation API."));
}
/**
@@ -95,11 +100,15 @@ public interface ServiceInstanceBindingService {
*
* @param request containing the details of the request
* @return a {@link DeleteServiceInstanceBindingResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceInstanceBindingDoesNotExistException if a binding with the given ID is not known to the broker
- * @throws ServiceBrokerDeleteOperationInProgressException if a an operation is in progress for the service binding
+ * @throws ServiceBrokerDeleteOperationInProgressException if a an operation is in progress for the service
+ * binding
*/
default Mono deleteServiceInstanceBinding(DeleteServiceInstanceBindingRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support deleting service bindings."));
+ return Mono.error(new UnsupportedOperationException(
+ "This service broker does not support deleting service bindings."));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventService.java
index ac355b67..a8c1fd28 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventService.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventService.java
@@ -31,8 +31,8 @@ import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInsta
import org.springframework.cloud.servicebroker.service.events.EventFlowRegistries;
/**
- * Internal implementation of {@link ServiceInstanceService} that attaches event hooks to
- * requests related to provisioning, updating, and deprovisioning service instances.
+ * Internal implementation of {@link ServiceInstanceService} that attaches event hooks to requests related to
+ * provisioning, updating, and deprovisioning service instances.
*
* @author Roy Clarkson
*/
@@ -49,7 +49,7 @@ public class ServiceInstanceEventService implements ServiceInstanceService {
* @param eventFlowRegistries the event flow registries
*/
public ServiceInstanceEventService(ServiceInstanceService serviceInstanceService,
- EventFlowRegistries eventFlowRegistries) {
+ EventFlowRegistries eventFlowRegistries) {
this.service = serviceInstanceService;
this.flows = eventFlowRegistries;
}
@@ -98,4 +98,5 @@ public class ServiceInstanceEventService implements ServiceInstanceService {
.flatMap(response -> flows.getUpdateInstanceRegistry().getCompletionFlows(request, response)
.then(Mono.just(response)));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java
index e1afaa8a..2184487f 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java
@@ -40,8 +40,8 @@ import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInsta
/**
- * This interface is implemented by service brokers to process requests related to provisioning, updating,
- * and deprovisioning service instances.
+ * This interface is implemented by service brokers to process requests related to provisioning, updating, and
+ * deprovisioning service instances.
*
* @author sgreenberg@pivotal.io
* @author Scott Frederick
@@ -57,7 +57,8 @@ public interface ServiceInstanceService {
* @throws ServiceInstanceExistsException if a service instance with the given ID is already known to the broker
* @throws ServiceBrokerAsyncRequiredException if the broker requires asynchronous processing of the request
* @throws ServiceBrokerInvalidParametersException if any parameters passed in the request are invalid
- * @throws ServiceBrokerCreateOperationInProgressException if a an operation is in progress for the service instance
+ * @throws ServiceBrokerCreateOperationInProgressException if a an operation is in progress for the service
+ * instance
*/
Mono createServiceInstance(CreateServiceInstanceRequest request);
@@ -66,13 +67,15 @@ public interface ServiceInstanceService {
*
* @param request containing the details of the request
* @return a {@link GetServiceInstanceResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceBrokerOperationInProgressException if a an operation is in progress for the service instance
*/
default Mono getServiceInstance(GetServiceInstanceRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support retrieving service instances. " +
- "The service broker should set 'instances_retrievable:false' in the service catalog, " +
- "or provide an implementation of the fetch instance API."));
+ return Mono.error(new UnsupportedOperationException(
+ "This service broker does not support retrieving service instances. " +
+ "The service broker should set 'instances_retrievable:false' in the service catalog, " +
+ "or provide an implementation of the fetch instance API."));
}
/**
@@ -80,13 +83,15 @@ public interface ServiceInstanceService {
*
* @param request containing the details of the request
* @return a {@link GetLastServiceOperationResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
*/
default Mono getLastOperation(GetLastServiceOperationRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support getting the status of " +
- "an asynchronous operation. " +
- "If the service broker returns '202 Accepted' in response to a provision, update, or deprovision" +
- "request, it must also provide an implementation of the get last operation API."));
+ return Mono
+ .error(new UnsupportedOperationException("This service broker does not support getting the status of " +
+ "an asynchronous operation. " +
+ "If the service broker returns '202 Accepted' in response to a provision, update, or deprovision" +
+ "request, it must also provide an implementation of the get last operation API."));
}
/**
@@ -94,9 +99,11 @@ public interface ServiceInstanceService {
*
* @param request containing the details of the request
* @return a {@link DeleteServiceInstanceResponse} on successful processing of the request
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceBrokerAsyncRequiredException if the broker requires asynchronous processing of the request
- * @throws ServiceBrokerDeleteOperationInProgressException if a an operation is in progress for the service binding
+ * @throws ServiceBrokerDeleteOperationInProgressException if a an operation is in progress for the service
+ * binding
*/
Mono deleteServiceInstance(DeleteServiceInstanceRequest request);
@@ -105,17 +112,20 @@ public interface ServiceInstanceService {
*
* @param request containing the details of the request
* @return an {@link UpdateServiceInstanceResponse} on successful processing of the request
- * @throws ServiceInstanceUpdateNotSupportedException if particular change is not supported
- * or if the request can not currently be fulfilled due to the state of the instance
- * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the broker
+ * @throws ServiceInstanceUpdateNotSupportedException if particular change is not supported or if the request can
+ * not currently be fulfilled due to the state of the instance
+ * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the
+ * broker
* @throws ServiceBrokerAsyncRequiredException if the broker requires asynchronous processing of the request
* @throws ServiceBrokerInvalidParametersException if any parameters passed in the request are invalid
- * @throws ServiceBrokerUpdateOperationInProgressException if a an operation is in progress for the service instance
+ * @throws ServiceBrokerUpdateOperationInProgressException if a an operation is in progress for the service
+ * instance
*/
default Mono updateServiceInstance(UpdateServiceInstanceRequest request) {
- return Mono.error(new UnsupportedOperationException("This service broker does not support updating service instances. " +
- "The service broker should set 'plan_updateable:false' in the service catalog, " +
- "or provide an implementation of the update instance API."));
+ return Mono.error(new UnsupportedOperationException(
+ "This service broker does not support updating service instances. " +
+ "The service broker should set 'plan_updateable:false' in the service catalog, " +
+ "or provide an implementation of the update instance API."));
}
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceBindingEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceBindingEventFlowRegistry.java
index 29b96d70..b20840b6 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceBindingEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceBindingEventFlowRegistry.java
@@ -32,48 +32,48 @@ import org.springframework.cloud.servicebroker.service.events.flows.AsyncOperati
* @author ilyavy
*/
public class AsyncOperationServiceInstanceBindingEventFlowRegistry
- extends EventFlowRegistry {
+ extends EventFlowRegistry {
- /**
- * Construct a new {@link AsyncOperationServiceInstanceBindingEventFlowRegistry}
- */
- @Deprecated
- public AsyncOperationServiceInstanceBindingEventFlowRegistry() {
- super();
- }
+ /**
+ * Construct a new {@link AsyncOperationServiceInstanceBindingEventFlowRegistry}
+ */
+ @Deprecated
+ public AsyncOperationServiceInstanceBindingEventFlowRegistry() {
+ super();
+ }
- /**
- *
- * @param initializationFlows the initialization flows
- * @param completionFlows the completion flows
- * @param errorFlows the error flows
- */
- public AsyncOperationServiceInstanceBindingEventFlowRegistry(
- final List initializationFlows,
- final List completionFlows,
- final List errorFlows) {
- super(initializationFlows, completionFlows, errorFlows);
- }
+ /**
+ * @param initializationFlows the initialization flows
+ * @param completionFlows the completion flows
+ * @param errorFlows the error flows
+ */
+ public AsyncOperationServiceInstanceBindingEventFlowRegistry(
+ final List initializationFlows,
+ final List completionFlows,
+ final List errorFlows) {
+ super(initializationFlows, completionFlows, errorFlows);
+ }
- @Override
- public Flux getInitializationFlows(GetLastServiceBindingOperationRequest request) {
- return getInitializationFlowsInternal()
- .flatMap(flow -> flow.initialize(request));
- }
+ @Override
+ public Flux getInitializationFlows(GetLastServiceBindingOperationRequest request) {
+ return getInitializationFlowsInternal()
+ .flatMap(flow -> flow.initialize(request));
+ }
- @Override
- public Flux getCompletionFlows(
- GetLastServiceBindingOperationRequest request, GetLastServiceBindingOperationResponse response) {
+ @Override
+ public Flux getCompletionFlows(
+ GetLastServiceBindingOperationRequest request, GetLastServiceBindingOperationResponse response) {
- return getCompletionFlowsInternal()
- .flatMap(flow -> flow.complete(request, response));
- }
+ return getCompletionFlowsInternal()
+ .flatMap(flow -> flow.complete(request, response));
+ }
+
+ @Override
+ public Flux getErrorFlows(GetLastServiceBindingOperationRequest request, Throwable t) {
+ return getErrorFlowsInternal()
+ .flatMap(flow -> flow.error(request, t));
+ }
- @Override
- public Flux getErrorFlows(GetLastServiceBindingOperationRequest request, Throwable t) {
- return getErrorFlowsInternal()
- .flatMap(flow -> flow.error(request, t));
- }
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceEventFlowRegistry.java
index 25eafcd5..0d74320c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/AsyncOperationServiceInstanceEventFlowRegistry.java
@@ -45,6 +45,7 @@ public class AsyncOperationServiceInstanceEventFlowRegistry extends EventFlowReg
/**
* Construct a new {@link AsyncOperationServiceInstanceEventFlowRegistry}
+ *
* @param initializationFlows the initialization flows
* @param completionFlows the completion flows
* @param errorFlows the error flows
@@ -73,4 +74,5 @@ public class AsyncOperationServiceInstanceEventFlowRegistry extends EventFlowReg
return getErrorFlowsInternal()
.flatMap(flow -> flow.error(request, t));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceBindingEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceBindingEventFlowRegistry.java
index d795350e..9707016d 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceBindingEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceBindingEventFlowRegistry.java
@@ -74,4 +74,5 @@ public class CreateServiceInstanceBindingEventFlowRegistry extends EventFlowRegi
return getErrorFlowsInternal()
.flatMap(flow -> flow.error(request, t));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceEventFlowRegistry.java
index a0cfee0d..23f6c047 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/CreateServiceInstanceEventFlowRegistry.java
@@ -74,4 +74,5 @@ public class CreateServiceInstanceEventFlowRegistry extends EventFlowRegistry flow.error(request, t));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/DeleteServiceInstanceEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/DeleteServiceInstanceEventFlowRegistry.java
index 0d713c67..e10e21f8 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/DeleteServiceInstanceEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/DeleteServiceInstanceEventFlowRegistry.java
@@ -74,4 +74,5 @@ public class DeleteServiceInstanceEventFlowRegistry extends EventFlowRegistry flow.error(request, t));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistries.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistries.java
index 3ed4487f..61a8ad07 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistries.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistries.java
@@ -35,7 +35,7 @@ public class EventFlowRegistries {
private final DeleteServiceInstanceBindingEventFlowRegistry deleteInstanceBindingRegistry;
- private final AsyncOperationServiceInstanceBindingEventFlowRegistry asyncOperationBindingRegistry;
+ private final AsyncOperationServiceInstanceBindingEventFlowRegistry asyncOperationBindingRegistry;
/**
* Construct a new {@link EventFlowRegistries}
@@ -63,12 +63,12 @@ public class EventFlowRegistries {
* @param asyncOperationBindingRegistry the instance binding last operation flow registry
*/
public EventFlowRegistries(CreateServiceInstanceEventFlowRegistry createInstanceRegistry,
- UpdateServiceInstanceEventFlowRegistry updateInstanceRegistry,
- DeleteServiceInstanceEventFlowRegistry deleteInstanceRegistry,
- AsyncOperationServiceInstanceEventFlowRegistry asyncOperationRegistry,
- CreateServiceInstanceBindingEventFlowRegistry createInstanceBindingRegistry,
- DeleteServiceInstanceBindingEventFlowRegistry deleteInstanceBindingRegistry,
- AsyncOperationServiceInstanceBindingEventFlowRegistry asyncOperationBindingRegistry) {
+ UpdateServiceInstanceEventFlowRegistry updateInstanceRegistry,
+ DeleteServiceInstanceEventFlowRegistry deleteInstanceRegistry,
+ AsyncOperationServiceInstanceEventFlowRegistry asyncOperationRegistry,
+ CreateServiceInstanceBindingEventFlowRegistry createInstanceBindingRegistry,
+ DeleteServiceInstanceBindingEventFlowRegistry deleteInstanceBindingRegistry,
+ AsyncOperationServiceInstanceBindingEventFlowRegistry asyncOperationBindingRegistry) {
this.createInstanceRegistry = createInstanceRegistry;
this.updateInstanceRegistry = updateInstanceRegistry;
this.deleteInstanceRegistry = deleteInstanceRegistry;
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistry.java
index ba9e4453..ba9428b9 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/EventFlowRegistry.java
@@ -26,12 +26,12 @@ import reactor.core.publisher.Mono;
/**
* Abstract class for defining an event flow registry
*
+ * @author Roy Clarkson
* @param type of initialization flow
* @param type of completion flow
* @param type of error flow
* @param type of request
* @param type of response
- * @author Roy Clarkson
*/
public abstract class EventFlowRegistry {
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/UpdateServiceInstanceEventFlowRegistry.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/UpdateServiceInstanceEventFlowRegistry.java
index b9f5e373..54e54fc1 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/UpdateServiceInstanceEventFlowRegistry.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/events/UpdateServiceInstanceEventFlowRegistry.java
@@ -74,4 +74,5 @@ public class UpdateServiceInstanceEventFlowRegistry extends EventFlowRegistry flow.error(request, t));
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/package-info.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/package-info.java
index 80990274..ba7b914c 100644
--- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/package-info.java
+++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/package-info.java
@@ -17,4 +17,4 @@
/**
* Service interfaces and default implementations
*/
-package org.springframework.cloud.servicebroker.service;
\ No newline at end of file
+package org.springframework.cloud.servicebroker.service;
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/JsonPathAssert.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/JsonPathAssert.java
index 4b722071..926c4824 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/JsonPathAssert.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/JsonPathAssert.java
@@ -79,4 +79,5 @@ public class JsonPathAssert extends AbstractAssert pathVariables = Collections.singletonMap("platformInstanceId", "platform-instance-id");
+ protected Map pathVariables = Collections
+ .singletonMap("platformInstanceId", "platform-instance-id");
@BeforeEach
public void setUpControllerRequestTest() {
initMocks(this);
plan = Plan.builder()
- .id("plan-id")
- .build();
+ .id("plan-id")
+ .build();
serviceDefinition = ServiceDefinition.builder()
.id("service-definition-id")
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandlerTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandlerTest.java
index f82e4182..11076af8 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandlerTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerExceptionHandlerTest.java
@@ -249,4 +249,4 @@ public abstract class ServiceBrokerExceptionHandlerTest {
assertThat(errorMessage.getMessage()).contains("app GUID is required");
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandlerTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandlerTest.java
index 6e6a1f67..ccfa01da 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandlerTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceBrokerWebMvcExceptionHandlerTest.java
@@ -72,4 +72,5 @@ public class ServiceBrokerWebMvcExceptionHandlerTest extends ServiceBrokerExcept
assertThat(errorMessage.getMessage()).contains(parameterType);
assertThat(errorMessage.getMessage()).contains(parameterName);
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerRequestTest.java
index 8664f8b5..fd980a5b 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerRequestTest.java
@@ -87,7 +87,6 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
}
-
private CreateServiceInstanceBindingRequestBuilder buildCreateRequest() {
return CreateServiceInstanceBindingRequest.builder()
.serviceDefinitionId(serviceDefinition.getId())
@@ -126,7 +125,7 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
.apiInfoLocation("api-info-location")
.originatingIdentity(identityContext)
.serviceDefinition(serviceDefinition)
- .plan(plan)
+ .plan(plan)
.build();
ServiceInstanceBindingController controller = createControllerUnderTest(expectedRequest);
@@ -141,7 +140,8 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
ServiceInstanceBindingController controller = createControllerUnderTest();
assertThrows(ServiceDefinitionDoesNotExistException.class, () ->
- controller.deleteServiceInstanceBinding(pathVariables, null, null, "unknown-service-definition-id", null,
+ controller
+ .deleteServiceInstanceBinding(pathVariables, null, null, "unknown-service-definition-id", null,
false, null, null).block());
}
@@ -150,8 +150,8 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
ServiceInstanceBindingController controller = createControllerUnderTest();
assertThrows(ServiceDefinitionPlanDoesNotExistException.class, () ->
- controller.deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id",
- "unknown-plan-id", false, null, null).block());
+ controller.deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id",
+ "unknown-plan-id", false, null, null).block());
}
private ServiceInstanceBindingController createControllerUnderTest(ServiceBrokerRequest expectedRequest) {
@@ -164,6 +164,7 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
private class VerifyingService implements ServiceInstanceBindingService {
+
private final ServiceBrokerRequest expectedRequest;
public VerifyingService(ServiceBrokerRequest expectedRequest) {
@@ -187,6 +188,7 @@ public class ServiceInstanceBindingControllerRequestTest extends ControllerReque
assertThat(request).isEqualTo(expectedRequest);
return Mono.empty();
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerResponseCodeTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerResponseCodeTest.java
index 5bd9798d..e8bf44c5 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerResponseCodeTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceBindingControllerResponseCodeTest.java
@@ -91,7 +91,7 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
}
private void validateCreateServiceBindingResponseStatus(CreateServiceInstanceBindingResponse response,
- HttpStatus httpStatus) {
+ HttpStatus httpStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -130,7 +130,7 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
}
private void validateGetServiceBindingResponseStatus(GetServiceInstanceBindingResponse response,
- HttpStatus httpStatus) {
+ HttpStatus httpStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -168,7 +168,8 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
.willThrow(new ServiceInstanceDoesNotExistException("nonexistent-service-id"));
ResponseEntity responseEntity = controller
- .getServiceInstanceBinding(pathVariables, "nonexistent-service-id", "nonexistent-binding-id", null, null)
+ .getServiceInstanceBinding(pathVariables, "nonexistent-service-id", "nonexistent-binding-id", null,
+ null)
.block();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
@@ -194,7 +195,7 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
}
private void validateDeleteServiceBindingWithResponseStatus(DeleteServiceInstanceBindingResponse response,
- HttpStatus expectedStatus) {
+ HttpStatus expectedStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -206,7 +207,8 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
.willReturn(responseMono);
ResponseEntity responseEntity = controller
- .deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id", "service-definition-plan-id", false, null, null)
+ .deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id",
+ "service-definition-plan-id", false, null, null)
.block();
assertThat(responseEntity).isNotNull();
@@ -224,7 +226,8 @@ public class ServiceInstanceBindingControllerResponseCodeTest {
.willThrow(new ServiceInstanceBindingDoesNotExistException("binding-id"));
ResponseEntity responseEntity = controller
- .deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id", "service-definition-plan-id", false, null, null)
+ .deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id",
+ "service-definition-plan-id", false, null, null)
.block();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.GONE);
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerRequestTest.java
index cc7a113b..99bf1cfc 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerRequestTest.java
@@ -82,9 +82,9 @@ public class ServiceInstanceControllerRequestTest extends ControllerRequestTest
ServiceInstanceController controller = createControllerUnderTest();
assertThrows(ServiceDefinitionDoesNotExistException.class, () ->
- controller.createServiceInstance(pathVariables, null, false,
- null, null, createRequest)
- .block());
+ controller.createServiceInstance(pathVariables, null, false,
+ null, null, createRequest)
+ .block());
}
@Test
@@ -248,6 +248,7 @@ public class ServiceInstanceControllerRequestTest extends ControllerRequestTest
}
private static class VerifyingService implements ServiceInstanceService {
+
private final ServiceBrokerRequest expectedRequest;
public VerifyingService(ServiceBrokerRequest expectedRequest) {
@@ -285,6 +286,7 @@ public class ServiceInstanceControllerRequestTest extends ControllerRequestTest
assertThat(request).isEqualTo(expectedRequest);
return Mono.empty();
}
+
}
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerResponseCodeTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerResponseCodeTest.java
index b22eefff..a4490a92 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerResponseCodeTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/controller/ServiceInstanceControllerResponseCodeTest.java
@@ -46,9 +46,9 @@ import org.springframework.http.ResponseEntity;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.BDDMockito.then;
import static org.mockito.BDDMockito.given;
+import static org.mockito.BDDMockito.then;
+import static org.mockito.Mockito.mock;
public class ServiceInstanceControllerResponseCodeTest {
@@ -111,7 +111,7 @@ public class ServiceInstanceControllerResponseCodeTest {
}
private void validateCreateServiceInstanceWithResponseStatus(CreateServiceInstanceResponse response,
- HttpStatus expectedStatus) {
+ HttpStatus expectedStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -204,7 +204,7 @@ public class ServiceInstanceControllerResponseCodeTest {
}
private void validateDeleteServiceInstanceWithResponseStatus(DeleteServiceInstanceResponse response,
- HttpStatus expectedStatus) {
+ HttpStatus expectedStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -258,7 +258,7 @@ public class ServiceInstanceControllerResponseCodeTest {
}
private void validateUpdateServiceInstanceWithResponseStatus(UpdateServiceInstanceResponse response,
- HttpStatus expectedStatus) {
+ HttpStatus expectedStatus) {
Mono responseMono;
if (response == null) {
responseMono = Mono.empty();
@@ -314,7 +314,7 @@ public class ServiceInstanceControllerResponseCodeTest {
}
private void validateGetLastOperationWithResponseStatus(GetLastServiceOperationResponse response,
- HttpStatus expectedStatus) {
+ HttpStatus expectedStatus) {
given(serviceInstanceService.getLastOperation(any(GetLastServiceOperationRequest.class)))
.willReturn(Mono.just(response));
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessageTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessageTest.java
index 9ff603ed..e68982d5 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessageTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionErrorMessageTest.java
@@ -25,18 +25,24 @@ public class ServiceBrokerApiVersionErrorMessageTest {
@Test
public void nulls() {
ServiceBrokerApiVersionErrorMessage message = ServiceBrokerApiVersionErrorMessage.from(null, null);
- assertThat(message.toString()).isEqualTo("The provided service broker API version is not supported: expected version=null, provided version=null");
+ assertThat(message.toString()).isEqualTo(
+ "The provided service broker API version is not supported: expected version=null, provided version=null");
}
@Test
public void message() {
- ServiceBrokerApiVersionErrorMessage message = ServiceBrokerApiVersionErrorMessage.from("expected-version", "actual-version");
- assertThat(message.toString()).isEqualTo("The provided service broker API version is not supported: expected version=expected-version, provided version=actual-version");
+ ServiceBrokerApiVersionErrorMessage message = ServiceBrokerApiVersionErrorMessage
+ .from("expected-version", "actual-version");
+ assertThat(message.toString()).isEqualTo(
+ "The provided service broker API version is not supported: expected version=expected-version, provided version=actual-version");
}
@Test
public void from() {
- ServiceBrokerApiVersionErrorMessage message = ServiceBrokerApiVersionErrorMessage.from("expected-version2", "actual-version2");
- assertThat(message.toString()).isEqualTo("The provided service broker API version is not supported: expected version=expected-version2, provided version=actual-version2");
+ ServiceBrokerApiVersionErrorMessage message = ServiceBrokerApiVersionErrorMessage
+ .from("expected-version2", "actual-version2");
+ assertThat(message.toString()).isEqualTo(
+ "The provided service broker API version is not supported: expected version=expected-version2, provided version=actual-version2");
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequestTest.java
index 809c27c0..8ca1bfeb 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerRequestTest.java
@@ -38,4 +38,5 @@ public class AsyncServiceBrokerRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponseTest.java
index e7532728..475d3944 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/AsyncServiceBrokerResponseTest.java
@@ -36,4 +36,5 @@ public class AsyncServiceBrokerResponseTest {
.withRedefinedSubclass(DeleteServiceInstanceBindingResponse.class)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/CloudFoundryContextTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/CloudFoundryContextTest.java
index f508e836..76af8629 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/CloudFoundryContextTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/CloudFoundryContextTest.java
@@ -100,7 +100,7 @@ public class CloudFoundryContextTest {
JsonPathAssert.assertThat(json).hasPath("$.platform").isEqualTo("cloudfoundry");
// detect any double serialization due to inheritance and naming mismatch
JsonPathAssert.assertThat(json).hasMapAtPath("$").hasSize(3);
- JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 3+1); //still have duplicated platform property
+ JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 3 + 1); //still have duplicated platform property
}
/**
@@ -126,7 +126,7 @@ public class CloudFoundryContextTest {
JsonPathAssert.assertThat(json).hasPath("$.platform").isEqualTo("cloudfoundry");
// detect any double serialization due to inheritance and naming mismatch
JsonPathAssert.assertThat(json).hasMapAtPath("$").hasSize(6);
- JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 6+1); //still have duplicated platform property
+ JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 6 + 1); //still have duplicated platform property
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ContextTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ContextTest.java
index 3fbe7fac..60be5497 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ContextTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ContextTest.java
@@ -27,4 +27,5 @@ public class ContextTest {
.forClass(Context.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/KubernetesContextTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/KubernetesContextTest.java
index 6249c836..ca660b61 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/KubernetesContextTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/KubernetesContextTest.java
@@ -61,13 +61,13 @@ public class KubernetesContextTest {
assertThat(context.getProperty("key1")).isEqualTo("value1");
assertThat(context.getProperty("key2")).isEqualTo("value2");
- //ensure we don't break super class contract
- assertThat(context.getProperties()).containsOnly(
- entry("key1", "value1"),
- entry("key2", "value2"),
- entry("namespace", "namespace"),
+ //ensure we don't break super class contract
+ assertThat(context.getProperties()).containsOnly(
+ entry("key1", "value1"),
+ entry("key2", "value2"),
+ entry("namespace", "namespace"),
entry("clusterid", "clusterid"));
- }
+ }
@Test
public void partialContextIsSerialized() {
@@ -85,7 +85,7 @@ public class KubernetesContextTest {
JsonPathAssert.assertThat(json).hasPath("$.key2").isEqualTo("value2");
// detect any double serialization due to inheritance and naming mismatch
JsonPathAssert.assertThat(json).hasMapAtPath("$").hasSize(4);
- JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 4+1);//still have duplicated platform property
+ JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 4 + 1);//still have duplicated platform property
}
@Test
@@ -106,7 +106,7 @@ public class KubernetesContextTest {
JsonPathAssert.assertThat(json).hasPath("$.key2").isEqualTo("value2");
// detect any double serialization due to inheritance and naming mismatch
JsonPathAssert.assertThat(json).hasMapAtPath("$").hasSize(5);
- JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 5+1);//still have duplicated platform property
+ JsonUtils.assertThatJsonHasExactNumberOfProperties(context, 5 + 1);//still have duplicated platform property
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/PlatformContextTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/PlatformContextTest.java
index 8249909f..c558ec71 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/PlatformContextTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/PlatformContextTest.java
@@ -56,4 +56,5 @@ public class PlatformContextTest {
assertThat(context.getProperty("property3")).isEqualTo("value3");
assertThat(context.getProperty("property4")).isEqualTo(true);
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequestTest.java
index e7c78d89..4a337f1c 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/ServiceBrokerRequestTest.java
@@ -32,4 +32,5 @@ public class ServiceBrokerRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/BindResourceTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/BindResourceTest.java
index 7d773fe8..eb7e2a9d 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/BindResourceTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/BindResourceTest.java
@@ -81,4 +81,5 @@ public class BindResourceTest {
.forClass(BindResource.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponseTest.java
index 348352bf..25852a6b 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceAppBindingResponseTest.java
@@ -95,7 +95,7 @@ public class CreateServiceInstanceAppBindingResponseTest {
assertThat(response.getCredentials().get("credential5")).isEqualTo("value5");
assertThat(response.getSyslogDrainUrl()).isEqualTo("https://logs.example.com");
-
+
assertThat(response.getVolumeMounts()).hasSize(4);
DocumentContext json = JsonUtils.toJsonPath(response);
@@ -128,7 +128,7 @@ public class CreateServiceInstanceAppBindingResponseTest {
assertThat(volumeMount.getMode()).isEqualTo(VolumeMount.Mode.READ_ONLY);
assertThat(volumeMount.getDeviceType()).isEqualTo(VolumeMount.DeviceType.SHARED);
- SharedVolumeDevice sharedVolumeDevice = (SharedVolumeDevice)volumeMount.getDevice();
+ SharedVolumeDevice sharedVolumeDevice = (SharedVolumeDevice) volumeMount.getDevice();
assertThat(sharedVolumeDevice.getVolumeId()).isEqualTo("volume-id");
assertThat(sharedVolumeDevice.getMountConfig())
.containsOnly(entry("field1", "mount-config-1"), entry("field2", "mount-config-2"));
@@ -168,9 +168,9 @@ public class CreateServiceInstanceAppBindingResponseTest {
@Test
public void exceedsOperationCharacterLimit() throws Exception {
assertThrows(IllegalArgumentException.class, () ->
- CreateServiceInstanceAppBindingResponse.builder()
- .operation(RandomString.make(10_001))
- .build());
+ CreateServiceInstanceAppBindingResponse.builder()
+ .operation(RandomString.make(10_001))
+ .build());
}
@Test
@@ -179,4 +179,5 @@ public class CreateServiceInstanceAppBindingResponseTest {
.operation(RandomString.make(10_000))
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java
index 4058600f..ee6aa22a 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java
@@ -137,7 +137,8 @@ public class CreateServiceInstanceBindingRequestTest {
@Test
public void minimalRequiredRequestIsDeserializedFromJson() {
CreateServiceInstanceBindingRequest request =
- JsonUtils.readTestDataFile("bindRequestWithOnlyRequiredFields.json", CreateServiceInstanceBindingRequest.class);
+ JsonUtils.readTestDataFile("bindRequestWithOnlyRequiredFields.json",
+ CreateServiceInstanceBindingRequest.class);
//ensure required fields are present
assertThat(request.getServiceDefinitionId()).isEqualTo("test-service-id");
@@ -249,8 +250,11 @@ public class CreateServiceInstanceBindingRequestTest {
}
public static class Parameters {
+
private String field1;
+
private Integer field2;
+
private Boolean field3;
public String getField1() {
@@ -276,5 +280,7 @@ public class CreateServiceInstanceBindingRequestTest {
public void setField3(Boolean value) {
this.field3 = value;
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponseTest.java
index 54d30446..9a2db8f7 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingResponseTest.java
@@ -30,4 +30,5 @@ public class CreateServiceInstanceBindingResponseTest {
.withRedefinedSubclass(CreateServiceInstanceRouteBindingResponse.class)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponseTest.java
index 27a1e1a2..ba3652b1 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceRouteBindingResponseTest.java
@@ -95,4 +95,5 @@ public class CreateServiceInstanceRouteBindingResponseTest {
.operation(RandomString.make(10_000))
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java
index bec99c12..0b70bf1f 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java
@@ -119,4 +119,5 @@ public class DeleteServiceInstanceBindingRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponseTest.java
index ca49bd26..c3bb8fac 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingResponseTest.java
@@ -75,4 +75,5 @@ public class DeleteServiceInstanceBindingResponseTest {
.operation(RandomString.make(10_000))
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java
index 29f7ea6f..813cc01e 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java
@@ -81,4 +81,5 @@ public class GetLastServiceBindingOperationRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java
index ef3d6842..1e2b35a2 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java
@@ -119,4 +119,5 @@ public class GetLastServiceBindingOperationResponseTest {
.forClass(GetLastServiceBindingOperationResponse.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponseTest.java
index 7540e14b..4be9e252 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceAppBindingResponseTest.java
@@ -99,7 +99,7 @@ public class GetServiceInstanceAppBindingResponseTest {
assertThat(response.getCredentials().get("credential5")).isEqualTo("value5");
assertThat(response.getSyslogDrainUrl()).isEqualTo("https://logs.example.com");
-
+
assertThat(response.getVolumeMounts()).hasSize(4);
DocumentContext json = JsonUtils.toJsonPath(response);
@@ -137,7 +137,7 @@ public class GetServiceInstanceAppBindingResponseTest {
assertThat(volumeMount.getMode()).isEqualTo(VolumeMount.Mode.READ_ONLY);
assertThat(volumeMount.getDeviceType()).isEqualTo(VolumeMount.DeviceType.SHARED);
- SharedVolumeDevice sharedVolumeDevice = (SharedVolumeDevice)volumeMount.getDevice();
+ SharedVolumeDevice sharedVolumeDevice = (SharedVolumeDevice) volumeMount.getDevice();
assertThat(sharedVolumeDevice.getVolumeId()).isEqualTo("volume-id");
assertThat(sharedVolumeDevice.getMountConfig())
.containsOnly(entry("field1", "mount-config-1"), entry("field2", "mount-config-2"));
@@ -150,4 +150,5 @@ public class GetServiceInstanceAppBindingResponseTest {
.withRedefinedSuperclass()
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java
index 5f915a40..facb9b9d 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java
@@ -70,4 +70,5 @@ public class GetServiceInstanceBindingRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponseTest.java
index 91299bd5..97cb9a10 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingResponseTest.java
@@ -29,4 +29,5 @@ public class GetServiceInstanceBindingResponseTest {
.withRedefinedSubclass(GetServiceInstanceRouteBindingResponse.class)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponseTest.java
index 041c868e..e1f7bd05 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceRouteBindingResponseTest.java
@@ -99,4 +99,5 @@ public class GetServiceInstanceRouteBindingResponseTest {
.withRedefinedSuperclass()
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDeviceTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDeviceTest.java
index fc175239..fd387ad9 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDeviceTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/SharedVolumeDeviceTest.java
@@ -27,4 +27,5 @@ public class SharedVolumeDeviceTest {
.forClass(SharedVolumeDevice.class)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/VolumeMountTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/VolumeMountTest.java
index a8eb152d..7d021176 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/VolumeMountTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/VolumeMountTest.java
@@ -105,4 +105,5 @@ public class VolumeMountTest {
.forClass(VolumeMount.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java
index cc103ab5..8a68dec4 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java
@@ -101,11 +101,11 @@ public class CatalogTest {
@SuppressWarnings("unchecked")
Map cost =
((List>) catalog.getServiceDefinitions().get(0).getPlans().get(1).getMetadata().get(
- "costs")).get(0);
+ "costs")).get(0);
assertThat(cost.get("unit")).isEqualTo("MONTHLY");
@SuppressWarnings("unchecked")
- Map amount = (Map)cost.get("amount");
+ Map amount = (Map) cost.get("amount");
assertThat(amount).containsOnly(entry("usd", 649.0));
}
@@ -113,4 +113,5 @@ public class CatalogTest {
public void equalsAndHashCode() {
EqualsVerifier.forClass(Catalog.class).verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClientTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClientTest.java
index d1aee18b..ecd39dcc 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClientTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/DashboardClientTest.java
@@ -68,4 +68,5 @@ public class DashboardClientTest {
.forClass(DashboardClient.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfoTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfoTest.java
index e4d12205..9f6f599c 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfoTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/MaintenanceInfoTest.java
@@ -73,4 +73,5 @@ public class MaintenanceInfoTest {
assertThat(info.getVersion()).isEqualTo(version);
assertThat(info.getDescription()).isEqualTo(description);
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/PlanTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/PlanTest.java
index d526a657..786350df 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/PlanTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/PlanTest.java
@@ -92,7 +92,7 @@ public class PlanTest {
{
put("field3", "value3");
put("field4", "value4");
- put("bullets", new String[] { "bullet1", "bullet2" });
+ put("bullets", new String[] {"bullet1", "bullet2"});
put("costs", costs);
put("displayName", "sample display name");
}
@@ -129,7 +129,7 @@ public class PlanTest {
entry("field3", "value3"),
entry("field4", "value4"),
entry("displayName", "sample display name"),
- entry("bullets", new String[]{"bullet1", "bullet2"}),
+ entry("bullets", new String[] {"bullet1", "bullet2"}),
entry("costs", costs)
);
assertThat(plan.getSchemas()).isNotNull();
@@ -169,4 +169,5 @@ public class PlanTest {
.forClass(Plan.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/SchemasTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/SchemasTest.java
index d0c9ed52..19174b4b 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/SchemasTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/SchemasTest.java
@@ -43,7 +43,7 @@ public class SchemasTest {
assertThat(json).hasNoPath("$.service_instance");
assertThat(json).hasNoPath("$.service_binding");
}
-
+
@Test
public void emptySchemasIsSerializedToJson() {
Schemas schemas = Schemas.builder()
@@ -123,25 +123,25 @@ public class SchemasTest {
DocumentContext json = JsonUtils.toJsonPath(schemas);
assertThat(json).hasPath("$.service_instance.create.parameters.$schema")
- .isEqualTo("https://json-schema.org/draft-04/schema#");
+ .isEqualTo("https://json-schema.org/draft-04/schema#");
assertThat(json).hasPath("$.service_instance.create.parameters.type")
- .isEqualTo("object");
+ .isEqualTo("object");
assertThat(json).hasPath("$.service_instance.create.parameters.properties.billing-account.description")
- .isEqualTo("Billing account number.");
+ .isEqualTo("Billing account number.");
assertThat(json).hasPath("$.service_instance.create.parameters.properties.billing-account.type")
- .isEqualTo("string");
+ .isEqualTo("string");
assertThat(json).hasPath("$.service_instance.create.parameters.description")
- .isEqualTo("create time schema");
+ .isEqualTo("create time schema");
assertThat(json).hasMapAtPath("$.service_instance.update.parameters").contains(
- entry("$schema", "https://json-schema.org/draft-04/schema#"),
- entry("type", "object"),
- entry("description", "update time schema")
+ entry("$schema", "https://json-schema.org/draft-04/schema#"),
+ entry("type", "object"),
+ entry("description", "update time schema")
);
assertThat(json).hasMapAtPath("$.service_binding.create.parameters").contains(
- entry("$schema", "https://json-schema.org/draft-04/schema#"),
- entry("type", "object"),
- entry("description", "bind create time schema")
+ entry("$schema", "https://json-schema.org/draft-04/schema#"),
+ entry("type", "object"),
+ entry("description", "bind create time schema")
);
}
@@ -151,4 +151,5 @@ public class SchemasTest {
.forClass(Schemas.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java
index de29a67d..7c3bff19 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java
@@ -110,15 +110,15 @@ public class ServiceDefinitionTest {
assertThat(serviceDefinition.isBindingsRetrievable()).isEqualTo(true);
assertThat(serviceDefinition.getTags()).contains("tag1", "tag2");
assertThat(serviceDefinition.getRequires()).contains(
- SERVICE_REQUIRES_ROUTE_FORWARDING.toString(),
- SERVICE_REQUIRES_SYSLOG_DRAIN.toString(),
- SERVICE_REQUIRES_VOLUME_MOUNT.toString(),
- "another_requires");
+ SERVICE_REQUIRES_ROUTE_FORWARDING.toString(),
+ SERVICE_REQUIRES_SYSLOG_DRAIN.toString(),
+ SERVICE_REQUIRES_VOLUME_MOUNT.toString(),
+ "another_requires");
assertThat(serviceDefinition.getMetadata()).contains(
- entry("field1", "value1"),
- entry("field2", "value2"),
- entry("field3", "value3"),
- entry("field4", "value4"));
+ entry("field1", "value1"),
+ entry("field2", "value2"),
+ entry("field3", "value3"),
+ entry("field4", "value4"));
assertThat(serviceDefinition.getDashboardClient()).isNotNull();
DocumentContext json = JsonUtils.toJsonPath(serviceDefinition);
@@ -135,15 +135,15 @@ public class ServiceDefinitionTest {
assertThat(json).hasPath("$.bindings_retrievable").isEqualTo(true);
assertThat(json).hasListAtPath("$.tags[*]").contains("tag1", "tag2");
assertThat(json).hasListAtPath("$.requires[*]").contains(
- SERVICE_REQUIRES_ROUTE_FORWARDING.toString(),
- SERVICE_REQUIRES_SYSLOG_DRAIN.toString(),
- SERVICE_REQUIRES_VOLUME_MOUNT.toString(),
- "another_requires");
+ SERVICE_REQUIRES_ROUTE_FORWARDING.toString(),
+ SERVICE_REQUIRES_SYSLOG_DRAIN.toString(),
+ SERVICE_REQUIRES_VOLUME_MOUNT.toString(),
+ "another_requires");
assertThat(json).hasMapAtPath("$.metadata").contains(
- entry("field1", "value1"),
- entry("field2", "value2"),
- entry("field3", "value3"),
- entry("field4", "value4"));
+ entry("field1", "value1"),
+ entry("field2", "value2"),
+ entry("field3", "value3"),
+ entry("field4", "value4"));
assertThat(json).hasPath("$.dashboard_client");
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/error/ErrorMessageTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/error/ErrorMessageTest.java
index be214829..807f5ad5 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/error/ErrorMessageTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/error/ErrorMessageTest.java
@@ -52,4 +52,5 @@ public class ErrorMessageTest {
.forClass(ErrorMessage.class)
.verify();
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequestTest.java
index e85a6dbd..1a2c14fb 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/AsyncParameterizedServiceInstanceRequestTest.java
@@ -106,4 +106,5 @@ public class AsyncParameterizedServiceInstanceRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java
index 410a9ea2..fd7ea442 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java
@@ -121,10 +121,10 @@ public class CreateServiceInstanceRequestTest {
.serviceDefinitionId("service-definition-id")
.planId("plan-id")
.context(context)
- .parameters("field1", "value1")
- .parameters("field2", 2)
- .parameters("field3", true)
- .parameters(parameters)
+ .parameters("field1", "value1")
+ .parameters("field2", 2)
+ .parameters("field3", true)
+ .parameters(parameters)
.asyncAccepted(true)
.platformInstanceId("platform-instance-id")
.apiInfoLocation("https://api.example.com")
@@ -193,4 +193,5 @@ public class CreateServiceInstanceRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java
index 76d5d268..39c5eaac 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java
@@ -103,4 +103,5 @@ public class CreateServiceInstanceResponseTest {
.operation(RandomString.make(10_000))
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java
index 654cf2e9..e6225df7 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java
@@ -111,4 +111,5 @@ public class DeleteServiceInstanceRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponseTest.java
index b6ff0fc1..26a7cffc 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceResponseTest.java
@@ -75,4 +75,5 @@ public class DeleteServiceInstanceResponseTest {
.operation(RandomString.make(10_000))
.build();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java
index ed62ac7f..48294a19 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java
@@ -77,4 +77,5 @@ public class GetLastServiceOperationRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java
index dcceafc4..95efdfbd 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java
@@ -118,4 +118,5 @@ public class GetLastServiceOperationResponseTest {
.forClass(GetLastServiceOperationResponse.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java
index eb2ab8d1..458e23d7 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java
@@ -67,4 +67,5 @@ public class GetServiceInstanceRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java
index e023902b..8cba41b4 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java
@@ -107,4 +107,5 @@ public class GetServiceInstanceResponseTest {
.forClass(GetServiceInstanceResponse.class)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/OperationStateTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/OperationStateTest.java
index 06a50877..a2144332 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/OperationStateTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/OperationStateTest.java
@@ -24,12 +24,12 @@ import static org.assertj.core.api.Assertions.assertThat;
public class OperationStateTest {
- @Test
- public void enumValueIsDeserialized() {
- OperationState state = JsonUtils.readTestDataFile(
- "operationState.json", OperationState.class);
+ @Test
+ public void enumValueIsDeserialized() {
+ OperationState state = JsonUtils.readTestDataFile(
+ "operationState.json", OperationState.class);
- assertThat(state).isEqualTo(OperationState.SUCCEEDED);
- }
+ assertThat(state).isEqualTo(OperationState.SUCCEEDED);
+ }
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java
index 0fc2c084..a5c347ae 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java
@@ -120,4 +120,5 @@ public class UpdateServiceInstanceRequestTest {
.suppress(Warning.TRANSIENT_FIELDS)
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java
index a915711a..a9997673 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java
@@ -73,4 +73,5 @@ public class UpdateServiceInstanceResponseTest {
.withRedefinedSuperclass()
.verify();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtilsTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtilsTest.java
index 21c2b33e..5ce12b1d 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtilsTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/util/ParameterBeanMapperUtilsTest.java
@@ -44,8 +44,11 @@ public class ParameterBeanMapperUtilsTest {
@SuppressWarnings("unused")
public static final class TestBean {
+
private String stringProperty;
+
private int intProperty;
+
private String unusedProperty;
private final NestedBean nestedBean;
@@ -81,10 +84,12 @@ public class ParameterBeanMapperUtilsTest {
public NestedBean getNestedBean() {
return nestedBean;
}
+
}
@SuppressWarnings("unused")
public static final class NestedBean {
+
private boolean booleanProperty;
public boolean isBooleanProperty() {
@@ -94,5 +99,7 @@ public class ParameterBeanMapperUtilsTest {
public void setBooleanProperty(boolean booleanProperty) {
this.booleanProperty = booleanProperty;
}
+
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/EventFlowTestResults.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/EventFlowTestResults.java
index 29fb68cd..af1b3abf 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/EventFlowTestResults.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/EventFlowTestResults.java
@@ -151,4 +151,5 @@ public class EventFlowTestResults {
return Mono.fromCallable(() -> this.errorLastOperation = s)
.then();
}
+
}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/NonBindableServiceInstanceBindingServiceTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/NonBindableServiceInstanceBindingServiceTest.java
index 27a59e71..ad79c48c 100755
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/NonBindableServiceInstanceBindingServiceTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/NonBindableServiceInstanceBindingServiceTest.java
@@ -47,4 +47,4 @@ public class NonBindableServiceInstanceBindingServiceTest {
.block());
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventServiceTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventServiceTest.java
index 746db3a4..bb0fa45f 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventServiceTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingEventServiceTest.java
@@ -195,7 +195,7 @@ public class ServiceInstanceBindingEventServiceTest {
.addErrorFlow(new AsyncOperationServiceInstanceBindingErrorFlow() {
@Override
public Mono error(GetLastServiceBindingOperationRequest request,
- Throwable t) {
+ Throwable t) {
return results.setErrorLastOperation("error " + request.getBindingId());
}
}))
@@ -323,5 +323,7 @@ public class ServiceInstanceBindingEventServiceTest {
}
return Mono.just(GetLastServiceBindingOperationResponse.builder().build());
}
+
}
-}
\ No newline at end of file
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventServiceTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventServiceTest.java
index ac753e73..aedb26c3 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventServiceTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/ServiceInstanceEventServiceTest.java
@@ -94,7 +94,7 @@ public class ServiceInstanceEventServiceTest {
.addCompletionFlow(new CreateServiceInstanceCompletionFlow() {
@Override
public Mono complete(CreateServiceInstanceRequest request,
- CreateServiceInstanceResponse response) {
+ CreateServiceInstanceResponse response) {
return results.setAfterCreate("after " + request.getServiceInstanceId());
}
}))
@@ -163,7 +163,7 @@ public class ServiceInstanceEventServiceTest {
.addErrorFlow(new DeleteServiceInstanceErrorFlow() {
@Override
public Mono error(DeleteServiceInstanceRequest request,
- Throwable t) {
+ Throwable t) {
return results.setErrorDelete("error " + request.getServiceInstanceId());
}
}))
@@ -226,7 +226,7 @@ public class ServiceInstanceEventServiceTest {
.addErrorFlow(new UpdateServiceInstanceErrorFlow() {
@Override
public Mono error(UpdateServiceInstanceRequest request,
- Throwable t) {
+ Throwable t) {
return results.setErrorUpdate("error " + request.getServiceInstanceId());
}
}))
@@ -240,8 +240,8 @@ public class ServiceInstanceEventServiceTest {
StepVerifier
.create(serviceInstanceEventService.updateServiceInstance(
UpdateServiceInstanceRequest.builder()
- .serviceInstanceId("service-instance-id")
- .build()))
+ .serviceInstanceId("service-instance-id")
+ .build()))
.expectError()
.verify();
@@ -308,7 +308,7 @@ public class ServiceInstanceEventServiceTest {
.addErrorFlow(new AsyncOperationServiceInstanceErrorFlow() {
@Override
public Mono error(GetLastServiceOperationRequest request,
- Throwable t) {
+ Throwable t) {
return results.setErrorLastOperation("error " + request.getServiceInstanceId());
}
}))
@@ -351,6 +351,7 @@ public class ServiceInstanceEventServiceTest {
}
return Mono.just(GetLastServiceOperationResponse.builder().build());
}
+
}
-}
\ No newline at end of file
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingCompletionFlowTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingCompletionFlowTest.java
index 8d3c337a..c4d0c24e 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingCompletionFlowTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingCompletionFlowTest.java
@@ -26,14 +26,15 @@ import static org.mockito.Mockito.mock;
public class AsyncOperationServiceInstanceBindingCompletionFlowTest {
- @Test
- public void complete() {
- AsyncOperationServiceInstanceBindingCompletionFlow flow =
- new AsyncOperationServiceInstanceBindingCompletionFlow() {};
- StepVerifier.create(
- flow.complete(
- mock(GetLastServiceBindingOperationRequest.class),
- mock(GetLastServiceBindingOperationResponse.class)))
- .verifyComplete();
- }
-}
\ No newline at end of file
+ @Test
+ public void complete() {
+ AsyncOperationServiceInstanceBindingCompletionFlow flow =
+ new AsyncOperationServiceInstanceBindingCompletionFlow() {};
+ StepVerifier.create(
+ flow.complete(
+ mock(GetLastServiceBindingOperationRequest.class),
+ mock(GetLastServiceBindingOperationResponse.class)))
+ .verifyComplete();
+ }
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingErrorFlowTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingErrorFlowTest.java
index e06c4a6b..ad0bc39e 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingErrorFlowTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingErrorFlowTest.java
@@ -25,12 +25,13 @@ import static org.mockito.Mockito.mock;
public class AsyncOperationServiceInstanceBindingErrorFlowTest {
- @Test
- public void error() {
- AsyncOperationServiceInstanceBindingErrorFlow flow =
- new AsyncOperationServiceInstanceBindingErrorFlow() {};
- StepVerifier.create(
- flow.error(mock(GetLastServiceBindingOperationRequest.class), mock(Exception.class)))
- .verifyComplete();
- }
-}
\ No newline at end of file
+ @Test
+ public void error() {
+ AsyncOperationServiceInstanceBindingErrorFlow flow =
+ new AsyncOperationServiceInstanceBindingErrorFlow() {};
+ StepVerifier.create(
+ flow.error(mock(GetLastServiceBindingOperationRequest.class), mock(Exception.class)))
+ .verifyComplete();
+ }
+
+}
diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingInitializationFlowTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingInitializationFlowTest.java
index f8518d17..0b340b0e 100644
--- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingInitializationFlowTest.java
+++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/service/events/flows/AsyncOperationServiceInstanceBindingInitializationFlowTest.java
@@ -25,12 +25,13 @@ import static org.mockito.Mockito.mock;
public class AsyncOperationServiceInstanceBindingInitializationFlowTest {
- @Test
- public void initialize() {
- AsyncOperationServiceInstanceBindingInitializationFlow flow =
- new AsyncOperationServiceInstanceBindingInitializationFlow() {};
- StepVerifier
- .create(flow.initialize(mock(GetLastServiceBindingOperationRequest.class)))
- .verifyComplete();
- }
-}
\ No newline at end of file
+ @Test
+ public void initialize() {
+ AsyncOperationServiceInstanceBindingInitializationFlow flow =
+ new AsyncOperationServiceInstanceBindingInitializationFlow() {};
+ StepVerifier
+ .create(flow.initialize(mock(GetLastServiceBindingOperationRequest.class)))
+ .verifyComplete();
+ }
+
+}