Java Code Examples for org.cloudfoundry.util.PaginationUtils#requestClientV3Resources()
The following examples show how to use
org.cloudfoundry.util.PaginationUtils#requestClientV3Resources() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppRelationshipTask.java From cf-butler with Apache License 2.0 | 5 votes |
protected Mono<AppRelationship> getAppRelationship(AppRelationshipRequest request) { Flux<ApplicationResource> resources = PaginationUtils.requestClientV3Resources( page -> DefaultCloudFoundryOperations .builder() .from(opsClient) .organization(request.getOrganization()) .space(request.getSpace()) .build() .getCloudFoundryClient() .applicationsV3() .list(ListApplicationsRequest.builder().page(page).addAllNames(Arrays.asList(new String[] { request.getApplicationName() })).build())); return resources .next() .map(ar -> AppRelationship .builder() .organization(request.getOrganization()) .space(request.getSpace()) .appId(ar.getId()) .appName(request.getApplicationName()) .serviceInstanceId(request.getServiceInstanceId()) .serviceName(request.getServiceName()) .serviceOffering(request.getServiceOffering()) .servicePlan(request.getServicePlan()) .serviceType(request.getServiceType()) .build()); }
Example 2
Source File: CloudControllerRestClientImpl.java From cf-java-client-sap with Apache License 2.0 | 5 votes |
private Flux<? extends Task> getTaskResourcesByApplicationGuid(UUID applicationGuid) { IntFunction<ListTasksRequest> pageRequestSupplier = page -> ListTasksRequest.builder() .applicationId(applicationGuid.toString()) .page(page) .build(); return PaginationUtils.requestClientV3Resources(page -> delegate.tasks() .list(pageRequestSupplier.apply(page))); }
Example 3
Source File: CloudControllerRestClientImpl.java From cf-java-client-sap with Apache License 2.0 | 5 votes |
private Flux<? extends Build> getBuildResourcesByApplicationGuid(UUID applicationGuid) { IntFunction<ListApplicationBuildsRequest> pageRequestSupplier = page -> ListApplicationBuildsRequest.builder() .applicationId(applicationGuid.toString()) .page(page) .build(); return PaginationUtils.requestClientV3Resources(page -> delegate.applicationsV3() .listBuilds(pageRequestSupplier.apply(page))); }
Example 4
Source File: CloudControllerRestClientImpl.java From cf-java-client-sap with Apache License 2.0 | 5 votes |
private Flux<? extends Build> getBuildResourcesByPackageGuid(UUID packageGuid) { IntFunction<ListBuildsRequest> pageRequestSupplier = page -> ListBuildsRequest.builder() .packageId(packageGuid.toString()) .page(page) .build(); return PaginationUtils.requestClientV3Resources(page -> delegate.builds() .list(pageRequestSupplier.apply(page))); }