Package org.apache.unomi.api.services
Interface PrivacyService
-
- All Known Implementing Classes:
PrivacyServiceImpl
public interface PrivacyService
This service regroups all privacy-related operations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Boolean
anonymizeBrowsingData(String profileId)
This method will anonymize browsing data by creating an anonymous profile for the current profile, and then re-associating all the profile's sessions and events with the new anonymous profile todo this method does not anonymize any session or event properties that may contain profile data (such as the login event)Boolean
anonymizeProfile(String profileId, String scope)
This method will "anonymize" a profile by removing from the associated profile all the properties that have been defined as "denied properties".Boolean
deleteProfile(String profileId)
Deletes the current profile (but has no effect on sessions and events).Boolean
deleteProfileData(String profileId, boolean purgeData)
This method will perform two operations, first it will call the anonymizeBrowsingData method on the specified profile, and then it will delete the profile from the persistence service.Profile
getAnonymousProfile(Profile profile)
Build a new anonymous profile (but doesn't persist it in the persistence service).List<String>
getDeniedProperties(String profileId)
Gets the list of denied properties.List<String>
getDeniedPropertyDistribution(String profileId)
Deprecated.As of version 1.3.0-incubating, do not use this methodList<String>
getFilteredEventTypes(String profileId)
Retrieve the list of events that the profile has deactivated.List<String>
getFilteredEventTypes(Profile profile)
Retrieve the list of events that the profile has deactivated.ServerInfo
getServerInfo()
Retrieves the default base Apache Unomi server information, including the name and version of the server, build time information and the event types if recognizes as well as the capabilities supported by the system.List<ServerInfo>
getServerInfos()
Retrieves the list of the server information objects, that include extensions.Boolean
isRequireAnonymousBrowsing(String profileId)
Tests if the anonymous browsing flag is set of the specified profile.Boolean
isRequireAnonymousBrowsing(Profile profile)
Tests if the anonymous browsing flag is set of the specified profile.Boolean
removeProperty(String profileId, String propertyName)
Removes a property from the specified profile.Boolean
setDeniedProperties(String profileId, List<String> propertyNames)
Deprecated.As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which will mark them as denied by the getDeniedProperties methodBoolean
setDeniedPropertyDistribution(String profileId, List<String> propertyNames)
Deprecated.As of version 1.3.0-incubating, do not use this methodBoolean
setFilteredEventTypes(String profileId, List<String> eventTypes)
Set the list of filtered event types for a profile.Boolean
setRequireAnonymousBrowsing(String profileId, boolean anonymous, String scope)
Controls the activation/deactivation of anonymous browsing.
-
-
-
Method Detail
-
getServerInfo
ServerInfo getServerInfo()
Retrieves the default base Apache Unomi server information, including the name and version of the server, build time information and the event types if recognizes as well as the capabilities supported by the system. For more detailed information about the system and extensions use the getServerInfos method.- Returns:
- a ServerInfo object with all the server information
-
getServerInfos
List<ServerInfo> getServerInfos()
Retrieves the list of the server information objects, that include extensions. Each object includes the name and version of the server, build time information and the event types if recognizes as well as the capabilities supported by the system.- Returns:
- a list of ServerInfo objects with all the server information
-
deleteProfile
Boolean deleteProfile(String profileId)
Deletes the current profile (but has no effect on sessions and events). This will delete the persisted profile and replace it with a new empty one with the same profileId.- Parameters:
profileId
- the identifier of the profile to delete and replace- Returns:
- true if the deletion was successful
-
anonymizeProfile
Boolean anonymizeProfile(String profileId, String scope)
This method will "anonymize" a profile by removing from the associated profile all the properties that have been defined as "denied properties".- Parameters:
profileId
- the identifier of the profile that needs to be anonymized.scope
- The scope will be used to send events, once for the anonymizeProfile event, the other for the profileUpdated event- Returns:
- true if the profile had some properties purged, false otherwise
-
anonymizeBrowsingData
Boolean anonymizeBrowsingData(String profileId)
This method will anonymize browsing data by creating an anonymous profile for the current profile, and then re-associating all the profile's sessions and events with the new anonymous profile todo this method does not anonymize any session or event properties that may contain profile data (such as the login event)- Parameters:
profileId
- the identifier of the profile on which to perform the anonymizations of the browsing data- Returns:
- true if the operation was successful, false otherwise
-
deleteProfileData
Boolean deleteProfileData(String profileId, boolean purgeData)
This method will perform two operations, first it will call the anonymizeBrowsingData method on the specified profile, and then it will delete the profile from the persistence service.- Parameters:
profileId
- the identifier of the profilepurgeData
- flag that indicates whether to purge the profile's data- Returns:
- true if the operation was successful, false otherwise
-
setRequireAnonymousBrowsing
Boolean setRequireAnonymousBrowsing(String profileId, boolean anonymous, String scope)
Controls the activation/deactivation of anonymous browsing. This method will simply set a system property called requireAnonymousProfile that will be then use to know if we should associate browsing data with the main profile or the associated anonymous profile. Note that changing this setting will also reset the goals and pastEvents system properties for the profile.- Parameters:
profileId
- the identifier of the profile on which to set the anonymous browsing property flaganonymous
- the value of the anonymous browsing flag.scope
- a scope used to send a profileUpdated event internally- Returns:
- true if successful, false otherwise
-
isRequireAnonymousBrowsing
Boolean isRequireAnonymousBrowsing(String profileId)
Tests if the anonymous browsing flag is set of the specified profile.- Parameters:
profileId
- the identifier of the profile on which we want to retrieve the anonymous browsing flag- Returns:
- true if successful, false otherwise
-
isRequireAnonymousBrowsing
Boolean isRequireAnonymousBrowsing(Profile profile)
Tests if the anonymous browsing flag is set of the specified profile.- Parameters:
profile
- the profile on which we want to retrieve the anonymous browsing flag- Returns:
- true if successful, false otherwise
-
getAnonymousProfile
Profile getAnonymousProfile(Profile profile)
Build a new anonymous profile (but doesn't persist it in the persistence service). This will also copy the profile properties from the passed profile that are not listed as denied properties.- Parameters:
profile
- the profile for which to create the anonymous profile- Returns:
- a newly created (but not persisted) profile for the passed profile.
-
getFilteredEventTypes
List<String> getFilteredEventTypes(String profileId)
Retrieve the list of events that the profile has deactivated. For each profile a visitor may indicate that he doesn't want some events to be collected. This method retrieves this list from the specified profile- Parameters:
profileId
- the identifier for the profile for which we want to retrieve the list of forbidden event types- Returns:
- a list of event types
-
getFilteredEventTypes
List<String> getFilteredEventTypes(Profile profile)
Retrieve the list of events that the profile has deactivated. For each profile a visitor may indicate that he doesn't want some events to be collected. This method retrieves this list from the specified profile- Parameters:
profile
- the profile for which we want to retrieve the list of forbidden event types- Returns:
- a list of event types
-
setFilteredEventTypes
Boolean setFilteredEventTypes(String profileId, List<String> eventTypes)
Set the list of filtered event types for a profile. This is the list of event types that the visitor has specified he does not want the server to collect.- Parameters:
profileId
- the identifier of the profile on which to filter the eventseventTypes
- a list of event types that will be filter for the profile- Returns:
- true if successfull, false otherwise.
-
getDeniedProperties
List<String> getDeniedProperties(String profileId)
Gets the list of denied properties. These are properties marked with a personal identifier tag.- Parameters:
profileId
- the identified of the profile- Returns:
- a list of profile properties identifiers that are marked as personally identifying
-
setDeniedProperties
@Deprecated Boolean setDeniedProperties(String profileId, List<String> propertyNames)
Deprecated.As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which will mark them as denied by the getDeniedProperties methodSets the list of denied properties.- Parameters:
profileId
- the profile for which to see the denied propertiespropertyNames
- the property names to be denied- Returns:
- null all the time, this method is not used and is marked as deprecated
-
getDeniedPropertyDistribution
@Deprecated List<String> getDeniedPropertyDistribution(String profileId)
Deprecated.As of version 1.3.0-incubating, do not use this methodThis method doesn't do anything anymore please don't use it- Parameters:
profileId
- the identifier of the profile- Returns:
- do not use
-
setDeniedPropertyDistribution
@Deprecated Boolean setDeniedPropertyDistribution(String profileId, List<String> propertyNames)
Deprecated.As of version 1.3.0-incubating, do not use this methodThis method doesn't do anything anymore please don't use it- Parameters:
profileId
- the identifier of the profilepropertyNames
- do not use- Returns:
- do not use
-
-