399400401402403404405406407408409
Collection<PolicyComponent> policyElements = des.getPolicySubject().getAttachedPolicyComponents(); PolicyRegistry registry = new PolicyRegistryImpl(); Object policyComponent; Policy policy = registry.lookup(id); if (policy != null) { return policy; }
594595596597598599600601602603604
if (key.startsWith("#")) { key = key.substring(key.indexOf("#") + 1); } Policy p = reg.lookup(key); if (p == null) { throw new Exception("Policy not found for uri : " + key); }