From a58b0a08063a8dc1c30aa315df4b6bf577b17306 Mon Sep 17 00:00:00 2001 From: Athou Date: Sun, 11 Aug 2013 11:59:24 +0200 Subject: [PATCH] use lombok data instead of getters and setters --- .../commafeed/frontend/model/Category.java | 60 +------ .../com/commafeed/frontend/model/Entries.java | 75 +-------- .../com/commafeed/frontend/model/Entry.java | 156 +----------------- .../commafeed/frontend/model/FeedCount.java | 19 +-- .../commafeed/frontend/model/FeedInfo.java | 19 +-- .../commafeed/frontend/model/ServerInfo.java | 35 +--- .../commafeed/frontend/model/Settings.java | 75 +-------- .../frontend/model/Subscription.java | 107 +----------- .../commafeed/frontend/model/UnreadCount.java | 27 +-- .../commafeed/frontend/model/UserModel.java | 75 +-------- .../model/request/AddCategoryRequest.java | 19 +-- .../request/CategoryModificationRequest.java | 35 +--- .../model/request/CollapseRequest.java | 19 +-- .../model/request/FeedInfoRequest.java | 11 +- .../model/request/FeedMergeRequest.java | 19 +-- .../request/FeedModificationRequest.java | 35 +--- .../frontend/model/request/IDRequest.java | 11 +- .../frontend/model/request/MarkRequest.java | 35 +--- .../model/request/MultipleMarkRequest.java | 11 +- .../request/ProfileModificationRequest.java | 27 +-- .../model/request/RegistrationRequest.java | 26 +-- .../frontend/model/request/StarRequest.java | 27 +-- .../model/request/SubscribeRequest.java | 27 +-- 23 files changed, 69 insertions(+), 881 deletions(-) diff --git a/src/main/java/com/commafeed/frontend/model/Category.java b/src/main/java/com/commafeed/frontend/model/Category.java index b9c9568a..ed4f2a49 100644 --- a/src/main/java/com/commafeed/frontend/model/Category.java +++ b/src/main/java/com/commafeed/frontend/model/Category.java @@ -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 getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } - - public List getFeeds() { - return feeds; - } - - public void setFeeds(List 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; - } - } \ No newline at end of file diff --git a/src/main/java/com/commafeed/frontend/model/Entries.java b/src/main/java/com/commafeed/frontend/model/Entries.java index 80a44a0f..c174d2e9 100644 --- a/src/main/java/com/commafeed/frontend/model/Entries.java +++ b/src/main/java/com/commafeed/frontend/model/Entries.java @@ -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 entries = Lists.newArrayList(); - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getEntries() { - return entries; - } - - public void setEntries(List 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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/Entry.java b/src/main/java/com/commafeed/frontend/model/Entry.java index d9a214bf..1cf252dc 100644 --- a/src/main/java/com/commafeed/frontend/model/Entry.java +++ b/src/main/java/com/commafeed/frontend/model/Entry.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/FeedCount.java b/src/main/java/com/commafeed/frontend/model/FeedCount.java index 74bcda64..19d53ddf 100644 --- a/src/main/java/com/commafeed/frontend/model/FeedCount.java +++ b/src/main/java/com/commafeed/frontend/model/FeedCount.java @@ -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 getFeeds() { - return feeds; - } - - public void setFeeds(List feeds) { - this.feeds = feeds; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/FeedInfo.java b/src/main/java/com/commafeed/frontend/model/FeedInfo.java index 71580adb..ed355cb1 100644 --- a/src/main/java/com/commafeed/frontend/model/FeedInfo.java +++ b/src/main/java/com/commafeed/frontend/model/FeedInfo.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/ServerInfo.java b/src/main/java/com/commafeed/frontend/model/ServerInfo.java index 0e66203a..d08110c7 100644 --- a/src/main/java/com/commafeed/frontend/model/ServerInfo.java +++ b/src/main/java/com/commafeed/frontend/model/ServerInfo.java @@ -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 supportedLanguages = Maps.newHashMap(); - public String getAnnouncement() { - return announcement; - } - - public void setAnnouncement(String announcement) { - this.announcement = announcement; - } - - public Map getSupportedLanguages() { - return supportedLanguages; - } - - public void setSupportedLanguages(Map 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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/Settings.java b/src/main/java/com/commafeed/frontend/model/Settings.java index e428e815..43a620e9 100644 --- a/src/main/java/com/commafeed/frontend/model/Settings.java +++ b/src/main/java/com/commafeed/frontend/model/Settings.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/Subscription.java b/src/main/java/com/commafeed/frontend/model/Subscription.java index e9aeb940..8810ec38 100644 --- a/src/main/java/com/commafeed/frontend/model/Subscription.java +++ b/src/main/java/com/commafeed/frontend/model/Subscription.java @@ -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; - } - } \ No newline at end of file diff --git a/src/main/java/com/commafeed/frontend/model/UnreadCount.java b/src/main/java/com/commafeed/frontend/model/UnreadCount.java index a0d1721a..c0871539 100644 --- a/src/main/java/com/commafeed/frontend/model/UnreadCount.java +++ b/src/main/java/com/commafeed/frontend/model/UnreadCount.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/UserModel.java b/src/main/java/com/commafeed/frontend/model/UserModel.java index 0d3aa2fa..38ed2819 100644 --- a/src/main/java/com/commafeed/frontend/model/UserModel.java +++ b/src/main/java/com/commafeed/frontend/model/UserModel.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/AddCategoryRequest.java b/src/main/java/com/commafeed/frontend/model/request/AddCategoryRequest.java index bb4acddc..4d58b725 100644 --- a/src/main/java/com/commafeed/frontend/model/request/AddCategoryRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/AddCategoryRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/CategoryModificationRequest.java b/src/main/java/com/commafeed/frontend/model/request/CategoryModificationRequest.java index ace4cf84..289141f3 100644 --- a/src/main/java/com/commafeed/frontend/model/request/CategoryModificationRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/CategoryModificationRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/CollapseRequest.java b/src/main/java/com/commafeed/frontend/model/request/CollapseRequest.java index fb45c11e..3bd6eefa 100644 --- a/src/main/java/com/commafeed/frontend/model/request/CollapseRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/CollapseRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/FeedInfoRequest.java b/src/main/java/com/commafeed/frontend/model/request/FeedInfoRequest.java index 5ae18cde..43f79aaf 100644 --- a/src/main/java/com/commafeed/frontend/model/request/FeedInfoRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/FeedInfoRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/FeedMergeRequest.java b/src/main/java/com/commafeed/frontend/model/request/FeedMergeRequest.java index 19488c02..18929c9b 100644 --- a/src/main/java/com/commafeed/frontend/model/request/FeedMergeRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/FeedMergeRequest.java @@ -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 feedIds; - public Long getIntoFeedId() { - return intoFeedId; - } - - public void setIntoFeedId(Long intoFeedId) { - this.intoFeedId = intoFeedId; - } - - public List getFeedIds() { - return feedIds; - } - - public void setFeedIds(List feedIds) { - this.feedIds = feedIds; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/FeedModificationRequest.java b/src/main/java/com/commafeed/frontend/model/request/FeedModificationRequest.java index a6407fa7..3904eb2c 100644 --- a/src/main/java/com/commafeed/frontend/model/request/FeedModificationRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/FeedModificationRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/IDRequest.java b/src/main/java/com/commafeed/frontend/model/request/IDRequest.java index bfc4dbe8..75fd715c 100644 --- a/src/main/java/com/commafeed/frontend/model/request/IDRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/IDRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/MarkRequest.java b/src/main/java/com/commafeed/frontend/model/request/MarkRequest.java index 5c48cd37..7026cf43 100644 --- a/src/main/java/com/commafeed/frontend/model/request/MarkRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/MarkRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/MultipleMarkRequest.java b/src/main/java/com/commafeed/frontend/model/request/MultipleMarkRequest.java index 58ef422c..5aa56e2c 100644 --- a/src/main/java/com/commafeed/frontend/model/request/MultipleMarkRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/MultipleMarkRequest.java @@ -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 requests; - public List getRequests() { - return requests; - } - - public void setRequests(List requests) { - this.requests = requests; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/ProfileModificationRequest.java b/src/main/java/com/commafeed/frontend/model/request/ProfileModificationRequest.java index ec30b206..57180afa 100644 --- a/src/main/java/com/commafeed/frontend/model/request/ProfileModificationRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/ProfileModificationRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/RegistrationRequest.java b/src/main/java/com/commafeed/frontend/model/request/RegistrationRequest.java index 494501ec..a41d9d97 100644 --- a/src/main/java/com/commafeed/frontend/model/request/RegistrationRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/RegistrationRequest.java @@ -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; - } } diff --git a/src/main/java/com/commafeed/frontend/model/request/StarRequest.java b/src/main/java/com/commafeed/frontend/model/request/StarRequest.java index 76816aed..7508a4f1 100644 --- a/src/main/java/com/commafeed/frontend/model/request/StarRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/StarRequest.java @@ -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; - } - } diff --git a/src/main/java/com/commafeed/frontend/model/request/SubscribeRequest.java b/src/main/java/com/commafeed/frontend/model/request/SubscribeRequest.java index a36502fb..cc6d229b 100644 --- a/src/main/java/com/commafeed/frontend/model/request/SubscribeRequest.java +++ b/src/main/java/com/commafeed/frontend/model/request/SubscribeRequest.java @@ -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; - } - }