public static ImportConfig valueOf(ImportMode importMode) {
   ImportConfig config = new ImportConfig();
   switch (importMode) {
     case PARENT_AND_CHILD:
       config.exactMatch = ImportType.PREFER_THEIRS;
       config.possibleMatch = ImportType.PREFER_THEIRS;
       config.noMatch = ImportType.CREATE;
       config.confirmExactMatch = false;
       config.confirmPossibleMatch = true;
       config.confirmNoMatch = false;
       return config;
     case PEER_TO_PEER:
       config.exactMatch = ImportType.PREFER_MINE;
       config.possibleMatch = ImportType.PREFER_MINE;
       config.noMatch = ImportType.CREATE;
       config.confirmExactMatch = true;
       config.confirmPossibleMatch = true;
       config.confirmNoMatch = false;
       return config;
     case TEST:
       config.exactMatch = ImportType.PREFER_THEIRS;
       config.possibleMatch = ImportType.CREATE;
       config.noMatch = ImportType.CREATE;
       config.confirmExactMatch = false;
       config.confirmPossibleMatch = false;
       config.confirmNoMatch = false;
       return config;
     case MIRROR:
       config.exactMatch = ImportType.OVERWRITE_MINE;
       config.possibleMatch = ImportType.OVERWRITE_MINE;
       config.noMatch = ImportType.CREATE;
       config.confirmExactMatch = false;
       config.confirmPossibleMatch = false;
       config.confirmNoMatch = false;
       return config;
     default:
       return config;
   }
 }