
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultBusinessEventQueueService Maven / Gradle / Ivy
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.s4hana.datamodel.odata.services;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BehqueuedataByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BehqueuedataFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BusObjectsByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BusObjectsFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BusinessObjectKeysByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.BusinessObjectKeysFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesseventqueue.batch.DefaultBusinessEventQueueServiceBatch;
/**
*
* This service enables you to read the event queue, which contains a list of triggered business events. The content of
* the event is limited to a generic base data, but will not contain any application- specific data due to security
* constraints. In addition, you can also view the data relevant to the business object type. Each business object type
* has one or more key fields.
*
*
*
* Reference: SAP API
* Business Hub
*
* Details:
*
*
* OData Service:
* C_BEHQUEUEDATA_CDS
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Business Event Handling Integration (SAP_COM_0121)
*
*
* Scope Items:
* Business Object Event Handling (1NN)
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultBusinessEventQueueService" )
public class DefaultBusinessEventQueueService implements BusinessEventQueueService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link BusinessEventQueueService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultBusinessEventQueueService()
{
servicePath = BusinessEventQueueService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultBusinessEventQueueService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultBusinessEventQueueService withServicePath( @Nonnull final String servicePath )
{
return new DefaultBusinessEventQueueService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultBusinessEventQueueServiceBatch batch()
{
return new DefaultBusinessEventQueueServiceBatch(this);
}
@Override
@Nonnull
public BehqueuedataFluentHelper getAllBehqueuedata()
{
return new BehqueuedataFluentHelper(servicePath);
}
@Override
@Nonnull
public BehqueuedataByKeyFluentHelper getBehqueuedataByKey( final UUID businessEvent )
{
return new BehqueuedataByKeyFluentHelper(servicePath, businessEvent);
}
@Override
@Nonnull
public BusinessObjectKeysFluentHelper getAllBusinessObjectKeys()
{
return new BusinessObjectKeysFluentHelper(servicePath);
}
@Override
@Nonnull
public BusinessObjectKeysByKeyFluentHelper getBusinessObjectKeysByKey( final String sAPObjectType )
{
return new BusinessObjectKeysByKeyFluentHelper(servicePath, sAPObjectType);
}
@Override
@Nonnull
public BusObjectsFluentHelper getAllBusObjects()
{
return new BusObjectsFluentHelper(servicePath);
}
@Override
@Nonnull
public BusObjectsByKeyFluentHelper getBusObjectsByKey(
final String sAPObjectType,
final String sAPObjectTypeName,
final String sAPObjectTaskCode,
final String sAPObjectTaskTypeName )
{
return new BusObjectsByKeyFluentHelper(
servicePath,
sAPObjectType,
sAPObjectTypeName,
sAPObjectTaskCode,
sAPObjectTaskTypeName);
}
}