Package org.apache.continuum.web.util

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


        }

        if ( projectId != 0 )
        {
            String resource = "Project id=" + projectId + ":" +  goals + " " + arguments;
            AuditLog event = new AuditLog( resource, AuditLogConstants.ADD_GOAL );
            event.setCategory( AuditLogConstants.BUILD_DEFINITION );
            event.setCurrentUser( getPrincipal() );
            event.log();
            return SUCCESS;
        }
        else
        {
            String resource = "Project Group id=" + projectGroupId + ":" + goals + " " + arguments;
            AuditLog event = new AuditLog( resource, AuditLogConstants.ADD_GOAL );
            event.setCategory( AuditLogConstants.BUILD_DEFINITION );
            event.setCurrentUser( getPrincipal() );
            event.log();
            return "success_group";
        }
    }
View Full Code Here


            if ( confirmed )
            {
                getContinuum().removeBuildDefinitionFromProject( projectId, buildDefinitionId );
               
                String resource = "Project id=" + projectId + ":" +  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

            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

            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

        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

            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

       
            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

            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

        throws ContinuumException
    {
        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

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.