api.basecamp
Class Comment

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

public class Comment
extends java.lang.Object

Comment Object for use with BaseCamp API

Author:
jondavidjohn

Constructor Summary
Comment(BCAuth auth, int commentId)
          Build Comment from comment ID
Comment(BCAuth auth, java.lang.String resourceType, int resourceId, java.lang.String body)
          Add comment to BaseCamp resource and Build Comment object
 
Method Summary
 boolean delete()
          Delete Comment
 int getAttachmentCount()
           
 int getAuthorId()
           
 java.lang.String getAuthorName()
           
 java.lang.String getBody()
           
 int getCommentableId()
           
 java.lang.String getCommentableType()
           
 java.util.Calendar getCreatedAt()
           
 int getId()
           
 boolean save()
          Save Current state of Comment
 void setBody(java.lang.String body)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment(BCAuth auth,
               int commentId)
Build Comment from comment ID

Parameters:
auth - BCAuth Object
commentId - ID of desired comment

Comment

public Comment(BCAuth auth,
               java.lang.String resourceType,
               int resourceId,
               java.lang.String body)
Add comment to BaseCamp resource and Build Comment object

Parameters:
auth - BCAuth
resourceType - Resource Type String - example "todo_item", "posts" , "milestones"
resourceId - id of resource
body - String body of comment
Method Detail

save

public boolean save()
Save Current state of Comment

Returns:
Success/Fail

delete

public boolean delete()
Delete Comment

Returns:
Success/Fail

getBody

public java.lang.String getBody()
Returns:
the body

getId

public int getId()
Returns:
the id

getAuthorId

public int getAuthorId()
Returns:
the authorId

getAuthorName

public java.lang.String getAuthorName()
Returns:
the authorName

getCommentableId

public int getCommentableId()
Returns:
the commentableId

getCommentableType

public java.lang.String getCommentableType()
Returns:
the commentableType

getCreatedAt

public java.util.Calendar getCreatedAt()
Returns:
the createdAt

getAttachmentCount

public int getAttachmentCount()
Returns:
the attachmentCount

setBody

public void setBody(java.lang.String body)
Parameters:
body - the body to set