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

#getContenttype ⇒ Object

  • 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

#getDescription ⇒ Object

  • 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

#getFilename ⇒ Object



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

def getFilename
	return @filename
end

#getFolder ⇒ Object

  • Get the folder object.

Returns

  • Folder object.


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

def getFolder
	return @folder
end

#getFolderId ⇒ Object

  • Get the folder id.

Returns

  • Folder id.


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

def getFolderId
	return @folderId
end

#getId ⇒ Object

  • Get the document id.

Returns

  • Document id.


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

def getId
	return @id
end

#getNotify ⇒ Object

  • 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

#getTags ⇒ Object

  • 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

#getUploaddoc ⇒ Object

  • 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

#getURL ⇒ Object

  • Get the document URL.

Returns

  • Document URL.


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

def getURL
	return @url
end

#getVersions ⇒ Object

  • 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

#toParamMAP ⇒ Object

  • 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