Package org.apache.maven.archiva.model

Examples of org.apache.maven.archiva.model.ArchivaAuditLogs


        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config.findManagedRepositoryById( REPOSITORY_ID ) );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );

        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
View Full Code Here


        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config.findManagedRepositoryById( REPOSITORY_ID ) );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );

        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
       
View Full Code Here

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config.findManagedRepositoryById( REPOSITORY_ID ) );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );

        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
View Full Code Here

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config.findManagedRepositoryById( REPOSITORY_ID ) );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
       
        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
      
View Full Code Here

        repoConfig.setBlockRedeployments( false );       
        content.setRepository( repoConfig );     
       
        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
       
        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();

        String returnString = uploadAction.doUpload();
        assertEquals( Action.SUCCESS, returnString );

        archivaConfigControl.verify();
        repoFactoryControl.verify();
        auditLogsDaoControl.verify();

        archivaConfigControl.reset();
        repoFactoryControl.reset();
        auditLogsDaoControl.reset();
        auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );

        String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation();
        assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation );

        verifyChecksums( repoLocation );

        // RE-upload artifact
        setUploadParameters( "1.0", null,
                             new File( getBasedir(),
                                       "target/test-classes/upload-artifact-test/artifact-to-be-reuploaded.jar" ),
                             null, true );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
       
        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
View Full Code Here

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config.findManagedRepositoryById( REPOSITORY_ID ) );

        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 2 );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content, 2 );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
       
        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
View Full Code Here

        repoConfig.setBlockRedeployments( false );       
        content.setRepository( repoConfig );       
   
        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 2 );
        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content, 2 );
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null, 2 );
   
        archivaConfigControl.replay();
        repoFactoryControl.replay();
        auditLogsDaoControl.replay();
   
View Full Code Here

        if( principal == null )
        {
            user = "guest";
        }
       
        ArchivaAuditLogs auditLogs = new ArchivaAuditLogs();
        auditLogs.setArtifact( resource );
        auditLogs.setEvent( action );
        auditLogs.setEventDate( Calendar.getInstance().getTime() );
        auditLogs.setRepositoryId( repositoryId );
        auditLogs.setUsername( user );
       
        auditLogsDao.saveAuditLogs( auditLogs );
    }
View Full Code Here

        assertEquals( REPO_ID, action.getRepoid() );
        ManagedRepositoryConfiguration repository = action.getRepository();
        populateRepository( repository );
        repository.setName( "new repo name" );
       
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
        auditLogsDaoControl.replay();
       
        String status = action.commit();
        assertEquals( Action.SUCCESS, status );
       
View Full Code Here

       
        action.setRepoid( REPO_ID );
        action.prepare();
        assertEquals( REPO_ID, action.getRepoid() );
       
        auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null );
        auditLogsDaoControl.replay();
       
        ManagedRepositoryConfiguration repository = new ManagedRepositoryConfiguration();
        populateRepository( repository );
        repository.setLocation( new File( "target/test/location/new" ).getCanonicalPath() );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.model.ArchivaAuditLogs

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.