com.denimgroup.threadfix.data.enums.PendingScanStatus Maven / Gradle / Ivy
package com.denimgroup.threadfix.data.enums;
import com.denimgroup.threadfix.data.entities.PendingScan;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import static com.denimgroup.threadfix.CollectionUtils.list;
/**
* Created by jcatron on 12/5/16.
*/
public enum PendingScanStatus {
/*
To add more enums to this list, append them to the end of list.
*/
QUEUED ("Queued", true, false),
UPLOADED ("Uploaded", true, false),
FINDINGS_GENERATING("Generating Findings", true, true),
CHANNEL_MERGING ("Merging Channel Findings", true, true),
APPLICATION_MERGING ("Merging Application Findings", true, true),
APPLICATION_MERGED ("Merging Application Findings Completed", true, true),
DONE (null, false, false),
FINISHED_FINDING_PULLING("Findings Import From Server Finished.", true, true),
SCAN_INTERRUPTED("Scan processing was interrupted", false, false)
;
// Add new enums here at the end, do not add in the middle or beginning of list.
PendingScanStatus(String display, boolean open, boolean processing) {
this.display = display;
this.open = open;
this.processing = processing;
}
String display;
boolean open;
boolean processing;
@Override
public String toString() {
return display;
}
public boolean isOpen() {
return open;
}
public static List getOpen() {
return Arrays.asList(values()).stream().filter(status -> status.open).collect(Collectors.toList());
}
public static List getProcessing() {
return Arrays.asList(values()).stream().filter(status -> status.processing).collect(Collectors.toList());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy