Package com.skava.shipping.helper
Class ShippingCalculationHelper
java.lang.Object
com.skava.shipping.helper.ShippingCalculationHelper
The Class ShippingCollectionPropertiesHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
allowedCountryCheck
(long collectionId, String countryNameToBeChecked) this method check whether the given country allowed to be or not returns error if not allowedgetAddress
(Shipping dtoModel, Items itemdtoModel, ShippingRequest request) Gets the address.getCollectionProperty
(long collectionId, String propertyName, String locale) Find the collection property valueGets the type.List<com.skava.core.validation.ValidatorComponent>
getValidatorsFromCollectionProperty
(long collectionId, String validatorPropName, String defaultValidator, String locale) This method is used to load the list of validators from the given collection propertyplugInLoader
(ShippingRequest shippingRequest) Plug in loader.
-
Constructor Details
-
ShippingCalculationHelper
public ShippingCalculationHelper()instantiates new instance for this class.
-
-
Method Details
-
plugInLoader
Plug in loader. This class used to load collection properties. If the partner plugin property is not available in that collection properties, Load default calculation partner from default properties. If collection partner plugin property is available means get and use it.- Parameters:
shippingRequest
- the shipping request- Returns:
- the shipping response
-
allowedCountryCheck
this method check whether the given country allowed to be or not returns error if not allowed- Parameters:
collectionId
- to retrive collection properties to get countries list to check with the given country namecountryNameToBeChecked
- country name to be checked
-
getAddress
Gets the address.- Parameters:
dtoModel
- the dto modelitemdtoModel
- the itemdto modelrequest
- the shipping request- Returns:
- the address
-
getType
Gets the type.- Parameters:
dtoModel
- the dto modelitemdtoModel
- the itemdto modellocale
- the locale- Returns:
- the type
-
getCollectionProperty
Find the collection property value- Parameters:
collectionId
- the collection identifierpropertyName
- the property namelocale
- the locale string- Returns:
- the value of the collection property
-
getValidatorsFromCollectionProperty
public List<com.skava.core.validation.ValidatorComponent> getValidatorsFromCollectionProperty(long collectionId, String validatorPropName, String defaultValidator, String locale) This method is used to load the list of validators from the given collection property- Parameters:
collectionId
- The collection identifiervalidatorPropName
- The collection property name to take the validatordefaultValidator
- The default validator that should be loaded if the the validator property is nulllocale
- Locale for processing the response message
-