Class ServiceBindingUtils

java.lang.Object
com.sap.cds.services.utils.environment.ServiceBindingUtils

public class ServiceBindingUtils extends Object
  • Method Details

    • matches

      public static boolean matches(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding, String tagFilter, String serviceNameFilter)
      Returns true, if a service binding matches the given tag filter or service filter. The tag filter is used first to match the service binding. It is only used if the given tag filter is not null and if the service binding has a non-empty tag list (ServiceBinding.getTags()). If the tag filter is used and no tag match can be found the serviceFilter is applied. If the tag filter is not used or has a negative result an additional service filter is applied against the service name of the binding. It is only applied if the given service filter is not null.
      Parameters:
      tagFilter - the tag to match the tags against.
      serviceNameFilter - the service name to match the service against.
      Returns:
      true, if the service binding matches, false otherwise