fix for admin api

This commit is contained in:
Athou
2013-04-18 12:50:44 +02:00
parent 9bd825d786
commit af109ccf5c
30 changed files with 1000 additions and 861 deletions

View File

@@ -0,0 +1,40 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Mark Request")
public class CollapseRequest implements Serializable {
@ApiProperty(value = "category id", required = true)
private Long id;
@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

@@ -0,0 +1,29 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass
public class IDRequest implements Serializable {
@ApiProperty
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

View File

@@ -0,0 +1,51 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Mark Request")
public class MarkRequest implements Serializable {
@ApiProperty(value = "id", required = true)
private String id;
@ApiProperty(value = "mark as read or unread")
private boolean read;
@ApiProperty(value = "only entries older than this, prevent marking an entry that was not retrieved", 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;
}
}

View File

@@ -0,0 +1,37 @@
package com.commafeed.frontend.model.request;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Profile modification request")
public class ProfileModificationRequest {
@ApiProperty(value = "changes email of the user, if specified")
private String email;
@ApiProperty(value = "changes password of the user, if specified")
private String password;
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;
}
}

View File

@@ -0,0 +1,51 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RegistrationRequest implements Serializable {
private String name;
private String password;
private String email;
private boolean googleImport = true;
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;
}
public boolean isGoogleImport() {
return googleImport;
}
public void setGoogleImport(boolean googleImport) {
this.googleImport = googleImport;
}
}

View File

@@ -0,0 +1,40 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Rename Request")
public class RenameRequest implements Serializable {
@ApiProperty(value = "id", required = true)
private Long id;
@ApiProperty(value = "mark as read or unread")
private String name;
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;
}
}

View File

@@ -0,0 +1,51 @@
package com.commafeed.frontend.model.request;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.wordnik.swagger.annotations.ApiClass;
import com.wordnik.swagger.annotations.ApiProperty;
@SuppressWarnings("serial")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@ApiClass("Subscription request")
public class SubscribeRequest implements Serializable {
@ApiProperty(value = "url of the feed", required = true)
private String url;
@ApiProperty(value = "name of the feed for the user", required = true)
private String title;
@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;
}
}