Class DomainConfig
java.lang.Object
org.emau.icmvc.ganimed.ttp.psn.config.DomainConfig
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDomainConfig
(int maxDetectedErrors, int psnLength, String psnPrefix, String psnSuffix, boolean includePrefixInCheckDigitCalculation, boolean includeSuffixInCheckDigitCalculation, int useLastCharAsDelimiterAfterXChars, boolean psnsDeletable, ForceCache forceCache, ValidateViaParents validateValuesViaParents, boolean sendNotificationsWeb) DomainConfig
(String properties) Deprecated.DomainConfig
(DomainConfig config) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Deprecated.int
int
int
hashCode()
boolean
boolean
boolean
boolean
void
setForceCache
(ForceCache forceCache) void
setIncludePrefixInCheckDigitCalculation
(boolean includePrefixInCheckDigitCalculation) void
setIncludeSuffixInCheckDigitCalculation
(boolean includeSuffixInCheckDigitCalculation) void
setMaxDetectedErrors
(int maxDetectedErrors) void
setPsnLength
(int psnLength) void
setPsnPrefix
(String psnPrefix) void
setPsnsDeletable
(boolean psnsDeletable) void
setPsnSuffix
(String psnSuffix) void
setSendNotificationsWeb
(boolean sendNotificationsWeb) void
setUseLastCharAsDelimiterAfterXChars
(int useLastCharAsDelimiterAfterXChars) void
setValidateValuesViaParents
(ValidateViaParents validateValuesViaParents) toString()
-
Field Details
-
MAX_PSEUDONYMS_FOR_DEFAULT_CACHE_ON
public static final long MAX_PSEUDONYMS_FOR_DEFAULT_CACHE_ON- See Also:
-
-
Constructor Details
-
DomainConfig
public DomainConfig() -
DomainConfig
public DomainConfig(int maxDetectedErrors, int psnLength, String psnPrefix, String psnSuffix, boolean includePrefixInCheckDigitCalculation, boolean includeSuffixInCheckDigitCalculation, int useLastCharAsDelimiterAfterXChars, boolean psnsDeletable, ForceCache forceCache, ValidateViaParents validateValuesViaParents, boolean sendNotificationsWeb) throws InvalidParameterException - Throws:
InvalidParameterException
-
DomainConfig
- Throws:
InvalidParameterException
-
DomainConfig
Deprecated.reads the old (pre version 1.10) domain config properties string
better don't use this- Throws:
InvalidParameterException
-
-
Method Details
-
getMaxDetectedErrors
public int getMaxDetectedErrors() -
setMaxDetectedErrors
- Parameters:
maxDetectedErrors
- numbers of check digits fororg.emau.icmvc.ganimed.ttp.psn.generator.ReedSolomonLagrange
default 2- Throws:
InvalidParameterException
-
getPsnLength
public int getPsnLength() -
setPsnLength
- Parameters:
psnLength
- length of the generated pseudonym
default 8- Throws:
InvalidParameterException
-
getPsnPrefix
-
setPsnPrefix
- Parameters:
psnPrefix
- additional prefix
default ""- Throws:
InvalidParameterException
-
getPsnSuffix
-
setPsnSuffix
- Parameters:
psnSuffix
- additional suffix
default ""- Throws:
InvalidParameterException
-
isIncludePrefixInCheckDigitCalculation
public boolean isIncludePrefixInCheckDigitCalculation() -
setIncludePrefixInCheckDigitCalculation
public void setIncludePrefixInCheckDigitCalculation(boolean includePrefixInCheckDigitCalculation) - Parameters:
includePrefixInCheckDigitCalculation
- should the prefix be used to calculate the check digit(s)
default false
-
isIncludeSuffixInCheckDigitCalculation
public boolean isIncludeSuffixInCheckDigitCalculation() -
setIncludeSuffixInCheckDigitCalculation
public void setIncludeSuffixInCheckDigitCalculation(boolean includeSuffixInCheckDigitCalculation) - Parameters:
includeSuffixInCheckDigitCalculation
- should the suffix be used to calculate the check digit(s)
default false
-
getUseLastCharAsDelimiterAfterXChars
public int getUseLastCharAsDelimiterAfterXChars() -
setUseLastCharAsDelimiterAfterXChars
public void setUseLastCharAsDelimiterAfterXChars(int useLastCharAsDelimiterAfterXChars) throws InvalidParameterException - Parameters:
useLastCharAsDelimiterAfterXChars
- use last char of the given alphabet as delimiter symbol after the given number of other chars within the pseudonym
e.g. 123.456.789 or abcd-efgh-ijkl
default 0 (which means dont use ...)- Throws:
InvalidParameterException
-
isPsnsDeletable
public boolean isPsnsDeletable() -
setPsnsDeletable
public void setPsnsDeletable(boolean psnsDeletable) - Parameters:
psnsDeletable
- is it allowed to delete entries within this project
attention!ValidateViaParents.CASCADE_DELETE
ignores this config entry
default false
-
getForceCache
-
setForceCache
- Parameters:
forceCache
- should a cache be used for faster psn generation, seeForceCache
memory consumption is one bit per possible pseudonym: mem_for_cache = alphabet_length ^ pseudonym_length / 8 / 1024 / 1024 MB
e.g. alphabet = numbers, length = 8 -> mem_for_cache = 10 ^ 8 / (8 * 1024 * 1024) = 11.92 MB
defaultForceCache.DEFAULT
if memory consumption < 120 MB (pseudonym_length = 9, alphabet_length = 10) then use cache, else don't- Throws:
InvalidParameterException
-
getValidateValuesViaParents
-
setValidateValuesViaParents
- Parameters:
validateValuesViaParents
- should the values in this domain be validated against the rules of their parent domains, seeValidateViaParents
throws anInvalidParameterException
if there's no parent domain set
defaultValidateViaParents.OFF
-
isSendNotificationsWeb
public boolean isSendNotificationsWeb() -
setSendNotificationsWeb
public void setSendNotificationsWeb(boolean sendNotificationsWeb) -
getPropertiesString
Deprecated.- Returns:
- the old (pre version 1.10) domain config properties string
better don't use this
-
hashCode
public int hashCode() -
equals
-
toString
-