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

Removed use of JAXB (#327).

parent 7a0906fd
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";
......
......@@ -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";
......
......@@ -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;
......
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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
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";
......
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;
......
......@@ -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";
......
......@@ -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) {
}
}
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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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