Class ServiceBindingUtils

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

public class ServiceBindingUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    matches(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding, String filter)
    Returns true, if a service binding matches the given filter.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      binding - the ServiceBinding to check
      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
    • matches

      public static boolean matches(com.sap.cloud.environment.servicebinding.api.ServiceBinding binding, String filter)
      Returns true, if a service binding matches the given filter. The filter is used as tag filter and service filter.
      Parameters:
      binding - the ServiceBinding to check
      filter - the filter to match tags and service against
      Returns:
      true, if the service binding matches, false otherwise