Class finesse.restservices.Team
Extends
finesse.restservices.RestBase.
JavaScript representation of a Team object. Also exposes methods to operate
on the object against the server.
Defined in: finesse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.Team(options)
|
- Fields borrowed from class finesse.restservices.RestBase:
- ajaxRequestTimeout, restResponseStatus
Method Attributes | Method Name and Description |
---|---|
getId()
Getter for the team id.
|
|
getName()
Getter for the team name.
|
|
getUsers(options)
Constructs and returns a collection of Users.
|
- Methods borrowed from class finesse.restservices.RestBase:
- addHandler, getBaseRestUrl, getData, getProperty, getRestUrlAdditionalParameters, hasProperty, isLoaded, refresh, removeHandler
Class Detail
finesse.restservices.Team(options)
_team = new finesse.restservices.Team({ id: _id, onLoad : _handleTeamLoad(team), onChange : _handleTeamChange(team) });
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) when the object is successfully loaded from the server
- onChange(this): (optional) when an update notification of the object is received
- onAdd(this): (optional) when a notification that the object is created is received
- onDelete(this): (optional) when a notification that the object is deleted is received
- onError(rsp): (optional) if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- parentObj: (optional) The parent object
Method Detail
{String}
getId()
Getter for the team id.
- Returns:
- {String} The team id.
{String}
getName()
Getter for the team name.
- Returns:
- {String} The team name
{finesse.restservices.Users}
getUsers(options)
Constructs and returns a collection of Users.
- Parameters:
- {Object} options
- that sets callback handlers.
An object with the following properties:
- onLoad(users): (optional) when the object is successfully loaded from the server
- onError(): (optional) if loading of the object fails, invoked with the error response object
- Returns:
- {finesse.restservices.Users} Users collection of User objects.