zohoProjects 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +17 -0
- data/LICENSE.txt +22 -0
- data/README.md +145 -0
- data/Rakefile +2 -0
- data/lib/projects/api/API.rb +57 -0
- data/lib/projects/api/BugsAPI.rb +135 -0
- data/lib/projects/api/DocumentsAPI.rb +145 -0
- data/lib/projects/api/EventsAPI.rb +115 -0
- data/lib/projects/api/FoldersAPI.rb +111 -0
- data/lib/projects/api/ForumsAPI.rb +198 -0
- data/lib/projects/api/MilestonesAPI.rb +159 -0
- data/lib/projects/api/PortalAPI.rb +41 -0
- data/lib/projects/api/ProjectsAPI.rb +203 -0
- data/lib/projects/api/TasklistsAPI.rb +113 -0
- data/lib/projects/api/TasksAPI.rb +153 -0
- data/lib/projects/api/TimesheetsAPI.rb +240 -0
- data/lib/projects/api/UsersAPI.rb +48 -0
- data/lib/projects/exception/ProjectsException.rb +50 -0
- data/lib/projects/model/Activity.rb +173 -0
- data/lib/projects/model/Bug.rb +701 -0
- data/lib/projects/model/Buglog.rb +56 -0
- data/lib/projects/model/Category.rb +70 -0
- data/lib/projects/model/Comment.rb +289 -0
- data/lib/projects/model/Document.rb +260 -0
- data/lib/projects/model/Event.rb +391 -0
- data/lib/projects/model/Folder.rb +110 -0
- data/lib/projects/model/Forum.rb +320 -0
- data/lib/projects/model/Generallog.rb +36 -0
- data/lib/projects/model/Log.rb +359 -0
- data/lib/projects/model/Milestone.rb +322 -0
- data/lib/projects/model/Owner.rb +54 -0
- data/lib/projects/model/Participant.rb +54 -0
- data/lib/projects/model/Portal.rb +273 -0
- data/lib/projects/model/Project.rb +593 -0
- data/lib/projects/model/Status.rb +168 -0
- data/lib/projects/model/Task.rb +497 -0
- data/lib/projects/model/Tasklist.rb +300 -0
- data/lib/projects/model/Tasklog.rb +56 -0
- data/lib/projects/model/Timelog.rb +134 -0
- data/lib/projects/model/TimelogList.rb +54 -0
- data/lib/projects/model/User.rb +94 -0
- data/lib/projects/model/Version.rb +194 -0
- data/lib/projects/parser/BugParser.rb +208 -0
- data/lib/projects/parser/DocumentParser.rb +197 -0
- data/lib/projects/parser/EventParser.rb +156 -0
- data/lib/projects/parser/FolderParser.rb +99 -0
- data/lib/projects/parser/ForumParser.rb +253 -0
- data/lib/projects/parser/MilestonesParser.rb +129 -0
- data/lib/projects/parser/PortalParser.rb +103 -0
- data/lib/projects/parser/ProjectParser.rb +318 -0
- data/lib/projects/parser/TaskParser.rb +293 -0
- data/lib/projects/parser/TasklistParser.rb +127 -0
- data/lib/projects/parser/TimesheetParser.rb +390 -0
- data/lib/projects/parser/UserParser.rb +63 -0
- data/lib/projects/service/ZohoProject.rb +174 -0
- data/lib/projects/util/ZohoHTTPClient.rb +205 -0
- data/lib/test/ProjectsTest.rb +321 -0
- data/lib/zohoProjects.rb +35 -0
- data/lib/zohoProjects/version.rb +3 -0
- data/zohoProjects.gemspec +86 -0
- metadata +135 -0
@@ -0,0 +1,593 @@
|
|
1
|
+
# $Id$
|
2
|
+
module Projects
|
3
|
+
module Model
|
4
|
+
# * This class is used to make an object for Project.
|
5
|
+
|
6
|
+
class Project
|
7
|
+
private
|
8
|
+
attr_accessor :id, :name, :status, :createdDate, :createdDateFormat, :createdDateLong, :description, :ownerName, :ownerId, :openTaskCount, :closedTaskCount, :openMilestoneCount, :closedMilestoneCount, :openBugCount, :closedBugCount, :URL, :activityURL, :milestoneURL, :tasklistURL, :taskURL, :bugURL, :timesheetURL, :statusURL, :eventURL, :documentURL, :folderURL, :forumURL, :userURL
|
9
|
+
|
10
|
+
public
|
11
|
+
|
12
|
+
# * Set the project id.
|
13
|
+
#
|
14
|
+
# ==== Parameters
|
15
|
+
#
|
16
|
+
# * id:: - ID of the project.
|
17
|
+
|
18
|
+
def getId
|
19
|
+
return @id
|
20
|
+
end
|
21
|
+
|
22
|
+
# * Get the project id.
|
23
|
+
#
|
24
|
+
# ==== Returns
|
25
|
+
#
|
26
|
+
# * Project id.
|
27
|
+
|
28
|
+
def setId(id)
|
29
|
+
@id = id
|
30
|
+
end
|
31
|
+
|
32
|
+
# * Set the project name.
|
33
|
+
#
|
34
|
+
# ==== Parameters
|
35
|
+
#
|
36
|
+
# * name:: - Name of the project.
|
37
|
+
|
38
|
+
def setName(name)
|
39
|
+
@name = name
|
40
|
+
end
|
41
|
+
|
42
|
+
# * Get the project name.
|
43
|
+
#
|
44
|
+
# ==== Returns
|
45
|
+
#
|
46
|
+
# * Project name.
|
47
|
+
|
48
|
+
def getName
|
49
|
+
return @name
|
50
|
+
end
|
51
|
+
|
52
|
+
# * Set the status of the project.
|
53
|
+
#
|
54
|
+
# ==== Parameters
|
55
|
+
#
|
56
|
+
# * status:: - Status of the project.
|
57
|
+
|
58
|
+
def setStatus(status)
|
59
|
+
@status = status
|
60
|
+
end
|
61
|
+
|
62
|
+
# * Get the project status.
|
63
|
+
#
|
64
|
+
# ==== Returns
|
65
|
+
#
|
66
|
+
# * Project status.
|
67
|
+
|
68
|
+
def getStatus
|
69
|
+
return @status
|
70
|
+
end
|
71
|
+
|
72
|
+
# * Set the date when the project is being created.
|
73
|
+
#
|
74
|
+
# ==== Parameters
|
75
|
+
#
|
76
|
+
# * createdDate:: - Created date for the project.
|
77
|
+
|
78
|
+
def setCreatedDate(createdDate)
|
79
|
+
@createdDate = createdDate
|
80
|
+
end
|
81
|
+
|
82
|
+
# * Get the project created date.
|
83
|
+
#
|
84
|
+
# ==== Returns
|
85
|
+
#
|
86
|
+
# * Project created date.
|
87
|
+
|
88
|
+
def getCreatedDate
|
89
|
+
return @createdDate
|
90
|
+
end
|
91
|
+
|
92
|
+
# * Set the created date format for the project.
|
93
|
+
#
|
94
|
+
# ==== Parameters
|
95
|
+
#
|
96
|
+
# * createdDate:: - Project created date format.
|
97
|
+
|
98
|
+
def setCreatedDateFormat(createdDateFormat)
|
99
|
+
@createdDateFormat = createdDateFormat
|
100
|
+
end
|
101
|
+
|
102
|
+
# * Get the created date format for the project.
|
103
|
+
#
|
104
|
+
# ==== Returns
|
105
|
+
#
|
106
|
+
# * Project created date format.
|
107
|
+
|
108
|
+
def getCreatedDateFormat
|
109
|
+
return @createdDateFormat
|
110
|
+
end
|
111
|
+
|
112
|
+
# * Set the project created date.
|
113
|
+
#
|
114
|
+
# ==== Parameters
|
115
|
+
#
|
116
|
+
# * createdDateLong:: - Project created date.
|
117
|
+
|
118
|
+
def setCreatedDateLong(createdDateLong)
|
119
|
+
@createdDateLong = createdDateLong
|
120
|
+
end
|
121
|
+
|
122
|
+
# * Get the project created date long.
|
123
|
+
#
|
124
|
+
# ==== Returns
|
125
|
+
#
|
126
|
+
# * project created date long.
|
127
|
+
|
128
|
+
def getCreatedDateLong
|
129
|
+
return @createdDateLong
|
130
|
+
end
|
131
|
+
|
132
|
+
# * Set the project description.
|
133
|
+
#
|
134
|
+
# ==== Parameters
|
135
|
+
#
|
136
|
+
# * description:: - Description of the project.
|
137
|
+
|
138
|
+
def setDescription(description)
|
139
|
+
@description = description
|
140
|
+
end
|
141
|
+
|
142
|
+
# * Get the project description.
|
143
|
+
#
|
144
|
+
# ==== Returns
|
145
|
+
#
|
146
|
+
# * Project description.
|
147
|
+
|
148
|
+
def getDescription
|
149
|
+
return @description
|
150
|
+
end
|
151
|
+
|
152
|
+
# * Set the owner name.
|
153
|
+
#
|
154
|
+
# ==== Parameters
|
155
|
+
#
|
156
|
+
# * ownerName:: - Name of the owner.
|
157
|
+
|
158
|
+
def setOwnerName(ownerName)
|
159
|
+
@ownerName = ownerName
|
160
|
+
end
|
161
|
+
|
162
|
+
# * Get the owner name.
|
163
|
+
#
|
164
|
+
# ==== Returns
|
165
|
+
#
|
166
|
+
# * The owner name.
|
167
|
+
|
168
|
+
def getOwnerName
|
169
|
+
return @ownerName
|
170
|
+
end
|
171
|
+
|
172
|
+
# * Set the owner id.
|
173
|
+
#
|
174
|
+
# ==== Parameters
|
175
|
+
#
|
176
|
+
# * ownerId:: - ID of the owner.
|
177
|
+
|
178
|
+
def setOwnerId(ownerId)
|
179
|
+
@ownerId = ownerId
|
180
|
+
end
|
181
|
+
|
182
|
+
# * Get the owner id.
|
183
|
+
#
|
184
|
+
# ==== Returns
|
185
|
+
#
|
186
|
+
# * Owner id.
|
187
|
+
|
188
|
+
def getOwnerId
|
189
|
+
return @ownerId
|
190
|
+
end
|
191
|
+
|
192
|
+
# * Set the open task count.
|
193
|
+
#
|
194
|
+
# ==== Parameters
|
195
|
+
#
|
196
|
+
# * openTaskCount:: - Open task count for the project.
|
197
|
+
|
198
|
+
def setOpenTaskCount(openTaskCount)
|
199
|
+
@openTaskCount = openTaskCount
|
200
|
+
end
|
201
|
+
|
202
|
+
# * Get the open task count.
|
203
|
+
#
|
204
|
+
# ==== Returns
|
205
|
+
#
|
206
|
+
# * Open task count for the project.
|
207
|
+
|
208
|
+
def getOpenTaskCount
|
209
|
+
return @openTaskCount
|
210
|
+
end
|
211
|
+
|
212
|
+
# * Set the closed task count.
|
213
|
+
#
|
214
|
+
# ==== Parameters
|
215
|
+
#
|
216
|
+
# * closedTaskCount:: - Closed task count for the project.
|
217
|
+
|
218
|
+
def setClosedTaskCount(closedTaskCount)
|
219
|
+
@closedTaskCount = closedTaskCount
|
220
|
+
end
|
221
|
+
|
222
|
+
# * Get the closed task count.
|
223
|
+
#
|
224
|
+
# ==== Returns
|
225
|
+
#
|
226
|
+
# * Closed task count for the project.
|
227
|
+
|
228
|
+
def getClosedTaskCount
|
229
|
+
return @closedTaskCount
|
230
|
+
end
|
231
|
+
|
232
|
+
# * Set the open milestone count.
|
233
|
+
#
|
234
|
+
# ==== Parameters
|
235
|
+
#
|
236
|
+
# * openMilestoneCount:: - Open milestone count for the project.
|
237
|
+
|
238
|
+
def setOpenMilestoneCount(openMilestoneCount)
|
239
|
+
@openMilestoneCount = openMilestoneCount
|
240
|
+
end
|
241
|
+
|
242
|
+
# * Get the open milestone count.
|
243
|
+
#
|
244
|
+
# ==== Returns
|
245
|
+
#
|
246
|
+
# * Open milestone count for the project.
|
247
|
+
|
248
|
+
def getOpenMilestoneCount
|
249
|
+
return @openMilestoneCount
|
250
|
+
end
|
251
|
+
|
252
|
+
# * Set the closed milestone count.
|
253
|
+
#
|
254
|
+
# ==== Parameters
|
255
|
+
#
|
256
|
+
# * closedMilestoneCount:: - Closed milestone count for the project.
|
257
|
+
|
258
|
+
def setClosedMilestoneCount(closedMilestoneCount)
|
259
|
+
@closedMilestoneCount = closedMilestoneCount
|
260
|
+
end
|
261
|
+
|
262
|
+
# * Get the closed milestone count.
|
263
|
+
#
|
264
|
+
# ==== Returns
|
265
|
+
#
|
266
|
+
# * closed milestone count for the project.
|
267
|
+
|
268
|
+
def getClosedMilestoneCount
|
269
|
+
return @closedMilestoneCount
|
270
|
+
end
|
271
|
+
|
272
|
+
# * Set the open bug count.
|
273
|
+
#
|
274
|
+
# ==== Parameters
|
275
|
+
#
|
276
|
+
# * openBugCount:: - Open bug count for the project.
|
277
|
+
|
278
|
+
def setOpenBugCount(openBugCount)
|
279
|
+
@openBugCount = openBugCount
|
280
|
+
end
|
281
|
+
|
282
|
+
# * Get the open bug count.
|
283
|
+
#
|
284
|
+
# ==== Returns
|
285
|
+
#
|
286
|
+
# * Open bug count for the project.
|
287
|
+
|
288
|
+
def getOpenBugCount
|
289
|
+
return @openBugCount
|
290
|
+
end
|
291
|
+
|
292
|
+
# * Set the closed bug count.
|
293
|
+
#
|
294
|
+
# ==== Parameters
|
295
|
+
#
|
296
|
+
# * closedBugCount:: - Closed bug count for the project.
|
297
|
+
|
298
|
+
def setClosedBugCount(closedBugCount)
|
299
|
+
@closedBugCount = closedBugCount
|
300
|
+
end
|
301
|
+
|
302
|
+
# * Get the closed bug count.
|
303
|
+
#
|
304
|
+
# ==== Returns
|
305
|
+
#
|
306
|
+
# * Closed bug count for the project.
|
307
|
+
|
308
|
+
def getClosedBugCount
|
309
|
+
return @closedBugCount
|
310
|
+
end
|
311
|
+
|
312
|
+
# * Set the project URL.
|
313
|
+
#
|
314
|
+
# ==== Parameters
|
315
|
+
#
|
316
|
+
# * url:: - URL for the project.
|
317
|
+
|
318
|
+
def setURL(url)
|
319
|
+
@url = url
|
320
|
+
end
|
321
|
+
|
322
|
+
# * Get the project URL.
|
323
|
+
#
|
324
|
+
# ==== Returns
|
325
|
+
#
|
326
|
+
# * Project URL.
|
327
|
+
|
328
|
+
def getURL
|
329
|
+
return @url
|
330
|
+
end
|
331
|
+
|
332
|
+
# * Set the activity URL.
|
333
|
+
#
|
334
|
+
# ==== Parameters
|
335
|
+
#
|
336
|
+
# * activityUrl:: - URL for the activity.
|
337
|
+
|
338
|
+
def setActivityURL(activityUrl)
|
339
|
+
@activityUrl = activityUrl
|
340
|
+
end
|
341
|
+
|
342
|
+
# * Get the activity URL.
|
343
|
+
#
|
344
|
+
# ==== Returns
|
345
|
+
#
|
346
|
+
# * Activity URL.
|
347
|
+
|
348
|
+
def getActivityURL
|
349
|
+
return @activityUrl
|
350
|
+
end
|
351
|
+
|
352
|
+
# * Set the milestone URL.
|
353
|
+
#
|
354
|
+
# ==== Parameters
|
355
|
+
#
|
356
|
+
# * milestoneUrl:: - URL for the milestone.
|
357
|
+
|
358
|
+
def setMilestoneURL(milestoneUrl)
|
359
|
+
@milestoneUrl = milestoneUrl
|
360
|
+
end
|
361
|
+
|
362
|
+
# * Get the milestone URL.
|
363
|
+
#
|
364
|
+
# ==== Returns
|
365
|
+
#
|
366
|
+
# * milestone URL.
|
367
|
+
|
368
|
+
def getMilestoneURL
|
369
|
+
return @milestoneUrl
|
370
|
+
end
|
371
|
+
|
372
|
+
# * Set the task list URL.
|
373
|
+
#
|
374
|
+
# ==== Parameters
|
375
|
+
#
|
376
|
+
# * tasklistUrl:: - URL for the task list.
|
377
|
+
|
378
|
+
def setTasklistURL(tasklistUrl)
|
379
|
+
@tasklistUrl = tasklistUrl
|
380
|
+
end
|
381
|
+
|
382
|
+
# * Get the task list URL.
|
383
|
+
#
|
384
|
+
# ==== Returns
|
385
|
+
#
|
386
|
+
# * Task list URL.
|
387
|
+
|
388
|
+
def getTasklistURL
|
389
|
+
return @tasklistUrl
|
390
|
+
end
|
391
|
+
|
392
|
+
# * Set the task URL.
|
393
|
+
#
|
394
|
+
# ==== Parameters
|
395
|
+
#
|
396
|
+
# * taskUrl:: - URL for the task.
|
397
|
+
|
398
|
+
def setTaskURL(taskUrl)
|
399
|
+
@taskUrl = taskUrl
|
400
|
+
end
|
401
|
+
|
402
|
+
# * Get the task URL.
|
403
|
+
#
|
404
|
+
# ==== Returns
|
405
|
+
#
|
406
|
+
# * task URL.
|
407
|
+
|
408
|
+
def getTaskURL
|
409
|
+
return @taskUrl
|
410
|
+
end
|
411
|
+
|
412
|
+
# * Set the bug URL.
|
413
|
+
#
|
414
|
+
# ==== Parameters
|
415
|
+
#
|
416
|
+
# * bugUrl:: - URL for the bug.
|
417
|
+
|
418
|
+
def setBugURL(bugUrl)
|
419
|
+
@bugUrl = bugUrl
|
420
|
+
end
|
421
|
+
|
422
|
+
# * Get the bug URL.
|
423
|
+
#
|
424
|
+
# ==== Returns
|
425
|
+
#
|
426
|
+
# * bug URL.
|
427
|
+
|
428
|
+
def getBugURL
|
429
|
+
return @bugUrl
|
430
|
+
end
|
431
|
+
|
432
|
+
# * Set the time sheet URL.
|
433
|
+
#
|
434
|
+
# ==== Parameters
|
435
|
+
#
|
436
|
+
# * timesheetUrl:: - URL for the time sheet.
|
437
|
+
|
438
|
+
def setTimesheetURL(timesheetUrl)
|
439
|
+
@timesheetUrl = timesheetUrl
|
440
|
+
end
|
441
|
+
|
442
|
+
# * Get the time sheet URL.
|
443
|
+
#
|
444
|
+
# ==== Returns
|
445
|
+
#
|
446
|
+
# * Time sheet URL.
|
447
|
+
|
448
|
+
def getTimesheetURL
|
449
|
+
return @timesheetUrl
|
450
|
+
end
|
451
|
+
|
452
|
+
# * Set the status URL.
|
453
|
+
#
|
454
|
+
# ==== Parameters
|
455
|
+
#
|
456
|
+
# * statusUrl:: - URL for the status.
|
457
|
+
|
458
|
+
def setStatusURL(statusUrl)
|
459
|
+
@statusUrl = statusUrl
|
460
|
+
end
|
461
|
+
|
462
|
+
# * Get the status URL.
|
463
|
+
#
|
464
|
+
# ==== Returns
|
465
|
+
#
|
466
|
+
# * Status URL.
|
467
|
+
|
468
|
+
def getStatusURL
|
469
|
+
return @statusUrl
|
470
|
+
end
|
471
|
+
|
472
|
+
# * Set the event URL.
|
473
|
+
#
|
474
|
+
# ==== Parameters
|
475
|
+
#
|
476
|
+
# * eventUrl:: - URL for the event.
|
477
|
+
|
478
|
+
def setEventURL(eventUrl)
|
479
|
+
@eventUrl = eventUrl
|
480
|
+
end
|
481
|
+
|
482
|
+
# * Get the event URL.
|
483
|
+
#
|
484
|
+
# ==== Returns
|
485
|
+
#
|
486
|
+
# * Event URL.
|
487
|
+
|
488
|
+
def getEventURL
|
489
|
+
return @eventUrl
|
490
|
+
end
|
491
|
+
|
492
|
+
# * Set the document URL.
|
493
|
+
#
|
494
|
+
# ==== Parameters
|
495
|
+
#
|
496
|
+
# * documentUrl:: - URL for the document.
|
497
|
+
|
498
|
+
def setDocumentURL(documentUrl)
|
499
|
+
@documentUrl = documentUrl
|
500
|
+
end
|
501
|
+
|
502
|
+
# * Get the document URL.
|
503
|
+
#
|
504
|
+
# ==== Returns
|
505
|
+
#
|
506
|
+
# * Document URL.
|
507
|
+
|
508
|
+
def getDocumentURL
|
509
|
+
return @documentUrl
|
510
|
+
end
|
511
|
+
|
512
|
+
# * Set the folder URL.
|
513
|
+
#
|
514
|
+
# ==== Parameters
|
515
|
+
#
|
516
|
+
# * folderUrl:: - URL for the folder.
|
517
|
+
|
518
|
+
def setFolderURL(folderUrl)
|
519
|
+
@folderUrl = folderUrl
|
520
|
+
end
|
521
|
+
|
522
|
+
# * Get the folder URL.
|
523
|
+
#
|
524
|
+
# ==== Returns
|
525
|
+
#
|
526
|
+
# * Folder URL.
|
527
|
+
|
528
|
+
def getFolderURL
|
529
|
+
return @folderUrl
|
530
|
+
end
|
531
|
+
|
532
|
+
# * Set the forum URL.
|
533
|
+
#
|
534
|
+
# ==== Parameters
|
535
|
+
#
|
536
|
+
# * forumUrl:: - URL for the forum.
|
537
|
+
|
538
|
+
def setForumURL(forumUrl)
|
539
|
+
@forumUrl = forumUrl
|
540
|
+
end
|
541
|
+
|
542
|
+
# * Get the forum URL.
|
543
|
+
#
|
544
|
+
# ==== Returns
|
545
|
+
#
|
546
|
+
# * Forum URL.
|
547
|
+
|
548
|
+
def getForumURL
|
549
|
+
return @forumUrl
|
550
|
+
end
|
551
|
+
|
552
|
+
# * Set the user URL.
|
553
|
+
#
|
554
|
+
# ==== Parameters
|
555
|
+
#
|
556
|
+
# * userUrl:: - URL for the user.
|
557
|
+
|
558
|
+
def setUserURL(userUrl)
|
559
|
+
@userUrl = userUrl
|
560
|
+
end
|
561
|
+
|
562
|
+
# * Get the user URL.
|
563
|
+
#
|
564
|
+
# ==== Returns
|
565
|
+
#
|
566
|
+
# * user URL.
|
567
|
+
|
568
|
+
def getUserURL
|
569
|
+
return @userUrl
|
570
|
+
end
|
571
|
+
|
572
|
+
# * Convert the Project object into HashMap.
|
573
|
+
#
|
574
|
+
# ==== Returns
|
575
|
+
#
|
576
|
+
# * HashMap object.
|
577
|
+
|
578
|
+
def toParamMAP
|
579
|
+
requestBody = Hash.new
|
580
|
+
if name != nil
|
581
|
+
requestBody["name"] = name
|
582
|
+
end
|
583
|
+
if description != nil
|
584
|
+
requestBody["description"] = description
|
585
|
+
end
|
586
|
+
if status != nil
|
587
|
+
requestBody["status"] = status
|
588
|
+
end
|
589
|
+
return requestBody
|
590
|
+
end
|
591
|
+
end
|
592
|
+
end
|
593
|
+
end
|