featuresDescription = new RelationshipManagerFeaturesDescription()
{
public boolean isIdentityAssociationSupported(GroupType fromGroupType)
{
IdentityObjectType identityOT = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType();
IdentityObjectType groupIdentityOT = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(fromGroupType);
try
{
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isRelationshipTypeSupported(groupIdentityOT, identityOT, MEMBER);
}
catch (IdentityException e)
{
return false;
}
}
public boolean isGroupAssociationSupported(GroupType fromGroupType, GroupType toGroupType)
{
IdentityObjectType toGroupOT = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(toGroupType);
IdentityObjectType fromGroupOT = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(fromGroupType);
try
{
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isRelationshipTypeSupported(fromGroupOT, toGroupOT, MEMBER);
}
catch (IdentityException e)
{
return false;
}
}
public boolean isIdentitiesSearchControlSupported(IdentitySearchControl control)
{
IdentityObjectType objectType = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType();
if (control instanceof IdentityObjectSearchControl)
{
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isControlSupported(objectType, (IdentityObjectSearchControl)control);
}
return false;
}
public boolean isIdentitiesSearchControlSupported(Class controlClazz)
{
IdentityObjectType objectType = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType();
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isControlSupported(objectType, controlClazz);
}
public boolean isGroupsSearchControlSupported(GroupType groupType, IdentitySearchControl control)
{
IdentityObjectType objectType = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(groupType);
if (control instanceof IdentityObjectSearchControl)
{
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isControlSupported(objectType, (IdentityObjectSearchControl)control);
}
return false;
}
public boolean isGroupsSearchControlSupported(GroupType groupType, Class controlClazz)
{
IdentityObjectType objectType = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(groupType);
return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().
isControlSupported(objectType, controlClazz);
}
};