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
Fields Modifier and Type Field Description static String
SIMPLE_TAX_CONFIG_EXAMPLE
-
Constructor Summary
Constructors Constructor Description SimpleTaxProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConfigJsonString()
This is a JSON string that conforms toSimpleTaxConfig
.String
getConfigJsonString(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
This is a JSON string that conforms toSimpleTaxConfig
.String
getConfigPath()
Provides a path to aResource
.String
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 Detail
-
SIMPLE_TAX_CONFIG_EXAMPLE
public static final String SIMPLE_TAX_CONFIG_EXAMPLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public void setConfigPath(String configPath)
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
public void setConfigJsonString(String configJsonString)
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
public String 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
public String 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:
-
-