com.retek.component.shipping
Interface ShippingMethod

All Superinterfaces:
BusinessObject, com.retek.swing11.commons.type.Displayable, DistributedObject

public interface ShippingMethod
extends DistributedObject, com.retek.swing11.commons.type.Displayable

The way an item is shipped to a customer. Some examples are same day, overnight and 2-day. Also known as a carrier service.


Field Summary
static java.lang.String DEFAULT_CARRIER
           
static int DEFAULT_DELIVERY_DAYS
           
static java.lang.String DELIVERY_DAYS
           
static java.lang.String DISPLAY_CODE
           
static int MAX_DELIVERY_DAYS
           
 
Method Summary
 void addCarrier(Carrier carrier)
          Adds the specified carrier to the list of carriers that provide this shipping method.
 void addCarrierZone(Carrier carrier, CarrierShippingMethodZone carrierZone)
           
 java.util.Set getCarriers()
          Returns the list of carriers that provide this shipping method.
 int getCarrierTransitDays(Carrier carrier, java.lang.String shipFromZipCode, java.lang.String shipToZipCode)
           
 Carrier getDefaultCarrier()
          Returns the default carrier for this shipping method.
 int getDeliveryDays()
          Returns the number of days it takes to deliver an item via this shipping method.
 java.lang.String getDescription()
           
 java.lang.String getDisplayCode()
           
 boolean hasCarrier(Carrier carrier)
          Checks to see if this carrier is valid for this shipping method
 boolean isRushDeliveryForCarrier(Carrier carrier)
          Returns whether the specified carrier is rush delivery for this shipping method.
 void removeCarrier(Carrier carrier)
          Removes the specified carrier from the list of carriers that provide this shipping method.
 void setDefaultCarrier(Carrier carrier)
          Sets the default carrier for this shipping method.
 void setDeliveryDays(int deliveryDays)
          Sets the number of days it takes to deliver an item via this shipping method.
 void setDescription(java.lang.String description)
          Sets the description of this shipping method.
 void setRushDeliveryForCarrier(Carrier carrier, boolean isRushDelivery)
          Sets the rush delivery for the specified carrier for this shipping method.
 void submit()
          Saves (i.e., creates or updates) this shipping method.
 
Methods inherited from interface com.retek.commons.component.DistributedObject
debugToString, discardChanges, getContext, getId, getReference, isDeleted, isDirty, isDirtyDeep, isDirtyIgnoreFields, isPersisted, refresh
 
Methods inherited from interface com.retek.commons.component.BusinessObject
getBusinessInterface
 
Methods inherited from interface com.retek.swing11.commons.type.Displayable
toDisplayString
 

Field Detail

DELIVERY_DAYS

public static final java.lang.String DELIVERY_DAYS
See Also:
Constant Field Values

DEFAULT_CARRIER

public static final java.lang.String DEFAULT_CARRIER
See Also:
Constant Field Values

DISPLAY_CODE

public static final java.lang.String DISPLAY_CODE
See Also:
Constant Field Values

DEFAULT_DELIVERY_DAYS

public static final int DEFAULT_DELIVERY_DAYS
See Also:
Constant Field Values

MAX_DELIVERY_DAYS

public static final int MAX_DELIVERY_DAYS
See Also:
Constant Field Values
Method Detail

getDisplayCode

public java.lang.String getDisplayCode()
                                throws SystemException
Throws:
SystemException

getDescription

public java.lang.String getDescription()
                                throws SystemException
Throws:
SystemException

getDeliveryDays

public int getDeliveryDays()
                    throws SystemException
Returns the number of days it takes to deliver an item via this shipping method.

Throws:
SystemException

getDefaultCarrier

public Carrier getDefaultCarrier()
                          throws SystemException
Returns the default carrier for this shipping method.

Throws:
SystemException

isRushDeliveryForCarrier

public boolean isRushDeliveryForCarrier(Carrier carrier)
                                 throws SystemException
Returns whether the specified carrier is rush delivery for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Throws:
SystemException

getCarriers

public java.util.Set getCarriers()
                          throws SystemException
Returns the list of carriers that provide this shipping method.

Returns:
a list of Carrier objects
Throws:
SystemException

setDescription

public void setDescription(java.lang.String description)
                    throws SystemException
Sets the description of this shipping method.

Throws:
SystemException

setDeliveryDays

public void setDeliveryDays(int deliveryDays)
                     throws SystemException
Sets the number of days it takes to deliver an item via this shipping method.

Throws:
SystemException

addCarrier

public void addCarrier(Carrier carrier)
                throws SystemException
Adds the specified carrier to the list of carriers that provide this shipping method.

Throws:
SystemException

removeCarrier

public void removeCarrier(Carrier carrier)
                   throws SystemException
Removes the specified carrier from the list of carriers that provide this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Throws:
SystemException

setDefaultCarrier

public void setDefaultCarrier(Carrier carrier)
                       throws SystemException
Sets the default carrier for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Throws:
SystemException

setRushDeliveryForCarrier

public void setRushDeliveryForCarrier(Carrier carrier,
                                      boolean isRushDelivery)
                               throws SystemException
Sets the rush delivery for the specified carrier for this shipping method. The carrier must first exist on the shipping method by calling addCarrier(carrier) before calling this method.

Throws:
SystemException

submit

public void submit()
            throws InvalidShippingMethodException,
                   SystemException,
                   BusinessException
Saves (i.e., creates or updates) this shipping method. Ensures that this shipping method is valid before saving it. In order to be valid, the delivery days must be greater than or equal to 0 and less than or equal to MAX_DELIVERY_DAYS, and the default carrier must be set.

Throws:
InvalidShippingMethodException - if the delivery days are invalid, or the default carrier is not set
ShippingBusinessException - if trying to create a new shipping method with an existing ID
SystemException
BusinessException

getCarrierTransitDays

public int getCarrierTransitDays(Carrier carrier,
                                 java.lang.String shipFromZipCode,
                                 java.lang.String shipToZipCode)
                          throws SystemException,
                                 BusinessException
Throws:
SystemException
BusinessException

addCarrierZone

public void addCarrierZone(Carrier carrier,
                           CarrierShippingMethodZone carrierZone)
                    throws SystemException
Throws:
SystemException

hasCarrier

public boolean hasCarrier(Carrier carrier)
                   throws SystemException
Checks to see if this carrier is valid for this shipping method

Returns:
boolean True = shipping method valid for carrier
Throws:
SystemException


Copyright © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25