objectmapper patch
This commit is contained in:
parent
b448a5df2f
commit
ae2e298df4
@ -1,4 +1,8 @@
|
||||
package com.alterdekim.game.component.game;
|
||||
|
||||
public interface ActionDialogBody {
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public abstract class ActionDialogBody {
|
||||
@JsonProperty("value")
|
||||
public abstract Object getVal();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.alterdekim.game.component.game;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -8,6 +9,12 @@ import java.util.List;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public class DialogButtonsList implements ActionDialogBody {
|
||||
public class DialogButtonsList extends ActionDialogBody {
|
||||
@JsonIgnore
|
||||
private final List<DialogButton> buttons;
|
||||
|
||||
@Override
|
||||
public Object getVal() {
|
||||
return this.buttons;
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,6 @@ public class GameRoom {
|
||||
buttons.add(new DialogButton("Button1", DialogButtonColor.GREEN, Collections.singletonList(WebSocketMessageType.HideDialog)));
|
||||
DialogButtonsList b = new DialogButtonsList(buttons);
|
||||
sendMessage(message.getUid(), WebSocketMessageType.ShowDialog, new ActionDialog("Title!", "Description!", ActionDialogType.Buttons, b));
|
||||
log.info("FUUUUUUUUUUUUUUUUUUCK");
|
||||
}
|
||||
|
||||
private void sendMessage(Long userId, WebSocketMessageType type, Object o) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user