Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

calculator_integration

Jean-Guilhem Rouel edited this page Feb 24, 2016 · 2 revisions

How to integrate the observer to Unicorn ?

  • In package resource, modify observers.list.BR
  You have to add path to calculator contract (.wadl ans .rdf).
  There is two ways to add this path :[[BR]]  
  First way is to add directory path where wadl and rdf files are. Unicorn will automatically look for '''''observer.wadl''''' and '''''observer.rdf''''' files. [[BR]]
  Second way is to add two paths : one for wadl file, another for rdf file.[[BR]]
  In our case, we only add ''!http://localhost/calculator_contract'' because ours files are ''observer.wadl'' and ''observer.rdf''.
  • In package resources.tasklist, modify tasklist.xml and tasklist.rdf.BR
tasklist.xml : add a new task calculator. A task can be made of several observations. In our case, we have just one, the calculator observation. So between <subtasks>...</subtasks> tags, we have to define calculator observation with it mimetype and it priority (low, medium or high). Then, we have to define how parameters have to be displayed. For x2 parameter, we want a checkbox with unchecked as default value. But remember, we have defined in observer.wadl file that parameter x2 accepts values 0 or 1, and here, there is a checkbox which can take value unchecked or on. That's why we have to map parameters : unchecked value has to be linked to 0 and on value has to be linked to 1.

tasklist.rdf: add a new ucn:Task which references calculator task. In this file we have to define give name description and parameters of the task.

Use an extra layer of security with two factor authentication (2FA) when logging into google

Clone this wiki locally