void on()

in domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxDomainEvent/DomainObjectXxxDomainEventControlStrategy.java [102:122]


        void on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, ServiceRegistry serviceRegistry) {
            if (ev instanceof DomainObjectXxxDomainEventPage.ActionEvent) {
                val actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent) ev;
                switch (actionEvent.getEventPhase()) {
                    case EXECUTING:
                        List<Object> arguments = actionEvent.getArguments();
                        String newValue = ((String) arguments.get(0)).toUpperCase();
                        arguments.set(0, newValue);
                        break;
                }
            }
            if (ev instanceof DomainObjectXxxDomainEventPage.PropertyEvent) {
                val propertyEvent = (DomainObjectXxxDomainEventPage.PropertyEvent) ev;
                switch (propertyEvent.getEventPhase()) {
                    case EXECUTING:
                        String newValue = propertyEvent.getNewValue().toString().toUpperCase();
                        propertyEvent.setNewValue(newValue);
                        break;
                }
            }
        }