Advanced interfaces

In addition to IEDMSBasicProvider and IEDMSDocumentTypeProvider, there are some advanced interfaces that you can use to enhance or override the standard EDM provider functionality.

IEDMSConfiguration

Use this interface to customize the configuration properties that you enter when adding a custom provider in EDM Setup. The properties that you specify will be added to the Add EDM Provider page in Infor Public Sector. This interface provides two methods, GetConfigurationProperties and SetConfigurationProperties.

public interface IEDMSConfiguration
{
    /// <summary>
    /// A list of properties returned. These returned properties will be presented to 
    /// the admin user to fill out in the IPS UI.
    /// </summary>
    /// <returns></returns>
    IEnumerable<EDMSConfigurationProperty> GetConfigurationProperties();
 
    /// <summary>
    /// Accepts a list of properties for the provider to use during provider 
    /// initialization.
    /// </summary>
    /// <param name="properties"></param>
    void SetConfigurationProperties( IEnumerable<EDMSConfiguratonPropertyValue> 
       properties );
}

The GetConfigurationProperties method returns an IEnumerable list of EDMSConfigurationProperty objects. Each EDMSConfigurationProperty object defines a custom property that will be displayed as an additional field in EDM Setup.

public class EDMSConfigurationProperty
{
   /// <summary>
    /// The name of the property used by the provider.
    /// </summary>
    public string PropertyName { get; set; }
 
    /// <summary>
    /// The display name to show to the user when adding a provider in IPS.
    /// </summary>
    public string DisplayName { get; set; }
 
    /// <summary>
    /// Describes the purpose of this property and is shown to the user as a tool tip 
    /// in IPS.
    /// </summary>
    public string Description { get; set; }
 
    /// <summary>
    /// The value to use if no value is set by the user in IPS.
    /// </summary>
    public string DefaultValue { get; set; }
 
    /// <summary>
    /// The order this property should be shown to the user in IPS.
    /// </summary>
    public int? DisplayOrder { get; set; }
 
    /// <summary>
    /// The type of property this is.
    /// </summary>
    public Type Type { get; set; }
 
    /// <summary>
    /// Determines if this property is required.
    /// </summary>
    public bool IsRequired { get; set; }
 
    /// <summary>
    /// Determines if the value should be stored in IPS encrypted. Most often used for 
    /// stored passwords.
    /// </summary>
    public bool IsStoredEncrypted { get; set; }
 
    /// <summary>
    /// If this property is populated then IPS will display a drop down of values to 
    /// choose from.
    /// </summary>
    public Dictionary<string, string> PossibleValues { get; set; }
}

The SetConfigurationProperties method is called when a custom provider is initialized in Infor Public Sector. It passes in an IEnumerable list of EDMSConfiguratonPropertyValue objects, each of which contains a property name and a value.

public class EDMSConfiguratonPropertyValue
{
    /// <summary>
    /// The name of the property used by the provider.
    /// </summary>
    public string PropertyName { get; set; }
 
    /// <summary>
    /// The property value set by the user in IPS.
    /// </summary>
    public string Value { get; set; }
}

IEDMSProviderCredentials

Use this interface to customize the credentials that the custom provider uses.

public interface IEDMSProviderCredentials
{
    /// <summary>
    /// Returns a CredentialCache to be set on the WebRequest when retrieving the 
    /// document uri or thumbnail uri.
    /// </summary>
    /// <param name="uri"></param>
    /// <returns></returns>
    CredentialCache GetCredentialCache( string uri );
}

IEDMSProviderStream

Use this interface to return documents from the custom provider as streams.

public interface IEDMSProviderStream
{
    /// <summary>
    /// Returns a stream given the uri. The uri is typically the document uri or the 
    /// thumbnail uri.
    /// </summary>
    /// <param name="uri"></param>
    /// <returns></returns>
    Stream GetDocument( string uri );
}