|
@@ -5,6 +5,7 @@ import java.util.ArrayList;
|
|
|
import java.util.LinkedList;
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
+import cz.hsrs.core.WebServiceException;
|
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
import net.sf.json.JSONObject;
|
|
|
import cz.hsrs.db.model.NoItemFoundException;
|
|
import cz.hsrs.db.model.NoItemFoundException;
|
|
@@ -116,6 +117,8 @@ public class ManagementUtil extends DBUtil {
|
|
|
throw new NoItemFoundException("Attribute 'sensors' is required.");
|
|
throw new NoItemFoundException("Attribute 'sensors' is required.");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ throw new WebServiceException(425, "Update of the sensor is not supported yet.");
|
|
|
|
|
+ /*
|
|
|
for (Sensor sensor : sensors) {
|
|
for (Sensor sensor : sensors) {
|
|
|
long sensorId = sensor.getSensorId();
|
|
long sensorId = sensor.getSensorId();
|
|
|
// 2. iterace
|
|
// 2. iterace
|
|
@@ -124,6 +127,8 @@ public class ManagementUtil extends DBUtil {
|
|
|
}
|
|
}
|
|
|
return new UnitInsert(unitId, null, sensors);
|
|
return new UnitInsert(unitId, null, sensors);
|
|
|
|
|
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
throw new NoItemFoundException("Attribute 'unit' is required.");
|
|
throw new NoItemFoundException("Attribute 'unit' is required.");
|
|
|
}
|
|
}
|