Package com.broadleafcommerce.tax.simple
Class SimpleTaxProperties
java.lang.Object
com.broadleafcommerce.tax.autoconfigure.DiscriminatedProperties<SimpleTaxProperties>
com.broadleafcommerce.tax.simple.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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis is a JSON string that conforms toSimpleTaxConfig
.getConfigJsonString
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) This is a JSON string that conforms toSimpleTaxConfig
.Provides a path to aResource
.getConfigPath
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Provides a path to aResource
.void
setConfigJsonString
(String configJsonString) This is a JSON string that conforms toSimpleTaxConfig
.void
setConfigPath
(String configPath) Provides a path to aResource
.Methods inherited from class com.broadleafcommerce.tax.autoconfigure.DiscriminatedProperties
getApplication, getField, getField, getTenant, setApplication, setTenant
-
Field Details
-
SIMPLE_TAX_CONFIG_EXAMPLE
- See Also:
-
-
Constructor Details
-
SimpleTaxProperties
public SimpleTaxProperties()
-
-
Method Details
-
getConfigPath
public String getConfigPath(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Provides a path to aResource
. 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 toSimpleTaxConfig
. This is provided as an alternative togetConfigJsonString(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 toSimpleTaxConfig
. This is provided as an alternative togetConfigPath(ContextInfo)
. If both properties contain a value, this one will be preferred.- Parameters:
contextInfo
-- Returns:
-
setConfigPath
Provides a path to aResource
. 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 toSimpleTaxConfig
. This is provided as an alternative togetConfigJsonString()
. If both properties contain a value, this one will be ignored. -
setConfigJsonString
This is a JSON string that conforms toSimpleTaxConfig
. This is provided as an alternative togetConfigPath()
. If both properties contain a value, this one will be preferred.- Parameters:
contextInfo
-
-
getConfigPath
Provides a path to aResource
. 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 toSimpleTaxConfig
. This is provided as an alternative togetConfigJsonString()
. If both properties contain a value, this one will be ignored.- Returns:
-
getConfigJsonString
This is a JSON string that conforms toSimpleTaxConfig
. This is provided as an alternative togetConfigPath()
. If both properties contain a value, this one will be preferred.- Returns:
-