Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URL-editors must be exported as an OSGi service with an urlEditorRole service property like follows. Multiple editors can propagate the same role. Consuming applications should therefore provide users with a selection possiblity.

No Format

 <bp:service id="sampleUrlEditorService"
             interface="org.clazzes.sketch.entities.service.IExternalUrlEditor"
             ref="sampleUrlEditor">
   <bp:service-properties>
      <bp:entry key="urlEditorRole" value="org.example.path::SampleEditor"/>
   </bp:service-properties>
 </bp:service>

...

All IExternalURlEditor services are registered by the ExternalUrlEditorRegistry provided by the serializable-entities bundle. All IExternalUrlEditor instances for a given urlEditorRole my be discovered by the following URL (locale information is optional)

No Format

/sketch-url-editors/org.example.path::SampleEditor?locale=de

This URL returns a JSON array in the following form:

No Format

[{"urlPrefix":"/pegelonline-data/data","editorUrl":"/pegelonline-data/donau.html","label":"Pegelonline Donau"},
 {"urlPrefix":"/tasprog/tpTimeSeries","editorUrl":"/tasprog-url-editor/","label":"TASPROG time-dependent time series"}]

...

urlEditorRole

expected result of the data URL

org.clazzes.sketch::ImageUrl

Image data with an appropriate Content-Type like image/png or image/jpeg

org.clazzes.sketch.scientific::DataSetUrl

A JSON result set a specified in Scientific DataSetUrl JSON Result format

org.clazzes.sketch.richtext::RichTextUrl

form field resultType "org.clazzes.sketch.richtext.base.ITextEntity": A JSON-formatted richtext entity .

org.clazzes.sketch.scientificrichtext::TimeKeyedRichTextUrl
RichTextUrl

form field resultType "org.clazzes.sketch.scientific.entities.data.RemoteRichtext[]": A map of JSON-formatted richtext entites and timestamp keys see Scientific time-keyed Richtext Map Result Format