{
// make sure we always have a RegistrationPolicy
if (policy == null)
{
log.debug("Specified RegistrationPolicy was null, using the default one instead.");
policy = new DefaultRegistrationPolicy();
}
// wrap the policy to make sure we have default behavior properly set up
this.policy = RegistrationPolicyWrapper.wrap(policy);
policyClassName = policy.getClassName();
if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
{
DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)RegistrationPolicyWrapper.unwrap(policy);
validatorClassName = registrationPolicy.getValidator().getClass().getName();
}
else
{
validatorClassName = null;
}