public Policy getPolicy(String policyName) {
if (nameToPolicyMap == null) {
nameToPolicyMap = new HashMap();
Iterator categories = categories();
while (categories.hasNext()) {
Category category = (Category) categories.next();
Iterator policies = category.policies();
while (policies.hasNext()) {
Policy policy = (Policy) policies.next();
nameToPolicyMap.put(policy.getName(), policy);
}
}