Java Code Examples for org.apache.commons.collections.ExtendedProperties#addProperty()
The following examples show how to use
org.apache.commons.collections.ExtendedProperties#addProperty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VelocimacroUtils.java From velocity-spring-boot-project with Apache License 2.0 | 5 votes |
/** * Append Velocimacro Library into {@link Velocity} {@link Properties} * * @param velocityProperties {@link Velocity} {@link Properties} * @param libraryPath the path of Velocimacro 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); }
Example 2
Source File: VelocityHelper.java From PackageTemplates with Apache License 2.0 | 5 votes |
private static VelocityEngine newVelocityEngine() { ExtendedProperties prop = new ExtendedProperties(); prop.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, SimpleLog4JLogSystem.class.getName()); prop.addProperty("runtime.log.logsystem.log4j.category", "GenerateToString"); VelocityEngine velocity = new VelocityEngine(); velocity.setExtendedProperties(prop); velocity.init(); return velocity; }