Package org.apache.continuum.buildagent.model

Examples of org.apache.continuum.buildagent.model.ContinuumBuildAgentConfigurationModel


        try
        {
            fis = new FileInputStream( file );
            ContinuumBuildAgentConfigurationModelXpp3Reader configurationXpp3Reader =
                new ContinuumBuildAgentConfigurationModelXpp3Reader();
            ContinuumBuildAgentConfigurationModel configuration =
                configurationXpp3Reader.read( new InputStreamReader( fis ) );

            this.generalBuildAgentConfiguration = new GeneralBuildAgentConfiguration();
            if ( StringUtils.isNotEmpty( configuration.getBuildOutputDirectory() ) )
            {
                this.generalBuildAgentConfiguration.setBuildOutputDirectory(
                    new File( configuration.getBuildOutputDirectory() ) );
            }
            if ( StringUtils.isNotEmpty( configuration.getWorkingDirectory() ) )
            {
                this.generalBuildAgentConfiguration.setWorkingDirectory(
                    new File( configuration.getWorkingDirectory() ) );
            }
            this.generalBuildAgentConfiguration.setContinuumServerUrl( configuration.getContinuumServerUrl() );
            this.generalBuildAgentConfiguration.setInstallations( configuration.getInstallations() );
        }
        catch ( IOException e )
        {
            log.error( e.getMessage(), e );
            throw new BuildAgentConfigurationException( e.getMessage(), e );
View Full Code Here


    public void save( File file )
        throws BuildAgentConfigurationException
    {
        try
        {
            ContinuumBuildAgentConfigurationModel configurationModel = new ContinuumBuildAgentConfigurationModel();
            if ( this.generalBuildAgentConfiguration.getBuildOutputDirectory() != null )
            {
                configurationModel.setBuildOutputDirectory(
                    this.generalBuildAgentConfiguration.getBuildOutputDirectory().getPath() );
            }
            if ( this.generalBuildAgentConfiguration.getWorkingDirectory() != null )
            {
                configurationModel.setWorkingDirectory(
                    this.generalBuildAgentConfiguration.getWorkingDirectory().getPath() );
            }
            configurationModel.setContinuumServerUrl( this.generalBuildAgentConfiguration.getContinuumServerUrl() );
            configurationModel.setInstallations( this.generalBuildAgentConfiguration.getInstallations() );

            ContinuumBuildAgentConfigurationModelXpp3Writer writer =
                new ContinuumBuildAgentConfigurationModelXpp3Writer();
            FileWriter fileWriter = new FileWriter( file );
            writer.write( fileWriter, configurationModel );
View Full Code Here

TOP

Related Classes of org.apache.continuum.buildagent.model.ContinuumBuildAgentConfigurationModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.