Privacy/Reviews/F1A: Difference between revisions

→‎mediator class: simplification
(→‎mediator class: simplification)
Line 316: Line 316:
|}
|}


=== mediator class ===
=== Share Mediator Component ===


The mediator class serves two purposes; 1) managing the mediator panel and mediator APIs, 2) acting as a tunnel between the service iframes and the rest of the OWA system.
The Share Mediator Component serves two purposes; 1) managing the Share Mediator Panel and mediator APIs, 2) acting as a tunnel between the 3rd party webapps and the rest of the OWA system.


'''Stored Data:'''  
'''Stored Data:'''  
Line 324: Line 324:
The mediator class stores no data.
The mediator class stores no data.


'''Communication with mediator content'''  
 
 
'''Communication with 3rd party webapp components'''
 
''This mirrors the "Communication with Share Mediator Component" section of the 3rd party webapp component. See that section for the details of this communication.''
 
 
'''Communication with Share Mediator Panel'''  


{| class="wikitable"
{| class="wikitable"
Line 336: Line 343:
| owa.app.ready
| owa.app.ready
| origin
| origin
| one call for each service iframe, received after the service iframe has called owa.service.ready
| sends one call for each service iframe, received after the service iframe has called owa.service.ready
|-
|-
| ''Out:''
|
| owa.mediation.setup
| owa.mediation.setup
| activity object, services list, caller href
| activity object, services list, caller href
| data necessary to setup the mediator UI and load service iframes
| data necessary to setup the mediator UI and load service iframes
|-
| owa.mediation.doLogin
| authorization credentials if any (e.g. oauth user tokens)
| response from doLogin
|-
| owa.mediation.reconfigure
| none
| sent to mediator content to reconfigure (e.g. a share app was installed or removed)
|-
|-
| ''In:''  
| ''In:''  
Line 348: Line 365:
| called by mediator content after load is finished
| called by mediator content after load is finished
|-
|-
| ''In:''
|
| owa.mediation.sizeToContent
| owa.mediation.sizeToContent
| width,height
| width,height
| request the mediator class to resize the panel to fit the content
| request the mediator class to resize the panel to fit the content
|-
|-
| ''In:''
|
| owa.mediation.onLogin
| owa.mediation.onLogin
| auth configuration received from service iframe, may contain consumer oauth key/secret
| auth configuration received from service iframe, may contain consumer oauth key/secret
| requests mediator class to manage logging in for a service
| requests mediator class to manage logging in for a service
|-
|-
| ''Out:''
|
| owa.mediation.doLogin
| authorization credentials if any (e.g. oauth user tokens)
| response from doLogin
|-
| ''In:''
| owa.success
| owa.success
| none
| none
| sent upon successful send
| sent upon successful send
|-
|-
| ''In:''
|
| owa.failure
| owa.failure
| failure message
| failure message
| sent upon failure to send
| sent upon failure to send
|-
| ''Out:''
| owa.mediation.reconfigure
| none
| sent to mediator content to reconfigure (e.g. a share app was installed or removed)
|}
'''Communication with service iframes'''
{| class="wikitable"
|-
! Direction
! Message
! Data
! Notes
|-
| ''Out:''
| service.origin
| origin
| provides the app origin the code we inject into the service iframe, kind of an init for our injected code
|-
| ''In:''
| service.ready
| app origin
| same as origin in postMessage api
|-
| ''In:''
| service.registerHandler
| origin, activity and message
| all strings used by mediator to call a specific handler (e.g. url, "link.send", "confirm")
|-
| ''In:''
| oauth.call
| auth service information, user tokens, url to oauth endpoint, parameters (share data)
| for oauth call which are sent to oauth endpoints
|-
| ''Out:''
| oauth.call.CALL_ID
| results returned by call to oauth endpoint
|
|-
| ''In:''
| sendEmail.call
| user oauth tokens, share data, recipients list
|
|-
| ''Out:''
| sendEmail.call.CALL_ID
| simple success/failure object
|
|}
|}


canmove, Confirmed users
1,537

edits