@PostConstruct public void placeholders() { // workaround until we get a tomee version supporting it OOTB for resources achillesLibraries = simpleValue(achillesLibraries); hazelcastLibraries = simpleValue(hazelcastLibraries); if (password != null) { password = simpleValue(password); } } }
public void setHeaderName(final String testHeaderName) { this.headerName = simpleValue(testHeaderName.toLowerCase(Locale.ENGLISH)); }
public void setHeaderValue(final String testHeaderValue) { this.isHeaderValueNegative = testHeaderValue.startsWith("!"); this.headerValue = simpleValue(this.isHeaderValueNegative ? testHeaderValue.substring(1) : testHeaderValue); }
@Attribute( description = "Same as template but the template is extracted in an external file " + "(you can use placeholders like ${catalina.base} to specify a path relative to {container_name}.", sample = "${catalina.base}/conf/alert.mail.template") public void setTemplateFile(final String templateFile) { this.templateFile = PropertyPlaceHolderHelper.simpleValue(templateFile); }
@Attribute(description = "Mail server password (if there is a username)", sample = "cipher:Static3DES:xxxxx") public void setPassword(final String password) { this.password = PropertyPlaceHolderHelper.simpleValue(password); }
@Attribute(sample = "cipher:Static3DES:xxxx", description = "Proxy password.") public void setProxyPassword(final String proxyPassword) { this.proxyPassword = PropertyPlaceHolderHelper.simpleValue(proxyPassword); }
@Attribute(sample = "cipher:Static3DES:xxxx", description = "If connecting using a certificate the key store password.") public void setKeyStorePassword(final String keyStorePassword) { this.keyStorePassword = PropertyPlaceHolderHelper.simpleValue(keyStorePassword); }
@Attribute(sample = "cipher:Static3DES:yyyy", description = "Sender account password") public void setPassword(final String password) { this.password = PropertyPlaceHolderHelper.simpleValue(password); }
@Attribute(sample = "cipher:Static3DES:yyyyyy", description = "Associated password (with nick username)") public void setPassword(final String password) { this.password = PropertyPlaceHolderHelper.simpleValue(password); }
public static String value(final String aw) { if (aw == null) { return null; } if (!aw.contains(PREFIX) || !aw.contains(SUFFIX)) { return decryptIfNeeded(aw); } String value = CACHE.getProperty(aw); if (value != null) { return value; } value = simpleValue(aw); CACHE.setProperty(aw, value); return value; }
@Attribute(sample = "cipher:Static3DES:zzz", description = "Password.") public void setPassword(final String password) { this.password = PropertyPlaceHolderHelper.simpleValue(password); }
@Attribute(sample = "${catalina.base/conf/xmpp-certificate.cert", description = "If connecting using a certificate the certificate path.") public void setKeystorePath(final String keystorePath) { this.keystorePath = PropertyPlaceHolderHelper.simpleValue(keystorePath); }
@Attribute(sample = "cipher:Static3DES:xxxxxxx", description = "Channel password if mandatory.") public void setChannelPassword(final String channelPassword) { this.channelPassword = PropertyPlaceHolderHelper.simpleValue(channelPassword); }
public static String value(final String aw) { if (aw == null) { return null; } if (!aw.contains(PREFIX) || !aw.contains(SUFFIX)) { return String.class.cast(decryptIfNeeded(aw, false)); } String value = CACHE.getProperty(aw); if (value != null) { return value; } value = simpleValue(aw); CACHE.setProperty(aw, value); return value; }
private static Properties holds(final Properties properties, final boolean cache) { // we can put null values in SuperProperties, since properties is often of this type we need to tolerate it final Properties updated = new SuperProperties(); if (properties == null) { return updated; } for (final Map.Entry<Object, Object> entry : properties.entrySet()) { final Object rawValue = entry.getValue(); if (rawValue instanceof String) { final String value = (String) rawValue; updated.put(entry.getKey(), cache ? value(value) : simpleValue(value)); } else { updated.put(entry.getKey(), rawValue); } } return updated; }
private File fromName(final String filename) { File file = new File(simpleValue(filename)); try { if (!file.isAbsolute()) { file = SystemInstance.get().getBase().getFile(filename, false); } } catch (final IOException e) { // shouldn't happen with validate set to false above return null; } return file; } }
private static String getConfig(final String s, final String otherwise) { return PropertyPlaceHolderHelper.simpleValue(SystemInstance.get().getProperty(s, otherwise)); } }
public OpenEJBHttpRegistry() { try { OpenEjbConfiguration configuration = SystemInstance.get().getComponent(OpenEjbConfiguration.class); for (ServiceInfo service : configuration.facilities.services) { if (service.className.equals(HttpServerFactory.class.getName())) { int port = Integer.parseInt(PropertyPlaceHolderHelper.simpleValue(service.properties.getProperty("port"))); String ip = service.properties.getProperty("bind"); if ("0.0.0.0".equals(ip)) { InetAddress[] addresses = InetAddress.getAllByName(ip); for (InetAddress address : addresses) { baseUris.add(new URI("http", null, address.getHostAddress(), port, null, null, null)); } } else { baseUris.add(new URI("http", null, ip, port, null, null, null)); } break; } } } catch (Exception e) { log.error("Unable to build base URIs for " + getClass().getSimpleName() + " registry", e); } registry = SystemInstance.get().getComponent(HttpListenerRegistry.class); }
@Override public void init(final Properties props) throws Exception { this.props = props; final String formatString = props.getProperty("discovery"); if (formatString != null) { this.discoveryUriFormat = new StringTemplate(formatString); } this.ip = PropertyPlaceHolderHelper.simpleValue(props.getProperty("bind")); this.inetAddress = getAddress(this.ip); final Options options = new Options(props); this.port = Integer.parseInt(PropertyPlaceHolderHelper.simpleValue(options.get("port", "0"))); final int threads = options.get("threads", 100); this.backlog = options.get("backlog", threads); this.secure = options.get("secure", false); this.timeout = options.get("timeout", this.timeout); this.enabledCipherSuites = options.get("enabledCipherSuites", "SSL_DH_anon_WITH_RC4_128_MD5").split(","); this.next.init(props); }
public Key getKey(String keyId, String location, char[] keystorePwd, String type, boolean create) throws IOException { StoreManager manager = StoreManager.get(simpleValue(location), keystorePwd, type, create); final Key key; try { key = manager.getKey(keyId, keystorePwd); } catch (final Exception e) { LOGGER.severe(SecurityCodes.AUTHENTICATION_HANDLER_CANT_LOAD_KEY, "Can't load the key from the store.", e); throw new AuthenticationException(); } finally { manager.close(); } if (key == null) { LOGGER.severe(SecurityCodes.AUTHENTICATION_HANDLER_CANT_FIND_KEY, String.format("Can't find key '%s' from the store.", this.getClientSignature().getKeyId())); throw new AuthenticationException(); } return key; }