|
| 1 | +package org.gitlab4j.api.services; |
| 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.utils.SecretString; |
| 8 | + |
| 9 | +import com.fasterxml.jackson.annotation.JsonIgnore; |
| 10 | + |
| 11 | +@XmlRootElement |
| 12 | +@XmlAccessorType(XmlAccessType.FIELD) |
| 13 | +public class JiraService extends NotificationService { |
| 14 | + |
| 15 | + public static final String URL_PROP = "url"; |
| 16 | + public static final String API_URL_PROP = "api_url"; |
| 17 | + public static final String PROJECT_KEY_PROP = "project_key"; |
| 18 | + public static final String USERNAME_PROP = "username"; |
| 19 | + public static final String JIRA_ISSUE_TRANSITION_ID_PROP = "jira_issue_transition_id"; |
| 20 | + |
| 21 | + private SecretString password; |
| 22 | + |
| 23 | + public JiraService withCommitEvents(Boolean commitEventd) { |
| 24 | + return withCommitEvents(commitEventd, this); |
| 25 | + } |
| 26 | + |
| 27 | + public JiraService withMergeRequestsEvents(Boolean mergeRequestsEvents) { |
| 28 | + return withMergeRequestsEvents(mergeRequestsEvents, this); |
| 29 | + } |
| 30 | + |
| 31 | + @JsonIgnore |
| 32 | + public SecretString getPassword() { |
| 33 | + return password; |
| 34 | + } |
| 35 | + |
| 36 | + public void setPassword(SecretString password) { |
| 37 | + this.password = password; |
| 38 | + } |
| 39 | + |
| 40 | + public JiraService withUrl(SecretString password) { |
| 41 | + setPassword(password); |
| 42 | + return (this); |
| 43 | + } |
| 44 | + |
| 45 | + @JsonIgnore |
| 46 | + public String getUrl() { |
| 47 | + return (getProperty(URL_PROP)); |
| 48 | + } |
| 49 | + |
| 50 | + public void setUrl(String url) { |
| 51 | + setProperty(URL_PROP, url); |
| 52 | + } |
| 53 | + |
| 54 | + public JiraService withUrl(String url) { |
| 55 | + setUrl(url); |
| 56 | + return (this); |
| 57 | + } |
| 58 | + |
| 59 | + @JsonIgnore |
| 60 | + public String getApiUrl() { |
| 61 | + return (getProperty(API_URL_PROP)); |
| 62 | + } |
| 63 | + |
| 64 | + public void setApiUrl(String apiUrl) { |
| 65 | + setProperty(API_URL_PROP, apiUrl); |
| 66 | + } |
| 67 | + |
| 68 | + public JiraService withApiUrl(String apiUrl) { |
| 69 | + setApiUrl(apiUrl); |
| 70 | + return (this); |
| 71 | + } |
| 72 | + |
| 73 | + @JsonIgnore |
| 74 | + public String getProjectKey() { |
| 75 | + return (getProperty(PROJECT_KEY_PROP)); |
| 76 | + } |
| 77 | + |
| 78 | + public void setProjectKey(String projectKey) { |
| 79 | + setProperty(PROJECT_KEY_PROP, projectKey); |
| 80 | + } |
| 81 | + |
| 82 | + public JiraService withProjectKey(String projectKey) { |
| 83 | + setProjectKey(projectKey); |
| 84 | + return (this); |
| 85 | + } |
| 86 | + |
| 87 | + @JsonIgnore |
| 88 | + public String getUsername() { |
| 89 | + return (getProperty(USERNAME_PROP)); |
| 90 | + } |
| 91 | + |
| 92 | + public void setUsername(String username) { |
| 93 | + setProperty(USERNAME_PROP, username); |
| 94 | + } |
| 95 | + |
| 96 | + public JiraService withUsername(String username) { |
| 97 | + setUsername(username); |
| 98 | + return (this); |
| 99 | + } |
| 100 | + |
| 101 | + @JsonIgnore |
| 102 | + public Integer getJiraIssueTransitionId() { |
| 103 | + return (getProperty(JIRA_ISSUE_TRANSITION_ID_PROP, (Integer) null)); |
| 104 | + } |
| 105 | + |
| 106 | + public void setJiraIssueTransitionId(Integer jiraIssueTransitionId) { |
| 107 | + setProperty(JIRA_ISSUE_TRANSITION_ID_PROP, jiraIssueTransitionId); |
| 108 | + } |
| 109 | + |
| 110 | + public JiraService withJiraIssueTransitionId(Integer jiraIssueTransitionId) { |
| 111 | + setJiraIssueTransitionId(jiraIssueTransitionId); |
| 112 | + return (this); |
| 113 | + } |
| 114 | +} |
0 commit comments