Class: Projects::Model::Task
- Inherits:
-
Object
- Object
- Projects::Model::Task
- Defined in:
- lib/projects/model/Task.rb
Overview
-
This class is used to make an object for Task.
Instance Method Summary collapse
-
#getAssociateDocumentIds ⇒ Object
-
Get the associated document IDs of the task.
-
-
#getAssociateForumIds ⇒ Object
-
Get the associated forum IDs of the task.
-
-
#getComments ⇒ Object
-
Get the comments of the task.
-
-
#getCreatedBy ⇒ Object
-
Get the id of the user who created the task.
-
-
#getCreatedPerson ⇒ Object
-
Get the name of the person who created the task.
-
-
#getDuration ⇒ Object
-
Get the task duration.
-
-
#getEndDate ⇒ Object
-
Get the task end date.
-
-
#getEndDateFormat ⇒ Object
-
Get the task end date format.
-
-
#getEndDateLong ⇒ Object
-
Get the end date long.
-
-
#getId ⇒ Object
-
Get the task id.
-
-
#getName ⇒ Object
-
Get the task name.
-
-
#getOwners ⇒ Object
-
Get the owner of the task.
-
-
#getPercentComplete ⇒ Object
-
Get the task completed percent.
-
-
#getPriority ⇒ Object
-
Get the priority of the task.
-
-
#getStartDate ⇒ Object
-
Get the task start date.
-
-
#getStartDateFormat ⇒ Object
-
Get the task start date format.
-
-
#getStartDateLong ⇒ Object
-
Get the start date long.
-
-
#getSubtasks ⇒ Object
-
Get the subtasks of the task.
-
- #getSubtaskUrl ⇒ Object
-
#getTasklist ⇒ Object
-
Get the tasklist of the task.
-
-
#getTimesheetURL ⇒ Object
-
Get the time sheet URL.
-
-
#getURL ⇒ Object
-
Get the task URL.
-
-
#isCompleted ⇒ Object
-
Get whether the task is completed or not.
-
-
#setAssociateDocumentIds(associateDocumentIds) ⇒ Object
-
Set the associated document IDs of the task.
-
-
#setAssociateForumIds(associateForumIds) ⇒ Object
-
Set the associated forum IDs.
-
-
#setComments(comments) ⇒ Object
-
Set the comments of the task.
-
-
#setCompleted(completed) ⇒ Object
-
Set whether the task is completed or not.
-
-
#setCreatedBy(createdBy) ⇒ Object
-
Set the id of the person who created the task.
-
-
#setCreatedPerson(createdPerson) ⇒ Object
-
Set the task created person name.
-
-
#setDuration(duration) ⇒ Object
-
Set the task duration.
-
-
#setEndDate(endDate) ⇒ Object
-
Set the task end date.
-
-
#setEndDateFormat(endDateFormat) ⇒ Object
-
Set the task end date format.
-
-
#setEndDateLong(endDateLong) ⇒ Object
-
Set the end date long.
-
-
#setId(id) ⇒ Object
-
Set the task id.
-
-
#setName(name) ⇒ Object
-
Set the task name.
-
-
#setOwners(owners) ⇒ Object
-
Set the owners of the task.
-
-
#setPercentComplete(percentComplete) ⇒ Object
-
Set the task completed percent.
-
-
#setPriority(priority) ⇒ Object
-
Set the priority of the task.
-
-
#setStartDate(startDate) ⇒ Object
-
Set the task start date.
-
-
#setStartDateFormat(startDateFormat) ⇒ Object
-
Set the task start date format.
-
-
#setStartDateLong(startDateLong) ⇒ Object
-
Set the start date long.
-
-
#setSubtasks(tasks) ⇒ Object
-
Set the subtasks of the task.
-
- #setSubtaskUrl(subtaskUrl) ⇒ Object
-
#setTasklist(tasklist) ⇒ Object
-
Set the tasklist of the task.
-
-
#setTimesheetURL(timesheetUrl) ⇒ Object
-
Set the time sheet URL.
-
-
#setURL(url) ⇒ Object
-
Set the task URL.
-
-
#toParamMAP ⇒ Object
-
Convert the Task object into HashMap.
-
Instance Method Details
#getAssociateDocumentIds ⇒ Object
-
Get the associated document IDs of the task.
Returns
-
Array of document IDs.
416 417 418 |
# File 'lib/projects/model/Task.rb', line 416 def getAssociateDocumentIds return @associateDocumentIds end |
#getAssociateForumIds ⇒ Object
-
Get the associated forum IDs of the task.
Returns
-
Array of forum IDs.
436 437 438 |
# File 'lib/projects/model/Task.rb', line 436 def getAssociateForumIds return @associateForumIds end |
#getComments ⇒ Object
-
Get the comments of the task.
Returns
-
List of Comment object.
396 397 398 |
# File 'lib/projects/model/Task.rb', line 396 def getComments return @comments end |
#getCreatedBy ⇒ Object
-
Get the id of the user who created the task.
Returns
-
Id of the person who created the task.
89 90 91 |
# File 'lib/projects/model/Task.rb', line 89 def getCreatedBy return @createdBy end |
#getCreatedPerson ⇒ Object
-
Get the name of the person who created the task.
Returns
-
Task created person name.
109 110 111 |
# File 'lib/projects/model/Task.rb', line 109 def getCreatedPerson return @createdPerson end |
#getDuration ⇒ Object
-
Get the task duration.
Returns
-
Task duration.
289 290 291 |
# File 'lib/projects/model/Task.rb', line 289 def getDuration return @duration end |
#getEndDate ⇒ Object
-
Get the task end date.
Returns
-
task end date.
229 230 231 |
# File 'lib/projects/model/Task.rb', line 229 def getEndDate return @endDate end |
#getEndDateFormat ⇒ Object
-
Get the task end date format.
Returns
-
Task end date format.
249 250 251 |
# File 'lib/projects/model/Task.rb', line 249 def getEndDateFormat return @endDateFormat end |
#getEndDateLong ⇒ Object
-
Get the end date long.
Returns
-
Task end date long.
269 270 271 |
# File 'lib/projects/model/Task.rb', line 269 def getEndDateLong return @endDateLong end |
#getId ⇒ Object
-
Get the task id.
Returns
-
Task id.
29 30 31 |
# File 'lib/projects/model/Task.rb', line 29 def getId return @id end |
#getName ⇒ Object
-
Get the task name.
Returns
-
Task name.
49 50 51 |
# File 'lib/projects/model/Task.rb', line 49 def getName return @name end |
#getOwners ⇒ Object
-
Get the owner of the task.
Returns
-
List of Owner object.
376 377 378 |
# File 'lib/projects/model/Task.rb', line 376 def getOwners return @owners end |
#getPercentComplete ⇒ Object
-
Get the task completed percent.
Returns
-
Task complete percent.
149 150 151 |
# File 'lib/projects/model/Task.rb', line 149 def getPercentComplete return @percentComplete end |
#getPriority ⇒ Object
-
Get the priority of the task.
Returns
-
Task priority.
129 130 131 |
# File 'lib/projects/model/Task.rb', line 129 def getPriority return @priority end |
#getStartDate ⇒ Object
-
Get the task start date.
Returns
-
Task start date.
169 170 171 |
# File 'lib/projects/model/Task.rb', line 169 def getStartDate return startDate end |
#getStartDateFormat ⇒ Object
-
Get the task start date format.
Returns
-
Task start date format.
189 190 191 |
# File 'lib/projects/model/Task.rb', line 189 def getStartDateFormat return @startDateFormat end |
#getStartDateLong ⇒ Object
-
Get the start date long.
Returns
-
Task start date long.
209 210 211 |
# File 'lib/projects/model/Task.rb', line 209 def getStartDateLong return @startDateLong end |
#getSubtasks ⇒ Object
-
Get the subtasks of the task.
Returns
-
Returns true if the task has subtasks else returns false.
456 457 458 |
# File 'lib/projects/model/Task.rb', line 456 def getSubtasks return @tasks end |
#getSubtaskUrl ⇒ Object
333 334 335 336 337 |
# File 'lib/projects/model/Task.rb', line 333 def getSubtaskUrl return @subtaskUrl end |
#getTasklist ⇒ Object
-
Get the tasklist of the task.
Returns
-
Tasklist object.
476 477 478 |
# File 'lib/projects/model/Task.rb', line 476 def getTasklist return @tasklist end |
#getTimesheetURL ⇒ Object
-
Get the time sheet URL.
Returns
-
Time sheet URL.
356 357 358 |
# File 'lib/projects/model/Task.rb', line 356 def getTimesheetURL return @timesheetUrl end |
#getURL ⇒ Object
-
Get the task URL.
Returns
-
Task URL.
309 310 311 |
# File 'lib/projects/model/Task.rb', line 309 def getURL return @url end |
#isCompleted ⇒ Object
-
Get whether the task is completed or not.
Returns
-
true, if the task is completed else false.
69 70 71 |
# File 'lib/projects/model/Task.rb', line 69 def isCompleted return @completed end |
#setAssociateDocumentIds(associateDocumentIds) ⇒ Object
-
Set the associated document IDs of the task.
Parameters
- associateDocumentIds
-
Document IDs of the task.
-
406 407 408 |
# File 'lib/projects/model/Task.rb', line 406 def setAssociateDocumentIds(associateDocumentIds) @associateDocumentIds = associateDocumentIds end |
#setAssociateForumIds(associateForumIds) ⇒ Object
-
Set the associated forum IDs.
Parameters
- associateForumIds
-
Forum IDs of the task.
-
426 427 428 |
# File 'lib/projects/model/Task.rb', line 426 def setAssociateForumIds(associateForumIds) @associateForumIds = associateForumIds end |
#setComments(comments) ⇒ Object
-
Set the comments of the task.
Parameters
- comments
-
List of Comment object.
-
386 387 388 |
# File 'lib/projects/model/Task.rb', line 386 def setComments(comments) @comments = comments end |
#setCompleted(completed) ⇒ Object
-
Set whether the task is completed or not.
Parameters
- completed
-
Is task is completed or not.
-
59 60 61 |
# File 'lib/projects/model/Task.rb', line 59 def setCompleted(completed) @completed = completed end |
#setCreatedBy(createdBy) ⇒ Object
-
Set the id of the person who created the task.
Parameters
- createdBy
-
Id of the user who created the task.
-
79 80 81 |
# File 'lib/projects/model/Task.rb', line 79 def setCreatedBy(createdBy) @createdBy = createdBy end |
#setCreatedPerson(createdPerson) ⇒ Object
-
Set the task created person name.
Parameters
- createdPerson
-
Name of the person who created the task.
-
99 100 101 |
# File 'lib/projects/model/Task.rb', line 99 def setCreatedPerson(createdPerson) @createdPerson = createdPerson end |
#setDuration(duration) ⇒ Object
-
Set the task duration.
Parameters
- duration
-
Duration of the task.
-
279 280 281 |
# File 'lib/projects/model/Task.rb', line 279 def setDuration(duration) @duration = duration end |
#setEndDate(endDate) ⇒ Object
-
Set the task end date.
Parameters
- endDate
-
End date of the task.
-
219 220 221 |
# File 'lib/projects/model/Task.rb', line 219 def setEndDate(endDate) @endDate = endDate end |
#setEndDateFormat(endDateFormat) ⇒ Object
-
Set the task end date format.
Parameters
- endDate
-
End date format of the task.
-
239 240 241 |
# File 'lib/projects/model/Task.rb', line 239 def setEndDateFormat(endDateFormat) @endDateFormat = endDateFormat end |
#setEndDateLong(endDateLong) ⇒ Object
-
Set the end date long.
Parameters
- endDateLong
-
End date for the task.
-
259 260 261 |
# File 'lib/projects/model/Task.rb', line 259 def setEndDateLong(endDateLong) @endDateLong = endDateLong end |
#setId(id) ⇒ Object
-
Set the task id.
Parameters
- id
-
ID of the task.
-
19 20 21 |
# File 'lib/projects/model/Task.rb', line 19 def setId(id) @id = id end |
#setName(name) ⇒ Object
-
Set the task name.
Parameters
- name
-
Name of the task.
-
39 40 41 |
# File 'lib/projects/model/Task.rb', line 39 def setName(name) @name = name end |
#setOwners(owners) ⇒ Object
-
Set the owners of the task.
Parameters
- owners
-
List of Owner object.
-
366 367 368 |
# File 'lib/projects/model/Task.rb', line 366 def setOwners(owners) @owners = owners end |
#setPercentComplete(percentComplete) ⇒ Object
-
Set the task completed percent.
Parameters
- percentComplete
-
Task completed percent.
-
139 140 141 |
# File 'lib/projects/model/Task.rb', line 139 def setPercentComplete(percentComplete) @percentComplete = percentComplete end |
#setPriority(priority) ⇒ Object
-
Set the priority of the task.
Parameters
- priority
-
Priority of the task.
-
119 120 121 |
# File 'lib/projects/model/Task.rb', line 119 def setPriority(priority) @priority = priority end |
#setStartDate(startDate) ⇒ Object
-
Set the task start date.
Parameters
- startDate
-
Start date of the task.
-
159 160 161 |
# File 'lib/projects/model/Task.rb', line 159 def setStartDate(startDate) @startDate = startDate end |
#setStartDateFormat(startDateFormat) ⇒ Object
-
Set the task start date format.
Parameters
- startDate
-
Start date format of the task.
-
179 180 181 |
# File 'lib/projects/model/Task.rb', line 179 def setStartDateFormat(startDateFormat) @startDateFormat = startDateFormat end |
#setStartDateLong(startDateLong) ⇒ Object
-
Set the start date long.
Parameters
- startDateLong
-
Start date long for the task.
-
199 200 201 |
# File 'lib/projects/model/Task.rb', line 199 def setStartDateLong(startDateLong) @startDateLong = startDateLong end |
#setSubtasks(tasks) ⇒ Object
-
Set the subtasks of the task.
Parameters
- tasks
-
True or false.
-
446 447 448 |
# File 'lib/projects/model/Task.rb', line 446 def setSubtasks(tasks) @tasks = tasks end |
#setSubtaskUrl(subtaskUrl) ⇒ Object
320 321 322 323 324 |
# File 'lib/projects/model/Task.rb', line 320 def setSubtaskUrl(subtaskUrl) @subtaskUrl = subtaskUrl end |
#setTasklist(tasklist) ⇒ Object
-
Set the tasklist of the task.
Parameters
- tasklist
-
Tasklist object.
-
466 467 468 |
# File 'lib/projects/model/Task.rb', line 466 def setTasklist(tasklist) @tasklist = tasklist end |
#setTimesheetURL(timesheetUrl) ⇒ Object
-
Set the time sheet URL.
Parameters
- timesheetUrl
-
URL for the time sheet.
-
346 347 348 |
# File 'lib/projects/model/Task.rb', line 346 def setTimesheetURL(timesheetUrl) @timesheetUrl = timesheetUrl end |
#setURL(url) ⇒ Object
-
Set the task URL.
Parameters
- url
-
URL for the task.
-
299 300 301 |
# File 'lib/projects/model/Task.rb', line 299 def setURL(url) @url = url end |
#toParamMAP ⇒ Object
-
Convert the Task object into HashMap.
Returns
-
HashMap object.
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/projects/model/Task.rb', line 486 def toParamMAP() requestBody = Hash.new if owners != nil personResponsible = ""; owners.each do|owner| personResponsible += String(owner.getId)+"," end requestBody["person_responsible"] = personResponsible end if name != nil requestBody["name"] = name end if tasklist != nil requestBody["tasklist_id"] = tasklist.getId end if startDate != nil requestBody["start_date"] = startDate end if endDate != nil requestBody["end_date"] = endDate end if duration != nil requestBody["duration"] = duration end if priority != nil requestBody["priority"] = priority end return requestBody end |