Class: AuditRecord

Gitana. AuditRecord

AuditRecord

new AuditRecord(datastore, Object)

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

object json object (if no callback required for populating)

Source:

Extends

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:

clone()

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:

getAction() → {String}

Source:
Returns:

the action of the audit record ("CREATE", "READ", "UPDATE", "DELETE", "MOVE", "COPY", "EXISTS")

Type
String

getArgs() → {Object}

Source:
Returns:

argument descriptors

Type
Object

getDataStore() → {Gitana.DataStore}

Gets the Gitana Data Store object.

Source:
Returns:

The Gitana DataStore object

Type
Gitana.DataStore

getDataStoreId() → {String}

Gets the Gitana Data Store id.

Source:
Returns:

The Gitana DataStore id

Type
String

getDescription() → {String}

The description for the object.

Inherited From:
Source:
Returns:

the description

Type
String

getHandler() → {String}

Source:
Returns:

handler

Type
String

getId() → {String}

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

Inherited From:
Source:
Returns:

id

Type
String

getMethod() → {String}

Source:
Returns:

method that was invoked

Type
String

getPrincipalId() → {String}

Source:
Returns:

the principal for the audit record

Type
String

getProxiedUri()

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

Inherited From:
Source:

getReturn() → {Object}

Source:
Returns:

return value descriptor

Type
Object

getScope() → {String}

Source:
Returns:

the scope of the audit record (i.e. "NODE")

Type
String

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

<abstract> getType()

Inherited From:
Source:

getUri()

Source:

handleResponse(response)

Parameters:
Name Type Description
response
Inherited From:
Source:

handleSystemProperties()

Inherited From:
Source:

json()

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

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:

<abstract> ref() → {String}

Inherited From:
Source:
Returns:

a string denoting a reference to this object.

Type
String

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:

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: