Creating a custom EDMS provider

This topic provides general guidelines for creating a custom provider, rather than detailed instructions. In addition to these guidelines, there are two resources in the Infor Public Sector Reference Guide that will assist you in creating a provider:

  • DocumentManagement.chm, in the API\NextGen\Core folder, contains complete documentation on the EDMS interface and its supporting classes.
  • The CodeSamples\Code\DocumentManagement folder contains two sample providers.

The EDMS interface is called IEDMSProvider, located in the Hansen.Core.DocumentManagement namespace. This is the basic interface that is used to create a custom provider. Two additional interfaces, IEDMSProviderUpdate and IEDMSProviderDelete, can be used to update and delete documents in the custom provider.

Supporting classes

The Hansen.Core.DocumentManagement namespace includes two supporting classes that you can use to work with documents in the EDMS: Container and Document.

The Container class represents a container within the EDMS (comparable to a directory in a file system). This table describes the properties of the Container class:

Property Type Description
ID string Unique ID for the container
Metadata SortedDictionary<string, string> The container’s metadata
Name string Name of the container as it is displayed in the EDMS
Thumbnail URI string URI of the thumbnail image associated with the container

The Document class represents a document in the EDMS. This table describes the properties of the Document class:

Property Type Description
Container Container Container in the EDMS where the document is located
DisplayName string Name of the document as it is displayed in the EDMS
DocumentURI string URI of the document
ID string Unique ID for the document
Metadata SortedDictionary<string, string> The document’s metadata
ThumbnailURI string URI of the thumbnail image associated with the document
DisplayMethod DisplayMethods enumeration Indicates how the EMDS provider will show attachments to the end user. Attachments can be shown in the browser or in the download dialog window.
MimeType String Defines a mime type when the EDMS provider shows attachments in the browser. This property is ignored if the download dialog window is shown.

Interface methods

As defined in the IEDMSProvider interface, the provider must implement these methods:

  • AddDocument: Adds a new document to a specified container in the EDMS.

    Document AddDocument( Container container, string fileSystemName, string title, SortedDictionary<string, string> metadata );

  • SearchForContainer: Searches for a container in the EDMS based on a display name or a set of metadata.

    List<Container> SearchForContainer(SortedDictionary<string, string> metadata);

  • SearchForDocuments: Searches for a document in the EDMS based on a set of metadata.

    List<Document> SearchForDocuments(SortedDictionary<string, string> metadata);

Updating and deleting documents

The IEDMSProvider interface doesn't include methods to update or delete documents, but these are available in two separate interfaces, also in the Hansen.Core.DocumentManagement namespace. The IEDMSProviderUpdate interface defines a method called UpdateDocument.

Document UpdateDocument(Document document, Stream stream, IComponent parent, DocumentAttributes attributes);

The IEDMSProviderDelete interface defines a method called DeleteDocument. Implementing this method will cause the Delete Attachment button to appear on attachments in the custom provider.

void DeleteDocument( Document document, IComponent parent );

Deployment

After you have compiled your provider, the assembly must be placed on a server where it can communicate with both Infor Public Sector and the agency’s EDMS. Infor Public Sector does not require the provider to be installed in any particular location, because you will specify the full path to the provider when you configure it in Infor Public Sector.

Depending on the EDMS, there may be additional steps involved in setting up the provider on the server, such as creating a virtual directory in IIS or adding a .config file to the Infor Public Sector directory.

See DocumentProviders configuration.