Package org.emau.icmvc.ganimed.ttp.psn
Schnittstelle PSNManager
public interface PSNManager
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunganonymiseEntries
(Set<String> values, String domainName) deletes the assignments value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")void
anonymiseEntry
(String value, String domainName) deletes the assignment value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")deleteEntries
(Set<String> values, String domainName) deletes the given values and corresponding pseudonyms from the dbvoid
deleteEntry
(String value, String domainName) deletes the given value and corresponding pseudonym from the dbgetOrCreatePseudonymFor
(String value, String domainName) returns a pseudonym for the given valuegetOrCreatePseudonymForList
(Set<String> values, String domainName) list version ofgetOrCreatePseudonymFor(String, String)
returns a map<value, psn> for all valuesgetPseudonymFor
(String value, String domainName) returns the pseudonym to the given valuegetPseudonymForList
(Set<String> values, String domainName) list version ofgetPseudonymFor(String, String)
returns a map<value, psn> (with psn="*** VALUE NOT FOUND ***" for each given value which is unknown for the given domain)getPseudonymForValuePrefix
(String valuePrefix, String domainName) list version ofgetPseudonymFor(String, String)
returns a map<value, psn> for all values which starts with the given stringgetPSNNetFor
(String valueOrPSN) create psn net
with all values that are somehow linked to the given psngetPSNTreeForPSN
(String psn, String domainName) create psn tree
with all values that are somehow linked to the given psngetValueFor
(String psn, String domainName) searches the value for the given psn and domain; calls checkPSN(psn, domainName) before searching the valuegetValueForList
(Set<String> psnList, String domainName) list version ofgetValueFor(String, String)
returns a map<psn, value> (with value="*** PSN NOT FOUND ***" for each given psn which is unknown for the given domain)void
insertValuePseudonymPair
(String value, String pseudonym, String domainName) insert a value - pseudonym pair
value is expected to be a valid pseudonyminsertValuePseudonymPairs
(Map<String, String> pairs, String domainName) insert value - pseudonym pairs
values within the map are expected to be valid pseudonymsboolean
is the given value an anonym?boolean
isAnonymised
(String psn, String domainName) is the given psn anonymised?void
validatePSN
(String psn, String domainName) checks if the given string is a valid pseudonym
-
Methodendetails
-
getOrCreatePseudonymFor
String getOrCreatePseudonymFor(String value, String domainName) throws DBException, DomainIsFullException, InvalidParameterException, UnknownDomainException returns a pseudonym for the given value- Parameter:
value
- string for which the pseudonym should be retrieved / generateddomainName
- for / in which domain should the pair value-pseudonym be retrieved / stored- Gibt zurück:
- a map with pairs original value -> pseudonym
- Löst aus:
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(Set<String> values, String domainName) throws DBException, DomainIsFullException, InvalidParameterException, UnknownDomainException list version ofgetOrCreatePseudonymFor(String, String)
returns a map<value, psn> for all values- Parameter:
values
- list of strings for which pseudonyms should be retrieved / generateddomainName
- for / in which domain should the pair value-pseudonym be retrieved / stored- Gibt zurück:
- a map with pairs original value -> pseudonym
- Löst aus:
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
-
getPseudonymFor
String getPseudonymFor(String value, String domainName) throws InvalidParameterException, UnknownDomainException, UnknownValueException returns the pseudonym to the given value- Parameter:
value
- the string for which a pseudonym should be retrieveddomainName
- for which domain should the pseudonym be retrieved- Gibt zurück:
- the pseudonym
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not foundUnknownValueException
- if the given value is not found for the given domain
-
getPseudonymForList
Map<String,String> getPseudonymForList(Set<String> values, String domainName) throws InvalidParameterException, UnknownDomainException list version ofgetPseudonymFor(String, String)
returns a map<value, psn> (with psn="*** VALUE NOT FOUND ***" for each given value which is unknown for the given domain)- Parameter:
values
- a list of values for which the pseudonyms should be retrieveddomainName
- for which domain should the pseudonyms be retrieved- Gibt zurück:
- map of value-pseudonym pairs
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
getPseudonymForValuePrefix
Map<String,String> getPseudonymForValuePrefix(String valuePrefix, String domainName) throws InvalidParameterException, UnknownDomainException list version ofgetPseudonymFor(String, String)
returns a map<value, psn> for all values which starts with the given string- Parameter:
valuePrefix
- the prefix of all values for which the pseudonyms should be retrieveddomainName
- for which domain should the pseudonyms be retrieved- Gibt zurück:
- map of value-pseudonym pairs
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
anonymiseEntry
void anonymiseEntry(String value, String domainName) throws DBException, InvalidParameterException, UnknownDomainException, UnknownValueException, ValueIsAnonymisedException deletes the assignment value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")- Parameter:
value
- the value which should be anonymiseddomainName
- for which domain should the given value be anonymised- Löst aus:
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(Set<String> values, String domainName) throws DBException, InvalidParameterException, UnknownDomainException deletes the assignments value - pseudonym from the db (replaces "value" with "###_anonym_###_randString_###_anonym_###")- Parameter:
values
- the values which should be anonymiseddomainName
- for which domain should the given value be anonymised- Gibt zurück:
- the success status
- Löst aus:
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
-
isAnonym
is the given value an anonym?- Parameter:
value
- the value which should be tested- Gibt zurück:
- true if the given value is an anonym, false else
- Löst aus:
InvalidParameterException
- if one of the required parameters is not set
-
isAnonymised
boolean isAnonymised(String psn, String domainName) throws InvalidParameterException, InvalidPSNException, UnknownDomainException, PSNNotFoundException is the given psn anonymised?- Parameter:
psn
- the psn which should be testeddomainName
- for which domain the given psn should be tested- Gibt zurück:
- true if the given psn is anonymised, false else
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setInvalidPSNException
- if the given PSN is not validUnknownDomainException
- if the given domain is not foundPSNNotFoundException
- if the psn is not found within the given domain
-
deleteEntry
void deleteEntry(String value, String domainName) throws DeletionForbiddenException, InvalidParameterException, UnknownDomainException, UnknownValueException deletes the given value and corresponding pseudonym from the db- Parameter:
value
- the value which should be deletedomainName
- within which domain should the assignment be deleted- Löst aus:
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(Set<String> values, String domainName) throws DeletionForbiddenException, InvalidParameterException, UnknownDomainException deletes the given values and corresponding pseudonyms from the db- Parameter:
values
- the values which should be deletedomainName
- within which domain should the assignments be deleted- Gibt zurück:
- a map with all values and the corresponding success status
- Löst aus:
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
-
validatePSN
void validatePSN(String psn, String domainName) throws InvalidParameterException, InvalidPSNException, UnknownDomainException checks if the given string is a valid pseudonym- Parameter:
psn
- the pseudonym which should be checkeddomainName
- for which domain should the given pseudonym be checked- Löst aus:
InvalidParameterException
- if one of the required parameters is not setInvalidPSNException
- if the given PSN is not validUnknownDomainException
- if the given domain is not found
-
getValueFor
String getValueFor(String psn, String domainName) throws InvalidParameterException, InvalidPSNException, PSNNotFoundException, UnknownDomainException, ValueIsAnonymisedException searches the value for the given psn and domain; calls checkPSN(psn, domainName) before searching the value- Parameter:
psn
- for which pseudonym should the original value be retrieveddomainName
- for which domain should the original value to the given pseudonym be retrieved- Gibt zurück:
- the original value
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setInvalidPSNException
- if the given PSN is not validPSNNotFoundException
- if the given PSN is not found within the db for that domainUnknownDomainException
- if the given domain is not foundValueIsAnonymisedException
- if pseudonym is anonymised
-
getValueForList
Map<String,String> getValueForList(Set<String> psnList, String domainName) throws InvalidParameterException, UnknownDomainException list version ofgetValueFor(String, String)
returns a map<psn, value> (with value="*** PSN NOT FOUND ***" for each given psn which is unknown for the given domain)- Parameter:
psnList
- list of pseudonyms for which the original values should be retrieveddomainName
- for which domain should the original value to the given pseudonym be retrieved- Gibt zurück:
- a map with pairs pseudonym -> original value
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
insertValuePseudonymPair
void insertValuePseudonymPair(String value, String pseudonym, String domainName) throws InsertPairException, InvalidParameterException, UnknownDomainException insert a value - pseudonym pair
value is expected to be a valid pseudonym- Parameter:
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- Löst aus:
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(Map<String, String> pairs, String domainName) throws InvalidParameterException, UnknownDomainExceptioninsert value - pseudonym pairs
values within the map are expected to be valid pseudonyms- Parameter:
pairs
- map of pairs which should be storeddomainName
- for which domain should the given pairs be stored- Gibt zurück:
- a list with all occurred exceptions, see
InsertPairExceptionDTO
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setUnknownDomainException
- if the given domain is not found
-
getPSNTreeForPSN
PSNTreeDTO getPSNTreeForPSN(String psn, String domainName) throws InvalidParameterException, InvalidPSNException, PSNNotFoundException, UnknownDomainException, ValueIsAnonymisedException create psn tree
with all values that are somehow linked to the given psn- Parameter:
psn
- pseudonym that should be used to create the psn treedomainName
- name of the domain for the given pseudonym- Gibt zurück:
- a psn tree object with all psn connected to the given psn
- Löst aus:
InvalidParameterException
- if one of the required parameters is not setInvalidPSNException
- if the given PSN is not validPSNNotFoundException
- if the given PSN is not found within the db for that domainUnknownDomainException
- if the given domain is not foundValueIsAnonymisedException
- if the value is already anonymised
-
getPSNNetFor
create psn net
with all values that are somehow linked to the given psn- Parameter:
valueOrPSN
- value or pseudonym that should be used to create the psn net- Gibt zurück:
- a psn net object with all psn connected to the given psn / value
- Löst aus:
InvalidParameterException
- if one of the required parameters is not set
-