use of org.cloudfoundry.client.v2.routes.RouteResource in project cf-java-client by cloudfoundry.
the class DefaultRoutes method toRoute.
private static Route toRoute(List<String> applications, String domain, RouteResource resource, Optional<String> service, String space) {
RouteEntity entity = ResourceUtils.getEntity(resource);
Route.Builder builder = Route.builder().applications(applications).domain(domain).host(entity.getHost()).id(ResourceUtils.getId(resource)).path(entity.getPath()).space(space);
service.ifPresent(builder::service);
return builder.build();
}
Aggregations