App.ObjectAction

The App.ObjectAction is responsible for updating the state of the App.ObjectStore

Members

(static) window.App.ObjectAction

Methods

(static) addAll(data, source)

Adding or updating existing objects to the store. If the object id exists in the store it will be updated with new values. If the object doesn't exist it will be created. Listeners that is registered for the 'change' event will be notified

Example
// adding a single object to the store
App.ObjectAction.addAll({"1.2.3.4": data: { }});

// adding two objects to the store
App.ObjectAction.addAll({"1.2.3.4": { data: { }},
                         "5.6.7.6": { data: { }}})
// adding multiple objects with objects key

App.ObjectAction.addAll({objects: {
                          "1.2.3.4": { data: { }},
                          "5.6.7.6": { data: { }}
                          }});
Parameters:
Name Type Description
data Object

to be added to the store

source String

id of origin of event. Will not be notified of change.

(static) objectCreated(object, source)

Creates an object in the store Listeners that is registered for the 'create' event will be notified.

Parameters:
Name Type Description
object Object

with changed values

source String

id of origin of event. Will not be notified of change.

(static) objectUpdated(object, source)

Updates an object in the store Listeners that is registered for the 'change' event will be notified.

Parameters:
Name Type Description
object Object

with changed values

source String

id of origin of event. Will not be notified of change.

(static) relationshipCreated(relationship, source)

Creates an relationship in the store Listeners that is registered for the 'create' event will be notified.

Parameters:
Name Type Description
relationship relationship

with changed values

source String

id of origin of event. Will not be notified of change.

(static) relationshipUpdated(relationship, source)

Updates an relationship in the store Listeners that is registered for the 'change' event will be notified.

Parameters:
Name Type Description
relationship relationship

with changed values

source String

id of origin of event. Will not be notified of change.