Class UserAnonymizationHandler
java.lang.Object
com.broadleafcommerce.auth.server.service.anonymization.UserAnonymizationHandler
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
,com.broadleafcommerce.common.privacy.anonymization.AnonymizationHandler
,org.springframework.core.Ordered
public class UserAnonymizationHandler
extends Object
implements com.broadleafcommerce.common.privacy.anonymization.AnonymizationHandler
Updates PII fields for the
User
domain.-
Field Summary
Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
ALL_MATCH
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<com.broadleafcommerce.common.privacy.anonymization.AnonymizationRecord>
protected String
Generates a random email with the patternAnonymizationUtils.ANONYMOUS_EMAIL_PATTERN
.protected String
Generates a v4 UUID and removes all hyphens.protected UserService<User>
protected List<com.broadleafcommerce.common.privacy.anonymization.AnonymizationRecord>
handleRecords
(String boundedContextIdentifier, User member) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.common.privacy.anonymization.AnonymizationHandler
empty, fail, getOrder, process
-
Constructor Details
-
UserAnonymizationHandler
-
-
Method Details
-
getDataRoutePartition
- Specified by:
getDataRoutePartition
in interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
anonymize
public List<com.broadleafcommerce.common.privacy.anonymization.AnonymizationRecord> anonymize(String boundedContextIdentifier, Object context) - Specified by:
anonymize
in interfacecom.broadleafcommerce.common.privacy.anonymization.AnonymizationHandler
-
handleRecords
-
getRandomEmail
Generates a random email with the patternAnonymizationUtils.ANONYMOUS_EMAIL_PATTERN
. The domain of the email will be the random part based on a v4 UUID.- Returns:
- An email with a randomly generated string for the domain.
-
getRandomString
Generates a v4 UUID and removes all hyphens.- Returns:
- A v4 UUID and removes all hyphens.
-
getUserService
-