MotechSettings

public interface MotechSettings

Interface for main MOTECH settings management.

Methods

asProperties

Properties asProperties()

Converts this MOTECH setting to Properties.

Returns:this object as Properties

getConfigFileChecksum

String getConfigFileChecksum()

getEmailRequired

boolean getEmailRequired()

getFailureLoginLimit

Integer getFailureLoginLimit()

Gets the failure login limit.

Returns:the failure login limit

getFilePath

String getFilePath()

getJmxBroker

String getJmxBroker()

getJmxHost

String getJmxHost()

getLanguage

String getLanguage()

getLastRun

DateTime getLastRun()

getLoginMode

LoginMode getLoginMode()

getMinPasswordLength

Integer getMinPasswordLength()

Returns the minimal length of user passwords in MOTECH.

Returns:the minimal length of the password, 0 or less means no minimal length

getNumberOfDaysForReminder

Integer getNumberOfDaysForReminder()

Gets the number of days before password expiration to send the reminder at.

Returns:the number of days before password expiration to send the reminder at

getNumberOfDaysToChangePassword

Integer getNumberOfDaysToChangePassword()

Gets the number of days after which the user will have to change password.

Returns:the number of days after to change password.

getPasswordValidator

String getPasswordValidator()

Returns the name of the password validator. The validator with that name will be retrieved by web-security for validation of new password.

Returns:the name of the validator

getProviderName

String getProviderName()

getProviderUrl

String getProviderUrl()

getServerHost

String getServerHost()

getServerUrl

String getServerUrl()

getSessionTimeout

Integer getSessionTimeout()

Gets the http session timeout for Motech users. Users will be logged out after reaching this timeout. This value is specified in seconds. A negative value specifies that sessions should never time out.

Returns:the http session timeout, in seconds

getStatusMsgTimeout

String getStatusMsgTimeout()

getUploadSize

String getUploadSize()

isPasswordResetReminderEnabled

boolean isPasswordResetReminderEnabled()

Checks whether the reminding about password reset is enabled.

Returns:true when the reminding is enabled

isPlatformInitialized

boolean isPlatformInitialized()

Checks whether platform is initialized.

Returns:true if platform is initialized, false otherwise

load

void load(DigestInputStream dis)

Loads the properties from given stream and stores them withing this object.

Parameters:
  • dis – the source stream
Throws:
  • IOException – when I/O error occurs

savePlatformSetting

void savePlatformSetting(String key, String value)

Adds or updates given key-value pair within this object.

Parameters:
  • key – the key of the pair
  • value – the value of the pair

setConfigFileChecksum

void setConfigFileChecksum(String configFileChecksum)

setEmailRequired

void setEmailRequired(String emailRequired)

setFailureLoginLimit

void setFailureLoginLimit(int limit)

Sets the failure login limit. After reaching this limit user will be blocked. If 0 then blocking will be disabled.

Parameters:
  • limit – the failure login limit

setFilePath

void setFilePath(String filePath)

setJmxBroker

void setJmxBroker(String jmxBroker)

setJmxHost

void setJmxHost(String jmxHost)

setLanguage

void setLanguage(String language)

setLastRun

void setLastRun(DateTime lastRun)

setLoginModeValue

void setLoginModeValue(String loginMode)

setMinPasswordLength

void setMinPasswordLength(Integer minPasswordLength)

Sets the minimal length of user passwords in MOTECH.

Parameters:
  • minPasswordLength – the minimal length of the password, 0 or less means no minimal length

setNumberOfDaysForReminder

void setNumberOfDaysForReminder(Integer days)

Sets the number of days before password expiration to send the reminder at.

Parameters:
  • days – the number of days before password expiration to send the reminder at

setNumberOfDaysToChangePassword

void setNumberOfDaysToChangePassword(Integer days)

Sets the number of days after which the user will have to change password.

Parameters:
  • days – the number of days to change password

setPasswordResetReminder

void setPasswordResetReminder(String remind)

Sets the password reset remind flag. If it is set to the true then reminder about requirements of the password changing will be send to the user.

Parameters:
  • remind

setPasswordValidator

void setPasswordValidator(String validator)

Sets the name of the password validator. The validator with that name will be retrieved by web-security for validation of new password.

Parameters:
  • validator – the name of the validator

setPlatformInitialized

void setPlatformInitialized(boolean platformInitialized)

setProviderName

void setProviderName(String providerName)

setProviderUrl

void setProviderUrl(String providerUrl)

setServerUrl

void setServerUrl(String serverUrl)

setSessionTimeout

void setSessionTimeout(Integer sessionTimeout)

Sets the http session timeout for Motech users. Users will be logged out after reaching this timeout. This value is specified in seconds. A negative value specifies that sessions should never time out.

Parameters:
  • sessionTimeout – the http session timeout, in seconds

setStatusMsgTimeout

void setStatusMsgTimeout(String statusMsgTimeout)

setUploadSize

void setUploadSize(String uploadSize)

updateFromProperties

void updateFromProperties(Properties props)

Updates this object with given properties.

Parameters:
  • props – properties to be applied

updateSettings

void updateSettings(String configFileChecksum, String filePath, Properties platformSettings)

Updates settings with given information.

Parameters:
  • configFileChecksum – the configuration file checksum to be set
  • filePath – the file path to be set
  • platformSettings – the platform settings to be add