Package org.rhq.core.domain.util

Examples of org.rhq.core.domain.util.OSGiVersion


                                    String regex = format.getOsgiVersionExtractionRegex();
                                    int group = format.getOsgiVersionGroupIndex();
                                    String oldOsgiVersion = getOsgiVersion(version, regex, group);

                                    OSGiVersion v = new OSGiVersion(oldOsgiVersion);
                                    if (v.getMicroIfDefined() != null) {
                                        v.setMicro(v.getMicro() + 1);
                                    } else if (v.getMinorIfDefined() != null) {
                                        v.setMinor(v.getMinor() + 1);
                                    } else {
                                        v.setMajor(v.getMajor() + 1);
                                    }

                                    String newVersion = version.replace(oldOsgiVersion, v.toString());

                                    uploadForm.getField("editableVersion").setValue(newVersion);
                                    uploadForm.getField("version").setValue(newVersion);
                                    return;
                                } catch (Exception e) {
View Full Code Here


                    saveCallTimeCollection(requestedMetric, thisCollection);

                    report.addData(callTime);
                } else {
                    OSGiVersion currentAsVersion = getASVersion();
                    if (currentAsVersion == null) {
                        getLog().warn(
                            "Could not determine the AS version while reporting unexpected result of method"
                                + " stats. Request: " + request);
                    } else if (FIRST_VERSION_SUPPORTING_METHOD_STATS.compareTo(currentAsVersion) <= 0) {
View Full Code Here

                base = ((BaseComponent<?>)base).context.getParentResourceComponent();
            }

            if (base != null && base instanceof BaseServerComponent) {
                String version = ((BaseServerComponent<?>)base).getReleaseVersion();
                asVersion = new OSGiVersion(version);
            }
        }

        return asVersion;
    }
View Full Code Here

        }
        // EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA"
        // As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot)
        // Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException)
        version = SPACE_PATTERN.matcher(version).replaceAll(".");
        OSGiVersion osgiVersion;
        try {
            osgiVersion = new OSGiVersion(version);
        } catch (IllegalArgumentException e) {
            // If the version is still not matching the expected pattern, default to false
            if (LOG.isDebugEnabled()) {
                LOG.debug("Defaulting to supportsPatching = false", e);
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.util.OSGiVersion

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.