@Override public void importEntity(Map requestData) throws AMConsoleException {
  try {
    String standardFile=(String)requestData.get(STANDARD_META);
    if (standardFile == null) {
      throw new AMConsoleException("missing.metadata");
    }
    standardMetaData=Task.getContent(standardFile,getUserLocale());
    String protocol=getProtocol(standardMetaData);
    String extendedFile=(String)requestData.get(EXTENDED_META);
    if ((extendedFile != null) && (extendedFile.length() > 0)) {
      extendedMetaData=Task.getContent(extendedFile,getUserLocale());
      String tmp=getProtocol(standardMetaData);
      if (!protocol.equals(tmp)) {
        throw new AMConsoleException("protocol.mismatch");
      }
    }
    realm=(String)requestData.get(REALM_NAME);
    if (realm == null) {
      realm=DEFAULT_ROOT;
    }
    if (protocol.equals(SAML2Constants.PROTOCOL_NAMESPACE)) {
      createSAMLv2Entity();
    }
 else     if (protocol.equals(IDFF)) {
      createIDFFEntity();
    }
 else {
      createWSFedEntity();
    }
  }
 catch (  WorkflowException ex) {
    throw new AMConsoleException(ex);
  }
}

@ Override public void importEntity ( Map requestData ) throws AMConsoleException { try { String standardFile = ( String ) requestData . get ( STANDARD_META ) ; if ( standardFile == null ) { throw new AMConsoleException ( "missing.metadata" ) ; } standardMetaData = Task . getContent ( standardFile , getUserLocale ( ) ) ; String protocol = getProtocol ( standardMetaData ) ; String extendedFile = ( String ) requestData . get ( EXTENDED_META ) ; if ( ( extendedFile != null ) && ( extendedFile . length ( ) > 0 ) ) { extendedMetaData = Task . getContent ( extendedFile , getUserLocale ( ) ) ; String tmp = getProtocol ( standardMetaData ) ; if ( ! protocol . equals ( tmp ) ) { throw new AMConsoleException ( "protocol.mismatch" ) ; } } realm = ( String ) requestData . get ( REALM_NAME ) ; if ( realm == null ) { realm = DEFAULT_ROOT ; } if ( protocol . equals ( SAML2Constants . PROTOCOL_NAMESPACE ) ) { createSAMLv2Entity ( ) ; } else if ( protocol . equals ( IDFF ) ) { createIDFFEntity ( ) ; } else { createWSFedEntity ( ) ; } } catch ( WorkflowException ex ) { throw new AMConsoleException ( ex ) ; } }
import one of the following entity types : samlv2 , idff , or wsfed . the parameters are the file names containing the standard and extended metadata . the standard is required , while the extended is optional .
