public interface CommonNamePolicy
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCommonNameFromPolicy(java.util.Map userData)
This API returns an auto-generated common name as per the policy.
|
java.lang.String |
getDescription(java.util.Locale locale)
This API returns the description of the default policy configured in
the system property - XL.DefaultCommonNamePolicyImpl.
|
boolean |
isCommonNameValid(java.lang.String commonName,
java.util.Map reqData)
Validates if the common name is as per the policy.
|
java.lang.String getCommonNameFromPolicy(java.util.Map userData) throws CommonNameGenerationException
userData
- a map of user data containing all user attributes,
like First Name, Last Name, act_key, etc. We need all attributes.
As for checking if the CN already exists in LDAP, we need to evaluate
the container rules. These rules could be based on any user attributes.CommonNameGenerationException
boolean isCommonNameValid(java.lang.String commonName, java.util.Map reqData)
commonName
- the commonName which is to be validated whether it conforms to policy or not.reqData
- a map of user data containing basic user info - first name, last name, middle name, email, locale.
Based on the policy, the applicable attributes will be picked.java.lang.String getDescription(java.util.Locale locale)
locale
- the description returned will be translated as per
this locale.