Commit 45ff580c authored by Greg Messner's avatar Greg Messner
Browse files

Removed use of JAXB (#327).

parent 7a0906fd
package org.gitlab4j.api.services; 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; import com.fasterxml.jackson.annotation.JsonIgnore;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class HipChatService extends NotificationService { public class HipChatService extends NotificationService {
public static final String TOKEN_PROP = "token"; public static final String TOKEN_PROP = "token";
......
...@@ -2,14 +2,8 @@ package org.gitlab4j.api.services; ...@@ -2,14 +2,8 @@ package org.gitlab4j.api.services;
import java.util.Map; 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; import com.fasterxml.jackson.annotation.JsonIgnore;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class JiraService extends NotificationService { public class JiraService extends NotificationService {
public static final String URL_PROP = "url"; public static final String URL_PROP = "url";
......
...@@ -4,12 +4,8 @@ import java.util.Date; ...@@ -4,12 +4,8 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
@XmlAccessorType(XmlAccessType.FIELD)
public abstract class NotificationService { public abstract class NotificationService {
private Integer id; private Integer id;
......
package org.gitlab4j.api.services; 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; import com.fasterxml.jackson.annotation.JsonIgnore;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class SlackService extends NotificationService { public class SlackService extends NotificationService {
public static final String WEBHOOK_PROP = "webhook"; public static final String WEBHOOK_PROP = "webhook";
......
...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent {
public static final String NEW_GROUP_MEMBER_EVENT = "user_add_to_group"; public static final String NEW_GROUP_MEMBER_EVENT = "user_add_to_group";
......
...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupSystemHookEvent extends AbstractSystemHookEvent { public class GroupSystemHookEvent extends AbstractSystemHookEvent {
public static final String GROUP_CREATE_EVENT = "group_create"; public static final String GROUP_CREATE_EVENT = "group_create";
......
...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class KeySystemHookEvent extends AbstractSystemHookEvent { public class KeySystemHookEvent extends AbstractSystemHookEvent {
public static final String KEY_CREATE_EVENT = "key_create"; public static final String KEY_CREATE_EVENT = "key_create";
......
...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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.models.Visibility;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ProjectSystemHookEvent extends AbstractSystemHookEvent { public class ProjectSystemHookEvent extends AbstractSystemHookEvent {
public static final String PROJECT_CREATE_EVENT = "project_create"; public static final String PROJECT_CREATE_EVENT = "project_create";
......
package org.gitlab4j.api.systemhooks; 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.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent; import org.gitlab4j.api.webhook.AbstractPushEvent;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent { public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
public static final String PUSH_EVENT = "push"; public static final String PUSH_EVENT = "push";
......
package org.gitlab4j.api.systemhooks; 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.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RepositoryChange { public class RepositoryChange {
private String after; private String after;
......
...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import java.util.List; 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.utils.JacksonJson;
import org.gitlab4j.api.webhook.EventProject; import org.gitlab4j.api.webhook.EventProject;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RepositorySystemHookEvent extends AbstractSystemHookEvent { public class RepositorySystemHookEvent extends AbstractSystemHookEvent {
public static final String REPOSITORY_UPDATE_EVENT = "repository_update"; public static final String REPOSITORY_UPDATE_EVENT = "repository_update";
......
...@@ -78,4 +78,12 @@ public interface SystemHookListener extends java.util.EventListener { ...@@ -78,4 +78,12 @@ public interface SystemHookListener extends java.util.EventListener {
*/ */
default void onRepositoryEvent(RepositorySystemHookEvent event) { 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) {
}
} }
package org.gitlab4j.api.systemhooks; 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.utils.JacksonJson;
import org.gitlab4j.api.webhook.AbstractPushEvent; import org.gitlab4j.api.webhook.AbstractPushEvent;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent { public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent {
public static final String TAG_PUSH_EVENT = "tag_push"; public static final String TAG_PUSH_EVENT = "tag_push";
......
...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,15 +2,9 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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.models.Visibility;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent {
public static final String NEW_TEAM_MEMBER_EVENT = "user_add_to_team"; public static final String NEW_TEAM_MEMBER_EVENT = "user_add_to_team";
......
...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks; ...@@ -2,14 +2,8 @@ package org.gitlab4j.api.systemhooks;
import java.util.Date; 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; import org.gitlab4j.api.utils.JacksonJson;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class UserSystemHookEvent extends AbstractSystemHookEvent { public class UserSystemHookEvent extends AbstractSystemHookEvent {
public static final String USER_CREATE_EVENT = "user_create"; public static final String USER_CREATE_EVENT = "user_create";
......
...@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook; ...@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook;
import java.util.List; import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
@XmlAccessorType(XmlAccessType.FIELD)
public abstract class AbstractPushEvent { public abstract class AbstractPushEvent {
private String eventName; private String eventName;
......
...@@ -2,13 +2,9 @@ package org.gitlab4j.api.webhook; ...@@ -2,13 +2,9 @@ package org.gitlab4j.api.webhook;
import java.util.Date; 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.models.User;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class BuildEvent extends AbstractEvent { public class BuildEvent extends AbstractEvent {
/** X-Gitlab-Event header value pre GitLab v9.3.0 */ /** X-Gitlab-Event header value pre GitLab v9.3.0 */
......
...@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook; ...@@ -2,12 +2,8 @@ package org.gitlab4j.api.webhook;
import java.util.Date; import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class BuildEventCommit { public class BuildEventCommit {
private Integer id; private Integer id;
......
...@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook; ...@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook;
import java.util.Date; import java.util.Date;
import java.util.List; 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.models.Assignee;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventChanges { public class EventChanges {
private ChangeContainer<Date> updatedAt; private ChangeContainer<Date> updatedAt;
......
...@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook; ...@@ -3,13 +3,9 @@ package org.gitlab4j.api.webhook;
import java.util.Date; import java.util.Date;
import java.util.List; 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.models.Author;
import org.gitlab4j.api.utils.JacksonJson; import org.gitlab4j.api.utils.JacksonJson;
@XmlAccessorType(XmlAccessType.FIELD)
public class EventCommit { public class EventCommit {
private String id; private String id;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment