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

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


        ArtifactDAO dao = (ArtifactDAO) control.getMock();
        archivaDao.setArtifactDao( dao );

        for ( String v : versions )
        {
            ArtifactsRelatedConstraint c = new ArtifactsRelatedConstraint( groupId, artifactId, v );
            dao.queryArtifacts( c );
            control.setReturnValue( Collections.singletonList( createArtifact( groupId, artifactId, v ) ) );
        }

        control.replay();
View Full Code Here


    private ArchivaArtifact getArtifact( final String principal, final List<String> observableRepositoryIds,
                                         final String groupId, final String artifactId, final String version )
        throws ObjectNotFoundException, ArchivaDatabaseException
    {
        ArchivaArtifact pomArtifact = null;
        Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );

        try
        {
            List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );
View Full Code Here

                if ( VersionUtil.getBaseVersion( uniqueVersion ).equals( version ) )
                {
                    try
                    {
                        log.debug( "Retrieving artifact with version " + uniqueVersion );
                        Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, uniqueVersion );
                        List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );

                        for ( ArchivaArtifact artifact : artifacts )
                        {
                            if ( artifact.getRepositoryId().equals( repositoryId ) )
View Full Code Here

        String type = "jar";

        try
        {
            List<ArchivaArtifact> artifacts =
                dao.getArtifactDAO().queryArtifacts( new ArtifactsRelatedConstraint( groupId, artifactId, version ) );

            if ( artifacts.size() > 0 )
            {
                type = artifacts.get( 0 ).getType();
            }
View Full Code Here

        String type = "jar";

        try
        {
            List<ArchivaArtifact> artifacts =
                dao.getArtifactDAO().queryArtifacts( new ArtifactsRelatedConstraint( groupId, artifactId, version ) );

            if ( artifacts.size() > 0 )
            {
                type = artifacts.get( 0 ).getType();
            }
View Full Code Here

    {
        StringBuffer sb = new StringBuffer();

        try
        {
            Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
            List relatedArtifacts = dao.getArtifactDAO().queryArtifacts( constraint );

            if ( relatedArtifacts != null )
            {
                String repoId = ( (ArchivaArtifact) relatedArtifacts.get( 0 ) ).getModel().getRepositoryId();
View Full Code Here

    {
        StringBuffer sb = new StringBuffer();

        try
        {
            Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
            List relatedArtifacts = dao.getArtifactDAO().queryArtifacts( constraint );

            if ( relatedArtifacts != null )
            {
                String repoId = ( (ArchivaArtifact) relatedArtifacts.get( 0 ) ).getModel().getRepositoryId();
View Full Code Here

    {
        StringBuffer sb = new StringBuffer();

        try
        {
            Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
            List<ArchivaArtifact> relatedArtifacts = dao.getArtifactDAO().queryArtifacts( constraint );

            if ( relatedArtifacts != null && relatedArtifacts.size() > 0 )
            {
                String prefix = req.getContextPath() + "/repository/";
View Full Code Here

    private ArchivaArtifact getArtifact( final String principal, final List<String> observableRepositoryIds,
                                         final String groupId, final String artifactId, final String version )
        throws ObjectNotFoundException, ArchivaDatabaseException
    {
        ArchivaArtifact pomArtifact = null;
        Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );

        try
        {
            List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );
View Full Code Here

                if ( VersionUtil.getBaseVersion( uniqueVersion ).equals( version ) )
                {
                    try
                    {
                        log.debug( "Retrieving artifact with version " + uniqueVersion );
                        Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, uniqueVersion );
                        List<ArchivaArtifact> artifacts = dao.getArtifactDAO().queryArtifacts( constraint );

                        for ( ArchivaArtifact artifact : artifacts )
                        {
                            if ( artifact.getRepositoryId().equals( repositoryId ) )
View Full Code Here

TOP

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

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.