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.")]
public class ContactInfoProvider : AbstractInfoProvider<ContactInfo, ContactInfoProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<ContactInfo>, IInfoByNameProvider<ContactInfo>, IBulkInfoProvider<ContactInfo>, IContactInfoProvider, IInfoProvider<ContactInfo>, IInfoByIdProvider<ContactInfo>, IInfoByGuidProvider<ContactInfo>
- Inheritance
-
objectContactInfoProvider
- 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.")]
public static void DeleteContactInfos(string whereCondition, int batchLimit)
Parameters
whereConditionstringWhere condition
batchLimitintBatch limit.
DeleteContactInfosInternal(string, int)
Deletes all contacts by specified ID.
[Obsolete("Use CMS.ContactManagement.IContactsDeleteService.BulkDelete(string, int) instead.")]
protected virtual void DeleteContactInfosInternal(string where, int batchLimit)
Parameters
wherestringWhere condition
batchLimitintBatch limit
GetContactFullName(ContactInfo)
Returns full contact name consisting of first, middle and last name.
[Obsolete("Use ContactInfo.ContactDescriptiveName instead.")]
public static string GetContactFullName(ContactInfo ci)
Parameters
ciContactInfoContact 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.")]
public static string GetContactFullName(int id)
Parameters
idintContact 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.")]
public static int GetContactIDByEmail(string email)
Parameters
emailstring
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.")]
public static ContactInfo GetContactInfo(string email)
Parameters
emailstringEmail to be searched for.
Returns
- ContactInfo
ContactInfo with provided email or
nullif 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.")]
protected virtual ContactInfo GetContactInfoInternal(string email)
Parameters
emailstringContact email or
nullif no contact with given email found.
Returns
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.")]
public static void UpdateContactFromExternalData(BaseInfo source, bool allowOverwrite, ContactInfo contact)
Parameters
sourceBaseInfoData class object with source data and mapping definition
allowOverwriteboolIf TRUE existing contact data can be overwritten otherwise only empty properties can be filled
contactContactInfoOptional. 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.")]
public static void UpdateContactFromExternalData(BaseInfo source, bool allowOverwrite, int contactID)
Parameters
sourceBaseInfoData class object with source data and mapping definition
allowOverwriteboolIf TRUE existing contact data can be overwritten otherwise only empty properties can be filled
contactIDintContact ID
UpdateContactStatus(int, string)
Updates contact status ID of specified contacts.
[Obsolete("Method is no longer used by the system and will be removed.")]
public static void UpdateContactStatus(int statusId, string where)
Parameters
statusIdintContact status ID
wherestringWhere condition
UpdateContactStatusInternal(int, string)
Updates contact status ID of specified contacts.
[Obsolete("Method is no longer used by the system and will be removed.")]
protected virtual void UpdateContactStatusInternal(int statusId, string where)
Parameters
statusIdintContact status ID
wherestringWhere condition