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.
Inheritance
System.Object
RestrictionStorageBase
Assembly: SoDataBase.dll
Syntax
public abstract class RestrictionStorageBase : Object, IRestrictionStorage, IPlugin
Constructors
RestrictionStorageBase()
Declaration
protected RestrictionStorageBase()
Properties
Context
Declaration
public string Context { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CopyCriteria(Int32, Int32, Int32)
Declaration
public virtual void CopyCriteria(int sourceSearchCriteriaId, int ownerTable, int ownerId)
Parameters
Type |
Name |
Description |
System.Int32 |
sourceSearchCriteriaId |
|
System.Int32 |
ownerTable |
|
System.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 |
System.String |
providerName |
Name of archive provider
|
ArchiveColumnInfo |
defaultColumn |
Column to make restriction for
|
Returns
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 |
System.String |
providerName |
Name of archive provider
|
ArchiveColumnInfo |
defaultColumn |
Column to make restriction for
|
System.String |
defaultRestrictionOperator |
Set a specific operator for the default restriction
|
Returns
DeleteCriteria(String, String, Int32)
Declaration
public virtual void DeleteCriteria(string providerName, string storageKey, int groupRank = 0)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
System.Int32 |
groupRank |
|
DeleteRestrictionGroup(String, String, Int32)
Declaration
public virtual void DeleteRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
System.Int32 |
rank |
|
GetHandledColumns(String)
Declaration
public abstract string[] GetHandledColumns(string providerName)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
Returns
Type |
Description |
System.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 |
System.String |
providerName |
Name of archive provider
|
System.String |
context |
|
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, ArchiveColumnInfo> |
Dictionary<column name, column info> of columns
|
GetRestrictionGroup(String, String, Int32)
Declaration
public virtual ArchiveRestrictionGroup GetRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
System.Int32 |
rank |
|
Returns
GetRestrictionGroups(String, String)
Declaration
public virtual ArchiveRestrictionGroup[] GetRestrictionGroups(string providerName, string storageKey)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
Returns
GetRestrictions(String, String)
Declaration
public abstract ArchiveRestrictionInfo[] GetRestrictions(string providerName, string storageKey)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
Returns
GetRestrictionsForGroup(String, String, Int32)
Declaration
public virtual ArchiveRestrictionInfo[] GetRestrictionsForGroup(string providerName, string storageKey, int rank)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
System.Int32 |
rank |
|
Returns
GetSpecifiedRestrictionsWithDefaults(String, String, String[])
Declaration
public abstract ArchiveRestrictionInfo[] GetSpecifiedRestrictionsWithDefaults(string providerName, string storageKey, params string[] columnNames)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
System.String[] |
columnNames |
|
Returns
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 |
System.String |
columnName |
|
Returns
Type |
Description |
System.Boolean |
true if the column is a saint column
|
IsStorageKeyNegativeOrZero(String)
Declaration
protected bool IsStorageKeyNegativeOrZero(string storageKey)
Parameters
Type |
Name |
Description |
System.String |
storageKey |
|
Returns
Type |
Description |
System.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 |
System.String |
storageKey |
Storage key
|
Returns
Type |
Description |
System.Boolean |
true if there are no non-zero id's
|
MapSaintColumn(SaintRestrictionExtenderBase.Columns, out SaintRestrictionExtenderBase.CounterType, out SaintRestrictionExtenderBase.MainType, out Int32)
Declaration
protected void MapSaintColumn(SaintRestrictionExtenderBase.Columns saintColumn, out SaintRestrictionExtenderBase.CounterType counterType, out SaintRestrictionExtenderBase.MainType mainType, out int skipValues)
Parameters
SaveRestrictionGroup(String, String, ArchiveRestrictionGroup)
Declaration
public virtual void SaveRestrictionGroup(string providerName, string storageKey, ArchiveRestrictionGroup restrictionGroup)
Parameters
SaveRestrictions(String, String, ArchiveRestrictionInfo[])
Declaration
public abstract void SaveRestrictions(string providerName, string storageKey, params ArchiveRestrictionInfo[] restrictions)
Parameters
Type |
Name |
Description |
System.String |
providerName |
|
System.String |
storageKey |
|
ArchiveRestrictionInfo[] |
restrictions |
|
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)