Skip to content

Commit

Permalink
minor refactoring to allow import to Eclipse
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokowandtg committed Sep 5, 2024
1 parent 1fffc4c commit ac0f15b
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase;
import org.cloudfoundry.Nullable;
import org.cloudfoundry.client.v2.Resource;
import org.cloudfoundry.client.v2.jobs.JobEntity;
import org.immutables.value.Value;

/**
Expand All @@ -40,7 +39,7 @@ abstract class _DeleteServiceInstanceResponse extends Resource<Object> {
*/
@JsonProperty("entity")
@JsonTypeIdResolver(_DeleteServiceInstanceResponse.DeleteServiceInstanceResponseTypeIdResolver.class)
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = JobEntity.class, visible = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = org.cloudfoundry.client.v2.jobs.JobEntity.class, visible = true)
@Nullable
public abstract Object getEntity();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public abstract class PaginatedRequest {
public abstract Integer getPerPage();

@Value.Check
void check() {
public void check() {
if (getPage() != null && getPage() < 1) {
throw new IllegalStateException("page must be greater than or equal to 1");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
package org.cloudfoundry.uaa.identityzones;


import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;

import org.cloudfoundry.Nullable;
import org.immutables.value.Value;

import java.io.IOException;
Expand All @@ -34,6 +37,7 @@
@Value.Immutable
abstract class _ListIdentityZonesResponse {


/**
* The identity zones
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,18 +693,11 @@ public Mono<Void> pushManifestV3(PushManifestV3Request request) {
.flatMap(
function(
(appId, packageId) ->
buildAndStage(
cloudFoundryClient,
manifestApp,
packageId)
.flatMap(
dropletId ->
applyDropletAndWaitForRunning(
cloudFoundryClient,
manifestApp
.getName(),
appId,
dropletId))))))
buildAndStageAndWaitForRunning(
cloudFoundryClient,
manifestApp,
packageId,
appId)))))
.then();
}

Expand Down Expand Up @@ -1157,6 +1150,21 @@ private static Mono<Void> bindServices(
.then();
}

private static Mono<Void> buildAndStageAndWaitForRunning(
CloudFoundryClient cloudFoundryClient,
ManifestV3Application manifestApp,
String packageId,
String appId) {
return buildAndStage(cloudFoundryClient, manifestApp, packageId)
.flatMap(
dropletId ->
applyDropletAndWaitForRunning(
cloudFoundryClient,
manifestApp.getName(),
appId,
dropletId));
}

private static Mono<String> buildAndStage(
CloudFoundryClient cloudFoundryClient,
ManifestV3Application manifestApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
typeImmutable = "*"
)
package org.cloudfoundry.logcachetest;

import org.immutables.value.Value;
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.cloudfoundry.servicebroker.binding;

import org.immutables.value.Value;

@Value.Immutable
abstract class _UnbindResponse {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.cloudfoundry.servicebroker.instance;

import org.immutables.value.Value;

@Value.Immutable
abstract class _DeprovisionSyncResponse {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.cloudfoundry.servicebroker.instance;

import org.immutables.value.Value;

@Value.Immutable
abstract class _UpdateSyncResponse {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.cloudfoundry.servicebroker.lastoperation;

import org.immutables.value.Value;

@Value.Immutable
abstract class _LastOperationDeprovisionResponse {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@
typeImmutable = "*"
)
package org.cloudfoundry.servicebroker;

import org.immutables.value.Value;

0 comments on commit ac0f15b

Please sign in to comment.