implemented update of time states upon update of document state

This commit is contained in:
2025-10-28 10:31:48 +01:00
parent 180c7ee515
commit 9882054343
6 changed files with 185 additions and 147 deletions

View File

@@ -1,5 +1,9 @@
/* © SRSoftware 2025 */
package de.srsoftware.umbrella.core.api;
import de.srsoftware.umbrella.core.model.Time;
import java.util.Collection;
public interface TimeService {
void updateStates(Collection<Long> timeIds, Time.State timeState);
}

View File

@@ -132,6 +132,9 @@ public class Time implements Mappable{
var o = json.get(STATE);
try {
switch (o) {
case JSONObject nested:
state = State.of(nested.getInt(CODE));
break;
case String stateName:
state = State.valueOf(stateName);
break;