Skip to content

Commit

Permalink
added models and responses. updated ignore file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yariki committed Jan 29, 2017
1 parent b6ce3e0 commit 09ce466
Show file tree
Hide file tree
Showing 10 changed files with 1,053 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/.idea
/emailparser.iml

/target
13 changes: 13 additions & 0 deletions src/main/java/com/fruitfactory/controllers/OFEmailController.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.fruitfactory.controllers;

import com.fruitfactory.models.response.OFEmailResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
* Created by Yariki on 1/29/2017.
Expand All @@ -11,6 +14,16 @@
public class OFEmailController {


@RequestMapping(value = "/items",method = RequestMethod.POST)
public OFEmailResponse putEmailContainer(@RequestBody String body){
OFEmailResponse response = new OFEmailResponse(false,"");
try {
response.setStatus(true);
}catch(Exception ex){
response.setMessage(ex.getMessage());
}

return response;
}

}
134 changes: 134 additions & 0 deletions src/main/java/com/fruitfactory/models/OFAttachment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
package com.fruitfactory.models;

import com.carrotsearch.ant.tasks.junit4.dependencies.com.google.gson.annotations.SerializedName;

import java.util.Date;

/**
* Created by Yariki on 1/29/2017.
*/
public class OFAttachment {
@SerializedName("entryid")
public String entryid;

@SerializedName("filename")
public String filename;

@SerializedName("path")
public String path;

@SerializedName("size")
public long size;

@SerializedName("mimetag")
public String mimetag;

@SerializedName("content")
public String content;

@SerializedName("analyzedcontent")
public String analyzedcontent;

@SerializedName("emailid")
public String emailid;

@SerializedName("outlookemailid")
public String outlookemailid;

@SerializedName("datecreated")
public Date datecreated;

@SerializedName("storeid")
public String storeid;

public OFAttachment() {
}

public String getEntryid() {
return entryid;
}

public void setEntryid(String entryid) {
this.entryid = entryid;
}

public String getFilename() {
return filename;
}

public void setFilename(String filename) {
this.filename = filename;
}

public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

public long getSize() {
return size;
}

public void setSize(long size) {
this.size = size;
}

public String getMimetag() {
return mimetag;
}

public void setMimetag(String mimetag) {
this.mimetag = mimetag;
}

public String getContent() {
return content;
}

public void setContent(String content) {
this.content = content;
}

public String getAnalyzedcontent() {
return analyzedcontent;
}

public void setAnalyzedcontent(String analyzedcontent) {
this.analyzedcontent = analyzedcontent;
}

public String getEmailid() {
return emailid;
}

public void setEmailid(String emailid) {
this.emailid = emailid;
}

public String getOutlookemailid() {
return outlookemailid;
}

public void setOutlookemailid(String outlookemailid) {
this.outlookemailid = outlookemailid;
}

public Date getDatecreated() {
return datecreated;
}

public void setDatecreated(Date datecreated) {
this.datecreated = datecreated;
}

public String getStoreid() {
return storeid;
}

public void setStoreid(String storeid) {
this.storeid = storeid;
}
}
67 changes: 67 additions & 0 deletions src/main/java/com/fruitfactory/models/OFAttachmentSimple.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.fruitfactory.models;

import com.carrotsearch.ant.tasks.junit4.dependencies.com.google.gson.annotations.SerializedName;

/**
* Created by Yariki on 1/29/2017.
*/
public class OFAttachmentSimple {

@SerializedName("entryid")
public String entryId;

@SerializedName("filename")
public String fileName;

@SerializedName("path")
public String path;

@SerializedName("size")
public long size;

@SerializedName("mimetag")
public String mimeTag;

public OFAttachmentSimple() {
}

public String getEntryId() {
return entryId;
}

public void setEntryId(String entryId) {
this.entryId = entryId;
}

public String getFileName() {
return fileName;
}

public void setFileName(String fileName) {
this.fileName = fileName;
}

public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

public long getSize() {
return size;
}

public void setSize(long size) {
this.size = size;
}

public String getMimeTag() {
return mimeTag;
}

public void setMimeTag(String mimeTag) {
this.mimeTag = mimeTag;
}
}
Loading

0 comments on commit 09ce466

Please sign in to comment.