Package org.apache.continuum.web.util

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


        {
            addActionError( e.getMessage() );
            return INPUT;
        }

        AuditLog event = new AuditLog( "Build Agent URL=" + buildAgent.getUrl(), AuditLogConstants.MODIFY_BUILD_AGENT );
        event.setCategory( AuditLogConstants.BUILD_AGENT );
        event.setCurrentUser( getPrincipal() );

        if ( !found )
        {
            configuration.addBuildAgent( buildAgent );
            configuration.store();
            event.setAction( AuditLogConstants.ADD_BUILD_AGENT );
        }

        event.log();

        return SUCCESS;
    }
View Full Code Here


                    getContinuum().getDistributedBuildManager().removeDistributedBuildQueueOfAgent(
                        buildAgent.getUrl() );
                    configuration.removeBuildAgent( agent );
                    configuration.store();

                    AuditLog event =
                        new AuditLog( "Build Agent URL=" + agent.getUrl(), AuditLogConstants.REMOVE_BUILD_AGENT );
                    event.setCategory( AuditLogConstants.BUILD_AGENT );
                    event.setCurrentUser( getPrincipal() );
                    event.log();

                    getContinuum().getDistributedBuildManager().reload();

                    return SUCCESS;
                }
View Full Code Here

        {
            if ( buildAgentGroup.getName().equals( group.getName() ) )
            {
                configuration.removeBuildAgentGroup( group );

                AuditLog event =
                    new AuditLog( "Build Agent Group=" + group.getName(), AuditLogConstants.REMOVE_BUILD_AGENT_GROUP );
                event.setCategory( AuditLogConstants.BUILD_AGENT );
                event.setCurrentUser( getPrincipal() );
                event.log();

                return SUCCESS;
            }
        }
View Full Code Here

        catch ( ContinuumException e )
        {
            logger.debug( "Unexpected error getting schedule" );
        }

        AuditLog event = new AuditLog( getName(), AuditLogConstants.ADD_SCHEDULE );
        event.setCategory( AuditLogConstants.SCHEDULE );
        event.setCurrentUser( getPrincipal() );

        if ( id == 0 )
        {
            try
            {
                getContinuum().addSchedule( setFields( new Schedule() ) );
                event.log();
            }
            catch ( ContinuumException e )
            {
                addActionError( getText( "schedule.buildqueues.add.error" ) );
                return ERROR;
            }
            return SUCCESS;
        }
        else
        {
            try
            {
                getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id ) ) );
                event.setAction( AuditLogConstants.MODIFY_SCHEDULE );
                event.log();
            }
            catch ( ContinuumException e )
            {
                addActionError( getText( "schedule.buildqueues.add.error" ) );
                return ERROR;
View Full Code Here

                    break;
                }
            }
        }

        AuditLog event = new AuditLog( "Build Agent Group=" + buildAgentGroup.getName(),
                                       AuditLogConstants.MODIFY_BUILD_AGENT_GROUP );
        event.setCategory( AuditLogConstants.BUILD_AGENT );
        event.setCurrentUser( getPrincipal() );

        if ( !found )
        {
            buildAgentGroup.setBuildAgents( selectedbuildAgents );
            configuration.addBuildAgentGroup( buildAgentGroup );
            event.setAction( AuditLogConstants.ADD_BUILD_AGENT_GROUP );
        }
        else
        // found
        {
            if ( typeGroup.equals( "new" ) )
            {
                addActionError( getResourceBundle().getString( "buildAgentGroup.error.duplicate" ) );
                return INPUT;
            }
            else if ( typeGroup.equals( "edit" ) )
            {
                buildAgentGroup.setBuildAgents( selectedbuildAgents );
                configuration.updateBuildAgentGroup( buildAgentGroup );
            }
        }

        getContinuum().getDistributedBuildManager().reload();
        event.log();

        return SUCCESS;
    }
View Full Code Here

            name = getContinuum().getSchedule( id ).getName();

            return CONFIRM;
        }

        AuditLog event = new AuditLog( name, AuditLogConstants.REMOVE_SCHEDULE );
        event.setCategory( AuditLogConstants.SCHEDULE );
        event.setCurrentUser( getPrincipal() );
        event.log();

        return SUCCESS;
    }
View Full Code Here

            releaseManager.perform( releaseId, performDirectory, goals, arguments, useReleaseProfile, listener,
                                    repository );
        }

        AuditLog event = new AuditLog( "ReleaseId=" + releaseId, AuditLogConstants.PERFORM_RELEASE );
        event.setCategory( AuditLogConstants.PROJECT );
        event.setCurrentUser( username );
        event.log();

        return SUCCESS;
    }
View Full Code Here

    {
        ContinuumProjectBuildingResult result = getContinuum().addMavenOneProject( pomUrl, selectedProjectGroup,
                                                                                   checkProtocol, scmUseCache,
                                                                                   this.getBuildDefinitionTemplateId() );

        AuditLog event = new AuditLog( hidePasswordInUrl( pomUrl ), AuditLogConstants.ADD_M1_PROJECT );
        event.setCategory( AuditLogConstants.PROJECT );
        event.setCurrentUser( getPrincipal() );

        if ( result == null || result.hasErrors() )
        {
            event.setAction( AuditLogConstants.ADD_M1_PROJECT_FAILED );
        }

        event.log();

        return result;
    }
View Full Code Here

                    {
                        logger.info( "Removing BuildResult with id=" + buildId );

                        getContinuum().removeBuildResult( buildId );

                        AuditLog event = new AuditLog( "Build Result id=" + buildId,
                                                       AuditLogConstants.REMOVE_BUILD_RESULT );
                        event.setCategory( AuditLogConstants.BUILD_RESULT );
                        event.setCurrentUser( getPrincipal() );
                        event.log();
                    }
                    catch ( ContinuumException e )
                    {
                        logger.error( "Error removing BuildResult with id=" + buildId );
                        addActionError( getText( "buildResult.delete.error", "Unable to delete build result",
View Full Code Here

        {
            this.setProjectGroupId( this.getSelectedProjectGroup() );
            return "projectGroupSummary";
        }

        AuditLog event = new AuditLog( "Project id=" + project.getId(), AuditLogConstants.ADD_PROJECT );
        event.setCategory( AuditLogConstants.PROJECT );
        event.setCurrentUser( getPrincipal() );
        event.log();

        return SUCCESS;
    }
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.