public final 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 ERP destination with name
ErpDestination.getDefaultName() . |
ErpEndpoint(ErpConfigContext erpConfigContext)
Construct a new ERP endpoint.
|
ErpEndpoint(ErpConfigContext erpConfigContext,
ErpQuerySignerFactory querySignerFactory) |
Modifier and Type | Method and Description |
---|---|
void |
assertMinInterfaceVersion(int minVersionRequired)
Asserts that the given ABAP interface version is available.
|
<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()
Retrieves the
ErpSystemInfo by querying the ABAP interface. |
com.google.common.base.Optional<ErpSystemInfo> |
getErpSystemInfoIfPresent()
Retrieves the
ErpSystemInfo by querying the ABAP interface. |
ErpSystemInfo |
getErpSystemInfoIgnoringCache()
Retrieves the
ErpSystemInfo by querying the ABAP interface without using any cached results. |
QueryExecutionMeasurements |
getMeasurements() |
public ErpEndpoint()
ErpDestination.getDefaultName()
.public ErpEndpoint(@Nullable ErpConfigContext erpConfigContext)
public ErpEndpoint(@Nullable ErpConfigContext erpConfigContext, @Nullable ErpQuerySignerFactory querySignerFactory)
public void assertMinInterfaceVersion(int minVersionRequired) throws QueryExecutionException, AbapInterfaceNotSupportedException
QueryExecutionException
- If the ABAP interface version could not be retrieved.AbapInterfaceNotSupportedException
- If the given ABAP interface version is not supported.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
public com.google.common.base.Optional<ErpSystemInfo> getErpSystemInfoIfPresent()
ErpSystemInfo
by querying the ABAP interface. The result may be cached.ErpSystemInfo
, if available.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.