public interface OptOutService
The @{code OptOutService} provides the names of cookies/headers that represent the user's choice of "opting out", i.e. not wanting to be tracked by means of cookies. The service also provides the names of white-listed cookies and a convenience method to determine whether a given request is opted out.
This service is intended to be used by applications for the purpose of identifying opted-out requests and change behavior regarding the setting of cookies according to the opt-out status and / or white-list.
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.String> |
getCookieNames()
A configured collection of names of cookies that a client can set to opt-out of tracking.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
A map of name/value pairs of HTTP headers that a client can set to opt-out of tracking.
|
java.util.Collection<java.lang.String> |
getWhitelistCookieNames()
A collection of names of cookies that are still allowed by configuration to be set regardless of the client
opting out.
|
boolean |
isOptedOut(HttpServletRequest request)
Determines whether the request contains any cookies or headers that match any of the configured opt-out cookies
or headers.
|
java.util.Collection<java.lang.String> getCookieNames()
Collection
representing the cookie names.java.util.Map<java.lang.String,java.lang.String> getHeaders()
Map
representing the configured header name/value pairs.java.util.Collection<java.lang.String> getWhitelistCookieNames()
Collection
representing the cookie names.boolean isOptedOut(HttpServletRequest request)
request
- The request to check.true
if the request contains any of the cookies/headers indicated via getCookieNames()
or getHeaders()
.Copyright © 2010 - 2020 Adobe. All Rights Reserved