Class ConsentService
- Namespace
- Dynamicweb.Data
Processing
- Assembly
- Dynamicweb.Core.dll
Service for handling consents.
- Inheritance
-
Consent
Service
- Inherited Members
Constructors
ConsentService()
Initializes a new instance of the Consent
Methods
DeleteConsent(string, string, string)
Deletes the consent.
Parameters
activityId
stringThe activity identifier.
subjectId
stringThe subject identifier.
subjectType
stringType of the subject.
GetConsentById(string, string, string)
Gets a consent by identifier.
Parameters
activityId
stringThe activity identifier.
subjectId
stringThe subject identifier.
subjectType
stringType of the subject.
Returns
GetConsents()
Gets all consents.
Returns
- IEnumerable<Consent>
A collection of consents.
GetConsentsByActivity(string)
Gets all consents to a given activity.
Parameters
activityId
stringThe activity identifier.
Returns
- IEnumerable<Consent>
A collection of consents.
GetConsentsByPage(string, int, int, string)
Gets consents by search.
public IEnumerable<Consent> GetConsentsByPage(string searchText, int pageNumber, int pageSize, string orderBy)
Parameters
searchText
stringThe search text.
pageNumber
intThe page number.
pageSize
intSize of the page.
orderBy
stringThe order by.
Returns
- IEnumerable<Consent>
A collection of consents matching the search text.
GetConsentsBySubject(string, string)
Gets all consents by a given subject.
Parameters
Returns
- IEnumerable<Consent>
A collection of consents.
GetFoundConsentsCount(string)
Gets the number of consents matching a given search text.
Parameters
searchText
stringThe 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 Consent GiveConsent(string activityId, string subjectId, string subjectType, ConsentRequestInfo requestInfo)
Parameters
activityId
stringThe activity identifier.
subjectId
stringThe subject identifier.
subjectType
stringType of the subject.
requestInfo
ConsentRequest Info The request information.
Returns
WithdrawConsent(string, string, string, ConsentRequestInfo)
Withdraws a consent to an activity by a subject.
public Consent WithdrawConsent(string activityId, string subjectId, string subjectType, ConsentRequestInfo requestInfo)
Parameters
activityId
stringThe activity identifier.
subjectId
stringThe subject identifier.
subjectType
stringType of the subject.
requestInfo
ConsentRequest Info The request information.