aps/ResourceStore

Special store used to work with APS resources within the APS infrastructure.

Parameters

ARGUMENT

TYPE

DESCRIPTION

options

dojo.store.JsonRest

This provides any configuration information that will be mixed into the store apsType: the type of apsResource

Public Properties

PROPERTY

TYPE

DEFAULT

DESCRIPTION

apsType

string

“”

Defines the type of the APS resource that this store should work with.

baseQuery

string

null

RQL statement that will be added to every request for a list of resources.

childrenProperty

string

undefined

The name of the property in the data property that contains the list of child objects.

idProperty

string

aps.id

Similar to dojo/store/JsonStore, indicates the property to use as the identity property.

initialData

array

null

Data preload for Store.

target

string

“”

The target base URL to use for all requests to the server.

apsType string

Defines the type of the APS resource that this store should work with. For example, http://apsstandard.com/mailbox/1.0, http://mycompany.com/user/1.0, and so on. Default value: “”.

baseQuery string

RQL statement that will be added to every request for a list of resources. Default value: null.

childrenProperty string

The name of the property in the data property that contains the list of child objects. Default value: undefined.

idProperty string

Similar to dojo/store/JsonStore, indicates the property to use as the identity property. However, APS resources already have their own id property called “aps.id” - so you should not define this property yourself if you are working with APS resources. Default value: “aps.id”.

initialData array

Data preload for Store. Default value: null.

target string

The target base URL to use for all requests to the server. This string will be prepended to the id to generate the URL (relative or absolute) for requests sent to the server. Default value: “”.

Public Methods

METHOD

RETURN

DESCRIPTION

get ()

object

Retrieves an object by its identity

getIdentity (object)

any

Returns an object’s identity

mapQuery (row)

row
object

Method for preparing data before completing request

put ()

dojo/_base/deferred

Stores an object

query (query, options)

store.queryresults

Queries the store for objects

remove ()

dojo/_base/deferred

Deletes an object by its identity

get

Retrieves an object by its identity. This will trigger a GET request to the server using the url this.target + id.

Return: object

getIdentity

Returns an object’s identity.

Return: any

ARGUMENT

TYPE

DESCRIPTION

object

Object

The object to store.

mapQuery

Method for preparing data before completing request

Return: row object

ARGUMENT

TYPE

DESCRIPTION

row

Object

Received from server row which must be processed

put

Stores an object. This will trigger a PUT request to the server if the object has an id, otherwise it will trigger a POST request.

Return: dojo/_base/deferred

query

Queries the store for objects. This will trigger a GET request to the server with the query added as a query string.

Return: store.queryresults

ARGUMENT

TYPE

DESCRIPTION

query

Object

The query to use for retrieving objects from the store.

options

__QueryOptions

The optional arguments to apply to the resultset.

remove

Deletes an object by its identity. This will trigger a DELETE request to the server.

Return: dojo/_base/deferred