Examples of queryArtifacts()


Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        }

        Constraint constraint = new ArtifactsByChecksumConstraint( q );
       
        ArtifactDAO artifactDao = dao.getArtifactDAO();
        databaseResults = artifactDao.queryArtifacts( constraint );

        if ( databaseResults.isEmpty() )
        {
            addActionError( "No results found" );
            return INPUT;
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        assertNotNull( savedArtifact );
        String savedKeyId = JDOHelper.getObjectId( savedArtifact.getModel() ).toString();
        assertEquals( "org.apache.maven.archiva:archiva-test-module:1.0::jar", savedKeyId );

        // Test that something has been saved.
        List artifacts = artiDao.queryArtifacts( null );
        assertNotNull( artifacts );
        assertEquals( 1, artifacts.size() );

        // Test that retrieved object is what we expect.
        ArchivaArtifact firstArtifact = (ArchivaArtifact) artifacts.get( 0 );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // Change value and save.
        savedArtifact.getModel().setOrigin( "changed" );
        artiDao.saveArtifact( savedArtifact );

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Get the specific artifact.
        ArchivaArtifact actualArtifact = artiDao.getArtifact( "org.apache.maven.archiva", "archiva-test-module", "1.0",
                                                              null, "jar" );
        assertNotNull( actualArtifact );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // Test expected values.
        assertEquals( "archiva-test-module", actualArtifact.getArtifactId() );
        assertEquals( "changed", actualArtifact.getModel().getOrigin() );

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Delete object.
        artiDao.deleteArtifact( actualArtifact );
        assertEquals( 0, artiDao.queryArtifacts( null ).size() );
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Delete object.
        artiDao.deleteArtifact( actualArtifact );
        assertEquals( 0, artiDao.queryArtifacts( null ).size() );
    }
}
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        repoTask.setRepositoryId( "testRepo" );
       
        taskExecutor.executeTask( repoTask );

        ArtifactDAO adao = dao.getArtifactDAO();
        List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
       
        assertNotNull( unprocessedResultList );
        assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
    }
   
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        ArchivaArtifact artifact = adao.getArtifact( "javax.sql", "jdbc", "2.0", null, "jar" );

        assertNotNull( artifact );

        // Test for artifact existance.
        List artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        List artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        dataTask.setName( "testDataTask" );

        taskExecutor.executeTask( dataTask );
       
        // Test for artifact existance.
        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
        assertNotNull( "Processed Results should not be null.", processedResultList );
        assertEquals( "Incorrect number of processed artifacts detected.", 1, processedResultList.size() );
    }
   
    protected ManagedRepositoryConfiguration createRepository( String id, String name, File location )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.