Class DiscriminatedProperties<P>
java.lang.Object
com.broadleafcommerce.fulfillment.properties.DiscriminatedProperties<P>
- Type Parameters:
P
-
Mechanism to allow us to specify fulfillment properties defined for different tenants and/or
applications.
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCaseInsensitiveMap is used for the case when props are provided from the ENV as ENV props will be converted to lowercase by spring in case of UUID for app/tenant there can be a mismatch AbcD34E vs abcd45e, so case CaseInsensitiveMap addresses this issueprotected <T> T
getField
(String fieldName, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected <T> T
Looks for a property based first on the applicaionId and then the tenantId and then with no discrimination.void
setApplication
(Map<String, P> application) CaseInsensitiveMap is used for the case when props are provided from the ENV as ENV props will be converted to lowercase by spring in case of UUID for app/tenant there can be a mismatch AbcD34E vs abcd45e, so case CaseInsensitiveMap addresses this issuevoid
-
Constructor Details
-
DiscriminatedProperties
public DiscriminatedProperties()
-
-
Method Details
-
getField
protected <T> T getField(String fieldName, @Nullable String applicationId, @Nullable String tenantId) Looks for a property based first on the applicaionId and then the tenantId and then with no discrimination.- Type Parameters:
T
-- Parameters:
fieldName
-applicationId
-tenantId
-- Returns:
-
getField
protected <T> T getField(String fieldName, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getApplication
CaseInsensitiveMap is used for the case when props are provided from the ENV as ENV props will be converted to lowercase by spring in case of UUID for app/tenant there can be a mismatch AbcD34E vs abcd45e, so case CaseInsensitiveMap addresses this issue -
setApplication
CaseInsensitiveMap is used for the case when props are provided from the ENV as ENV props will be converted to lowercase by spring in case of UUID for app/tenant there can be a mismatch AbcD34E vs abcd45e, so case CaseInsensitiveMap addresses this issue -
getTenant
-
setTenant
-