@Test public void testToSingletonExtendedProperties() { Map<String, String> velocityProperties = new HashMap<>(); List<String> pathsList = Arrays.asList("/macros/main.vm", "/macros/index.vm"); String vmLibrary = StringUtils.collectionToCommaDelimitedString(pathsList); String propertyName = RuntimeConstants.VM_LIBRARY; velocityProperties.put(propertyName, vmLibrary); ExtendedProperties extendedProperties = VelocimacroUtils.toSingletonExtendedProperties(velocityProperties, propertyName); Assert.assertEquals(pathsList, extendedProperties.getList(propertyName)); }
protected static ExtendedProperties toSingletonExtendedProperties(Map<String, String> velocityProperties, String propertyName) { String library = velocityProperties.get(propertyName); ExtendedProperties extendedProperties = new ExtendedProperties(); if (StringUtils.hasText(library)) { extendedProperties.setProperty(propertyName, library); } return extendedProperties; }
VelocimacroUtils { protected static ExtendedProperties toSingletonExtendedProperties(Map<String, String> velocityProperties, String propertyName) { String library = velocityProperties.get(propertyName); ExtendedProperties extendedProperties = new ExtendedProperties(); if (StringUtils.hasText(library)) { extendedProperties.setProperty(propertyName, library); } return extendedProperties; } }
VelocimacroUtils { protected static ExtendedProperties toSingletonExtendedProperties(Map<String, String> velocityProperties, String propertyName) { String library = velocityProperties.get(propertyName); ExtendedProperties extendedProperties = new ExtendedProperties(); if (StringUtils.hasText(library)) { extendedProperties.setProperty(propertyName, library); } return extendedProperties; }  }
VelocimacroUtils { protected static ExtendedProperties toSingletonExtendedProperties(Map<String, String> velocityProperties, String propertyName) { String library = velocityProperties.get(propertyName); ExtendedProperties extendedProperties = new ExtendedProperties(); if (StringUtils.hasText(library)) { extendedProperties.setProperty(propertyName, library); } return extendedProperties; }  static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath); }
VelocimacroUtils { protected static ExtendedProperties toSingletonExtendedProperties(Map<String, String> velocityProperties, String propertyName) { String library = velocityProperties.get(propertyName); ExtendedProperties extendedProperties = new ExtendedProperties(); if (StringUtils.hasText(library)) { extendedProperties.setProperty(propertyName, library); } return extendedProperties; }  static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath);  }