Chapter 8. Post-migration steps 137
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm
public void checkAppliedItems()
throws ECException
{
final String METHOD_NAME = "checkAppliedItems";
if(ECTrace.traceEnabled(COMPONENT))
{ECTrace.trace(
COMPONENT, CLASS_NAME, METHOD_NAME,
"itemIds=" + CalculationHelper.getInstance().toStri ng(iItems));
ECTrace.trace(
COMPONENT, CLASS_NAME, METHOD_NAME,
"appliedItems=" + appliedItems);
}
for(int i = 0; i < iItems.length; i++)
{Set appliedItems = getAppliedItems();
if(appliedItems == null || !appliedItems.contai ns(iItems[i]))
{TypedProperty exceptionData = iItems[i].createE xceptionData();
exceptionData.put(
ECConstants.EC_ERROR_CODE,
CalculationConstants.ERRCODE_SHIPPING_NOT_APPLI ED);
exceptionData.put(
CalculationConstants.EC_USAGE_ID,
"" + getUsageId());
throw new ECApplicationException(
ECMessage._ERR_CALCODE, CLASS_NAME, METHOD_NAME,
new Object[] {
getUsageId().toString(),
CalculationConstants.ERRCODE_SHIPPING_NOT_APPLI ED },
CalculationConstants.CALCODE_ERRVIEW, exceptionDa ta);
}
}
}
}
5. Optional: Register the new command implementation in the command registry using the following SQL:
insert into cmdreg
(storeent_id, interfacename, classname, lastupdate)
values