Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
3d879261
Commit
3d879261
authored
Jul 09, 2019
by
Greg Messner
Browse files
Initial commit (#404).
parent
69cf1abf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/services/BugzillaService.java
0 → 100644
View file @
3d879261
package
org.gitlab4j.api.services
;
import
org.gitlab4j.api.GitLabApiForm
;
public
class
BugzillaService
extends
NotificationService
{
/**
* 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
GitLabApiForm
servicePropertiesForm
()
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
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
BugzillaService
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
BugzillaService
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
BugzillaService
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
BugzillaService
withDescription
(
String
description
)
{
setDescription
(
description
);
return
this
;
}
}
src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java
0 → 100644
View file @
3d879261
package
org.gitlab4j.api.services
;
import
org.gitlab4j.api.GitLabApiForm
;
public
class
CustomIssueTrackerService
extends
NotificationService
{
/**
* 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
GitLabApiForm
servicePropertiesForm
()
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
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
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment