Package lumis.service.privacyterm.api
Class PrivacyTermManager
- java.lang.Object
-
- lumis.service.privacyterm.api.PrivacyTermManager
-
- All Implemented Interfaces:
IPrivacyTermManager
,IPrivacyTermManagerSPI
public class PrivacyTermManager extends java.lang.Object implements IPrivacyTermManagerSPI
Privacy term manager implementation- Since:
- 12.3.0
- Version:
- $Revision: 24702 $ $Date: 2021-09-07 00:31:20 -0300 (Tue, 07 Sep 2021) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PRIVACY_TERM_SERVICE_ID
The privacy term service identifier, as register in the servicedefinition.-
Fields inherited from interface lumis.portal.privacyterm.IPrivacyTermManagerSPI
DEPENDENCY_TYPE_PRIVACYTERM_REPOSITORY
-
-
Constructor Summary
Constructors Constructor Description PrivacyTermManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptAllPurposesOfPrivacyTerm(java.lang.String serviceInstanceId, java.lang.String sourceIp)
This method is used to make the current monitored user to accept all purposes of the privacy term with the given service instance.void
changeProcessPurpose(java.lang.String serviceInstanceId)
Changes the term process purpose to a new one.static void
clearUserConsentCache(java.lang.String groupId, ITransaction transaction)
Clear the user consent cache of the given group identifier in the given transaction after commit.java.util.List<java.lang.String>
getPrivacyProcessPurposes(ServiceInstanceConfig analyticsServiceInstance)
Returns all privacy term process purposes identifier of analytics service instance.boolean
hasUserConsentedForDependentServiceInstance(java.lang.String dependentServiceInstanceId, java.lang.String monitorUserId)
Check if monitor user accepted a privacy term the given dependent service instance of privacy term service instances.boolean
isAllPurposesOfPrivacyTermAccepted(java.lang.String serviceInstanceId)
Returns whether current monitor user has accepted all processing purposes of the privacy term with the given service instance with the given identifier.void
revokeConsentOfAllPurposesOfPrivacyTerm(java.lang.String serviceInstanceId)
Revokes the consent of the current monitored user on all purposes of the privacy term of the given service instance.
-
-
-
Field Detail
-
PRIVACY_TERM_SERVICE_ID
public static final java.lang.String PRIVACY_TERM_SERVICE_ID
The privacy term service identifier, as register in the servicedefinition.- Since:
- 12.3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAllPurposesOfPrivacyTermAccepted
public boolean isAllPurposesOfPrivacyTermAccepted(java.lang.String serviceInstanceId) throws PortalException
Description copied from interface:IPrivacyTermManager
Returns whether current monitor user has accepted all processing purposes of the privacy term with the given service instance with the given identifier.- Specified by:
isAllPurposesOfPrivacyTermAccepted
in interfaceIPrivacyTermManager
- Parameters:
serviceInstanceId
- the service instance identifier.- Returns:
- whether current monitor user has accepted the privacy term.
- Throws:
PortalObjectNotFoundException
- if there is no service instance with the given identifier.PortalException
- if another error occur.
-
hasUserConsentedForDependentServiceInstance
public boolean hasUserConsentedForDependentServiceInstance(java.lang.String dependentServiceInstanceId, java.lang.String monitorUserId) throws PortalException
Description copied from interface:IPrivacyTermManagerSPI
Check if monitor user accepted a privacy term the given dependent service instance of privacy term service instances.- Specified by:
hasUserConsentedForDependentServiceInstance
in interfaceIPrivacyTermManagerSPI
- Parameters:
dependentServiceInstanceId
- the service instance that is dependent of privacy term service instances.monitorUserId
- the monitor user identifier.- Returns:
- true if monitor user accepted a privacy term of service instance.
- Throws:
PortalException
-
acceptAllPurposesOfPrivacyTerm
public void acceptAllPurposesOfPrivacyTerm(java.lang.String serviceInstanceId, java.lang.String sourceIp) throws PortalException
Description copied from interface:IPrivacyTermManager
This method is used to make the current monitored user to accept all purposes of the privacy term with the given service instance. If the user has provided the consent, nothing is performed.- Specified by:
acceptAllPurposesOfPrivacyTerm
in interfaceIPrivacyTermManager
- Parameters:
serviceInstanceId
- the service instance identifier.sourceIp
- the source IP from where the accept request was performed.- Throws:
PortalObjectNotFoundException
- if there is no service instance with the given identifier.PortalException
- if another error occur.
-
revokeConsentOfAllPurposesOfPrivacyTerm
public void revokeConsentOfAllPurposesOfPrivacyTerm(java.lang.String serviceInstanceId) throws PortalException
Description copied from interface:IPrivacyTermManager
Revokes the consent of the current monitored user on all purposes of the privacy term of the given service instance. If the user did not provided the consent, nothing is performed.- Specified by:
revokeConsentOfAllPurposesOfPrivacyTerm
in interfaceIPrivacyTermManager
- Parameters:
serviceInstanceId
- the service instance identifier.- Throws:
PortalObjectNotFoundException
- if there is no service instance with the given identifier.PortalException
- if another error occur.
-
changeProcessPurpose
public void changeProcessPurpose(java.lang.String serviceInstanceId) throws PortalException
Description copied from interface:IPrivacyTermManagerSPI
Changes the term process purpose to a new one.- Specified by:
changeProcessPurpose
in interfaceIPrivacyTermManagerSPI
- Parameters:
serviceInstanceId
- the service instance id.- Throws:
PortalException
-
clearUserConsentCache
public static void clearUserConsentCache(java.lang.String groupId, ITransaction transaction) throws TransactionRequiredException, PortalException
Clear the user consent cache of the given group identifier in the given transaction after commit.- Parameters:
groupId
- the service instance identifier of the PrivacyTerm or the monitor user id.transaction
- the transaction to add the after commit.- Throws:
TransactionRequiredException
- if there is no transaction associated with the current thread.PortalException
- whenever an error occur.- Since:
- 12.3.0
-
getPrivacyProcessPurposes
public java.util.List<java.lang.String> getPrivacyProcessPurposes(ServiceInstanceConfig analyticsServiceInstance) throws PortalException
Description copied from interface:IPrivacyTermManagerSPI
Returns all privacy term process purposes identifier of analytics service instance.- Specified by:
getPrivacyProcessPurposes
in interfaceIPrivacyTermManagerSPI
- Parameters:
analyticsServiceInstance
- the analytics service instance- Returns:
- all privacy term process purposes identifier of analytics service instance.
- Throws:
PortalException
-
-