App.Collections.Drafts = Backbone.Collection.extend({
	model : App.Models.Draft,
	composeID:'',
	readReceipt:false,
	to:[],
	cc:[],
	bcc:[],
	subject:'Untitled Message',
	body:'',
	relatedDraftUID:[],
	relatedMessageUIDs:[],
	relatedMessageFolder:'',
	attachmentsFilename:[],
	attachmentsfilenameOriginal:[],
	attachmentsmimeType:[],
	attachmentsName:[],
	relatedMessageMessageId:'',
	relatedMessageResponseType:'',
	url: function(){
		var acct = App.email.getCurrentAcct();
		return App.baseUrl + '/mail/composemessage/savedraft?acct=' + acct + '&'
		+'attachments['+this.attachmentName+'=][filename]='+this.attachmentsFilename
		+'attachments['+this.attachmentName+'=][filenameOriginal]='+this.attachmentsfilenameOriginal
		+'attachments['+this.attachmentName+'=][mimeType]='+this.attachmentsmimeType
		+'&composeID='+ this.composeID
		+'&emailBcc='+ this.bcc
		+'&emailBodyHtml='+ this.body
		+'&emailCc='+ this.cc
		+'&emailSubject='+ this.subject
		+'&emailTo='+ this.to
		+'&readReceiptRequested='+ this.readReceipt
		+'&relatedDraftUID='+ this.relatedDraftUID
		+'&relatedMessageFolder='+ this.relatedMessageFolder
		+'&relatedMessageMessageId='+ this.relatedMessageMessageId
		+'&relatedMessageResponseType='+ this.relatedMessageResponseType
		+'&relatedMessageUIDs='+ this.relatedMessageUIDs
		;
	}
})

App.Collections.Drafts.prototype.setcomposeID = function(composeID){
	this.composeID = composeID;
};

App.Collections.Drafts.prototype.setreadReceipt = function(readReceipt){
	this.readReceipt = readReceipt;
};

App.Collections.Drafts.prototype.setTo = function(to){
	this.to = to;
};

App.Collections.Drafts.prototype.setCC = function(cc){
	this.cc = cc;
};

App.Collections.Drafts.prototype.setBCC = function(bcc){
	this.bcc = bcc;
};

App.Collections.Drafts.prototype.setSubject = function(subject){
	this.subject = subject;
};

App.Collections.Drafts.prototype.setBody = function(body){
	this.body = body;
};

App.Collections.Drafts.prototype.setRelatedDraftUID = function(relatedDraftUID){
	this.relatedDraftUID = relatedDraftUID;
};

App.Collections.Drafts.prototype.setRelatedMessageUIDs = function(relatedMessageUIDs){
	this.relatedMessageUIDs = relatedMessageUIDs;
};

App.Collections.Drafts.prototype.setRelatedMessageFolder = function(relatedMessageFolder){
	this.relatedMessageFolder = relatedMessageFolder;
};

App.Collections.Drafts.prototype.setAttachmentsFilename = function(attachmentsFilename){
	this.attachmentsFilename = attachmentsFilename;
};

App.Collections.Drafts.prototype.setAttachmentsfilenameOriginal = function(attachmentsfilenameOriginal){
	this.attachmentsfilenameOriginal = attachmentsfilenameOriginal;
};

App.Collections.Drafts.prototype.setAttachmentsmimeType = function(attachmentsmimeType){
	this.attachmentsmimeType = attachmentsmimeType;
};

App.Collections.Drafts.prototype.setAttachmentName = function(attachmentName){
	this.attachmentName = attachmentName;
};

App.Collections.Drafts.prototype.setRelatedMessageMessageId = function(relatedMessageMessageId){
	this.relatedMessageMessageId = relatedMessageMessageId;
};

App.Collections.Drafts.prototype.setRelatedMessageResponseType = function(relatedMessageResponseType){
	this.relatedMessageResponseType = relatedMessageResponseType;
};
