
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultDistributionChannelService 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 javax.annotation.Nonnull;
import javax.inject.Named;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.distributionchannel.DistributionChannelByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.distributionchannel.DistributionChannelFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.distributionchannel.DistributionChannelTextByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.distributionchannel.DistributionChannelTextFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.distributionchannel.batch.DefaultDistributionChannelServiceBatch;
/**
*
* This service enables you to display distribution channel master data to be consumed in SAP Fiori apps and on other
* user interfaces.
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_DISTRIBUTIONCHANNEL_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* SAP Analytics Cloud for Planning Integration (SAP_COM_0087)
*
*
* Scope Items:
* Integration between SAP S/4HANA Cloud and SAP Analytics Cloud
* (1YB)
*
*
* Authentication Methods:
* Basic, x509
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultDistributionChannelService" )
public class DefaultDistributionChannelService implements DistributionChannelService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link DistributionChannelService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultDistributionChannelService()
{
servicePath = DistributionChannelService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultDistributionChannelService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultDistributionChannelService withServicePath( @Nonnull final String servicePath )
{
return new DefaultDistributionChannelService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultDistributionChannelServiceBatch batch()
{
return new DefaultDistributionChannelServiceBatch(this);
}
@Override
@Nonnull
public DistributionChannelFluentHelper getAllDistributionChannel()
{
return new DistributionChannelFluentHelper(servicePath);
}
@Override
@Nonnull
public DistributionChannelByKeyFluentHelper getDistributionChannelByKey( final String distributionChannel )
{
return new DistributionChannelByKeyFluentHelper(servicePath, distributionChannel);
}
@Override
@Nonnull
public DistributionChannelTextFluentHelper getAllDistributionChannelText()
{
return new DistributionChannelTextFluentHelper(servicePath);
}
@Override
@Nonnull
public
DistributionChannelTextByKeyFluentHelper
getDistributionChannelTextByKey( final String distributionChannel, final String language )
{
return new DistributionChannelTextByKeyFluentHelper(servicePath, distributionChannel, language);
}
}