[rhq] Branch 'release/jon3.1.x' - modules/plugins
Simeon Pinder
spinder at fedoraproject.org
Mon Aug 6 16:06:42 UTC 2012
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java | 15 ++++++----
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossProductType.java | 14 ++++++---
2 files changed, 19 insertions(+), 10 deletions(-)
New commits:
commit 23e7b8fdd6593194b77aa7c59f4b9d83d28e8987
Author: Ian Springer <ian.springer at redhat.com>
Date: Thu Jun 21 11:55:32 2012 -0400
[BZ 834353] update discovery to recognize BRMS as a separate product type (https://bugzilla.redhat.com/show_bug.cgi?id=834353)
(cherry picked from commit cb316267fac790327fe62d1ac8c9ea9bccd3dbe7)
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
index 31c6ab3..01eb105 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
@@ -576,11 +576,16 @@ public class ApplicationServerDiscoveryComponent implements ResourceDiscoveryCom
ComparableVersion version = new ComparableVersion(installInfo.getVersion());
JBossProductType productType = installInfo.getProductType();
ComparableVersion minimumVersion = MINIMUM_PRODUCT_VERSIONS.get(productType);
- // The product is supported if the version is greater than or equal to the minimum version.
- boolean supported = (version.compareTo(minimumVersion) >= 0);
- if (!supported) {
- log.debug(productType + " version " + version + " is not supported by this plugin (minimum " + productType
- + " version is " + minimumVersion + ") - skipping...");
+ boolean supported;
+ if (minimumVersion != null) {
+ // The product is supported if the version is greater than or equal to the minimum version.
+ supported = (version.compareTo(minimumVersion) >= 0);
+ if (!supported) {
+ log.debug(productType + " version " + version + " is not supported by this plugin (minimum " + productType
+ + " version is " + minimumVersion + ") - skipping...");
+ }
+ } else {
+ supported = true;
}
return supported;
}
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossProductType.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossProductType.java
index 818658b..de5d837 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossProductType.java
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossProductType.java
@@ -1,6 +1,6 @@
/*
* Jopr Management Platform
-* Copyright (C) 2005-2010 Red Hat, Inc.
+* Copyright (C) 2005-2012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -31,10 +31,11 @@ import java.util.jar.Attributes;
* @author Ian Springer
*/
public enum JBossProductType {
- AS("JBoss AS", "JBoss Application Server", "default"), // the public offering
- EAP("JBoss EAP", "JBoss Enterprise Application Platform", "default"), // the customer offering
- EWP("JBoss EWP", "JBoss Enterprise Web Platform", "default"), // the customer offering
- SOA("JBoss SOA-P", "JBoss Enterprise SOA Platform", "default"); // the customer SOA platform
+ AS("JBoss AS", "JBoss Application Server", "default"),
+ EAP("JBoss EAP", "JBoss Enterprise Application Platform", "default"),
+ EWP("JBoss EWP", "JBoss Enterprise Web Platform", "default"),
+ SOA("JBoss SOA-P", "JBoss Enterprise SOA Platform", "default"),
+ BRMS("JBoss BRMS", "JBoss Business Rules Management System", "default");
public final String NAME;
public final String DESCRIPTION;
@@ -43,6 +44,7 @@ public enum JBossProductType {
private static final String EAP_IMPLEMENTATION_TITLE = "JBoss [EAP]";
private static final String EWP_IMPLEMENTATION_TITLE = "JBoss [EWP]";
private static final String SOA_IMPLEMENTATION_TITLE = "JBoss [SOA]";
+ private static final String BRMS_IMPLEMENTATION_TITLE = "JBoss [BRMS]";
JBossProductType(String name, String description, String defaultConfigName) {
this.NAME = name;
@@ -68,6 +70,8 @@ public enum JBossProductType {
result = JBossProductType.EWP;
} else if (implementationTitle.equalsIgnoreCase(SOA_IMPLEMENTATION_TITLE)) {
result = JBossProductType.SOA;
+ } else if (implementationTitle.equalsIgnoreCase(BRMS_IMPLEMENTATION_TITLE)) {
+ result = JBossProductType.BRMS;
}
}
return result;
More information about the rhq-commits
mailing list