com.capitalone.dashboard.model.Collector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core package shared by API layer and Microservices
package com.capitalone.dashboard.model;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* The collectors that have been registered in the given Dashboard app instance.
*/
@Document(collection = "collectors")
public class Collector extends BaseModel {
private String name;
private CollectorType collectorType;
private boolean enabled;
private boolean online;
private List errors = new ArrayList<>();
//Every collector will have its own set of required and all fields depending upon the specific tool.
private Map uniqueFields = new HashMap<>();
private Map allFields = new HashMap<>();
private long lastExecuted;
private List searchFields = Arrays.asList("description");
private Map properties = new HashMap<>(); //general purpose name-value properties
public Collector() {
}
public Collector(String name, CollectorType collectorType) {
this.name = name;
this.collectorType = collectorType;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CollectorType getCollectorType() {
return collectorType;
}
public void setCollectorType(CollectorType collectorType) {
this.collectorType = collectorType;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isOnline() {
return online;
}
public void setOnline(boolean online) {
this.online = online;
}
public long getLastExecuted() {
return lastExecuted;
}
public void setLastExecuted(long lastExecuted) {
this.lastExecuted = lastExecuted;
}
public List getErrors() {
return errors;
}
public void setErrors(List errors) {
this.errors = errors;
}
public Map getUniqueFields() {
return uniqueFields;
}
public void setUniqueFields(Map uniqueFields) {
this.uniqueFields = uniqueFields;
}
public Map getAllFields() {
return allFields;
}
public void setAllFields(Map allFields) {
this.allFields = allFields;
}
public List getSearchFields() {
return searchFields;
}
public void setSearchFields(List searchFields) {
this.searchFields = searchFields;
}
public Map getProperties() {
return properties;
}
public void setProperties(Map properties) {
this.properties = properties;
}
}