Package org.rhq.core.domain.configuration

Examples of org.rhq.core.domain.configuration.RawConfiguration


        rawConfigMgmt.executeUpdate(resourceId, config);       
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void secondRawShouldStillGetUpdatedWhenFirstRawFailsValidation() throws Exception {
        final RawConfiguration raw1 = createRawConfiguration("/tmp/raw1.txt");
        final RawConfiguration raw2 = createRawConfiguration("/tmp/raw2.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw1);
        config.addRawConfiguration(raw2);
View Full Code Here


        rawConfigMgmt.executeUpdate(resourceId, config);
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void secondRawShouldStillGetUpdateWhenFirstRawUpdateFails() throws Exception {
        final RawConfiguration raw1 = createRawConfiguration("/tmp/raw1.txt");
        final RawConfiguration raw2 = createRawConfiguration("/tmp/raw2.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw1);
        config.addRawConfiguration(raw2);
View Full Code Here

        rawConfigMgmt.executeUpdate(resourceId, config);
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void noUpdatesShouldHappenWhenValidationFailsForBothRaws() throws Exception {
        final RawConfiguration raw1 = createRawConfiguration("/tmp/raw1.txt");
        final RawConfiguration raw2 = createRawConfiguration("/tmp/raw2.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw1);
        config.addRawConfiguration(raw2);
View Full Code Here

        }});
    }

    @Test
    public void facetShouldBeCalledToUpdateStructuredAndRaw() throws Exception {
        final RawConfiguration raw1 = createRawConfiguration("/tmp/raw1.txt");
        final RawConfiguration raw2 = createRawConfiguration("/tmp/raw2.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw1);
        config.addRawConfiguration(raw2);
View Full Code Here

        structuredAndRawConfigManagement.executeUpdate(resourceId, config);
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void exceptionShouldBeThrownWhenStructuredValidationFails() throws Exception {
        final RawConfiguration raw = createRawConfiguration("/tmp/raw.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw);

        addDefaultExpectationsForUpdate();
View Full Code Here

        structuredAndRawConfigManagement.executeUpdate(resourceId, config);
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void exceptionShouldBeThrownWhenStructuredUpdateFails() throws Exception {
        final RawConfiguration raw = createRawConfiguration("/tmp/raw.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw);

        addDefaultExpectationsForUpdate();
View Full Code Here

        structuredAndRawConfigManagement.executeUpdate(resourceId, config);
    }

    @Test(expectedExceptions = {ConfigurationUpdateException.class})
    public void structuredAndSecondRawShouldStillGetUpdatedWhenFirstRawValidationFails() throws Exception {
        final RawConfiguration raw1 = createRawConfiguration("/tmp/raw1.txt");
        final RawConfiguration raw2 = createRawConfiguration("/tmp/raw2.txt");

        final Configuration config = new Configuration();
        config.addRawConfiguration(raw1);
        config.addRawConfiguration(raw2);
View Full Code Here

    private void updateModifiedCache() {
        Configuration configuration = getConfiguration();

        for (RawConfiguration updatedRaw : configuration.getRawConfigurations()) {
            RawConfiguration cachedRaw = modified.get(updatedRaw.getPath());
            if (cachedRaw != null && !updatedRaw.getSha256().equals(cachedRaw.getSha256())) {
                modified.remove(cachedRaw.getPath());
            }
        }
    }
View Full Code Here

        getConfiguration().getRawConfigurations().addAll(getRaws().values());
        return getConfiguration();
    }

    public String editCurrent() {
        RawConfiguration editedRaw = getCurrent();
        RawConfiguration originalRaw = raws.get(editedRaw.getPath());

        if (editedRaw.getSha256().equals(originalRaw.getSha256())) {
            --numberOfModifiedFiles;
            RawConfigUIBean rawUIBean = findRawConfigUIBeanByPath(editedRaw.getPath());
            //            rawUIBean.setModified(false);
            getModified().remove(editedRaw.getPath());
        } else {
View Full Code Here

        if (null == current) {
            Iterator<RawConfiguration> iterator = getRaws().values().iterator();
            if (iterator.hasNext()) {
                current = iterator.next();
            } else {
                current = new RawConfiguration();
                current.setPath("/dev/null");
                String sha256 = new MessageDigestGenerator(MessageDigestGenerator.SHA_256).calcDigestString("");
                current.setContents("", sha256);
            }
        }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.RawConfiguration

Copyright © 2018 www.massapicom. 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.