Constructor
new module:ct-watchlist /testing /Watchlist Service Stub()
- Implements:
- ct-watchlist/WatchlistService
Methods
add Watchlist(properties) → {module:ct-watchlist /Watchlist}
A stub method used for adding watchlists without having to respond to a request for creation. This can be used to simulate watchlists being created on a different device.
Parameters:
Name | Type | Description |
---|---|---|
properties |
map | The properties of the watchlist being added. |
Returns:
The added watchlist.
create(name, error, success)
Fires a CREATE_REQUESTED event (see module:ct-watchlist/testing/WatchlistServiceStubEvents
) if the service status is
AVAILABLE, or fires the error callback otherwise.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the watchlist to be created. |
error |
function | A callback that will be invoked if the request fails. |
success |
function | A callback that will be invoked when the request succeeds. |
- Implements:
- See:
dispose(watchlists, error, success)
Fires a DISPOSE_REQUESTED event (see module:ct-watchlist/testing/WatchlistServiceStubEvents
) if the service status is
AVAILABLE, or fires the error callback otherwise.
Parameters:
Name | Type | Description |
---|---|---|
watchlists |
Array |
The watchlists to dispose of. |
error |
function | A callback that will be invoked if the request fails. |
success |
function | A callback that will be invoked when the request succeeds. |
- Implements:
- See:
get ById()
- Implements:
get Contents Manager()
get Id()
get Name()
get Subject()
get Watchlist Count()
get Watchlists()
property Changed(name, value)
Stub method to change the value of one of this watchlist's properties.
Parameters:
Name | Type | Description |
---|---|---|
name |
The name of the property to change. |
|
value |
The new value for the changed property. |
remove Watchlist(watchlist)
A stub method used for removing watchlists without having to respond to a request for disposal. This can be used to simulate watchlists being removed on a different device.
Parameters:
Name | Type | Description |
---|---|---|
watchlist |
module:ct-watchlist |
The removed watchlist. |
set Name()
set Status(status)
A stub method used to set the status of the service, representing the availability of its data
Parameters:
Name | Type | Description |
---|---|---|
status |
module:ct-services |
The new status of the service. |
subjects Added(subjects)
Stub method to add subjects to this watchlist.
Parameters:
Name | Type | Description |
---|---|---|
subjects |
array | The subjects to add to this watchlist. |
subjects Removed(subjects)
Stub method to remove subjects from this watchlist.
Parameters:
Name | Type | Description |
---|---|---|
subjects |
array | The subjects to remove from this watchlist. |