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.
Implements
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public abstract class RestrictionStorageBase : Object, IRestrictionStorage, IPlugin
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(Int32, Int32, Int32)
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 |
---|---|---|
Int32 | sourceSearchCriteriaId | |
Int32 | ownerTable | |
Int32 | 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, Int32)
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 | |
Int32 | groupRank |
DeleteRestrictionGroup(String, String, Int32)
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 | |
Int32 | 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, Int32)
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 | |
Int32 | 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, Int32)
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 | |
Int32 | rank |
Returns
Type | Description |
---|---|
ArchiveRestrictionInfo[] |
GetSpecifiedRestrictionsWithDefaults(String, 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[] 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 |
---|---|
Boolean | 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 |
---|---|
Boolean |
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 |
---|---|
Boolean | true if there are no non-zero id's |
MapSaintColumn(SaintRestrictionExtenderBase.Columns, out SaintRestrictionExtenderBase.CounterType, out SaintRestrictionExtenderBase.MainType, out Int32)
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 | |
Int32 | 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, 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 |