PageStateManagerImpl
The implementation of the {@linkcode PageStateManager} interface.
Kind: global class
- PageStateManagerImpl
- new PageStateManagerImpl(dispatcher)
- ._states :
Array.<Object.<string, \*>>
- ._statePatchQueue :
Array.<Object.<string, \*>>
- ._cursor :
number
- .onChange :
function
- ._dispatcher :
Dispatcher
- ._ongoingTransaction :
boolean
- .clear()
- .setState()
- .getState()
- .getAllStates()
- .getTransactionStatePatches()
- .beginTransaction()
- .commitTransaction()
- .cancelTransaction()
- ._eraseExcessHistory()
- ._pushToHistory(newState)
- ._callOnChangeCallback(newState)
new PageStateManagerImpl(dispatcher)
Initializes the page state manager.
Param | Type | Description |
---|---|---|
dispatcher | Dispatcher |
Dispatcher fires events to app. |
pageStateManagerImpl._states : Array.<Object.<string, \*>>
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl._statePatchQueue : Array.<Object.<string, \*>>
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl._cursor : number
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl.onChange : function
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl._dispatcher : Dispatcher
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl._ongoingTransaction : boolean
Kind: instance property of PageStateManagerImpl
pageStateManagerImpl.clear()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.setState()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.getState()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.getAllStates()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.getTransactionStatePatches()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.beginTransaction()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.commitTransaction()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl.cancelTransaction()
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl._eraseExcessHistory()
Erase the oldest state from storage only if it exceed max defined size of history.
Kind: instance method of PageStateManagerImpl
pageStateManagerImpl._pushToHistory(newState)
Push new state to history storage.
Kind: instance method of PageStateManagerImpl
Param | Type |
---|---|
newState | Object.<string, \*> |
pageStateManagerImpl._callOnChangeCallback(newState)
Call registered callback function on (@codelink onChange) with newState.
Kind: instance method of PageStateManagerImpl
Param | Type |
---|---|
newState | Object.<string, \*> |