AbstractLocator locator = (AbstractLocator) loadClass(lt.getName()).newInstance();
locator.setOptions(options);
if(locator instanceof PolicyLocator)
{
PolicyLocator pl = (PolicyLocator)locator;
if(justLocators == false)
pl.setPolicies(policies);
this.policyLocators.add(pl);
}
else
if(locator instanceof AttributeLocator)
{
AttributeLocator attribLocator = (AttributeLocator) locator;
this.attributeLocators.add(attribLocator);
}
else
if(locator instanceof ResourceLocator)
{
ResourceLocator resourceLocator = (ResourceLocator) locator;
this.resourceLocators.add(resourceLocator);
}
}
//Since we do not have any policies in the config file, we need to specify
//the policy finder
if(justLocators)
{
int len = this.policyLocators.size();
if(len > 0)
{
for(PolicyLocator pl: policyLocators)
{
pl.set(XACMLConstants.POLICY_FINDER, this.policyFinder);
}
}
}
this.bootstrapPDP();