@Service(value="blFulfillmentLocationService") public class FulfillmentLocationServiceImpl extends Object implements FulfillmentLocationService
| Modifier and Type | Field and Description |
|---|---|
protected FulfillmentLocationDao |
fulfillmentLocationDao |
| Constructor and Description |
|---|
FulfillmentLocationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
FulfillmentLocation |
createNew()
Creates a new instance of a FulfillmentLocation.
|
void |
delete(FulfillmentLocation fulfillmentLocation)
Deletes the passed
FulfillmentLocation |
List<FulfillmentLocation> |
findAll()
Retrieves all of the fulfillment locations
|
List<FulfillmentLocation> |
findAllFulfillmentLocations(org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
Gets all of the fulfillment locations for the specified fulfillment type.
|
List<FulfillmentLocation> |
findAllFulfillmentLocationsForSku(Long skuId)
Returns all fulfillment locations associated with a
Sku. |
List<FulfillmentLocation> |
findAllFulfillmentLocationsForSku(Long skuId,
org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
Returns all fulfillment locations associated with a sku for a particular fulfillment type.
|
List<FulfillmentLocation> |
findAllFulfillmentLocationsForSku(Long skuId,
org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType,
int minimumQuantity)
Returns all fulfillment locations associated with a sku for a particular fulfillment type and has at least enough
inventory as quantity.
|
FulfillmentLocation |
findById(Long fulfillmentLocationId)
Retrieves a
FulfillmentLocation from the given id |
FulfillmentLocation |
findDefaultFulfillmentLocation()
Returns the first default fulfillment location found.
|
FulfillmentLocation |
save(FulfillmentLocation fulfillmentLocation)
Persists the
FulfillmentLocation |
void |
updateOtherDefaultLocationToFalse(FulfillmentLocation fulfillmentLocation)
Updates all
FulfillmentLocations in the database to false, excluding the FulfillmentLocation that was
passed in |
protected FulfillmentLocationDao fulfillmentLocationDao
public List<FulfillmentLocation> findAll()
FulfillmentLocationServicefindAll in interface FulfillmentLocationServiceList of FulfillmentLocationpublic FulfillmentLocation findById(Long fulfillmentLocationId)
FulfillmentLocationServiceFulfillmentLocation from the given idfindById in interface FulfillmentLocationServiceFulfillmentLocation@Transactional(value="blTransactionManager") public FulfillmentLocation save(FulfillmentLocation fulfillmentLocation)
FulfillmentLocationServiceFulfillmentLocationsave in interface FulfillmentLocationServiceFulfillmentLocation@Transactional(value="blTransactionManager") public void delete(FulfillmentLocation fulfillmentLocation)
FulfillmentLocationServiceFulfillmentLocationdelete in interface FulfillmentLocationServicepublic FulfillmentLocation findDefaultFulfillmentLocation()
FulfillmentLocationServicefindDefaultFulfillmentLocation in interface FulfillmentLocationServicepublic List<FulfillmentLocation> findAllFulfillmentLocationsForSku(Long skuId)
FulfillmentLocationServiceSku. This does not take into account any matching
fulfillment types.findAllFulfillmentLocationsForSku in interface FulfillmentLocationServicepublic List<FulfillmentLocation> findAllFulfillmentLocationsForSku(Long skuId, org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
FulfillmentLocationServiceFulfillmentLocationService.findAllFulfillmentLocationsForSku(Long)findAllFulfillmentLocationsForSku in interface FulfillmentLocationServicefulfillmentType - (optional) the type of FulfillmentLocation to look forFulfillmentLocations that can be found for the given Sku. If the given fulfillmentType
is null or FulfillmentType.PHYSICAL_PICKUP_OR_SHIP then the resulting list could be fulfillment locations
that have either FulfillmentType.PHYSICAL_PICKUP_OR_SHIP, FulfillmentType#SHIP or
FulfillmentType.PHYSICAL_PICKUPpublic List<FulfillmentLocation> findAllFulfillmentLocationsForSku(Long skuId, org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType, int minimumQuantity)
FulfillmentLocationServicefindAllFulfillmentLocationsForSku in interface FulfillmentLocationServiceskuId - the Sku to look upfulfillmentType - (optional) type of FulfillmentLocation to look forFulfillmentLocations that can be found for the given Sku. If the given fulfillmentType
is null or FulfillmentType.PHYSICAL_PICKUP_OR_SHIP then the resulting list could be fulfillment locations
that have either FulfillmentType.PHYSICAL_PICKUP_OR_SHIP, FulfillmentType#SHIP or
FulfillmentType.PHYSICAL_PICKUPpublic List<FulfillmentLocation> findAllFulfillmentLocations(org.broadleafcommerce.core.order.service.type.FulfillmentType fulfillmentType)
FulfillmentLocationServiceFulfillmentType.PHYSICAL_PICKUP_OR_SHIP then this will pick up both FulfillmentType.PHYSICAL_PICKUP
as well as FulfillmentType.PHYSICAL_SHIP. If the given fulfillmentType is null, this is equivalent
to invoking FulfillmentLocationService.findAll()findAllFulfillmentLocations in interface FulfillmentLocationServicefulfillmentType - the type of fulfillment location to findpublic FulfillmentLocation createNew()
FulfillmentLocationServicecreateNew in interface FulfillmentLocationService@Transactional(value="blTransactionManager") public void updateOtherDefaultLocationToFalse(FulfillmentLocation fulfillmentLocation)
FulfillmentLocationServiceFulfillmentLocations in the database to false, excluding the FulfillmentLocation that was
passed inupdateOtherDefaultLocationToFalse in interface FulfillmentLocationServicefulfillmentLocation - the FulfillmentLocation that will essentially become the new default locationCopyright © 2020. All rights reserved.