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);
for (Map.Entry<String, IdentityObjectAttribute> entry : defaultAttrs.entrySet())
{
if (!results.keySet().contains(entry.getKey()))
{
results.put(entry.getKey(), entry.getValue());
}
}
}
return results;
}