@Test public void canGetValueOfPropertyWithPropertiesKey() throws IOException { var propertyService = getServiceWithValidProperties(); assertEquals("my property2 value", propertyService.getPropertyValue("PROP2")); assertEquals("my property2 value", propertyService.getPropertyValue("PROP2", MediaType.VIDEO, new SystemPropertiesSnapshot(Map.of()))); assertEquals("my property2 value", propertyService.getPropertyValue("PROP2", MediaType.AUDIO, new SystemPropertiesSnapshot(Map.of()))); assertNull(propertyService.getPropertyValue("PROP2", MediaType.IMAGE, new SystemPropertiesSnapshot(Map.of()))); assertEquals("sys prop val", propertyService.getPropertyValue( "PROP2", MediaType.VIDEO, new SystemPropertiesSnapshot(Map.of("my.property", "sys prop val")))); }
public String getPropertyValue(String propertyName, MediaType mediaType, SystemPropertiesSnapshot propertiesSnapshot) { return getPropertyValue(getProperty(propertyName, mediaType), propertiesSnapshot); }
WorkflowPropertyService { public String getPropertyValue(String propertyName, MediaType mediaType, SystemPropertiesSnapshot propertiesSnapshot) { return getPropertyValue(getProperty(propertyName, mediaType), propertiesSnapshot); } }
WorkflowPropertyService { public String getPropertyValue(String propertyName, MediaType mediaType, SystemPropertiesSnapshot propertiesSnapshot) { return getPropertyValue(getProperty(propertyName, mediaType), propertiesSnapshot); } @Inject  WorkflowPropertyService(PropertiesUtil propertiesUtil, ObjectMapper objectMapper); }
WorkflowPropertyService { public String getPropertyValue(String propertyName, MediaType mediaType, SystemPropertiesSnapshot propertiesSnapshot) { return getPropertyValue(getProperty(propertyName, mediaType), propertiesSnapshot); } @Inject  WorkflowPropertyService(PropertiesUtil propertiesUtil, ObjectMapper objectMapper); ImmutableCollection<WorkflowProperty> getProperties(); ImmutableCollection<WorkflowProperty> getProperties(MediaType mediaType); WorkflowProperty getProperty(String name, MediaType type); WorkflowProperty getProperty(String name); String getPropertyValue(String propertyName, MediaType mediaType,
                                   SystemPropertiesSnapshot propertiesSnapshot); String getPropertyValue(String propertyName); }
WorkflowPropertyService { public String getPropertyValue(String propertyName, MediaType mediaType, SystemPropertiesSnapshot propertiesSnapshot) { return getPropertyValue(getProperty(propertyName, mediaType), propertiesSnapshot); } @Inject  WorkflowPropertyService(PropertiesUtil propertiesUtil, ObjectMapper objectMapper); ImmutableCollection<WorkflowProperty> getProperties(); ImmutableCollection<WorkflowProperty> getProperties(MediaType mediaType); WorkflowProperty getProperty(String name, MediaType type); WorkflowProperty getProperty(String name); String getPropertyValue(String propertyName, MediaType mediaType,
                                   SystemPropertiesSnapshot propertiesSnapshot); String getPropertyValue(String propertyName);  }