Package org.apache.commons.collections

Examples of org.apache.commons.collections.ExtendedProperties.addProperty()


                    log.debug("Result (normal fs reference): " + path);
                }

                log.debug("Adding " + key + " -> " + path);
                // Re-Add this property to the configuration object
                veloConfig.addProperty(key, path);
            }
        }
        return veloConfig;
    }
View Full Code Here


                    for (Iterator it = srcValue.iterator(); it.hasNext(); )
                    {
                        targetValue.add(it.next());
                    }

                    veloConfig.addProperty(key, targetValue);
                }
                else
                {
                    veloConfig.addProperty(key, value);
                }
View Full Code Here

                    veloConfig.addProperty(key, targetValue);
                }
                else
                {
                    veloConfig.addProperty(key, value);
                }

                continue; // for()
            }
View Full Code Here

                    log.debug("Result (normal fs reference): " + path);
                }

                log.debug("Adding " + key + " -> " + path);
                // Re-Add this property to the configuration object
                veloConfig.addProperty(key, path);
            }
        }
        return veloConfig;
    }
View Full Code Here

        // Try reading an overriding Velocity configuration
        try
        {
            ExtendedProperties p = loadConfiguration(config);
            p.addProperty("velocimacro.library", "/WEB-INF/jetspeed_macros.vm");
            p.setProperty("file.resource.loader.path", getServletContext().getRealPath("/"));
            velocity.setExtendedProperties(p);
        }
        catch(Exception e)
        {
View Full Code Here

            velocity.setApplicationAttribute(SERVLET_CONTEXT_KEY, getServletContext());
            velocity.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.tools.view.servlet.ServletLogger");
            ExtendedProperties configuration = loadConfiguration(getServletConfig());
            if (macros != null)
            {
                configuration.addProperty("velocimacro.library", macros.getAppRelativePath());
            }
            configuration.setProperty("file.resource.loader.path", getServletContext().getRealPath("/"));
            velocity.setExtendedProperties(configuration);

            // initialize and return velocity engine
View Full Code Here

            {
                Object value = conf.getProperty(key);
                if (value instanceof List) {
                    for (Iterator itr = ((List)value).iterator(); itr.hasNext();)
                    {
                        veloConfig.addProperty(key, itr.next());
                    }
                }
                else
                {
                    veloConfig.addProperty(key, value);
View Full Code Here

                        veloConfig.addProperty(key, itr.next());
                    }
                }
                else
                {
                    veloConfig.addProperty(key, value);
                }
                continue; // for()
            }

            List paths = conf.getList(key, null);
View Full Code Here

                    log.debug("Result (normal fs reference): " + path);
                }

                log.debug("Adding " + key + " -> " + path);
                // Re-Add this property to the configuration object
                veloConfig.addProperty(key, path);
            }
        }
        return veloConfig;
    }
View Full Code Here

                    BufferedInputStream stream = new BufferedInputStream(new FileInputStream(propFile));
                    p.load(stream);
                    stream.close();
                }

                p.addProperty(PATH_PROP, f.getAbsolutePath());
               
                if (p.containsKey("name")) {
                    name = p.getString("name");
                }
               
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.