{
if (log.isDebugEnabled())
{
log.debug("Adding default policy to security policies: " + defaultPolicy.getClass().getName());
}
PolicyWrapper defaultPolicyWrap = new PolicyWrapper(defaultPolicy, useDefaultPolicy, true);
SecurityPolicies.getInstance().addPolicy(defaultPolicyWrap);
}
if (!securityPolicies.contains(policy))
{
if (log.isDebugEnabled())
{
log.debug("Adding custom policy to security policies: " + policy.getClass().getName());
}
PolicyWrapper policyWrap = new PolicyWrapper(policy, true, false);
SecurityPolicies.getInstance().addPolicy(policyWrap);
}
// Use the primary policy.
if (log.isDebugEnabled())