Class ArchiveColumnInfo
This class carries information about the definition and properties of an archive display column. It is used by the archive MDO providers to construct column lists for the configuration dialogs, and by the archive control to know what type (and other properties) each column has. The class is serializable and used on both the application and Web server sides.
Implements
Inherited Members
Namespace: SuperOfficeCRMArchiveLists
Assembly: SoCore.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.7.0.0")]
public sealed class ArchiveColumnInfo : ICloneable
Constructors
ArchiveColumnInfo()
Construct the object, not setting anything.
Declaration
public ArchiveColumnInfo()
ArchiveColumnInfo(string, string, string)
Construct the object, setting name, display name and type only
Declaration
public ArchiveColumnInfo(string name, string displayName, string displayType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic unique name |
| string | displayName | User-visible display name |
| string | displayType | Column type, such as 'string', 'int', 'icon' etc |
ArchiveColumnInfo(string, string, string, string, bool, bool, string)
Construct the object, setting almost all fields. This constructor is suitable for all fields that are not restrictable lists or icons. For fields that can be used as restrictions, consider using the constructor that has the additional restrictionType and restrictionListName arguments, giving full control of the information.
Declaration
public ArchiveColumnInfo(string name, string displayName, string displayTooltip, string displayType, bool canOrderBy, bool isVisible, string width)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic unique name |
| string | displayName | User-visible display name |
| string | displayTooltip | Tooltip to be displayed when the user hovers over the field name in column lists |
| string | displayType | Column type, such as 'string', 'int', 'icon' etc |
| bool | canOrderBy | True if this field can be used in the order by list |
| bool | isVisible | True if this field should be visible in the archive configuration dialogs |
| string | width | Default or current width setting |
ArchiveColumnInfo(string, string, string, string, bool, bool, string, string)
Construct the object, setting all fields. This constructor is suitable for fields that can be used as restrictions. It has the additional restrictionType and restrictionListName arguments, giving full control of the information.
Declaration
public ArchiveColumnInfo(string name, string displayName, string displayTooltip, string displayType, bool canOrderBy, bool isVisible, string width, string restrictionType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic unique name |
| string | displayName | User-visible display name |
| string | displayTooltip | Tooltip to be displayed when the user hovers over the field name in column lists |
| string | displayType | Column type, such as 'string', 'int', 'icon' etc |
| bool | canOrderBy | True if this field can be used in the order by list |
| bool | isVisible | True if this field should be visible in the archive configuration dialogs |
| string | width | Default or current width setting |
| string | restrictionType | Data type for restrictions |
ArchiveColumnInfo(string, string, string, string, bool, bool, string, string, string)
Construct the object, setting all fields. This constructor is suitable for fields that can be used as restrictions. It has the additional restrictionType and restrictionListName arguments, giving full control of the information.
Declaration
public ArchiveColumnInfo(string name, string displayName, string displayTooltip, string displayType, bool canOrderBy, bool isVisible, string width, string restrictionType, string restrictionListName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic unique name |
| string | displayName | User-visible display name |
| string | displayTooltip | Tooltip to be displayed when the user hovers over the field name in column lists |
| string | displayType | Column type, such as 'string', 'int', 'icon' etc |
| bool | canOrderBy | True if this field can be used in the order by list |
| bool | isVisible | True if this field should be visible in the archive configuration dialogs |
| string | width | Default or current width setting |
| string | restrictionType | Data type for restrictions |
| string | restrictionListName | Name of list |
Fields
__sourceCode
Declaration
public string __sourceCode
Field Value
| Type | Description |
|---|---|
| string |
Properties
BaseName
Base part of the unique identity of this column, i.e., Name stripped of any prefixes. Note that this may no longer be unique. This property is read only.
Declaration
public string BaseName { get; }
Property Value
| Type | Description |
|---|---|
| string |
CanOrderBy
Can this column be used for sorting?
Declaration
[DataMember]
public bool CanOrderBy { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
CanRestrictBy
Can this column be used as a restriction
Declaration
[DataMember]
public bool CanRestrictBy { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
DisplayName
The column name to show, can be a resource identifier string
Declaration
[DataMember]
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayNamePrefixDelimiter
The delimiter used between components of a prefixed display name (what the user sees)
Declaration
public static string DisplayNamePrefixDelimiter { get; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayTooltip
The column tooltip, used in the column list and in the column headings
Declaration
[DataMember]
public string DisplayTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayType
Type of column, so that the archive knows how to display it (actual display values are always strings, invariant-culture formatted). This name can contain resource tags.
Declaration
[DataMember]
public string DisplayType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ExtraInfo
Example: "navigator" -> Should this column be mapped to a hyperlinked navigator text type?
Declaration
[DataMember]
public string ExtraInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HeadingIconHint
Icon hint for the archive heading only. If this is a nonempty string, the archive header should use this icon and ignore the DisplayName. Otherwise, the DisplayName should be used as the heading.
Declaration
[DataMember]
public string HeadingIconHint { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IconHint
Icon hint corresponding to the display name; this icon hint is used in the configuration dialog and other places where we 'talk about' the columns of the archive. The actual heading of the archive may also contain icons in lieu of textual names, the icon hint for that is specified in HeadingIconHint and is a different one.
Declaration
[DataMember]
public string IconHint { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IconHintPrefixDelimiter
The delimiter used between components of a prefixed iconhint
Declaration
public static string IconHintPrefixDelimiter { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsVisible
Is this column visible to the user in configuration dialogs etc
Declaration
[DataMember]
public bool IsVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Unique identity of this column (in this particular context); the name to be used when requesting the column from a provider, setting restrictions or order by criteria
Declaration
[DataMember]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
NamePrefixDelimiter
The delimiter used between components of a prefixed name
Declaration
public static string NamePrefixDelimiter { get; }
Property Value
| Type | Description |
|---|---|
| string |
RestrictionListName
If the restriction data type is 'list', this property contains the name of the SoList so that choices can be shown
Declaration
[DataMember]
public string RestrictionListName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RestrictionType
The data type of the restriction; use this to retrieve the legal operators for the restriction
Declaration
[DataMember]
public string RestrictionType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Width
The width specification, if the column info has been extended with GUI-based information. It is either "n%" or "nc", where n is an integer. Percent-formatted fields grow and shrink; number-of-characters formatted fields have constant width when the whole archive width changes.
Declaration
[DataMember]
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
AddPrefixToDisplayName(string, string)
Add a prefix to a column name, using the DisplayNamePrefixDelimiter
Declaration
public static string AddPrefixToDisplayName(string name, string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name to add a prefix to |
| string | prefix | Prefix, may be null or empty |
Returns
| Type | Description |
|---|---|
| string | Prefixed name |
AddPrefixToName(string, string)
Add a prefix to a column name, using the NamePrefixDelimiter
Declaration
public static string AddPrefixToName(string name, string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name to add a prefix to |
| string | prefix | Prefix, may be null or empty |
Returns
| Type | Description |
|---|---|
| string | Prefixed name |
AddToExtraInfo(string, string)
Declaration
public void AddToExtraInfo(string key, string value = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | |
| string | value |
AddToExtraInfo(string, string, string)
Declaration
public static string AddToExtraInfo(string extraInfo, string key, string value = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | extraInfo | |
| string | key | |
| string | value |
Returns
| Type | Description |
|---|---|
| string |
AssociateColumn(string, string, string)
Declaration
public static ArchiveColumnInfo AssociateColumn(string name, string displayName, string width = "8c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
AssociateFullNameColumn(string, string, string)
Declaration
public static ArchiveColumnInfo AssociateFullNameColumn(string name, string displayName, string width = "20%")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
CheckBoxColumn(string, string, string)
Declaration
public static ArchiveColumnInfo CheckBoxColumn(string name, string displayName, string width = "4c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
Clone()
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object |
DateColumn(string, string, string)
Declaration
public static ArchiveColumnInfo DateColumn(string name, string displayName, string width = "10c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
DateTimeColumn(string, string, string)
Declaration
public static ArchiveColumnInfo DateTimeColumn(string name, string displayName, string width = "16c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
DecimalColumn(string, string, string)
Declaration
public static ArchiveColumnInfo DecimalColumn(string name, string displayName, string width = "12c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
ExtractBaseName(string)
Get the base name of a column name (not display name)
Declaration
public static string ExtractBaseName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name to process |
Returns
| Type | Description |
|---|---|
| string | base name, i.e., without all prefixes |
ExtractCompletePrefix(string)
Extract the prefix from a column name. If there is no prefix, the empty string is returned. If there are multiple prefixes, one long string comprising everything except the base name is returned.
Declaration
public static string ExtractCompletePrefix(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name to process, can be null or empty |
Returns
| Type | Description |
|---|---|
| string | Empty string, or prefix. String may contain NamePrefixDelimiter but will not end with it |
IntColumn(string, string, string)
Declaration
public static ArchiveColumnInfo IntColumn(string name, string displayName, string width = "8c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
IsDotSyntax()
Declaration
public bool IsDotSyntax()
Returns
| Type | Description |
|---|---|
| bool |
IsDotSyntax(params string[])
Declaration
public static bool IsDotSyntax(params string[] columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName |
Returns
| Type | Description |
|---|---|
| bool |
NormalizeColumnPercentWidths(List<ArchiveColumnInfo>)
Normalize the percent widths of a list of columns
Declaration
public static void NormalizeColumnPercentWidths(List<ArchiveColumnInfo> retVal)
Parameters
| Type | Name | Description |
|---|---|---|
| ListArchiveColumnInfo | retVal |
PrefixBy(string, string)
Add the given prefix(es) to the name and displayname. You can prefix either the name, displayname, both or none.
Declaration
public void PrefixBy(string namePrefix, string displayNamePrefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | namePrefix | Prefix for column (internal) name, or null if it should not be prefixed |
| string | displayNamePrefix | Prefix for display name, or null if it should not be prefixed |
RegisteredByColumn()
Declaration
public static ArchiveColumnInfo RegisteredByColumn()
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
RegisteredDateColumn()
Declaration
public static ArchiveColumnInfo RegisteredDateColumn()
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
RemovePrefix(string, string)
Remove the given prefix(es) from the name and displayname, if present. You can remove either a name prefix, a display name prefix, both or none. No exceptions are thrown.
Declaration
public void RemovePrefix(string namePrefix, string displayNamePrefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | namePrefix | Internal name prefix to remove; will be removed if it is the front of the current name |
| string | displayNamePrefix | Display name prefix to remove; will be removed if it is the front of the current name |
StringColumn(string, string, string)
Declaration
public static ArchiveColumnInfo StringColumn(string name, string displayName, string width = "10c")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | displayName | |
| string | width |
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
ToNameArray(params ArchiveColumnInfo[])
Utility method to convert an array of ArchiveColumnInfo into a string array containing the names only
Declaration
public static string[] ToNameArray(params ArchiveColumnInfo[] columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveColumnInfo | columnInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| string | Array of names, in original order |
ToNameArray(List<ArchiveColumnInfo>)
Utility method to convert a list of ArchiveColumnInfo into a string array containing the names only
Declaration
public static string[] ToNameArray(List<ArchiveColumnInfo> columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ListArchiveColumnInfo | columnInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| string | Array of names, in original order |
ToNameArray(Predicate<ArchiveColumnInfo>, params ArchiveColumnInfo[])
Utility method to conditionally convert an array of ArchiveColumnInfo into a string array containing the names only. The given predicate is applied to each ArchiveColumnInfo to determine if its name should be included in the result.
Declaration
public static string[] ToNameArray(Predicate<ArchiveColumnInfo> condition, params ArchiveColumnInfo[] columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| PredicateArchiveColumnInfo | condition | Predicate that takes an ArchiveColumnInfo and returns a bool. A value of true indicates that that particular ArchiveColumnInfo should be included in the result. |
| ArchiveColumnInfo | columnInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| string | Array of names of column infos that were chosen, in original order |
ToNameArray(Predicate<ArchiveColumnInfo>, List<ArchiveColumnInfo>)
Utility method to conditionally convert a list of ArchiveColumnInfo into a string array containing the names only. The given predicate is applied to each ArchiveColumnInfo to determine if its name should be included in the result.
Declaration
public static string[] ToNameArray(Predicate<ArchiveColumnInfo> condition, List<ArchiveColumnInfo> columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| PredicateArchiveColumnInfo | condition | Predicate that takes an ArchiveColumnInfo and returns a bool. A value of true indicates that that particular ArchiveColumnInfo should be included in the result. |
| ListArchiveColumnInfo | columnInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| string | Array of names of column infos that were chosen, in original order |
ToNameDictionary(params ArchiveColumnInfo[])
Utility method to convert an array of ArchiveColumnInfo into a string array containing the names only
Declaration
public static Dictionary<string, ArchiveColumnInfo> ToNameDictionary(params ArchiveColumnInfo[] columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveColumnInfo | columnInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| DictionarystringArchiveColumnInfo | Array of names, in original order |
ToNameDictionary(List<ArchiveColumnInfo>)
Utility method to convert a list of ArchiveColumnInfo into a string array containing the names only
Declaration
public static Dictionary<string, ArchiveColumnInfo> ToNameDictionary(List<ArchiveColumnInfo> columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ListArchiveColumnInfo | columnInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| DictionarystringArchiveColumnInfo | Array of names, in original order |
ToNameDictionary(Predicate<ArchiveColumnInfo>, params ArchiveColumnInfo[])
Utility method to conditionally convert an array of ArchiveColumnInfo into a string array containing the names only. The given predicate is applied to each ArchiveColumnInfo to determine if its name should be included in the result.
Declaration
public static Dictionary<string, ArchiveColumnInfo> ToNameDictionary(Predicate<ArchiveColumnInfo> condition, params ArchiveColumnInfo[] columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| PredicateArchiveColumnInfo | condition | Predicate that takes an ArchiveColumnInfo and returns a bool. A value of true indicates that that particular ArchiveColumnInfo should be included in the result. |
| ArchiveColumnInfo | columnInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| DictionarystringArchiveColumnInfo | Array of names of column infos that were chosen, in original order |
ToNameDictionary(Predicate<ArchiveColumnInfo>, List<ArchiveColumnInfo>)
Utility method to conditionally convert a list of ArchiveColumnInfo into a string array containing the names only. The given predicate is applied to each ArchiveColumnInfo to determine if its name should be included in the result.
Declaration
public static Dictionary<string, ArchiveColumnInfo> ToNameDictionary(Predicate<ArchiveColumnInfo> condition, List<ArchiveColumnInfo> columnInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| PredicateArchiveColumnInfo | condition | Predicate that takes an ArchiveColumnInfo and returns a bool. A value of true indicates that that particular ArchiveColumnInfo should be included in the result. |
| ListArchiveColumnInfo | columnInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| DictionarystringArchiveColumnInfo | Array of names of column infos that were chosen, in original order |
ToString()
Returns a string representation of most of the column data, intended for debugging display use
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
ToString(string)
Declaration
public string ToString(string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix |
Returns
| Type | Description |
|---|---|
| string |
UpdatedByColumn()
Declaration
public static ArchiveColumnInfo UpdatedByColumn()
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |
UpdatedDateColumn()
Declaration
public static ArchiveColumnInfo UpdatedDateColumn()
Returns
| Type | Description |
|---|---|
| ArchiveColumnInfo |