
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultSalesOrganizationService 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.salesorganization.SalesOrganizationByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.salesorganization.SalesOrganizationFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.salesorganization.SalesOrganizationTextByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.salesorganization.SalesOrganizationTextFluentHelper;
/**
*
* This service enables you to display sales organization master data to be consumed in SAP Fiori apps and on other user
* interfaces.
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_SALESORGANIZATION_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.DefaultSalesOrganizationService" )
public class DefaultSalesOrganizationService implements SalesOrganizationService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link SalesOrganizationService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultSalesOrganizationService()
{
servicePath = SalesOrganizationService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultSalesOrganizationService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultSalesOrganizationService withServicePath( @Nonnull final String servicePath )
{
return new DefaultSalesOrganizationService(servicePath);
}
@Override
@Nonnull
public SalesOrganizationFluentHelper getAllSalesOrganization()
{
return new SalesOrganizationFluentHelper(servicePath);
}
@Override
@Nonnull
public SalesOrganizationByKeyFluentHelper getSalesOrganizationByKey( final String salesOrganization )
{
return new SalesOrganizationByKeyFluentHelper(servicePath, salesOrganization);
}
@Override
@Nonnull
public SalesOrganizationTextFluentHelper getAllSalesOrganizationText()
{
return new SalesOrganizationTextFluentHelper(servicePath);
}
@Override
@Nonnull
public
SalesOrganizationTextByKeyFluentHelper
getSalesOrganizationTextByKey( final String salesOrganization, final String language )
{
return new SalesOrganizationTextByKeyFluentHelper(servicePath, salesOrganization, language);
}
}