Interface AnonymizationHandler
- All Superinterfaces:
- com.broadleafcommerce.common.extension.data.DataRoutePartitionAware,- org.springframework.core.Ordered
public interface AnonymizationHandler
extends org.springframework.core.Ordered, com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
Component for applying anonymized data to an entity containing personal identifiable information.
- 
Field SummaryFields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAwareALL_MATCHFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier and TypeMethodDescriptionGiven an identifier, find the associated entity containing personal identifiable information and apply anonymized data for all relevant fields.default AnonymizationRecordDefault implementation for creating a standardAnonymizationRecordfor an empty field.default AnonymizationRecordDefault implementation for create anAnonymizationRecorddetailing a failed attempt to update a field.default intgetOrder()default AnonymizationRecordprocess(String boundedContextIdentifier, String type, String field, Supplier<String> fetch, Consumer<String> apply, String anonymizedValue) Default implementation for processing anonymization for a standard fieldMethods inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAwaregetDataRoutePartition
- 
Method Details- 
anonymizeGiven an identifier, find the associated entity containing personal identifiable information and apply anonymized data for all relevant fields.- Parameters:
- boundedContextIdentifier- Identifier for an entity containing personal identifiable information. Usually customer id.
- context-- ContextInfofrom data tracking used to inform fetch request filtration. Optional.
- Returns:
- Information for each updated field regarding what was changed
 
- 
getOrderdefault int getOrder()- Specified by:
- getOrderin interface- org.springframework.core.Ordered
 
- 
processdefault AnonymizationRecord process(String boundedContextIdentifier, String type, String field, Supplier<String> fetch, Consumer<String> apply, String anonymizedValue) Default implementation for processing anonymization for a standard field- Parameters:
- boundedContextIdentifier- Identifier for an entity containing personal identifiable information. Usually customer id.
- type- The class simple name for the entity
- field- The field that is being updated on the entity
- fetch- The get mutator on the entity for the field
- apply- The set mutator on the entity for the field
- anonymizedValue- The anonymization data to which the field is being set
- Returns:
- The details regarding the field change
 
- 
emptyDefault implementation for creating a standardAnonymizationRecordfor an empty field.- Parameters:
- type- The class simple name for the entity
- field- The field that is being updated on the entity
- Returns:
- The details regarding the field change
 
- 
faildefault AnonymizationRecord fail(String boundedContextIdentifier, String type, Throwable e, boolean failFlow) Default implementation for create anAnonymizationRecorddetailing a failed attempt to update a field.- Parameters:
- boundedContextIdentifier- Identifier for an entity containing personal identifiable information. Usually customer id.
- type- The class simple name for the entity
- e- The exception that caused the failuer
- failFlow- Whether or not this problem should stop the remainder of the anonymization process.
- Returns:
- The details regarding the field change
 
 
-