Class DefaultErpHttpDestination.Builder
java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.DefaultErpHttpDestination.Builder
- Enclosing class:
- DefaultErpHttpDestination
Builder class to allow for easy creation of an immutable
DefaultErpHttpDestination instance.-
Method Summary
Modifier and TypeMethodDescriptionauthenticationType(AuthenticationType authenticationType) Sets the enum value forAuthenticationType.basicCredentials(BasicCredentials basicCredentials) Sets the credentials for accessing the destination when basic authentication is used.build()Finally creates theDefaultErpHttpDestinationwith the properties retrieved via theproperty(String, Object)method.Adds the given header to the list of headers added to every outgoing request for this destination.Adds a header given by theheaderNameandheaderValueto the list of headers added to every outgoing request for this destination.Sets theKeyStoreto be used when communicating over HTTP.keyStorePassword(String value) Sets the key store password for the correspondingKeyStoreused by theDefaultErpHttpDestinationto access the key store.Sets the locale to be used by the destination currently build.Sets the name of theDefaultErpHttpDestination.Sets the password of theDefaultErpHttpDestination.Adds the given key-value pair to the destination to be created.Sets the proxy host and proxy port of theDefaultErpHttpDestination.Sets the proxy URI of theDefaultErpHttpDestination.Sets the proxy type (Internet or On-Premise).Sets the sap client to be used by the destination currently build.tlsVersion(String value) Sets the TLS version used by theDefaultErpHttpDestinationto the given value.Lets theDefaultErpHttpDestinationtrust all server certificates.Sets the user name of theDefaultErpHttpDestination.
-
Method Details
-
sapClient
Sets the sap client to be used by the destination currently build.- Parameters:
sapClient- The sap client to use.- Returns:
- This builder.
-
locale
Sets the locale to be used by the destination currently build.- Parameters:
locale- The locale to use.- Returns:
- This builder.
-
tlsVersion
Sets the TLS version used by theDefaultErpHttpDestinationto the given value.- Parameters:
value- The TLS version that should be used.- Returns:
- This builder.
-
property
@Nonnull public DefaultErpHttpDestination.Builder property(@Nonnull String key, @Nonnull Object value) Adds the given key-value pair to the destination to be created. This will overwrite any property already assigned to the key.- Parameters:
key- The key to assign a property for.value- The property value to be assigned.- Returns:
- This builder.
-
keyStorePassword
Sets the key store password for the correspondingKeyStoreused by theDefaultErpHttpDestinationto access the key store.- Parameters:
value- The keyStore password that should be used.- Returns:
- This builder.
-
keyStore
Sets theKeyStoreto be used when communicating over HTTP.- Parameters:
keyStore- The keyStore that should be used. for HTTP communication- Returns:
- This builder.
-
trustAllCertificates
Lets theDefaultErpHttpDestinationtrust all server certificates.- Returns:
- This builder.
-
name
Sets the name of theDefaultErpHttpDestination.- Parameters:
name- The destination name- Returns:
- This builder.
-
proxy
Sets the proxy URI of theDefaultErpHttpDestination.- Parameters:
proxyUri- The URI of the proxy- Returns:
- This builder.
-
proxy
Sets the proxy host and proxy port of theDefaultErpHttpDestination.- Parameters:
proxyHost- The host of the proxyproxyPort- The port of the proxy- Returns:
- This builder.
-
proxyType
Sets the proxy type (Internet or On-Premise).- Parameters:
proxyType- Type of proxy this destination is configured for.- Returns:
- This builder.
-
authenticationType
@Nonnull public DefaultErpHttpDestination.Builder authenticationType(@Nonnull AuthenticationType authenticationType) Sets the enum value forAuthenticationType.- Parameters:
authenticationType- The authentication type used for the destination- Returns:
- This builder.
-
user
Sets the user name of theDefaultErpHttpDestination.- Parameters:
user- The user name of the destination- Returns:
- This builder.
-
password
Sets the password of theDefaultErpHttpDestination.- Parameters:
password- The password of the destination- Returns:
- This builder.
-
basicCredentials
@Nonnull public DefaultErpHttpDestination.Builder basicCredentials(@Nonnull BasicCredentials basicCredentials) Sets the credentials for accessing the destination when basic authentication is used.- Parameters:
basicCredentials- Username and password represented as aBasicCredentialsobject.- Returns:
- This builder.
-
header
Adds the given header to the list of headers added to every outgoing request for this destination.- Parameters:
header- A header to add to outgoing requests.- Returns:
- This builder.
-
header
@Nonnull public DefaultErpHttpDestination.Builder header(@Nonnull String headerName, @Nonnull String headerValue) Adds a header given by theheaderNameandheaderValueto the list of headers added to every outgoing request for this destination.- Parameters:
headerName- The name of the header to add.headerValue- The value of the header to add.- Returns:
- This builder.
-
build
Finally creates theDefaultErpHttpDestinationwith the properties retrieved via theproperty(String, Object)method.- Returns:
- A fully instantiated
DefaultErpHttpDestination.
-