Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor refactoring to allow import into Eclipse #1238 #1239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;