
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultServiceEntrySheetService 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.serviceentrysheet.RevokeApprovalFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheet;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetCreateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetItem;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetItemByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetItemFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetItemUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.ServiceEntrySheetUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.SrvcEntrShtAcctAssignment;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.SrvcEntrShtAcctAssignmentByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.SrvcEntrShtAcctAssignmentFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.SrvcEntrShtAcctAssignmentUpdateFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.SubmitForApprovalFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.WithdrawFromApprovalFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.serviceentrysheet.batch.DefaultServiceEntrySheetServiceBatch;
/**
*
* This synchronous inbound OData service enables a remote system to read and create service entry sheets from or in the
* SAP S/4HANA system. You can use this service to submit a service entry sheet for approval, withdraw it from approval,
* or revoke approval of an already approved service entry sheet.
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_SERVICE_ENTRY_SHEET_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Service Entry Sheet Integration (SAP_COM_0146)
*
*
* Scope Items:
* Procurement of Services (22Z),
* Consumable Purchasing (BNX),
* Service and Material Procurement - Project-Based Services
* (J13)
*
*
* Authentication Methods:
* Basic, x509
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultServiceEntrySheetService" )
public class DefaultServiceEntrySheetService implements ServiceEntrySheetService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link ServiceEntrySheetService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultServiceEntrySheetService()
{
servicePath = ServiceEntrySheetService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultServiceEntrySheetService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultServiceEntrySheetService withServicePath( @Nonnull final String servicePath )
{
return new DefaultServiceEntrySheetService(servicePath);
}
/**
* {@inheritDoc}
*
*/
@Override
@Nonnull
public DefaultServiceEntrySheetServiceBatch batch()
{
return new DefaultServiceEntrySheetServiceBatch(this);
}
@Override
@Nonnull
public ServiceEntrySheetFluentHelper getAllServiceEntrySheet()
{
return new ServiceEntrySheetFluentHelper(servicePath);
}
@Override
@Nonnull
public ServiceEntrySheetByKeyFluentHelper getServiceEntrySheetByKey( final String serviceEntrySheet )
{
return new ServiceEntrySheetByKeyFluentHelper(servicePath, serviceEntrySheet);
}
@Override
@Nonnull
public ServiceEntrySheetCreateFluentHelper createServiceEntrySheet(
@Nonnull final ServiceEntrySheet serviceEntrySheet )
{
return new ServiceEntrySheetCreateFluentHelper(servicePath, serviceEntrySheet);
}
@Override
@Nonnull
public ServiceEntrySheetUpdateFluentHelper updateServiceEntrySheet(
@Nonnull final ServiceEntrySheet serviceEntrySheet )
{
return new ServiceEntrySheetUpdateFluentHelper(servicePath, serviceEntrySheet);
}
@Override
@Nonnull
public ServiceEntrySheetItemFluentHelper getAllServiceEntrySheetItem()
{
return new ServiceEntrySheetItemFluentHelper(servicePath);
}
@Override
@Nonnull
public
ServiceEntrySheetItemByKeyFluentHelper
getServiceEntrySheetItemByKey( final String serviceEntrySheet, final String serviceEntrySheetItem )
{
return new ServiceEntrySheetItemByKeyFluentHelper(servicePath, serviceEntrySheet, serviceEntrySheetItem);
}
@Override
@Nonnull
public ServiceEntrySheetItemUpdateFluentHelper updateServiceEntrySheetItem(
@Nonnull final ServiceEntrySheetItem serviceEntrySheetItem )
{
return new ServiceEntrySheetItemUpdateFluentHelper(servicePath, serviceEntrySheetItem);
}
@Override
@Nonnull
public SrvcEntrShtAcctAssignmentFluentHelper getAllSrvcEntrShtAcctAssignment()
{
return new SrvcEntrShtAcctAssignmentFluentHelper(servicePath);
}
@Override
@Nonnull
public SrvcEntrShtAcctAssignmentByKeyFluentHelper getSrvcEntrShtAcctAssignmentByKey(
final String serviceEntrySheet,
final String serviceEntrySheetItem,
final String accountAssignment )
{
return new SrvcEntrShtAcctAssignmentByKeyFluentHelper(
servicePath,
serviceEntrySheet,
serviceEntrySheetItem,
accountAssignment);
}
@Override
@Nonnull
public SrvcEntrShtAcctAssignmentUpdateFluentHelper updateSrvcEntrShtAcctAssignment(
@Nonnull final SrvcEntrShtAcctAssignment srvcEntrShtAcctAssignment )
{
return new SrvcEntrShtAcctAssignmentUpdateFluentHelper(servicePath, srvcEntrShtAcctAssignment);
}
@Override
@Nonnull
public SubmitForApprovalFluentHelper submitForApproval( final String serviceEntrySheet )
{
return new SubmitForApprovalFluentHelper(servicePath, serviceEntrySheet);
}
@Override
@Nonnull
public RevokeApprovalFluentHelper revokeApproval( final String postingDate, final String serviceEntrySheet )
{
return new RevokeApprovalFluentHelper(servicePath, postingDate, serviceEntrySheet);
}
@Override
@Nonnull
public WithdrawFromApprovalFluentHelper withdrawFromApproval( final String serviceEntrySheet )
{
return new WithdrawFromApprovalFluentHelper(servicePath, serviceEntrySheet);
}
}