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().toString(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.contains(iItems[i]))

{

TypedProperty exceptionData = iItems[i].createExceptionData();

exceptionData.put( ECConstants.EC_ERROR_CODE, CalculationConstants.ERRCODE_SHIPPING_NOT_APPLIED);

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_APPLIED },

CalculationConstants.CALCODE_ERRVIEW, exceptionData);

}

}

}

}

5.Optional: Register the new command implementation in the command registry using the following SQL:

insert into cmdreg

(storeent_id, interfacename, classname, lastupdate) values

Chapter 8. Post-migration steps

137

Page 155
Image 155
IBM SG24-6320-00 manual 137