Class: Warehouse

Gitana. Warehouse

Warehouse

new Warehouse(platform, Object)

Parameters:
Name Type Argument Description
platform Gitana.Platform
Object <optional>

object json object (if no callback required for populating)

Source:

Extends

Members

listInteractionCities

Lists the interaction cities.

Source:

listInteractionContinents

Lists the interaction continents.

Source:

listInteractionCountries

Lists the interaction countries.

Source:

listInteractionDevices

Lists the interaction devices.

Source:

listInteractionOperatingSystems

Lists the interaction operating systems.

Source:

listInteractionPostalCodes

Lists the interaction postal codes.

Source:

listInteractionRegions

Lists the interaction regions.

Source:

listInteractionUserAgents

Lists the interaction user agents.

Source:

queryInteractionCities

Queries for interaction cities.

Source:

queryInteractionContinents

Queries for interaction continents.

Source:

queryInteractionCountries

Queries for interaction countries.

Source:

queryInteractionDevices

Queries for interaction devices.

Source:

queryInteractionOperatingSystems

Queries for interaction operating systems.

Source:

queryInteractionPostalCodes

Queries for interaction postal codes.

Source:

queryInteractionRegions

Queries for interaction regions.

Source:

queryInteractionUserAgents

Queries for interaction user agents

Source:

readInteractionCity

Reads an interaction city.

Source:

readInteractionContinent

Reads an interaction continent.

Source:

readInteractionCountry

Reads an interaction country.

Source:

readInteractionDevice

Reads an interaction device.

Source:

readInteractionOperatingSystems

Reads an interaction operating system.

Source:

readInteractionPostalCode

Reads an interaction postal code.

Source:

readInteractionRegion

Reads an interaction region.

Source:

readInteractionUserAgent

Reads an interaction user agent.

Source:

Methods

__copyState()

Override the Chain.__copyState method so that it utilizes a base method that we can override on a per-class basis.

Inherited From:
Source:

chainCopyState(otherObject)

Override to include:

__system

Parameters:
Name Type Description
otherObject
Inherited From:
Source:

chainCreate(chainable, object, uri, params)

Creates an object on the server (write + read). Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
object
uri
params
Inherited From:
Source:

chainCreateEx(chainable, object, createUri, readUri)

Creates an object on the server using one URL and then reads it back using another URL. This exists because the security responses don't include _doc fields like other responses.

Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
object
createUri
readUri
Inherited From:
Source:

chainDelete(chainable, uri, params)

Executes an HTTP delete for this object and continues the chain with the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainGet(chainable, uri, params)

Performs a GET from the server and populates the chainable. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainGetResponse(chainable, uri, params)

Performs a GET to the server and pushes the response into the chain. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainGetResponseRows(chainable, uri, params)

Performs a GET to the server and pushes the "rows" response attribute into the chain. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainGetResponseText(chainable, uri, params)

Performs a GET to the server and pushes the text response to the callback.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainHasResponseRow(chainable, uri, value)

Performs a GET to the server and checks whether the "rows" array attribute of the response has the given value.

Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
value
Inherited From:
Source:

chainPost(chainable, uri, params, payload)

Performs a POST to the server and populates the chainable with results. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
payload
Inherited From:
Source:

chainPostEmpty(chainable, uri, params, payload, contentType)

Performs a POST to the server. The response is not handled. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
payload

(optional)

contentType

(optional) - example "text/plain"

Inherited From:
Source:

chainPostResponse(chainable, uri, params)

Performs a POST to the server and pushes the response into the chain. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainReload(uri, params)

Reloads this object from the server and then passes control to the chainable.

Parameters:
Name Type Description
uri
params
Inherited From:
Source:

chainUpdate(chainable, uri, params)

Executes an update (write + read) of this object and then passes control to the chainable.

Parameters:
Name Type Description
chainable
uri
params
Inherited From:
Source:

chainUpload(chainable, uri, params, contentType, payload)

Performs a POST to the server. The response is not handled. Proceeds with the chain as bound to the chainable.

Parameters:
Name Type Description
chainable
uri
params
contentType

(optional) - example "text/plain"

payload

(optional)

Inherited From:
Source:

checkAuthority(principal, authorityId, callback)

Checks whether the given principal has a granted authority for this object. This passes the result (true/false) to the chaining function.

Parameters:
Name Type Description
principal Gitana.DomainPrincipal | String

the principal or the principal id

authorityId String

the id of the authority

callback
Inherited From:
Source:

checkPermission(principal, permissionId, callback)

Checks whether the given principal has a permission against this object. This passes the result (true/false) to the chaining function.

Parameters:
Name Type Description
principal Gitana.DomainPrincipal | String

the principal or the principal id

permissionId String

the id of the permission

callback
Inherited From:
Source:

clone()

Source:

copy(target, asynchronous)

Copies this object into the target.

Parameters:
Name Type Description
target
asynchronous
Inherited From:
Source:

createConversionTrigger(object)

Create a conversion trigger

Parameters:
Name Type Description
object Object

JSON object (requires "key" and "type")

Source:

del()

Delete

Inherited From:
Source:

exportArchive(settings)

Exports an archive.

Parameters:
Name Type Description
settings Object
Inherited From:
Source:

extractPrincipalDomainQualifiedId(principal)

Helper to gets the principal id for a principal object, json structure or principal id itself. This returns something like "domainId/principalId"

Parameters:
Name Type Description
principal
Inherited From:
Source:

extractPrincipalIdentifiers(principal, defaultDomainId)

Helper to gets the principal id for a principal object, json structure or principal id itself. This returns something like "domainId/principalId"

Parameters:
Name Type Description
principal

principal object or string (principal id or domain qualified principal id)

defaultDomainId
Inherited From:
Source:

get(key)

Get a json property

Parameters:
Name Type Description
key
Inherited From:
Source:

getDescription() → {String}

The description for the object.

Inherited From:
Source:
Returns:

the description

Type
String

getId() → {String}

Hands back the ID ("_doc") of this object.

Inherited From:
Source:
Returns:

id

Type
String

getProxiedUri()

Hands back the URI of this object as referenced by the browser.

Inherited From:
Source:

getSystemMetadata() → {Gitana.SystemMetadata}

Hands back the system metadata for this object.

Inherited From:
Source:
Returns:

system metadata

Type
Gitana.SystemMetadata

getTitle() → {String}

The title for the object.

Inherited From:
Source:
Returns:

the title

Type
String

getType()

Source:

getUri()

Source:

grantAuthority(principal, authorityId)

Grants an authority to a principal against this object.

Parameters:
Name Type Description
principal Gitana.DomainPrincipal | String

the principal or the principal id

authorityId String

the id of the authority

Inherited From:
Source:

handleResponse(response)

Parameters:
Name Type Description
response
Inherited From:
Source:

handleSystemProperties()

Inherited From:
Source:

importArchive(settings, Function)

Imports an archive.

Parameters:
Name Type Argument Description
settings Object
Function <optional>

reportFn

Inherited From:
Source:

json()

Hands back a cleanup, properties-only JSON simple object.

Inherited From:
Source:

listAuthorities(principal, callback)

Retrieve list of authorities and pass into chaining method.

Parameters:
Name Type Description
principal Gitana.DomainPrincipal | String

the principal or the principal id

callback
Inherited From:
Source:

listConversionTriggers(pagination)

Lists the conversion triggers.

Parameters:
Name Type Description
pagination
Source:

listInteractionApplications(pagination)

Lists the interaction applications.

Parameters:
Name Type Description
pagination
Source:

listInteractionNodes(pagination)

Lists the interaction nodes.

Parameters:
Name Type Description
pagination
Source:

listInteractionPages(pagination)

Lists the interaction pages.

Parameters:
Name Type Description
pagination
Source:

listInteractionReports(pagination)

Lists the interaction reports.

Parameters:
Name Type Description
pagination

(optional)

Source:

listInteractions(pagination)

Lists the interactions.

Parameters:
Name Type Description
pagination
Source:

listInteractionSessions(pagination)

Lists the interaction sessions.

Parameters:
Name Type Description
pagination
Source:

listInteractionUsers(pagination)

Lists the interaction users.

Parameters:
Name Type Description
pagination
Source:

loadACL(callback)

Retrieve full ACL and pass into chaining method.

Parameters:
Name Type Description
callback
Inherited From:
Source:

loadAuthorityGrants(callback)

Loads the authority grants for a given set of principals.

Parameters:
Name Type Description
callback
Inherited From:
Source:

loadFrom(anotherObject)

Helper method that loads this object from another object of the same type.

For example, loading a node from another loaded node.

Parameters:
Name Type Description
anotherObject
Inherited From:
Source:

loadInfo(callback)

Loads information about the warehouse.

Parameters:
Name Type Description
callback
Source:

queryConversionTriggers(query, Object)

Queries for conversion triggers.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionApplications(query, Object)

Queries for interaction applications.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionNodes(query, Object)

Queries for interaction nodes.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionPages(query, Object)

Queries for interaction pages.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionReports(query, pagination)

Queries for interaction reports.

Parameters:
Name Type Description
query
pagination

(optional)

Source:

queryInteractions(query, Object)

Queries for interactions.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionSessions(query, Object)

Queries for interaction sessions.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

queryInteractionUsers(query, Object)

Queries for interaction users.

Parameters:
Name Type Argument Description
query Object
Object <optional>

pagination pagination (optional)

Source:

readConversionTrigger(triggerId)

Reads a conversion trigger.

Parameters:
Name Type Description
triggerId
Source:

readInteraction(interactionId)

Reads an interaction.

Parameters:
Name Type Description
interactionId
Source:

readInteractionApplication(interactionApplicationId)

Reads an interaction application.

Parameters:
Name Type Description
interactionApplicationId
Source:

readInteractionNode(interactionNodeId)

Reads an interaction node.

Parameters:
Name Type Description
interactionNodeId
Source:

readInteractionPage(interactionPageId)

Reads an interaction page.

Parameters:
Name Type Description
interactionPageId
Source:

readInteractionReport(interactionReportId)

Reads an interaction report.

Parameters:
Name Type Description
interactionReportId
Source:

readInteractionSession(interactionSessionId)

Reads an interaction session.

Parameters:
Name Type Description
interactionSessionId
Source:

readInteractionUser(interactionUserId)

Reads an interaction user.

Parameters:
Name Type Description
interactionUserId
Source:

ref()

Inherited From:
Source:

reload()

Reload

Inherited From:
Source:

replacePropertiesWith(object)

Replaces all of the properties of this object with those of the given object. This method should be used to update the state of this object.

Any functions from the incoming object will not be copied.

Parameters:
Name Type Description
object Object

object containing the properties

Inherited From:
Source:

reset() → {*}

Resets the warehouse. This requires ADMIN, MANAGER or OWNER authorities against the warehouse.

Source:
Returns:
Type
*

revokeAllAuthorities(principal)

Revokes all authorities for a principal against the server.

Parameters:
Name Type Description
principal Gitana.Principal | String

the principal or the principal id

Inherited From:
Source:

revokeAuthority(principal, authorityId)

Revokes an authority from a principal against this object.

Parameters:
Name Type Description
principal Gitana.DomainPrincipal | String

the principal or the principal id

authorityId String

the id of the authority

Inherited From:
Source:

set(key, value)

Set a json property

Parameters:
Name Type Description
key
value
Inherited From:
Source:

stringify(pretty)

Helper function to convert the object portion to JSON

Parameters:
Name Type Description
pretty
Inherited From:
Source:

update()

Update

Inherited From:
Source: