aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java
blob: f952b5794e2a10bee77c0760c4a7577a5fa0af3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.juick.server.xmpp.helpers;

import com.juick.Message;

public class CommandResult {
    private String text;
    private Message newMessage;

    public String getText() {
        return text;
    }

    public Message getNewMessage() {
        return newMessage;
    }
    public static CommandResult fromMessage(Message newMessage, String text) {
        CommandResult result = new CommandResult();
        result.newMessage = newMessage;
        result.text = text;
        return result;
    }
    public static CommandResult fromString(String text) {
        CommandResult result = new CommandResult();
        result.text = text;
        return result;
    }

}