Class: Projects::Model::Document

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#getContenttypeObject

  • Get the content type.

Returns

  • Content type of the file.



70
71
72
# File 'lib/projects/model/Document.rb', line 70

def getContenttype
  return @contenttype
end

#getDescriptionObject

  • Get the description of the document.

Returns

  • Document description.



170
171
172
# File 'lib/projects/model/Document.rb', line 170

def getDescription
  return @description
end

#getFilenameObject



50
51
52
# File 'lib/projects/model/Document.rb', line 50

def getFilename
  return @filename
end

#getFolderObject

  • Get the folder object.

Returns

  • Folder object.



230
231
232
# File 'lib/projects/model/Document.rb', line 230

def getFolder
  return @folder
end

#getFolderIdObject

  • Get the folder id.

Returns

  • Folder id.



150
151
152
# File 'lib/projects/model/Document.rb', line 150

def getFolderId
  return @folderId
end

#getIdObject

  • Get the document id.

Returns

  • Document id.



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

def getId
  return @id
end

#getNotifyObject

  • Get the notify for the document.

Returns

  • Notify for the document.



210
211
212
# File 'lib/projects/model/Document.rb', line 210

def getNotify
  return @notify
end

#getTagsObject

  • Get the tags for the document.

Returns

  • Tags for the document.



190
191
192
# File 'lib/projects/model/Document.rb', line 190

def getTags
  return @tags
end

#getUploaddocObject

  • Get the upload document file.

Returns

  • ArrayList of upload document file.



130
131
132
# File 'lib/projects/model/Document.rb', line 130

def getUploaddoc
  return @uploaddoc
end

#getURLObject

  • Get the document URL.

Returns

  • Document URL.



90
91
92
# File 'lib/projects/model/Document.rb', line 90

def getURL
  return @url
end

#getVersionsObject

  • Get the document version.

Returns

  • Document version.



110
111
112
# File 'lib/projects/model/Document.rb', line 110

def getVersions
  return @versions
end

#setContenttype(contenttype) ⇒ Object

  • Set the content type.

Parameters

  • contenttype
    • Content type of the file.



60
61
62
# File 'lib/projects/model/Document.rb', line 60

def setContenttype(contenttype)
  @contenttype = contenttype
end

#setDescription(description) ⇒ Object

  • Set the description of the document.

Parameters

  • description
    • Description of the document.



160
161
162
# File 'lib/projects/model/Document.rb', line 160

def setDescription(description)
  @description = description
end

#setFilename(filename) ⇒ Object

  • Set the file name.

Parameters

  • filename
    • Name of the file.



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

def setFilename(filename)
  @filename = filename
end

#setFolder(folder) ⇒ Object

  • Set the folder.

Parameters

  • folder
    • Folder object.



220
221
222
# File 'lib/projects/model/Document.rb', line 220

def setFolder(folder)
  @folder = folder
end

#setFolderId(folderId) ⇒ Object

  • Set the folder id.

Parameters

  • folderId
    • ID of the folder.



140
141
142
# File 'lib/projects/model/Document.rb', line 140

def setFolderId(folderId)
  @folderId = folderId
end

#setId(id) ⇒ Object

  • Set the document id.

Parameters

  • id
    • ID of the document.



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

def setId(id)
  @id = id
end

#setNotify(notify) ⇒ Object

  • Set the notify for the document.

Parameters

  • notify
    • Notify for the document.



200
201
202
# File 'lib/projects/model/Document.rb', line 200

def setNotify(notify)
  @notify = notify
end

#setTags(tags) ⇒ Object

  • Set the tags for the document.

Parameters

  • tags
    • Tags for the document.



180
181
182
# File 'lib/projects/model/Document.rb', line 180

def setTags(tags)
  @tags = tags
end

#setUploaddoc(uploaddoc) ⇒ Object

  • Set the upload document file.

Parameters

  • uploaddoc
    • ArrayList of the documents being uploaded.



120
121
122
# File 'lib/projects/model/Document.rb', line 120

def setUploaddoc(uploaddoc)
  @uploaddoc = uploaddoc
end

#setURL(url) ⇒ Object

  • Set the document URL.

Parameters

  • url
    • URL for the document.



80
81
82
# File 'lib/projects/model/Document.rb', line 80

def setURL(url)
  @url = url
end

#setVersions(versions) ⇒ Object

  • Set the document version.

Parameters

  • versions
    • Version for the document.



100
101
102
# File 'lib/projects/model/Document.rb', line 100

def setVersions(versions)
  @versions = versions
end

#toParamMAPObject

  • Convert the Document object into HashMap.

Returns

  • HashMap object.



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/projects/model/Document.rb', line 240

def toParamMAP
  requestBody = Hash.new
  
  if folderId != nil && folderId.to_i > 0
    requestBody["folder_id"] = folderId
  end
  if description != nil
    requestBody["description"] = description
  end
  if tags != nil
    requestBody["tags"] = tags
  end
  if notify != nil && notify.to_i > 0
    requestBody["notify"] = notify
  end
  
  return requestBody
end