forked from kevin.shehu/GGD
60 lines
1.0 KiB
Java
60 lines
1.0 KiB
Java
package eu.hsrw.ias.ggd;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
public class Greenhouse {
|
|
|
|
private String id = "8bdbe6ae-eafb-4e99-bb01-db8784dd9633";
|
|
private String id2="e5ec9f15-f214-455d-9f02-3c134c770dc1";//Nica
|
|
private Severity state = Severity.Unknown;
|
|
|
|
public Greenhouse() {
|
|
this.devices = new ArrayList<>();
|
|
}
|
|
|
|
public Greenhouse(List<Device> devices) {
|
|
this.devices = devices;
|
|
}
|
|
|
|
public String getId2() {
|
|
return id2;
|
|
}
|
|
|
|
public void setId2(String id2) {
|
|
this.id2 = id2;
|
|
}
|
|
|
|
public void addDevice(Device device) {
|
|
this.devices.add(device);
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Severity getState() {
|
|
return state;
|
|
}
|
|
|
|
public void setState(Severity state) {
|
|
if (this.state != Severity.Critical) {
|
|
this.state = state;
|
|
}
|
|
}
|
|
|
|
public List<Device> getDevices() {
|
|
return devices;
|
|
}
|
|
|
|
public void setDevices(List<Device> devices) {
|
|
this.devices = devices;
|
|
}
|
|
|
|
private List<Device> devices;
|
|
}
|