public class PrivacyServiceImpl extends Object implements PrivacyService
Constructor and Description |
---|
PrivacyServiceImpl() |
Modifier and Type | Method and 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)
This method doesn't do anything anymore please don't use it
|
List<String> |
getFilteredEventTypes(Profile profile)
Retrieve the list of events that the profile has deactivated.
|
List<String> |
getFilteredEventTypes(String profileId)
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(Profile profile)
Tests if the anonymous browsing flag is set of the specified profile.
|
Boolean |
isRequireAnonymousBrowsing(String profileId)
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.
|
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
void |
setBundleWatcher(BundleWatcher bundleWatcher) |
Boolean |
setDeniedProperties(String profileId,
List<String> propertyNames)
Sets the list of denied properties.
|
Boolean |
setDeniedPropertyDistribution(String profileId,
List<String> propertyNames)
This method doesn't do anything anymore please don't use it
|
void |
setEventService(EventService eventService) |
Boolean |
setFilteredEventTypes(String profileId,
List<String> eventTypes)
Set the list of filtered event types for a profile.
|
void |
setPersistenceService(PersistenceService persistenceService) |
void |
setProfileService(ProfileService profileService) |
Boolean |
setRequireAnonymousBrowsing(String profileId,
boolean anonymous,
String scope)
Controls the activation/deactivation of anonymous browsing.
|
public void setPersistenceService(PersistenceService persistenceService)
public void setProfileService(ProfileService profileService)
public void setEventService(EventService eventService)
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
public void setBundleWatcher(BundleWatcher bundleWatcher)
public ServerInfo getServerInfo()
PrivacyService
getServerInfo
in interface PrivacyService
public List<ServerInfo> getServerInfos()
PrivacyService
getServerInfos
in interface PrivacyService
public Boolean deleteProfile(String profileId)
PrivacyService
deleteProfile
in interface PrivacyService
profileId
- the identifier of the profile to delete and replacepublic Boolean anonymizeProfile(String profileId, String scope)
PrivacyService
anonymizeProfile
in interface PrivacyService
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 eventpublic Boolean anonymizeBrowsingData(String profileId)
PrivacyService
anonymizeBrowsingData
in interface PrivacyService
profileId
- the identifier of the profile on which to perform the anonymizations of the browsing
datapublic Boolean deleteProfileData(String profileId, boolean purgeData)
PrivacyService
deleteProfileData
in interface PrivacyService
profileId
- the identifier of the profilepurgeData
- flag that indicates whether to purge the profile's datapublic Boolean setRequireAnonymousBrowsing(String profileId, boolean anonymous, String scope)
PrivacyService
setRequireAnonymousBrowsing
in interface PrivacyService
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 internallypublic Boolean isRequireAnonymousBrowsing(String profileId)
PrivacyService
isRequireAnonymousBrowsing
in interface PrivacyService
profileId
- the identifier of the profile on which we want to retrieve the anonymous browsing flagpublic Boolean isRequireAnonymousBrowsing(Profile profile)
PrivacyService
isRequireAnonymousBrowsing
in interface PrivacyService
profile
- the profile on which we want to retrieve the anonymous browsing flagpublic Profile getAnonymousProfile(Profile profile)
PrivacyService
getAnonymousProfile
in interface PrivacyService
profile
- the profile for which to create the anonymous profilepublic List<String> getFilteredEventTypes(String profileId)
PrivacyService
getFilteredEventTypes
in interface PrivacyService
profileId
- the identifier for the profile for which we want to retrieve the list of forbidden
event typespublic List<String> getFilteredEventTypes(Profile profile)
PrivacyService
getFilteredEventTypes
in interface PrivacyService
profile
- the profile for which we want to retrieve the list of forbidden
event typespublic Boolean setFilteredEventTypes(String profileId, List<String> eventTypes)
PrivacyService
setFilteredEventTypes
in interface PrivacyService
profileId
- the identifier of the profile on which to filter the eventseventTypes
- a list of event types that will be filter for the profilepublic List<String> getDeniedProperties(String profileId)
PrivacyService
getDeniedProperties
in interface PrivacyService
profileId
- the identified of the profilepublic Boolean setDeniedProperties(String profileId, List<String> propertyNames)
PrivacyService
setDeniedProperties
in interface PrivacyService
profileId
- the profile for which to see the denied propertiespropertyNames
- the property names to be deniedpublic List<String> getDeniedPropertyDistribution(String profileId)
PrivacyService
getDeniedPropertyDistribution
in interface PrivacyService
profileId
- the identifier of the profilepublic Boolean setDeniedPropertyDistribution(String profileId, List<String> propertyNames)
PrivacyService
setDeniedPropertyDistribution
in interface PrivacyService
profileId
- the identifier of the profilepropertyNames
- do not usepublic Boolean removeProperty(String profileId, String propertyName)
PrivacyService
removeProperty
in interface PrivacyService
profileId
- the identifier of the profilepropertyName
- the name of the property to removeCopyright © 2014–2022 Apache Software Foundation. All rights reserved.