Package org.apache.continuum.web.util

Examples of org.apache.continuum.web.util.AuditLog


            if ( confirmed )
            {
                getContinuum().removeBuildDefinitionFromProjectGroup( projectGroupId, buildDefinitionId );

                String resource = "Project Group id=" + projectGroupId + ":" + goals + " " + arguments;
                AuditLog event = new AuditLog( resource, AuditLogConstants.REMOVE_GOAL );
                event.setCategory( AuditLogConstants.BUILD_DEFINITION );
                event.setCurrentUser( getPrincipal() );
                event.log();

                return SUCCESS;
            }
            else
            {
View Full Code Here


                BuildsManager buildsManager = getContinuum().getBuildsManager();

                buildsManager.cancelBuild( projectId );
            }

            AuditLog event = new AuditLog( "Project id=" + projectId, AuditLogConstants.CANCEL_BUILD );
            event.setCategory( AuditLogConstants.PROJECT );
            event.setCurrentUser( getPrincipal() );
            event.log();
        }
        catch ( AuthorizationRequiredException e )
        {
            return REQUIRES_AUTHORIZATION;
        }
View Full Code Here

        {
            for ( int i = 0; i < projectsId.length; i++ )
            {
                getContinuum().getDistributedBuildManager().cancelBuild( projectsId[i] );

                AuditLog event = new AuditLog( "Project id=" + projectsId[i], AuditLogConstants.CANCEL_BUILD );
                event.setCategory( AuditLogConstants.PROJECT );
                event.setCurrentUser( getPrincipal() );
                event.log();
            }
        }
        else
        {
            BuildsManager parallelBuildsManager = getContinuum().getBuildsManager();
            parallelBuildsManager.removeProjectsFromBuildQueue( projectsId );

            try
            {
                // now we must check if the current build is one of this
                int index = ArrayUtils.indexOf( projectsId, getCurrentProjectIdBuilding() );
                if ( index > 0 )
                {
                    int projId = projectsId[index];
                    getContinuum().getBuildsManager().cancelBuild( projId );

                    AuditLog event = new AuditLog( "Project id=" + projId, AuditLogConstants.CANCEL_BUILD );
                    event.setCategory( AuditLogConstants.PROJECT );
                    event.setCurrentUser( getPrincipal() );
                    event.log();
                }

            }
            catch ( BuildManagerException e )
            {
View Full Code Here

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            getContinuum().getDistributedBuildManager().cancelGroupBuild( projectGroupId );

            AuditLog event = new AuditLog( "Project Group id=" + projectGroupId, AuditLogConstants.CANCEL_BUILD );
            event.setCategory( AuditLogConstants.PROJECT_GROUP );
            event.setCurrentUser( getPrincipal() );
            event.log();

            return SUCCESS;
        }
        else
        {
View Full Code Here

                    buildQueue.setName( name );
                    BuildQueue addedBuildQueue = getContinuum().addBuildQueue( buildQueue );

                    getContinuum().getBuildsManager().addOverallBuildQueue( addedBuildQueue );

                    AuditLog event = new AuditLog( "Build Queue id=" + addedBuildQueue.getId(),
                                                   AuditLogConstants.ADD_BUILD_QUEUE );
                    event.setCategory( AuditLogConstants.BUILD_QUEUE );
                    event.setCurrentUser( getPrincipal() );
                    event.log();
                }
                else
                {
                    addActionError( "Build queue name already exists." );
                    return ERROR;
View Full Code Here

            getContinuum().getBuildsManager().removeOverallBuildQueue( buildQueueToBeDeleted.getId() );
            getContinuum().removeBuildQueue( buildQueueToBeDeleted );

            this.buildQueueList = getContinuum().getAllBuildQueues();

            AuditLog event = new AuditLog( "Build Queue id=" + buildQueue.getId(),
                                           AuditLogConstants.REMOVE_BUILD_QUEUE );
            event.setCategory( AuditLogConstants.BUILD_QUEUE );
            event.setCurrentUser( getPrincipal() );
            event.log();
        }
        else
        {
            return CONFIRM;
        }
View Full Code Here

        catch ( NoBuildAgentInGroupException e )
        {
            addActionError( getText( "projectGroup.build.error.noBuildAgentInGroup" ) );
        }

        AuditLog event = new AuditLog( AuditLogConstants.FORCE_BUILD );
        event.setCurrentUser( getPrincipal() );

        if ( projectId > 0 )
        {
            event.setResource( "Project id=" + projectId );
            event.setCategory( AuditLogConstants.PROJECT );
            event.log();

            if ( fromGroupPage || hasActionErrors() )
            {
                return "to_group_page";
            }
            if ( fromProjectPage )
            {
                return "to_project_page";
            }
        }
        else
        {
            event.setResource( "Project Group id=" + projectGroupId );
            event.setCategory( AuditLogConstants.PROJECT_GROUP );
            event.log();
            if ( fromGroupPage )
            {
                return "to_group_page";
            }
        }
View Full Code Here

            if ( purgeConfig != null )
            {
                purgeManager.purgeRepository( purgeConfig );

                AuditLog event = new AuditLog( "Repository id=" + repository.getId(),
                                               AuditLogConstants.PURGE_LOCAL_REPOSITORY );
                event.setCategory( AuditLogConstants.LOCAL_REPOSITORY );
                event.setCurrentUser( getPrincipal() );
                event.log();
            }
        }
        return SUCCESS;
    }
View Full Code Here

    {
        List<BuildDefinition> selectedBuildDefinitions = getBuildDefinitionsFromSelectedBuildDefinitions();

        BuildDefinitionTemplate result;

        AuditLog event = new AuditLog( buildDefinitionTemplate.getName(), AuditLogConstants.ADD_TEMPLATE );
        event.setCategory( AuditLogConstants.TEMPLATE );
        event.setCurrentUser( getPrincipal() );

        if ( this.buildDefinitionTemplate.getId() > 0 )
        {
            buildDefinitionTemplate.setBuildDefinitions( selectedBuildDefinitions );
            result = this.getContinuum().getBuildDefinitionService().updateBuildDefinitionTemplate(
                buildDefinitionTemplate );
            event.setAction( AuditLogConstants.MODIFY_TEMPLATE );
        }
        else
        {
            buildDefinitionTemplate.setBuildDefinitions( selectedBuildDefinitions );
            this.buildDefinitionTemplate = this.getContinuum().getBuildDefinitionService().addBuildDefinitionTemplate(
                buildDefinitionTemplate );
            result = this.buildDefinitionTemplate;
        }

        if ( result == null )
        {
            addActionError( getText( "buildDefintionTemplate.name.exists" ) );
            return INPUT;
        }
        else
        {
            event.log();
        }

        return SUCCESS;
    }
View Full Code Here

        if ( confirmed )
        {
            buildDefinitionTemplate = getContinuum().getBuildDefinitionService().getBuildDefinitionTemplate(
                this.buildDefinitionTemplate.getId() );

            AuditLog event = new AuditLog( buildDefinitionTemplate.getName(), AuditLogConstants.REMOVE_TEMPLATE );
            event.setCategory( AuditLogConstants.TEMPLATE );
            event.setCurrentUser( getPrincipal() );
            event.log();

            this.getContinuum().getBuildDefinitionService().removeBuildDefinitionTemplate( buildDefinitionTemplate );
        }
        else
        {
View Full Code Here

TOP

Related Classes of org.apache.continuum.web.util.AuditLog

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.