Class RestrictionCriteriaStorage
Concrete criteria storage class for handling search/find/selection/... restrictions - generally all restriction storage except for the Reporter panel
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
[RestrictionStoragePlugin("Criteria")]
[RestrictionStorageSentry("ContactDynamicSelection", "selection", "selection")]
public sealed class RestrictionCriteriaStorage : RestrictionStorageBase, IRestrictionStorage
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 |
---|---|
bool |
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(int, int, int)
Finds the search criteria and copies it into a new row, with input owner table and owner id, with new rows also propogating down for associated search criteria group, search criterion and search criterion value. This will delete existing rows with associated owner table and owner ID.
Declaration
public override void CopyCriteria(int sourceSearchCriteriaId, int ownerTable, int ownerId)
Parameters
Type | Name | Description |
---|---|---|
int | sourceSearchCriteriaId | The search criteria to copy. |
int | ownerTable | The owner table. |
int | ownerId | The owner ID. |
Overrides
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, int)
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 |
int | groupRank |
Overrides
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, int)
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 | |
int | rank |
Overrides
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)
Get the names of all columns handled for the given combination of provider name and storage type. These are the only valid column names for the other methods in this interface.
Declaration
public override string[] GetHandledColumns(string providerName)
Parameters
Type | Name | Description |
---|---|---|
string | providerName | Provider name to check for |
Returns
Type | Description |
---|---|
string[] | Array of column names. This array may be empty if no columns are handled. |
Overrides
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. |
GetRestrictionGroup(string, string, int)
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 | |
int | rank |
Returns
Type | Description |
---|---|
ArchiveRestrictionGroup |
Overrides
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
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)
Retrieve previously saved restrictions according to the given keys The ArchiveRestrictionInfo objects are fully populated, including the ArchiveColumnInfo part.
Declaration
public override ArchiveRestrictionInfo[] GetRestrictions(string providerName, string storageKey)
Parameters
Type | Name | Description |
---|---|---|
string | providerName | Name of archive list provider who owns/supplies/processes the columns |
string | storageKey | Key information to pass to storage handler, for distinguishing multiple criteria sets. For Find dialogs, this would be the 'associateId=<id>', since they are stored per associate; for reports, this would be 'publishId=<id>&associateId=<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. |
Returns
Type | Description |
---|---|
ArchiveRestrictionInfo[] | Array of restrictions. This array may be empty if no restrictions corresponded to the given key. |
Overrides
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. |
GetRestrictionsForGroup(string, string, int)
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 |
int | groupRank |
Returns
Type | Description |
---|---|
ArchiveRestrictionInfo[] | Array of restrictions found, or empty array if nothing was found |
Overrides
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, params 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
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
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, params 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
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. |