Class ParticipantsProvider
Archive list provider for the participants list of a booking (multi-person appointment)
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
[ArchiveProvider("Participants", 1073741823)]
public class ParticipantsProvider : InMemoryProviderBase<ArchiveRow>, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities, IPlugin
Remarks
This provider, like the LinksProvider, offers two alternative ways of accessing the data. For existing appointments, the appointment_id is used as search criterion. This will retrieve all participants in this appointment, regardless of whether the given appointment is the mother or one of the slaves.
For appointments under construction, where the data have not yet been saved to the database, the caller must specify all data through the use of restrictions - some of which are then used for information, and some as keys to fetch actual person or associate/resource records from the database.
Restriction | Meaning |
---|---|
appointmentRestrictionId | Single appointment id, using the = operator. This restriction is used on its own for fetching information from existing appointment records. The id may be of any appointment in the booking, and all participants will be fetched (limited by entity selection). |
associateRestrictionId | Operator: IN, Value: array of associate id's. These will be returned as participants of type associate, if the associate entity has been selected. |
groupRestrictionId | Operator: =, Value: group id. The group will be translated into associate id's, and these will be returned as participants of type associate, if the associate entity has been selected. This is an alternative to specifying the associates one by one and cannot be used together with the associateRestrictionId. |
externalPersonRestrictionId | Operator: IN, Value: array of of person id's. These will be returned as participants of type external person, if the externalPerson entity has been selected. Note: Persons who are actually associates will be detected as such, and be returned as associates. |
resourceRestrictionId | Operator: IN, Value: array of of associate id's. These will be returned as participants of type resource, if the resource entity has been selected. |
personEmailsInformation | Operator: IN, Value: array of of person id's. This restriction is optionally used together with externalPersonRestrictionId, and specifies which of the persons should have an email icon set. |
associateEmailsInformation | Operator: IN, Value: array of of associate id's. This restriction is optionally used together with associatePersonRestrictionId, and specifies which of the associates should have an email icon set. Note that resources do not get invitation emails, so there is no corresponding resourceEmailsInformation restriction. |
startTimeInformation | Datetime of appointment start, needed when fetching data through the explicit restrictions (not appointmentRestrictionId) and if you want collision detection. |
endTimeInformation | Datetime of appointment end, needed when fetching data through the explicit restrictions (not appointmentRestrictionId) and if you want collision detection. |
ownerAssociateIdInformation | Operator: =, value: associate id. This is the Id of associate who is the owner of the whole booking. If this is not given, and appointmentRestrictionId is given, the system will look up the associate of the master booking record (mother_id = appointment_id) and use that as the owner. If ownerAssociateIdInformation is given, it overrides (disables) this lookup. If neither are given, then there is no owner associate. The owner associate always comes at the top of the list, and has the 'owner' row style hint. |
inhibitConflictsInformation | Operator: =, value: boolean. If you provide either an appointmentRestrictionId or startTime/EndTime, then conflicts will be detected. However, if the appointment is of type Free, then no conflict detetction will occur. To force 'free' behaviour on an under-construction appointment that does not have an appointment id, or on an appointment that is being changed, include this restriction with the value true. That will turn off conflict detection. |
Conflict detection is provided if the status column is requested. For non-saved data, this also requires the presence of startTimeInformation and endTimeInformation restrictions (dates in InvariantCulture format), so that the conflicts may be calculated.
Finally, the email status (should emails be sent for invitations and changes) is read from the database if the appointmentRestrictionId is used; if explicit person or associate restrictions are used, then email status information must be passed in through the associateEmailsInformation and personEmailsInformation restrictions. The value of each restriction is a list of associate resp. person id's who have the email flag set. If all this sounds complex - well, it is.
Being the tolerant sort, the provider will accept both associates and resources in each of associateRestrictionId and resourceRestrictionId, and internally sort out which is which. Similarly, if any of the person id's you happen to pass in through the externalPersonRestrictionId are actually associates, then that too will be sorted out.
Constructors
ParticipantsProvider()
Set up the instance; should only be called by factory class
Declaration
public ParticipantsProvider()
Fields
_colDateInformation
Declaration
protected ArchiveColumnInfo _colDateInformation
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
_colEndTimeInformation
Declaration
protected ArchiveColumnInfo _colEndTimeInformation
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
_colInhibitConflictsInformation
Declaration
protected ArchiveColumnInfo _colInhibitConflictsInformation
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
_colOwnerAssociateIdInformation
Declaration
protected ArchiveColumnInfo _colOwnerAssociateIdInformation
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
_colStartTimeInformation
Declaration
protected ArchiveColumnInfo _colStartTimeInformation
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
AppointmentRestrictionId
Declaration
public const string AppointmentRestrictionId = "appointmentRestrictionId"
Field Value
Type | Description |
---|---|
String |
AssociateEmailsInformation
Declaration
public const string AssociateEmailsInformation = "associateEmailsInformation"
Field Value
Type | Description |
---|---|
String |
AssociateEntity
Declaration
public const string AssociateEntity = "associate"
Field Value
Type | Description |
---|---|
String |
AssociateRestrictionId
Declaration
public const string AssociateRestrictionId = "associateRestrictionId"
Field Value
Type | Description |
---|---|
String |
DateInformation
Declaration
public const string DateInformation = "dateInformation"
Field Value
Type | Description |
---|---|
String |
EndTimeInformation
Declaration
public const string EndTimeInformation = "endTimeInformation"
Field Value
Type | Description |
---|---|
String |
ExternalPersonEntity
Declaration
public const string ExternalPersonEntity = "externalPerson"
Field Value
Type | Description |
---|---|
String |
ExternalPersonRestrictionId
Declaration
public const string ExternalPersonRestrictionId = "externalPersonRestrictionId"
Field Value
Type | Description |
---|---|
String |
GroupRestrictionId
Declaration
public const string GroupRestrictionId = "groupRestrictionId"
Field Value
Type | Description |
---|---|
String |
InhibitConflictsInformation
Declaration
public const string InhibitConflictsInformation = "inhibitConflictsInformation"
Field Value
Type | Description |
---|---|
String |
OwnerAssociateIdInformation
Declaration
public const string OwnerAssociateIdInformation = "ownerAssociateIdInformation"
Field Value
Type | Description |
---|---|
String |
PersonEmailsInformation
Declaration
public const string PersonEmailsInformation = "personEmailsInformation"
Field Value
Type | Description |
---|---|
String |
ProviderName
Declaration
public const string ProviderName = "Participants"
Field Value
Type | Description |
---|---|
String |
ResourceEntity
Declaration
public const string ResourceEntity = "resource"
Field Value
Type | Description |
---|---|
String |
ResourceRestrictionId
Declaration
public const string ResourceRestrictionId = "resourceRestrictionId"
Field Value
Type | Description |
---|---|
String |
StartTimeInformation
Declaration
public const string StartTimeInformation = "startTimeInformation"
Field Value
Type | Description |
---|---|
String |
Properties
BaseClassShouldFilterColumns
Declaration
protected override bool BaseClassShouldFilterColumns { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
BaseClassShouldFilterEntities
Declaration
protected override bool BaseClassShouldFilterEntities { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
BaseClassShouldPage
Declaration
protected override bool BaseClassShouldPage { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
BaseClassShouldSort
Declaration
protected override bool BaseClassShouldSort { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Methods
GetResultData()
Get results for the base class, which will handle paging and other functionality
Declaration
protected override List<ArchiveRow> GetResultData()
Returns
Type | Description |
---|---|
List<ArchiveRow> | List of rows in sorted order |
Overrides
SetRestriction(ArchiveRestrictionInfo[])
Handle restrictions; see class documentation for details. Basic consistency checks are made here, and we also determine whether we'll need booking-based data, explicit-based, or both.
Declaration
public override bool SetRestriction(params ArchiveRestrictionInfo[] rawRestrictions)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRestrictionInfo[] | rawRestrictions | Restrictions, used by the caller to dictate behaviour |
Returns
Type | Description |
---|---|
Boolean | true if at least one valid restriction was found |