Class DestinationServiceOptionsAugmenter
java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.DestinationServiceOptionsAugmenter
- All Implemented Interfaces:
DestinationOptionsAugmenter
public class DestinationServiceOptionsAugmenter
extends Object
implements DestinationOptionsAugmenter
Handles the getting and setting of
DestinationOptions parameters specific to SCP Cloud Foundry platform.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnable cross-level consumption of destinations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaugmentBuilder(DestinationOptions.Builder builder) Use this class to set configuration parameters that are specific to a platform/environment/etc.Creates instances ofDestinationServiceOptionsAugmenterin a builder-like style.customHeaders(Header... headers) Adds custom headers to the destination request.fragmentName(String fragmentName) Fragment that should enhance the destination to be fetched.static io.vavr.control.Option<DestinationServiceRetrievalStrategy>getRetrievalStrategy(DestinationOptions options) Retrieves the configured strategy to use when loading destinations in a multi-tenant subscription environment.static io.vavr.control.Option<DestinationServiceTokenExchangeStrategy>Retrieves the configuredDestinationServiceTokenExchangeStrategyto use when loading destinations.refreshToken(String refreshToken) Refresh token to be sent for destination of typeAuthenticationType.OAUTH2_REFRESH_TOKEN.Sets the strategy to use when loading destinations in a multi-tenant subscription environment.Sets theDestinationServiceTokenExchangeStrategyto use when loading destinations.
-
Constructor Details
-
DestinationServiceOptionsAugmenter
public DestinationServiceOptionsAugmenter()
-
-
Method Details
-
augmenter
Creates instances ofDestinationServiceOptionsAugmenterin a builder-like style.- Returns:
- A new augmenter instance.
-
retrievalStrategy
@Nonnull public DestinationServiceOptionsAugmenter retrievalStrategy(@Nonnull DestinationServiceRetrievalStrategy strategy) Sets the strategy to use when loading destinations in a multi-tenant subscription environment. Not setting this value or setting to null results in platform default behaviour.- Parameters:
strategy- Strategy to use when loading destinations.- Returns:
- The same augmenter that called this method.
-
tokenExchangeStrategy
@Nonnull public DestinationServiceOptionsAugmenter tokenExchangeStrategy(@Nonnull DestinationServiceTokenExchangeStrategy strategy) Sets theDestinationServiceTokenExchangeStrategyto use when loading destinations. Not setting this value results in the platform default behavior.- Parameters:
strategy- Strategy to use when loading destinations.- Returns:
- The same augmenter that called this method.
-
refreshToken
Refresh token to be sent for destination of typeAuthenticationType.OAUTH2_REFRESH_TOKEN.- Parameters:
refreshToken- Refresh token as encoded string.- Returns:
- The same augmenter that called this method.
- Since:
- 5.9.0
-
fragmentName
Fragment that should enhance the destination to be fetched.- Parameters:
fragmentName- The fragment name.- Returns:
- The same augmenter that called this method.
- Since:
- 5.11.0
-
crossLevelConsumption
@Beta @Nonnull public DestinationServiceOptionsAugmenter crossLevelConsumption(@Nonnull DestinationServiceOptionsAugmenter.CrossLevelScope scope) Enable cross-level consumption of destinations. Note: This is an experimental feature and may not function for all destination types.- Parameters:
scope- Set the scope where to look up the destination. This scope is only applied to the destination itself. The scopes for fragments or destination chain references have to be set separately.- Returns:
- The same augmenter that called this method.
- Since:
- 5.22.0
-
customHeaders
Adds custom headers to the destination request. Use this to add parameters that are not directly supported by the SDK. For example, use this to achieve destination chaining.Note: Any secret values added as custom headers here will not be masked in log output and may appear in plain text on debug log level.
- Parameters:
headers- The headers to be added.- Returns:
- The same augmenter that called this method.
- Since:
- 5.22.0
-
augmentBuilder
Description copied from interface:DestinationOptionsAugmenterUse this class to set configuration parameters that are specific to a platform/environment/etc. Once called, any parameter setting methods of this class will affect the providedDestinationOptions.Builderand the resultingDestinationOptionsobject that the builder creates.- Specified by:
augmentBuilderin interfaceDestinationOptionsAugmenter- Parameters:
builder- The builder to attach this augmenter to
-
getRetrievalStrategy
@Nonnull public static io.vavr.control.Option<DestinationServiceRetrievalStrategy> getRetrievalStrategy(@Nonnull DestinationOptions options) Retrieves the configured strategy to use when loading destinations in a multi-tenant subscription environment.- Parameters:
options- The destination options instance that stores the key/value pair.- Returns:
- An
Optionwrapping the retrieval strategy if the parameter is present, otherwise aOption.None.
-
getTokenExchangeStrategy
@Nonnull public static io.vavr.control.Option<DestinationServiceTokenExchangeStrategy> getTokenExchangeStrategy(@Nonnull DestinationOptions options) Retrieves the configuredDestinationServiceTokenExchangeStrategyto use when loading destinations.- Parameters:
options- The destination options instance that stores the key/value pair.- Returns:
- An
Optionwrapping the token exchange strategy if the parameter is present, otherwise aOption.None.
-