catch (JAXBException e)
{
throw new IdentityConfigurationException("Cannot unmarshal xml configuration: ", e);
}
JbossIdentityType identityConfig = jiElement.getValue();
IdentityConfigurationMetaDataImpl configurationMD = new IdentityConfigurationMetaDataImpl();
if (identityConfig.getStores() != null &&
identityConfig.getStores().getIdentityStores() != null &&
identityConfig.getStores().getIdentityStores().getIdentityStore() != null)
{
for (IdentityStoreType identityStoreType : identityConfig.getStores().getIdentityStores().getIdentityStore())
{
configurationMD.getIdentityStores().add(createIdentityStoreConfigurationMetaData(identityStoreType));
}
}
if (identityConfig.getRepositories() != null &&
identityConfig.getRepositories().getRepository() != null)
{
for (RepositoryType repositoryType : identityConfig.getRepositories().getRepository())
{
configurationMD.getRepositories().add(createIdentityRepositoryConfigurationMetaData(repositoryType));
}
}
if (identityConfig.getRealms() != null &&
identityConfig.getRealms().getRealm() != null)
{
for (RealmType realmType : identityConfig.getRealms().getRealm())
{
configurationMD.getRealms().add(createRealmConfigurationMetaData(realmType));
}
}