/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2015, CloudBees, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.jenkinsci.plugins.docker.traceability.util;


import hudson.model.AbstractProject;
import hudson.model.Fingerprint;
import hudson.model.Run;
import hudson.util.RunList;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import jenkins.model.FingerprintFacet;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprintAction;

/**
 * Common methods for {@link Fingerprint}s.
 * @author Oleg Nenashev
 */
public class FingerprintsHelper {
    
    public static @CheckForNull @SuppressWarnings("unchecked")
            <TFacet extends FingerprintFacet> TFacet getFacet
            (@Nonnull Fingerprint fingerprint, @Nonnull Class<TFacet> facetClass) {  
        for ( FingerprintFacet facet : fingerprint.getFacets()) {
            if (facetClass.isAssignableFrom(facet.getClass())) {
                return (TFacet)facet;
            }
        }
        return null;      
    }
             
    public static void addFacet(@Nonnull Fingerprint fingerprint, @Nonnull FingerprintFacet facet)
           throws IOException {
        fingerprint.getFacets().add(facet);
        fingerprint.save();
    }
    
    /**
     * Get all imageIDs, which have fingerprints somewhere. 
     * This method iterates through {@link Item}s and {@link Run}s in order to
     * find actions with image fingerprint references, there is no any caching of the data.
     * @return Collection of image IDs, which have declared fingerprints.
     * @deprecated Not recommended for a use due to the performance issues.
     *      A better method will be implemented in docker-commons at some point
     */
    @Deprecated
    public static @Nonnull Set<String> getImagesWithFingerprints() {
        final Set<String> result = new HashSet<String>();
        final Jenkins j = Jenkins.getInstance();
        if (j == null) {
            return result;
        }

        for (AbstractProject item : j.getAllItems(AbstractProject.class)) {
            RunList<Run> runs = item.getBuilds();
            for (Run run : runs) {
                DockerFingerprintAction action = run.getAction(DockerFingerprintAction.class);
                if (action != null) {
                    result.addAll(action.getImageIDs());
                }
            }
        }
        return result;
    }
}

@@ -2407,1161 +2407,6 @@
    %0A
-    /**%0A     * Get all imageIDs, which have fingerprints somewhere. %0A     * This method iterates through %7B@link Item%7Ds and %7B@link Run%7Ds in order to%0A     * find actions with image fingerprint references, there is no any caching of the data.%0A     * @return Collection of image IDs, which have declared fingerprints.%0A     * @deprecated Not recommended for a use due to the performance issues.%0A     *      A better method will be implemented in docker-commons at some point%0A     */%0A    @Deprecated%0A    public static @Nonnull Set%3CString%3E getImagesWithFingerprints() %7B%0A        final Set%3CString%3E result = new HashSet%3CString%3E();%0A        final Jenkins j = Jenkins.getInstance();%0A        if (j == null) %7B%0A            return result;%0A        %7D%0A%0A        for (AbstractProject item : j.getAllItems(AbstractProject.class)) %7B%0A            RunList%3CRun%3E runs = item.getBuilds();%0A            for (Run run : runs) %7B%0A                DockerFingerprintAction action = run.getAction(DockerFingerprintAction.class);%0A                if (action != null) %7B%0A                    result.addAll(action.getImageIDs());%0A                %7D%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A
 %7D%0A

Remove the obsolete FingerprintsHelper::getImagesWithFingerprints() method