ControllerConfiguration extends Configuration { public void setSecurityPasswordStorageAsString(String securityPasswordStorageAsString) { try { this.securityPasswordStorage = SecurityPasswordStorage.valueOf( (securityPasswordStorageAsString != null)?Strings.toUpperCase(securityPasswordStorageAsString.trim()):""); } catch (IllegalArgumentException e) { log.info("Security password storage was set to invalid value ''{0}'', using {1} instead.", securityPasswordStorageAsString, SecurityPasswordStorage.KEYSTORE.name()); this.securityPasswordStorage = SecurityPasswordStorage.KEYSTORE; } }  static ControllerConfiguration readXML(); String getIrsendPath(); void setIrsendPath(String irsendPath); String getLircdconfPath(); void setLircdconfPath(String lircdconfPath); boolean isCopyLircdconf(); void setCopyLircdconf(boolean copyLircdconf); int getWebappPort(); void setWebappPort(int webappPort); String getMulticastAddress(); void setMulticastAddress(String multicastAddress); int getMulticastPort(); void setMulticastPort(int multicastPort); String getResourcePath(); void setResourcePath(String resourcePath); boolean isResourceUploadAllowed(); void setResourceUploadAllowed(boolean resourceUpload); String getComPort(); void setComPort(String comPort); String getX10transmitter(); void setX10transmitter(String x10transmitter); long getMacroIRExecutionDelay(); void setMacroIRExecutionDelay(long macroIRExecutionDelay); String getWebappIp(); void setWebappIp(String webappIp); String getBeehiveRESTRootUrl(); void setBeehiveRESTRootUrl(String beehiveRESTRootUrl); String getBeehiveAccountServiceRESTRootUrl(); void setBeehiveAccountServiceRESTRootUrl(String beehiveAccountServiceRESTRootUrl); String getBeehiveDeviceDiscoveryServiceRESTRootUrl(); void setBeehiveDeviceDiscoveryServiceRESTRootUrl(String beehiveDeviceDiscoveryServiceRESTRootUrl); String getWebappName(); void setWebappName(String webappName); int getProxyTimeout(); void setProxyTimeout(int proxyTimeout); String getLagartoBroadcastAddr(); void setLagartoBroadcastAddr(String broadcastAddress); String getRemoteCommandServiceURI(); URI[] getRemoteCommandURIs(); void setRemoteCommandServiceURI(String remoteCommandServiceURI); int getRemoteCommandConnectionTimeoutMillis(); String getRemoteCommandConnectionTimeout(); void setRemoteCommandConnectionTimeout(String timeout); int getRemoteCommandResponseTimeoutMillis(); String getRemoteCommandResponseTimeout(); void setRemoteCommandResponseTimeout(String timeout); int getRemoteCommandRequestIntervalMillis(); String getRemoteCommandRequestInterval(); void setRemoteCommandRequestInterval(String interval); boolean getBeehiveSyncing(); void setBeehiveSyncing(boolean beehiveSyncing); void setSecurityPasswordStorageAsString(String securityPasswordStorageAsString); void setSecurityPasswordStorage(SecurityPasswordStorage securityPasswordStorage); SecurityPasswordStorage getSecurityPasswordStorage(); final static String DEFAULT_LINE_SEPARATOR; final static String LINE_SEPARATOR; static final String RESOURCE_UPLOAD_ALLOWED; static final String RESOURCE_PATH; static final String BEEHIVE_REST_ROOT_URL; static final String REMOTE_COMMAND_SERVICE_URI; final static String REMOTE_COMMAND_REQUEST_INTERVAL; final static String REMOTE_COMMAND_CONNECTION_TIMEOUT; final static String REMOTE_COMMAND_RESPONSE_TIMEOUT; static final String BEEHIVE_ACCOUNT_SERVICE_REST_ROOT_URL; static final String BEEHIVE_DEVICE_DISCOVERY_SERVICE_REST_ROOT_URL; static final String BEEHIVE_SYNCING; static final String IRSEND_PATH; static final String MULTICAST_PORT; static final String MULTICAST_ADDRESS; static final String WEBAPP_PORT; static final String COPY_LIRCD_CONF_ON; static final String LIRCD_CONF_PATH; static final String WEBAPP_IP; static final String PROXY_TIMEOUT; static final String LAGARTO_BROADCAST_ADDRESS; static final String CONTROLLER_APPLICATIONNAME; static final String SECURITY_PASSWORD_STORAGE; final static int DEFAULT_REMOTE_COMMAND_REQUEST_INTERVAL; final static int DEFAULT_REMOTE_COMMAND_CONNECTION_TIMEOUT; final static int DEFAULT_REMOTE_COMMAND_RESPONSE_TIMEOUT; }
@Test public void testSetSecurityPasswordStorageAsString() { ControllerConfiguration config = new ControllerConfiguration(); config.setSecurityPasswordStorageAsString("keystore"); Assert.assertEquals(SecurityPasswordStorage.KEYSTORE, config.getSecurityPasswordStorage()); config.setSecurityPasswordStorageAsString("plaintext"); Assert.assertEquals(SecurityPasswordStorage.PLAINTEXT, config.getSecurityPasswordStorage()); }