Package org.apache.maven.archiva.database

Examples of org.apache.maven.archiva.database.Constraint


        return jasperPresent.booleanValue();
    }

    private Constraint configureConstraint()
    {
        Constraint constraint;

        range[0] = ( page - 1 ) * rowCount;
        range[1] = ( page * rowCount ) + 1; // Add 1 to check if it's the last page or not.

        if ( groupId != null && ( !groupId.equals( "" ) ) )
View Full Code Here


        {
            addActionError( "Unable to search for a blank checksum" );
            return INPUT;
        }

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

        if ( databaseResults.isEmpty() )
        {
            addActionError( "No results found" );
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

        {
            addActionError( "Unable to search for a blank checksum" );
            return INPUT;
        }

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

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

                artifactDAO.deleteArtifact( artifact );
               
                triggerAuditEvent( repositoryContent.getRepository().getId(), artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion(), AuditEvent.REMOVE_SCANNED );

                // Remove all repository problems related to this artifact
                Constraint artifactConstraint = new RepositoryProblemByArtifactConstraint( artifact );
                List<RepositoryProblem> repositoryProblems =
                    repositoryProblemDAO.queryRepositoryProblems( artifactConstraint );

                if ( repositoryProblems != null )
                {
View Full Code Here

                artifactDAO.deleteArtifact( artifact );
               
                triggerAuditEvent( repositoryContent.getRepository().getId(), artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion(), AuditEvent.REMOVE_SCANNED );

                // Remove all repository problems related to this artifact
                Constraint artifactConstraint = new RepositoryProblemByArtifactConstraint( artifact );
                List<RepositoryProblem> repositoryProblems =
                    repositoryProblemDAO.queryRepositoryProblems( artifactConstraint );

                if ( repositoryProblems != null )
                {
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

    }

    private void cleanupDatabase( String repoId )
        throws ArchivaDatabaseException
    {
        Constraint constraint = new ArtifactsByRepositoryConstraint( repoId );

        List<ArchivaArtifact> artifacts = archivaDAO.getArtifactDAO().queryArtifacts( constraint );

        for ( ArchivaArtifact artifact : artifacts )
        {
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.database.Constraint

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.