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 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 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; }
public void removeIdentityObject(IdentityStoreInvocationContext invocationCtx, IdentityObject identity) throws IdentityException { identityStore.removeIdentityObject(invocationCtx, identity); cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.invalidateIdentityObjectCount(getCacheNS(invocationCtx), identity.getIdentityType().getName()); }