class Projects::Model::Task

Attributes

id[RW]
idString[RW]

Public Instance Methods

getAssociateDocumentIds() click to toggle source
  • Get the associated document IDs of the task.

Returns

  • Array of document IDs.

# File lib/projects/model/Task.rb, line 440
def getAssociateDocumentIds
        return @associateDocumentIds
end
getAssociateForumIds() click to toggle source
  • Get the associated forum IDs of the task.

Returns

  • Array of forum IDs.

# File lib/projects/model/Task.rb, line 460
def getAssociateForumIds
        return @associateForumIds
end
getComments() click to toggle source
  • Get the comments of the task.

Returns

# File lib/projects/model/Task.rb, line 420
def getComments
        return @comments
end
getCreatedBy() click to toggle source
  • Get the id of the user who created the task.

Returns

  • Id of the person who created the task.

# File lib/projects/model/Task.rb, line 113
def getCreatedBy
        return @createdBy
end
getCreatedPerson() click to toggle source
  • Get the name of the person who created the task.

Returns

  • Task created person name.

# File lib/projects/model/Task.rb, line 133
def getCreatedPerson
        return @createdPerson
end
getDuration() click to toggle source
  • Get the task duration.

Returns

# File lib/projects/model/Task.rb, line 313
def getDuration
        return @duration
end
getEndDate() click to toggle source
  • Get the task end date.

Returns

  • task end date.

# File lib/projects/model/Task.rb, line 253
def getEndDate
        return @endDate
end
getEndDateFormat() click to toggle source
  • Get the task end date format.

Returns

  • Task end date format.

# File lib/projects/model/Task.rb, line 273
def getEndDateFormat
        return @endDateFormat
end
getEndDateLong() click to toggle source
  • Get the end date long.

Returns

  • Task end date long.

# File lib/projects/model/Task.rb, line 293
def getEndDateLong
        return @endDateLong
end
getId() click to toggle source
  • Get the task id.

Returns

# File lib/projects/model/Task.rb, line 29
def getId
        return @id
end
getIdString() click to toggle source
  • Get the task id string.

Returns

  • Returns the task id string.

# File lib/projects/model/Task.rb, line 51
def getIdString

        return @idString
        
end
getName() click to toggle source
  • Get the task name.

Returns

# File lib/projects/model/Task.rb, line 73
def getName
        return @name
end
getOwners() click to toggle source
  • Get the owner of the task.

Returns

# File lib/projects/model/Task.rb, line 400
def getOwners
        return @owners
end
getPercentComplete() click to toggle source
  • Get the task completed percent.

Returns

  • Task complete percent.

# File lib/projects/model/Task.rb, line 173
def getPercentComplete
        return @percentComplete
end
getPriority() click to toggle source
  • Get the priority of the task.

Returns

# File lib/projects/model/Task.rb, line 153
def getPriority
        return @priority
end
getStartDate() click to toggle source
  • Get the task start date.

Returns

# File lib/projects/model/Task.rb, line 193
def getStartDate
        return startDate
end
getStartDateFormat() click to toggle source
  • Get the task start date format.

Returns

  • Task start date format.

# File lib/projects/model/Task.rb, line 213
def getStartDateFormat
        return @startDateFormat
end
getStartDateLong() click to toggle source
  • Get the start date long.

Returns

  • Task start date long.

# File lib/projects/model/Task.rb, line 233
def getStartDateLong
        return @startDateLong
end
getSubtaskUrl() click to toggle source
  • Get the subtask URL.

Returns

  • Returns the subtask URL.

# File lib/projects/model/Task.rb, line 357
def getSubtaskUrl

        return @subtaskUrl

end
getSubtasks() click to toggle source
  • Get the subtasks of the task.

Returns

  • Returns true if the task has subtasks else returns false.

# File lib/projects/model/Task.rb, line 480
def getSubtasks
        return @tasks
end
getTasklist() click to toggle source
  • Get the tasklist of the task.

Returns

# File lib/projects/model/Task.rb, line 500
def getTasklist
        return @tasklist
end
getTimesheetURL() click to toggle source
  • Get the time sheet URL.

Returns

  • Time sheet URL.

# File lib/projects/model/Task.rb, line 380
def getTimesheetURL
        return @timesheetUrl
end
getURL() click to toggle source
  • Get the task URL.

Returns

# File lib/projects/model/Task.rb, line 333
def getURL
        return @url
end
isCompleted() click to toggle source
  • Get whether the task is completed or not.

Returns

  • true, if the task is completed else false.

# File lib/projects/model/Task.rb, line 93
def isCompleted
        return @completed
end
setAssociateDocumentIds(associateDocumentIds) click to toggle source
  • Set the associated document IDs of the task.

Parameters

  • associateDocumentIds
# File lib/projects/model/Task.rb, line 430
def setAssociateDocumentIds(associateDocumentIds)
        @associateDocumentIds = associateDocumentIds
end
setAssociateForumIds(associateForumIds) click to toggle source
  • Set the associated forum IDs.

Parameters

  • associateForumIds
# File lib/projects/model/Task.rb, line 450
def setAssociateForumIds(associateForumIds)
        @associateForumIds = associateForumIds
end
setComments(comments) click to toggle source
  • Set the comments of the task.

Parameters

# File lib/projects/model/Task.rb, line 410
def setComments(comments)
        @comments = comments
end
setCompleted(completed) click to toggle source
  • Set whether the task is completed or not.

Parameters

  • completed
    • Is task is completed or not.

# File lib/projects/model/Task.rb, line 83
def setCompleted(completed)
        @completed = completed
end
setCreatedBy(createdBy) click to toggle source
  • Set the id of the person who created the task.

Parameters

  • createdBy
    • Id of the user who created the task.

# File lib/projects/model/Task.rb, line 103
def setCreatedBy(createdBy)
        @createdBy = createdBy
end
setCreatedPerson(createdPerson) click to toggle source
  • Set the task created person name.

Parameters

  • createdPerson
    • Name of the person who created the task.

# File lib/projects/model/Task.rb, line 123
def setCreatedPerson(createdPerson)
        @createdPerson = createdPerson
end
setDuration(duration) click to toggle source
  • Set the task duration.

Parameters

  • duration
    • Duration of the task.

# File lib/projects/model/Task.rb, line 303
def setDuration(duration)
        @duration = duration
end
setEndDate(endDate) click to toggle source
  • Set the task end date.

Parameters

  • endDate
    • End date of the task.

# File lib/projects/model/Task.rb, line 243
def setEndDate(endDate)
        @endDate = endDate
end
setEndDateFormat(endDateFormat) click to toggle source
  • Set the task end date format.

Parameters

  • endDate
    • End date format of the task.

# File lib/projects/model/Task.rb, line 263
def setEndDateFormat(endDateFormat)
        @endDateFormat = endDateFormat
end
setEndDateLong(endDateLong) click to toggle source
  • Set the end date long.

Parameters

  • endDateLong
    • End date for the task.

# File lib/projects/model/Task.rb, line 283
def setEndDateLong(endDateLong)
        @endDateLong = endDateLong
end
setId(id) click to toggle source
  • Set the task id.

Parameters

  • id
    • ID of the task.

# File lib/projects/model/Task.rb, line 19
def setId(id)
        @id = id
end
setIdString(idString) click to toggle source
  • Set the task id string.

Parameters

  • idString
# File lib/projects/model/Task.rb, line 39
def setIdString(idString)

        @idString = idString
        
end
setName(name) click to toggle source
  • Set the task name.

Parameters

  • name
    • Name of the task.

# File lib/projects/model/Task.rb, line 63
def setName(name)
        @name = name
end
setOwners(owners) click to toggle source
  • Set the owners of the task.

Parameters

  • owners
# File lib/projects/model/Task.rb, line 390
def setOwners(owners)
        @owners = owners
end
setPercentComplete(percentComplete) click to toggle source
  • Set the task completed percent.

Parameters

  • percentComplete
    • Task completed percent.

# File lib/projects/model/Task.rb, line 163
def setPercentComplete(percentComplete)
        @percentComplete = percentComplete
end
setPriority(priority) click to toggle source
  • Set the priority of the task.

Parameters

  • priority
    • Priority of the task.

# File lib/projects/model/Task.rb, line 143
def setPriority(priority)
        @priority = priority
end
setStartDate(startDate) click to toggle source
  • Set the task start date.

Parameters

  • startDate
    • Start date of the task.

# File lib/projects/model/Task.rb, line 183
def setStartDate(startDate)
        @startDate = startDate
end
setStartDateFormat(startDateFormat) click to toggle source
  • Set the task start date format.

Parameters

  • startDate
    • Start date format of the task.

# File lib/projects/model/Task.rb, line 203
def setStartDateFormat(startDateFormat)
        @startDateFormat = startDateFormat
end
setStartDateLong(startDateLong) click to toggle source
  • Set the start date long.

Parameters

  • startDateLong
    • Start date long for the task.

# File lib/projects/model/Task.rb, line 223
def setStartDateLong(startDateLong)
        @startDateLong = startDateLong
end
setSubtaskUrl(subtaskUrl) click to toggle source
  • Set the subtask URL.

Parameters

  • subtaskUrl
    • URL for the subtask.

# File lib/projects/model/Task.rb, line 344
def setSubtaskUrl(subtaskUrl)

        @subtaskUrl = subtaskUrl
        
end
setSubtasks(tasks) click to toggle source
  • Set the subtasks of the task.

Parameters

  • tasks
    • True or false.

# File lib/projects/model/Task.rb, line 470
def setSubtasks(tasks)
        @tasks = tasks
end
setTasklist(tasklist) click to toggle source
  • Set the tasklist of the task.

Parameters

# File lib/projects/model/Task.rb, line 490
def setTasklist(tasklist)
        @tasklist = tasklist
end
setTimesheetURL(timesheetUrl) click to toggle source
  • Set the time sheet URL.

Parameters

  • timesheetUrl
    • URL for the time sheet.

# File lib/projects/model/Task.rb, line 370
def setTimesheetURL(timesheetUrl)
        @timesheetUrl = timesheetUrl
end
setURL(url) click to toggle source
  • Set the task URL.

Parameters

  • url
    • URL for the task.

# File lib/projects/model/Task.rb, line 323
def setURL(url)
        @url = url
end
toParamMAP() click to toggle source
  • Convert the Task object into HashMap.

Returns

  • HashMap object.

# File lib/projects/model/Task.rb, line 510
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