Class: Projects::Model::Forum

Inherits:
Object
  • Object
show all
Defined in:
lib/projects/model/Forum.rb

Overview

  • This class is used to make an object for Forum.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#isAnnouncementPost ⇒ Object

  • Get is the post is announcement or not.

Returns

  • true, if the post is announcement else returns false.


109
110
111
# File 'lib/projects/model/Forum.rb', line 109

def isAnnouncementPost
  @isAnnouncementPost
end

#isStickyPost ⇒ Object

  • Get the forum is a sticky post or not.

Returns

  • true, if the forum is in sticky post else returns false.


89
90
91
# File 'lib/projects/model/Forum.rb', line 89

def isStickyPost
  @isStickyPost
end

Instance Method Details

#getCategoryId ⇒ Object

  • Get the category id of the project.

Returns

  • project category id.


249
250
251
# File 'lib/projects/model/Forum.rb', line 249

def getCategoryId
  return @categoryId
end

#getContent ⇒ Object

  • Get the content of the forum.

Returns

  • Content of the forum.


69
70
71
# File 'lib/projects/model/Forum.rb', line 69

def getContent
  return @content
end

#getId ⇒ Object

  • Get the forum id.

Returns

  • Forum id.


29
30
31
# File 'lib/projects/model/Forum.rb', line 29

def getId
  return @id
end

#getName ⇒ Object

  • Get the forum name.

Returns

  • Forum name.


49
50
51
# File 'lib/projects/model/Forum.rb', line 49

def getName
  return @name
end

#getNotify ⇒ Object

  • Get the notify of the forum.

Returns

  • notify of the forum.


269
270
271
# File 'lib/projects/model/Forum.rb', line 269

def getNotify
  return @notify
end

#getPostDate ⇒ Object

  • Get the post date of the forum.

Returns

  • Post date in the forum.


169
170
171
# File 'lib/projects/model/Forum.rb', line 169

def getPostDate
  return @postDate
end

#getPostDateFormat ⇒ Object

  • Get the date format of the post in the forum.

Returns

  • Date format of the post in the forum.


189
190
191
# File 'lib/projects/model/Forum.rb', line 189

def getPostDateFormat
  return @postDateFormat
end

#getPostDateLong ⇒ Object

  • Get the date of the post in forum.

Returns

  • Date of the post in the forum.


209
210
211
# File 'lib/projects/model/Forum.rb', line 209

def getPostDateLong
  return @postDateLong
end

#getPostedBy ⇒ Object

  • Get the id of the posted User.

Returns

  • User id.


129
130
131
# File 'lib/projects/model/Forum.rb', line 129

def getPostedBy
  return @postedBy
end

#getPostedPerson ⇒ Object

  • Get the posted User name.

Returns

  • posted User name.


149
150
151
# File 'lib/projects/model/Forum.rb', line 149

def getPostedPerson
  return @postedPerson
end

#getUploadfile ⇒ Object

  • Get the uploaded file list.

Returns

  • ArrayList of uploaded file for the post in the forum.


289
290
291
# File 'lib/projects/model/Forum.rb', line 289

def getUploadfile
  return @uploadfile
end

#getURL ⇒ Object

  • Get the forum URL.

Returns

  • Forum URL.


229
230
231
# File 'lib/projects/model/Forum.rb', line 229

def getURL
  return @url
end

#setCategoryId(categoryId) ⇒ Object

  • Set the category id of the project.

Parameters

* categoryId
  • ID of the project category.


239
240
241
# File 'lib/projects/model/Forum.rb', line 239

def setCategoryId(categoryId)
  @categoryId = categoryId
end

#setContent(content) ⇒ Object

  • Set the content of the forum.

Parameters

* content
  • Content of the forum.


59
60
61
# File 'lib/projects/model/Forum.rb', line 59

def setContent(content)
  @content = content
end

#setId(id) ⇒ Object

  • Set the forum id.

Parameters

* id
  • ID of the forum.


19
20
21
# File 'lib/projects/model/Forum.rb', line 19

def setId(id)
  @id = id
end

#setIsAnnouncementPost(isAnnouncementPost) ⇒ Object

  • Set is announcement post or not.

Parameters

* isAnnouncementPost
  • is the post announcement or not.


99
100
101
# File 'lib/projects/model/Forum.rb', line 99

def setIsAnnouncementPost(isAnnouncementPost)
  @isAnnouncementPost = isAnnouncementPost
end

#setIsStickyPost(isStickyPost) ⇒ Object

  • Set the forum is a sticky post or not.

Parameters

* isStickyPost
  • Is the forum in a sticky post or not.


79
80
81
# File 'lib/projects/model/Forum.rb', line 79

def setIsStickyPost(isStickyPost)
  @isStickyPost = isStickyPost
end

#setName(name) ⇒ Object

  • Set the forum name.

Parameters

* name
  • Name of the forum.


39
40
41
# File 'lib/projects/model/Forum.rb', line 39

def setName(name)
  @name = name
end

#setNotify(notify) ⇒ Object

  • Set the notify in the forum.

Parameters

* notify
  • Notify in the forum.


259
260
261
# File 'lib/projects/model/Forum.rb', line 259

def setNotify(notify)
  @notify = notify
end

#setPostDate(postDate) ⇒ Object

  • Set the post date of the forum.

Parameters

* postDate
  • Date of the post in the forum.


159
160
161
# File 'lib/projects/model/Forum.rb', line 159

def setPostDate()
  @postDate = 
end

#setPostDateFormat(postDateFormat) ⇒ Object

  • Set the date format of the post in the forum.

Parameters

* postDate
  • Date format of the post in the forum.


179
180
181
# File 'lib/projects/model/Forum.rb', line 179

def setPostDateFormat()
  @postDateFormat = 
end

#setPostDateLong(postDateLong) ⇒ Object

  • Set the date of the post the forum.

Parameters

* postDateLong
  • Date of the post in the forum.


199
200
201
# File 'lib/projects/model/Forum.rb', line 199

def setPostDateLong()
  @postDateLong = 
end

#setPostedBy(postedBy) ⇒ Object

  • Set the id of the posted User.

Parameters

* postedBy
  • Id of the User who posted the post.


119
120
121
# File 'lib/projects/model/Forum.rb', line 119

def setPostedBy(postedBy)
  @postedBy = postedBy
end

#setPostedPerson(postedPerson) ⇒ Object

  • Set the posted User name.

Parameters

* postedPerson
  • Posted User name.


139
140
141
# File 'lib/projects/model/Forum.rb', line 139

def setPostedPerson(postedPerson)
  @postedPerson = postedPerson
end

#setUploadfile(uploadfile) ⇒ Object

  • Set the upload file list.

Parameters

* uploadfile
  • ArrayList of Uploading file in the forum.


279
280
281
# File 'lib/projects/model/Forum.rb', line 279

def setUploadfile(uploadfile)
  @uploadfile = uploadfile
end

#setURL(url) ⇒ Object

  • Set the forum URL.

Parameters

* url
  • URL for the forum.


219
220
221
# File 'lib/projects/model/Forum.rb', line 219

def setURL(url)
  @url = url
end

#toParamMAP ⇒ Object

  • Convert the Forum object into HashMap.

Returns

  • HashMap object.


299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/projects/model/Forum.rb', line 299

def toParamMAP
  requestBody = Hash.new
  
  if name != nil
    requestBody["name"] = name
  end
  if content != nil
    requestBody["content"] = content
  end
  if categoryId != nil && categoryId.to_i > 0
    requestBody["category_id"] = categoryId
  end
  if notify != nil
    requestBody["notify"] = notify
  end
  
  
  return requestBody
end