Examples of ExtendedProperties


Examples of org.apache.commons.collections.ExtendedProperties

     */
    public void addProperty(String key, Object value)
    {
        if (overridingProperties == null)
        {
            overridingProperties = new ExtendedProperties();
        }

        overridingProperties.addProperty(key, value);
    }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

     * @throws Exception When an error occurs during initialization.
     */
    public void init(String configurationFile)
        throws Exception
    {
        setProperties(new ExtendedProperties(configurationFile));
        init();
    }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

    private EventSubject createSubject() {
        return EventSubject.getSubject(this.getClass(), name);
    }

    protected void initWithProperties(Map properties) {
        ExtendedProperties propertiesWrapper = new ExtendedProperties();

        if (properties != null) {
            propertiesWrapper.putAll(properties);
        }

        long snapshotsExpiration = propertiesWrapper.getLong(
                SNAPSHOT_EXPIRATION_PROPERTY,
                SNAPSHOT_EXPIRATION_DEFAULT);

        int snapshotsCacheSize = propertiesWrapper.getInt(
                SNAPSHOT_CACHE_SIZE_PROPERTY,
                SNAPSHOT_CACHE_SIZE_DEFAULT);

        boolean notifyRemote = propertiesWrapper.getBoolean(
                REMOTE_NOTIFICATION_PROPERTY,
                REMOTE_NOTIFICATION_DEFAULT);

        String eventBridgeFactory = propertiesWrapper.getString(
                EVENT_BRIDGE_FACTORY_PROPERTY,
                EVENT_BRIDGE_FACTORY_DEFAULT);

        if (logger.isDebugEnabled()) {
            logger.debug("DataRowStore property "
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

     *
     * @param input the InputStream to read from
     */
    public void read(InputStream input) throws IOException
    {
        ExtendedProperties props = new ExtendedProperties();
        props.load(input);

        // all factory settings should be prefixed with "tools"
        read(props.subset("tools"));
    }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties


    protected void readProperties(ExtendedProperties configProps,
                                  Configuration config)
    {
        ExtendedProperties properties = configProps.subset("property");
        if (properties != null)
        {
            for (Iterator i = properties.getKeys(); i.hasNext(); )
            {
                String name = (String)i.next();
                String value = properties.getString(name);

                ExtendedProperties propProps = properties.subset(name);
                if (propProps.size() == 1)
                {
                    // then set this as a 'simple' property
                    config.setProperty(name, value);
                }
                else
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

        {
            ToolboxConfiguration toolbox = new ToolboxConfiguration();
            toolbox.setScope(scope);
            addToolbox(toolbox);

            ExtendedProperties toolboxProps = factory.subset(scope);
            readTools(toolboxProps, toolbox);
            readProperties(toolboxProps, toolbox);
        }
    }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

            tool.setClassname(classname);
            tool.setKey(key);
            toolbox.addTool(tool);

            // get tool properties prefixed by 'property'
            ExtendedProperties toolProps = tools.subset(key);
            readProperties(toolProps, tool);

            // ok, get tool properties that aren't prefixed by 'property'
            for (Iterator j = toolProps.getKeys(); j.hasNext(); )
            {
                String name = (String)j.next();
                if (!name.equals(tool.getKey()))
                {
                    tool.setProperty(name, toolProps.getString(name));
                }
            }

            // get special props explicitly
            String restrictTo = toolProps.getString("restrictTo");
            tool.setRestrictTo(restrictTo);
        }
    }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

                Data data = new Data();
                data.setKey(key);
                data.setValue(dataset.getString(key));

                // get/set the type/converter properties
                ExtendedProperties props = dataset.subset(key);
                setProperties(props, data);

                addData(data);
            }
        }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

        }

        // this will throw an exception if require is true and there
        // are no properties at the path.  if require is false, this
        // will return null when there's no properties at the path
        ExtendedProperties props = getProperties(path, require);
        if (props == null)
        {
            return false;
        }
View Full Code Here

Examples of org.apache.commons.collections.ExtendedProperties

        if (inputStream == null)
        {
            return null;
        }

        ExtendedProperties properties = new ExtendedProperties();
        try
        {
            properties.load(inputStream);
        }
        catch (IOException ioe)
        {
            String msg = "Failed to load properties at: "+path;
            getLog().error(msg, ioe);
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.