Class DomainConfig

java.lang.Object
org.emau.icmvc.ganimed.ttp.psn.config.DomainConfig
All Implemented Interfaces:
Serializable

public class DomainConfig extends Object implements Serializable
See Also:
  • Field Details

    • MAX_PSEUDONYMS_FOR_DEFAULT_CACHE_ON

      public static final long MAX_PSEUDONYMS_FOR_DEFAULT_CACHE_ON
      See Also:
  • Constructor Details

  • Method Details

    • getMaxDetectedErrors

      public int getMaxDetectedErrors()
    • setMaxDetectedErrors

      public void setMaxDetectedErrors(int maxDetectedErrors) throws InvalidParameterException
      Parameters:
      maxDetectedErrors - numbers of check digits for org.emau.icmvc.ganimed.ttp.psn.generator.ReedSolomonLagrange
      default 2
      Throws:
      InvalidParameterException
    • getPsnLength

      public int getPsnLength()
    • setPsnLength

      public void setPsnLength(int psnLength) throws InvalidParameterException
      Parameters:
      psnLength - length of the generated pseudonym
      default 8
      Throws:
      InvalidParameterException
    • getPsnPrefix

      public String getPsnPrefix()
    • setPsnPrefix

      public void setPsnPrefix(String psnPrefix) throws InvalidParameterException
      Parameters:
      psnPrefix - additional prefix
      default ""
      Throws:
      InvalidParameterException
    • getPsnSuffix

      public String getPsnSuffix()
    • setPsnSuffix

      public void setPsnSuffix(String psnSuffix) throws InvalidParameterException
      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

      public ForceCache getForceCache()
    • setForceCache

      public void setForceCache(ForceCache forceCache) throws InvalidParameterException
      Parameters:
      forceCache - should a cache be used for faster psn generation, see ForceCache
      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
      default ForceCache.DEFAULT if memory consumption < 120 MB (pseudonym_length = 9, alphabet_length = 10) then use cache, else don't
      Throws:
      InvalidParameterException
    • getValidateValuesViaParents

      public ValidateViaParents getValidateValuesViaParents()
    • setValidateValuesViaParents

      public void setValidateValuesViaParents(ValidateViaParents validateValuesViaParents)
      Parameters:
      validateValuesViaParents - should the values in this domain be validated against the rules of their parent domains, see ValidateViaParents
      throws an InvalidParameterException if there's no parent domain set
      default ValidateViaParents.OFF
    • isSendNotificationsWeb

      public boolean isSendNotificationsWeb()
    • setSendNotificationsWeb

      public void setSendNotificationsWeb(boolean sendNotificationsWeb)
    • getPropertiesString

      @Deprecated public String getPropertiesString()
      Deprecated.
      Returns:
      the old (pre version 1.10) domain config properties string
      better don't use this
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object