src/main/java/org/jboss/loom/migrators/_ext/ExternalMigratorsLoader.java
public static List<MigratorDefinition> loadMigratorDefinitions( File dir, GlobalConfiguration gc ) throws MigrationException {
        
        List<MigratorDefinition> retDefs = new LinkedList();
        List<Exception> problems  = new LinkedList();
        
        // For each *.mig.xml file...
        for( File xmlFile : FileUtils.listFiles( dir, new String[]{"mig.xml"}, true ) ){
            try{
                List<MigratorDefinition> defs = XmlUtils.unmarshallBeans( xmlFile, "/migration/migrator", MigratorDefinition.class );
                retDefs.addAll( defs );
                // Validate
                for( MigratorDefinition def : defs ) {
                    try { Utils.validate( def ); } 
                    catch( MigrationException ex ){ problems.add( ex ); }
                }
            }
            catch( Exception ex ){
                problems.add(ex);
            }
        }
        String msg = "Errors occured when reading migrator descriptors from " + dir + ": ";
        MigrationExceptions.wrapExceptions( problems, null );
        return retDefs;
    }
/**
     *  Reads migrator descriptors from *.mig.xml in the given dir and returns them.
     */
Reads migrator descriptors from *.mig.xml in the given dir and returns them.
Reads migrator descriptors from * . mig . xml in the given dir and returns them .
public static List<MigratorDefinition> loadMigratorDefinitions( File dir, GlobalConfiguration gc ) throws MigrationException {
        List<MigratorDefinition> retDefs = new LinkedList();
        List<Exception> problems  = new LinkedList();
        for( File xmlFile : FileUtils.listFiles( dir, new String[]{"mig.xml"}, true ) ){
            try{
                List<MigratorDefinition> defs = XmlUtils.unmarshallBeans( xmlFile, "/migration/migrator", MigratorDefinition.class );
                retDefs.addAll( defs );
                for( MigratorDefinition def : defs ) {
                    try { Utils.validate( def ); } 
                    catch( MigrationException ex ){ problems.add( ex ); }
                }
            }
            catch( Exception ex ){
                problems.add(ex);
            }
        }
        String msg = "Errors occured when reading migrator descriptors from " + dir + ": ";
        MigrationExceptions.wrapExceptions( problems, null );
        return retDefs;
    }
public static List < MigratorDefinition > loadMigratorDefinitions ( File dir , GlobalConfiguration gc ) throws MigrationException { List < MigratorDefinition > retDefs = new LinkedList ( ) ; List < Exception > problems = new LinkedList ( ) ; for ( File xmlFile : FileUtils . listFiles ( dir , new String [ ] { "mig.xml" } , true ) ) { try { List < MigratorDefinition > defs = XmlUtils . unmarshallBeans ( xmlFile , "/migration/migrator" , MigratorDefinition . class ) ; retDefs . addAll ( defs ) ; for ( MigratorDefinition def : defs ) { try { Utils . validate ( def ) ; } catch ( MigrationException ex ) { problems . add ( ex ) ; } } } catch ( Exception ex ) { problems . add ( ex ) ; } } String msg = "Errors occured when reading migrator descriptors from " + dir + ": " ; MigrationExceptions . wrapExceptions ( problems , null ) ; return retDefs ; }
Reads migrator descriptors from *.mig.xml in the given dir and returns them.
Reads migrator descriptors from * . mig . xml in the given dir and returns them .
// For each *.mig.xml file... // Validate