Loading src/main/java/es/redmic/usersettingslib/events/SettingsEventFactory.java +50 −55 Original line number Diff line number Diff line Loading @@ -31,16 +31,17 @@ import es.redmic.exception.common.ExceptionType; import es.redmic.exception.common.InternalException; import es.redmic.usersettingslib.dto.PersistenceDTO; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.clearselection.ClearSelectionCancelledEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionConfirmedEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionFailedEvent; import es.redmic.usersettingslib.events.clearselection.PartialClearSelectionEvent; import es.redmic.usersettingslib.events.clearselection.SelectionClearedEvent; import es.redmic.usersettingslib.events.common.PersistenceCancelledEvent; import es.redmic.usersettingslib.events.common.PersistenceEvent; import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsCancelledEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCancelledEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCheckFailedEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCheckedEvent; Loading Loading @@ -129,27 +130,9 @@ public class SettingsEventFactory { throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } public static Event getEvent(Event source, String type, SelectionDTO selection) { SelectionEvent successfulEvent = null; if (type.equals(SettingsEventTypes.PARTIAL_SELECT)) { logger.debug("Creando evento PartialSelectEvent para: " + source.getAggregateId()); successfulEvent = new PartialSelectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_DESELECT)) { public static Event getEvent(Event source, String type, SettingsDTO settings) { logger.debug("Creando evento PartialDeselectEvent para: " + source.getAggregateId()); successfulEvent = new PartialDeselectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_CLEAR_SELECTION)) { logger.debug("Creando evento PartialClearEvent para: " + source.getAggregateId()); successfulEvent = new PartialClearSelectionEvent().buildFrom(source); } SettingsEvent successfulEvent = null; if (type.equals(SettingsEventTypes.SELECT)) { Loading Loading @@ -184,6 +167,48 @@ public class SettingsEventFactory { successfulEvent = new SelectionClearedEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVE)) { logger.debug("Creando evento SaveSettingsEvent para: " + source.getAggregateId()); successfulEvent = new SaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVED)) { logger.debug("Creando evento SettingsSavedEvent para: " + source.getAggregateId()); successfulEvent = new SettingsSavedEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setSettings(settings); return successfulEvent; } else { logger.error("Tipo de evento no soportado"); throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } } public static Event getEvent(Event source, String type, SelectionDTO selection) { SelectionEvent successfulEvent = null; if (type.equals(SettingsEventTypes.PARTIAL_SELECT)) { logger.debug("Creando evento PartialSelectEvent para: " + source.getAggregateId()); successfulEvent = new PartialSelectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_DESELECT)) { logger.debug("Creando evento PartialDeselectEvent para: " + source.getAggregateId()); successfulEvent = new PartialDeselectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_CLEAR_SELECTION)) { logger.debug("Creando evento PartialClearEvent para: " + source.getAggregateId()); successfulEvent = new PartialClearSelectionEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setSelection(selection); return successfulEvent; Loading @@ -203,17 +228,6 @@ public class SettingsEventFactory { successfulEvent = new PartialSaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVE)) { logger.debug("Creando evento SaveSettingsEvent para: " + source.getAggregateId()); successfulEvent = new SaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVED)) { logger.debug("Creando evento SettingsSavedEvent para: " + source.getAggregateId()); successfulEvent = new SettingsSavedEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setPersistence(persistence); return successfulEvent; Loading Loading @@ -274,10 +288,10 @@ public class SettingsEventFactory { } } public static Event getEvent(Event source, String type, SelectionDTO selection, String exceptionType, public static Event getEvent(Event source, String type, SettingsDTO settings, String exceptionType, Map<String, String> exceptionArguments) { SelectionCancelledEvent cancelledEvent = null; SettingsCancelledEvent cancelledEvent = null; if (type.equals(SettingsEventTypes.SELECT_CANCELLED)) { Loading @@ -297,25 +311,6 @@ public class SettingsEventFactory { cancelledEvent = new ClearSelectionCancelledEvent().buildFrom(source); } if (cancelledEvent != null) { cancelledEvent.setSelection(selection); cancelledEvent.setExceptionType(exceptionType); cancelledEvent.setArguments(exceptionArguments); return cancelledEvent; } else { logger.error("Tipo de evento no soportado"); throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } } public static Event getEvent(Event source, String type, PersistenceDTO persistence, String exceptionType, Map<String, String> exceptionArguments) { PersistenceCancelledEvent cancelledEvent = null; if (type.equals(SettingsEventTypes.SAVE_CANCELLED)) { logger.debug("Creando evento SaveSettingsCancelledEvent para: " + source.getAggregateId()); Loading @@ -330,7 +325,7 @@ public class SettingsEventFactory { if (cancelledEvent != null) { cancelledEvent.setPersistence(persistence); cancelledEvent.setSettings(settings); cancelledEvent.setExceptionType(exceptionType); cancelledEvent.setArguments(exceptionArguments); return cancelledEvent; Loading src/main/java/es/redmic/usersettingslib/events/clearselection/ClearSelectionCancelledEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ package es.redmic.usersettingslib.events.clearselection; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; import es.redmic.usersettingslib.events.common.SettingsCancelledEvent; /*- * #%L Loading @@ -26,14 +26,14 @@ import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; * #L% */ public class ClearSelectionCancelledEvent extends SelectionCancelledEvent { public class ClearSelectionCancelledEvent extends SettingsCancelledEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{" + "\"type\":\"record\",\"name\":\"ClearSelectionCancelledEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getSettingsEventSchema() + "," + getFailEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on Loading @@ -44,9 +44,9 @@ public class ClearSelectionCancelledEvent extends SelectionCancelledEvent { super(type); } public ClearSelectionCancelledEvent(SelectionDTO selection) { public ClearSelectionCancelledEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); } @Override Loading src/main/java/es/redmic/usersettingslib/events/clearselection/ClearSelectionEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -4,9 +4,9 @@ import java.util.UUID; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; /*- * #%L Loading @@ -28,14 +28,14 @@ import es.redmic.usersettingslib.events.common.SelectionEvent; * #L% */ public class ClearSelectionEvent extends SelectionEvent { public class ClearSelectionEvent extends SettingsEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{" + "\"type\":\"record\",\"name\":\"ClearSelectionEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getSettingsEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on Loading @@ -46,9 +46,9 @@ public class ClearSelectionEvent extends SelectionEvent { setSessionId(UUID.randomUUID().toString()); } public ClearSelectionEvent(SelectionDTO selection) { public ClearSelectionEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); setSessionId(UUID.randomUUID().toString()); } Loading src/main/java/es/redmic/usersettingslib/events/clearselection/SelectionClearedEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ package es.redmic.usersettingslib.events.clearselection; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; /*- * #%L Loading @@ -26,14 +26,14 @@ import es.redmic.usersettingslib.events.common.SelectionEvent; * #L% */ public class SelectionClearedEvent extends SelectionEvent { public class SelectionClearedEvent extends SettingsEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser() .parse("{" + "\"type\":\"record\",\"name\":\"SelectionClearedEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getEventBaseSchema() + "]}"); + getSettingsEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on static String type = SettingsEventTypes.SELECTION_CLEARED; Loading @@ -42,9 +42,9 @@ public class SelectionClearedEvent extends SelectionEvent { super(type); } public SelectionClearedEvent(SelectionDTO selection) { public SelectionClearedEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); } @Override Loading src/main/java/es/redmic/usersettingslib/events/common/SelectionCancelledEvent.java→src/main/java/es/redmic/usersettingslib/events/common/SettingsCancelledEvent.java +12 −12 Original line number Diff line number Diff line Loading @@ -28,29 +28,29 @@ import org.joda.time.DateTimeZone; import com.fasterxml.jackson.annotation.JsonIgnore; import es.redmic.brokerlib.avro.common.EventError; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; public abstract class SelectionCancelledEvent extends EventError { public abstract class SettingsCancelledEvent extends EventError { private SelectionDTO selection; private SettingsDTO settings; public SelectionCancelledEvent(String type) { public SettingsCancelledEvent(String type) { super(type); } public SelectionDTO getSelection() { return selection; public SettingsDTO getSettings() { return settings; } public void setSelection(SelectionDTO selection) { this.selection = selection; public void setSettings(SettingsDTO settings) { this.settings = settings; } @Override public Object get(int field$) { switch (field$) { case 0: return getSelection(); return getSettings(); case 1: return getExceptionType(); case 2: Loading Loading @@ -79,7 +79,7 @@ public abstract class SelectionCancelledEvent extends EventError { public void put(int field$, Object value$) { switch (field$) { case 0: selection = (SelectionDTO) value$; settings = (SettingsDTO) value$; break; case 1: setExceptionType(value$.toString()); Loading Loading @@ -114,8 +114,8 @@ public abstract class SelectionCancelledEvent extends EventError { } @JsonIgnore public static String getSelectionEventSchema() { public static String getSettingsEventSchema() { return "{\"name\":\"selection\", \"type\": " + SelectionDTO.SCHEMA$.toString() + "}"; return "{\"name\":\"settings\", \"type\": " + SettingsDTO.SCHEMA$.toString() + "}"; } } Loading
src/main/java/es/redmic/usersettingslib/events/SettingsEventFactory.java +50 −55 Original line number Diff line number Diff line Loading @@ -31,16 +31,17 @@ import es.redmic.exception.common.ExceptionType; import es.redmic.exception.common.InternalException; import es.redmic.usersettingslib.dto.PersistenceDTO; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.clearselection.ClearSelectionCancelledEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionConfirmedEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionEvent; import es.redmic.usersettingslib.events.clearselection.ClearSelectionFailedEvent; import es.redmic.usersettingslib.events.clearselection.PartialClearSelectionEvent; import es.redmic.usersettingslib.events.clearselection.SelectionClearedEvent; import es.redmic.usersettingslib.events.common.PersistenceCancelledEvent; import es.redmic.usersettingslib.events.common.PersistenceEvent; import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsCancelledEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCancelledEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCheckFailedEvent; import es.redmic.usersettingslib.events.delete.DeleteSettingsCheckedEvent; Loading Loading @@ -129,27 +130,9 @@ public class SettingsEventFactory { throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } public static Event getEvent(Event source, String type, SelectionDTO selection) { SelectionEvent successfulEvent = null; if (type.equals(SettingsEventTypes.PARTIAL_SELECT)) { logger.debug("Creando evento PartialSelectEvent para: " + source.getAggregateId()); successfulEvent = new PartialSelectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_DESELECT)) { public static Event getEvent(Event source, String type, SettingsDTO settings) { logger.debug("Creando evento PartialDeselectEvent para: " + source.getAggregateId()); successfulEvent = new PartialDeselectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_CLEAR_SELECTION)) { logger.debug("Creando evento PartialClearEvent para: " + source.getAggregateId()); successfulEvent = new PartialClearSelectionEvent().buildFrom(source); } SettingsEvent successfulEvent = null; if (type.equals(SettingsEventTypes.SELECT)) { Loading Loading @@ -184,6 +167,48 @@ public class SettingsEventFactory { successfulEvent = new SelectionClearedEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVE)) { logger.debug("Creando evento SaveSettingsEvent para: " + source.getAggregateId()); successfulEvent = new SaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVED)) { logger.debug("Creando evento SettingsSavedEvent para: " + source.getAggregateId()); successfulEvent = new SettingsSavedEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setSettings(settings); return successfulEvent; } else { logger.error("Tipo de evento no soportado"); throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } } public static Event getEvent(Event source, String type, SelectionDTO selection) { SelectionEvent successfulEvent = null; if (type.equals(SettingsEventTypes.PARTIAL_SELECT)) { logger.debug("Creando evento PartialSelectEvent para: " + source.getAggregateId()); successfulEvent = new PartialSelectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_DESELECT)) { logger.debug("Creando evento PartialDeselectEvent para: " + source.getAggregateId()); successfulEvent = new PartialDeselectEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.PARTIAL_CLEAR_SELECTION)) { logger.debug("Creando evento PartialClearEvent para: " + source.getAggregateId()); successfulEvent = new PartialClearSelectionEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setSelection(selection); return successfulEvent; Loading @@ -203,17 +228,6 @@ public class SettingsEventFactory { successfulEvent = new PartialSaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVE)) { logger.debug("Creando evento SaveSettingsEvent para: " + source.getAggregateId()); successfulEvent = new SaveSettingsEvent().buildFrom(source); } if (type.equals(SettingsEventTypes.SAVED)) { logger.debug("Creando evento SettingsSavedEvent para: " + source.getAggregateId()); successfulEvent = new SettingsSavedEvent().buildFrom(source); } if (successfulEvent != null) { successfulEvent.setPersistence(persistence); return successfulEvent; Loading Loading @@ -274,10 +288,10 @@ public class SettingsEventFactory { } } public static Event getEvent(Event source, String type, SelectionDTO selection, String exceptionType, public static Event getEvent(Event source, String type, SettingsDTO settings, String exceptionType, Map<String, String> exceptionArguments) { SelectionCancelledEvent cancelledEvent = null; SettingsCancelledEvent cancelledEvent = null; if (type.equals(SettingsEventTypes.SELECT_CANCELLED)) { Loading @@ -297,25 +311,6 @@ public class SettingsEventFactory { cancelledEvent = new ClearSelectionCancelledEvent().buildFrom(source); } if (cancelledEvent != null) { cancelledEvent.setSelection(selection); cancelledEvent.setExceptionType(exceptionType); cancelledEvent.setArguments(exceptionArguments); return cancelledEvent; } else { logger.error("Tipo de evento no soportado"); throw new InternalException(ExceptionType.INTERNAL_EXCEPTION); } } public static Event getEvent(Event source, String type, PersistenceDTO persistence, String exceptionType, Map<String, String> exceptionArguments) { PersistenceCancelledEvent cancelledEvent = null; if (type.equals(SettingsEventTypes.SAVE_CANCELLED)) { logger.debug("Creando evento SaveSettingsCancelledEvent para: " + source.getAggregateId()); Loading @@ -330,7 +325,7 @@ public class SettingsEventFactory { if (cancelledEvent != null) { cancelledEvent.setPersistence(persistence); cancelledEvent.setSettings(settings); cancelledEvent.setExceptionType(exceptionType); cancelledEvent.setArguments(exceptionArguments); return cancelledEvent; Loading
src/main/java/es/redmic/usersettingslib/events/clearselection/ClearSelectionCancelledEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ package es.redmic.usersettingslib.events.clearselection; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; import es.redmic.usersettingslib.events.common.SettingsCancelledEvent; /*- * #%L Loading @@ -26,14 +26,14 @@ import es.redmic.usersettingslib.events.common.SelectionCancelledEvent; * #L% */ public class ClearSelectionCancelledEvent extends SelectionCancelledEvent { public class ClearSelectionCancelledEvent extends SettingsCancelledEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{" + "\"type\":\"record\",\"name\":\"ClearSelectionCancelledEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getSettingsEventSchema() + "," + getFailEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on Loading @@ -44,9 +44,9 @@ public class ClearSelectionCancelledEvent extends SelectionCancelledEvent { super(type); } public ClearSelectionCancelledEvent(SelectionDTO selection) { public ClearSelectionCancelledEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); } @Override Loading
src/main/java/es/redmic/usersettingslib/events/clearselection/ClearSelectionEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -4,9 +4,9 @@ import java.util.UUID; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; /*- * #%L Loading @@ -28,14 +28,14 @@ import es.redmic.usersettingslib.events.common.SelectionEvent; * #L% */ public class ClearSelectionEvent extends SelectionEvent { public class ClearSelectionEvent extends SettingsEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{" + "\"type\":\"record\",\"name\":\"ClearSelectionEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getSettingsEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on Loading @@ -46,9 +46,9 @@ public class ClearSelectionEvent extends SelectionEvent { setSessionId(UUID.randomUUID().toString()); } public ClearSelectionEvent(SelectionDTO selection) { public ClearSelectionEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); setSessionId(UUID.randomUUID().toString()); } Loading
src/main/java/es/redmic/usersettingslib/events/clearselection/SelectionClearedEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ package es.redmic.usersettingslib.events.clearselection; import org.apache.avro.Schema; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; import es.redmic.usersettingslib.events.SettingsEventTypes; import es.redmic.usersettingslib.events.common.SelectionEvent; import es.redmic.usersettingslib.events.common.SettingsEvent; /*- * #%L Loading @@ -26,14 +26,14 @@ import es.redmic.usersettingslib.events.common.SelectionEvent; * #L% */ public class SelectionClearedEvent extends SelectionEvent { public class SelectionClearedEvent extends SettingsEvent { // @formatter:off public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser() .parse("{" + "\"type\":\"record\",\"name\":\"SelectionClearedEvent\"," + "\"namespace\":\"es.redmic.usersettingslib.events.clearselection\",\"fields\":[" + getSelectionEventSchema() + "," + getEventBaseSchema() + "]}"); + getSettingsEventSchema() + "," + getEventBaseSchema() + "]}"); // @formatter:on static String type = SettingsEventTypes.SELECTION_CLEARED; Loading @@ -42,9 +42,9 @@ public class SelectionClearedEvent extends SelectionEvent { super(type); } public SelectionClearedEvent(SelectionDTO selection) { public SelectionClearedEvent(SettingsDTO settings) { super(type); this.setSelection(selection); this.setSettings(settings); } @Override Loading
src/main/java/es/redmic/usersettingslib/events/common/SelectionCancelledEvent.java→src/main/java/es/redmic/usersettingslib/events/common/SettingsCancelledEvent.java +12 −12 Original line number Diff line number Diff line Loading @@ -28,29 +28,29 @@ import org.joda.time.DateTimeZone; import com.fasterxml.jackson.annotation.JsonIgnore; import es.redmic.brokerlib.avro.common.EventError; import es.redmic.usersettingslib.dto.SelectionDTO; import es.redmic.usersettingslib.dto.SettingsDTO; public abstract class SelectionCancelledEvent extends EventError { public abstract class SettingsCancelledEvent extends EventError { private SelectionDTO selection; private SettingsDTO settings; public SelectionCancelledEvent(String type) { public SettingsCancelledEvent(String type) { super(type); } public SelectionDTO getSelection() { return selection; public SettingsDTO getSettings() { return settings; } public void setSelection(SelectionDTO selection) { this.selection = selection; public void setSettings(SettingsDTO settings) { this.settings = settings; } @Override public Object get(int field$) { switch (field$) { case 0: return getSelection(); return getSettings(); case 1: return getExceptionType(); case 2: Loading Loading @@ -79,7 +79,7 @@ public abstract class SelectionCancelledEvent extends EventError { public void put(int field$, Object value$) { switch (field$) { case 0: selection = (SelectionDTO) value$; settings = (SettingsDTO) value$; break; case 1: setExceptionType(value$.toString()); Loading Loading @@ -114,8 +114,8 @@ public abstract class SelectionCancelledEvent extends EventError { } @JsonIgnore public static String getSelectionEventSchema() { public static String getSettingsEventSchema() { return "{\"name\":\"selection\", \"type\": " + SelectionDTO.SCHEMA$.toString() + "}"; return "{\"name\":\"settings\", \"type\": " + SettingsDTO.SCHEMA$.toString() + "}"; } }