Table of Contents

Class ContactInfoProvider

Namespace
CMS.ContactManagement
Assembly
CMS.ContactManagement.dll

Class providing ContactInfo management.

[ProviderInterface(typeof(IContactInfoProvider))]
[Obsolete("Use CMS.DataEngine.IInfoProvider<ContactInfo> instead. Use CMS.DataEngine.InfoProviderExtensions for additional methods for individual objects retrieval. To get an instance of the interface's implementation use dependency injection or access the instance directly via the CMS.DataEngine.Provider<ContactInfo>.Instance property. When faking metadata in CMS.Tests.UnitTests using Fake() use the obsolete provider class until fully removed.")]
[ObsoleteSince(30, 0)]
public class ContactInfoProvider : AbstractInfoProvider<ContactInfo, ContactInfoProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<ContactInfo>, IInfoByNameProvider<ContactInfo>, IBulkInfoProvider<ContactInfo>, IContactInfoProvider, IInfoProvider<ContactInfo>, IInfoByIdProvider<ContactInfo>, IInfoByGuidProvider<ContactInfo>
Inheritance
object
ContactInfoProvider
Implements
Inherited Members
Extension Methods

Constructors

ContactInfoProvider()

Constructor which enables weak reference caching by ID and GUID.

public ContactInfoProvider()

Methods

DeleteContactInfos(string, int)

Deletes all infos by stored procedure.

[Obsolete("Use CMS.ContactManagement.IContactsDeleteService.BulkDelete(string, int) instead.")]
[ObsoleteSince(30, 0)]
public static void DeleteContactInfos(string whereCondition, int batchLimit)

Parameters

whereCondition string

Where condition

batchLimit int

Batch limit.

DeleteContactInfosInternal(string, int)

Deletes all contacts by specified ID.

[Obsolete("Use CMS.ContactManagement.IContactsDeleteService.BulkDelete(string, int) instead.")]
[ObsoleteSince(30, 0)]
protected virtual void DeleteContactInfosInternal(string where, int batchLimit)

Parameters

where string

Where condition

batchLimit int

Batch limit

GetContactFullName(ContactInfo)

Returns full contact name consisting of first, middle and last name.

[Obsolete("Use ContactInfo.ContactDescriptiveName instead.")]
[ObsoleteSince(30, 0)]
public static string GetContactFullName(ContactInfo ci)

Parameters

ci ContactInfo

Contact info object

Returns

string

GetContactFullName(int)

Returns full contact name consisting of first, middle and last name.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
public static string GetContactFullName(int id)

Parameters

id int

Contact info ID

Returns

string

GetContactIDByEmail(string)

Finds contact for given email address.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
public static int GetContactIDByEmail(string email)

Parameters

email string

Returns

int

Returns contact id for given email address, returns 0 if contact is not found.

GetContactInfo(string)

Returns contact with specified email.

[Obsolete("Use CMS.ContactManagement.IContactExternalDataUpdateService.GetByEmail(string) instead.")]
[ObsoleteSince(30, 0)]
public static ContactInfo GetContactInfo(string email)

Parameters

email string

Email to be searched for.

Returns

ContactInfo

ContactInfo with provided email or null if no contact with given email found. If more contacts with such email exists most recent one is returned.

GetContactInfoInternal(string)

Returns contact with specified email.

[Obsolete("Use CMS.ContactManagement.IContactExternalDataUpdateService.GetByEmail(string) instead.")]
[ObsoleteSince(30, 0)]
protected virtual ContactInfo GetContactInfoInternal(string email)

Parameters

email string

Contact email or null if no contact with given email found.

Returns

ContactInfo

UpdateContactFromExternalData(BaseInfo, bool, ContactInfo)

Updates contact information from record submitted through BizForm module - this requires form fields to be mapped to contact.

[Obsolete("Use CMS.ContactManagement.IContactExternalDataUpdateService.Update(BaseInfo, bool, ContactInfo) instead.")]
[ObsoleteSince(30, 0)]
public static void UpdateContactFromExternalData(BaseInfo source, bool allowOverwrite, ContactInfo contact)

Parameters

source BaseInfo

Data class object with source data and mapping definition

allowOverwrite bool

If TRUE existing contact data can be overwritten otherwise only empty properties can be filled

contact ContactInfo

Optional. If null then current contact will be updated.

UpdateContactFromExternalData(BaseInfo, bool, int)

Updates contact information from record submitted through BizForm module - this requires form fields to be mapped to contact.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
public static void UpdateContactFromExternalData(BaseInfo source, bool allowOverwrite, int contactID)

Parameters

source BaseInfo

Data class object with source data and mapping definition

allowOverwrite bool

If TRUE existing contact data can be overwritten otherwise only empty properties can be filled

contactID int

Contact ID

UpdateContactStatus(int, string)

Updates contact status ID of specified contacts.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
public static void UpdateContactStatus(int statusId, string where)

Parameters

statusId int

Contact status ID

where string

Where condition

UpdateContactStatusInternal(int, string)

Updates contact status ID of specified contacts.

[Obsolete("Method is no longer used by the system and will be removed.")]
[ObsoleteSince(29, 7)]
protected virtual void UpdateContactStatusInternal(int statusId, string where)

Parameters

statusId int

Contact status ID

where string

Where condition