}
private static IdentityRepositoryConfigurationMetaData createIdentityRepositoryConfigurationMetaData(RepositoryType repositoryType)
{
IdentityRepositoryConfigurationMetaDataImpl repoMD = new IdentityRepositoryConfigurationMetaDataImpl();
repoMD.setId(repositoryType.getId());
repoMD.setClassName(repositoryType.getClazz());
if (repositoryType.getExternalConfig() != null)
{
repoMD.setExternalConfig(repositoryType.getExternalConfig().getValue());
}
repoMD.setDefaultAttributeStroeId(repositoryType.getDefaultAttributeStoreId());
repoMD.setDefaultIdentityStoreId(repositoryType.getDefaultIdentityStoreId());
List<IdentityStoreMappingMetaData> storeMappings = new LinkedList<IdentityStoreMappingMetaData>();
if (repositoryType.getIdentityStoreMappings() != null &&
repositoryType.getIdentityStoreMappings().getIdentityStoreMapping() != null)
{
for (IdentityStoreMappingType identityStoreMappingType : repositoryType.getIdentityStoreMappings().getIdentityStoreMapping())
{
IdentityStoreMappingMetaDataImpl mapping = new IdentityStoreMappingMetaDataImpl();
mapping.setIdentityStoreId(identityStoreMappingType.getIdentityStoreId());
mapping.setIdentityObjectTypeMappings(identityStoreMappingType.getIdentityObjectTypes().getIdentityObjectType());
mapping.setOptions(createOptions(identityStoreMappingType.getOptions()));
storeMappings.add(mapping);
}
}
repoMD.setIdentityStoreToIdentityObjectTypeMappings(storeMappings);
repoMD.setOptions(createOptions(repositoryType.getOptions()));
return repoMD;
}