Enum Class DestinationServiceRetrievalStrategy

java.lang.Object
java.lang.Enum<DestinationServiceRetrievalStrategy>
com.sap.cloud.sdk.cloudplatform.connectivity.DestinationServiceRetrievalStrategy
All Implemented Interfaces:
Serializable, Comparable<DestinationServiceRetrievalStrategy>, Constable

public enum DestinationServiceRetrievalStrategy extends Enum<DestinationServiceRetrievalStrategy>
Enumeration which represents the strategies for loading destinations in a multi-tenant application on SCP Cloud Foundry. There can be destinations defined on the tenant hosting the application (provider), or on the tenant(s) that have subscribed to the application (subscriber). Platform default behaviour is represented by null values.
  • Enum Constant Details

    • ALWAYS_PROVIDER

      public static final DestinationServiceRetrievalStrategy ALWAYS_PROVIDER
      Only load destination from the provider's sub-account, regardless if subscribers have a destination of the same name. There is no fallback if the destination is not found on the provider's sub-account.
    • CURRENT_TENANT

      public static final DestinationServiceRetrievalStrategy CURRENT_TENANT
      Only load destination from the current tenant's sub-account, regardless if the provider has a destination of the same name. There is no fallback if the destination is not found on the subscriber's sub-account.

      Note: This strategy assumes that the tenant returned by TenantAccessor.getCurrentTenant() is the subscriber to get the destination for. This means if the TenantAccessor returns the provider tenant, the destination will be searched for in the provider sub-account.

    • ONLY_SUBSCRIBER

      public static final DestinationServiceRetrievalStrategy ONLY_SUBSCRIBER
      Only load destination from the subscriber's sub-account, checking that the current tenant is an actual subscriber and not the provider. There is no fallback if the destination is not found on the subscriber's sub-account.
  • Method Details

    • values

      public static DestinationServiceRetrievalStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DestinationServiceRetrievalStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<DestinationServiceRetrievalStrategy>
    • ofIdentifier

      @Nullable public static DestinationServiceRetrievalStrategy ofIdentifier(@Nullable String identifier)
      Get the strategy by its identifier.
      Parameters:
      identifier - The string representation of a strategy.
      Returns:
      The strategy enum value.
      Since:
      5.0.0
    • getIdentifier

      @Nonnull public String getIdentifier()