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

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


                                                   ScmVersion scmVersion )
        throws ScmException
    {
        getLogger().info( "Attempting to check-in updates from sandbox " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        Sandbox siSandbox = iRepo.getSandbox();
        List<ScmFile> changedFiles = siSandbox.checkInUpdates( message );
        if ( siSandbox.getOverallCheckInSuccess() )
        {
            return new CheckInScmResult( "si ci/drop", changedFiles );
        }
        else
        {
View Full Code Here


                                                   ScmVersion scmVersion )
        throws ScmException
    {
        getLogger().info( "Attempting to check-in updates from sandbox " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        Sandbox siSandbox = iRepo.getSandbox();
        List<ScmFile> changedFiles = siSandbox.checkInUpdates( message );
        if ( siSandbox.getOverallCheckInSuccess() )
        {
            return new CheckInScmResult( "si ci/drop", changedFiles );
        }
        else
        {
View Full Code Here

        getLogger().info( "Attempting to revert members in sandbox " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        UnEditScmResult result;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.revertMembers();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new UnEditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

        ScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            File memberFile = new File( workingDirectory.getAbsoluteFile() + File.separator + filename );
            Response res = siSandbox.lock( memberFile, filename );
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new ScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

        getLogger().info( "Attempting to un-register sandbox in directory " + fileSet.getBasedir().getAbsolutePath() );
        RemoveScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.drop();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new RemoveScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

            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
            Project siProject = new Project( api, iRepo.getConfigruationPath() );
            Sandbox siSandbox = new Sandbox( api, siProject, fileSet.getBasedir().getAbsolutePath() );
            iRepo.setProject( siProject );
            iRepo.setSandbox( siSandbox );
        }
        catch ( APIException aex )
        {
View Full Code Here

                                           boolean binary )
        throws ScmException
    {
        getLogger().info( "Attempting to add new files from directory " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        Sandbox siSandbox = iRepo.getSandbox();
        String excludes = Sandbox.formatFilePatterns( fileSet.getExcludes() );
        String includes = Sandbox.formatFilePatterns( fileSet.getIncludes() );
        String msg = ( ( null == message || message.length() == 0 ) ? System.getProperty( "message" ) : message );
        List<ScmFile> addedFiles = siSandbox.addNonMembers( excludes, includes, msg );
        if ( siSandbox.getOverallAddSuccess() )
        {
            return new AddScmResult( "si add", addedFiles );
        }
        else
        {
View Full Code Here

        {
            // Initialize the list of ScmFile objects for the StatusScmResult
            List<ScmFile> scmFileList = new ArrayList<ScmFile>();

            // Get a listing for all the changes in the sandbox
            Sandbox siSandbox = iRepo.getSandbox();
            // Get the excludes and includes list from the configuration
            String excludes = Sandbox.formatFilePatterns( fileSet.getExcludes() );
            String includes = Sandbox.formatFilePatterns( fileSet.getIncludes() );

            // Get the new members found in the sandbox
            List<ScmFile> newMemberList = siSandbox.getNewMembers( excludes, includes );
            // Update the scmFileList with our updates
            scmFileList.addAll( newMemberList );

            // Get the changed/dropped members from the sandbox
            List<WorkItem> changeList = siSandbox.getChangeList();
            for ( Iterator<WorkItem> wit = changeList.iterator(); wit.hasNext(); )
            {
                WorkItem wi = wit.next();
                File memberFile = new File( wi.getField( "name" ).getValueAsString() );
                // Separate the changes into files that have been updated and deleted files
                if ( siSandbox.hasWorkingFile( (Item) wi.getField( "wfdelta" ).getValue() ) )
                {
                    scmFileList.add( new ScmFile( memberFile.getAbsolutePath(), ScmFileStatus.UPDATED ) );
                }
                else
                {
View Full Code Here

        ScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            File memberFile = new File( workingDirectory.getAbsoluteFile() + File.separator + filename );
            Response res = siSandbox.unlock( memberFile, filename );
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new ScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

        getLogger().info( "Attempting make files writeable in Sandbox " + fileSet.getBasedir().getAbsolutePath() );
        EditScmResult result;
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.makeWriteable();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new EditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
View Full Code Here

TOP

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

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.