use lombok data instead of getters and setters

This commit is contained in:
Athou
2013-08-11 11:59:24 +02:00
parent e26950671c
commit a58b0a0806
23 changed files with 69 additions and 881 deletions

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.google.common.collect.Lists;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -15,6 +17,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Entry details")
@Data
public class Category implements Serializable {
@ApiProperty("category id")
@@ -37,61 +40,4 @@ public class Category implements Serializable {
@ApiProperty("position of the category in the list")
private Integer position;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Category> getChildren() {
return children;
}
public void setChildren(List<Category> children) {
this.children = children;
}
public List<Subscription> getFeeds() {
return feeds;
}
public void setFeeds(List<Subscription> feeds) {
this.feeds = feeds;
}
public boolean isExpanded() {
return expanded;
}
public void setExpanded(boolean expanded) {
this.expanded = expanded;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.google.common.collect.Lists;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -15,6 +17,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("List of entries with some metadata")
@Data
public class Entries implements Serializable {
@ApiProperty("name of the feed or the category requested")
@@ -44,76 +47,4 @@ public class Entries implements Serializable {
@ApiProperty("list of entries")
private List<Entry> entries = Lists.newArrayList();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Entry> getEntries() {
return entries;
}
public void setEntries(List<Entry> entries) {
this.entries = entries;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getErrorCount() {
return errorCount;
}
public void setErrorCount(int errorCount) {
this.errorCount = errorCount;
}
public String getFeedLink() {
return feedLink;
}
public void setFeedLink(String feedLink) {
this.feedLink = feedLink;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public boolean isHasMore() {
return hasMore;
}
public void setHasMore(boolean hasMore) {
this.hasMore = hasMore;
}
public int getOffset() {
return offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
}

View File

@@ -8,6 +8,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.commafeed.backend.feeds.FeedUtils;
import com.commafeed.backend.model.FeedEntry;
import com.commafeed.backend.model.FeedEntryContent;
@@ -23,6 +25,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Entry details")
@Data
public class Entry implements Serializable {
public static Entry build(FeedEntryStatus status, String publicUrl, boolean proxyImages) {
@@ -128,157 +131,4 @@ public class Entry implements Serializable {
@ApiProperty("wether the entry is still markable (old entry statuses are discarded)")
private boolean markable;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getFeedId() {
return feedId;
}
public void setFeedId(String feedId) {
this.feedId = feedId;
}
public String getFeedName() {
return feedName;
}
public void setFeedName(String feedName) {
this.feedName = feedName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public boolean isRead() {
return read;
}
public void setRead(boolean read) {
this.read = read;
}
public boolean isStarred() {
return starred;
}
public void setStarred(boolean starred) {
this.starred = starred;
}
public String getFeedUrl() {
return feedUrl;
}
public void setFeedUrl(String feedUrl) {
this.feedUrl = feedUrl;
}
public String getEnclosureUrl() {
return enclosureUrl;
}
public void setEnclosureUrl(String enclosureUrl) {
this.enclosureUrl = enclosureUrl;
}
public String getEnclosureType() {
return enclosureType;
}
public void setEnclosureType(String enclosureType) {
this.enclosureType = enclosureType;
}
public String getGuid() {
return guid;
}
public void setGuid(String guid) {
this.guid = guid;
}
public String getFeedLink() {
return feedLink;
}
public void setFeedLink(String feedLink) {
this.feedLink = feedLink;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public boolean isRtl() {
return rtl;
}
public void setRtl(boolean rtl) {
this.rtl = rtl;
}
public Date getInsertedDate() {
return insertedDate;
}
public void setInsertedDate(Date insertedDate) {
this.insertedDate = insertedDate;
}
public boolean isMarkable() {
return markable;
}
public void setMarkable(boolean markable) {
this.markable = markable;
}
}

View File

@@ -7,11 +7,14 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.commafeed.backend.model.Feed;
import com.google.common.collect.Lists;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class FeedCount implements Serializable {
private static final long serialVersionUID = 1L;
@@ -23,20 +26,4 @@ public class FeedCount implements Serializable {
this.value = value;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public List<Feed> getFeeds() {
return feeds;
}
public void setFeeds(List<Feed> feeds) {
this.feeds = feeds;
}
}

View File

@@ -6,31 +6,18 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Feed details")
@Data
public class FeedInfo implements Serializable {
private String url;
private String title;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.google.common.collect.Maps;
import com.wordnik.swagger.annotations.ApiClass;
@@ -14,6 +16,7 @@ import com.wordnik.swagger.annotations.ApiClass;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Server infos")
@Data
public class ServerInfo implements Serializable {
private String announcement;
@@ -21,36 +24,4 @@ public class ServerInfo implements Serializable {
private String gitCommit;
private Map<String, String> supportedLanguages = Maps.newHashMap();
public String getAnnouncement() {
return announcement;
}
public void setAnnouncement(String announcement) {
this.announcement = announcement;
}
public Map<String, String> getSupportedLanguages() {
return supportedLanguages;
}
public void setSupportedLanguages(Map<String, String> supportedLanguages) {
this.supportedLanguages = supportedLanguages;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getGitCommit() {
return gitCommit;
}
public void setGitCommit(String gitCommit) {
this.gitCommit = gitCommit;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("User settings")
@Data
public class Settings implements Serializable {
@ApiProperty(value = "user's preferred language, english if none")
@@ -42,76 +45,4 @@ public class Settings implements Serializable {
@ApiProperty(value = "user's custom css for the website")
private String customCss;
public String getReadingMode() {
return readingMode;
}
public void setReadingMode(String readingMode) {
this.readingMode = readingMode;
}
public String getCustomCss() {
return customCss;
}
public void setCustomCss(String customCss) {
this.customCss = customCss;
}
public String getReadingOrder() {
return readingOrder;
}
public void setReadingOrder(String readingOrder) {
this.readingOrder = readingOrder;
}
public boolean isShowRead() {
return showRead;
}
public void setShowRead(boolean showRead) {
this.showRead = showRead;
}
public boolean isSocialButtons() {
return socialButtons;
}
public void setSocialButtons(boolean socialButtons) {
this.socialButtons = socialButtons;
}
public String getViewMode() {
return viewMode;
}
public void setViewMode(String viewMode) {
this.viewMode = viewMode;
}
public boolean isScrollMarks() {
return scrollMarks;
}
public void setScrollMarks(boolean scrollMarks) {
this.scrollMarks = scrollMarks;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getTheme() {
return theme;
}
public void setTheme(String theme) {
this.theme = theme;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.commafeed.backend.feeds.FeedUtils;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedCategory;
@@ -18,6 +20,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("User information")
@Data
public class Subscription implements Serializable {
public static Subscription build(FeedSubscription subscription, String publicUrl, UnreadCount unreadCount) {
@@ -80,108 +83,4 @@ public class Subscription implements Serializable {
@ApiProperty("date of the newest item")
private Date newestItemTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getUnread() {
return unread;
}
public void setUnread(long unread) {
this.unread = unread;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getFeedUrl() {
return feedUrl;
}
public void setFeedUrl(String feedUrl) {
this.feedUrl = feedUrl;
}
public int getErrorCount() {
return errorCount;
}
public void setErrorCount(int errorCount) {
this.errorCount = errorCount;
}
public String getFeedLink() {
return feedLink;
}
public void setFeedLink(String feedLink) {
this.feedLink = feedLink;
}
public Date getLastRefresh() {
return lastRefresh;
}
public void setLastRefresh(Date lastRefresh) {
this.lastRefresh = lastRefresh;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public Date getNextRefresh() {
return nextRefresh;
}
public void setNextRefresh(Date nextRefresh) {
this.nextRefresh = nextRefresh;
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
public Date getNewestItemTime() {
return newestItemTime;
}
public void setNewestItemTime(Date newestItemTime) {
this.newestItemTime = newestItemTime;
}
}

View File

@@ -7,12 +7,15 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Unread count")
@Data
public class UnreadCount implements Serializable {
private long feedId;
@@ -29,28 +32,4 @@ public class UnreadCount implements Serializable {
this.newestItemTime = newestItemTime;
}
public long getFeedId() {
return feedId;
}
public void setFeedId(long feedId) {
this.feedId = feedId;
}
public long getUnreadCount() {
return unreadCount;
}
public void setUnreadCount(long unreadCount) {
this.unreadCount = unreadCount;
}
public Date getNewestItemTime() {
return newestItemTime;
}
public void setNewestItemTime(Date newestItemTime) {
this.newestItemTime = newestItemTime;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -14,6 +16,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("User information")
@Data
public class UserModel implements Serializable {
@ApiProperty(value = "user id", required = true)
@@ -43,76 +46,4 @@ public class UserModel implements Serializable {
@ApiProperty(value = "user is admin")
private boolean admin;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isAdmin() {
return admin;
}
public void setAdmin(boolean admin) {
this.admin = admin;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Date getLastLogin() {
return lastLogin;
}
public void setLastLogin(Date lastLogin) {
this.lastLogin = lastLogin;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Add Category Request")
@Data
public class AddCategoryRequest implements Serializable {
@ApiProperty(value = "name", required = true)
@@ -21,20 +24,4 @@ public class AddCategoryRequest implements Serializable {
@ApiProperty(value = "parent category id, if any")
private String parentId;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Category modification request")
@Data
public class CategoryModificationRequest implements Serializable {
@ApiProperty(value = "id", required = true)
@@ -27,36 +30,4 @@ public class CategoryModificationRequest implements Serializable {
@ApiProperty(value = "new display position, null if not changed")
private Integer position;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Mark Request")
@Data
public class CollapseRequest implements Serializable {
@ApiProperty(value = "category id", required = true)
@@ -21,20 +24,4 @@ public class CollapseRequest implements Serializable {
@ApiProperty(value = "collapse", required = true)
private boolean collapse;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public boolean isCollapse() {
return collapse;
}
public void setCollapse(boolean collapse) {
this.collapse = collapse;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,17 +15,10 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Feed information request")
@Data
public class FeedInfoRequest implements Serializable {
@ApiProperty(value = "feed url", required = true)
private String url;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -14,6 +16,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Feed merge Request")
@Data
public class FeedMergeRequest implements Serializable {
@ApiProperty(value = "merge into this feed", required = true)
@@ -22,20 +25,4 @@ public class FeedMergeRequest implements Serializable {
@ApiProperty(value = "id of the feeds to merge", required = true)
private List<Long> feedIds;
public Long getIntoFeedId() {
return intoFeedId;
}
public void setIntoFeedId(Long intoFeedId) {
this.intoFeedId = intoFeedId;
}
public List<Long> getFeedIds() {
return feedIds;
}
public void setFeedIds(List<Long> feedIds) {
this.feedIds = feedIds;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Feed modification request")
@Data
public class FeedModificationRequest implements Serializable {
@ApiProperty(value = "id", required = true)
@@ -27,36 +30,4 @@ public class FeedModificationRequest implements Serializable {
@ApiProperty(value = "new display position, null if not changed")
private Integer position;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,17 +15,10 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass
@Data
public class IDRequest implements Serializable {
@ApiProperty
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Mark Request")
@Data
public class MarkRequest implements Serializable {
@ApiProperty(value = "entry id, category id, 'all' or 'starred'", required = true)
@@ -29,36 +32,4 @@ public class MarkRequest implements Serializable {
required = false)
private Long olderThan;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public boolean isRead() {
return read;
}
public void setRead(boolean read) {
this.read = read;
}
public Long getOlderThan() {
return olderThan;
}
public void setOlderThan(Long olderThan) {
this.olderThan = olderThan;
}
public Long getFeedId() {
return feedId;
}
public void setFeedId(Long feedId) {
this.feedId = feedId;
}
}

View File

@@ -7,6 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -14,17 +16,10 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Multiple Mark Request")
@Data
public class MultipleMarkRequest implements Serializable {
@ApiProperty(value = "list of mark requests", required = true)
private List<MarkRequest> requests;
public List<MarkRequest> getRequests() {
return requests;
}
public void setRequests(List<MarkRequest> requests) {
this.requests = requests;
}
}

View File

@@ -4,12 +4,15 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Profile modification request")
@Data
public class ProfileModificationRequest {
@ApiProperty(value = "changes email of the user, if specified")
@@ -21,28 +24,4 @@ public class ProfileModificationRequest {
@ApiProperty(value = "generate a new api key")
private boolean newApiKey;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean isNewApiKey() {
return newApiKey;
}
public void setNewApiKey(boolean newApiKey) {
this.newApiKey = newApiKey;
}
}

View File

@@ -6,11 +6,14 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class RegistrationRequest implements Serializable {
@ApiProperty(value = "username, between 3 and 32 characters", required = true)
@@ -22,27 +25,4 @@ public class RegistrationRequest implements Serializable {
@ApiProperty(value = "email address for password recovery", required = true)
private String email;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Star Request")
@Data
public class StarRequest implements Serializable {
@ApiProperty(value = "id", required = true)
@@ -24,28 +27,4 @@ public class StarRequest implements Serializable {
@ApiProperty(value = "starred or not")
private boolean starred;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public boolean isStarred() {
return starred;
}
public void setStarred(boolean starred) {
this.starred = starred;
}
public Long getFeedId() {
return feedId;
}
public void setFeedId(Long feedId) {
this.feedId = feedId;
}
}

View File

@@ -6,6 +6,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import lombok.Data;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@@ -13,6 +15,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Subscription request")
@Data
public class SubscribeRequest implements Serializable {
@ApiProperty(value = "url of the feed", required = true)
@@ -24,28 +27,4 @@ public class SubscribeRequest implements Serializable {
@ApiProperty(value = "id of the user category to place the feed in")
private String categoryId;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
}