Skip to content

Commit 3926451

Browse files
committed
Mods to support the new SystemHooksApi (#117).
1 parent a4cb654 commit 3926451

23 files changed

+944
-29
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import java.util.Date;
4+
5+
import javax.xml.bind.annotation.XmlAccessType;
6+
import javax.xml.bind.annotation.XmlAccessorType;
7+
import javax.xml.bind.annotation.XmlRootElement;
8+
9+
@XmlRootElement
10+
@XmlAccessorType(XmlAccessType.FIELD)
11+
public class GroupMemberSystemHookEvent implements SystemHookEvent {
12+
13+
public static final String NEW_GROUP_MEMBER_EVENT = "user_add_to_group";
14+
public static final String GROUP_MEMBER_REMOVED_EVENT = "user_remove_from_group";
15+
16+
private Date createdAt;
17+
private Date updatedAt;
18+
private String eventName;
19+
private String groupAccess;
20+
private String groupName;
21+
private String groupPath;
22+
private Integer groupId;
23+
private String userEmail;
24+
private String userName;
25+
private String userUsername;
26+
private Integer userId;
27+
28+
public Date getCreatedAt() {
29+
return createdAt;
30+
}
31+
32+
public void setCreatedAt(Date createdAt) {
33+
this.createdAt = createdAt;
34+
}
35+
36+
public Date getUpdatedAt() {
37+
return updatedAt;
38+
}
39+
40+
public void setUpdatedAt(Date updatedAt) {
41+
this.updatedAt = updatedAt;
42+
}
43+
44+
public String getEventName() {
45+
return this.eventName;
46+
}
47+
48+
public void setEventName(String eventName) {
49+
this.eventName = eventName;
50+
}
51+
52+
public String getGroupAccess() {
53+
return groupAccess;
54+
}
55+
56+
public void setGroupAccess(String groupAccess) {
57+
this.groupAccess = groupAccess;
58+
}
59+
60+
public String getGroupName() {
61+
return groupName;
62+
}
63+
64+
public void setGroupName(String groupName) {
65+
this.groupName = groupName;
66+
}
67+
68+
public String getGroupPath() {
69+
return groupPath;
70+
}
71+
72+
public void setGroupPath(String groupPath) {
73+
this.groupPath = groupPath;
74+
}
75+
76+
public Integer getGroupId() {
77+
return groupId;
78+
}
79+
80+
public void setGroupId(Integer groupId) {
81+
this.groupId = groupId;
82+
}
83+
84+
public String getUserEmail() {
85+
return userEmail;
86+
}
87+
88+
public void setUserEmail(String userEmail) {
89+
this.userEmail = userEmail;
90+
}
91+
92+
public String getUserName() {
93+
return userName;
94+
}
95+
96+
public void setUserName(String userName) {
97+
this.userName = userName;
98+
}
99+
100+
public String getUserUsername() {
101+
return userUsername;
102+
}
103+
104+
public void setUserUsername(String userUsername) {
105+
this.userUsername = userUsername;
106+
}
107+
108+
public Integer getUserId() {
109+
return userId;
110+
}
111+
112+
public void setUserId(Integer userId) {
113+
this.userId = userId;
114+
}
115+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import java.util.Date;
4+
5+
import javax.xml.bind.annotation.XmlAccessType;
6+
import javax.xml.bind.annotation.XmlAccessorType;
7+
import javax.xml.bind.annotation.XmlRootElement;
8+
9+
@XmlRootElement
10+
@XmlAccessorType(XmlAccessType.FIELD)
11+
public class GroupSystemHookEvent implements SystemHookEvent {
12+
13+
public static final String GROUP_CREATE_EVENT = "group_create";
14+
public static final String GROUP_DESTROY_EVENT = "group_destroy";
15+
public static final String GROUP_RENAME_EVENT = "group_rename";
16+
17+
private Date createdAt;
18+
private Date updatedAt;
19+
private String eventName;
20+
private String name;
21+
private String path;
22+
private String fullPath;
23+
private Integer groupId;
24+
private String ownerEmail;
25+
private String ownerName;
26+
private String oldPath;
27+
private String oldFullPath;
28+
29+
30+
public Date getCreatedAt() {
31+
return createdAt;
32+
}
33+
34+
public void setCreatedAt(Date createdAt) {
35+
this.createdAt = createdAt;
36+
}
37+
38+
public Date getUpdatedAt() {
39+
return updatedAt;
40+
}
41+
42+
public void setUpdatedAt(Date updatedAt) {
43+
this.updatedAt = updatedAt;
44+
}
45+
46+
public String getEventName() {
47+
return this.eventName;
48+
}
49+
50+
public void setEventName(String eventName) {
51+
this.eventName = eventName;
52+
}
53+
54+
public String getName() {
55+
return name;
56+
}
57+
58+
public void setName(String name) {
59+
this.name = name;
60+
}
61+
62+
public String getPath() {
63+
return path;
64+
}
65+
66+
public void setPath(String path) {
67+
this.path = path;
68+
}
69+
70+
public String getFullPath() {
71+
return fullPath;
72+
}
73+
74+
public void setFullPath(String fullPath) {
75+
this.fullPath = fullPath;
76+
}
77+
78+
public Integer getGroupId() {
79+
return groupId;
80+
}
81+
82+
public void setGroupId(Integer groupId) {
83+
this.groupId = groupId;
84+
}
85+
86+
public String getOwnerEmail() {
87+
return ownerEmail;
88+
}
89+
90+
public void setOwnerEmail(String ownerEmail) {
91+
this.ownerEmail = ownerEmail;
92+
}
93+
94+
public String getOwnerName() {
95+
return ownerName;
96+
}
97+
98+
public void setOwnerName(String ownerName) {
99+
this.ownerName = ownerName;
100+
}
101+
102+
public String getOldPath() {
103+
return oldPath;
104+
}
105+
106+
public void setOldPath(String oldPath) {
107+
this.oldPath = oldPath;
108+
}
109+
110+
public String getOldFullPath() {
111+
return oldFullPath;
112+
}
113+
114+
public void setOldFullPath(String oldFullPath) {
115+
this.oldFullPath = oldFullPath;
116+
}
117+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import java.util.Date;
4+
5+
import javax.xml.bind.annotation.XmlAccessType;
6+
import javax.xml.bind.annotation.XmlAccessorType;
7+
import javax.xml.bind.annotation.XmlRootElement;
8+
9+
@XmlRootElement
10+
@XmlAccessorType(XmlAccessType.FIELD)
11+
public class KeySystemHookEvent implements SystemHookEvent {
12+
13+
public static final String KEY_CREATE_EVENT = "key_create";
14+
public static final String KEY_DESTROY_EVENT = "key_destroy";
15+
16+
private Date createdAt;
17+
private Date updatedAt;
18+
private String eventName;
19+
private String username;
20+
private String key;
21+
private Integer id;
22+
23+
public Date getCreatedAt() {
24+
return createdAt;
25+
}
26+
27+
public void setCreatedAt(Date createdAt) {
28+
this.createdAt = createdAt;
29+
}
30+
31+
public Date getUpdatedAt() {
32+
return updatedAt;
33+
}
34+
35+
public void setUpdatedAt(Date updatedAt) {
36+
this.updatedAt = updatedAt;
37+
}
38+
39+
public String getEventName() {
40+
return this.eventName;
41+
}
42+
43+
public void setEventName(String eventName) {
44+
this.eventName = eventName;
45+
}
46+
47+
public String getUsername() {
48+
return username;
49+
}
50+
51+
public void setUsername(String username) {
52+
this.username = username;
53+
}
54+
55+
public String getKey() {
56+
return key;
57+
}
58+
59+
public void setKey(String key) {
60+
this.key = key;
61+
}
62+
63+
public Integer getId() {
64+
return id;
65+
}
66+
67+
public void setId(Integer id) {
68+
this.id = id;
69+
}
70+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import javax.xml.bind.annotation.XmlAccessType;
4+
import javax.xml.bind.annotation.XmlAccessorType;
5+
import javax.xml.bind.annotation.XmlRootElement;
6+
7+
import org.gitlab4j.api.webhook.AbstractPushEvent;
8+
9+
@XmlRootElement
10+
@XmlAccessorType(XmlAccessType.FIELD)
11+
public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
12+
public static final String PUSH_EVENT = "push";
13+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package org.gitlab4j.api.systemhooks;
2+
3+
import javax.xml.bind.annotation.XmlAccessType;
4+
import javax.xml.bind.annotation.XmlAccessorType;
5+
import javax.xml.bind.annotation.XmlRootElement;
6+
7+
@XmlRootElement
8+
@XmlAccessorType(XmlAccessType.FIELD)
9+
public class RepositoryChange {
10+
11+
private String after;
12+
private String before;
13+
private String ref;
14+
15+
public String getAfter() {
16+
return this.after;
17+
}
18+
19+
public void setAfter(String after) {
20+
this.after = after;
21+
}
22+
23+
public String getBefore() {
24+
return this.before;
25+
}
26+
27+
public void setBefore(String before) {
28+
this.before = before;
29+
}
30+
31+
public String getRef() {
32+
return this.ref;
33+
}
34+
35+
public void setRef(String ref) {
36+
this.ref = ref;
37+
}
38+
}

0 commit comments

Comments
 (0)