Package general.common
Class Common
- java.lang.Object
-
- general.common.Common
-
@Singleton public class Common extends java.lang.ObjectThis class provides configuration properties that are common to all modules of JATOS. It mostly takes parameters from application.conf. It is initialized during JATOS start (triggered in GuiceConfig). Since most fields are initialized by the constructor during the JATOS' start (triggered in GuiceConfig), it's safe to access them via static getter methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetBasepath()JATOS' absolute base path without trailing '/.'static java.lang.StringgetBrandingUrl()URL where some static HTML can be found that can be shown instead of the default welcome message on the home pagestatic java.lang.StringgetConextClientId()SURFconext OpenId Connect (OIDC) client IDstatic java.lang.StringgetConextClientSecret()SURFconext OpenId Connect (OIDC) client secret.static java.lang.StringgetConextDiscoveryUrl()SURFconext OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")static java.lang.StringgetConextIdTokenSigningAlgorithm()SURFconext OpenId Connect (OIDC) token signing algorithm (e.g.static java.util.List<java.lang.String>getConextScope()SURFconext OpenId Connect (OIDC) scope (e.g.static java.lang.StringgetConextSigninButtonLogoUrl()Logo URL of SURFconext button on the sign-in pagestatic java.lang.StringgetConextSigninButtonText()Text of SURFconext button on the sign-in pagestatic java.lang.StringgetConextSuccessFeedback()Success feedback text shown to the user if SRAM sign-in was successful.static java.lang.StringgetConextUsernameFrom()SURFconext OpenId Connect (OIDC) - Where should JATOS' username be taken from?static java.lang.StringgetDbConnectionPoolSize()Database connection pool sizestatic java.lang.StringgetDbDriver()Database driver as defined in application.confstatic java.lang.StringgetDbUrl()Database URL as defined in application.confjava.time.DurationgetDurationWithDefaultUnit(com.typesafe.config.Config config, java.lang.String path)static intgetGroupsCleaningInterval()Interval in seconds the group cleaner is started.static intgetGroupsCleaningMemberIdleAfter()After how many seconds a group member is regarded as idle.static intgetIdCookiesLimit()Max number of ID cookiesstatic play.mvc.Http.Cookie.SameSitegetIdCookiesSameSite()Which SameSite attribute the ID cookies should setstatic java.time.DurationgetJatosApiTokensApiGenerationExpiresAfter()The duration for which a token generated via the API remains valid after its creation.static java.lang.StringgetJatosApiVersion()JATOS API version (different from JATOS version)static java.lang.StringgetJatosHttpAddress()JATOS HTTP host address without protocol or port (e.g.static intgetJatosHttpPort()Port JATOS is running onstatic java.lang.StringgetJatosUpdateMsg()If in update happened during last startup a message might be stored herestatic java.lang.StringgetJatosUrlBasePath()HTTP URL base path: will be the prefix for each URL, e.g.static java.lang.StringgetJatosVersion()JATOS version (full version e.g.static java.time.DurationgetLastSeenDateUpdateThreshold()StudyResult's lastSeenDate is updated only if its current value is older than this threshold (in seconds).static java.lang.StringgetLdapAdminDn()LDAP admin DN (Distinguished Name) - the admin user is used to search for the actual user that wants to log instatic java.lang.StringgetLdapAdminPassword()LDAP admin passwordstatic java.util.List<java.lang.String>getLdapBaseDn()LDAP base DNs (Distinguished Name)static intgetLdapTimeout()Read timeout for the LDAP serverstatic java.lang.StringgetLdapUrl()LDAP URL (with port)static java.lang.StringgetLdapUserAttribute()LDAP User attribute, e.g.static java.lang.StringgetLocale()Locale used in the GUI.static java.lang.StringgetLogsAppender()Log appender: can be 'ASYNCFILE' (default) or 'ASYNCSTDOUT'static java.lang.StringgetLogsFilename()Base name of JATOS log files without the suffix ('.log' or '.gz').static java.lang.StringgetLogsPath()Path where the application logs are locatedstatic java.lang.StringgetMac()MAC address of the network interfacestatic intgetMaxResultsDbQuerySize()Maximal number of results to be fetched from the DB at oncestatic java.lang.StringgetOauthGoogleClientId()Google Sign-in Client ID for OAuth / OpenId Connect (OIDC)static java.lang.StringgetOidcClientId()OpenId Connect (OIDC) client IDstatic java.lang.StringgetOidcClientSecret()OpenId Connect (OIDC) client secret.static java.lang.StringgetOidcDiscoveryUrl()OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")static java.lang.StringgetOidcIdTokenSigningAlgorithm()OpenId Connect (OIDC) token signing algorithm (e.g.static java.util.List<java.lang.String>getOidcScope()OpenId Connect (OIDC) scope (e.g.static java.lang.StringgetOidcSigninButtonLogoUrl()Logo URL of OIDC button in sign-in pagestatic java.lang.StringgetOidcSigninButtonText()Text of OIDC button in sign-in pagestatic java.lang.StringgetOidcSuccessFeedback()Success feedback text shown to the user if OIDC sign-in was successfulstatic java.lang.StringgetOidcUsernameFrom()OpenId Connect (OIDC) - Where should JATOS' username be taken from?static java.lang.StringgetOpenAiApiKey()OpenAI API keystatic intgetOpenAiCallLimit()Returns the maximum number of calls allowed to the OpenAI API.static intgetOpenAiTimeout()Returns the maximum number of seconds to wait for OpenAI API response.static java.lang.StringgetOpenAiUrlBasePath()Returns the URL base path used for accessing the OpenAI API.static java.lang.StringgetOrcidClientId()ORCID'S OpenId Connect (OIDC) client IDstatic java.lang.StringgetOrcidClientSecret()ORCID's OpenId Connect (OIDC) client secret.static java.lang.StringgetOrcidDiscoveryUrl()ORCID's OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")static java.lang.StringgetOrcidIdTokenSigningAlgorithm()ORCID's OpenId Connect (OIDC) token signing algorithm (e.g.static java.util.List<java.lang.String>getOrcidScope()ORCID's OpenId Connect (OIDC) scope (e.g.static java.lang.StringgetOrcidSigninButtonLogoUrl()Logo URL of ORCID button on the sign-in pagestatic java.lang.StringgetOrcidSigninButtonText()Text of ORCID button on the sign-in pagestatic java.lang.StringgetOrcidSuccessFeedback()Success feedback text shown to the user if ORCID sign-in was successful.static java.lang.StringgetOrcidUsernameFrom()ORCID's OpenId Connect (OIDC) - Where should JATOS' username be taken from?static longgetResultDataMaxSize()Maximal size of result data of one component result in Bytestatic java.lang.StringgetResultsArchiveSuffix()File extension of results archive filesstatic longgetResultUploadsLimitPerStudyRun()Max size of all files uploaded during a single study run in bytesstatic longgetResultUploadsMaxFileSize()Max file size in bytes for a single uploaded filestatic java.lang.StringgetResultUploadsPath()Path in the file system where JATOS stores uploaded result filesstatic java.lang.StringgetSramClientId()SRAM'S OpenId Connect (OIDC) client IDstatic java.lang.StringgetSramClientSecret()SRAM's OpenId Connect (OIDC) client secret.static java.lang.StringgetSramDiscoveryUrl()SRAM's OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")static java.lang.StringgetSramIdTokenSigningAlgorithm()SRAM's OpenId Connect (OIDC) token signing algorithm (e.g.static java.util.List<java.lang.String>getSramScope()SRAM's OpenId Connect (OIDC) scope (e.g.static java.lang.StringgetSramSigninButtonLogoUrl()Logo URL of SRAM button on the sign-in pagestatic java.lang.StringgetSramSigninButtonText()Text of SRAM button on the sign-in pagestatic java.lang.StringgetSramSuccessFeedback()Success feedback text shown to the user if SRAM sign-in was successful.static java.lang.StringgetSramUsernameFrom()SRAM's OpenId Connect (OIDC) - Where should JATOS' username be taken from?static java.lang.StringgetStudyArchiveSuffix()File extension of study archive filesstatic java.lang.StringgetStudyAssetsRootPath()Path in the file system to the study assets root directory.static java.lang.StringgetStudyLogsPath()Path in the file system where JATOS stores its logs for each studystatic java.lang.StringgetTermsOfUseUrl()URL to the terms of use that will be shown in a link on the home pagestatic java.lang.StringgetThreadPoolSize()JATOS' thread pool sizestatic java.lang.StringgetTmpPath()Path to the JATOS tmp directory.static intgetUserPasswordMinLength()Message that will be displayed during user creation that describes password requirementsstatic org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>getUserPasswordStrengthRegex()Regex that will be used to check the password during user creationstatic booleangetUserSessionAllowKeepSignedin()If true, the user has the possibility (a checkbox on the GUI's signin page) to keep the user session and to not get signed out automatically due to user a session timeout (neither through normal timeout nor inactivity).static intgetUserSessionInactivity()Time in minutes a user can be inactive before they will be signed out (defined in application.conf)static intgetUserSessionTimeout()Time in minutes when the Play session will timeout (defined in application.conf)static booleanhasBranding()static booleanisConextAllowed()SURFconext OpenId Connect (OIDC) allowedstatic booleanisDonationAllowed()Should the GUI show a donations buttonstatic booleanisGroupsCleaningAllowed()True if the group cleaning is allowedstatic booleanisIdCookiesSecure()If true, the ID cookies' secure attribute will be setstatic booleanisJatosApiAllowed()If true, it is allowed to use JATOS' APIstatic booleanisJatosApiTokensApiGenerationAllowed()Is it allowed to generate new tokens via the API?static booleanisLdapAllowed()static booleanisLogsAppenderStdOut()Returns true if the Logger logs to STDOUT and false otherwise.static booleanisMultiNode()True indicates that this JATOS runs with others in a clusterstatic booleanisOauthGoogleAllowed()static booleanisOidcAllowed()OpenId Connect (OIDC) allowedstatic booleanisOpenAiAllowed()static booleanisOrcidAllowed()static booleanisResultUploadsEnabled()Are file uploads via jatos.js allowed?static booleanisSramAllowed()SRAM's OpenId Connect (OIDC) allowedstatic booleanisStudyLogsEnabled()Is study logging enabledstatic booleanisStudyMembersAllowedToAddAllUsers()If true, it's allowed to add all users that exist on this JATOS server to be added at once as members of a studystatic booleanisUserRoleAllowSuperuser()If true, it is allowed to grant users the Superuser rolestatic booleanshowResultDataSizeInStudyManager()If false, the result data size won't be calculated for the study manager page.static booleanshowResultFileSizeInStudyManager()If false, the study result file size won't be calculated for the study manager page.static booleanshowStudyAssetsSizeInStudyManager()If false, the study assets folder size won't be calculated for the study manager page.static booleanusesMysql()Does JATOS use an MySQL database?
-
-
-
Method Detail
-
getDurationWithDefaultUnit
public java.time.Duration getDurationWithDefaultUnit(com.typesafe.config.Config config, java.lang.String path)
-
getJatosVersion
public static java.lang.String getJatosVersion()
JATOS version (full version e.g. v3.5.5-alpha)
-
getJatosApiVersion
public static java.lang.String getJatosApiVersion()
JATOS API version (different from JATOS version)
-
getBasepath
public static java.lang.String getBasepath()
JATOS' absolute base path without trailing '/.'
-
getStudyAssetsRootPath
public static java.lang.String getStudyAssetsRootPath()
Path in the file system to the study assets root directory. If the property is defined in the configuration file then use it as the base path. If property isn't defined, try in default study path instead.
-
isStudyLogsEnabled
public static boolean isStudyLogsEnabled()
Is study logging enabled
-
getStudyLogsPath
public static java.lang.String getStudyLogsPath()
Path in the file system where JATOS stores its logs for each study
-
isResultUploadsEnabled
public static boolean isResultUploadsEnabled()
Are file uploads via jatos.js allowed?
-
getResultUploadsPath
public static java.lang.String getResultUploadsPath()
Path in the file system where JATOS stores uploaded result files
-
getResultUploadsMaxFileSize
public static long getResultUploadsMaxFileSize()
Max file size in bytes for a single uploaded file
-
getResultUploadsLimitPerStudyRun
public static long getResultUploadsLimitPerStudyRun()
Max size of all files uploaded during a single study run in bytes
-
getResultDataMaxSize
public static long getResultDataMaxSize()
Maximal size of result data of one component result in Byte
-
getMaxResultsDbQuerySize
public static int getMaxResultsDbQuerySize()
Maximal number of results to be fetched from the DB at once
-
getUserSessionTimeout
public static int getUserSessionTimeout()
Time in minutes when the Play session will timeout (defined in application.conf)
-
getUserSessionInactivity
public static int getUserSessionInactivity()
Time in minutes a user can be inactive before they will be signed out (defined in application.conf)
-
getUserSessionAllowKeepSignedin
public static boolean getUserSessionAllowKeepSignedin()
If true, the user has the possibility (a checkbox on the GUI's signin page) to keep the user session and to not get signed out automatically due to user a session timeout (neither through normal timeout nor inactivity). If set to true and the user chooses to keep being signed in, the user session is kept until the user signs out manually or the session cookie is deleted.
-
getDbUrl
public static java.lang.String getDbUrl()
Database URL as defined in application.conf
-
usesMysql
public static boolean usesMysql()
Does JATOS use an MySQL database?
-
getDbDriver
public static java.lang.String getDbDriver()
Database driver as defined in application.conf
-
getDbConnectionPoolSize
public static java.lang.String getDbConnectionPoolSize()
Database connection pool size
-
getMac
public static java.lang.String getMac()
MAC address of the network interface
-
getUserPasswordMinLength
public static int getUserPasswordMinLength()
Message that will be displayed during user creation that describes password requirements
-
getUserPasswordStrengthRegex
public static org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> getUserPasswordStrengthRegex()
Regex that will be used to check the password during user creation
-
getJatosUrlBasePath
public static java.lang.String getJatosUrlBasePath()
HTTP URL base path: will be the prefix for each URL, e.g. /jatos/test -> /myBasePath/jatos/test
-
getJatosUpdateMsg
public static java.lang.String getJatosUpdateMsg()
If in update happened during last startup a message might be stored here
-
getJatosHttpAddress
public static java.lang.String getJatosHttpAddress()
JATOS HTTP host address without protocol or port (e.g. 192.168.0.1)
-
getJatosHttpPort
public static int getJatosHttpPort()
Port JATOS is running on
-
getLdapUrl
public static java.lang.String getLdapUrl()
LDAP URL (with port)
-
getLdapUserAttribute
public static java.lang.String getLdapUserAttribute()
LDAP User attribute, e.g. 'uid' or 'cn'
-
getLdapBaseDn
public static java.util.List<java.lang.String> getLdapBaseDn()
LDAP base DNs (Distinguished Name)
-
getLdapAdminDn
public static java.lang.String getLdapAdminDn()
LDAP admin DN (Distinguished Name) - the admin user is used to search for the actual user that wants to log in
-
getLdapAdminPassword
public static java.lang.String getLdapAdminPassword()
LDAP admin password
-
isLdapAllowed
public static boolean isLdapAllowed()
-
getLdapTimeout
public static int getLdapTimeout()
Read timeout for the LDAP server
-
isOauthGoogleAllowed
public static boolean isOauthGoogleAllowed()
-
getOauthGoogleClientId
public static java.lang.String getOauthGoogleClientId()
Google Sign-in Client ID for OAuth / OpenId Connect (OIDC)
-
isOidcAllowed
public static boolean isOidcAllowed()
OpenId Connect (OIDC) allowed
-
getOidcDiscoveryUrl
public static java.lang.String getOidcDiscoveryUrl()
OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")
-
getOidcClientId
public static java.lang.String getOidcClientId()
OpenId Connect (OIDC) client ID
-
getOidcClientSecret
public static java.lang.String getOidcClientSecret()
OpenId Connect (OIDC) client secret. Can be null if not used.
-
getOidcScope
public static java.util.List<java.lang.String> getOidcScope()
OpenId Connect (OIDC) scope (e.g. "openid", "profile", "email")
-
getOidcUsernameFrom
public static java.lang.String getOidcUsernameFrom()
OpenId Connect (OIDC) - Where should JATOS' username be taken from?
-
getOidcIdTokenSigningAlgorithm
public static java.lang.String getOidcIdTokenSigningAlgorithm()
OpenId Connect (OIDC) token signing algorithm (e.g. RS256)
-
getOidcSigninButtonText
public static java.lang.String getOidcSigninButtonText()
Text of OIDC button in sign-in page
-
getOidcSigninButtonLogoUrl
public static java.lang.String getOidcSigninButtonLogoUrl()
Logo URL of OIDC button in sign-in page
-
getOidcSuccessFeedback
public static java.lang.String getOidcSuccessFeedback()
Success feedback text shown to the user if OIDC sign-in was successful
-
isOrcidAllowed
public static boolean isOrcidAllowed()
-
getOrcidDiscoveryUrl
public static java.lang.String getOrcidDiscoveryUrl()
ORCID's OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")
-
getOrcidClientId
public static java.lang.String getOrcidClientId()
ORCID'S OpenId Connect (OIDC) client ID
-
getOrcidClientSecret
public static java.lang.String getOrcidClientSecret()
ORCID's OpenId Connect (OIDC) client secret.
-
getOrcidScope
public static java.util.List<java.lang.String> getOrcidScope()
ORCID's OpenId Connect (OIDC) scope (e.g. "openid", "profile", "email")
-
getOrcidUsernameFrom
public static java.lang.String getOrcidUsernameFrom()
ORCID's OpenId Connect (OIDC) - Where should JATOS' username be taken from?
-
getOrcidIdTokenSigningAlgorithm
public static java.lang.String getOrcidIdTokenSigningAlgorithm()
ORCID's OpenId Connect (OIDC) token signing algorithm (e.g. RS256)
-
getOrcidSigninButtonText
public static java.lang.String getOrcidSigninButtonText()
Text of ORCID button on the sign-in page
-
getOrcidSigninButtonLogoUrl
public static java.lang.String getOrcidSigninButtonLogoUrl()
Logo URL of ORCID button on the sign-in page
-
getOrcidSuccessFeedback
public static java.lang.String getOrcidSuccessFeedback()
Success feedback text shown to the user if ORCID sign-in was successful.
-
isSramAllowed
public static boolean isSramAllowed()
SRAM's OpenId Connect (OIDC) allowed
-
getSramDiscoveryUrl
public static java.lang.String getSramDiscoveryUrl()
SRAM's OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")
-
getSramClientId
public static java.lang.String getSramClientId()
SRAM'S OpenId Connect (OIDC) client ID
-
getSramClientSecret
public static java.lang.String getSramClientSecret()
SRAM's OpenId Connect (OIDC) client secret.
-
getSramScope
public static java.util.List<java.lang.String> getSramScope()
SRAM's OpenId Connect (OIDC) scope (e.g. "openid", "profile", "email")
-
getSramUsernameFrom
public static java.lang.String getSramUsernameFrom()
SRAM's OpenId Connect (OIDC) - Where should JATOS' username be taken from?
-
getSramIdTokenSigningAlgorithm
public static java.lang.String getSramIdTokenSigningAlgorithm()
SRAM's OpenId Connect (OIDC) token signing algorithm (e.g. RS256)
-
getSramSigninButtonText
public static java.lang.String getSramSigninButtonText()
Text of SRAM button on the sign-in page
-
getSramSigninButtonLogoUrl
public static java.lang.String getSramSigninButtonLogoUrl()
Logo URL of SRAM button on the sign-in page
-
getSramSuccessFeedback
public static java.lang.String getSramSuccessFeedback()
Success feedback text shown to the user if SRAM sign-in was successful.
-
isConextAllowed
public static boolean isConextAllowed()
SURFconext OpenId Connect (OIDC) allowed
-
getConextDiscoveryUrl
public static java.lang.String getConextDiscoveryUrl()
SURFconext OpenId Connect (OIDC) provider discovery URL (ends with ".well-known/openid-configuration")
-
getConextClientId
public static java.lang.String getConextClientId()
SURFconext OpenId Connect (OIDC) client ID
-
getConextClientSecret
public static java.lang.String getConextClientSecret()
SURFconext OpenId Connect (OIDC) client secret.
-
getConextScope
public static java.util.List<java.lang.String> getConextScope()
SURFconext OpenId Connect (OIDC) scope (e.g. "openid", "profile", "email"). SURFconext ignores scopes other than "openid" (see: https://servicedesk.surf.nl/wiki/spaces/IAM/pages/128909987/OpenID+Connect+features#OpenIDConnectfeatures-Scopes)
-
getConextUsernameFrom
public static java.lang.String getConextUsernameFrom()
SURFconext OpenId Connect (OIDC) - Where should JATOS' username be taken from?
-
getConextIdTokenSigningAlgorithm
public static java.lang.String getConextIdTokenSigningAlgorithm()
SURFconext OpenId Connect (OIDC) token signing algorithm (e.g. RS256)
-
getConextSigninButtonText
public static java.lang.String getConextSigninButtonText()
Text of SURFconext button on the sign-in page
-
getConextSigninButtonLogoUrl
public static java.lang.String getConextSigninButtonLogoUrl()
Logo URL of SURFconext button on the sign-in page
-
getConextSuccessFeedback
public static java.lang.String getConextSuccessFeedback()
Success feedback text shown to the user if SRAM sign-in was successful.
-
isDonationAllowed
public static boolean isDonationAllowed()
Should the GUI show a donations button
-
getTermsOfUseUrl
public static java.lang.String getTermsOfUseUrl()
URL to the terms of use that will be shown in a link on the home page
-
getBrandingUrl
public static java.lang.String getBrandingUrl()
URL where some static HTML can be found that can be shown instead of the default welcome message on the home page
-
hasBranding
public static boolean hasBranding()
-
getLocale
public static java.lang.String getLocale()
Locale used in the GUI. If not set, the browser's 'navigator.language' is used.
-
isStudyMembersAllowedToAddAllUsers
public static boolean isStudyMembersAllowedToAddAllUsers()
If true, it's allowed to add all users that exist on this JATOS server to be added at once as members of a study
-
isIdCookiesSecure
public static boolean isIdCookiesSecure()
If true, the ID cookies' secure attribute will be set
-
getIdCookiesSameSite
public static play.mvc.Http.Cookie.SameSite getIdCookiesSameSite()
Which SameSite attribute the ID cookies should set
-
getIdCookiesLimit
public static int getIdCookiesLimit()
Max number of ID cookies
-
showStudyAssetsSizeInStudyManager
public static boolean showStudyAssetsSizeInStudyManager()
If false, the study assets folder size won't be calculated for the study manager page. Sometimes the filesystem is too slow to allow this.
-
showResultDataSizeInStudyManager
public static boolean showResultDataSizeInStudyManager()
If false, the result data size won't be calculated for the study manager page. Sometime the database is too slow to allow this.
-
showResultFileSizeInStudyManager
public static boolean showResultFileSizeInStudyManager()
If false, the study result file size won't be calculated for the study manager page. Sometimes the filesystem is too slow to allow this.
-
isUserRoleAllowSuperuser
public static boolean isUserRoleAllowSuperuser()
If true, it is allowed to grant users the Superuser role
-
isJatosApiAllowed
public static boolean isJatosApiAllowed()
If true, it is allowed to use JATOS' API
-
isJatosApiTokensApiGenerationAllowed
public static boolean isJatosApiTokensApiGenerationAllowed()
Is it allowed to generate new tokens via the API?
-
getJatosApiTokensApiGenerationExpiresAfter
public static java.time.Duration getJatosApiTokensApiGenerationExpiresAfter()
The duration for which a token generated via the API remains valid after its creation. This setting does not apply to tokens created via the GUI.
-
getLogsPath
public static java.lang.String getLogsPath()
Path where the application logs are located
-
getLogsFilename
public static java.lang.String getLogsFilename()
Base name of JATOS log files without the suffix ('.log' or '.gz'). Default is 'application'.
-
getLogsAppender
public static java.lang.String getLogsAppender()
Log appender: can be 'ASYNCFILE' (default) or 'ASYNCSTDOUT'
-
isLogsAppenderStdOut
public static boolean isLogsAppenderStdOut()
Returns true if the Logger logs to STDOUT and false otherwise.
-
getTmpPath
public static java.lang.String getTmpPath()
Path to the JATOS tmp directory. If not set, it is System.getProperty("java.io.tmpdir").
-
isMultiNode
public static boolean isMultiNode()
True indicates that this JATOS runs with others in a cluster
-
getThreadPoolSize
public static java.lang.String getThreadPoolSize()
JATOS' thread pool size
-
getStudyArchiveSuffix
public static java.lang.String getStudyArchiveSuffix()
File extension of study archive files
-
getResultsArchiveSuffix
public static java.lang.String getResultsArchiveSuffix()
File extension of results archive files
-
isGroupsCleaningAllowed
public static boolean isGroupsCleaningAllowed()
True if the group cleaning is allowed
-
getGroupsCleaningInterval
public static int getGroupsCleaningInterval()
Interval in seconds the group cleaner is started.
-
getGroupsCleaningMemberIdleAfter
public static int getGroupsCleaningMemberIdleAfter()
After how many seconds a group member is regarded as idle.
-
getLastSeenDateUpdateThreshold
public static java.time.Duration getLastSeenDateUpdateThreshold()
StudyResult's lastSeenDate is updated only if its current value is older than this threshold (in seconds).
-
isOpenAiAllowed
public static boolean isOpenAiAllowed()
-
getOpenAiApiKey
public static java.lang.String getOpenAiApiKey()
OpenAI API key
-
getOpenAiUrlBasePath
public static java.lang.String getOpenAiUrlBasePath()
Returns the URL base path used for accessing the OpenAI API.
-
getOpenAiCallLimit
public static int getOpenAiCallLimit()
Returns the maximum number of calls allowed to the OpenAI API.
-
getOpenAiTimeout
public static int getOpenAiTimeout()
Returns the maximum number of seconds to wait for OpenAI API response.
-
-