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,56 @@
|
|
1
|
+
# $Id$
|
2
|
+
module Projects
|
3
|
+
module Model
|
4
|
+
require File.dirname(__FILE__) + '/Log'
|
5
|
+
|
6
|
+
# * This class is used to make an object for Buglog.
|
7
|
+
|
8
|
+
class Buglog < Log
|
9
|
+
|
10
|
+
private
|
11
|
+
attr_accessor :bugId, :title
|
12
|
+
|
13
|
+
public
|
14
|
+
|
15
|
+
# * Set the bug id.
|
16
|
+
#
|
17
|
+
# ==== Parameters
|
18
|
+
#
|
19
|
+
# * bugId:: - ID of the bug.
|
20
|
+
|
21
|
+
def setBugId(bugId)
|
22
|
+
@bugId = bugId
|
23
|
+
end
|
24
|
+
|
25
|
+
# * Get the bug id.
|
26
|
+
#
|
27
|
+
# ==== Returns
|
28
|
+
#
|
29
|
+
# * Bug id.
|
30
|
+
|
31
|
+
def getBugId
|
32
|
+
return @bugId
|
33
|
+
end
|
34
|
+
|
35
|
+
# * Set the title of the bug.
|
36
|
+
#
|
37
|
+
# ==== Parameters
|
38
|
+
#
|
39
|
+
# * title:: - Title of the bug.
|
40
|
+
|
41
|
+
def setTitle(title)
|
42
|
+
@title = title
|
43
|
+
end
|
44
|
+
|
45
|
+
# * Get the title of the bug.
|
46
|
+
#
|
47
|
+
# ==== Returns
|
48
|
+
#
|
49
|
+
# * Title of the bug.
|
50
|
+
|
51
|
+
def getTitle
|
52
|
+
return @title
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# $Id$
|
2
|
+
module Projects
|
3
|
+
module Model
|
4
|
+
# * This class is used to make an object for Category.
|
5
|
+
|
6
|
+
class Category
|
7
|
+
|
8
|
+
private
|
9
|
+
attr_accessor :id, :name
|
10
|
+
|
11
|
+
public
|
12
|
+
|
13
|
+
# * Set the category id.
|
14
|
+
#
|
15
|
+
# ==== Parameters
|
16
|
+
#
|
17
|
+
# * id:: - ID of the category.
|
18
|
+
|
19
|
+
def setId(id)
|
20
|
+
@id = id
|
21
|
+
end
|
22
|
+
|
23
|
+
# * Get the category id.
|
24
|
+
#
|
25
|
+
# ==== Returns
|
26
|
+
#
|
27
|
+
# * Category id.
|
28
|
+
|
29
|
+
def getId
|
30
|
+
return @id
|
31
|
+
end
|
32
|
+
|
33
|
+
# * Set the category name.
|
34
|
+
#
|
35
|
+
# ==== Parameters
|
36
|
+
#
|
37
|
+
# * name:: - Name of the category.
|
38
|
+
|
39
|
+
def setName(name)
|
40
|
+
@name = name
|
41
|
+
end
|
42
|
+
|
43
|
+
# * Get the category name.
|
44
|
+
#
|
45
|
+
# ==== Returns
|
46
|
+
#
|
47
|
+
# * Category name.
|
48
|
+
|
49
|
+
def getName
|
50
|
+
return @name
|
51
|
+
end
|
52
|
+
|
53
|
+
# * Convert the Category object into HashMap object.
|
54
|
+
#
|
55
|
+
# ==== Returns
|
56
|
+
#
|
57
|
+
# * HashMap object.
|
58
|
+
|
59
|
+
def toParamMAP
|
60
|
+
requestBody = Hash.new
|
61
|
+
|
62
|
+
if name != nil
|
63
|
+
requestBody["name"] = name
|
64
|
+
end
|
65
|
+
|
66
|
+
return requestBody
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,289 @@
|
|
1
|
+
# $Id$
|
2
|
+
module Projects
|
3
|
+
module Model
|
4
|
+
# * This class is used to make an object for Comment.
|
5
|
+
|
6
|
+
class Comment
|
7
|
+
|
8
|
+
private
|
9
|
+
attr_accessor :id, :content, :createdTime, :createdTimeFormat, :createdTimeLong, :addedBy, :addedPerson, :updatedBy, :postedBy, :postedPerson, :postDate, :postDateFormat, :postDateLong
|
10
|
+
|
11
|
+
public
|
12
|
+
|
13
|
+
# * Set the comment id.
|
14
|
+
#
|
15
|
+
# ==== Parameters
|
16
|
+
#
|
17
|
+
# * id:: - ID of the comment.
|
18
|
+
|
19
|
+
def setId(id)
|
20
|
+
@id = id
|
21
|
+
end
|
22
|
+
|
23
|
+
# * Get the comment id.
|
24
|
+
#
|
25
|
+
# ==== Returns
|
26
|
+
#
|
27
|
+
# * Comment id.
|
28
|
+
|
29
|
+
def getId
|
30
|
+
return @id
|
31
|
+
end
|
32
|
+
|
33
|
+
# * Set the comment content.
|
34
|
+
#
|
35
|
+
# ==== Parameters
|
36
|
+
#
|
37
|
+
# * content:: - Content for the comment.
|
38
|
+
|
39
|
+
def setContent(content)
|
40
|
+
@content = content
|
41
|
+
end
|
42
|
+
|
43
|
+
# * Get the comment content.
|
44
|
+
#
|
45
|
+
# ==== Returns
|
46
|
+
#
|
47
|
+
# * Comment content.
|
48
|
+
|
49
|
+
def getContent
|
50
|
+
return @content
|
51
|
+
end
|
52
|
+
|
53
|
+
# * Set the created time.
|
54
|
+
#
|
55
|
+
# ==== Parameters
|
56
|
+
#
|
57
|
+
# * createdTime:: - Created time for the comment.
|
58
|
+
|
59
|
+
def setCreatedTime(createdTime)
|
60
|
+
@createdTime = createdTime
|
61
|
+
end
|
62
|
+
|
63
|
+
# * Get the created time.
|
64
|
+
#
|
65
|
+
# ==== Returns
|
66
|
+
#
|
67
|
+
# * Created time.
|
68
|
+
|
69
|
+
def getCreatedTime
|
70
|
+
return @createdTime
|
71
|
+
end
|
72
|
+
|
73
|
+
# * Set the created time format.
|
74
|
+
#
|
75
|
+
# ==== Parameters
|
76
|
+
#
|
77
|
+
# * createdTime:: - Created time format for the comment.
|
78
|
+
|
79
|
+
def setCreatedTimeFormat(createdTimeFormat)
|
80
|
+
@createdTimeFormat = createdTimeFormat
|
81
|
+
end
|
82
|
+
|
83
|
+
# * Get the created time format.
|
84
|
+
#
|
85
|
+
# ==== Returns
|
86
|
+
#
|
87
|
+
# * Created time format.
|
88
|
+
|
89
|
+
def getCreatedTimeFormat
|
90
|
+
return @createdTimeFormat
|
91
|
+
end
|
92
|
+
|
93
|
+
# * Set the created time long.
|
94
|
+
#
|
95
|
+
# ==== Parameters
|
96
|
+
#
|
97
|
+
# * createdTimeLong:: - Created time for the comment.
|
98
|
+
|
99
|
+
def setCreatedTimeLong(createdTimeLong)
|
100
|
+
@createdTimeLong = createdTimeLong
|
101
|
+
end
|
102
|
+
|
103
|
+
# * Get the created time long.
|
104
|
+
#
|
105
|
+
# ==== Returns
|
106
|
+
#
|
107
|
+
# * Created time.
|
108
|
+
|
109
|
+
def getCreatedTimeLong
|
110
|
+
return @createdTimeLong
|
111
|
+
end
|
112
|
+
|
113
|
+
# * Set the id for the comment added person.
|
114
|
+
#
|
115
|
+
# ==== Parameters
|
116
|
+
#
|
117
|
+
# * addedBy:: - ID of the person who added the comment.
|
118
|
+
|
119
|
+
def setAddedBy(addedBy)
|
120
|
+
@addedBy = addedBy
|
121
|
+
end
|
122
|
+
|
123
|
+
# * Get the comment added person id.
|
124
|
+
#
|
125
|
+
# ==== Returns
|
126
|
+
#
|
127
|
+
# * Id of the person who added the comment.
|
128
|
+
|
129
|
+
def getAddedBy
|
130
|
+
return @addedBy
|
131
|
+
end
|
132
|
+
|
133
|
+
# * Set the comment added person.
|
134
|
+
#
|
135
|
+
# ==== Parameters
|
136
|
+
#
|
137
|
+
# * addedPerson:: - Person who added comment.
|
138
|
+
|
139
|
+
def setAddedPerson(addedPerson)
|
140
|
+
@addedPerson = addedPerson
|
141
|
+
end
|
142
|
+
|
143
|
+
# * Get the comment added person.
|
144
|
+
#
|
145
|
+
# ==== Returns
|
146
|
+
#
|
147
|
+
# * Person who added comment.
|
148
|
+
|
149
|
+
def getAddedPerson
|
150
|
+
return @addedPerson
|
151
|
+
end
|
152
|
+
|
153
|
+
# * Set the comment updated person id.
|
154
|
+
#
|
155
|
+
# ==== Parameters
|
156
|
+
#
|
157
|
+
# * updatedBy:: - ID of the person who updated the comment.
|
158
|
+
|
159
|
+
|
160
|
+
def setUpdatedBy(updatedBy)
|
161
|
+
@updatedBy = updatedBy
|
162
|
+
end
|
163
|
+
|
164
|
+
# * Get the comment updated person id.
|
165
|
+
#
|
166
|
+
# ==== Returns
|
167
|
+
#
|
168
|
+
# * Id of the person who updated the comment.
|
169
|
+
|
170
|
+
def getUpdatedBy
|
171
|
+
return @updatedBy
|
172
|
+
end
|
173
|
+
|
174
|
+
# * Set the comment posted person id.
|
175
|
+
#
|
176
|
+
# ==== Parameters
|
177
|
+
#
|
178
|
+
# * postedBy:: - Id of the person who posted the comment.
|
179
|
+
|
180
|
+
def setPostedBy(postedBy)
|
181
|
+
@postedBy = postedBy
|
182
|
+
end
|
183
|
+
|
184
|
+
# * Get the comment posted person id.
|
185
|
+
#
|
186
|
+
# ==== Returns
|
187
|
+
#
|
188
|
+
# * Id of the person who posted the comment.
|
189
|
+
|
190
|
+
def getPostedBy
|
191
|
+
return @postedBy
|
192
|
+
end
|
193
|
+
|
194
|
+
# * Set the comment posted person.
|
195
|
+
#
|
196
|
+
# ==== Parameters
|
197
|
+
#
|
198
|
+
# * postedPerson:: - Person who posted the comment.
|
199
|
+
|
200
|
+
def setPostedPerson(postedPerson)
|
201
|
+
@postedPerson = postedPerson
|
202
|
+
end
|
203
|
+
|
204
|
+
# * Get the comment posted person.
|
205
|
+
#
|
206
|
+
# ==== Returns
|
207
|
+
#
|
208
|
+
# * Person who posted the comment.
|
209
|
+
|
210
|
+
def getPostedPerson
|
211
|
+
return @postedPerson
|
212
|
+
end
|
213
|
+
|
214
|
+
# * Set the comment posted date.
|
215
|
+
#
|
216
|
+
# ==== Parameters
|
217
|
+
#
|
218
|
+
# * postDate:: - Date at which comment is posted.
|
219
|
+
|
220
|
+
def setPostDate(postDate)
|
221
|
+
@postDate = postDate
|
222
|
+
end
|
223
|
+
|
224
|
+
# * Get the comment posted date.
|
225
|
+
#
|
226
|
+
# ==== Returns
|
227
|
+
#
|
228
|
+
# * Date at which comment is posted.
|
229
|
+
|
230
|
+
def getPostDate
|
231
|
+
return @postDate
|
232
|
+
end
|
233
|
+
|
234
|
+
# * Set the comment posted date format.
|
235
|
+
#
|
236
|
+
# ==== Parameters
|
237
|
+
#
|
238
|
+
# * postDate:: - Date format of the posted comment.
|
239
|
+
|
240
|
+
def setPostDateFormat(postDateFormat)
|
241
|
+
@postDateFormat = postDateFormat
|
242
|
+
end
|
243
|
+
|
244
|
+
# * Get the comment posted date format.
|
245
|
+
#
|
246
|
+
# ==== Returns
|
247
|
+
#
|
248
|
+
# * Date format of the posted comment.
|
249
|
+
|
250
|
+
def getPostDateFormat
|
251
|
+
return @postDateFormat
|
252
|
+
end
|
253
|
+
|
254
|
+
# * Set the comment posted date long.
|
255
|
+
#
|
256
|
+
# ==== Parameters
|
257
|
+
#
|
258
|
+
# * postDateLong:: - Was was the comment posted(date).
|
259
|
+
|
260
|
+
def setPostDateLong(postDateLong)
|
261
|
+
@postDateLong = postDateLong
|
262
|
+
end
|
263
|
+
|
264
|
+
# * Get the comment posted date long.
|
265
|
+
#
|
266
|
+
# ==== Returns
|
267
|
+
#
|
268
|
+
# * The date on which the comment is posted.
|
269
|
+
|
270
|
+
def getPostDateLong
|
271
|
+
return @postDateLong
|
272
|
+
end
|
273
|
+
|
274
|
+
# * Convert the Comment object into HashMap.
|
275
|
+
#
|
276
|
+
# ==== Returns
|
277
|
+
#
|
278
|
+
# * HashMap object.
|
279
|
+
|
280
|
+
def toParamMAP
|
281
|
+
requestBody = Hash.new
|
282
|
+
if content != nil
|
283
|
+
requestBody["content"] = content
|
284
|
+
end
|
285
|
+
return requestBody
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
@@ -0,0 +1,260 @@
|
|
1
|
+
# $Id$
|
2
|
+
module Projects
|
3
|
+
module Model
|
4
|
+
# * This class is used to make an object for Document.
|
5
|
+
|
6
|
+
class Document
|
7
|
+
|
8
|
+
private
|
9
|
+
attr_accessor :id, :filename, :contenttype, :url, :versions, :uploaddoc, :folderId, :description, :tags, :notify, :folder
|
10
|
+
|
11
|
+
public
|
12
|
+
|
13
|
+
# * Set the document id.
|
14
|
+
#
|
15
|
+
# ==== Parameters
|
16
|
+
#
|
17
|
+
# * id:: - ID of the document.
|
18
|
+
|
19
|
+
def setId(id)
|
20
|
+
@id = id
|
21
|
+
end
|
22
|
+
|
23
|
+
# * Get the document id.
|
24
|
+
#
|
25
|
+
# ==== Returns
|
26
|
+
#
|
27
|
+
# * Document id.
|
28
|
+
|
29
|
+
def getId
|
30
|
+
return @id
|
31
|
+
end
|
32
|
+
|
33
|
+
# * Set the file name.
|
34
|
+
#
|
35
|
+
# ==== Parameters
|
36
|
+
#
|
37
|
+
# * filename:: - Name of the file.
|
38
|
+
|
39
|
+
def setFilename(filename)
|
40
|
+
@filename = filename
|
41
|
+
end
|
42
|
+
|
43
|
+
# * Get the file name.
|
44
|
+
#
|
45
|
+
# ==== Returns
|
46
|
+
#
|
47
|
+
# * File name.
|
48
|
+
|
49
|
+
|
50
|
+
def getFilename
|
51
|
+
return @filename
|
52
|
+
end
|
53
|
+
|
54
|
+
# * Set the content type.
|
55
|
+
#
|
56
|
+
# ==== Parameters
|
57
|
+
#
|
58
|
+
# * contenttype:: - Content type of the file.
|
59
|
+
|
60
|
+
def setContenttype(contenttype)
|
61
|
+
@contenttype = contenttype
|
62
|
+
end
|
63
|
+
|
64
|
+
# * Get the content type.
|
65
|
+
#
|
66
|
+
# ==== Returns
|
67
|
+
#
|
68
|
+
# * Content type of the file.
|
69
|
+
|
70
|
+
def getContenttype
|
71
|
+
return @contenttype
|
72
|
+
end
|
73
|
+
|
74
|
+
# * Set the document URL.
|
75
|
+
#
|
76
|
+
# ==== Parameters
|
77
|
+
#
|
78
|
+
# * url:: - URL for the document.
|
79
|
+
|
80
|
+
def setURL(url)
|
81
|
+
@url = url
|
82
|
+
end
|
83
|
+
|
84
|
+
# * Get the document URL.
|
85
|
+
#
|
86
|
+
# ==== Returns
|
87
|
+
#
|
88
|
+
# * Document URL.
|
89
|
+
|
90
|
+
def getURL
|
91
|
+
return @url
|
92
|
+
end
|
93
|
+
|
94
|
+
# * Set the document version.
|
95
|
+
#
|
96
|
+
# ==== Parameters
|
97
|
+
#
|
98
|
+
# * versions:: - Version for the document.
|
99
|
+
|
100
|
+
def setVersions(versions)
|
101
|
+
@versions = versions
|
102
|
+
end
|
103
|
+
|
104
|
+
# * Get the document version.
|
105
|
+
#
|
106
|
+
# ==== Returns
|
107
|
+
#
|
108
|
+
# * Document version.
|
109
|
+
|
110
|
+
def getVersions
|
111
|
+
return @versions
|
112
|
+
end
|
113
|
+
|
114
|
+
# * Set the upload document file.
|
115
|
+
#
|
116
|
+
# ==== Parameters
|
117
|
+
#
|
118
|
+
# * uploaddoc:: - ArrayList of the documents being uploaded.
|
119
|
+
|
120
|
+
def setUploaddoc(uploaddoc)
|
121
|
+
@uploaddoc = uploaddoc
|
122
|
+
end
|
123
|
+
|
124
|
+
# * Get the upload document file.
|
125
|
+
#
|
126
|
+
# ==== Returns
|
127
|
+
#
|
128
|
+
# * ArrayList of upload document file.
|
129
|
+
|
130
|
+
def getUploaddoc
|
131
|
+
return @uploaddoc
|
132
|
+
end
|
133
|
+
|
134
|
+
# * Set the folder id.
|
135
|
+
#
|
136
|
+
# ==== Parameters
|
137
|
+
#
|
138
|
+
# * folderId:: - ID of the folder.
|
139
|
+
|
140
|
+
def setFolderId(folderId)
|
141
|
+
@folderId = folderId
|
142
|
+
end
|
143
|
+
|
144
|
+
# * Get the folder id.
|
145
|
+
#
|
146
|
+
# ==== Returns
|
147
|
+
#
|
148
|
+
# * Folder id.
|
149
|
+
|
150
|
+
def getFolderId
|
151
|
+
return @folderId
|
152
|
+
end
|
153
|
+
|
154
|
+
# * Set the description of the document.
|
155
|
+
#
|
156
|
+
# ==== Parameters
|
157
|
+
#
|
158
|
+
# * description:: - Description of the document.
|
159
|
+
|
160
|
+
def setDescription(description)
|
161
|
+
@description = description
|
162
|
+
end
|
163
|
+
|
164
|
+
# * Get the description of the document.
|
165
|
+
#
|
166
|
+
# ==== Returns
|
167
|
+
#
|
168
|
+
# * Document description.
|
169
|
+
|
170
|
+
def getDescription
|
171
|
+
return @description
|
172
|
+
end
|
173
|
+
|
174
|
+
# * Set the tags for the document.
|
175
|
+
#
|
176
|
+
# ==== Parameters
|
177
|
+
#
|
178
|
+
# * tags:: - Tags for the document.
|
179
|
+
|
180
|
+
def setTags(tags)
|
181
|
+
@tags = tags
|
182
|
+
end
|
183
|
+
|
184
|
+
# * Get the tags for the document.
|
185
|
+
#
|
186
|
+
# ==== Returns
|
187
|
+
#
|
188
|
+
# * Tags for the document.
|
189
|
+
|
190
|
+
def getTags
|
191
|
+
return @tags
|
192
|
+
end
|
193
|
+
|
194
|
+
# * Set the notify for the document.
|
195
|
+
#
|
196
|
+
# ==== Parameters
|
197
|
+
#
|
198
|
+
# * notify:: - Notify for the document.
|
199
|
+
|
200
|
+
def setNotify(notify)
|
201
|
+
@notify = notify
|
202
|
+
end
|
203
|
+
|
204
|
+
# * Get the notify for the document.
|
205
|
+
#
|
206
|
+
# ==== Returns
|
207
|
+
#
|
208
|
+
# * Notify for the document.
|
209
|
+
|
210
|
+
def getNotify
|
211
|
+
return @notify
|
212
|
+
end
|
213
|
+
|
214
|
+
# * Set the folder.
|
215
|
+
#
|
216
|
+
# ==== Parameters
|
217
|
+
#
|
218
|
+
# * folder:: - Folder object.
|
219
|
+
|
220
|
+
def setFolder(folder)
|
221
|
+
@folder = folder
|
222
|
+
end
|
223
|
+
|
224
|
+
# * Get the folder object.
|
225
|
+
#
|
226
|
+
# ==== Returns
|
227
|
+
#
|
228
|
+
# * Folder object.
|
229
|
+
|
230
|
+
def getFolder
|
231
|
+
return @folder
|
232
|
+
end
|
233
|
+
|
234
|
+
# * Convert the Document object into HashMap.
|
235
|
+
#
|
236
|
+
# ==== Returns
|
237
|
+
#
|
238
|
+
# * HashMap object.
|
239
|
+
|
240
|
+
def toParamMAP
|
241
|
+
requestBody = Hash.new
|
242
|
+
|
243
|
+
if folderId != nil && folderId.to_i > 0
|
244
|
+
requestBody["folder_id"] = folderId
|
245
|
+
end
|
246
|
+
if description != nil
|
247
|
+
requestBody["description"] = description
|
248
|
+
end
|
249
|
+
if tags != nil
|
250
|
+
requestBody["tags"] = tags
|
251
|
+
end
|
252
|
+
if notify != nil && notify.to_i > 0
|
253
|
+
requestBody["notify"] = notify
|
254
|
+
end
|
255
|
+
|
256
|
+
return requestBody
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|