@Test public void canGetPropertyByNameAndMediaType() throws IOException { var propertyService = getServiceWithValidProperties(); var prop1 = propertyService.getProperty("PROP1"); var prop2 = propertyService.getProperty("PROP2"); assertEquals(prop1, propertyService.getProperty("PROP1", MediaType.VIDEO)); assertNull(propertyService.getProperty("PROP1", MediaType.AUDIO)); assertEquals(prop2, propertyService.getProperty("PROP2", MediaType.VIDEO)); assertEquals(prop2, propertyService.getProperty("PROP2", MediaType.AUDIO)); assertNull(propertyService.getProperty("PROP2", MediaType.IMAGE)); }
public WorkflowProperty getProperty(String name, MediaType type) { var property = _indexedByName.get(name.toUpperCase()); return property != null && property.getMediaTypes().contains(type) ? property : null; }
WorkflowPropertyService { public WorkflowProperty getProperty(String name, MediaType type) { var property = _indexedByName.get(name.toUpperCase()); return property != null && property.getMediaTypes().contains(type) ? property : null; } }
WorkflowPropertyService { public WorkflowProperty getProperty(String name, MediaType type) { var property = _indexedByName.get(name.toUpperCase()); return property != null && property.getMediaTypes().contains(type) ? property : null; } @Inject  WorkflowPropertyService(PropertiesUtil propertiesUtil, ObjectMapper objectMapper); }
WorkflowPropertyService { public WorkflowProperty getProperty(String name, MediaType type) { var property = _indexedByName.get(name.toUpperCase()); return property != null && property.getMediaTypes().contains(type) ? property : null; } @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 WorkflowProperty getProperty(String name, MediaType type) { var property = _indexedByName.get(name.toUpperCase()); return property != null && property.getMediaTypes().contains(type) ? property : null; } @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);  }