Permalink
Browse files

rename HUTransformService.get() to newInstance()

  • Loading branch information...
teosarca committed Dec 8, 2017
1 parent 5a19805 commit b7e55972f63434e6f104f3b866147289217698dd
@@ -106,7 +106,7 @@ protected String doIt()
final I_M_HU topLevelHU = getRecord(I_M_HU.class);
final HUsToNewTUsRequest request = HUsToNewTUsRequest.forSourceHuAndQty(topLevelHU, p_QtyTU);
final List<I_M_HU> tus = HUTransformService.get().husToNewTUs(request);
final List<I_M_HU> tus = HUTransformService.newInstance().husToNewTUs(request);
if (tus.size() != p_QtyTU)
{
throw new AdempiereException(WEBUI_HU_Constants.MSG_NotEnoughTUsFound, new Object[] { p_QtyTU, tus.size() });
@@ -124,7 +124,7 @@ protected String doIt() throws Exception
//
// Split out the TUs we need to return
final HUsToNewTUsRequest request = HUsToNewTUsRequest.forSourceHuAndQty(topLevelHU, p_QtyTU);
tusToReturn = HUTransformService.get().husToNewTUs(request);
tusToReturn = HUTransformService.newInstance().husToNewTUs(request);
if (tusToReturn.size() != p_QtyTU)
{
throw new AdempiereException(WEBUI_HU_Constants.MSG_NotEnoughTUsFound, new Object[] { p_QtyTU, tusToReturn.size() });
@@ -126,12 +126,12 @@ public Object getParameterDefaultValue(final String parameterName)
if (WEBUI_M_HU_Transform.PARAM_QtyCU.equals(parameterName))
{
final I_M_HU cu = getSelectedRow().getM_HU(); // should work, because otherwise the param is not even shown.
return HUTransformService.get().getMaximumQtyCU(cu);
return HUTransformService.newInstance().getMaximumQtyCU(cu);
}
else if (WEBUI_M_HU_Transform.PARAM_QtyTU.equals(parameterName))
{
final I_M_HU tu = getSelectedRow().getM_HU(); // should work, because otherwise the param is not even shown.
return HUTransformService.get().getMaximumQtyTU(tu);
return HUTransformService.newInstance().getMaximumQtyTU(tu);
}
else if (WEBUI_M_HU_Transform.PARAM_HUPlanningReceiptOwnerPM_TU.equals(parameterName))
{
@@ -75,7 +75,7 @@ protected String doIt() throws Exception
final I_M_HU sourceLUorTU = row.getM_HU();
final HUsToNewTUsRequest request = HUsToNewTUsRequest.forSourceHuAndQty(sourceLUorTU, qtyTUs);
final List<I_M_HU> extractedTUs = HUTransformService.get().husToNewTUs(request);
final List<I_M_HU> extractedTUs = HUTransformService.newInstance().husToNewTUs(request);
if (extractedTUs.isEmpty())
{
throw new AdempiereException("@NoSelection@");

0 comments on commit b7e5597

Please sign in to comment.