Class: notApp

notApp

Class of application

new notApp(options)

Parameters:
Name Type Description
options object application options
Properties
Name Type Description
name string name
controllers object controllers
manifestURL string URL of network manifest with all available models/actions/fields requests options

Members


DEFAULT_WS_CLIENT_NAME

Methods


bindController(controllerName, controllerPathScheme)

Parameters:
Name Type Description
controllerName object controller constructor
controllerPathScheme Array.<string>
Returns:
function creates new controller instance and pass in notApp instance, arguments from router parser and pathScheme
Type
function

clearInterfaces()

Sets interfaces list clear
Returns:
notApp instance
Type
object

execRouter()

Creates all the routes handlers and pushes them into router

getConfigReaderForModule(moduleName)

Returns module dedicated options reader
Parameters:
Name Type Description
moduleName string module name
Returns:
reader object {get(pathToValue, defaultValue)}
Type
object

getControllerName(name)

Converts controller name (controllerName) to standartizied prefixControllerName
Parameters:
Name Type Description
name string controller name
Returns:
not controller name
Type
string

getCurrentController()

Returns working controller
Returns:
working controller
Type
object

getInterface(name)

returns network interface class initializator
Parameters:
Name Type Description
name string name of network interface
Returns:
interface class initializator
Type
function

getInterfaceManifest(modelName)

returns constructor of interface model
Parameters:
Name Type Description
modelName string model name
Returns:
interface model constructor
Type
object

getInterfaces()

Returns all network interfaces
Returns:
all network insterfaces
Type
object

getModel(name [, data])

Returns network interface (model) initialized with provided data
Parameters:
Name Type Argument Default Description
name string interface(modelName)
data string <optional>
{} model data
Returns:
network interface initializes with provided data

getRecordName(name)

Converts interface name (modelName) to standartizied prefixModelName
Parameters:
Name Type Description
name string interface model name
Returns:
not record name
Type
string

getService(name)

Returns service
Parameters:
Name Type Description
name string name of the service
Returns:
service
Type
object | function

getWSClient( [name])

Returns web sockets client instance by name
Parameters:
Name Type Argument Default Description
name string <optional>
DEFAULT_WS_CLIENT_NAME
Returns:
instance of notWSClient
Type
object

initController()

Initializes 'initialization' controller which is runs once, to perform custom initializations routines by application code

initManifest()

Initializes application according to network manifest, which is retrieved from server

initRouter()

One page routing initialization

initServices()

Initializes all provided services

moduleConfig( [moduleName])

Returns module dedicated options reader
Parameters:
Name Type Argument Default Description
moduleName string <optional>
'' module name
Returns:
reader object {get(pathToValue, defaultValue)}
Type
object

setCurrentController(ctrl)

Destroyes working controller then sets provided as working
Parameters:
Name Type Description
ctrl object controller instance
Returns:
notApp instance
Type
object

setInterfaceManifest(manifest)

Sets interface manifest option
Parameters:
Name Type Description
manifest object interface manifest

setService(name, val)

Sets service
Parameters:
Name Type Description
name string name of the service
val object | function service

setWSClient( [name], wsc)

Sets WebSockets client
Parameters:
Name Type Argument Default Description
name string <optional>
DEFAULT_WS_CLIENT_NAME name of client
wsc object notWSClient instance
Returns:
notApp instance
Type
object

startApp()

Initialization of services, startup of routing

update()

Updating Application, reloads interfaces, init controller launched, start again

updateInterfaces()

Clears interfaces, recreates all according to Options.interafaceManifest