Katrice Williams-Dredden пре 6 година
родитељ
комит
955f29ad90
3 измењених фајлова са 137 додато и 2 уклоњено
  1. 0
    2
      Client/Client.iml
  2. 56
    0
      Client/src/main/java/Id.java
  3. 81
    0
      Client/src/main/java/Message.java

+ 0
- 2
Client/Client.iml Прегледај датотеку

@@ -5,8 +5,6 @@
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">
7 7
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10 8
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 9
     </content>
12 10
     <orderEntry type="inheritedJdk" />

+ 56
- 0
Client/src/main/java/Id.java Прегледај датотеку

@@ -0,0 +1,56 @@
1
+public class Id {
2
+
3
+    private String userId;
4
+    private String name;
5
+    private String github;
6
+
7
+    public Id() throws UnirestException {
8
+    }
9
+
10
+    public Id(String name, String github) {
11
+        this.name = name;
12
+        this.github = github;
13
+    }
14
+
15
+    public Id(String userId, String name, String github) {
16
+        this.userId = userId;
17
+        this.name = name;
18
+        this.github = github;
19
+    }
20
+
21
+    public String getGithub() {
22
+        return github;
23
+    }
24
+
25
+    public void setGithub(String github) {
26
+        this.github = github;
27
+    }
28
+
29
+    public String getName() {
30
+        return name;
31
+    }
32
+
33
+    public void setName(String name) {
34
+        this.name = name;
35
+    }
36
+
37
+    public String getUserId() {
38
+        return userId;
39
+    }
40
+
41
+    public void setUserId(String userId) {
42
+        this.userId = userId;
43
+    }
44
+
45
+    private class UnirestException extends Exception {
46
+    }
47
+
48
+    @Override
49
+    public String toString() {
50
+        return "Id{" +
51
+        "userId:'" + userId + '\'' +
52
+        ", name:'" + name + '\'' +
53
+        ", github:'" + github + '\'' +
54
+        '}';
55
+    }
56
+}

+ 81
- 0
Client/src/main/java/Message.java Прегледај датотеку

@@ -0,0 +1,81 @@
1
+public class Message {
2
+
3
+    private String sequence;
4
+    private String timestamp;
5
+    private String fromid;
6
+    private String toid;
7
+    private String message;
8
+
9
+
10
+
11
+    public Message() throws UnirestException {
12
+    }
13
+
14
+    public Message(String sequence, String timestamp, String fromId, String toid, String message) {
15
+        this.sequence = sequence;
16
+        this.timestamp = timestamp;
17
+        this.fromid = fromId;
18
+        this.toid = toid;
19
+        this.message = message;
20
+    }
21
+
22
+    public Message(String fromId, String toid, String message) {
23
+        this.fromid = fromId;
24
+        this.toid = toid;
25
+        this.message = message;
26
+    }
27
+
28
+    public String getSequence() {
29
+        return sequence;
30
+    }
31
+
32
+    public void setSequence(String sequence) {
33
+        this.sequence = sequence;
34
+    }
35
+
36
+    public String getTimestamp() {
37
+        return timestamp;
38
+    }
39
+
40
+    public void setTimestamp(String timestamp) {
41
+        this.timestamp = timestamp;
42
+    }
43
+
44
+    public String getFromid() {
45
+        return fromid;
46
+    }
47
+
48
+    public void setFromid(String fromid) {
49
+        this.fromid = fromid;
50
+    }
51
+
52
+    public String getToid() {
53
+        return toid;
54
+    }
55
+
56
+    public void setToid(String toid) {
57
+        this.toid = toid;
58
+    }
59
+
60
+    public String getMessage() {
61
+        return message;
62
+    }
63
+
64
+    public void setMessage(String message) {
65
+        this.message = message;
66
+    }
67
+
68
+    @Override
69
+    public String toString() {
70
+        return "Message{" +
71
+                "sequence:'" + sequence + '\'' +
72
+                ", timestamp:'" + timestamp + '\'' +
73
+                ", fromid:'" + fromid + '\'' +
74
+                ", toid:'" + toid + '\'' +
75
+                ", message:'" + message + '\'' +
76
+                '}';
77
+    }
78
+
79
+    private class UnirestException extends Exception {
80
+    }
81
+}