public class ErpEndpoint extends Object
Caution: This class is not thread-safe. Threads must create their own instances of this class.
Constructor and Description |
---|
ErpEndpoint()
Construct a new ERP endpoint using the default
ErpConfigContext , which uses
default ERP destination name ErpDestination.getDefaultName() ,
default SAP client destination property
ErpConfigContext.DEFAULT_SAP_CLIENT_PROPERTY for DestinationType.HTTP or
ErpConfigContext.DEFAULT_SAP_CLIENT_PROPERTY_RFC for DestinationType.RFC
if available - otherwise SapClient.DEFAULT . |
ErpEndpoint(ErpConfigContext erpConfigContext)
Construct a new ERP endpoint based on the given
ErpConfigContext . |
ErpEndpoint(ErpConfigContext erpConfigContext,
ErpQuerySignerFactory querySignerFactory)
Construct a new ERP endpoint based on the given
ErpConfigContext and ErpQuerySignerFactory . |
Modifier and Type | Method and Description |
---|---|
void |
assertMinInterfaceVersion(int minVersionRequired)
Deprecated.
No longer supported, do not use.
|
<QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends QueryResult<QueryT,QueryResultT>,QuerySerializerT extends QuerySerializer<QueryT,QueryResultT>> |
executeQuery(QueryT query,
QuerySerializerT querySerializer)
Executes the given query, writes an audit log entry, and measures the execution time.
|
<QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends QueryResult<QueryT,QueryResultT>> |
executeQuery(SerializedQuery<QueryT> serializedQuery)
Executes the given query, writes an audit log entry, and measures the execution time.
|
ErpConfigContext |
getConfigContext() |
String |
getDestinationName() |
ErpSystemInfo |
getErpSystemInfo()
Deprecated.
No longer supported, do not use.
|
com.google.common.base.Optional<ErpSystemInfo> |
getErpSystemInfoIfPresent()
Deprecated.
No longer supported, do not use.
|
ErpSystemInfo |
getErpSystemInfoIgnoringCache()
Deprecated.
No longer supported, do not use.
|
QueryExecutionMeasurements |
getMeasurements() |
public ErpEndpoint()
ErpConfigContext
, which uses
ErpDestination.getDefaultName()
,
ErpConfigContext.DEFAULT_SAP_CLIENT_PROPERTY
for DestinationType.HTTP
orErpConfigContext.DEFAULT_SAP_CLIENT_PROPERTY_RFC
for DestinationType.RFC
SapClient.DEFAULT
.
ErpConfigContext.DEFAULT_LOCALE_PROPERTY
for DestinationType.HTTP
orErpConfigContext.DEFAULT_LOCALE_PROPERTY_RFC
for DestinationType.RFC
LocaleAccessor.getCurrentLocale()
.
ErpConfigContext.ErpConfigContext()
public ErpEndpoint(@Nullable ErpConfigContext erpConfigContext)
ErpConfigContext
.erpConfigContext
- The ErpConfigContext
to be used. If null
, this corresponds to invoking the default
constructor ErpEndpoint()
.public ErpEndpoint(@Nullable ErpConfigContext erpConfigContext, @Nullable ErpQuerySignerFactory querySignerFactory)
ErpConfigContext
and ErpQuerySignerFactory
.erpConfigContext
- The ErpConfigContext
to be used. If null
, this corresponds to invoking the default
constructor ErpEndpoint()
.querySignerFactory
- The ErpQuerySignerFactory
to be used. If null
, the
StrategyBasedErpQuerySignerFactory
is used.@Deprecated public void assertMinInterfaceVersion(int minVersionRequired) throws QueryExecutionException
QueryExecutionException
- If there was an error while retrieving the ABAP interface version.AbapInterfaceNotSupportedException
- If the given ABAP interface version is not supported.@Deprecated public ErpSystemInfo getErpSystemInfo() throws QueryExecutionException, DestinationNotFoundException, DestinationAccessException
ErpSystemInfo
by querying the ABAP interface. The result may be cached.QueryExecutionException
- If the interface is not available or the ErpSystemInfo
cannot be retrieved correctly.DestinationNotFoundException
DestinationAccessException
@Deprecated public com.google.common.base.Optional<ErpSystemInfo> getErpSystemInfoIfPresent()
ErpSystemInfo
by querying the ABAP interface. The result may be cached.ErpSystemInfo
, if available.@Deprecated public ErpSystemInfo getErpSystemInfoIgnoringCache() throws QueryExecutionException, DestinationNotFoundException, DestinationAccessException
ErpSystemInfo
by querying the ABAP interface without using any cached results.
Note:This always executes an InfoQuery
against the ERP.
QueryExecutionException
- If the interface is not available or the ErpSystemInfo
cannot be retrieved correctly.DestinationNotFoundException
DestinationAccessException
public <QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends QueryResult<QueryT,QueryResultT>,QuerySerializerT extends QuerySerializer<QueryT,QueryResultT>> QueryResultT executeQuery(QueryT query, QuerySerializerT querySerializer) throws QuerySerializationException, QueryExecutionException, DestinationNotFoundException, DestinationAccessException
public <QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends QueryResult<QueryT,QueryResultT>> SerializedQueryResult<QueryT> executeQuery(SerializedQuery<QueryT> serializedQuery) throws QuerySerializationException, QueryExecutionException
@Generated(value="lombok") public QueryExecutionMeasurements getMeasurements()
public final ErpConfigContext getConfigContext()
public String getDestinationName()
getDestinationName
in interface WithDestinationName
Copyright © 2017 SAP SE. All rights reserved.