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
45ff580c
Commit
45ff580c
authored
Apr 16, 2019
by
Greg Messner
Browse files
Removed use of JAXB (#327).
parent
7a0906fd
Changes
113
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/services/HipChatService.java
View file @
45ff580c
package
org.gitlab4j.api.services
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
HipChatService
extends
NotificationService
{
public
static
final
String
TOKEN_PROP
=
"token"
;
...
...
src/main/java/org/gitlab4j/api/services/JiraService.java
View file @
45ff580c
...
...
@@ -2,14 +2,8 @@ package org.gitlab4j.api.services;
import
java.util.Map
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
JiraService
extends
NotificationService
{
public
static
final
String
URL_PROP
=
"url"
;
...
...
src/main/java/org/gitlab4j/api/services/NotificationService.java
View file @
45ff580c
...
...
@@ -4,12 +4,8 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
abstract
class
NotificationService
{
private
Integer
id
;
...
...
src/main/java/org/gitlab4j/api/services/SlackService.java
View file @
45ff580c
package
org.gitlab4j.api.services
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
SlackService
extends
NotificationService
{
public
static
final
String
WEBHOOK_PROP
=
"webhook"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/GroupMemberSystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
GroupMemberSystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
NEW_GROUP_MEMBER_EVENT
=
"user_add_to_group"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/GroupSystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
GroupSystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
GROUP_CREATE_EVENT
=
"group_create"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/KeySystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
KeySystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
KEY_CREATE_EVENT
=
"key_create"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/ProjectSystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.models.Visibility
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
ProjectSystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
PROJECT_CREATE_EVENT
=
"project_create"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/PushSystemHookEvent.java
View file @
45ff580c
package
org.gitlab4j.api.systemhooks
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
import
org.gitlab4j.api.webhook.AbstractPushEvent
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
PushSystemHookEvent
extends
AbstractPushEvent
implements
SystemHookEvent
{
public
static
final
String
PUSH_EVENT
=
"push"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/RepositoryChange.java
View file @
45ff580c
package
org.gitlab4j.api.systemhooks
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
RepositoryChange
{
private
String
after
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
import
org.gitlab4j.api.webhook.EventProject
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
RepositorySystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
REPOSITORY_UPDATE_EVENT
=
"repository_update"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/SystemHookListener.java
View file @
45ff580c
...
...
@@ -78,4 +78,12 @@ public interface SystemHookListener extends java.util.EventListener {
*/
default
void
onRepositoryEvent
(
RepositorySystemHookEvent
event
)
{
}
/**
* This method is called when a System Hook merge_request event has been received.
*
* @param event the MergeRequestSystemHookEvent instance containing info on the key event
*/
default
void
onMergeRequestEvent
(
MergeRequestSystemHookEvent
event
)
{
}
}
src/main/java/org/gitlab4j/api/systemhooks/TagPushSystemHookEvent.java
View file @
45ff580c
package
org.gitlab4j.api.systemhooks
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
import
org.gitlab4j.api.webhook.AbstractPushEvent
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
TagPushSystemHookEvent
extends
AbstractPushEvent
implements
SystemHookEvent
{
public
static
final
String
TAG_PUSH_EVENT
=
"tag_push"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/TeamMemberSystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.models.Visibility
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
TeamMemberSystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
NEW_TEAM_MEMBER_EVENT
=
"user_add_to_team"
;
...
...
src/main/java/org/gitlab4j/api/systemhooks/UserSystemHookEvent.java
View file @
45ff580c
...
...
@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
UserSystemHookEvent
extends
AbstractSystemHookEvent
{
public
static
final
String
USER_CREATE_EVENT
=
"user_create"
;
...
...
src/main/java/org/gitlab4j/api/webhook/AbstractPushEvent.java
View file @
45ff580c
...
...
@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
abstract
class
AbstractPushEvent
{
private
String
eventName
;
...
...
src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
View file @
45ff580c
...
...
@@ -2,13 +2,9 @@ package org.gitlab4j.api.webhook;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
org.gitlab4j.api.models.User
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
BuildEvent
extends
AbstractEvent
{
/** X-Gitlab-Event header value pre GitLab v9.3.0 */
...
...
src/main/java/org/gitlab4j/api/webhook/BuildEventCommit.java
View file @
45ff580c
...
...
@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
BuildEventCommit
{
private
Integer
id
;
...
...
src/main/java/org/gitlab4j/api/webhook/EventChanges.java
View file @
45ff580c
...
...
@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook;
import
java.util.Date
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
org.gitlab4j.api.models.Assignee
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
EventChanges
{
private
ChangeContainer
<
Date
>
updatedAt
;
...
...
src/main/java/org/gitlab4j/api/webhook/EventCommit.java
View file @
45ff580c
...
...
@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook;
import
java.util.Date
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
org.gitlab4j.api.models.Author
;
import
org.gitlab4j.api.utils.JacksonJson
;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
EventCommit
{
private
String
id
;
...
...
Prev
1
2
3
4
5
6
Next
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