public interface ConsentService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANONYMOUS_CONSENTS
Cookie for anonymous user
|
static java.lang.String |
CONSENT_GIVEN
Expected consent value
|
static java.lang.String |
CONSENT_WITHDRAWN
Expected consent value
|
static java.lang.String |
PROFILE_CONSENT
Consent code for Profile
|
static java.lang.String |
PROFILE_CONSENT_GIVEN
Cookie and Session attribute key
|
static java.lang.String |
USER_CONSENTS
Session attribute for logged in users
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteConsentReferenceInConsentServiceAndInUserModel(UserModel userModel,
java.lang.String baseSiteId)
Deletes the consent reference when the user revokes the consent for profile or user closes the account
|
java.lang.String |
getConsentReferenceFromCookie(java.lang.String siteId,
HttpServletRequest request)
Fetches the consent reference from cookie
|
java.lang.String |
getConsentReferenceFromSession()
Fetches the consent reference from session
|
boolean |
isProfileTrackingConsentGiven(HttpServletRequest request)
Checks if the user (logged In or Anonymous) has granted the consent to allow profile tracking
|
void |
removeConsentReferenceCookieAndSession(HttpServletResponse response)
removes the consent reference cookie
|
void |
saveConsentReferenceInSessionAndCurrentUserModel(HttpServletRequest request)
It gets the consent reference stored in a cookie (generated by ProfileTag)
and saves it in the session and in the user model (for logged In users) for further events
|
void |
setProfileConsentCookieAndSession(HttpServletRequest request,
HttpServletResponse response,
boolean consent)
Saves the profile consent separately in a cookie and session attribute
|
static final java.lang.String USER_CONSENTS
static final java.lang.String ANONYMOUS_CONSENTS
static final java.lang.String PROFILE_CONSENT
static final java.lang.String CONSENT_GIVEN
static final java.lang.String CONSENT_WITHDRAWN
static final java.lang.String PROFILE_CONSENT_GIVEN
boolean isProfileTrackingConsentGiven(HttpServletRequest request)
request - the http requestvoid setProfileConsentCookieAndSession(HttpServletRequest request,
HttpServletResponse response,
boolean consent)
request - http requestresponse - http reponseconsent - true or falsevoid saveConsentReferenceInSessionAndCurrentUserModel(HttpServletRequest request)
request - Http requestjava.lang.String getConsentReferenceFromCookie(java.lang.String siteId,
HttpServletRequest request)
siteId - base site identifierrequest - http requestjava.lang.String getConsentReferenceFromSession()
void deleteConsentReferenceInConsentServiceAndInUserModel(UserModel userModel, java.lang.String baseSiteId)
userModel - the userbaseSiteId - the base site idvoid removeConsentReferenceCookieAndSession(HttpServletResponse response)
response - http responseCopyright © 2018 SAP SE. All Rights Reserved.