Class AddressValidationHelper

java.lang.Object
com.skava.address.helper.AddressValidationHelper

@Service public final class AddressValidationHelper extends Object
The Class AddressCollectionPropertiesHelper used to add some business logics.
  • Constructor Details

    • AddressValidationHelper

      public AddressValidationHelper()
      instantiates new instance for this class.
  • Method Details

    • plugInLoader

      public boolean plugInLoader(AddressDO addressDO, long collectionId, String locale)
      This method used to load the plugIn Impl class by finding collectionProperties for input collection.
      Parameters:
      addressDO - This address is being validated to return whether it is valid address or not.
      collectionId - This is used to load collection properties and return a plugIn impl name.
      locale - This specifies the locale
      Returns:
      true if its a valid address.
    • setPluginProperties

      public void setPluginProperties(AddressDO addressDO, long collectionId, String locale)
    • getCollectionProperty

      public String getCollectionProperty(long collectionId, String propertyName, String locale)
      Find the collection property value
      Parameters:
      collectionId - the collection identifier
      propertyName - the property name
      locale - 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 identifier
      validatorPropName - The collection property name to take the validator
      defaultValidator - The default validator that should be loaded if the the validator property is null
      locale - Locale for processing the response message
      Returns:
      the list of validator component
    • plugInLoaderWithSuggestion

      public AddressDO plugInLoaderWithSuggestion(AddressDO addressDO, long collectionId, String locale)