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.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
augmentBuilder
(DestinationOptions.Builder builder) Use this class to set configuration parameters that are specific to a platform/environment/etc.Creates instances ofDestinationServiceOptionsAugmenter
in a builder-like style.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 configuredDestinationServiceTokenExchangeStrategy
to 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 theDestinationServiceTokenExchangeStrategy
to use when loading destinations.
-
Constructor Details
-
DestinationServiceOptionsAugmenter
public DestinationServiceOptionsAugmenter()
-
-
Method Details
-
augmenter
Creates instances ofDestinationServiceOptionsAugmenter
in 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 theDestinationServiceTokenExchangeStrategy
to 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
-
augmentBuilder
Description copied from interface:DestinationOptionsAugmenter
Use 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.Builder
and the resultingDestinationOptions
object that the builder creates.- Specified by:
augmentBuilder
in 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
Option
wrapping 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 configuredDestinationServiceTokenExchangeStrategy
to use when loading destinations.- Parameters:
options
- The destination options instance that stores the key/value pair.- Returns:
- An
Option
wrapping the token exchange strategy if the parameter is present, otherwise aOption.None
.
-