Class SapProductAvailabilityBackendERP
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
-
- de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
-
- de.hybris.platform.sap.sapproductavailability.backend.impl.SapProductAvailabilityBackendERP
-
- All Implemented Interfaces:
BackendBusinessObject,BackendBusinessObjectJCo,SapProductAvailabilityBackend
public class SapProductAvailabilityBackendERP extends BackendBusinessObjectBaseJCo implements SapProductAvailabilityBackend
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringBAPI_CUSTMATINFO_GETDETAILMConstant for the RFC enabled FM name used to retrieve the plant from the customer material.protected static java.lang.StringBAPI_CUSTOMER_GETDETAIL1Constant for the RFC enabled FM name used to retrieve the plant from the customer.protected static java.lang.StringBAPI_MATERIAL_AVAILABILITYConstant for the RFC enabled FM name used to perform product availability check in the ERP system.protected static java.lang.StringBAPI_MATERIAL_GET_DETAILConstant for the RFC enabled FM name used to verify whether the material is available in the given plantprotected static java.lang.StringBAPI_RETURN_SUCCESSConstant for successful return of the RFC enabled FMs.-
Fields inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
genericFactory, moduleConfigurationAccess
-
-
Constructor Summary
Constructors Constructor Description SapProductAvailabilityBackendERP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SapProductAvailabilityCachegetCachedBackend()ModuleConfigurationAccessgetConfigAccess()JCoManagedConnectionFactorygetManagedConnectionFactory()protected java.lang.StringgetProperty(java.lang.String name)protected booleanisMaterialAvailableInPlant(java.lang.String material, java.lang.String plant)Checks if a material is available in the plant given.java.lang.StringreadPlant(ProductModel product, java.lang.String customerId)Returns the plant name given information about a product.protected java.lang.StringreadPlantForCustomer(java.lang.String material, java.lang.String customerId)Gets the customer's plant by calling BAPI_CUSTOMER_GETDETAIL1, only possible with releases from 4.5b onwards.java.lang.StringreadPlantForCustomerMaterial(java.lang.String material, java.lang.String customerId)Gets the plant from the customer material record.SapProductAvailabilityreadProductAvailability(ProductModel product, java.lang.String customerId, java.lang.String plant, java.lang.Long requestedQuantity)Reads availability information given the search criteria.voidsetManagedConnectionFactory(JCoManagedConnectionFactory managedConnectionFactory)-
Methods inherited from class de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
getDefaultConnectionName, getDefaultDestinationName, getDefaultJCoConnection, getJCoConnection, getJCoConnection, getModuleId, setDefaultConnectionName, setDefaultDestinationName, setManagedConnectionContainer, toString
-
Methods inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
destroyBackendObject, getModuleConfigurationAccess, initBackendObject, setGenericFactory, setModuleConfigurationAccess
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.sap.core.bol.backend.BackendBusinessObject
destroyBackendObject, initBackendObject
-
-
-
-
Field Detail
-
BAPI_MATERIAL_AVAILABILITY
protected static java.lang.String BAPI_MATERIAL_AVAILABILITY
Constant for the RFC enabled FM name used to perform product availability check in the ERP system.
-
BAPI_CUSTMATINFO_GETDETAILM
protected static java.lang.String BAPI_CUSTMATINFO_GETDETAILM
Constant for the RFC enabled FM name used to retrieve the plant from the customer material.
-
BAPI_MATERIAL_GET_DETAIL
protected static java.lang.String BAPI_MATERIAL_GET_DETAIL
Constant for the RFC enabled FM name used to verify whether the material is available in the given plant
-
BAPI_CUSTOMER_GETDETAIL1
protected static java.lang.String BAPI_CUSTOMER_GETDETAIL1
Constant for the RFC enabled FM name used to retrieve the plant from the customer.
-
BAPI_RETURN_SUCCESS
protected static java.lang.String BAPI_RETURN_SUCCESS
Constant for successful return of the RFC enabled FMs.
-
-
Method Detail
-
getCachedBackend
public SapProductAvailabilityCache getCachedBackend()
-
getConfigAccess
public ModuleConfigurationAccess getConfigAccess()
-
readProductAvailability
public SapProductAvailability readProductAvailability(ProductModel product, java.lang.String customerId, java.lang.String plant, java.lang.Long requestedQuantity) throws BackendException
Description copied from interface:SapProductAvailabilityBackendReads availability information given the search criteria. (Might return '0 for current date available, 1 for tomorrow').- Specified by:
readProductAvailabilityin interfaceSapProductAvailabilityBackend- Returns:
- Throws:
BackendException
-
readPlant
public java.lang.String readPlant(ProductModel product, java.lang.String customerId) throws BackendException
Description copied from interface:SapProductAvailabilityBackendReturns the plant name given information about a product.- Specified by:
readPlantin interfaceSapProductAvailabilityBackend- Returns:
- String plant
- Throws:
BackendException
-
readPlantForCustomerMaterial
public java.lang.String readPlantForCustomerMaterial(java.lang.String material, java.lang.String customerId) throws BackendExceptionDescription copied from interface:SapProductAvailabilityBackendGets the plant from the customer material record. Uses RFC BAPI_CUSTMATINFO_GETDETAILM.- Specified by:
readPlantForCustomerMaterialin interfaceSapProductAvailabilityBackend- Returns:
- Plant
- Throws:
BackendException
-
isMaterialAvailableInPlant
protected boolean isMaterialAvailableInPlant(java.lang.String material, java.lang.String plant) throws BackendExceptionChecks if a material is available in the plant given. Uses BAPI_MATERIAL_GET_DETAIL.- Parameters:
material- the R/3 material noplant- the R/3 plant- Returns:
trueif material exists in plant,falseotherwise- Throws:
BackendException- exception from backend
-
readPlantForCustomer
protected java.lang.String readPlantForCustomer(java.lang.String material, java.lang.String customerId) throws BackendExceptionGets the customer's plant by calling BAPI_CUSTOMER_GETDETAIL1, only possible with releases from 4.5b onwards. Checks return segments PE_OPT_PERSONALDATA and PE_OPT_COMPANYDATA for the delivery plant.- Parameters:
material-customerId-- Returns:
- cutomer's plant
- Throws:
BackendException
-
getManagedConnectionFactory
public JCoManagedConnectionFactory getManagedConnectionFactory()
- Returns:
- the managedConnectionFactory
-
setManagedConnectionFactory
public void setManagedConnectionFactory(JCoManagedConnectionFactory managedConnectionFactory)
- Parameters:
managedConnectionFactory- the managedConnectionFactory to set
-
getProperty
protected java.lang.String getProperty(java.lang.String name)
-
-