Maybe I'll need to update the site documentation later when I got some time with the details about the interactions between the UIs and the ExternalDocumentServiceFacade (
http://exdocpickerbase.forge.onehippo.org/apidocs/org/onehippo/forge/exdocpicker/api/ExternalDocumentServiceFacade.html) implementation (in your case, you should implement an ExternalDocumentServiceFacade invoking your REST service).
By the way there are two UI components: one is plugin itself (displaying in the document editor) and the other is the popup dialog (when clicking on browse button).
Anyway, here's some info about the interaction:
- the plugin invokes #getFieldExternalDocuments() on ExternalDocumentServiceFacade impl to list/display all the existing selected external documents in the document editor.
- the dialog invokes #searchExternalDocuments() when search button is clicked on or initial search option is turned on.
- the dialog invokes #getDocumentDescription(), #getDocumentIconLink() and #getDocumentTitle() on each item from the search result to display in the dialog.
- when somethings are selected and user clicks on OK button, the dialog invokes #setFieldExternalDocuments() to give a chance to update the document by the selection.
So, it's totally up to how you implement ExternalDocumentServiceFacade.
HTH,
Woonsan