api.basecamp
Class Message

java.lang.Object
  extended by api.basecamp.Message

public class Message
extends java.lang.Object

BaseCamp Message Object

Author:
jon

Constructor Summary
Message(BCAuth auth)
          Create new (UNSAVED) BaseCamp message, set appropriate fields and use '.save()' to post the message
Message(BCAuth auth, int messageId)
          Get Specific Message according to id
 
Method Summary
 boolean delete()
          Delete Message from BaseCamp
 int getAttachmentsCount()
           
 int getAuthorId()
           
 java.lang.String getAuthorName()
           
 java.lang.String getBody()
           
 int getCategoryId()
           
 java.util.Calendar getCommentedAt()
           
 int getCommentsCount()
           
 java.lang.String getDisplayBody()
           
 int getId()
           
 int getMilestoneId()
           
 java.util.Calendar getPostedOn()
           
 int getProjectId()
           
 java.lang.String getTitle()
           
 boolean isUseTextile()
           
 boolean save()
          Save object to basecamp in current state, or post if new.
 boolean save(int[] theNotifiedIds)
          Save object to basecamp in current state, or post if new.
 void setBody(java.lang.String body)
          Set the Body of the Message
 void setCategoryId(int categoryId)
          Set the Category ID of the Message
 void setProjectId(int projectId)
          If project has not been saved to basecamp yet (id == 0) then we will set the proper projectId to associate this message with upon saving.
 void setTitle(java.lang.String title)
          Set Title of Message
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(BCAuth auth)
Create new (UNSAVED) BaseCamp message, set appropriate fields and use '.save()' to post the message

Parameters:
auth - BCAuth Object

Message

public Message(BCAuth auth,
               int messageId)
Get Specific Message according to id

Parameters:
auth - BCAuth Object
messageId - ID of Message
Method Detail

save

public boolean save(int[] theNotifiedIds)
Save object to basecamp in current state, or post if new.

Parameters:
theNotifiedIds - int[] of all ids you wish to notify on post
Returns:
Boolean

save

public boolean save()
Save object to basecamp in current state, or post if new.

Returns:
Boolean Success/Fail

delete

public boolean delete()
Delete Message from BaseCamp

Returns:
Boolean Success/Fail

setTitle

public void setTitle(java.lang.String title)
Set Title of Message

Parameters:
title - New title content

setBody

public void setBody(java.lang.String body)
Set the Body of the Message

Parameters:
body - New body content

setCategoryId

public void setCategoryId(int categoryId)
Set the Category ID of the Message

Parameters:
categoryId - New category ID

setProjectId

public void setProjectId(int projectId)
If project has not been saved to basecamp yet (id == 0) then we will set the proper projectId to associate this message with upon saving.

Parameters:
projectId - ID of project you wish to associate this message.

getId

public int getId()

getTitle

public java.lang.String getTitle()

getBody

public java.lang.String getBody()

getDisplayBody

public java.lang.String getDisplayBody()

getPostedOn

public java.util.Calendar getPostedOn()

getCommentedAt

public java.util.Calendar getCommentedAt()

getProjectId

public int getProjectId()

getCategoryId

public int getCategoryId()

getAuthorId

public int getAuthorId()

getAuthorName

public java.lang.String getAuthorName()

getMilestoneId

public int getMilestoneId()

getCommentsCount

public int getCommentsCount()

isUseTextile

public boolean isUseTextile()

getAttachmentsCount

public int getAttachmentsCount()