public static List<String> importSAML2Document(SAML2MetaManager metaManager,String realm,Document doc) throws SAML2MetaException, JAXBException {
  List<String> result=new ArrayList<String>(1);
  Object element=preProcessSAML2Document(doc);
  if (element instanceof EntityDescriptorElement) {
    String entityId=importSAML2Entity(metaManager,realm,(EntityDescriptorElement)element);
    if (entityId != null) {
      result.add(entityId);
    }
  }
 else   if (element instanceof EntitiesDescriptorElement) {
    result=importSAML2Entites(metaManager,realm,(EntitiesDescriptorElement)element);
  }
  if (debug.messageEnabled()) {
    debug.message("SAML2MetaUtils.importSAML2Document: " + "Created " + result + " entities");
  }
  return result;
}

public static List < String > importSAML2Document ( SAML2MetaManager metaManager , String realm , Document doc ) throws SAML2MetaException , JAXBException { List < String > result = new ArrayList < String > ( 1 ) ; Object element = preProcessSAML2Document ( doc ) ; if ( element instanceof EntityDescriptorElement ) { String entityId = importSAML2Entity ( metaManager , realm , ( EntityDescriptorElement ) element ) ; if ( entityId != null ) { result . add ( entityId ) ; } } else if ( element instanceof EntitiesDescriptorElement ) { result = importSAML2Entites ( metaManager , realm , ( EntitiesDescriptorElement ) element ) ; } if ( debug . messageEnabled ( ) ) { debug . message ( "SAML2MetaUtils.importSAML2Document: " + "Created " + result + " entities" ) ; } return result ; }
for the given xml metadata document representing either a saml2 entitydescriptorelement or entitiesdescriptorelement , return a list of entityid ' s for all the entities created . carries out a signature validation of the document as part of the import process .
