Package org.emau.icmvc.ganimed.ttp.psn
Interface PSNManagerWithNotification
public interface PSNManagerWithNotification
-
Method Summary
Modifier and TypeMethodDescriptionanonymiseEntries
(String notificationClientID, Set<String> values, String domainName) deletes the assignments value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")void
anonymiseEntry
(String notificationClientID, String value, String domainName) deletes the assignment value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")deleteEntries
(String notificationClientID, Set<String> values, String domainName) deletes the given values and corresponding pseudonyms from the dbvoid
deleteEntry
(String notificationClientID, String value, String domainName) deletes the given value and corresponding pseudonym from the dbgetOrCreatePseudonymFor
(String notificationClientID, String value, String domainName) returns a pseudonym for the given valuegetOrCreatePseudonymForList
(String notificationClientID, Set<String> values, String domainName) list version ofgetOrCreatePseudonymFor(String, String, String)
returns a map<value, psn> for all valuesvoid
insertValuePseudonymPair
(String notificationClientID, String value, String pseudonym, String domainName) insert a value - pseudonym pair
value is expected to be a valid pseudonyminsert value - pseudonym pairs
values within the map are expected to be valid pseudonyms
-
Method Details
-
getOrCreatePseudonymFor
String getOrCreatePseudonymFor(String notificationClientID, String value, String domainName) throws DBException, DomainIsFullException, InvalidParameterException, UnknownDomainException returns a pseudonym for the given value- Parameters:
value
- string for which the pseudonym should be retrieved / generateddomainName
- for / in which domain should the pair value-pseudonym be retrieved / stored- Returns:
- a map with pairs original value -> pseudonym
- Throws:
DBException
- if an error occurred while persisting a new entryDomainIsFullException
- if a pseudonym for the given value couldn't be found, has therefor to be created but no more pseudonyms could be created for the given domainInvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
getOrCreatePseudonymForList
Map<String,String> getOrCreatePseudonymForList(String notificationClientID, Set<String> values, String domainName) throws DBException, DomainIsFullException, InvalidParameterException, UnknownDomainException list version ofgetOrCreatePseudonymFor(String, String, String)
returns a map<value, psn> for all values- Parameters:
values
- list of strings for which pseudonyms should be retrieved / generateddomainName
- for / in which domain should the pair value-pseudonym be retrieved / stored- Returns:
- a map with pairs original value -> pseudonym
- Throws:
DBException
- if an error occurred while persisting a new entryDomainIsFullException
- if a pseudonym for the given value couldn't be found, has therefor to be created but no more pseudonyms could be created for the given domainInvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
anonymiseEntry
void anonymiseEntry(String notificationClientID, String value, String domainName) throws DBException, InvalidParameterException, UnknownDomainException, UnknownValueException, ValueIsAnonymisedException deletes the assignment value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")- Parameters:
value
- the value which should be anonymiseddomainName
- for which domain should the given value be anonymised- Throws:
DBException
- if an error occurred while anonymising the entryInvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not foundUnknownValueException
- if the value is not found within the given domainValueIsAnonymisedException
- if the value is already anonymised
-
anonymiseEntries
Map<String,AnonymisationResult> anonymiseEntries(String notificationClientID, Set<String> values, String domainName) throws DBException, InvalidParameterException, UnknownDomainException deletes the assignments value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")- Parameters:
values
- the values which should be anonymiseddomainName
- for which domain should the given value be anonymised- Returns:
- the success status
- Throws:
DBException
- if an error occurred while anonymising the entryInvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
deleteEntry
void deleteEntry(String notificationClientID, String value, String domainName) throws DeletionForbiddenException, InvalidParameterException, UnknownDomainException, UnknownValueException deletes the given value and corresponding pseudonym from the db- Parameters:
value
- the value which should be deletedomainName
- within which domain should the assignment be deleted- Throws:
DeletionForbiddenException
- when it's not allowed to delete value-pseudonym-assignments within a domain
seeDomainProperties.PSNS_DELETABLE
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not foundUnknownValueException
- if the given value is not found within the db for that domain
-
deleteEntries
Map<String,DeletionResult> deleteEntries(String notificationClientID, Set<String> values, String domainName) throws DeletionForbiddenException, InvalidParameterException, UnknownDomainException deletes the given values and corresponding pseudonyms from the db- Parameters:
values
- the values which should be deletedomainName
- within which domain should the assignments be deleted- Returns:
- a map with all values and the corresponding success status
- Throws:
DeletionForbiddenException
- when it's not allowed to delete value-pseudonym-assignments within a domain
seeDomainProperties.PSNS_DELETABLE
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
insertValuePseudonymPair
void insertValuePseudonymPair(String notificationClientID, String value, String pseudonym, String domainName) throws InsertPairException, InvalidParameterException, UnknownDomainException insert a value - pseudonym pair
value is expected to be a valid pseudonym- Parameters:
value
- the value for which the pseudonym should be insertedpseudonym
- the pseudonym which should be inserted for the given valuedomainName
- for which domain should the given pairs be stored- Throws:
InsertPairException
- if an error occurred while persisting the given pair (seeInsertPairError
)InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
insertValuePseudonymPairs
List<InsertPairExceptionDTO> insertValuePseudonymPairs(String notificationClientID, Map<String, String> pairs, String domainName) throws InvalidParameterException, UnknownDomainExceptioninsert value - pseudonym pairs
values within the map are expected to be valid pseudonyms- Parameters:
pairs
- map of pairs which should be storeddomainName
- for which domain should the given pairs be stored- Returns:
- a list with all occurred exceptions, see
InsertPairExceptionDTO
- Throws:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-