protected Policy resolveExternal(PolicyReference ref, String baseURI, Bus bus) {
PolicyBuilder builder = bus.getExtension(PolicyBuilder.class);
ReferenceResolver resolver = new RemoteReferenceResolver(baseURI, builder,
bus.getExtension(PolicyConstants.class));
PolicyRegistry registry = bus.getExtension(PolicyEngine.class).getRegistry();
Policy resolved = registry.lookup(ref.getURI());
if (null != resolved) {
return resolved;
}
return resolver.resolveReference(ref.getURI());
}