Show / Hide Table of Contents

Class ArchiveColumnsProviderBase

This is the base class that translates the list of available columns of an Archive Provider into an MDO list suitable for feeding the archive configuration dialog. It is a generic provider in the sense that it handles all known archive providers (via the plugin factory); if any particular archive needs special treatment then code to do so should be added here.

This class has two derived classes, one for choosing display columns and one for choosing orderby columns. The difference is in the filtering of columns, and how the current configuration is merged in.

Inheritance
object
ArchiveConfigurationProviderBase
ArchiveColumnsProviderBase
DashboardColumnsProvider
RestrictionColumnsProvider
VisibleColumnsProvider
Implements
IDynamicMDOProvider
ISoListProvider
ISoList
Inherited Members
ArchiveConfigurationProviderBase._rootItems
ArchiveConfigurationProviderBase._headingItems
ArchiveConfigurationProviderBase._historyItems
ArchiveConfigurationProviderBase._additionalInfo
ArchiveConfigurationProviderBase.AcceptProvider(string)
ArchiveConfigurationProviderBase.MergeInCurrentConfigurationAsync(string, object)
ArchiveConfigurationProviderBase.MergeInCurrentConfigurationAsync(string, object, string)
ArchiveConfigurationProviderBase.ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)
ArchiveConfigurationProviderBase.GetAllItemsAsync(CancellationToken)
ArchiveConfigurationProviderBase.GetHistoryItemsAsync(CancellationToken)
ArchiveConfigurationProviderBase.ClearHistoryItems()
ArchiveConfigurationProviderBase.GetRootItemsAsync(CancellationToken)
ArchiveConfigurationProviderBase.GetHeadingItemsAsync(CancellationToken)
ArchiveConfigurationProviderBase.HistoryInfo
ArchiveConfigurationProviderBase.SupportedLists
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOfficeCRMLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public abstract class ArchiveColumnsProviderBase : ArchiveConfigurationProviderBase, IDynamicMDOProvider, ISoListProvider, ISoList
Remarks

The AcceptColumn(ArchiveColumnInfo) and AcceptProvider abstract methods are overriden by subclasses and used to restrict the columns and archive providers handled. By default, the standard derived classes will handle all archive providers, but a partner may implement a new subclass which handles some set of providers. By setting the priority parameter of the DynamicMDOProviderPlugin attribute to less than int.MaxValue-100000, the value used by the standard classes, such a partner class may pre-empt the standard classes for its supported providers.

Constructors

ArchiveColumnsProviderBase()

Constructor

Declaration
public ArchiveColumnsProviderBase()

Fields

HeadingIdStart

Declaration
public const int HeadingIdStart = 20000
Field Value
Type Description
int

SubHeadingIdStart

Declaration
public const int SubHeadingIdStart = 18000
Field Value
Type Description
int

_context

Declaration
protected string _context
Field Value
Type Description
string

_providerEntity

Declaration
protected string _providerEntity
Field Value
Type Description
string

_providerName

Declaration
protected string _providerName
Field Value
Type Description
string

Properties

InternalNamePrefix

This property should return the name prefix used to build the SoList provider name from the archive data provider name

Declaration
protected override string InternalNamePrefix { get; }
Property Value
Type Description
string
Overrides
ArchiveConfigurationProviderBase.InternalNamePrefix

NamePrefix

The prefix used to differentiate our lists from all other MDO lists. To avoid naming collisions, if an archive is called 'activity' then the list we generate here will be called NamePrefix+'activity'. SupportedLists returns a list of the names we support (including prefix).

Declaration
public static string NamePrefix { get; }
Property Value
Type Description
string

Methods

AcceptColumn(ArchiveColumnInfo)

This method will be called once for every available column of the underlying archive provider. By returning true, this method indicates that the column should be included as an item in the final MDO list.

Declaration
protected abstract bool AcceptColumn(ArchiveColumnInfo column)
Parameters
Type Name Description
ArchiveColumnInfo column

Column information

Returns
Type Description
bool

true if column should be in constructed MDO list

BuildItem(int, ArchiveColumnInfo)

Build an ISoListItem based on the column info

Declaration
protected virtual ISoListItem BuildItem(int id, ArchiveColumnInfo columnInfo)
Parameters
Type Name Description
int id

Unique ID to assign

ArchiveColumnInfo columnInfo

Column information

Returns
Type Description
ISoListItem

List item, including can order by indicator

BuildListAsync(string, string, string, bool, CancellationToken)

This method is called during stage 2 of the two-phase construction process (from the Construct method). The actual implementation of the list construction, including new'ing the _rootItems and _headingItems collections is done here. Note that _historyItems is by default always empty for this kind of list, so it is pre-allocated as such by the base class.

Declaration
protected override Task BuildListAsync(string providerName, string guiControl, string searchValue, bool forceFlatList, CancellationToken cancellationToken)
Parameters
Type Name Description
string providerName
string guiControl

Name of GUI control, if provided by caller

string searchValue

Search value, if provided by caller

bool forceFlatList

Should the resulting list be forced to flat format (root items only)

CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
ArchiveConfigurationProviderBase.BuildListAsync(string, string, string, bool, CancellationToken)

Implements

IDynamicMDOProvider
ISoListProvider
ISoList

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top