
com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultInspectionMethodService 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.inspectionmethod.InspectionMethodByKeyFluentHelper;
import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.inspectionmethod.InspectionMethodFluentHelper;
/**
*
* This service enables you to read inspection methods from the SAP S/4HANA system. An inspection method describes the
* procedure for performing the quality inspection of a characteristic.
*
*
*
* Reference: SAP
* API Business Hub
*
* Details:
*
*
* OData Service:
* API_INSPECTIONMETHOD_SRV
*
*
* API Version:
* 1
*
*
* Communication Scenario:
* Inspection Master Data Integration (SAP_COM_0110)
*
*
* Scope Items:
* Quality Management in Discrete Manufacturing (1E1),
* Quality Management in Procurement (1FM),
* Quality Management in Sales (1MP),
* Quality Management in Stock Handling (1MR),
* Nonconformance Management (2QN)
*
*
* Authentication Methods:
* Basic, x509, OAuth2
*
*
* Business Object:
* InspectionMethod
*
*
*
*/
@Named( "com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultInspectionMethodService" )
public class DefaultInspectionMethodService implements InspectionMethodService
{
@Nonnull
private final String servicePath;
/**
* Creates a service using {@link InspectionMethodService#DEFAULT_SERVICE_PATH} to send the requests.
*
*/
public DefaultInspectionMethodService()
{
servicePath = InspectionMethodService.DEFAULT_SERVICE_PATH;
}
/**
* Creates a service using the provided service path to send the requests.
*
* Used by the fluent {@link #withServicePath(String)} method.
*
*/
private DefaultInspectionMethodService( @Nonnull final String servicePath )
{
this.servicePath = servicePath;
}
@Override
@Nonnull
public DefaultInspectionMethodService withServicePath( @Nonnull final String servicePath )
{
return new DefaultInspectionMethodService(servicePath);
}
@Override
@Nonnull
public InspectionMethodFluentHelper getAllInspectionMethod()
{
return new InspectionMethodFluentHelper(servicePath);
}
@Override
@Nonnull
public InspectionMethodByKeyFluentHelper getInspectionMethodByKey(
final String inspectionMethod,
final String inspectionMethodVersion,
final String inspectionMethodPlant )
{
return new InspectionMethodByKeyFluentHelper(
servicePath,
inspectionMethod,
inspectionMethodVersion,
inspectionMethodPlant);
}
}