return entitlementEngines.get(Integer.toString(tenantId));
}
private EntitlementEngine(Registry registry, int tenantId) throws IdentityException {
PolicyFinder policyFinder = null;
Set<PolicyFinderModule> policyModules = null;
// Setup the PolicyFinder that the EntitlementEngine will use
policyFinder = new PolicyFinder();
registryModule = new RegistryBasedPolicyFinder(new PolicyStoreReader(new PolicyStore(
registry)), tenantId);
policyModules = new HashSet<PolicyFinderModule>();
// Add all policy finders - we only have RegistryBasedPolicyFinder
policyModules.add(registryModule);
policyFinder.setModules(policyModules);
// init policy reader
PolicyReader.getInstance(null, policyFinder);
// Now setup attribute finder modules for the current date/time and