new UserDelegation()
Create a new instance of Delegation
- Source:
- User/UserDelegation.js, line 31
- See:
Properties:
Name | Type | Description |
---|---|---|
startDate |
String | string representation of the start of the delegation |
status |
String | Status of the delegation |
author |
User | the user that generated the delegation |
contributor |
User | the contributor |
Methods
-
Activate(options)
-
Activate a loaded delegation. The Activate function sets the Status to ACTIVE and updates the delegation
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used - Source:
- User/UserDelegation.js, line 127
-
Deactivate(options)
-
Deactivate a loaded delegation. The Deactivate function sets the Status to INACTIVE and updates the delegation
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used - Source:
- User/UserDelegation.js, line 139
-
deleteDelegation(options)
-
Delete delegation. The Delete function removes a loaded delegation
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used - Source:
- User/UserDelegation.js, line 163
-
generate_xml(options)
-
Generates a save/update xml to be posted to the server.
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used status
string <optional>
status of delegation (will be set to PENDING if null) author
User user delegating contributor
User user delegated project
project <optional>
project associated startDate
Date expiration date - Source:
- User/UserDelegation.js, line 185
-
generateUrl()
-
Overrides Resource's generateUrl method to return the request url
- Source:
- User/UserDelegation.js, line 57
- See:
-
loadPreset()
-
Overrides Resource's loadPreset method.
- Source:
- User/UserDelegation.js, line 51
- See:
-
loadSet(rObject)
-
Overrides Resource's loadSet method to set local variables after request.
Parameters:
Name Type Description rObject
json JSON representation of the loaded data. - Source:
- User/UserDelegation.js, line 67
- See:
-
setPending(options)
-
Pending a loaded delegation. The Pending function sets the Status to PENDING and updates the delegation
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used - Source:
- User/UserDelegation.js, line 151
-
update(options)
-
update a delegation with previously set values.
Parameters:
Name Type Description options
object options to be used during the call
Properties
Name Type Argument Description onSuccess
Resource~onSuccess a callback function called in case of a success onFailure
Resource~onFailure <optional>
a callback function called in case of a failure baseUrl
String <optional>
base URL. If not set the current base URL will be used - Source:
- User/UserDelegation.js, line 109