public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext invocationContext, IdentityObject identity) throws IdentityException { return defaultAttributeStore.getAttributes(resolveAttributeStoreInvocationContext(invocationContext), identity); }
public void updateAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.updateAttributes(invocationCtx, identity, attributes); cacheSupport.removeAttributesFromCache(identity); if (reloadAttributesToCacheOnUpdate) { Map<String, IdentityObjectAttribute> results = attributeStore.getAttributes(invocationCtx, identity); if (results != null && results.size() > 0) { //TODO:FIXME // cacheSupport.putIntoCache(identity, results); } } else { // update attributes in node map directly } }
public void addAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.addAttributes(invocationCtx, identity, attributes); cacheSupport.removeAttributesFromCache(identity); if (reloadAttributesToCacheOnUpdate) { Map<String, IdentityObjectAttribute> results = attributeStore.getAttributes(invocationCtx, identity); if (results != null && results.size() > 0) { //TODO:FIXME // cacheSupport.putIntoCache(identity, results); } } else { // add attributes in node map directly } }
public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext invocationContext, IdentityObject identity) throws IdentityException { Map<String, IdentityObjectAttribute> results; IdentityStore toStore = resolveIdentityStore(identity); IdentityStoreInvocationContext targetCtx = resolveInvocationContext(toStore, invocationContext); results = toStore.getAttributes(targetCtx, identity); if (toStore != defaultAttributeStore) { IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultAttributeStore, invocationContext); Map<String, IdentityObjectAttribute> defaultAttrs = defaultAttributeStore.getAttributes(defaultCtx, identity); // Add only those attributes which are missing - don't overwrite or merge existing values for (Map.Entry<String, IdentityObjectAttribute> entry : defaultAttrs.entrySet()) { if (!results.keySet().contains(entry.getKey())) { results.put(entry.getKey(), entry.getValue()); } } } return results; }
public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext invocationContext, IdentityObject identity) throws IdentityException { Map<String, IdentityObjectAttribute> results = cacheSupport.getAttributesFromCache(identity.getName(), identity.getIdentityType()); if (results == null) { results = attributeStore.getAttributes(invocationContext, identity); if (results != null && results.size() > 0) { //TODO:FIXME // cacheSupport.putIntoCache(identity, results); } } return results; }
public void removeAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, String[] attributeNames) throws IdentityException { attributeStore.removeAttributes(invocationCtx, identity, attributeNames); cacheSupport.removeAttributesFromCache(identity); if (reloadAttributesToCacheOnUpdate) { Map<String, IdentityObjectAttribute> results = attributeStore.getAttributes(invocationCtx, identity); if (results != null && results.size() > 0) { cacheSupport.putIntoCache(identity, results); } } else { // remove attributes in node map directly } }