Android Open Source - inbox-android Message






From Project

Back to project page inbox-android.

License

The source code is released under:

MIT License

If you think the Android project inbox-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.inboxapp.androidsdk.json_objects.single_objects;
/*w  w w. j  a  v a2  s . c  o  m*/
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.inboxapp.androidsdk.json_objects.collection_objects.FileList;
import com.inboxapp.androidsdk.json_objects.collection_objects.ParticipantList;
import com.inboxapp.androidsdk.json_objects.single_objects.base.InboxAppSingleObject;
import com.inboxapp.androidsdk.utils.InboxAppStringUtils;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by sylvianguessan on 8/7/14.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class Message implements Serializable, InboxAppSingleObject {
    @JsonProperty("id")
    String id;
    @JsonProperty("object")
    String object;
    @JsonProperty("subject")
    String subject;
    @JsonProperty("from")
    ParticipantList from;
    @JsonProperty("to")
    ParticipantList to;
    @JsonProperty("cc")
    ParticipantList cc;
    @JsonProperty("bcc")
    ParticipantList bcc;
    @JsonProperty("body")
    String body;
    @JsonProperty("date")
    long date;
    @JsonProperty("thread")
    String thread;
    @JsonProperty("files")
    FileList files;

    int maxBodyPreview = 100;

    public String getId(){return id;}
    public void setId(String s){id=s;}
    public String getObject(){return object;}
    public void setObject(String s){object=s;}
    public String getSubject(){return subject;}
    public void setSubject(String s){subject=s;}
    public ParticipantList getFromList(){return from;}
    public void setFromList(ParticipantList l){from=l;}
    public ParticipantList getToList(){return to;}
    public void setToList(ParticipantList l){to=l;}
    public ParticipantList getCCList(){return cc;}
    public void setCCList(ParticipantList l){cc=l;}
    public ParticipantList getBCCList(){return bcc;}
    public void setBCCList(ParticipantList l){bcc=l;}
    public String getBody(){return body;}
    public void setBody(String s){body=s;}
    public long getDate(){return date;}
    public void setDate(long l){date=l;}
    public String getThreadReference(){return thread;}
    public void setThreadReference(String s){
        thread =s;}
    public FileList getFiles(){return files;}
    public void setFiles(FileList frL){
        files =frL;}

    @Override
    public String toString()
    {
        return ToStringBuilder.reflectionToString(this);
    }
    public String memberTypesValue()
    {
        return  "id: "+id+"\n"
                +"object: "+object+"\n"
                +"subject: "+subject+"\n"
                +"from: "+InboxAppStringUtils.StringUtils.getAllParticipantsString(from)+"\n"
                +"to: "+InboxAppStringUtils.StringUtils.getAllParticipantsString(to)+"\n"
                +"cc: "+InboxAppStringUtils.StringUtils.getAllParticipantsString(cc)+"\n"
                +"bcc: "+InboxAppStringUtils.StringUtils.getAllParticipantsString(bcc)+"\n"
                +"body: "+body.substring(0, (body.length() >= maxBodyPreview)?maxBodyPreview:(body.length()< 1)?0:(body.length() - 1)) + ((body.length() > maxBodyPreview)?"...":"")+ "\n"
                +"thread: "+ thread +"\n"
                +"date: "+date+"\n"
                +"files (files): "+ InboxAppStringUtils.StringUtils.getAllFilesString(files)+"\n";
    }

}




Java Source Code List

com.inboxapp.androidapplication.MainActivity.java
com.inboxapp.androidsdk.apis.InboxAppClient.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTaskCallback.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTaskQueue.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxTaskID.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.CreateCustomTagTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.CreateDraftWithBodyTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.SendDraftWithBodyTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.SendDraftWithIDTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.UpdateThreadTagsTask.java
com.inboxapp.androidsdk.apis.taskmanagement.InboxAppTasks.base.InboxAppTask.java
com.inboxapp.androidsdk.json_objects.collection_objects.ContactList.java
com.inboxapp.androidsdk.json_objects.collection_objects.DraftList.java
com.inboxapp.androidsdk.json_objects.collection_objects.FileList.java
com.inboxapp.androidsdk.json_objects.collection_objects.MessageList.java
com.inboxapp.androidsdk.json_objects.collection_objects.NameSpaceList.java
com.inboxapp.androidsdk.json_objects.collection_objects.ParticipantList.java
com.inboxapp.androidsdk.json_objects.collection_objects.TagList.java
com.inboxapp.androidsdk.json_objects.collection_objects.ThreadList.java
com.inboxapp.androidsdk.json_objects.single_objects.Contact.java
com.inboxapp.androidsdk.json_objects.single_objects.Draft.java
com.inboxapp.androidsdk.json_objects.single_objects.File.java
com.inboxapp.androidsdk.json_objects.single_objects.Message.java
com.inboxapp.androidsdk.json_objects.single_objects.Namespace.java
com.inboxapp.androidsdk.json_objects.single_objects.Participant.java
com.inboxapp.androidsdk.json_objects.single_objects.Tag.java
com.inboxapp.androidsdk.json_objects.single_objects.Thread.java
com.inboxapp.androidsdk.json_objects.single_objects.base.InboxAppSingleObject.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.DraftID.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.TagEdit.java
com.inboxapp.androidsdk.json_objects.single_objects.body_objects.TagName.java
com.inboxapp.androidsdk.sample_application.SampleArrayAdapter.java
com.inboxapp.androidsdk.sample_application.SampleDetailsActivity.java
com.inboxapp.androidsdk.sample_application.SampleMenuActivity.java
com.inboxapp.androidsdk.scratchpad.Scratchpad_MainActivity.java
com.inboxapp.androidsdk.scratchpad.scratchpad_apis.JacksonContributor.java
com.inboxapp.androidsdk.scratchpad.scratchpad_apis.TestApi.java
com.inboxapp.androidsdk.utils.InboxAppStringUtils.java