Package java.util

Examples of java.util.Properties.clear()


        FileOutputStream outputStream = new FileOutputStream(file0);
        props.store(outputStream, "zero file");
        outputStream.close();

        File file1 = new File(this.bundleFilesDir, "one.properties");
        props.clear();
        props.setProperty("one", "1");
        outputStream = new FileOutputStream(file1);
        props.store(outputStream, "one file");
        outputStream.close();
View Full Code Here


        outputStream = new FileOutputStream(file1);
        props.store(outputStream, "one file");
        outputStream.close();

        File file2 = new File(this.bundleFilesDir, "two.properties");
        props.clear();
        props.setProperty("two", "2");
        outputStream = new FileOutputStream(file2);
        props.store(outputStream, "two file");
        outputStream.close();
View Full Code Here

        outputStream.close();

        // create some external test files that don't belong to the bundle but are in the dest dir (which is to be managed by the bundle)
        this.destDir.mkdirs();
        File external1 = new File(this.destDir, "external1.properties");
        props.clear();
        props.setProperty("external1", "1");
        outputStream = new FileOutputStream(external1);
        props.store(outputStream, "external1 file");
        outputStream.close();
View Full Code Here

        props.store(outputStream, "external1 file");
        outputStream.close();

        File external2 = new File(this.destDir, "extdir/external2.properties");
        external2.getParentFile().mkdirs();
        props.clear();
        props.setProperty("external2", "2");
        outputStream = new FileOutputStream(external2);
        props.store(outputStream, "external2 file");
        outputStream.close();
View Full Code Here

        BundleDeployResult results = plugin.deployBundle(request);

        assertResultsSuccess(results);

        // test that files were deployed in the proper place
        props.clear();
        loadProperties(props, new FileInputStream(new File(this.destDir, "zero.properties")));
        assert "0".equals(props.getProperty("zero")) : "did not deploy bundle correctly 0";
        loadProperties(props, new FileInputStream(new File(this.destDir, "subdir1/one.properties")));
        assert "1".equals(props.getProperty("one")) : "did not deploy bundle correctly 1";
        loadProperties(props, new FileInputStream(new File(this.destDir, "subdir2/two.properties")));
View Full Code Here

        assert metadata.isManaged() == true : "missing metadata directory";
        assert metadata.getCurrentDeploymentProperties().getManageRootDir() == true : "should be managing root dir";

        // make sure our external files/directories were removed because
        // they aren't part of the bundle and we are fully managing the dest dir
        props.clear();
        try {
            loadProperties(props, new FileInputStream(new File(this.destDir, "external1.properties")));
            assert false : "bundle deployment did not remove our managed file 1";
        } catch (Exception ok) {
        }
View Full Code Here

        Assert.assertEquals("uname", command.getUsername());
        Assert.assertEquals(false, command.isVerbose());
       
       
        // set empty props
        props.clear();
        command.setProperties(props);
        command.overrideValues();
       
        // test properties with overridden values
        Assert.assertNull(props.get(DEPLOY_DFM_CLASSNAME_PROP_KEY));
View Full Code Here

                List<String> managed = configFactory.getResourceIds("DataSource", required);

                required.put("JtaManaged", "false");
                List<String> unmanaged = configFactory.getResourceIds("DataSource", required);

                required.clear();
                List<String> unknown = configFactory.getResourceIds("DataSource", required);

                logger.debug("Available DataSources");
                for (String name : managed) {
                    logger.debug("DataSource(name=" + name + ", JtaManaged=true)");
View Full Code Here

                    required.put("JtaManaged", "true");
                    jtaDataSourceId = findResourceId(id, "DataSource", required, null);

                    if (jtaDataSourceId == null) {
                        //No jta managed data source found. Try finding a non-jta managed
                        required.clear();
                        required.put("JtaManaged", "false");
                        nonJtaDataSourceId = findResourceId(id, "DataSource", required, null);
                    }
                   
                    if (jtaDataSourceId == null && nonJtaDataSourceId == null) {
View Full Code Here

                        nonJtaDataSourceId = findResourceId(id, "DataSource", required, null);
                    }
                   
                    if (jtaDataSourceId == null && nonJtaDataSourceId == null) {
                        // Neither jta nor non-jta managed data sources were found. try to find one with it unset
                        required.clear();
                        required.put("JtaManaged", NONE);
                        jtaDataSourceId = findResourceId(id, "DataSource", required, null);
                    }
                   
                    if (jtaDataSourceId != null || nonJtaDataSourceId != null) {
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.