com.elasticpath.service.shipping
Interface ShippingServiceLevelService

All Superinterfaces:
EpPersistenceService, EpService
All Known Implementing Classes:
ShippingServiceLevelServiceImpl

public interface ShippingServiceLevelService
extends EpPersistenceService

Provide ShippingServiceLevel-related business service.


Method Summary
 ShippingServiceLevel add(ShippingServiceLevel shippingServiceLevel)
          Adds the given shippingServiceLevel.
 ShippingServiceLevel get(long shippingServiceLevelUid)
          Get the shippingServiceLevel with the given UID.
 java.util.List getAllShippingCostCalculationMethods()
          Get all the available shipping cost calculation methods configured in the system.
 java.util.Map getCountrySubCountryMapWithShippingService()
          Get the alphabetically sorted Map of countryCode -> subCountryCode list for all the countries/subcountries have ShippingServiceLevel configure at country level or subCountry level.
 java.util.List getShippingRegionInUseUidList()
          Get the list of uids of ShippingRegion used by existing ShippingServiceLevels.
 java.util.List getShippingServiceLevelInUseUidList()
          Get the list of uids of ShippingServiceLevel used by existing shipping related promotion rules.
 java.util.List list()
          List all shippingServiceLevels stored in the database.
 ShippingServiceLevel load(long shippingServiceLevelUid)
          Load the shippingServiceLevel with the given UID.
 void remove(ShippingServiceLevel shippingServiceLevel)
          Delete the shippingServiceLevel.
 java.util.List retrieveShippingServiceLevel(ShoppingCart shoppingCart)
          Retrieve the list of valid ShippingServiceLevel based on the region info inside the given ShoppingCart.
 void setAllShippingCostCalculationMethods(java.util.List allShippingCostCalculationMethods)
          Set all the available shipping cost calculation methods configured in the system.
 void update(ShippingServiceLevel shippingServiceLevel)
          Updates the given shippingServiceLevel.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

ShippingServiceLevel add(ShippingServiceLevel shippingServiceLevel)
                         throws EpServiceException
Adds the given shippingServiceLevel.

Parameters:
shippingServiceLevel - the shippingServiceLevel to add
Returns:
the persisted instance of shippingServiceLevel
Throws:
EpServiceException - - in case of any errors

get

ShippingServiceLevel get(long shippingServiceLevelUid)
                         throws EpServiceException
Get the shippingServiceLevel with the given UID. Return null if no matching record exists.

Parameters:
shippingServiceLevelUid - the shippingServiceLevel UID
Returns:
the shippingServiceLevel if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getAllShippingCostCalculationMethods

java.util.List getAllShippingCostCalculationMethods()
Get all the available shipping cost calculation methods configured in the system.

Returns:
the list available shipping cost calculation methods.

getCountrySubCountryMapWithShippingService

java.util.Map getCountrySubCountryMapWithShippingService()
Get the alphabetically sorted Map of countryCode -> subCountryCode list for all the countries/subcountries have ShippingServiceLevel configure at country level or subCountry level.

Returns:
the Map of countryCode -> subCountryCode.

getShippingRegionInUseUidList

java.util.List getShippingRegionInUseUidList()
Get the list of uids of ShippingRegion used by existing ShippingServiceLevels.

Returns:
the list of uids of ShippingRegions in use.

getShippingServiceLevelInUseUidList

java.util.List getShippingServiceLevelInUseUidList()
Get the list of uids of ShippingServiceLevel used by existing shipping related promotion rules.

Returns:
the list of uids of ShippingServiceLevels in use.

list

java.util.List list()
                    throws EpServiceException
List all shippingServiceLevels stored in the database.

Returns:
a list of shippingServiceLevels
Throws:
EpServiceException - - in case of any errors

load

ShippingServiceLevel load(long shippingServiceLevelUid)
                          throws EpServiceException
Load the shippingServiceLevel with the given UID. Throw an unrecoverable exception if there is no matching database row.

Parameters:
shippingServiceLevelUid - the shippingServiceLevel UID
Returns:
the shippingServiceLevel if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

remove

void remove(ShippingServiceLevel shippingServiceLevel)
            throws EpServiceException
Delete the shippingServiceLevel.

Parameters:
shippingServiceLevel - the shippingServiceLevel to remove
Throws:
EpServiceException - - in case of any errors

retrieveShippingServiceLevel

java.util.List retrieveShippingServiceLevel(ShoppingCart shoppingCart)
Retrieve the list of valid ShippingServiceLevel based on the region info inside the given ShoppingCart.

Parameters:
shoppingCart - -- the shoppingCart to be used to retrieve shippingServiceLevel info.
Returns:
he list of valid ShippingServiceLevel for the given shoppingCart.

setAllShippingCostCalculationMethods

void setAllShippingCostCalculationMethods(java.util.List allShippingCostCalculationMethods)
Set all the available shipping cost calculation methods configured in the system.

Parameters:
allShippingCostCalculationMethods - - the available shipping cost calculation methods.

update

void update(ShippingServiceLevel shippingServiceLevel)
            throws EpServiceException
Updates the given shippingServiceLevel.

Parameters:
shippingServiceLevel - the shippingServiceLevel to update
Throws:
EpServiceException - - in case of any errors