Child: [85c2d9] (diff)

Download this file

VersionsHandler.java    55 lines (45 with data), 1.4 kB

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package de.kuei.metafora.gwt.smack.client.handler;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import de.kuei.metafora.gwt.smack.client.SendXmppMessage;
import de.kuei.metafora.gwt.smack.client.SendXmppMessageAsync;
import de.kuei.metafora.gwt.smack.client.Workbench;
public class VersionsHandler implements ClickHandler {
private final SendXmppMessageAsync sendXmppMessage = GWT
.create(SendXmppMessage.class);
String name;
String id;
String version;
String link;
String token;
public VersionsHandler(String name, String id, String link, String version,
String token) {
this.name = name;
this.id = id;
this.version = version;
this.link = link;
this.token = token;
}
public VersionsHandler(String name, String id, String link, String version) {
this.name = name;
this.id = id;
this.version = version;
this.link = link;
}
@Override
public void onClick(ClickEvent event) {
sendXmppMessage.sendOpenCommandMessage(Workbench.users,
Workbench.groupId, Workbench.challengeId,
Workbench.challengeName, name, id, link, version, token,
new AsyncCallback<String>() {
@Override
public void onSuccess(String result) {
}
@Override
public void onFailure(Throwable caught) {
}
});
}
}