Class: UserDelegation

UserDelegation

new UserDelegation()

Create a new instance of Delegation
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
Source:
See:

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:

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:

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:

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:

generateUrl()

Overrides Resource's generateUrl method to return the request url
Source:
See:

loadPreset()

Overrides Resource's loadPreset method.
Source:
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:
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:

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: