Ingest from Cloud

Create custom endpoints to ingest content into Visallo. A long-running process will process the loading of content asynchronously. Plugins must register a CloudResourceSource service that returns a CloudResourceItem (or multiple) given a JSON configuration object generated by a custom component in the UI.

Cloud import items are available in the file import popover.


For this tutorial we'll build a new URL cloud ingest plugin. The user will supply a URL (to a document, image, etc.) to import into Visallo.

Web Plugin Resources

Register the plugin and configuration component, along with a message bundle.

public void init(WebApp app, ServletContext servletContext, Handler authenticationHandler) {
    app.registerJavaScript("/org/visallo/examples/ingest_cloud/plugin.js", true);



Register Extension

require(['public/v1/api'], function(visallo) {

    visallo.registry.registerExtension('', {
        identifier: 'org.visallo.examples.ingest_cloud.UrlIngestCloudResourceSource',
        componentPath: 'org/visallo/examples/ingest_cloud/UrlConfig'


React Configuration Component

Now, create the React component interface to specify a URL to ingest.

const UrlConfig = React.createClass({

Call the onImport when the user clicks import.

onImport() {
    const { url } = this.state;
    this.props.onImport({ paths: [url] });

Create the CloudResourceSource

Create the Java class, and register as a service in META-INF/services. The full Java class should match the identifier defined in the extension.

public class UrlIngestCloudResourceSource implements CloudResourceSource {

    public Collection<CloudResourceSourceItem> getItems(JSONObject jsonObject) {

        Collection<CloudResourceSourceItem> items = new ArrayList<>();

        JSONArray paths = jsonObject.getJSONArray("paths");
        String url = paths.optString(0);

        return items;


Message Bundle

The interface needs some message keys for the component, and an implicit title based on the identifier.

org.visallo.examples.ingest_cloud.placeholder=URL to Import...

Flight Component Example

Legacy plugins written in Flight should trigger a cloudImported event with the configuration.

For example:

this.trigger('cloudImported', { paths: [url] })

results matching ""

    No results matching ""