@Test public void testLoadByName() { DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) executionConfigurationManager .load( "Default Configuration" ); assertNotNull( defaultRunConfiguration ); assertEquals( defaultRunConfiguration.getName(), "Default Configuration" ); }
@Override public List<RunConfiguration> load() { List<RunConfiguration> runConfigurations = new ArrayList<>(); for ( RunConfigurationProvider runConfigurationProvider : getRunConfigurationProviders() ) { runConfigurations.addAll( runConfigurationProvider.load() ); } Collections.sort( runConfigurations, ( o1, o2 ) -> { if ( o2.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { return 1; } return o1.getName().compareToIgnoreCase( o2.getName() ); } ); return runConfigurations; }
RunConfigurationManager implements RunConfigurationService { @Override public List<RunConfiguration> load() { List<RunConfiguration> runConfigurations = new ArrayList<>(); for ( RunConfigurationProvider runConfigurationProvider : getRunConfigurationProviders() ) { runConfigurations.addAll( runConfigurationProvider.load() ); } Collections.sort( runConfigurations, ( o1, o2 ) -> { if ( o2.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { return 1; } return o1.getName().compareToIgnoreCase( o2.getName() ); } ); return runConfigurations; } }
RunConfigurationManager implements RunConfigurationService { @Override public List<RunConfiguration> load() { List<RunConfiguration> runConfigurations = new ArrayList<>(); for ( RunConfigurationProvider runConfigurationProvider : getRunConfigurationProviders() ) { runConfigurations.addAll( runConfigurationProvider.load() ); } Collections.sort( runConfigurations, ( o1, o2 ) -> { if ( o2.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { return 1; } return o1.getName().compareToIgnoreCase( o2.getName() ); } ); return runConfigurations; } RunConfigurationManager( List<RunConfigurationProvider> runConfigurationProviders ); }
RunConfigurationManager implements RunConfigurationService { @Override public List<RunConfiguration> load() { List<RunConfiguration> runConfigurations = new ArrayList<>(); for ( RunConfigurationProvider runConfigurationProvider : getRunConfigurationProviders() ) { runConfigurations.addAll( runConfigurationProvider.load() ); } Collections.sort( runConfigurations, ( o1, o2 ) -> { if ( o2.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { return 1; } return o1.getName().compareToIgnoreCase( o2.getName() ); } ); return runConfigurations; } RunConfigurationManager( List<RunConfigurationProvider> runConfigurationProviders ); @Override List<RunConfiguration> load(); @Override RunConfiguration load( String name ); @Override boolean save( RunConfiguration runConfiguration ); @Override boolean delete( String name ); @Override void deleteAll(); String[] getTypes(); List<String> getNames(); List<String> getNames( String type ); RunConfiguration getRunConfigurationByType( String type ); RunConfigurationExecutor getExecutor( String type ); List<RunConfigurationProvider> getRunConfigurationProviders( String type ); List<RunConfigurationProvider> getRunConfigurationProviders(); RunConfigurationProvider getDefaultRunConfigurationProvider(); void setDefaultRunConfigurationProvider(
    RunConfigurationProvider defaultRunConfigurationProvider ); }
RunConfigurationManager implements RunConfigurationService { @Override public List<RunConfiguration> load() { List<RunConfiguration> runConfigurations = new ArrayList<>(); for ( RunConfigurationProvider runConfigurationProvider : getRunConfigurationProviders() ) { runConfigurations.addAll( runConfigurationProvider.load() ); } Collections.sort( runConfigurations, ( o1, o2 ) -> { if ( o2.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { return 1; } return o1.getName().compareToIgnoreCase( o2.getName() ); } ); return runConfigurations; } RunConfigurationManager( List<RunConfigurationProvider> runConfigurationProviders ); @Override List<RunConfiguration> load(); @Override RunConfiguration load( String name ); @Override boolean save( RunConfiguration runConfiguration ); @Override boolean delete( String name ); @Override void deleteAll(); String[] getTypes(); List<String> getNames(); List<String> getNames( String type ); RunConfiguration getRunConfigurationByType( String type ); RunConfigurationExecutor getExecutor( String type ); List<RunConfigurationProvider> getRunConfigurationProviders( String type ); List<RunConfigurationProvider> getRunConfigurationProviders(); RunConfigurationProvider getDefaultRunConfigurationProvider(); void setDefaultRunConfigurationProvider(
    RunConfigurationProvider defaultRunConfigurationProvider );  }