service-registry/src/main/java/de/evoila/osb/service/registry/manager/ServiceBrokerManager.java
public ServiceBroker searchForServiceBrokerWithServiceInstanceId(String serviceInstanceId, HttpStatus resourceNotFoundExceptionCustomStatusCode) throws ResourceNotFoundException {
        log.debug("Searching for service broker via service instance id.");
        Iterator<ServiceBroker> iterator = getAll().iterator();
        ServiceBroker serviceBroker = null;
        while (iterator.hasNext()) {
            serviceBroker = iterator.next();
            if (serviceBroker.getServiceInstances() != null) {
                if (serviceBroker.getServiceInstance(serviceInstanceId).isPresent()) {
                    log.debug("Found following matching service broker for " + serviceInstanceId + " -> " + serviceBroker.getLoggingNameString());
                    return serviceBroker;
                }
            }
        }
        log.debug("No matching service broker found for " + serviceInstanceId);
        throw new ResourceNotFoundException("service instance", resourceNotFoundExceptionCustomStatusCode);
    }
/**
     * Searches for a service broker by one of its service instances.
     *
     * @param serviceInstanceId                         id to identify the instance with
     * @param resourceNotFoundExceptionCustomStatusCode custom {@linkplain HttpStatus} for the potential thrown {@linkplain ResourceNotFoundException}
     * @return the service broker with the matching instance, guaranteed to not be null
     * @throws ResourceNotFoundException if no matching instance was found
     */
Searches for a service broker by one of its service instances.
@param serviceInstanceId                         id to identify the instance with
@param resourceNotFoundExceptionCustomStatusCode custom  HttpStatus for the potential thrown  ResourceNotFoundException
@return the service broker with the matching instance, guaranteed to not be null
@throws ResourceNotFoundException if no matching instance was found
Searches for a service broker by one of its service instances . @param serviceInstanceId id to identify the instance with @param resourceNotFoundExceptionCustomStatusCode custom HttpStatus for the potential thrown ResourceNotFoundException @return the service broker with the matching instance guaranteed to not be null @throws ResourceNotFoundException if no matching instance was found
public ServiceBroker searchForServiceBrokerWithServiceInstanceId(String serviceInstanceId, HttpStatus resourceNotFoundExceptionCustomStatusCode) throws ResourceNotFoundException {
        log.debug("Searching for service broker via service instance id.");
        Iterator<ServiceBroker> iterator = getAll().iterator();
        ServiceBroker serviceBroker = null;
        while (iterator.hasNext()) {
            serviceBroker = iterator.next();
            if (serviceBroker.getServiceInstances() != null) {
                if (serviceBroker.getServiceInstance(serviceInstanceId).isPresent()) {
                    log.debug("Found following matching service broker for " + serviceInstanceId + " -> " + serviceBroker.getLoggingNameString());
                    return serviceBroker;
                }
            }
        }
        log.debug("No matching service broker found for " + serviceInstanceId);
        throw new ResourceNotFoundException("service instance", resourceNotFoundExceptionCustomStatusCode);
    }
public ServiceBroker searchForServiceBrokerWithServiceInstanceId ( String serviceInstanceId , HttpStatus resourceNotFoundExceptionCustomStatusCode ) throws ResourceNotFoundException { log . debug ( "Searching for service broker via service instance id." ) ; Iterator < ServiceBroker > iterator = getAll ( ) . iterator ( ) ; ServiceBroker serviceBroker = null ; while ( iterator . hasNext ( ) ) { serviceBroker = iterator . next ( ) ; if ( serviceBroker . getServiceInstances ( ) != null ) { if ( serviceBroker . getServiceInstance ( serviceInstanceId ) . isPresent ( ) ) { log . debug ( "Found following matching service broker for " + serviceInstanceId + " -> " + serviceBroker . getLoggingNameString ( ) ) ; return serviceBroker ; } } } log . debug ( "No matching service broker found for " + serviceInstanceId ) ; throw new ResourceNotFoundException ( "service instance" , resourceNotFoundExceptionCustomStatusCode ) ; }
Searches for a service broker by one of its service instances.
Searches for a service broker by one of its service instances .