IBM SG24-6320-00 Marine Radio User Manual


 
Chapter 8. Post-migration steps 135
Draft Document for Review July 28, 2004 7:33 pm 6320ch_DEV_post_migration.fm
2. Use Table 8-1 on page 133 to identify the WebSphere Commerce V5.6
interface that match the WebSphere Commerce Suite V5.1 interface used in
the previous step.
In our example, the WebSphere Commerce V5.6 interface is
com.ibm.commerce.order.calculation.ApplyShippingCmd.
3. Create a custom interface, extending the the WebSphere Commerce V5.6
command interface. Add two constants, NAME and defaultCommandClassName
to the interface, containing the name, including package, of the custom
interface and the implementing class, respectively. The implementing class is
created in the next step.
Example 8-4 Sample MyApplyShippingCmd
package mypackage;
public interface MyApplyShippingCmd
extends com.ibm.commerce.order.calculation.ApplyShippingCmd
{
public static final String NAME = “mypackage.MyApplyShippingCmd“;
public static final String defaultCommandClassName =
“mypackage.MyApplyShippingCmdImpl“;
}
4. Create a custom class, implementing the interface created in the previous
step and extending from the WebSphere Commerce V5.6 command
implementation class. Refer to “Interface changes” on page 139 for details
about the interface changes from WebSphere Commerce Suite V5.1 to
WebSphere Commerce V5.6.
Our resulting implementation class is shown in Example 8-5.
Example 8-5 Sample MyApplyShippingCmdImpl
package mypackage;
import java.util.Set;
import java.util.HashSet;
public class MyApplyShippingCmdImpl
extends com.ibm.commerce.order.calculation.ApplyShippingCmdImpl
implements MyApplyShippingCmd
{
private static final long COMPONENT = ECTraceIdentifiers.COMPONENT_EXTERN;
private Item[] iItems = new Item[0];
private Set iAppliedItems = new HashSet();
/**
* Get the list of order items that must be processed.