Package org.apache.maven.scm.provider.integrity

Examples of org.apache.maven.scm.provider.integrity.APISession


        {
            throw new ScmException( "A single filename is required to execute the fileinfo command!" );
        }
        ScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( workingDirectory );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "memberinfo" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( '"' + filename + '"' );
        IntegrityFileInfoConsumer shellConsumer = new IntegrityFileInfoConsumer( getLogger() );

        try
        {
View Full Code Here


        throws ScmException
    {
        getLogger().info( "Attempting to connect with the MKS Integrity Server" );
        LoginScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        try
        {
            // First we will establish a connection to the MKS Integrity Server
            Response res = api.connect( iRepo.getHost(), iRepo.getPort(), iRepo.getUser(), iRepo.getPassword() );
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new LoginScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );

            // Next we will prepare the Project and Sandbox for the other commands
View Full Code Here

        {
            throw new ScmException( "A single filename is required to execute the blame command!" );
        }
        BlameScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        // Since the si annotate command is not completely API ready, we will use the CLI for this command
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( workingDirectory.getBasedir() );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "annotate" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( "--fields=date,revision,author" );
        shell.createArg().setValue( '"' + filename + '"' );
        IntegrityBlameConsumer shellConsumer = new IntegrityBlameConsumer( getLogger() );

        try
View Full Code Here

                                             ScmVersion startRevision, ScmVersion endRevision )
        throws ScmException
    {
        DiffScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        getLogger().info( "Showing differences bettween local files in " + fileSet.getBasedir().getAbsolutePath()
                              + " and server project " + iRepo.getConfigruationPath() );

        // Since the si diff command is not completely API ready, we will use the CLI for this command
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( fileSet.getBasedir() );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "diff" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( "-R" );
        shell.createArg().setValue( "--filter=changed:all" );
        shell.createArg().setValue( "--filter=format:text" );
        IntegrityDiffConsumer shellConsumer = new IntegrityDiffConsumer( getLogger() );
View Full Code Here

        setHost( host );
        setPort( port );
        setUser( user );
        setPassword( paswd );
        configurationPath = configPath;
        api = new APISession( logger );
        logger.debug( "Configuration Path: " + configurationPath );
    }
View Full Code Here

        {
            throw new ScmException( "A single filename is required to execute the blame command!" );
        }
        BlameScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        // Since the si annotate command is not completely API ready, we will use the CLI for this command
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( workingDirectory.getBasedir() );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "annotate" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( "--fields=date,revision,author" );
        shell.createArg().setValue( '"' + filename + '"' );
        IntegrityBlameConsumer shellConsumer = new IntegrityBlameConsumer( getLogger() );

        try
View Full Code Here

        throws ScmException
    {
        getLogger().info( "Attempting to connect with the MKS Integrity Server" );
        LoginScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        try
        {
            // First we will establish a connection to the MKS Integrity Server
            Response res = api.connect( iRepo.getHost(), iRepo.getPort(), iRepo.getUser(), iRepo.getPassword() );
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new LoginScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );

            // Next we will prepare the Project and Sandbox for the other commands
View Full Code Here

        {
            throw new ScmException( "A single filename is required to execute the fileinfo command!" );
        }
        ScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( workingDirectory );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "memberinfo" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( '"' + filename + '"' );
        IntegrityFileInfoConsumer shellConsumer = new IntegrityFileInfoConsumer( getLogger() );

        try
        {
View Full Code Here

                                             ScmVersion startRevision, ScmVersion endRevision )
        throws ScmException
    {
        DiffScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        APISession api = iRepo.getAPISession();
        getLogger().info( "Showing differences bettween local files in " + fileSet.getBasedir().getAbsolutePath()
                              + " and server project " + iRepo.getConfigruationPath() );

        // Since the si diff command is not completely API ready, we will use the CLI for this command
        Commandline shell = new Commandline();
        shell.setWorkingDirectory( fileSet.getBasedir() );
        shell.setExecutable( "si" );
        shell.createArg().setValue( "diff" );
        shell.createArg().setValue( "--hostname=" + api.getHostName() );
        shell.createArg().setValue( "--port=" + api.getPort() );
        shell.createArg().setValue( "--user=" + api.getUserName() );
        shell.createArg().setValue( "-R" );
        shell.createArg().setValue( "--filter=changed:all" );
        shell.createArg().setValue( "--filter=format:text" );
        IntegrityDiffConsumer shellConsumer = new IntegrityDiffConsumer( getLogger() );
View Full Code Here

        setHost( host );
        setPort( port );
        setUser( user );
        setPassword( paswd );
        configurationPath = configPath;
        api = new APISession( logger );
        logger.debug( "Configuration Path: " + configurationPath );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.integrity.APISession

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.