public class ErpConfigContext extends Object implements ConfigContext, WithDestinationName
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOCALE_PROPERTY
The default name of the destination property holding the
Locale for DestinationType.HTTP. |
static String |
DEFAULT_LOCALE_PROPERTY_RFC
The default name of thedestination property holding the
Locale for DestinationType.RFC. |
static String |
DEFAULT_SAP_CLIENT_PROPERTY
The default name of the destination property holding the
SapClient for DestinationType.HTTP. |
static String |
DEFAULT_SAP_CLIENT_PROPERTY_RFC
The default name of the destination property holding the
SapClient for DestinationType.RFC. |
| Constructor and Description |
|---|
ErpConfigContext()
Creates an ERP configuration context using
default ERP destination name
ErpDestination.getDefaultName(),
default SAP client destination property
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP or
DEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFC
if available - otherwise SapClient.DEFAULT. |
ErpConfigContext(Locale locale)
Creates an ERP configuration context using the default ERP destination name
ErpDestination.getDefaultName() and the default SAP client destination property:
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP or
DEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFC
If this destination property does not exist, SapClient.DEFAULT is used. |
ErpConfigContext(SapClient sapClient)
Creates an ERP configuration context using the default ERP destination name
ErpDestination.getDefaultName() and the current Locale. |
ErpConfigContext(String destinationName)
Creates an ERP configuration context using the default destination property
DEFAULT_LOCALE_PROPERTY for DestinationType.HTTP or
DEFAULT_LOCALE_PROPERTY_RFC for DestinationType.RFC
or SapClient.DEFAULT if this property does not exist, as well as the current Locale. |
ErpConfigContext(String destinationName,
SapClient sapClient)
Creates an ERP configuration context using the current
Locale. |
ErpConfigContext(String destinationName,
SapClient sapClient,
Locale locale)
Creates an ERP configuration context.
|
ErpConfigContext(String destinationName,
SapClient sapClient,
String sapClientProperty,
Locale locale,
String localeProperty)
Creates an ERP configuration context.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDestinationName()
The name of the destination to be used for connecting to the ERP.
|
Locale |
getLocale()
The
Locale to be used for connecting to the ERP. |
SapClient |
getSapClient()
The
SapClient to be used for connecting to the ERP. |
int |
hashCode() |
String |
toString() |
public static final String DEFAULT_SAP_CLIENT_PROPERTY
SapClient for DestinationType.HTTP.public static final String DEFAULT_LOCALE_PROPERTY
Locale for DestinationType.HTTP.public static final String DEFAULT_SAP_CLIENT_PROPERTY_RFC
SapClient for DestinationType.RFC.public static final String DEFAULT_LOCALE_PROPERTY_RFC
Locale for DestinationType.RFC.public ErpConfigContext(@Nullable String destinationName, @Nullable SapClient sapClient, @Nullable String sapClientProperty, @Nullable Locale locale, @Nullable String localeProperty) throws DestinationAccessException
destinationName - The name of the ERP destination. If this is null, the default name defined by
ErpDestination.getDefaultName() is used.sapClient - The SAP client to be used. If this is null, the destination configuration is used to read the
property with the name specified by sapClientProperty. If this destination property does not
exist, SapClient.DEFAULT is used.sapClientProperty - The name of the destination property to be used for reading the SAP client. If this is null,
the following default property name is used:
locale - The locale to be used. If this is null, first, the destination configuration is used to read
the property with the name specified by localeProperty. If this fails, the locale defined by
LocaleAccessor.getCurrentLocale() is used.localeProperty - The name of the destination property to be used for reading the locale. If this is null, the
following default property name is used:
DestinationAccessException - If the configuration for the given destination cannot be found.public ErpConfigContext(@Nullable String destinationName, @Nullable SapClient sapClient, @Nullable Locale locale) throws DestinationAccessException
destinationName - The name of the ERP destination. If this is null, the default name defined by
ErpDestination.getDefaultName() is used.sapClient - The SAP client to be used. If this is null, the destination configuration is used to read the
property with the following default property name:
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP orDEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFCSapClient.DEFAULT is used.locale - The locale to be used. If this is null, first, the destination configuration is used to read
the property with the following default property name:
DEFAULT_LOCALE_PROPERTY for DestinationType.HTTP orDEFAULT_LOCALE_PROPERTY_RFC for DestinationType.RFCLocaleAccessor.getCurrentLocale() is used.DestinationAccessException - If the configuration for the given destination cannot be found.public ErpConfigContext(@Nullable String destinationName, @Nullable SapClient sapClient)
Locale.destinationName - The name of the ERP destination. If this is null, the default name defined by
ErpDestination.getDefaultName() is used.sapClient - The SAP client to be used. If this is null, the destination configuration is used to read the
property with the following default property name:
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP orDEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFCSapClient.DEFAULT is used.public ErpConfigContext(@Nullable String destinationName)
DEFAULT_LOCALE_PROPERTY for DestinationType.HTTP orDEFAULT_LOCALE_PROPERTY_RFC for DestinationType.RFCSapClient.DEFAULT if this property does not exist, as well as the current Locale.destinationName - The name of the ERP destination. If this is null, the default name defined by
ErpDestination.getDefaultName() is used.public ErpConfigContext(@Nullable SapClient sapClient)
ErpDestination.getDefaultName() and the current Locale.sapClient - The SAP client to be used. If this is null, the destination configuration is used to read the
property with name DEFAULT_SAP_CLIENT_PROPERTY. If this destination property does not exist,
SapClient.DEFAULT is used.public ErpConfigContext(@Nullable Locale locale)
ErpDestination.getDefaultName() and the default SAP client destination property:
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP orDEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFCSapClient.DEFAULT is used.locale - The locale to be used. If this is null, first, the destination configuration is used to read
the default locale destination property:
DEFAULT_LOCALE_PROPERTY for DestinationType.HTTP orDEFAULT_LOCALE_PROPERTY_RFC for DestinationType.RFCLocaleAccessor.getCurrentLocale() is used.public ErpConfigContext()
ErpDestination.getDefaultName(),
DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP orDEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFCSapClient.DEFAULT.
DEFAULT_LOCALE_PROPERTY for DestinationType.HTTP orDEFAULT_LOCALE_PROPERTY_RFC for DestinationType.RFCLocaleAccessor.getCurrentLocale().
@Generated(value="lombok") public String getDestinationName()
ErpDestination.getDefaultName() if omitted.getDestinationName in interface WithDestinationName@Generated(value="lombok") public SapClient getSapClient()
SapClient to be used for connecting to the ERP. Defaults to SapClient.DEFAULT if omitted.@Generated(value="lombok") public Locale getLocale()
Locale to be used for connecting to the ERP. Defaults to Locale.getDefault() if omitted.@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public String toString()
Copyright © 2017 SAP SE. All rights reserved.