Skip to content

Commit 2f2d2b4

Browse files
committed
Implemented toString() (#320).
1 parent 88ec32b commit 2f2d2b4

25 files changed

+160
-0
lines changed

src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import javax.xml.bind.annotation.XmlAccessorType;
77
import javax.xml.bind.annotation.XmlRootElement;
88

9+
import org.gitlab4j.api.utils.JacksonJson;
10+
911
@XmlRootElement
1012
@XmlAccessorType(XmlAccessType.FIELD)
1113
public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent {
@@ -112,4 +114,9 @@ public Integer getUserId() {
112114
public void setUserId(Integer userId) {
113115
this.userId = userId;
114116
}
117+
118+
@Override
119+
public String toString() {
120+
return (JacksonJson.toJsonString(this));
121+
}
115122
}

src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import javax.xml.bind.annotation.XmlAccessorType;
77
import javax.xml.bind.annotation.XmlRootElement;
88

9+
import org.gitlab4j.api.utils.JacksonJson;
10+
911
@XmlRootElement
1012
@XmlAccessorType(XmlAccessType.FIELD)
1113
public class GroupSystemHookEvent extends AbstractSystemHookEvent {
@@ -113,4 +115,9 @@ public String getOldFullPath() {
113115
public void setOldFullPath(String oldFullPath) {
114116
this.oldFullPath = oldFullPath;
115117
}
118+
119+
@Override
120+
public String toString() {
121+
return (JacksonJson.toJsonString(this));
122+
}
116123
}

src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import javax.xml.bind.annotation.XmlAccessorType;
77
import javax.xml.bind.annotation.XmlRootElement;
88

9+
import org.gitlab4j.api.utils.JacksonJson;
10+
911
@XmlRootElement
1012
@XmlAccessorType(XmlAccessType.FIELD)
1113
public class KeySystemHookEvent extends AbstractSystemHookEvent {
@@ -67,4 +69,9 @@ public Integer getId() {
6769
public void setId(Integer id) {
6870
this.id = id;
6971
}
72+
73+
@Override
74+
public String toString() {
75+
return (JacksonJson.toJsonString(this));
76+
}
7077
}

src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import javax.xml.bind.annotation.XmlRootElement;
88

99
import org.gitlab4j.api.models.Visibility;
10+
import org.gitlab4j.api.utils.JacksonJson;
1011

1112
@XmlRootElement
1213
@XmlAccessorType(XmlAccessType.FIELD)
@@ -117,4 +118,9 @@ public String getOldPathWithNamespace() {
117118
public void setOldPathWithNamespace(String oldPathWithNamespace) {
118119
this.oldPathWithNamespace = oldPathWithNamespace;
119120
}
121+
122+
@Override
123+
public String toString() {
124+
return (JacksonJson.toJsonString(this));
125+
}
120126
}

src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
import javax.xml.bind.annotation.XmlAccessorType;
55
import javax.xml.bind.annotation.XmlRootElement;
66

7+
import org.gitlab4j.api.utils.JacksonJson;
78
import org.gitlab4j.api.webhook.AbstractPushEvent;
89

910
@XmlRootElement
1011
@XmlAccessorType(XmlAccessType.FIELD)
1112
public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
13+
1214
public static final String PUSH_EVENT = "push";
15+
16+
@Override
17+
public String toString() {
18+
return (JacksonJson.toJsonString(this));
19+
}
1320
}

src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import javax.xml.bind.annotation.XmlAccessorType;
55
import javax.xml.bind.annotation.XmlRootElement;
66

7+
import org.gitlab4j.api.utils.JacksonJson;
8+
79
@XmlRootElement
810
@XmlAccessorType(XmlAccessType.FIELD)
911
public class RepositoryChange {
@@ -35,4 +37,9 @@ public String getRef() {
3537
public void setRef(String ref) {
3638
this.ref = ref;
3739
}
40+
41+
@Override
42+
public String toString() {
43+
return (JacksonJson.toJsonString(this));
44+
}
3845
}

src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import javax.xml.bind.annotation.XmlAccessorType;
77
import javax.xml.bind.annotation.XmlRootElement;
88

9+
import org.gitlab4j.api.utils.JacksonJson;
910
import org.gitlab4j.api.webhook.EventProject;
1011

1112
@XmlRootElement
@@ -97,4 +98,9 @@ public List<String> getRefs() {
9798
public void setRefs(List<String> refs) {
9899
this.refs = refs;
99100
}
101+
102+
@Override
103+
public String toString() {
104+
return (JacksonJson.toJsonString(this));
105+
}
100106
}

src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
import javax.xml.bind.annotation.XmlAccessorType;
55
import javax.xml.bind.annotation.XmlRootElement;
66

7+
import org.gitlab4j.api.utils.JacksonJson;
78
import org.gitlab4j.api.webhook.AbstractPushEvent;
89

910
@XmlRootElement
1011
@XmlAccessorType(XmlAccessType.FIELD)
1112
public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
13+
1214
public static final String TAG_PUSH_EVENT = "tag_push";
15+
16+
@Override
17+
public String toString() {
18+
return (JacksonJson.toJsonString(this));
19+
}
1320
}

src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import javax.xml.bind.annotation.XmlRootElement;
88

99
import org.gitlab4j.api.models.Visibility;
10+
import org.gitlab4j.api.utils.JacksonJson;
1011

1112
@XmlRootElement
1213
@XmlAccessorType(XmlAccessType.FIELD)
@@ -132,4 +133,9 @@ public Visibility getProjectVisibility() {
132133
public void setProjectVisibility(Visibility projectVisibility) {
133134
this.projectVisibility = projectVisibility;
134135
}
136+
137+
@Override
138+
public String toString() {
139+
return (JacksonJson.toJsonString(this));
140+
}
135141
}

src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import javax.xml.bind.annotation.XmlAccessorType;
77
import javax.xml.bind.annotation.XmlRootElement;
88

9+
import org.gitlab4j.api.utils.JacksonJson;
10+
911
@XmlRootElement
1012
@XmlAccessorType(XmlAccessType.FIELD)
1113
public class UserSystemHookEvent extends AbstractSystemHookEvent {
@@ -86,4 +88,9 @@ public String getOldUsername() {
8688
public void setOldUsername(String oldUsername) {
8789
this.oldUsername = oldUsername;
8890
}
91+
92+
@Override
93+
public String toString() {
94+
return (JacksonJson.toJsonString(this));
95+
}
8996
}

0 commit comments

Comments
 (0)