@Test public void testAppendVelocimacroLibrary() { Map<String, String> velocityProperties = new HashMap<>(); List<String> librariesList = Arrays.asList("/macros/main.vm", "/macros/index.vm"); for (String library : librariesList) { VelocimacroUtils.appendVelocimacroLibrary(velocityProperties, library); } String vmLibrary = StringUtils.collectionToCommaDelimitedString(librariesList); Assert.assertEquals(vmLibrary, velocityProperties.get(RuntimeConstants.VM_LIBRARY)); }
public static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath) { String propertyName = RuntimeConstants.VM_LIBRARY; ExtendedProperties extendedProperties = toSingletonExtendedProperties(velocityProperties, propertyName); extendedProperties.addProperty(propertyName, libraryPath); List<String> listValue = extendedProperties.getList(propertyName); String propertyValue = StringUtils.collectionToCommaDelimitedString(listValue); velocityProperties.put(propertyName, propertyValue); }
VelocimacroUtils { public static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath) { String propertyName = RuntimeConstants.VM_LIBRARY; ExtendedProperties extendedProperties = toSingletonExtendedProperties(velocityProperties, propertyName); extendedProperties.addProperty(propertyName, libraryPath); List<String> listValue = extendedProperties.getList(propertyName); String propertyValue = StringUtils.collectionToCommaDelimitedString(listValue); velocityProperties.put(propertyName, propertyValue); } }
VelocimacroUtils { public static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath) { String propertyName = RuntimeConstants.VM_LIBRARY; ExtendedProperties extendedProperties = toSingletonExtendedProperties(velocityProperties, propertyName); extendedProperties.addProperty(propertyName, libraryPath); List<String> listValue = extendedProperties.getList(propertyName); String propertyValue = StringUtils.collectionToCommaDelimitedString(listValue); velocityProperties.put(propertyName, propertyValue); }  }
VelocimacroUtils { public static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath) { String propertyName = RuntimeConstants.VM_LIBRARY; ExtendedProperties extendedProperties = toSingletonExtendedProperties(velocityProperties, propertyName); extendedProperties.addProperty(propertyName, libraryPath); List<String> listValue = extendedProperties.getList(propertyName); String propertyValue = StringUtils.collectionToCommaDelimitedString(listValue); velocityProperties.put(propertyName, propertyValue); }  static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath); }
VelocimacroUtils { public static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath) { String propertyName = RuntimeConstants.VM_LIBRARY; ExtendedProperties extendedProperties = toSingletonExtendedProperties(velocityProperties, propertyName); extendedProperties.addProperty(propertyName, libraryPath); List<String> listValue = extendedProperties.getList(propertyName); String propertyValue = StringUtils.collectionToCommaDelimitedString(listValue); velocityProperties.put(propertyName, propertyValue); }  static void appendVelocimacroLibrary(Map<String, String> velocityProperties, String libraryPath);  }