Package org.apache.maven.scm.provider.tfs.command.consumer

Examples of org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer


{

    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository r, ScmFileSet f, ScmVersion v )
        throws ScmException
    {
        FileListConsumer fileConsumer = new FileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
       
        TfsCommand command = createCommand( r, f, v );
        int status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new UpdateScmResult( command.getCommandString(), "Error code for TFS update command - " + status,
                                        err.getOutput(), false );
        }
        return new UpdateScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here


{

    protected ListScmResult executeListCommand( ScmProviderRepository r, ScmFileSet f, boolean recursive, ScmVersion v )
        throws ScmException
    {
        FileListConsumer out = new ServerFileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
       
        TfsCommand command = createCommand( r, f, recursive );
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new ListScmResult( command.getCommandString(), "Error code for TFS list command - " + status,
                                      err.getOutput(), false );
        }
       
        return new ListScmResult( command.getCommandString(), out.getFiles() );
    }
View Full Code Here

{

    protected ScmResult executeEditCommand( ScmProviderRepository r, ScmFileSet f )
        throws ScmException
    {
        FileListConsumer out = new FileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
       
        TfsCommand command = createCommand( r, f );
        int status = command.execute( out, err );
       
        if ( status != 0 || err.hasBeenFed() )
        {
            return new EditScmResult( command.getCommandString(), "Error code for TFS edit command - " + status,
                                      err.getOutput(), false );
        }
       
        return new EditScmResult( command.getCommandString(), out.getFiles() );
    }
View Full Code Here

            StringStreamConsumer sc = (StringStreamConsumer) out;
            debug( sc.getOutput() );
        }
        if ( out instanceof FileListConsumer )
        {
            FileListConsumer f = (FileListConsumer) out;
            for ( Iterator<ScmFile> i = f.getFiles().iterator(); i.hasNext(); )
            {
                ScmFile file = i.next();
                debug( file.getPath() );
            }
        }
View Full Code Here

    protected ScmResult executeAddCommand( ScmProviderRepository r, ScmFileSet f, String m, boolean b )
        throws ScmException
    {
        TfsCommand command = createCommand( r, f );
       
        FileListConsumer fileConsumer = new FileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();

        int status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new AddScmResult( command.getCommandString(), "Error code for TFS add command - " + status,
                                     err.getOutput(), false );
        }
       
        return new AddScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here

                return new CheckOutScmResult( command.getCommandString(),
                                              "Error code for TFS checkout (workfold map) command - " + status,
                                              err.getOutput(), false );
            }
        }
        FileListConsumer fileConsumer = new FileListConsumer();
        err = new ErrorStreamConsumer();
        command = createGetCommand( r, f, v, recursive );
        status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new CheckOutScmResult( command.getCommandString(), "Error code for TFS checkout (get) command - "
                + status, err.getOutput(), false );
        }
       
        return new CheckOutScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here

    protected void setUp()
        throws Exception
    {
        super.setUp();
        consumer = new FileListConsumer();
    }
View Full Code Here

    protected CheckInScmResult executeCheckInCommand( ScmProviderRepository r, ScmFileSet f, String m, ScmVersion v )
        throws ScmException
    {

        TfsCommand command = createCommand( r, f, m );
        FileListConsumer fileConsumer = new FileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
       
        int status = command.execute( fileConsumer, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new CheckInScmResult( command.getCommandString(), "Error code for TFS checkin command - " + status,
                                         err.getOutput(), false );
        }
        return new CheckInScmResult( command.getCommandString(), fileConsumer.getFiles() );
    }
View Full Code Here

{

    protected ScmResult executeUnEditCommand( ScmProviderRepository r, ScmFileSet f )
        throws ScmException
    {
        FileListConsumer out = new FileListConsumer();
        ErrorStreamConsumer err = new ErrorStreamConsumer();
        TfsCommand command = createCommand( r, f );
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new UnEditScmResult( command.getCommandString(), "Error code for TFS unedit command - " + status,
                                        err.getOutput(), false );
        }
        return new UnEditScmResult( command.getCommandString(), out.getFiles() );
    }
View Full Code Here

    protected void setUp()
        throws Exception
    {
        super.setUp();
        consumer = new FileListConsumer();
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer

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.