Home Manual Reference Source
public class | source

Stack

Extends:

src/mapping/core.js~Service → Stack

Data stack user API

Data is stored on a per user basis. However, notifications can be sent to a configurable set of listeners. Stack names are arbitrary and do not need to be explicitly initialized.

Static Member Summary

Static Public Members
public static get

Get default deployment id associated to Stack service

Method Summary

Public Methods
public

getListeners(objectPattern: {"stack": *, "owner": *}): *

Lists the listeners

public

list(objectPattern: {"stack": *, "owner": *, "page": *}): *

Lists content

public

purge(objectPattern: {"stack": *, "owner": *}): *

Empties a stack

public

push(objectPattern: {"stack": *, "data": *, "owner": *}): *

Pushes an item

public

remove(objectPattern: {"guids": *, "stack": *, "owner": *}): *

Removes items

public

setListeners(objectPattern: {"listeners": *, "stack": *, "owner": *}): *

Sets the listeners

public

update(objectPattern: {"guid": *, "stack": *, "data": *, "owner": *}): *

Updates an item

Static Public Members

public static get DEFAULT_DEPLOYMENT_ID: string: string source

Get default deployment id associated to Stack service

Return:

string

Public Methods

public getListeners(objectPattern: {"stack": *, "owner": *}): * source

Lists the listeners

Returns the whole list of listeners for the given stack.

Params:

NameTypeAttributeDescription
objectPattern {"stack": *, "owner": *}
  • default: {"stack":null,"owner":null}

Return:

*

public list(objectPattern: {"stack": *, "owner": *, "page": *}): * source

Lists content

Returns a paginated list of contents for the given stack. Content is sorted according to the statically configured order.

Params:

NameTypeAttributeDescription
objectPattern {"stack": *, "owner": *, "page": *}
  • default: {"stack":null,"owner":null,"page":null}

Return:

*

public purge(objectPattern: {"stack": *, "owner": *}): * source

Empties a stack

Removes all items from the given stack.

Params:

NameTypeAttributeDescription
objectPattern {"stack": *, "owner": *}
  • default: {"stack":null,"owner":null}

Return:

*

public push(objectPattern: {"stack": *, "data": *, "owner": *}): * source

Pushes an item

Pushes an item onto the given stack. The stack does not need to be created.

Params:

NameTypeAttributeDescription
objectPattern {"stack": *, "data": *, "owner": *}
  • default: {"stack":null,"data":null,"owner":null}

Return:

*

public remove(objectPattern: {"guids": *, "stack": *, "owner": *}): * source

Removes items

Removes the item with the given guid from the given stack.

Params:

NameTypeAttributeDescription
objectPattern {"guids": *, "stack": *, "owner": *}
  • default: {"guids":null,"stack":null,"owner":null}

Return:

*

public setListeners(objectPattern: {"listeners": *, "stack": *, "owner": *}): * source

Sets the listeners

Sets the listeners for the given stack.

Params:

NameTypeAttributeDescription
objectPattern {"listeners": *, "stack": *, "owner": *}
  • default: {"listeners":null,"stack":null,"owner":null}

Return:

*

public update(objectPattern: {"guid": *, "stack": *, "data": *, "owner": *}): * source

Updates an item

Updates an existing item of the given stack. The item MUST exist prior to the call.

Params:

NameTypeAttributeDescription
objectPattern {"guid": *, "stack": *, "data": *, "owner": *}
  • default: {"guid":null,"stack":null,"data":null,"owner":null}

Return:

*