@Test public void testInterpolateConfigsInString() { ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); String configName = "not.a.dspace.config.at.all"; String configValue = "demo.dspace.org"; configurationService.setProperty(configName, configValue); String stringWithVariable = "The config " + configName + " has a value of ${" + configName + "}!"; String expectedValue = "The config " + configName + " has a value of " + configValue + "!"; assertEquals("Test config interpolation", expectedValue, Utils.interpolateConfigsInString(stringWithVariable)); configurationService.setProperty(configName, null); }
public static String interpolateConfigsInString(String string) { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); return StringSubstitutor.replace(string, config.getProperties()); }
Utils { public static String interpolateConfigsInString(String string) { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); return StringSubstitutor.replace(string, config.getProperties()); } }
Utils { public static String interpolateConfigsInString(String string) { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); return StringSubstitutor.replace(string, config.getProperties()); } private  Utils(); }
Utils { public static String interpolateConfigsInString(String string) { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); return StringSubstitutor.replace(string, config.getProperties()); } private  Utils(); static String getMD5(String data); static String getMD5(byte[] data); static byte[] getMD5Bytes(byte[] data); static String toHex(byte[] data); static String generateKey(); static String generateHexKey(); static synchronized byte[] generateBytesKey(); static void copy(final InputStream input, final OutputStream output); static void bufferedCopy(final InputStream source,
                                    final OutputStream destination); static String addEntities(String value); static long parseDuration(String duration); static synchronized Date parseISO8601Date(String s); static synchronized String formatISO8601Date(Date d); static java.util.Collection<E> emptyIfNull(java.util.Collection<E> collection); static String[] tokenize(String metadata); static String standardize(String schema, String element, String qualifier, String separator); static String getBaseUrl(String urlString); static String getHostName(String uriString); static String interpolateConfigsInString(String string); }
Utils { public static String interpolateConfigsInString(String string) { ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService(); return StringSubstitutor.replace(string, config.getProperties()); } private  Utils(); static String getMD5(String data); static String getMD5(byte[] data); static byte[] getMD5Bytes(byte[] data); static String toHex(byte[] data); static String generateKey(); static String generateHexKey(); static synchronized byte[] generateBytesKey(); static void copy(final InputStream input, final OutputStream output); static void bufferedCopy(final InputStream source,
                                    final OutputStream destination); static String addEntities(String value); static long parseDuration(String duration); static synchronized Date parseISO8601Date(String s); static synchronized String formatISO8601Date(Date d); static java.util.Collection<E> emptyIfNull(java.util.Collection<E> collection); static String[] tokenize(String metadata); static String standardize(String schema, String element, String qualifier, String separator); static String getBaseUrl(String urlString); static String getHostName(String uriString); static String interpolateConfigsInString(String string);  }