Changeset 30246

Show
Ignore:
Timestamp:
02/18/08 19:28:54 (9 months ago)
Author:
ogrisel
Message:

more work on LiveEdit? v2 technical documentation (NXP-2019)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/nuxeo-book/trunk/src/docbook/desktop-integration/index.xml

    r30243 r30246  
    6767      <para> 
    6868        When saving changes, the new version of the file is 
    69         automatically re-uploaded to the Nuxeo server through a SOAP web 
    70         service to update the original document content and make the 
    71         changes available to the other users of the workspace. 
     69        automatically re-uploaded to the Nuxeo server through a SOAP or 
     70        RESTful web service to update the original document content and 
     71        make the changes available to the other users of the workspace. 
    7272      </para> 
    7373 
     
    271271              an editor plugin for each desktop application (MS Office, 
    272272              OpenOffice) to be able to make the desktop application 
    273               fetch the file from Nuxeo through SOAP with connection 
    274               parameters provided in the bootstrap file and save it back 
    275               to the server using SOAP as well 
     273              fetch the file from Nuxeo through SOAP or REST GET with 
     274              connection parameters provided in the bootstrap file and 
     275              save it back to the server using SOAP or REST POST as well 
    276276 
    277277              Before and after editing the document, the editor plugin 
     
    297297          edit" link using a dedicated protocol handler packaged as a 
    298298          browser plugin. 
    299  
    300           The "online edit" link has the following pattern: 
    301         </para> 
     299        </para> 
     300 
     301        <para>The "online edit" link has the following pattern:</para> 
    302302 
    303303        <para> 
     
    308308        <para> 
    309309          The protocol handler will be called by the OS/Browser and 
    310           receive the url. In turn it will receive the XML bootstrap 
     310          receive the URL. In turn it will receive the XML bootstrap 
    311311          file. 
    312312        </para> 
     
    407407        </para> 
    408408 
     409        <para> 
     410          In order to generate valid 
     411          <literal>nxedit://</literal> 
     412          URLs it is strongly advised to use the JSF functions defined 
     413          in the 
     414          <literal> 
     415            org.nuxeo.ecm.platform.ui.web.tag.fn.DocumentModelFunctions 
     416          </literal> 
     417          class. 
     418        </para> 
     419 
     420        <para> 
     421          The functions are available under the 
     422          <literal>nxd</literal> 
     423          ( 
     424          <literal>http://nuxeo.org/nxweb/document</literal> 
     425          ) namespace: 
     426 
     427          <itemizedlist> 
     428            <listitem> 
     429              <literal>liveEditUrl(DocumentModel)</literal> 
     430              : get the 
     431              <literal>nxedit://</literal> 
     432              URL to edit a document file attachement (default File-like 
     433              types) 
     434            </listitem> 
     435 
     436            <listitem> 
     437              <literal> 
     438                liveEditUrl(DocumentModel, String, String, String) 
     439              </literal> 
     440              : get the nxedit:// URL to edit a document proviging 
     441              schema, blob field and filename field names 
     442            </listitem> 
     443 
     444            <listitem> 
     445              <literal>liveCreateUrl(String)</literal> 
     446              : get the nxedit:// url to create a new document of type 
     447              File providing the mimetype as argument 
     448            </listitem> 
     449 
     450            <listitem> 
     451              <literal> 
     452                liveCreateUrl(String, String, String, String, String) 
     453              </literal> 
     454              : get the nxedit:// url to create a new document with 
     455              parameters: mimetype, doctype, schema, blob and filename 
     456              field names 
     457            </listitem> 
     458 
     459            <listitem> 
     460              <literal> 
     461                liveCreateFromTemplateUrl(DocumentModel) 
     462              </literal> 
     463              : get the nxedit:// URL to create a new document of type 
     464              File reusing the content of the blob of the provided 
     465              template DocumentModel (assumed to have the "file" 
     466              schema). 
     467            </listitem> 
     468 
     469            <listitem> 
     470              <literal> 
     471                liveCreateFromTemplateUrl(DocumentModel, String, String, 
     472                String, String, String, String, String) 
     473              </literal> 
     474              : get the nxedit:// URL to create a new document from 
     475              template. Parameters are: template DocumentModel, template 
     476              schema, template blob field, target document type, target 
     477              schema, target, blob field name, target filename field. 
     478            </listitem> 
     479 
     480          </itemizedlist> 
     481 
     482        </para> 
     483      </section> 
     484 
     485      <section> 
     486        <title>The Bootstrap server module</title> 
     487 
     488        <para> 
     489          The Bootstrap server module will be a simple Seam component 
     490          called using the info passed as request parameters to generate 
     491          the XML payload of the bootstrap file. 
     492        </para> 
     493 
     494        <para> 
     495          The boostrap server module is currently located in webapp-core 
     496          here: 
     497          <itemizedlist> 
     498            <listitem> 
     499              <literal> 
     500                org.nuxeo.ecm.webapp.livedit.LiveEditBootstrapHelper 
     501              </literal> 
     502            </listitem> 
     503          </itemizedlist> 
     504        </para> 
     505 
     506      </section> 
     507 
     508      <section> 
     509        <title>Bootstrap data download</title> 
     510 
     511        <para> 
     512          The HTTP response to that GET URL is a bootstrap file 
     513          containing an XML payload. This file contains: 
     514 
     515          <itemizedlist> 
     516            <listitem> 
     517              the action ID so the client knows to interpret it 
     518            </listitem> 
     519            <listitem>repo name</listitem> 
     520            <listitem> 
     521              document unique reference (in case of editing) or template 
     522              reference (new from template) 
     523            </listitem> 
     524            <listitem> 
     525              the document Nuxeo type of the document to create or edit 
     526            </listitem> 
     527            <listitem> 
     528              the fieldpath hosting the binary attachment 
     529            </listitem> 
     530            <listitem>associated filename</listitem> 
     531            <listitem>associated mime-type</listitem> 
     532            <listitem>principal name</listitem> 
     533            <listitem> 
     534              whether the result of this editing session should be saved 
     535              as a new Nuxeo document else where in the repository 
     536              (creation use cases) 
     537            </listitem> 
     538          </itemizedlist> 
     539        </para> 
     540 
     541        <para> 
     542          In case of creating from a sample document: 
     543          <itemizedlist> 
     544            <listitem>the document id of the template</listitem> 
     545            <listitem> 
     546              the fieldpath hosting the binary attachment to initialized 
     547              the editor with 
     548            </listitem> 
     549          </itemizedlist> 
     550        </para> 
     551 
     552        <para> 
     553          The XML payload further contain a copy of all the HTTP request 
     554          headers and cookies + basic auth credentials and the adress of 
     555          the WSDL description of the LiveEdit webservice. 
     556        </para> 
     557 
     558        <para> 
     559          Please refer to the sample XML bootstrap file in the annexes 
     560          for more details on the syntax. Some fields (eg. document 
     561          reference) might be empty or missing in case of document 
     562          creation (use cases #2 and #3). 
     563        </para> 
     564 
    409565      </section> 
    410566