/**
 *  Descibes the basic structure of a content request, including URL of the request, data type (json/xml), 
 *  and template to use for formatting the data.
 *
 *
 */
ContentRequestDO = Class.create();
Object.extend(ContentRequestDO.prototype, {

	/**
	*	define member vars for this class
	*
	*/
	initialize: function(contentSection, template, url, dataLengthRestriction, dataType, subRequests, collectionDesc, genre, thumbMediaID, dateCreated) {
		// contentSection is the ID of the HTML element that will contain the returned, formatted data.
		this.contentSection = contentSection;
		// template is the HTML template based on which the returned data is formatted
		this.template = template; 
		// url is the VMIX collections ID that is placed into the request - basically the identifier of the content - or it's an actual path to the generated content xml or html
		this.url = url;
		// dataLengthRestriction is an int that reflects the number of results to request.  This only applies to VMIX collection requests, which can be restricted by number.
		// In other words, if dataLengthRestriction == 3, the collection will be requested with a maximum return length of 3 collection items.  Note that if this is set to the default of 0,
		//  there will be no restriction on the length of the collection and all items will be returned and displayed.
		this.dataLengthRestriction = dataLengthRestriction;
		// dataType is the format of the returned data (xml, json, html).  This should be based on the constants for this class.
		this.dataType = dataType;
		// queueID is a unique token to identify this request so that it may be tracked and removed from the current request queue when completed
		this.queueID = '';
		// isComplete flag can be thrown when a request has been completed
		this.isComplete = false;
		// subRequests is an array of ContentRequestDO objects.  ContentRequestDO objects may contain other ContentRequestDO objects to accommodate cases where requests should be nested.
		// an example of this is a top-level images gallery like drag/images, where a single HTML page (the images content page) contains numerous separate collections (one for each team in the 
		// drag section). 
		this.subRequests = new Array();
		
			if(subRequests != null && subRequests != undefined) this.subRequests = subRequests;
		
		this.DATA_TYPE_XML = "xml";
		this.DATA_TYPE_JSON = "json";
		this.DATA_TYPE_HTML = "html";
		
		this.collectionDesc = collectionDesc;
		this.genre = genre;
		this.thumbMediaID = thumbMediaID;
		this.dateCreated = dateCreated;
	}
	
});
