Enum Class DestinationServiceRetrievalStrategy
java.lang.Object
java.lang.Enum<DestinationServiceRetrievalStrategy>
com.sap.cloud.sdk.cloudplatform.connectivity.DestinationServiceRetrievalStrategy
- All Implemented Interfaces:
Serializable
,Comparable<DestinationServiceRetrievalStrategy>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOnly load destination from the provider's sub-account, regardless if subscribers have a destination of the same name.Only load destination from the current tenant's sub-account, regardless if the provider has a destination of the same name.Only load destination from the subscriber's sub-account, checking that the current tenant is an actual subscriber and not the provider. -
Method Summary
Modifier and TypeMethodDescriptionofIdentifier
(String identifier) Get the strategy by its identifier.toString()
Returns the enum constant of this class with the specified name.static DestinationServiceRetrievalStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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 theTenantAccessor
returns the provider tenant, the destination will be searched for in the provider sub-account. -
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
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
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 nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<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
-