public IdentityObject findIdentityObjectByUniqueAttribute(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityObjectType, IdentityObjectAttribute attribute) throws IdentityException
{
List<String> filteredAttrs = new LinkedList<String>();
List<String> leftAttrs = new LinkedList<String>();
IdentityStore toStore = resolveIdentityStore(identityObjectType);
IdentityStoreInvocationContext targetCtx = resolveInvocationContext(toStore, invocationCtx);
if (toStore != defaultAttributeStore)
{
Set<String> supportedAttrs = toStore.getSupportedAttributeNames(targetCtx, identityObjectType);
if (supportedAttrs.contains(attribute.getName()))
{
return toStore.findIdentityObjectByUniqueAttribute(targetCtx, identityObjectType, attribute);
}
}
IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultAttributeStore, invocationCtx);
if (isAllowNotDefinedAttributes())
{
defaultAttributeStore.findIdentityObjectByUniqueAttribute(defaultCtx, identityObjectType, attribute);
}
else
{
Set<String> supportedAttrs = defaultAttributeStore.getSupportedAttributeNames(defaultCtx, identityObjectType);
if (supportedAttrs.contains(attribute.getName()))
{
return toStore.findIdentityObjectByUniqueAttribute(defaultCtx, identityObjectType, attribute);
}
}
return null;
}