1 /** 2 * @fileOverview JavaScript representation of the Finesse Team Wrap Up Reason object. 3 * 4 * @name finesse.restservices.TeamWrapUpReason 5 * @requires finesse.clientservices.ClientServices 6 * @requires Class 7 * @requires finesse.FinesseBase 8 * @requires finesse.restservices.RestBase 9 */ 10 11 var finesse = finesse || {}; 12 finesse.restservices = finesse.restservices || {}; 13 14 /** @private */ 15 finesse.restservices.TeamWrapUpReason = finesse.restservices.RestBase.extend(/** @lends finesse.restservices.TeamWrapUpReason.prototype */{ 16 17 /** 18 * @class 19 * JavaScript representation of a TeamWrapUpReason object. Also exposes 20 * methods to operate on the object against the server. 21 * 22 * @param {Object} options 23 * An object with the following properties:<ul> 24 * <li><b>id:</b> The id of the object being constructed</li> 25 * <li><b>onLoad(this): (optional)</b> when the object is successfully loaded from the server</li> 26 * <li><b>onChange(this): (optional)</b> when an update notification of the object is received</li> 27 * <li><b>onAdd(this): (optional)</b> when a notification that the object is created is received</li> 28 * <li><b>onDelete(this): (optional)</b> when a notification that the object is deleted is received</li> 29 * <li><b>onError(rsp): (optional)</b> if loading of the object fails, invoked with the error response object:<ul> 30 * <li><b>status:</b> {Number} The HTTP status code returned</li> 31 * <li><b>content:</b> {String} Raw string of response</li> 32 * <li><b>object:</b> {Object} Parsed object of response</li> 33 * <li><b>error:</b> {Object} Wrapped exception that was caught:<ul> 34 * <li><b>errorType:</b> {String} Type of error that was caught</li> 35 * <li><b>errorMessage:</b> {String} Message associated with error</li> 36 * </ul></li> 37 * </ul></li> 38 * <li><b>parentObj: (optional)</b> The parent object</li></ul> 39 * @constructs finesse.restservices.TeamWrapUpReason 40 **/ 41 init: function (options) { 42 this._super(options); 43 }, 44 45 /** 46 * @private 47 * Gets the REST class for the current object - this is the TeamWrapUpReason class. 48 * @returns {Object} The TeamWrapUpReason class. 49 */ 50 getRestClass: function () { 51 return finesse.restservices.TeamWrapUpReason; 52 }, 53 54 /** 55 * @private 56 * Gets the REST type for the current object - this is a "WrapUpReason". 57 * @returns {String} The WrapUpReason string. 58 */ 59 getRestType: function () { 60 return "WrapUpReason"; 61 }, 62 63 /** 64 * @private 65 * Override default to indicate that this object doesn't support making 66 * requests. 67 */ 68 supportsRequests: false, 69 70 /** 71 * @private 72 * Override default to indicate that this object doesn't support subscriptions. 73 */ 74 supportsSubscriptions: false, 75 76 /** 77 * Getter for the label. 78 * @returns {String} The label. 79 */ 80 getLabel: function () { 81 this.isLoaded(); 82 return this.getData().label; 83 }, 84 85 /** 86 * Getter for the forAll value. 87 * @returns {String} The forAll. 88 */ 89 getForAll: function () { 90 this.isLoaded(); 91 return this.getData().forAll; 92 }, 93 94 /** 95 * Getter for the Uri value. 96 * @returns {String} The Uri. 97 */ 98 getUri: function () { 99 this.isLoaded(); 100 return this.getData().uri; 101 } 102 103 }); 104 105