Added links to architecture document from services

This commit is contained in:
Andrew Henry
2015-10-14 19:18:27 -07:00
parent 4f18663c71
commit d3ff0a258e

View File

@ -1561,17 +1561,19 @@ extension mechanism is insufficient to achieve a desired result.
### Action Service ### Action Service
The `actionService` provides `Action` instances which are applicable in specific The [Action Service](../architecture/platform#action-service) (`actionService`)
contexts. See Core API for additional notes on the interface for actions. The provides `Action` instances which are applicable in specific contexts. See Core
`actionService` has the following interface: API for additional notes on the interface for actions. The `actionService` has
the following interface:
* `getActions(context)`: Returns an array of Action objects which are applicable * `getActions(context)`: Returns an array of Action objects which are applicable
in the specified action context. in the specified action context.
### Capability Service ### Capability Service
The capabilityServic e provides constructors for capabilities which will be The [Capability Service](../architecture/platform#capability-service) (`capabilityService`)
exposed for a given domain object. provides constructors for capabilities which will be exposed for a given domain
object.
The capabilityService has the following interface: The capabilityService has the following interface:
@ -1620,20 +1622,20 @@ option may have the following properties:
when clicked. when clicked.
* `description`: Description to show in tooltip on hover. * `description`: Description to show in tooltip on hover.
## Domain Object Service ### Domain Object Service
The objectService provides domain object instances. It has the following The [Object Service](../architecture/platform.md#object-service) (`objectService`)
interface: provides domain object instances. It has the following interface:
* `getObjects(ids)`: For the provided array of domain object identifiers, * `getObjects(ids)`: For the provided array of domain object identifiers,
returns a Promise for an object containing key-value pairs, where keys are returns a Promise for an object containing key-value pairs, where keys are
domain object identifiers and values are corresponding DomainObject instances. domain object identifiers and values are corresponding DomainObject instances.
Note that the result may contain a superset or subset of the objects requested. Note that the result may contain a superset or subset of the objects requested.
## Gesture Service ### Gesture Service
The `gestureService` is used to attach gestures (see extension category The `gestureService` is used to attach gestures (see extension category gestures)
gestures ) to representations. It has the following interface: to representations. It has the following interface:
* `attachGestures(element, domainObject, keys)`: Attach gestures specified by * `attachGestures(element, domainObject, keys)`: Attach gestures specified by
the provided gesture keys (an array of strings) to this jqLite-wrapped HTML the provided gesture keys (an array of strings) to this jqLite-wrapped HTML
@ -1641,18 +1643,20 @@ element , which represents the specified domainObject . Returns an object with a
single method `destroy()`, to be invoked when it is time to detach these single method `destroy()`, to be invoked when it is time to detach these
gestures. gestures.
## Model Service ### Model Service
The modelService provides domain object models. It has the following interface: The [Model Service](../architecture/platform.md#model-service) (`modelService`)
provides domain object models. It has the following interface:
* `getModels(ids)`: For the provided array of domain object identifiers, returns * `getModels(ids)`: For the provided array of domain object identifiers, returns
a Promise for an object containing key-value pairs, where keys are domain object a Promise for an object containing key-value pairs, where keys are domain object
identifiers and values are corresponding domain object models. Note that the identifiers and values are corresponding domain object models. Note that the
result may contain a superset or subset of the models requested. result may contain a superset or subset of the models requested.
## Persistence Service ### Persistence Service
The persistenceService provides the ability to load/store JavaScript objects The [Persistence Service](../architecture/platform.md#persistence-service) (`persistenceService`)
provides the ability to load/store JavaScript objects
(presumably serializing/deserializing to JSON in the process.) This is used (presumably serializing/deserializing to JSON in the process.) This is used
primarily to store domain object models. It has the following interface: primarily to store domain object models. It has the following interface:
@ -1678,16 +1682,18 @@ the update fails.
persistence space , identified by the specified key . Returns a promise which will persistence space , identified by the specified key . Returns a promise which will
be rejected if deletion fails. be rejected if deletion fails.
## Policy Service ### Policy Service
The policyService may be used to determine whether or not certain behaviors are The [Policy Service](../architecture/platform.md#policy-service) (`policyService`)
may be used to determine whether or not certain behaviors are
allowed within the application. It has the following interface: allowed within the application. It has the following interface:
* `allow(category, candidate, context, [callback])`: Check if this decision * `allow(category, candidate, context, [callback])`: Check if this decision
should be allowed. Returns a boolean. Its arguments are interpreted as: should be allowed. Returns a boolean. Its arguments are interpreted as:
* `category`: A string identifying which kind of decision is being made. See * `category`: A string identifying which kind of decision is being made. See
the [section on Categories](#PolicyCategories) for categories supported by the platform; plugins the [section on Categories](#PolicyCategories) for categories supported by
may define and utilize policies of additional categories, as well. the platform; plugins may define and utilize policies of additional
categories, as well.
* `candidate`: An object representing the thing which shall or shall not be * `candidate`: An object representing the thing which shall or shall not be
allowed. Usually, this will be an instance of an extension of the category allowed. Usually, this will be an instance of an extension of the category
defined above. This does need to be the case; additional policies which are defined above. This does need to be the case; additional policies which are
@ -1700,9 +1706,10 @@ should be allowed. Returns a boolean. Its arguments are interpreted as:
This function will be called with the message string (which may be This function will be called with the message string (which may be
undefined) of whichever individual policy caused the operation to fail. undefined) of whichever individual policy caused the operation to fail.
## Telemetry Service ### Telemetry Service
The `telemetryService` is used to acquire telemetry data. See the section on The [Telemetry Service](../architecture/platform.md#telemetry-service) (`telemetryService`)
is used to acquire telemetry data. See the section on
Telemetry in Core API for more information on how both the arguments and Telemetry in Core API for more information on how both the arguments and
responses of this service are structured. responses of this service are structured.
@ -1722,19 +1729,20 @@ matching the specified `requests`. The specified `callback` will be invoked with
telemetry response objects as they become available. This method returns a telemetry response objects as they become available. This method returns a
function which can be invoked to terminate the subscription. function which can be invoked to terminate the subscription.
## Type Service ### Type Service
The `typeService` exposes domain object types. It has the following interface: The [Type Service](../architecture/platform.md#type-service) (`typeService`) exposes
domain object types. It has the following interface:
* `listTypes()`: Returns all domain object types supported in the application, * `listTypes()`: Returns all domain object types supported in the application,
as an array of `Type` instances. as an array of `Type` instances.
* `getType(key)`: Returns the `Type` instance identified by the provided key, or * `getType(key)`: Returns the `Type` instance identified by the provided key, or
undefined if no such type exists. undefined if no such type exists.
## View Service ### View Service
The `viewService` exposes definitions for views of domain objects. It has the The [View Service](../architecture/platform.md#view-service) (`viewService`) exposes
following interface: definitions for views of domain objects. It has the following interface:
* `getViews(domainObject)`: Get an array of extension definitions of category * `getViews(domainObject)`: Get an array of extension definitions of category
`views` which are valid and applicable to the specified `domainObject`. `views` which are valid and applicable to the specified `domainObject`.