Show / Hide Table of Contents

Class RestrictionCriteriaStorage

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Inheritance
Object
RestrictionStorageBase
RestrictionCriteriaStorage
Implements
IRestrictionStorage
Inherited Members
RestrictionStorageBase.CreateDefaultRestrictionInfo(String, ArchiveColumnInfo, String)
RestrictionStorageBase.CreateDefaultRestrictionInfo(String, ArchiveColumnInfo)
RestrictionStorageBase.IsStorageKeyZero(String)
RestrictionStorageBase.IsStorageKeyNegativeOrZero(String)
RestrictionStorageBase.GetRestrictionColumns(String, String)
RestrictionStorageBase.IsSaintColumn(String)
RestrictionStorageBase.MapSaintColumn(SaintRestrictionExtenderBase.Columns, SaintRestrictionExtenderBase.CounterType, SaintRestrictionExtenderBase.MainType, Int32)
RestrictionStorageBase.Context
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
[RestrictionStoragePlugin("Criteria")]
[RestrictionStorageSentry("ContactDynamicSelection", "selection", "selection")]
public sealed class RestrictionCriteriaStorage : RestrictionStorageBase, IRestrictionStorage, IPlugin
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

Constructors

RestrictionCriteriaStorage()

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public RestrictionCriteriaStorage()
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

Fields

StorageType

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public const string StorageType = "Criteria"
Field Value
Type Description
String
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

Methods

ConvertDateTimeOperators(ArchiveRestrictionInfo)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public static bool ConvertDateTimeOperators(ArchiveRestrictionInfo restriction)
Parameters
Type Name Description
ArchiveRestrictionInfo restriction
Returns
Type Description
Boolean
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

CopyCriteria(Int32, Int32, Int32)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override void CopyCriteria(int sourceSearchCriteriaId, int ownerTable, int ownerId)
Parameters
Type Name Description
Int32 sourceSearchCriteriaId
Int32 ownerTable
Int32 ownerId
Overrides
RestrictionStorageBase.CopyCriteria(Int32, Int32, Int32)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

DeleteCriteria(String, String, Int32)

Delete all criteria associate with the given provider and storage key. Multiple searchCriteria rows will be deleted, and all dependent criteriaGroup, criterion and criterionValue rows

Declaration
public override void DeleteCriteria(string providerName, string storageKey, int groupRank = 0)
Parameters
Type Name Description
String providerName

Name of provider

String storageKey

Storage key identifying the criteria to be deleted

Int32 groupRank
Overrides
RestrictionStorageBase.DeleteCriteria(String, String, Int32)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

DeleteRestrictionGroup(String, String, Int32)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override void DeleteRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
Type Name Description
String providerName
String storageKey
Int32 rank
Overrides
RestrictionStorageBase.DeleteRestrictionGroup(String, String, Int32)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

Flush()

Flush all cached information - the main purpose is to regenerate Saint statuses and Udef fields

Declaration
public static void Flush()
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetHandledColumns(String)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override string[] GetHandledColumns(string providerName)
Parameters
Type Name Description
String providerName
Returns
Type Description
String[]
Overrides
RestrictionStorageBase.GetHandledColumns(String)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetRestrictionGroup(String, String, Int32)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override ArchiveRestrictionGroup GetRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
Type Name Description
String providerName
String storageKey
Int32 rank
Returns
Type Description
ArchiveRestrictionGroup
Overrides
RestrictionStorageBase.GetRestrictionGroup(String, String, Int32)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetRestrictionGroups(String, String)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override ArchiveRestrictionGroup[] GetRestrictionGroups(string providerName, string storageKey)
Parameters
Type Name Description
String providerName
String storageKey
Returns
Type Description
ArchiveRestrictionGroup[]
Overrides
RestrictionStorageBase.GetRestrictionGroups(String, String)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetRestrictions(String, String)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override ArchiveRestrictionInfo[] GetRestrictions(string providerName, string storageKey)
Parameters
Type Name Description
String providerName
String storageKey
Returns
Type Description
ArchiveRestrictionInfo[]
Overrides
RestrictionStorageBase.GetRestrictions(String, String)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetRestrictionsForGroup(String, String, Int32)

Get specified restrictions (no defaults), based on the provider name and storage key

Declaration
public override ArchiveRestrictionInfo[] GetRestrictionsForGroup(string providerName, string storageKey, int groupRank)
Parameters
Type Name Description
String providerName

Name of archive list provider who owns/supplies/processes the columns. Note: The name may be of the from providerName|guiName, where the guiName is a secondary key that must also be matched by get/save/delete operations. If there is no pipe/guiName, then a blank guiName is used.

String storageKey

Key information to pass to storage handler, for distinguishing multiple criteria sets. For Find dialogs, this would be the 'associate=<id>', since they are stored per associate; for reports, this would be 'publish=<id>&associate=<id>' since criteria sets for reports are stored per report and associate. This string can actually be anything that the handlers is prepared to accept and the examples here are guidelines. The criteria storage provider generally requires the keys to be valid table names, since it has to translate them into table numbers for the actual storage

Int32 groupRank
Returns
Type Description
ArchiveRestrictionInfo[]

Array of restrictions found, or empty array if nothing was found

Overrides
RestrictionStorageBase.GetRestrictionsForGroup(String, String, Int32)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

GetSpecifiedRestrictionsWithDefaults(String, String, String[])

Get the specified restrictions from the database; create and populate with defaults those that are not present in the database

Declaration
public override ArchiveRestrictionInfo[] GetSpecifiedRestrictionsWithDefaults(string providerName, string storageKey, params string[] requestedRestrictions)
Parameters
Type Name Description
String providerName

Name of archive list provider who owns/supplies/processes the columns. Note: The name may be of the from providerName|guiName, where the guiName is a secondary key that must also be matched by get/save/delete operations. If there is no pipe/guiName, then a blank guiName is used.

String storageKey

Key information to pass to storage handler, for distinguishing multiple criteria sets. For Find dialogs, this would be the 'associate=<id>', since they are stored per associate; for reports, this would be 'publish=<id>&associate=<id>' since criteria sets for reports are stored per report and associate. This string can actually be anything that the handlers is prepared to accept and the examples here are guidelines. The criteria storage provider genereally requires the keys to be valid table names, since it has to translate them into table numbers for the actual storage

String[] requestedRestrictions

Names of desired restrictions, using the format returned by GetUniqueRestrictionKey() (same as restriction name when there are no subretrictions, so you can safely use the restriction/column name directly if you are sure that subrestrictions will not be present).

Returns
Type Description
ArchiveRestrictionInfo[]
Overrides
RestrictionStorageBase.GetSpecifiedRestrictionsWithDefaults(String, String, String[])
Remarks

Restrictions with subrestrictions have somewhat complicated behaviour. The key point to keep in mind is that such restrictions have a unique restriction key, defined in GetUniqueRestrictionKey(). This key is equal to the name if there are no subrestrictions, and contains subrestriction names and value if there are subrestrictions. Available columns in a provider NEVER contain such subrestriction specifications, while clients of this method WILL be using subrestrictions. We therefore have to accept any restriction whose base name matches an available restriction column; then we have to filter and match the retrieved restrictions to correctly identify them with any specified subrestrictions. If a subrestriction-qualified restriction is specified and not found, a restriction with the same base name and default subrestrictions will be returned, instead of the values specified.

GetStrippedProviderName(String)

Extract the actual provider name from a possible providerName|guiName composite name string

Declaration
public static string GetStrippedProviderName(string rawProviderName)
Parameters
Type Name Description
String rawProviderName

raw provider name, may contain a pipe symbol and a gui name

Returns
Type Description
String

Provider name; what is in front of the optional pipe, or everything if no pipe is present

Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

SaveRestrictionGroup(String, String, ArchiveRestrictionGroup)

Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel

Declaration
public override void SaveRestrictionGroup(string providerName, string storageKey, ArchiveRestrictionGroup restrictionGroup)
Parameters
Type Name Description
String providerName
String storageKey
ArchiveRestrictionGroup restrictionGroup
Overrides
RestrictionStorageBase.SaveRestrictionGroup(String, String, ArchiveRestrictionGroup)
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.

SaveRestrictions(String, String, ArchiveRestrictionInfo[])

Save an array of restrictions for later use. The ColumnInfo member of the archive restriction info objects is not used and can be null.

Declaration
public override void SaveRestrictions(string providerName, string storageKey, params ArchiveRestrictionInfo[] restrictions)
Parameters
Type Name Description
String providerName

Name of archive list provider who owns/supplies/processes the columns. Note: The name may be of the from providerName|guiName, where the guiName is a secondary key that must also be matched by get/save/delete operations. If there is no pipe/guiName, then a blank guiName is used.

String storageKey

Key information to pass to storage handler, for distinguishing multiple criteria sets. For Find dialogs, this would be the 'associate=<id>', since they are stored per associate; for reports, this would be 'publish=<id>&associate=<id>' since criteria sets for reports are stored per report and associate. This string can actually be anything that the handlers is prepared to accept and the examples here are guidelines. The criteria storage provider genereally requires the keys to be valid table names, since it has to translate them into table numbers for the actual storage

ArchiveRestrictionInfo[] restrictions

Array of restrictions to be saved. Values, operators etc are also saved.

Overrides
RestrictionStorageBase.SaveRestrictions(String, String, ArchiveRestrictionInfo[])
Remarks

This class implements saving in a way that is compatible with the Windows client, so that saved dynamic selections work in exactly the same way.

By using the RestrictionStorageSentryAttribute, it is possible to declaratively force Sentry checks for certain combinations of previder name and storage key. Otherwise, no security restrictions are applied.
Exceptions
Type Condition
SoIllegalOperationException

Thrown if there is no handler for the given storageType, or if there were columns that could not be handled in the incoming array of restrictions.

Implements

IRestrictionStorage

Extension Methods

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