@Test public void testProcessEngineConfigurationProperties() { ProcessEngineConfiguration engineConfiguration = new StandaloneProcessEngineConfiguration(); Map<String, String> propertiesToSet = new HashMap<String, String>(); propertiesToSet.put(JOB_EXECUTOR_DEPLOYMENT_AWARE_PROP, "true"); propertiesToSet.put(JOB_EXECUTOR_PREFER_TIMER_JOBS, "true"); propertiesToSet.put(JOB_EXECUTOR_ACQUIRE_BY_DUE_DATE, "true"); propertiesToSet.put(MAIL_SERVER_PORT_PROP, "42"); propertiesToSet.put(JDBC_URL_PROP, "someUrl"); PropertyHelper.applyProperties(engineConfiguration, propertiesToSet); Assert.assertTrue(engineConfiguration.isJobExecutorDeploymentAware()); Assert.assertTrue(engineConfiguration.isJobExecutorPreferTimerJobs()); Assert.assertTrue(engineConfiguration.isJobExecutorAcquireByDueDate()); Assert.assertEquals(42, engineConfiguration.getMailServerPort()); Assert.assertEquals("someUrl", engineConfiguration.getJdbcUrl()); }
public static void applyProperties(Object configuration, Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { applyProperty(configuration, property.getKey(), property.getValue()); } }
PropertyHelper { public static void applyProperties(Object configuration, Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { applyProperty(configuration, property.getKey(), property.getValue()); } } }
PropertyHelper { public static void applyProperties(Object configuration, Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { applyProperty(configuration, property.getKey(), property.getValue()); } }  }
PropertyHelper { public static void applyProperties(Object configuration, Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { applyProperty(configuration, property.getKey(), property.getValue()); } }  static boolean getBooleanProperty(Map<String, String> properties, String name, boolean defaultValue); static Object convertToClass(String value, Class<?> clazz); static void applyProperty(Object configuration, String key, String stringValue); static void applyProperties(Object configuration, Map<String, String> properties); static String resolveProperty(Properties props, String original); }
PropertyHelper { public static void applyProperties(Object configuration, Map<String, String> properties) { for (Map.Entry<String, String> property : properties.entrySet()) { applyProperty(configuration, property.getKey(), property.getValue()); } }  static boolean getBooleanProperty(Map<String, String> properties, String name, boolean defaultValue); static Object convertToClass(String value, Class<?> clazz); static void applyProperty(Object configuration, String key, String stringValue); static void applyProperties(Object configuration, Map<String, String> properties); static String resolveProperty(Properties props, String original);  }