public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext invocationContext, IdentityObject identity) throws IdentityException { Map<String, IdentityObjectAttribute> results = cacheSupport.getIdentityObjectAttributes(getCacheNS(invocationContext), identity); if (results != null) { return results; } results = attributeStore.getAttributes(invocationContext, identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationContext), identity, results); return results; }
public void addAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.addAttributes(invocationCtx, identity, attributes); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }
public void updateAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.updateAttributes(invocationCtx, identity, attributes); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }
public void removeAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, String[] attributeNames) throws IdentityException { attributeStore.removeAttributes(invocationCtx, identity, attributeNames); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }
public IdentityObjectAttribute getAttribute(IdentityStoreInvocationContext invocationContext, IdentityObject identity, String name) throws IdentityException { Map<String, IdentityObjectAttribute> results = cacheSupport.getIdentityObjectAttributes(getCacheNS(invocationContext), identity); if (results != null && results.containsKey(name)) { return results.get(name); } IdentityObjectAttribute result = attributeStore.getAttribute(invocationContext, identity, name); // Put fresh attributes in cache if (result != null) { cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationContext), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationContext), identity, attributeStore.getAttributes(invocationContext, identity)); } return result; }
getCache().putIdentityObjectAttributes(getNamespace(), identity, attrsMap);