ConnectorLib Java 24.4
ConnectorLib Java SDK Programming Guide

# Retrieve the URI of a Document

A connector's `GetUri` action takes a document identifier and returns a URI for the document in the repository.

The `ConnectorBase` class defines the entry point for this action:

           public void getUri(GetUriTask task) throws Throwable

To implement the `GetUri` action, override the `GetUri` function in your derived connector implementation class. For example, within the `MyConnector` class that extends `ConnectorBase`:

           public void getUri(GetUriTask task) throws Throwable
           {
              DocInfo doc = task.getDoc();
              String reference = doc.getId().getReference();
              task.setUri(reference);
           }

This example returns the reference of the document as the URI (be aware that the reference and URI are usually not the same). A typical implementation would use the reference and identifier properties to retrieve or construct the full URI of the document in the repository where the document resides. If the document does not exist in the repository or the identifier properties are invalid, throw an exception to indicate failure.

Copyright 2024 Open Text
Version 24.4 | Last updated September 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL ConnectorLib Java 24.4

Topic Title: Retrieve the URI of a Document