@Override public synchronized void init() { super.init(); interpolationHack = getConfiguration().getBoolean(INTERPOLATION_HACK_KEY, INTERPOLATION_HACK_DEFAULT); }
@Override public synchronized void init() { super.init(); interpolationHack = getConfiguration().getBoolean(INTERPOLATION_HACK_KEY, INTERPOLATION_HACK_DEFAULT); }
@Inject public VelocityViewFactory(Argo argo) { String viewFolder = viewFolderPath(argo); Properties ps = new Properties(); ps.setProperty("resource.loader", "file"); ps.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader"); ps.setProperty("file.resource.loader.path", viewFolder); ps.setProperty("file.resource.loader.cache", "false"); ps.setProperty("file.resource.loader.modificationCheckInterval", "2"); ps.setProperty("input.encoding", "UTF-8"); ps.setProperty("output.encoding", "UTF-8"); ps.setProperty("default.contentType", "text/html; charset=UTF-8"); ps.setProperty("velocimarco.library.autoreload", "true"); ps.setProperty("runtime.log.error.stacktrace", "false"); ps.setProperty("runtime.log.warn.stacktrace", "false"); ps.setProperty("runtime.log.info.stacktrace", "false"); ps.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); ps.setProperty("runtime.log.logsystem.log4j.category", "velocity_log"); rtInstance = new RuntimeInstance(); try { rtInstance.init(ps); } catch (Exception e) { throw ArgoException.raise(e); } }
/** * Initialize the Velocity Runtime with the name of * ExtendedProperties object. * * @param configurationFile * @see RuntimeInstance#init(String) */ public static void init(String configurationFile) { ri.init( configurationFile ); }
/** * initialize the Velocity runtime engine, using default properties * plus the properties in the passed in java.util.Properties object * * @param p Properties object containing initialization properties */ public void init(Properties p) { ri.init(p); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param p * @see RuntimeInstance#init(Properties) */ public static void init(Properties p) { ri.init(p); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param Properties */ public static void init(Properties p) throws Exception { ri.init(p); }
/** * initialize the Velocity runtime engine, using default properties * plus the properties in the passed in java.util.Properties object * * @param p Proprties object containing initialization properties * */ public void init( Properties p ) throws Exception { ri.init( p ); }
/** * initialize the Velocity runtime engine, using default properties * plus the properties in the passed in java.util.Properties object * * @param p Proprties object containing initialization properties */ public void init(Properties p) { ri.init(p); }
/** * Initialize the Velocity Runtime with the name of * a properties file. * * @param configurationFile * @see RuntimeInstance#init(String) */ public static void init(String configurationFile) { ri.init( configurationFile ); }
/** * initialize the Velocity runtime engine, using default properties * plus the properties in the properties file passed in as the arg * * @param propsFilename file containing properties to use to initialize * the Velocity runtime */ public void init( String propsFilename ) throws Exception { ri.init(propsFilename); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param p * @throws Exception When an error occurs during initialization. * @see RuntimeInstance#init(Properties) */ public static void init(Properties p) throws Exception { ri.init(p); }
/** * initialize the Velocity runtime engine, using the default * properties of the Velocity distribution */ public void init() { ri.init(); }
/** * initialize the Velocity runtime engine, using default properties * plus the properties in the properties file passed in as the arg * * @param propsFilename file containing properties to use to initialize * the Velocity runtime */ public void init(String propsFilename) { ri.init(propsFilename); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param Properties */ public void init(Properties p) throws Exception { overridingProperties = ExtendedProperties.convertProperties(p); init(); }
/** * Initialize the Velocity Runtime with the name of * ExtendedProperties object. * * @param Properties */ public void init(String configurationFile) throws Exception { overridingProperties = new ExtendedProperties(configurationFile); init(); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param p * @throws Exception When an error occurs during initialization. */ public void init(Properties p) throws Exception { setProperties(ExtendedProperties.convertProperties(p)); init(); }
/** * Initialize the Velocity Runtime with a Properties * object. * * @param p Velocity properties for initialization */ public void init(Properties p) { setConfiguration(ExtProperties.convertProperties(p)); init(); }
@Override public synchronized void init() { super.init(); interpolationHack = getConfiguration().getBoolean(INTERPOLATION_HACK_KEY, INTERPOLATION_HACK_DEFAULT); }
RuntimeInstance runtimeInstance = new RuntimeInstance(); runtimeInstance.init(); SimpleNode simpleNode = runtimeInstance.parse(reader, "nameOfYourTemplateResource"); Template template = new Template(); simpleNode.init(new InternalContextAdapterImpl(new VelocityContext()), runtimeInstance); template.setData(simpleNode); template.merge(...); ...