1 package org.simantics.document.server.serverResponse;
3 import org.simantics.document.server.io.CommandContextMutable;
4 import org.simantics.document.server.io.CommandResult;
7 public class ServerResponse implements CommandResult {
10 protected String message;
11 protected CommandContextMutable assignments;
13 public ServerResponse(int code, String message, CommandContextMutable assignments) {
15 this.message = message;
16 this.assignments = assignments;
19 public void setMessage(String message) {
20 this.message = message;
23 public void setCode(int code) {
27 public int getCode() {
31 public String getMessage() {
36 public int getReturnCode() {
41 public String getStatus() {
46 public CommandContextMutable getAssignments() {
50 public static CommandResult create(int code, String message, CommandContextMutable assignments) {
51 return new ServerResponse(code, message, assignments);