package fr.synchrotron.soleil.ica.ci.app.mavenrepoimporter.service.mongodb.integration;

import fr.synchrotron.soleil.ica.ci.lib.mongodb.domainobjects.artifact.ArtifactDocument;
import org.springframework.integration.annotation.Filter;

/**
 * @author Gregory Boissinot
 */
public class BinaryArtifactFilter {

    @Filter
    @SuppressWarnings("unused")
    public boolean filteringBinaryArtifacts(ArtifactDocument artifactObj) {

        final String org = artifactObj.getOrg();
        final String name = artifactObj.getName();
        final String version = artifactObj.getVersion();
        if ("org.codehaus.service-conduit".equals(org)
                && "sca4j-xmlfactory".equals(name)
                && "0.9.6".equals(version) && "binary".equals(artifactObj.getType())) {
            return true;
        } else {
            return false;
        }

//        return ("binary".equals(artifactObj.getType()));
    }
}

@@ -428,441 +428,8 @@
 ) %7B%0A
-%0A        final String org = artifactObj.getOrg();%0A        final String name = artifactObj.getName();%0A        final String version = artifactObj.getVersion();%0A        if (%22org.codehaus.service-conduit%22.equals(org)%0A                && %22sca4j-xmlfactory%22.equals(name)%0A                && %220.9.6%22.equals(version) && %22binary%22.equals(artifactObj.getType())) %7B%0A            return true;%0A        %7D else %7B%0A            return false;%0A        %7D%0A%0A//
     

Fix Filtering