The most abstract class for all server side store layers.
Parameter | Type | Description |
---|---|---|
args | undefined |
To control whether this layer is valid.
The original fetch function of the store.
Implementation of _StoreLayer._fetch
Parameter | Type | Description |
---|---|---|
userRequest | keywordArgs |
Do the actual unwrapping to the store.
Parameter | Type | Description |
---|---|---|
nextLayer | undefined |
Do the actual wrapping (or 'hacking' if you like) to the store.
Parameter | Type | Description |
---|---|---|
store | undefined | The store to be unwrapped. |
funcName | undefined | |
layerFuncName | undefined | |
nextLayer | undefined |
get/set a command (a name-value pair)
Parameter | Type | Description |
---|---|---|
cmdName | string | The name of the command |
cmdContent | anything |
Optional The content of the command |
The content of the command if cmdContent is undefined
Overrided from _StoreLayer.enabled
Parameter | Type | Description |
---|---|---|
toEnable | bool |
Optional
|
Parameter | Type | Description |
---|---|---|
store | undefined |
Get the name of this store layer. The default name retrieved from class name, which should have a pattern of "{name}Layer". If this pattern does not exist, the whole class name will be this layer's name. It's better to override this method if your class name is too complicated.
The name of this layer.
Parameter | Type | Description |
---|---|---|
store | undefined |
If you only want to modify the user request, instead of sending a separate command to server before fetch, just call:
this.useCommand(false);
Parameter | Type | Description |
---|---|---|
toUse | Boolean |
Optional If provided, it's a setter, otherwise, it's a getter |
handle errors when sending commands.
Parameter | Type | Description |
---|---|---|
error | Error |
When the server gives back response for the commands, you can do something here.
Parameter | Type | Description |
---|---|---|
response | string | server response |
userRequest | dojo/data/api/Request | The request object for fetch. You can modify this object according to the response so as to change the behavior of fetch |