Package org.rhq.core.domain.configuration

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


        writeFile(logDir, "second.log", "log 2 file");
        writeFile(configDir, "not.a.config.file.txt", "this is not a config file");
        writeFile(logDir, "not.a.log.file.txt", "this is not a log file");

        Configuration config = new Configuration();
        config.put(new PropertySimple(SnapshotReport.PROP_BASE_DIRECTORY, baseDir.getAbsolutePath()));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_CONFIG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_LOG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_DIRECTORY, configDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_DIRECTORY, logDir.getName())); // relative path
        //config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_REGEX, ".*\\.config"));
        //config.put(new PropertySimple(SnapshotReport.PROP_LOG_REGEX, ".*\\.log"));

        SnapshotReport report = new SnapshotReport("test-snapshot", "some desc", config);
        File snapshot = report.generate();
View Full Code Here


        writeFile(logDir, "second.log", "log 2 file");
        writeFile(configDir, "not.a.config.file.txt", "this is not a config file");
        writeFile(logDir, "not.a.log.file.txt", "this is not a log file");

        Configuration config = new Configuration();
        config.put(new PropertySimple(SnapshotReport.PROP_BASE_DIRECTORY, baseDir.getAbsolutePath()));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_CONFIG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_LOG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_DIRECTORY, configDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_DIRECTORY, logDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_REGEX, ".*\\.config"));
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_REGEX, ".*\\.log"));

        SnapshotReport report = new SnapshotReport("test-snapshot", "some desc", config);
        File snapshot = report.generate();
        try {
            FileInputStream fis = new FileInputStream(snapshot);
View Full Code Here

        writeFile(logDir, "second.log", "log 2 file");
        writeFile(configDir, "not.a.config.file.txt", "this is not a config file");
        writeFile(logDir, "not.a.log.file.txt", "this is not a log file");

        Configuration config = new Configuration();
        config.put(new PropertySimple(SnapshotReport.PROP_BASE_DIRECTORY, baseDir.getAbsolutePath()));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_CONFIG_FILES, "false"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_LOG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_DIRECTORY, configDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_DIRECTORY, logDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_REGEX, ".*\\.config"));
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_REGEX, ".*\\.log"));

        SnapshotReport report = new SnapshotReport("test-snapshot", "some desc", config);
        File snapshot = report.generate();
        try {
            FileInputStream fis = new FileInputStream(snapshot);
View Full Code Here

        writeFile(logDir, "second.log", "log 2 file");
        writeFile(configDir, "not.a.config.file.txt", "this is not a config file");
        writeFile(logDir, "not.a.log.file.txt", "this is not a log file");

        Configuration config = new Configuration();
        config.put(new PropertySimple(SnapshotReport.PROP_BASE_DIRECTORY, baseDir.getAbsolutePath()));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_CONFIG_FILES, "false"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_LOG_FILES, "false"));
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_DIRECTORY, configDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_DIRECTORY, logDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_REGEX, ".*\\.config"));
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_REGEX, ".*\\.log"));

        SnapshotReport report = new SnapshotReport("test-snapshot", "some desc", config);
        File snapshot = report.generate();
        try {
            FileInputStream fis = new FileInputStream(snapshot);
View Full Code Here

        writeFile(additionalDir2, "adddir2-custom-file1.txt", "2. custom file #1");
        writeFile(additionalDir2, "adddir2-custom-file2.txt", "2. custom file #2");
        writeFile(additionalDir2, "adddir2-custom-file3.xml", "2. custom file #3 XML");

        Configuration config = new Configuration();
        config.put(new PropertySimple(SnapshotReport.PROP_BASE_DIRECTORY, baseDir.getAbsolutePath()));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_CONFIG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_LOG_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_ADDITIONAL_FILES, "true"));
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_DIRECTORY, configDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_DIRECTORY, logDir.getName())); // relative path
        config.put(new PropertySimple(SnapshotReport.PROP_CONFIG_REGEX, ".*\\.config"));
        config.put(new PropertySimple(SnapshotReport.PROP_LOG_REGEX, ".*\\.log"));

        String dir1 = additionalDir1.getName();
        String dir2 = additionalDir2.getName();

        PropertyList additionalList = new PropertyList(SnapshotReport.PROP_ADDITIONAL_FILES_LIST);
        PropertyMap additionalFiles1 = new PropertyMap("map");
        PropertyMap additionalFiles2 = new PropertyMap("map");
        PropertyMap additionalFiles3 = new PropertyMap("map");
        PropertyMap additionalFiles4 = new PropertyMap("map");
        additionalFiles1.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_DIRECTORY, dir1));
        additionalFiles1.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_REGEX, ".*\\.txt"));
        additionalFiles1.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_ADDITIONAL_FILES, "true"));
        additionalFiles2.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_DIRECTORY, dir2));
        additionalFiles2.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_REGEX, ".*\\.txt"));
        //additionalFiles2.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_ADDITIONAL_FILES, "true")); // default should be true
        additionalFiles3.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_DIRECTORY, dir1));
        additionalFiles3.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_REGEX, ".*\\.xml"));
        additionalFiles3.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_ADDITIONAL_FILES, "true"));
        additionalFiles4.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_DIRECTORY, dir2));
        additionalFiles4.put(new PropertySimple(SnapshotReport.PROP_ADDITIONAL_FILES_REGEX, ".*\\.xml"));
        additionalFiles4.put(new PropertySimple(SnapshotReport.PROP_SNAPSHOT_ADDITIONAL_FILES, "false"));

        config.put(additionalList);
        additionalList.add(additionalFiles1);
        additionalList.add(additionalFiles2);
        additionalList.add(additionalFiles3);
View Full Code Here

        result = new OperationResult();
        result.getComplexResults().setId(111);
        result.getComplexResults().setVersion(222);
        result.getComplexResults().setNotes("my notes");
        result.getComplexResults().put(new PropertySimple("foo", "bar"));
        result.getComplexResults().put(new PropertyMap("foo", new PropertySimple("a", "b")));
        result.getComplexResults().put(new PropertyList("foo", new PropertySimple("c", "d")));
        Configuration config = result.getComplexResults().deepCopy();

        assert config != null;
        assert config != result.getComplexResults();
        assert config.equals(result.getComplexResults());
View Full Code Here

                    if (!(property instanceof PropertySimple)) {
                        throw new IllegalStateException("Open map " + this.propertyMap
                            + " contains non-simple property: " + property);
                    }

                    PropertySimple propertySimple = (PropertySimple) property;

                    // NOTE: Row colors never alternate for maps.
                    addOpenMapMemberProperty(rootPanel, propertyDefinitionMap, propertySimple, rowStyleClass);
                }
View Full Code Here

                                    String rowStyleClass) {
        addDebug(parent, true, ".addDynamicProperty()");

        FacesComponentUtility.addVerbatimText(parent, "\n\n<tr class='" + rowStyleClass + "'>");

        PropertySimple propertySimple = this.propertyMap.getSimple(propertyDefinitionDynamic.getName());
        ValueExpression propertyValueExpression = createPropertyValueExpression(propertySimple.getName(),
            this.valueExpressionFormat);

        UIInput input = null;
        if (!this.isGroup || (propertySimple.getOverride() != null && propertySimple.getOverride())) {
            // We need to create the input component ahead of when we need to add it to the component tree, since we
            // need to know the input component's id in order to render the unset control.
            input = PropertyRenderingUtility.createInputForDynamicProperty(propertyDefinitionDynamic, propertySimple,
                propertyValueExpression, getListIndex(), this.isGroup, this.config.isReadOnly(), this.config
                    .isFullyEditable(), this.config.isPrevalidate());
View Full Code Here

        String rowStyleClass, TemplateEngine templateEngine) {
        addDebug(parent, true, ".addSimpleProperty()");

        FacesComponentUtility.addVerbatimText(parent, "\n\n<tr class='" + rowStyleClass + "'>");

        PropertySimple propertySimple = this.propertyMap.getSimple(propertyDefinitionSimple.getName());
        ValueExpression propertyValueExpression = createPropertyValueExpression(propertySimple.getName(),
            this.valueExpressionFormat);

        UIInput input = null;
        if (!this.isGroup || (propertySimple.getOverride() != null && propertySimple.getOverride()))
            // We need to create the input component ahead of when we need to add it to the component tree, since we
            // need to know the input component's id in order to render the unset control.
            input = PropertyRenderingUtility.createInputForSimpleProperty(propertyDefinitionSimple, propertySimple,
                propertyValueExpression, getListIndex(), this.isGroup, this.config.isReadOnly(), this.config
                    .isFullyEditable(), this.config.isPrevalidate(), templateEngine);
View Full Code Here

            if (!(mapMemberProperty instanceof PropertySimple)) {
                throw new IllegalStateException("Property '" + mapMemberProperty.getName()
                    + "' is defined as a map of simples but contains one or more non-simple members.");
            }

            PropertySimple mapMemberSimpleProperty = (PropertySimple) mapMemberProperty;
            FacesComponentUtility.addVerbatimText(parent, "<td class='" + PROPERTY_MAP_SUMMARY_DATA_CELL_STYLE_CLASS
                + "'>");
            if (mapMemberSimpleProperty.getStringValue() == null) {
                FacesComponentUtility.addOutputText(parent, this.config, "not set",
                    CssStyleClasses.REQUIRED_MARKER_TEXT);
            } else {
                FacesComponentUtility.addOutputText(parent, this.config, mapMemberSimpleProperty.getStringValue(),
                    PROPERTY_MAP_SUMMARY_DATA_TEXT_STYLE_CLASS);
            }

            FacesComponentUtility.addVerbatimText(parent, "</td>\n");
        }
View Full Code Here

TOP

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

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.