implemented update of time states upon update of document state
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user