Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PDS Client 2.0 JavaScript API"

m (Complexity Hiding)
(TBD)
Line 28: Line 28:
 
One consequence of the structure flattening and information hiding described above is that apps that by their very nature require read/write access to most or all of the underlying PDM objects can not use this API. This kind of app needs access to lower level APIs closer to the “raw” IdAS API that exposes all contexts and contained entities.
 
One consequence of the structure flattening and information hiding described above is that apps that by their very nature require read/write access to most or all of the underlying PDM objects can not use this API. This kind of app needs access to lower level APIs closer to the “raw” IdAS API that exposes all contexts and contained entities.
  
= TBD =
+
= Types =
  
 
Warning - Work in progress.
 
Warning - Work in progress.
  
JavaScript APIs
+
= Functions =
  
addEntityAttributes
+
== JavaScript Functions ==
setEntityAttributes
+
delEntityAttributes
+
getEntityAttributes
+
setRPAttributes
+
getRPAttributes
+
getSuggestions
+
  
Dashboard APIs
+
=== Flat Data Model Functions ===
 +
==== setRPAttributes ====
 +
==== getRPAttributes ====
 +
==== getSuggestions ====
  
removePWData
+
=== Structured Data Model Functions ===
getPWException
+
==== addEntityAttributes ====
removePWException
+
==== setEntityAttributes ====
removeRMCard
+
==== delEntityAttributes ====
 +
==== getEntityAttributes ====
 +
 
 +
== Dashboard Functions ==
 +
 
 +
The following APIs are not exposed to JavaScript running in browsers other than the Dashboard's embedded browser.
 +
 
 +
=== removePWData ===
 +
=== getPWException ===
 +
=== removePWException ===
 +
=== removeRMCard ===

Revision as of 10:25, 9 November 2010

Introduction

The JavaScript API allows the developer (the API consumer) to simply treat the PDS Client and any personal or managed data stores in the cloud as one big database. It allows you to read or write in a single operation a set of attributes and their values.

The JavaScript API is implemented by a NPAPI browser plugin that is used in the user’s “regular” browser as well as the Dashboard’s embedded browser. This API is intended to support a variety of apps that need access to data about the current user.

Applications

The following apps being developed in Higgins consume this API by Javascript calls specified by an app-card:

  • Password Manager
  • Form filler
  • App-Card Framework

Complexity Hiding

This API supports two ways of accessing the underlying data.

"Flat" APIs

In the "flat" version of the API calls, the consumer doesn't need to understand nor have to navigate the structured nature of that some attributes in the Persona Data Model 2.0 (PDM) have. Similarly it doesn't require the consumer to understand nor have to navigate the graph structure of the underlying p:Person nodes in this data model. Instead it hides all of these complexities.

For example, the fact that in the PDM we might have a p:person node of role “payer” with a vcard:adr link to a v:Address object that in turn has a vcard:street-name attribute and value is hidden. The getRPAttributes() consumer simply has to ask for the "payer street name" attribute and they will get back a literal string value like "123 main street”.

By hiding the underlying structures the API implementation, code can protect the underlying data structures from being directly accessed and possibly accidentally or maliciously modified such that they are in an inconsistent state.

"Structured" APIs

One consequence of the structure flattening and information hiding described above is that apps that by their very nature require read/write access to most or all of the underlying PDM objects can not use this API. This kind of app needs access to lower level APIs closer to the “raw” IdAS API that exposes all contexts and contained entities.

Types

Warning - Work in progress.

Functions

JavaScript Functions

Flat Data Model Functions

setRPAttributes

getRPAttributes

getSuggestions

Structured Data Model Functions

addEntityAttributes

setEntityAttributes

delEntityAttributes

getEntityAttributes

Dashboard Functions

The following APIs are not exposed to JavaScript running in browsers other than the Dashboard's embedded browser.

removePWData

getPWException

removePWException

removeRMCard

Back to the top