All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.capitalone.dashboard.model.WhiteSourceCollector Maven / Gradle / Ivy

package com.capitalone.dashboard.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class WhiteSourceCollector extends Collector {
    private List whiteSourceServers = new ArrayList<>();

    public List getWhiteSourceServers() {
        return whiteSourceServers;
    }

    public void setWhiteSourceServers(List whiteSourceServers) {
        this.whiteSourceServers = whiteSourceServers;
    }

    public static WhiteSourceCollector prototype(List server) {
        WhiteSourceCollector protoType = new WhiteSourceCollector();
        protoType.setName("WhiteSource");
        protoType.setCollectorType(CollectorType.LibraryPolicy);
        protoType.setOnline(true);
        protoType.setEnabled(true);
        protoType.getWhiteSourceServers().addAll(server);
        Map allOptions = new HashMap<>();
        allOptions.put(WhiteSourceComponent.PRODUCT_NAME, "");
        allOptions.put(WhiteSourceComponent.PROJECT_NAME, "");
        allOptions.put(WhiteSourceComponent.PRODUCT_TOKEN, "");
        allOptions.put(WhiteSourceComponent.PROJECT_TOKEN, "");
        allOptions.put(WhiteSourceComponent.ORG_NAME, "");
        allOptions.put(WhiteSourceComponent.LOCAL_CONFIG, false);
        protoType.setAllFields(allOptions);

        Map uniqueOptions = new HashMap<>();
        uniqueOptions.put(WhiteSourceComponent.PROJECT_TOKEN, "");
        uniqueOptions.put(WhiteSourceComponent.ORG_NAME, "");
        protoType.setUniqueFields(uniqueOptions);
        return protoType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy