private static Map<String,SchemaObjectMappingDTO> populateObjectSchema(Collection<IdentityStoreObjectMapping> objectMappings) throws DTOMapperException {
  Map<String,SchemaObjectMappingDTO> objectSchemaMappings=new HashMap<String,SchemaObjectMappingDTO>();
  try {
    for (    IdentityStoreObjectMapping objectMapping : objectMappings) {
      String objectId=objectMapping.getObjectId();
      String objectClass=objectMapping.getObjectClass();
      Map<String,String> attributeMappings=new HashMap<String,String>();
      for (      IdentityStoreAttributeMapping attributeMapping : objectMapping.getAttributeMappings()) {
        attributeMappings.put(attributeMapping.getAttributeId(),attributeMapping.getAttributeName());
      }
      objectSchemaMappings.put(objectId,new SchemaObjectMappingDTO(objectClass,attributeMappings));
    }
  }
 catch (  Exception ex) {
    throw new DTOMapperException("Failed to map identity provider schema");
  }
  return objectSchemaMappings;
}

private static Map < String , SchemaObjectMappingDTO > populateObjectSchema ( Collection < IdentityStoreObjectMapping > objectMappings ) throws DTOMapperException { Map < String , SchemaObjectMappingDTO > objectSchemaMappings = new HashMap < String , SchemaObjectMappingDTO > ( ) ; try { for ( IdentityStoreObjectMapping objectMapping : objectMappings ) { String objectId = objectMapping . getObjectId ( ) ; String objectClass = objectMapping . getObjectClass ( ) ; Map < String , String > attributeMappings = new HashMap < String , String > ( ) ; for ( IdentityStoreAttributeMapping attributeMapping : objectMapping . getAttributeMappings ( ) ) { attributeMappings . put ( attributeMapping . getAttributeId ( ) , attributeMapping . getAttributeName ( ) ) ; } objectSchemaMappings . put ( objectId , new SchemaObjectMappingDTO ( objectClass , attributeMappings ) ) ; } } catch ( Exception ex ) { throw new DTOMapperException ( "Failed to map identity provider schema" ) ; } return objectSchemaMappings ; }
populate identity store object schema mapping . this helper method is used to transform idm based schema object mapping to rest based schema mapping object .
