Class SimpleTaxProperties


@ConfigurationProperties("broadleaf.tax.provider.simple") public class SimpleTaxProperties extends DiscriminatedProperties<SimpleTaxProperties>
Provides properties for the SimpleTaxProvider, optionally discriminated by tenantId or applicationId. For example, you might have the following:
  • broadleaf.tax.provider.simple.configPath=file:/path/to/default/simple-tax-config.json
  • broadleaf.tax.provider.simple.tenant.abc123.configPath=file:/path/to/abc123/simple-tax-config.json
  • broadleaf.tax.provider.simple.application.xzy789.configPath=file:/path/to/xzy789/simple-tax-config.json
Author:
Kelly Tisdell (ktisdell)
  • Field Details

  • Constructor Details

    • SimpleTaxProperties

      public SimpleTaxProperties()
  • Method Details

    • getConfigPath

      public String getConfigPath(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Provides a path to a Resource. This should generally follow Spring's conventions for defining a Resource. For example, 'file:/path/to/my/simple-tax-config.json' or classpath:path/to/my/simple-tax-config.json. This is a path to a JSON structure that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigJsonString(ContextInfo). If both properties contain a value, this one will be ignored.
      Parameters:
      contextInfo -
      Returns:
    • getConfigJsonString

      public String getConfigJsonString(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      This is a JSON string that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigPath(ContextInfo). If both properties contain a value, this one will be preferred.
      Parameters:
      contextInfo -
      Returns:
    • setConfigPath

      public void setConfigPath(String configPath)
      Provides a path to a Resource. This should generally follow Spring's conventions for defining a Resource. For example, 'file:/path/to/my/simple-tax-config.json' or classpath:path/to/my/simple-tax-config.json. This is a path to a JSON structure that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigJsonString(). If both properties contain a value, this one will be ignored.
    • setConfigJsonString

      public void setConfigJsonString(String configJsonString)
      This is a JSON string that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigPath(). If both properties contain a value, this one will be preferred.
      Parameters:
      contextInfo -
    • getConfigPath

      public String getConfigPath()
      Provides a path to a Resource. This should generally follow Spring's conventions for defining a Resource. For example, 'file:/path/to/my/simple-tax-config.json' or classpath:path/to/my/simple-tax-config.json. This is a path to a JSON structure that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigJsonString(). If both properties contain a value, this one will be ignored.
      Returns:
    • getConfigJsonString

      public String getConfigJsonString()
      This is a JSON string that conforms to SimpleTaxConfig. This is provided as an alternative to getConfigPath(). If both properties contain a value, this one will be preferred.
      Returns: