Class RestrictionStorageBase
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public abstract class RestrictionStorageBase
Constructors
RestrictionStorageBase()
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
protected RestrictionStorageBase()
Properties
Context
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public string Context { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CopyCriteria(int, int, int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual void CopyCriteria(int sourceSearchCriteriaId, int ownerTable, int ownerId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | sourceSearchCriteriaId | |
| int | ownerTable | |
| int | ownerId |
CreateDefaultRestrictionInfo(string, ArchiveColumnInfo)
Create an empty restriction information object for the given provider and column. This base implementation does not differentiate between providers - but a derived class might.
Declaration
protected ArchiveRestrictionInfo CreateDefaultRestrictionInfo(string providerName, ArchiveColumnInfo defaultColumn)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | Name of archive provider |
| ArchiveColumnInfo | defaultColumn | Column to make restriction for |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionInfo | Populated restriction information object |
CreateDefaultRestrictionInfo(string, ArchiveColumnInfo, string)
Create an empty restriction information object for the given provider and column. This base implementation does not differentiate between providers - but a derived class might.
Declaration
protected ArchiveRestrictionInfo CreateDefaultRestrictionInfo(string providerName, ArchiveColumnInfo defaultColumn, string defaultRestrictionOperator)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | Name of archive provider |
| ArchiveColumnInfo | defaultColumn | Column to make restriction for |
| string | defaultRestrictionOperator | Set a specific operator for the default restriction |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionInfo | Populated restriction information object |
DeleteCriteria(string, string, int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual void DeleteCriteria(string providerName, string storageKey, int groupRank = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| int | groupRank |
DeleteRestrictionGroup(string, string, int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual void DeleteRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| int | rank |
GetHandledColumns(string)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public abstract string[] GetHandledColumns(string providerName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName |
Returns
| Type | Description |
|---|---|
| string[] |
GetRestrictionColumns(string, string)
Get the available columns from the archive provider, and keep only those marked with CanRestrict == true. Return a dictionary of column info indexed by name
Declaration
protected static Dictionary<string, ArchiveColumnInfo> GetRestrictionColumns(string providerName, string context)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | Name of archive provider |
| string | context |
Returns
| Type | Description |
|---|---|
| Dictionary<string, ArchiveColumnInfo> | Dictionary<column name, column info> of columns |
GetRestrictionGroup(string, string, int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual ArchiveRestrictionGroup GetRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| int | rank |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionGroup |
GetRestrictionGroups(string, string)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual ArchiveRestrictionGroup[] GetRestrictionGroups(string providerName, string storageKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionGroup[] |
GetRestrictions(string, string)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public abstract ArchiveRestrictionInfo[] GetRestrictions(string providerName, string storageKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionInfo[] |
GetRestrictionsForGroup(string, string, int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual ArchiveRestrictionInfo[] GetRestrictionsForGroup(string providerName, string storageKey, int rank)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| int | rank |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionInfo[] |
GetSpecifiedRestrictionsWithDefaults(string, string, params string[])
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public abstract ArchiveRestrictionInfo[] GetSpecifiedRestrictionsWithDefaults(string providerName, string storageKey, params string[] columnNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| string[] | columnNames |
Returns
| Type | Description |
|---|---|
| ArchiveRestrictionInfo[] |
IsSaintColumn(string)
Determine whether a certain column name is a saint column or not (statuses are parsed only for the saintStatus prefix, which is not bomb-proof but generally good enough)
Declaration
protected bool IsSaintColumn(string columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName |
Returns
| Type | Description |
|---|---|
| bool | true if the column is a saint column |
IsStorageKeyNegativeOrZero(string)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
protected bool IsStorageKeyNegativeOrZero(string storageKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | storageKey |
Returns
| Type | Description |
|---|---|
| bool |
IsStorageKeyZero(string)
Determine if the storage key is either empty, or only contains zero-valued id's
Declaration
protected bool IsStorageKeyZero(string storageKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | storageKey | Storage key |
Returns
| Type | Description |
|---|---|
| bool | true if there are no non-zero id's |
MapSaintColumn(Columns, out CounterType, out MainType, out int)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
protected void MapSaintColumn(SaintRestrictionExtenderBase.Columns saintColumn, out SaintRestrictionExtenderBase.CounterType counterType, out SaintRestrictionExtenderBase.MainType mainType, out int skipValues)
Parameters
| Type | Name | Description |
|---|---|---|
| SaintRestrictionExtenderBase.Columns | saintColumn | |
| SaintRestrictionExtenderBase.CounterType | counterType | |
| SaintRestrictionExtenderBase.MainType | mainType | |
| int | skipValues |
SaveRestrictionGroup(string, string, ArchiveRestrictionGroup)
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public virtual void SaveRestrictionGroup(string providerName, string storageKey, ArchiveRestrictionGroup restrictionGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| ArchiveRestrictionGroup | restrictionGroup |
SaveRestrictions(string, string, params ArchiveRestrictionInfo[])
Base class for restriction storage providers, containing useful common methods. Inheriting from this class is useful but not mandatory for a storage provider.
Declaration
public abstract void SaveRestrictions(string providerName, string storageKey, params ArchiveRestrictionInfo[] restrictions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | |
| string | storageKey | |
| ArchiveRestrictionInfo[] | restrictions |