Show / Hide Table of Contents

Class ListWithLiteralItemsBase

Base class for MDO lists that are based on an existing list, but need to add leading or trailing root items. This is typical for lists like the probability in the search dialog, amount class for SAINT criteria, etc.

The template method pattern is used; override the virtual methods you need to do your stuff. Methods you do not override will revert to their empty base implementation.

Inheritance
Object
ListWithLiteralItemsBase
SaintAmountClassProvider
SaintIntentionProvider
SaleProbability
SaleSource
UserGroupWithHistoryAllProvider
Implements
ISoListProvider
ISoList
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public abstract class ListWithLiteralItemsBase : ISoListProvider, ISoList, IPlugin

Constructors

ListWithLiteralItemsBase()

Declaration
protected ListWithLiteralItemsBase()

Properties

AllItems

Utility enumerator, runs over all non-history items

Declaration
public IEnumerable<ISoListItem> AllItems { get; }
Property Value
Type Description
IEnumerable<ISoListItem>

HeadingItems

Return headings and underlying items, empty if this is a flat list or a search

Declaration
public List<ISoListHeading> HeadingItems { get; }
Property Value
Type Description
List<ISoListHeading>

HistoryInfo

History information, returns null

Declaration
public HistoryInfo HistoryInfo { get; }
Property Value
Type Description
HistoryInfo

HistoryItems

Return history items, empty if this is a flat list or a search

Declaration
public List<ISoListItem> HistoryItems { get; }
Property Value
Type Description
List<ISoListItem>

InnerList

MainTableName to give access to the inner list, ie., the provider of the inner MDO list you wish to extend

Declaration
protected ISoListProvider InnerList { get; }
Property Value
Type Description
ISoListProvider

RootItems

Return root items, all items in case of a flat list or search

Declaration
public List<ISoListItem> RootItems { get; }
Property Value
Type Description
List<ISoListItem>

Methods

Construct(String, String, Int32[], Boolean, String, Boolean)

Construct the list, by using the derived class' property to call the SuperOffice.CRM.Lists.SoListProviderFactory. The various virtual methods are called, and the final list constructed.

Declaration
public void Construct(string listName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList)
Parameters
Type Name Description
String listName

Name of the desired list, passed to the derived class

String additionalInfo
Int32[] historyIDs

List of history id's (primary keys of the table holding the MDO list values).

Boolean onlyReadHistory

Only read history nodes.

String searchValue

Search value (case insensetive string used like '[searchValue]%'. The result when using this is allways a flat list without hisotry elements.

Boolean forceFlatList

State that a forced flat list should be returned.

FilterBySearchValue(IEnumerable<ISoListItem>)

Declaration
public IEnumerable<ISoListItem> FilterBySearchValue(IEnumerable<ISoListItem> items)
Parameters
Type Name Description
IEnumerable<ISoListItem> items
Returns
Type Description
IEnumerable<ISoListItem>

GetInnerListAdditionalInfo(String)

Declaration
protected virtual string GetInnerListAdditionalInfo(string additionalInfo)
Parameters
Type Name Description
String additionalInfo
Returns
Type Description
String

GetInnerListProviderName(String)

Subclass contract: Return the name of the desired inner provider; this will be passed to the SuperOffice.CRM.Lists.SoListProviderFactory.

Declaration
protected abstract string GetInnerListProviderName(string outerListname)
Parameters
Type Name Description
String outerListname

List name from the client code, useful if one class is to extend more than one list

Returns
Type Description
String

GetLeadingRootItems(List<ISoListItem>)

Subclass contract: Override this method to provide leading root items. Add your items to the list that is passed in. If you do not need to add leading items, do not override this method.

Declaration
protected virtual void GetLeadingRootItems(List<ISoListItem> leadingItems)
Parameters
Type Name Description
List<ISoListItem> leadingItems

List to add leading items to

GetTrailingRootItems(List<ISoListItem>)

Subclass contract: Override this method to provide trailing root items. Add your items to the list that is passed in. If you do not need to add trailing items, do not override this method.

Declaration
protected virtual void GetTrailingRootItems(List<ISoListItem> trailingItems)
Parameters
Type Name Description
List<ISoListItem> trailingItems

List to add trailing items to

ProcessHistoryItem(ISoListItem)

Subclass contract: Override this method to manipulate each history item. This method will be called once for each history item. If you do not need to manipulate items, do not override this method.

Note - items are not re-sorted, so chaning the rank may not have any effect.

Declaration
protected virtual void ProcessHistoryItem(ISoListItem item)
Parameters
Type Name Description
ISoListItem item

Item, to be updated as you see fit

ProcessItem(ISoListItem)

Subclass contract: Override this method to manipulate each root item (after leading and trailing items have been added). This method will be called once for each non-history item. If you do not need to manipulate items, do not override this method.

Note - items are not re-sorted, so chaning the rank may not have any effect.

Declaration
protected virtual void ProcessItem(ISoListItem item)
Parameters
Type Name Description
ISoListItem item

Item, to be updated as you see fit

Implements

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