text: Ext.data.JsonP.Gnt_model_Resource({"tagname":"class","name":"Gnt.model.Resource","autodetected":{"aliases":true,"alternateClassNames":true,"mixins":true,"requires":true,"uses":true,"members":true,"code_type":true},"files":[{"filename":"Resource.js","href":"Resource.html#Gnt-model-Resource"}],"extends":"Sch.model.Resource","aliases":{},"alternateClassNames":[],"mixins":[],"requires":[],"uses":[],"members":[{"name":"calendarIdField","tagname":"cfg","owner":"Gnt.model.Resource","id":"cfg-calendarIdField","meta":{}},{"name":"customizableFields","tagname":"cfg","owner":"Gnt.model.Resource","id":"cfg-customizableFields","meta":{}},{"name":"nameField","tagname":"cfg","owner":"Sch.model.Resource","id":"cfg-nameField","meta":{}},{"name":"calendarWaitingListener","tagname":"property","owner":"Gnt.model.Resource","id":"property-calendarWaitingListener","meta":{"private":true}},{"name":"normalized","tagname":"property","owner":"Gnt.model.Resource","id":"property-normalized","meta":{"private":true}},{"name":"adjustToCalendar","tagname":"method","owner":"Gnt.model.Resource","id":"method-adjustToCalendar","meta":{"private":true}},{"name":"assignTo","tagname":"method","owner":"Gnt.model.Resource","id":"method-assignTo","meta":{}},{"name":"collectAvailabilityIntervalPoints","tagname":"method","owner":"Gnt.model.Resource","id":"method-collectAvailabilityIntervalPoints","meta":{"private":true}},{"name":"forEachAssignment","tagname":"method","owner":"Gnt.model.Resource","id":"method-forEachAssignment","meta":{}},{"name":"forEachAvailabilityIntervalWithTasks","tagname":"method","owner":"Gnt.model.Resource","id":"method-forEachAvailabilityIntervalWithTasks","meta":{"private":true}},{"name":"forEachTask","tagname":"method","owner":"Gnt.model.Resource","id":"method-forEachTask","meta":{}},{"name":"getAllocationInfo","tagname":"method","owner":"Gnt.model.Resource","id":"method-getAllocationInfo","meta":{}},{"name":"getCalendar","tagname":"method","owner":"Gnt.model.Resource","id":"method-getCalendar","meta":{}},{"name":"getEventStore","tagname":"method","owner":"Gnt.model.Resource","id":"method-getEventStore","meta":{"private":true}},{"name":"getEvents","tagname":"method","owner":"Gnt.model.Resource","id":"method-getEvents","meta":{}},{"name":"getInternalId","tagname":"method","owner":"Gnt.model.Resource","id":"method-getInternalId","meta":{"private":true}},{"name":"getName","tagname":"method","owner":"Sch.model.Resource","id":"method-getName","meta":{}},{"name":"getOwnCalendar","tagname":"method","owner":"Gnt.model.Resource","id":"method-getOwnCalendar","meta":{}},{"name":"getProjectCalendar","tagname":"method","owner":"Gnt.model.Resource","id":"method-getProjectCalendar","meta":{}},{"name":"getTaskStore","tagname":"method","owner":"Gnt.model.Resource","id":"method-getTaskStore","meta":{"private":true}},{"name":"getTasks","tagname":"method","owner":"Gnt.model.Resource","id":"method-getTasks","meta":{}},{"name":"setCalendar","tagname":"method","owner":"Gnt.model.Resource","id":"method-setCalendar","meta":{}},{"name":"setCalendarId","tagname":"method","owner":"Gnt.model.Resource","id":"method-setCalendarId","meta":{"private":true}},{"name":"setName","tagname":"method","owner":"Sch.model.Resource","id":"method-setName","meta":{}},{"name":"unAssignFrom","tagname":"method","owner":"Gnt.model.Resource","id":"method-unAssignFrom","meta":{}},{"name":"unassignFrom","tagname":"method","owner":"Gnt.model.Resource","id":"method-unassignFrom","meta":{}}],"code_type":"ext_define","id":"class-Gnt.model.Resource","short_doc":"This class represents a single Resource in your gantt chart. ...","component":false,"superclasses":["Ext.data.Model","Sch.model.Customizable","Sch.model.Resource"],"subclasses":[],"mixedInto":[],"parentMixins":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'>Ext.data.Model<div class='subclass '><a href='#!/api/Sch.model.Customizable' rel='Sch.model.Customizable' class='docClass'>Sch.model.Customizable</a><div class='subclass '><a href='#!/api/Sch.model.Resource' rel='Sch.model.Resource' class='docClass'>Sch.model.Resource</a><div class='subclass '><strong>Gnt.model.Resource</strong></div></div></div></div><h4>Files</h4><div class='dependency'><a href='source/Resource.html#Gnt-model-Resource' target='_blank'>Resource.js</a></div></pre><div class='doc-contents'><p>This class represents a single Resource in your gantt chart.\nThe inheritance hierarchy of this class includes <a href=\"#!/api/Sch.model.Customizable\" rel=\"Sch.model.Customizable\" class=\"docClass\">Sch.model.Customizable</a> and Ext.data.Model classes.\nPlease refer to the documentation of those classes to become familar with the base interface of this class.</p>\n\n<p>A Resource has only 2 mandatory fields - <code>Id</code> and <code>Name</code>. If you want to add some fields, describing resources - subclass this class:</p>\n\n<pre><code>Ext.define('MyProject.model.Resource', {\n    extend      : '<a href=\"#!/api/Gnt.model.Resource\" rel=\"Gnt.model.Resource\" class=\"docClass\">Gnt.model.Resource</a>',\n\n    fields      : [\n        // `Id` and `Name` fields are already provided by the superclass\n        { name: 'Company',          type : 'string' }\n    ],\n\n    getCompany : function () {\n        return this.get('Company')\n    },\n    ...\n})\n</code></pre>\n\n<p>The name of any field can be customized in the subclass. Please refer to <a href=\"#!/api/Sch.model.Customizable\" rel=\"Sch.model.Customizable\" class=\"docClass\">Sch.model.Customizable</a> for details.</p>\n\n<p>See also: <a href=\"#!/api/Gnt.model.Assignment\" rel=\"Gnt.model.Assignment\" class=\"docClass\">Gnt.model.Assignment</a>, <a href=\"#!/api/Gnt.column.ResourceAssignment\" rel=\"Gnt.column.ResourceAssignment\" class=\"docClass\">Gnt.column.ResourceAssignment</a></p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-calendarIdField' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-cfg-calendarIdField' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-cfg-calendarIdField' class='name expandable'>calendarIdField</a> : String<span class=\"signature\"></span></div><div class='description'><div class='short'>The name of the field defining the id of the calendar for this specific resource. ...</div><div class='long'><p>The name of the field defining the id of the calendar for this specific resource.</p>\n<p>Defaults to: <code>'CalendarId'</code></p></div></div></div><div id='cfg-customizableFields' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-cfg-customizableFields' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-cfg-customizableFields' class='name expandable'>customizableFields</a> : Array<span class=\"signature\"></span></div><div class='description'><div class='short'>The array of customizale fields definitions. ...</div><div class='long'><p>The array of customizale fields definitions.</p>\n<p>Defaults to: <code>['CalendarId']</code></p><p>Overrides: <a href=\"#!/api/Sch.model.Customizable-cfg-customizableFields\" rel=\"Sch.model.Customizable-cfg-customizableFields\" class=\"docClass\">Sch.model.Customizable.customizableFields</a></p></div></div></div><div id='cfg-nameField' class='member  inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Sch.model.Resource' rel='Sch.model.Resource' class='defined-in docClass'>Sch.model.Resource</a><br/><a href='source/Resource3.html#Sch-model-Resource-cfg-nameField' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Sch.model.Resource-cfg-nameField' class='name expandable'>nameField</a> : String<span class=\"signature\"></span></div><div class='description'><div class='short'>The name of the field that holds the resource name. ...</div><div class='long'><p>The name of the field that holds the resource name. Defaults to \"Name\".</p>\n<p>Defaults to: <code>'Name'</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-calendarWaitingListener' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-property-calendarWaitingListener' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-property-calendarWaitingListener' class='name expandable'>calendarWaitingListener</a> : Object<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'>\n</div><div class='long'>\n</div></div></div><div id='property-normalized' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-property-normalized' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-property-normalized' class='name expandable'>normalized</a> : Boolean<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>false</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-adjustToCalendar' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-adjustToCalendar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-adjustToCalendar' class='name expandable'>adjustToCalendar</a>( <span class='pre'></span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-assignTo' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-assignTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-assignTo' class='name expandable'>assignTo</a>( <span class='pre'>taskOrId, units, [callback]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Assigns this resource to a given task. ...</div><div class='long'><p>Assigns this resource to a given task. A new <a href=\"#!/api/Gnt.model.Assignment\" rel=\"Gnt.model.Assignment\" class=\"docClass\">assignment</a> will be created\nand added to the <a href=\"#!/api/Gnt.data.AssignmentStore\" rel=\"Gnt.data.AssignmentStore\" class=\"docClass\">Gnt.data.AssignmentStore</a> of the project.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>taskOrId</span> : <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a>/Number<div class='sub-desc'><p>Either instance of <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a> or id of the task</p>\n</div></li><li><span class='pre'>units</span> : Number<div class='sub-desc'><p>The value for the \"Units\" field</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>Callback function to call after resource has been assigned and possible changes among dependent tasks was propagated.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cancelChanges</span> : Boolean<div class='sub-desc'><p>Flag showing that the setting has caused a constraint violation\n and a user opted for canceling the change and thus nothing has been updated.</p>\n</div></li><li><span class='pre'>affectedTasks</span> : Object<div class='sub-desc'><p>Object containing a map (by id) of tasks affected by changes propagation.</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-collectAvailabilityIntervalPoints' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-collectAvailabilityIntervalPoints' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-collectAvailabilityIntervalPoints' class='name expandable'>collectAvailabilityIntervalPoints</a>( <span class='pre'>intervals, getStartPoint, getEndPoint, pointsByTime, pointTimes</span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>intervals</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>getStartPoint</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>getEndPoint</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>pointsByTime</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>pointTimes</span> : Object<div class='sub-desc'></div></li></ul></div></div></div><div id='method-forEachAssignment' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-forEachAssignment' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-forEachAssignment' class='name expandable'>forEachAssignment</a>( <span class='pre'>func, scope</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Iterator for each assignment, associated with this resource. ...</div><div class='long'><p>Iterator for each assignment, associated with this resource.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>func</span> : Function<div class='sub-desc'><p>The function to call. This function will receive an <a href=\"#!/api/Gnt.model.Assignment\" rel=\"Gnt.model.Assignment\" class=\"docClass\">assignment</a> instance\nas the only argument</p>\n</div></li><li><span class='pre'>scope</span> : Object<div class='sub-desc'><p>The scope to run the function in.</p>\n</div></li></ul></div></div></div><div id='method-forEachAvailabilityIntervalWithTasks' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-forEachAvailabilityIntervalWithTasks' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-forEachAvailabilityIntervalWithTasks' class='name expandable'>forEachAvailabilityIntervalWithTasks</a>( <span class='pre'>options, func, scope</span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>func</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>scope</span> : Object<div class='sub-desc'></div></li></ul></div></div></div><div id='method-forEachTask' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-forEachTask' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-forEachTask' class='name expandable'>forEachTask</a>( <span class='pre'>func, scope</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Iterator for tasks, assigned to this resource. ...</div><div class='long'><p>Iterator for tasks, assigned to this resource.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>func</span> : Function<div class='sub-desc'><p>The function to call. This function will receive an <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">task</a> instance\nas the only argument.</p>\n</div></li><li><span class='pre'>scope</span> : Object<div class='sub-desc'><p>The scope to run the function in.</p>\n</div></li></ul></div></div></div><div id='method-getAllocationInfo' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getAllocationInfo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getAllocationInfo' class='name expandable'>getAllocationInfo</a>( <span class='pre'>options</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This method will generate a report about the resource allocation in the given timeframe. ...</div><div class='long'><p>This method will generate a report about the resource allocation in the given timeframe.\nThe start and end dates of the timeframe are provided as the \"startDate/endDate\" properties of the <code>options</code> parameter.\nOptions may also contain additional property: <code>includeAllIntervals</code> which includes the intervals w/o any\nassignments in the ouput (see the example below).</p>\n\n<p>For example, this resource <code>R1</code> has the availability from 10:00 till 17:00 on 2012/06/01 and from 12:00 till 15:00 on 2012/06/02.\nIt is also assigned on 50% to two tasks:</p>\n\n<ul>\n<li><code>T1</code> has availability from 11:00 till 16:00 on 2012/06/01 and from 13:00 till 17:00 on 2012/06/02.\nIt starts at 11:00 2012/06/01 and ends at 17:00 2012/06/02</li>\n<li><code>T2</code> has availability from 15:00 till 19:00 on 2012/06/01 and from 09:00 till 14:00 on 2012/06/02.\nIt starts at 15:00 2012/06/01 and ends at 14:00 2012/06/02</li>\n</ul>\n\n\n<p>So the allocation information for the period 2012/06/01 - 2012/06/03 (note the 03 in day - it means 2012/06/02 inclusive)\nwill looks like the following (to better understand this example you might want to draw all the information on the paper):</p>\n\n<pre><code>[\n    {\n        startDate           : new Date(2012, 5, 1, 11),\n        endDate             : new Date(2012, 5, 1, 15),\n        totalAllocation     : 50,\n        assignments         : [ assignmentForTask1 ],\n        assignmentsHash     : { 'T1' : assignmentForTask1 },\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 1\n    },\n    {\n        startDate           : new Date(2012, 5, 1, 15),\n        endDate             : new Date(2012, 5, 1, 16),\n        totalAllocation     : 100,\n        assignments         : [ assignmentForTask1, assignmentForTask2 ],\n        assignmentsHash     : {\n            'T1' : assignmentForTask1,\n            'T2' : assignmentForTask2\n        },\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 2\n    },\n    {\n        startDate           : new Date(2012, 5, 1, 16),\n        endDate             : new Date(2012, 5, 1, 17),\n        totalAllocation     : 50,\n        assignments         : [ assignmentForTask2 ],\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 2\n    },\n    {\n        startDate           : new Date(2012, 5, 2, 12),\n        endDate             : new Date(2012, 5, 2, 13),\n        totalAllocation     : 50,\n        assignments         : [ assignmentForTask2 ],\n        assignmentsHash     : { 'T2' : assignmentForTask2 },\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 2\n    },\n    {\n        startDate           : new Date(2012, 5, 2, 13),\n        endDate             : new Date(2012, 5, 2, 14),\n        totalAllocation     : 100,\n        assignments         : [ assignmentForTask1, assignmentForTask2 ],\n        assignmentsHash     : {\n            'T1' : assignmentForTask1,\n            'T2' : assignmentForTask2\n        },\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 2\n    },\n    {\n        startDate           : new Date(2012, 5, 2, 14),\n        endDate             : new Date(2012, 5, 2, 15),\n        totalAllocation     : 50,\n        assignments         : [ assignmentForTask1 ],\n        assignmentsHash     : { 'T1' : assignmentForTask1 },\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 1\n    },\n]\n</code></pre>\n\n<p>As you can see its quite detailed information - every distinct timeframe is included in the report.\nYou can aggregate this information as you need.</p>\n\n<p>Setting the <code>includeAllIntervals</code> option to true, will include intervals w/o assignments in the report, so the in the\nexample above, the report will start with:</p>\n\n<pre><code>[\n    {\n        startDate           : new Date(2012, 5, 1, 00),\n        endDate             : new Date(2012, 5, 1, 10),\n        totalAllocation     : 0,\n        assignments         : [],\n        assignmentsHash     : {},\n        inResourceCalendar  : false,\n        inTasksCalendar     : false,\n        inTask              : 0\n    },\n    {\n        startDate           : new Date(2012, 5, 1, 10),\n        endDate             : new Date(2012, 5, 1, 11),\n        totalAllocation     : 0,\n        assignments         : [],\n        assignmentsHash     : {},\n        inResourceCalendar  : true,\n        inTasksCalendar     : false,\n        inTask              : 0\n    },\n    {\n        startDate           : new Date(2012, 5, 1, 11),\n        endDate             : new Date(2012, 5, 1, 15),\n        totalAllocation     : 50,\n        assignments         : [ assignmentForTask1 ],\n        assignmentsHash     : { 'T1' : assignmentForTask1 }\n        inResourceCalendar  : true,\n        inTasksCalendar     : true,\n        inTask              : 1\n    },\n    ...\n]\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>Object with the following properties:</p>\n\n<ul>\n<li>\"startDate\" - start date for the report timeframe</li>\n<li>\"endDate\" - end date for the report timeframe</li>\n<li>\"includeAllIntervals\" - whether to include the intervals w/o assignments in the report</li>\n<li>\"includeResCalIntervals\" - whether to include the intervals of resource calendar in the report</li>\n</ul>\n\n</div></li></ul></div></div></div><div id='method-getCalendar' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getCalendar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getCalendar' class='name expandable'>getCalendar</a>( <span class='pre'>ownCalendarOnly</span> ) : <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a><span class=\"signature\"></span></div><div class='description'><div class='short'>Returns the calendar, based on which is performed the schedule calculations for associated tasks. ...</div><div class='long'><p>Returns the calendar, based on which is performed the schedule calculations for associated tasks.\nIt will be either the own calendar of this resource (if any) or the calendar of the whole project.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>ownCalendarOnly</span> : Boolean<div class='sub-desc'><p>Pass <code>true</code> to return only own calendar.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a></span><div class='sub-desc'><p>The instance of calendar</p>\n</div></li></ul></div></div></div><div id='method-getEventStore' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getEventStore' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getEventStore' class='name expandable'>getEventStore</a>( <span class='pre'></span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getEvents' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getEvents' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getEvents' class='name expandable'>getEvents</a>( <span class='pre'></span> ) : <a href=\"#!/api/Sch.model.Event\" rel=\"Sch.model.Event\" class=\"docClass\">Sch.model.Event</a>[]<span class=\"signature\"></span></div><div class='description'><div class='short'>Returns an array of tasks associated with this resource ...</div><div class='long'><p>Returns an array of tasks associated with this resource</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Sch.model.Event\" rel=\"Sch.model.Event\" class=\"docClass\">Sch.model.Event</a>[]</span><div class='sub-desc'>\n</div></li></ul><p>Overrides: <a href=\"#!/api/Sch.model.Resource-method-getEvents\" rel=\"Sch.model.Resource-method-getEvents\" class=\"docClass\">Sch.model.Resource.getEvents</a></p></div></div></div><div id='method-getInternalId' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getInternalId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getInternalId' class='name expandable'>getInternalId</a>( <span class='pre'></span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'>We'll be using internalId for Id substitution when dealing with phantom records ...</div><div class='long'><p>We'll be using <code>internalId</code> for Id substitution when dealing with phantom records</p>\n</div></div></div><div id='method-getName' class='member  inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Sch.model.Resource' rel='Sch.model.Resource' class='defined-in docClass'>Sch.model.Resource</a><br/><a href='source/Resource3.html#Sch-model-Resource-method-getName' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Sch.model.Resource-method-getName' class='name expandable'>getName</a>( <span class='pre'></span> ) : String<span class=\"signature\"></span></div><div class='description'><div class='short'>Returns the resource name ...</div><div class='long'><p>Returns the resource name</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'>String</span><div class='sub-desc'><p>The name of the resource</p>\n</div></li></ul></div></div></div><div id='method-getOwnCalendar' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getOwnCalendar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getOwnCalendar' class='name expandable'>getOwnCalendar</a>( <span class='pre'></span> ) : <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a><span class=\"signature\"></span></div><div class='description'><div class='short'>Returns the calendar instance, associated with this resource (if any). ...</div><div class='long'><p>Returns the <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">calendar</a> instance, associated with this resource (if any). See also <a href=\"#!/api/Gnt.model.Resource-cfg-calendarIdField\" rel=\"Gnt.model.Resource-cfg-calendarIdField\" class=\"docClass\">calendarIdField</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a></span><div class='sub-desc'><p>calendar</p>\n</div></li></ul></div></div></div><div id='method-getProjectCalendar' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getProjectCalendar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getProjectCalendar' class='name expandable'>getProjectCalendar</a>( <span class='pre'></span> ) : <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a><span class=\"signature\"></span></div><div class='description'><div class='short'>Returns the calendar instance, associated with the project of this resource (with the TaskStore instance\nthis resourc...</div><div class='long'><p>Returns the <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">calendar</a> instance, associated with the project of this resource (with the TaskStore instance\nthis resource belongs to).</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a></span><div class='sub-desc'><p>calendar</p>\n</div></li></ul></div></div></div><div id='method-getTaskStore' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getTaskStore' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getTaskStore' class='name expandable'>getTaskStore</a>( <span class='pre'></span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-getTasks' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-getTasks' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-getTasks' class='name expandable'>getTasks</a>( <span class='pre'></span> ) : <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a>[]<span class=\"signature\"></span></div><div class='description'><div class='short'>Returns an array of tasks associated with this resource ...</div><div class='long'><p>Returns an array of tasks associated with this resource</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a>[]</span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-setCalendar' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-setCalendar' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-setCalendar' class='name expandable'>setCalendar</a>( <span class='pre'>calendar</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Sets the calendar, associated with this resource. ...</div><div class='long'><p>Sets the <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">calendar</a>, associated with this resource. Calendar must have a <a href=\"#!/api/Gnt.data.Calendar-cfg-calendarId\" rel=\"Gnt.data.Calendar-cfg-calendarId\" class=\"docClass\">calendarId</a> property\ndefined, which will be saved in the <code>CalendarId</code> field of this task.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>calendar</span> : <a href=\"#!/api/Gnt.data.Calendar\" rel=\"Gnt.data.Calendar\" class=\"docClass\">Gnt.data.Calendar</a>/String<div class='sub-desc'><p>A calendar instance or string with calendar id</p>\n</div></li></ul></div></div></div><div id='method-setCalendarId' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-setCalendarId' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-setCalendarId' class='name expandable'>setCalendarId</a>( <span class='pre'>calendarId, isInitial</span> )<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>calendarId</span> : Object<div class='sub-desc'></div></li><li><span class='pre'>isInitial</span> : Object<div class='sub-desc'></div></li></ul></div></div></div><div id='method-setName' class='member  inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Sch.model.Resource' rel='Sch.model.Resource' class='defined-in docClass'>Sch.model.Resource</a><br/><a href='source/Resource3.html#Sch-model-Resource-method-setName' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Sch.model.Resource-method-setName' class='name expandable'>setName</a>( <span class='pre'>The</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Sets the resource name ...</div><div class='long'><p>Sets the resource name</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>The</span> : String<div class='sub-desc'><p>new name of the resource</p>\n</div></li></ul></div></div></div><div id='method-unAssignFrom' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-unAssignFrom' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-unAssignFrom' class='name expandable'>unAssignFrom</a>( <span class='pre'>taskOrId, [callback]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Un assigns this resource from the given task. ...</div><div class='long'><p>Un assigns this resource from the given task. The corresponding <a href=\"#!/api/Gnt.model.Assignment\" rel=\"Gnt.model.Assignment\" class=\"docClass\">assignment</a> record\nwill be removed from the <a href=\"#!/api/Gnt.data.AssignmentStore\" rel=\"Gnt.data.AssignmentStore\" class=\"docClass\">Gnt.data.AssignmentStore</a> of the project.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>taskOrId</span> : <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a>/Number<div class='sub-desc'><p>Either instance of <a href=\"#!/api/Gnt.model.Task\" rel=\"Gnt.model.Task\" class=\"docClass\">Gnt.model.Task</a> or id of the task</p>\n</div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>Callback function to call after resource has been unassigned and possible changes among dependent tasks was propagated.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>cancelChanges</span> : Boolean<div class='sub-desc'><p>Flag showing that the setting has caused a constraint violation\n and a user opted for canceling the change and thus nothing has been updated.</p>\n</div></li><li><span class='pre'>affectedTasks</span> : Object<div class='sub-desc'><p>Object containing a map (by id) of tasks affected by changes propagation.</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-unassignFrom' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Gnt.model.Resource'>Gnt.model.Resource</span><br/><a href='source/Resource.html#Gnt-model-Resource-method-unassignFrom' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Gnt.model.Resource-method-unassignFrom' class='name expandable'>unassignFrom</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Alias to unAsignFrom. ...</div><div class='long'><p>Alias to unAsignFrom.</p>\n</div></div></div></div></div></div></div>","meta":{}});