Examples of deepCopy()


Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

                configuration = notifConfig.deepCopy(true);
            } else {
                configuration = new Configuration(); // must not be null
            }
            if (notifExtraConfig != null) {
                extraConfiguration = notifExtraConfig.deepCopy(true);
            } else {
                extraConfiguration = null; // allowed to be null
            }
        } else {
            configuration = new Configuration();
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

                                parametersDefinition).isEmpty()) {
                                Message message = new Message(
                                    MSG.view_operationScheduleDetails_example_parameters_invalid(), Severity.Warning);
                                CoreGUI.getMessageCenter().notify(message);
                            } else {
                                operationParameters = exampleParameters.deepCopy(false);
                                break;
                            }
                        }
                    default:
                        operationParameters = (defaultTemplate != null) ? defaultTemplate.createConfiguration()
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

        Configuration config = subjectPreferences.get(subjectId);
        if (config == null) {
            return new Configuration();
        } else {
            return config.deepCopy();
        }
    }

    @Override
    @Lock(LockType.WRITE)
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

    @Test(dependsOnMethods = { "testDatasourceLoadConfiguration" })
    public void changingMaxPoolSizeShouldNotRequireDisablingTheDatasourceNorReloadingServer() throws Exception {
        Configuration configuration = pluginContainer.getConfigurationManager().loadResourceConfiguration(
            datasourceTestResource.getId());
        // Make a working copy
        configuration = configuration.deepCopy(false);
        // Change value
        PropertySimple propertySimple = configuration.getSimple("max-pool-size");
        Long currentMaxPoolSize = propertySimple.getLongValue();
        long newMaxPoolSize = currentMaxPoolSize == null ? 40 : currentMaxPoolSize + 1;
        propertySimple.setStringValue(String.valueOf(newMaxPoolSize));
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

        Configuration pluginConfig = upgradeContext.getPluginConfiguration();

        String quotingEnabledNeedsUpgrade = pluginConfig.getSimpleValue(QUOTING_ENABLED_NEEDS_UPGRADE);
        if (!FALSE.toString().equals(quotingEnabledNeedsUpgrade)) {

            pluginConfig = pluginConfig.deepCopy(false);

            Boolean quotingEnabled = Boolean.valueOf(pluginConfig.getSimpleValue(PLUGINCONFIG_QUOTING_ENABLED));
            pluginConfig.setSimpleValue(PLUGINCONFIG_QUOTING_ENABLED, quotingEnabled.toString());
            pluginConfig.setSimpleValue(QUOTING_ENABLED_NEEDS_UPGRADE, FALSE.toString());
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

        // Then update properties which can only be changed when datasource is in disabled state
        Configuration configuration = pluginContainer.getConfigurationManager().loadResourceConfiguration(
            datasourceTestResource.getId());
        assertFalse(Boolean.parseBoolean(configuration.getSimpleValue("enabled")), "");
        // Make a working copy
        configuration = configuration.deepCopy(false);
        // Change values
        PropertySimple propertySimple = configuration.getSimple("prepared-statements-cache-size");
        Long currentCacheSize = propertySimple.getLongValue();
        long newCacheSize = currentCacheSize == null ? 40 : currentCacheSize + 1;
        propertySimple.setStringValue(String.valueOf(newCacheSize));
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

        File xmlFile = getDSXmlFile(dsXmlFile);

        Configuration config = DatasourceConfigurationEditor.loadDatasource(xmlFile, datasourceName);
        assertLoadingOfConfiguration(config, datasourceName, testName);

        config = this.createConfiguration(config.deepCopy(), datasourceName);
        PropertySimple property = config.getSimple("max-pool-size");
        property.setIntegerValue(100);

        ConfigurationUpdateReport report = new ConfigurationUpdateReport(config);
View Full Code Here

Examples of org.rhq.core.domain.configuration.Configuration.deepCopy()

        }
    }

    private Configuration createDatabaseSpecificConfig() {
        Configuration config = postgresServerComponent.getResourceContext().getPluginConfiguration();
        config = config.deepCopy();
        config.put(new PropertySimple("db", databaseName));
        if (LOG.isDebugEnabled()) {
            LOG.debug("Getting db specific connection to postgres for [" + databaseName + "] database");
        }
        return config;
View Full Code Here

Examples of org.rhq.core.domain.configuration.Property.deepCopy()

                    } else {
                        // we only pull the configuration when an update is needed. The getProperties call
                        // just ensures the lazy load happens.
                        Configuration pluginConfiguration = resource.getPluginConfiguration();
                        int numberOfProperties = pluginConfiguration.getProperties().size();
                        pluginConfiguration.put(templateProperty.deepCopy(false));
                        modified = true;
                    }
                }
            }
View Full Code Here

Examples of org.rhq.core.domain.configuration.Property.deepCopy()

                    Configuration pluginConfiguration = resource.getPluginConfiguration();
                    int numberOfProperties = pluginConfiguration.getProperties().size();
                    String propertyValue = pluginConfiguration.getSimpleValue(propertyDef.getName(), null);
                    if (propertyValue == null) {
                        Property templateProperty = templateConfiguration.get(propertyDef.getName());
                        pluginConfiguration.put(templateProperty.deepCopy(false));
                        modified = true;
                    }
                }
            }
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.