Package org.apache.maven.archiva.database.constraints

Examples of org.apache.maven.archiva.database.constraints.UniqueVersionConstraint


        resultHit.setVersions( versions );
        resultHit.setRepositoryId( null );
       
        results.addHit( SearchUtil.getHitId( resultHit.getGroupId(), resultHit.getArtifactId() ), resultHit );
   
        archivaDAOControl.expectAndReturn( archivaDAO.query( new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(),
                                                                                          resultHit.getArtifactId() ) ), null );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
   
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
View Full Code Here


        if ( !observableRepositoryIds.isEmpty() )
        {
            // NOTE: No group Id or artifact Id's should be returned here.
            List<String> versions =
                (List<String>) dao.query( new UniqueVersionConstraint( observableRepositoryIds, groupId, artifactId ) );
            results.setSelectedRepositoryIds( observableRepositoryIds );

            results.setVersions( processSnapshots( versions ) );
        }
        return results;
View Full Code Here

        List<String> timestampedVersions = new ArrayList<String>();

        if ( VersionUtil.isSnapshot( version ) )
        {
            List<String> versions =
                (List<String>) dao.query( new UniqueVersionConstraint( observableRepositoryIds, groupId, artifactId ) );

            for ( String uniqueVersion : versions )
            {  
                if ( VersionUtil.getBaseVersion( uniqueVersion ).equals( version ) ||
                        VersionUtil.getBaseVersion( uniqueVersion ).equals( VersionUtil.getBaseVersion( version ) ) )
View Full Code Here

    {
        ArchivaArtifact result = null;

        if ( VersionUtil.isGenericSnapshot( version ) )
        {
            final List<String> versions = (List<String>) dao.query( new UniqueVersionConstraint( groupId, artifactId ) );
            Collections.sort( versions );

            for ( String uniqueVersion : versions )
            {
                if ( VersionUtil.getBaseVersion( uniqueVersion ).equals( version ) )
View Full Code Here

        // TODO: do we still need to do this? all hits are already filtered in the NexusRepositorySearch
        //      before being returned as search results
        for ( SearchResultHit resultHit : results.getHits() )
        {
            final List<String> versions =
                (List<String>) dao.query( new UniqueVersionConstraint( getObservableRepos(), resultHit.getGroupId(),
                                                    resultHit.getArtifactId() ) );
            if ( versions != null && !versions.isEmpty() )
            {
                resultHit.setVersion( null );
                resultHit.setVersions( filterTimestampedSnapshots( versions ) );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.database.constraints.UniqueVersionConstraint

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.