package org.simantics.document.server.serverResponse; import org.simantics.document.server.io.CommandContextMutable; import org.simantics.document.server.io.CommandResult; public class ServerResponse implements CommandResult { protected int code; protected String message; protected CommandContextMutable assignments; public ServerResponse(int code, String message, CommandContextMutable assignments) { this.code = code; this.message = message; this.assignments = assignments; } public void setMessage(String message) { this.message = message; } public void setCode(int code) { this.code = code; } public int getCode() { return code; } public String getMessage() { return message; } @Override public int getReturnCode() { return code; } @Override public String getStatus() { return getMessage(); } @Override public CommandContextMutable getAssignments() { return assignments; } public static CommandResult create(int code, String message, CommandContextMutable assignments) { return new ServerResponse(code, message, assignments); } }