Class ConsentService
- Namespace
- Dynamicweb.DataProcessing
- Assembly
- Dynamicweb.Core.dll
Service for handling Consents.
public class ConsentService
- Inheritance
-
ConsentService
- Inherited Members
Methods
DeleteConsent(string, string, string)
Deletes the consent.
public virtual void DeleteConsent(string activityId, string subjectId, string subjectType)
Parameters
activityIdstringThe activity identifier.
subjectIdstringThe subject identifier.
subjectTypestringType of the subject.
GetConsentById(string, string, string)
Gets a consent by identifier.
public virtual Consent GetConsentById(string activityId, string subjectId, string subjectType)
Parameters
activityIdstringThe activity identifier.
subjectIdstringThe subject identifier.
subjectTypestringType of the subject.
Returns
GetConsents()
Gets all consents.
public virtual IEnumerable<Consent> GetConsents()
Returns
- IEnumerable<Consent>
A collection of consents.
GetConsentsByActivity(string)
Gets all consents to a given activity.
public virtual IEnumerable<Consent> GetConsentsByActivity(string activityId)
Parameters
activityIdstringThe activity identifier.
Returns
- IEnumerable<Consent>
A collection of consents.
GetConsentsByPage(string, int, int, string)
Gets consents by search.
public virtual IEnumerable<Consent> GetConsentsByPage(string searchText, int pageNumber, int pageSize, string orderBy)
Parameters
searchTextstringThe search text.
pageNumberintThe page number.
pageSizeintSize of the page.
orderBystringThe order by.
Returns
- IEnumerable<Consent>
A collection of consents matching the search text.
GetConsentsBySubject(string, string)
Gets all consents by a given subject.
public virtual IEnumerable<Consent> GetConsentsBySubject(string subjectId, string subjectType)
Parameters
Returns
- IEnumerable<Consent>
A collection of consents.
GetFoundConsentsCount(string)
Gets the number of consents matching a given search text.
public virtual int GetFoundConsentsCount(string searchText)
Parameters
searchTextstringThe search text.
Returns
- int
A number of consents matching the search text.
GiveConsent(string, string, string, ConsentRequestInfo)
Gives consent to an activity by a subject.
public virtual Consent GiveConsent(string activityId, string subjectId, string subjectType, ConsentRequestInfo requestInfo)
Parameters
activityIdstringThe activity identifier.
subjectIdstringThe subject identifier.
subjectTypestringType of the subject.
requestInfoConsentRequestInfoThe request information.
Returns
WithdrawConsent(string, string, string, ConsentRequestInfo)
Withdraws a consent to an activity by a subject.
public virtual Consent WithdrawConsent(string activityId, string subjectId, string subjectType, ConsentRequestInfo requestInfo)
Parameters
activityIdstringThe activity identifier.
subjectIdstringThe subject identifier.
subjectTypestringType of the subject.
requestInfoConsentRequestInfoThe request information.