forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomIssueTrackerService.java
76 lines (61 loc) · 2.19 KB
/
CustomIssueTrackerService.java
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package org.gitlab4j.api.services;
import org.gitlab4j.models.GitLabForm;
public class CustomIssueTrackerService extends NotificationService {
private static final long serialVersionUID = 1L;
/**
* Get the form data for this service based on it's properties.
*
* @return the form data for this service based on it's properties
*/
@Override
public GitLabForm servicePropertiesForm() {
GitLabForm formData = new GitLabForm()
.withParam(DESCRIPTION_PROP, getDescription())
.withParam(ISSUES_URL_PROP, getIssuesUrl(), true)
.withParam(NEW_ISSUE_URL_PROP, getNewIssueUrl(), true)
.withParam(PROJECT_URL_PROP, getProjectUrl(), true)
.withParam(PUSH_EVENTS_PROP, getPushEvents())
.withParam(TITLE_PROP, getTitle());
return formData;
}
public String getNewIssueUrl() {
return this.getProperty(NEW_ISSUE_URL_PROP);
}
public void setNewIssueUrl(String endpoint) {
this.setProperty(NEW_ISSUE_URL_PROP, endpoint);
}
public CustomIssueTrackerService withNewIssueUrl(String endpoint) {
setNewIssueUrl(endpoint);
return this;
}
public String getIssuesUrl() {
return this.getProperty(ISSUES_URL_PROP);
}
public void setIssuesUrl(String endpoint) {
this.setProperty(ISSUES_URL_PROP, endpoint);
}
public CustomIssueTrackerService withIssuesUrl(String endpoint) {
setIssuesUrl(endpoint);
return this;
}
public String getProjectUrl() {
return this.getProperty(PROJECT_URL_PROP);
}
public void setProjectUrl(String endpoint) {
this.setProperty(PROJECT_URL_PROP, endpoint);
}
public CustomIssueTrackerService withProjectUrl(String endpoint) {
setProjectUrl(endpoint);
return this;
}
public String getDescription() {
return this.getProperty(DESCRIPTION_PROP);
}
public void setDescription(String description) {
this.setProperty(DESCRIPTION_PROP, description);
}
public CustomIssueTrackerService withDescription(String description) {
setDescription(description);
return this;
}
}