modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionAvailabilityCategoryComposite.java
| 11
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
| 9
modules/core/domain/src/main/java/org/rhq/core/domain/common/ServerDetails.java
| 15
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
| 8
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ObfuscatedPropertySimple.java
| 13
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementScheduleCriteria.java
| 30 +
modules/enterprise/binding/intentional-api-changes-since-4.9.0.xml
| 53 ++
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/AbstractRhqFacade.java
| 200 +++++++++
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
| 217 ++++++++++
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
| 139 ++++++
modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
| 3
modules/enterprise/binding/src/test/java/org/rhq/bindings/client/AbstractRhqFacadeProxyTest.java
| 2
modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/clientapi/RemoteClient.java
| 5
modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
| 3
modules/plugins/database/src/main/java/org/rhq/plugins/database/DatabaseQueryUtility.java
| 16
15 files changed, 714 insertions(+), 10 deletions(-)
New commits:
commit 9b38a7ecf4853047cfc3635bff6ec270954e3541
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 17:43:01 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
Commit 0ba8c5f (among other things) removed several public constants in
MeasurementScheduleCriteria because they were improperly named and didn't
do what they seemed to.
Users might be using those constants even if they don't do what they're
supposed to. The constants have therefore been re-introduced with a
deprecation notice.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementScheduleCriteria.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementScheduleCriteria.java
index 33d2623..1980d01 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementScheduleCriteria.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementScheduleCriteria.java
@@ -42,10 +42,37 @@ public class MeasurementScheduleCriteria extends Criteria {
private static final long serialVersionUID = 3L;
// sort fields from the MeasurementSchedule's MeasurementDefinition
+
+ /**
+ * Note that sorting by definition id alone might not produce repeatable results.
This depends on the filters
+ * and other sort field applied.
+ */
+ public static final String SORT_FIELD_DEFINITION_ID = "definitionId";
public static final String SORT_FIELD_NAME = "name";
public static final String SORT_FIELD_DISPLAY_NAME = "displayName";
public static final String SORT_FIELD_DATA_TYPE = "dataType";
+ /**
+ * @deprecated Sorting by this field has never been supported. This constant has been
introduced in error and will
+ * be removed in the next major release.
+ */
+ @Deprecated
+ public static final String SORT_FIELD_ENABLED = "enabled";
+
+ /**
+ * @deprecated Sorting by this field has never been supported. This constant has been
introduced in error and will
+ * be removed in the next major release.
+ */
+ @Deprecated
+ public static final String SORT_FIELD_INTERVAL = "interval";
+
+ /**
+ * @deprecated Sorting by this field has never been supported. This constant has been
introduced in error and will
+ * be removed in the next major release.
+ */
+ @Deprecated
+ public static final String SORT_FIELD_DESCRIPTION = "description";
+
// filter fields
public static final String FILTER_FIELD_DEFINITION_IDS = "definitionIds";
public static final String FILTER_FIELD_RESOURCE_ID = "resourceId";
@@ -93,6 +120,7 @@ public class MeasurementScheduleCriteria extends Criteria {
+ " WHERE parent.id = ? )");
filterOverrides.put(FILTER_FIELD_RESOURCE_TYPE_ID, "resource.type.id =
?");
+ sortOverrides.put(SORT_FIELD_DEFINITION_ID, "definition.id");
sortOverrides.put(SORT_FIELD_NAME, "definition.name");
sortOverrides.put(SORT_FIELD_DISPLAY_NAME, "definition.displayName");
sortOverrides.put(SORT_FIELD_DATA_TYPE, "definition.dataType");
@@ -167,4 +195,4 @@ public class MeasurementScheduleCriteria extends Criteria {
this.sortDataType = sortDataType;
}
-}
\ No newline at end of file
+}
commit 8de9364b5f83e26bdda3eb16543c0ba13768393d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 16:20:45 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
Commit 26959a31d8c37bcb86dc6a845b5707a277bff3cb made the constructor of
the DatabaseQueryUtility private, which it should be, and removed an
unused class.
While the chances of anyone either instantiating the utility class or using
the absolutely useless DatabaseQueryUtility.StatementParameter are very
slim, we need to keep API back-compat.
The public constructor and the class have been reintroduced with
a deprecation notice.
diff --git
a/modules/plugins/database/src/main/java/org/rhq/plugins/database/DatabaseQueryUtility.java
b/modules/plugins/database/src/main/java/org/rhq/plugins/database/DatabaseQueryUtility.java
index 95e981d..d6d83f2 100644
---
a/modules/plugins/database/src/main/java/org/rhq/plugins/database/DatabaseQueryUtility.java
+++
b/modules/plugins/database/src/main/java/org/rhq/plugins/database/DatabaseQueryUtility.java
@@ -44,7 +44,11 @@ public class DatabaseQueryUtility {
private static final Log LOG = LogFactory.getLog(DatabaseQueryUtility.class);
- private DatabaseQueryUtility() {}
+ /**
+ * @deprecated instantiating a static utility class doesn't make sense. Don't
do it.
+ */
+ @Deprecated
+ public DatabaseQueryUtility() {}
/**
* Executes a database update.
@@ -274,4 +278,14 @@ public class DatabaseQueryUtility {
}
}
}
+
+ /**
+ * @deprecated This class is not used for anything in the codebase of the database
plugin. If you are using it
+ * in some way or another, move it to your own code, because this class will be
removed in future.
+ */
+ @Deprecated
+ public static class StatementParameter {
+ private String name;
+ private String value;
+ }
}
commit f78beeb0deff4fc4801f2236881e45d659bd578f
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 15:06:43 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
The fix for bug 840512 changed the way we handle the value of an obfuscated
property, which rendered the obfuscate() method unused. It has been removed
which unfortunately is an API breaking change due to its protected
visibility.
While the chances of anyone using that method are miniscule we cannot break
the API. The method was re-introduced but made a NOOP so that it doesn't
break the obfuscation. The deprecation notice on the method suggests to
stop using it.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ObfuscatedPropertySimple.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ObfuscatedPropertySimple.java
index bb00ef5..ac0598f 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ObfuscatedPropertySimple.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ObfuscatedPropertySimple.java
@@ -216,7 +216,18 @@ public class ObfuscatedPropertySimple extends PropertySimple {
throw new IllegalArgumentException("Failed to obfuscate property value:
[" + value + "]", e);
}
}
-
+
+ /**
+ * @deprecated do not use this method. It has been superseded by the {@link
#deobfuscate(String)} and
+ * {@link #obfuscate(String)} pair. The way the obfuscated value is handled has
changed and is fully contained
+ * within this class. You should not worry about it, nor have a need to call any of
the obfuscate() methods.
+ * This method is currently no-op and will be removed in future.
+ */
+ @Deprecated
+ protected void obfuscate() {
+
+ }
+
/**
* Overriden to not leak the unobfuscated value in the toString() method, output of
which
* might end up in logs, etc.
commit aeae80458d5175f2e5c3cc164943c561da2cc0f3
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 15:02:58 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
The fix for bug 1000006 declared the constructor of
o.r.c.d.configuration.ConfigurationUtility private. It previously had the
default pulic constructor and hence this was a API breaking change.
While the utility class should have had the private constructor in first
place, we cannot break the API, so the public constructor has been
re-introduced with a deprecation notice.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
index f4d575a..fa49454 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/ConfigurationUtility.java
@@ -36,8 +36,12 @@ import
org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
*/
public class ConfigurationUtility {
- private ConfigurationUtility() {
- // Utility class
+ /**
+ * @deprecated do not create instances of this class. It is meant as a static utility
class.
+ */
+ @Deprecated
+ public ConfigurationUtility() {
+
}
/**
commit 53f3329850efcb7fd0e18fca2964c8c4dbb6a3b1
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 14:46:57 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
Commit 85f75e0 removed 2 enum fields from the server details, because they
are no longer used due to our move from DB to Cassandra for metric storage.
Nevertheless the clients might be using those fields to get back that
information. To retain the backwards compatibility, we need to keep those
enum fields, making the server details work without recompilation.
The server details will no longer contain any information for the for those
fields. The fact that some information might be missing is part of the
contract of the ServerDetails class though, so the users should be able to
handle that situation.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/common/ServerDetails.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/common/ServerDetails.java
index 5cfcc96..b9637bf 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/common/ServerDetails.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/common/ServerDetails.java
@@ -47,6 +47,21 @@ public class ServerDetails implements Serializable {
SERVER_LOCAL_TIME, //
SERVER_INSTALL_DIR, // where RHQ is installed, the top directory where everything
else is
SERVER_HOME_DIR, // where the RHQ server's JBossAS deployment is; this is
under the install dir
+
+ /**
+ * @deprecated this is no longer used or exposed by the server. The measurements
are not stored in the database
+ * anymore.
+ */
+ @Deprecated
+ CURRENT_MEASUREMENT_TABLE, //
+
+ /**
+ * @deprecated this is no longer used or exposed by the server. The measurements
are not stored in the database
+ * anymore.
+ */
+ @Deprecated
+ NEXT_MEASUREMENT_TABLE_ROTATION, //
+
SERVER_IDENTITY;
};
commit be6f70ce0ae66b544965636f503bbe6e4732958b
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 14:40:42 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
Commit a4b78eb6e1adeffaa519115a9ef07b3f00025168 fixed the handling of the
server status, but changed the signature of
o.r.c.d.cloud.Server#clearStatus() method in an incompatible way. Adding
the old method back with a deprecation notice.
The chances of anyone using this method are miniscule but we need to retain
back-compat.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
index 671db6b..6e04ab6 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java
@@ -306,6 +306,15 @@ public class Server implements Serializable {
}
/**
+ * @deprecated do not use this method as it may corrupt the tracking of the server
status. Use the new
+ * {@link #clearStatus(org.rhq.core.domain.cloud.Server.Status)} instead.
+ */
+ @Deprecated
+ public void clearStatus() {
+ this.status = 0;
+ }
+
+ /**
* If some subsystem makes a change to some data that this server cares about (as
summarized
* by the various {@link Status} elements), then that change should be added via this
method.
* Periodically, a background job will come along, check the status, and possibly
perform
commit 9a5a5a7a1b9153968474a459f097e73d5421e038
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 27 14:37:22 2013 +0200
[BZ 873866] - Minimizing API changes between JON 3.1.2.GA and JON 3.2.0.GA.
Bug 888927 changed the signature of the
AlertConditionAvailabilityCategoryComposite class to add a missing
parameter.
While the chances of anyone using this method miniscule, we need to retain
the back-compat. Therefore I added the wrong constructor back with
a deprecation notice.
diff --git
a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionAvailabilityCategoryComposite.java
b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionAvailabilityCategoryComposite.java
index 870dbd2..cd1a948 100644
---
a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionAvailabilityCategoryComposite.java
+++
b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionAvailabilityCategoryComposite.java
@@ -49,6 +49,17 @@ public class AlertConditionAvailabilityCategoryComposite extends
AbstractAlertCo
this.availabilityType = (null != availabilityType) ? availabilityType :
AvailabilityType.UNKNOWN;
}
+ /**
+ * @deprecated This constructor will NOT produce a valid instance of this class,
because it cannot specify
+ * the required alert definition id. Use {@link
#AlertConditionAvailabilityCategoryComposite(
+ * org.rhq.core.domain.alert.AlertCondition, Integer, Integer,
org.rhq.core.domain.measurement.AvailabilityType)}
+ * instead.
+ */
+ @Deprecated
+ public AlertConditionAvailabilityCategoryComposite(AlertCondition condition, Integer
resourceId, AvailabilityType availabilityType) {
+ this(condition, null, resourceId, availabilityType);
+ }
+
public Integer getAlertDefinitionId() {
return alertDefinitionId;
}
commit 92aaf569774b9328812f447cc940719287540883
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Sep 23 15:37:06 2013 +0200
Adding intentional api changes for the new methods ported over from RHQ 4.4.0.
diff --git a/modules/enterprise/binding/intentional-api-changes-since-4.9.0.xml
b/modules/enterprise/binding/intentional-api-changes-since-4.9.0.xml
new file mode 100644
index 0000000..e9a97bc
--- /dev/null
+++ b/modules/enterprise/binding/intentional-api-changes-since-4.9.0.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+ ~ RHQ Management Platform
+ ~ Copyright (C) 2005-2013 Red Hat, Inc.
+ ~ All rights reserved.
+ ~
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation version 2 of the License.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ -->
+
+<differences>
+
+ <difference>
+ <className>org/rhq/bindings/client/RhqFacade</className>
+ <differenceType>7012</differenceType> <!-- method added to an
interface -->
+ <method>*ManagerRemote get*Manager()</method>
+ <justification>
+ Adding back methods removed in RHQ 4.5.0 to regain compatibility with RHQ 4.4.0
interface.
+ This is safe, because this interface is not to be implemented by 3rd parties.
+ </justification>
+ </difference>
+
+ <difference>
+ <className>org/rhq/bindings/client/RhqFacade</className>
+ <differenceType>7012</differenceType> <!-- method added to an
interface -->
+ <method>org.rhq.enterprise.server.discovery.DiscoveryBossRemote
getDiscoveryBoss()</method>
+ <justification>
+ Adding back methods removed in RHQ 4.5.0 to regain compatibility with RHQ 4.4.0
interface.
+ This is safe, because this interface is not to be implemented by 3rd parties.
+ </justification>
+ </difference>
+
+ <difference>
+ <className>org/rhq/bindings/client/RhqFacade</className>
+ <differenceType>7012</differenceType> <!-- method added to an
interface -->
+ <method>java.util.Map getManagers()</method>
+ <justification>
+ Adding back methods removed in RHQ 4.5.0 to regain compatibility with RHQ 4.4.0
interface.
+ This is safe, because this interface is not to be implemented by 3rd parties.
+ </justification>
+ </difference>
+</differences>
+
commit 2a152b1f670099c7f3341abe8ca35bac11ff29bd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 20 21:09:02 2013 +0200
(Almost) regain back-compat with RHQ 4.4.0 in script bindings.
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/AbstractRhqFacade.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/AbstractRhqFacade.java
new file mode 100644
index 0000000..8ee82e2
--- /dev/null
+++
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/AbstractRhqFacade.java
@@ -0,0 +1,200 @@
+package org.rhq.bindings.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.rhq.enterprise.server.alert.AlertDefinitionManagerRemote;
+import org.rhq.enterprise.server.alert.AlertManagerRemote;
+import org.rhq.enterprise.server.auth.SubjectManagerRemote;
+import org.rhq.enterprise.server.authz.RoleManagerRemote;
+import org.rhq.enterprise.server.bundle.BundleManagerRemote;
+import org.rhq.enterprise.server.configuration.ConfigurationManagerRemote;
+import org.rhq.enterprise.server.content.ContentManagerRemote;
+import org.rhq.enterprise.server.content.RepoManagerRemote;
+import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
+import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.event.EventManagerRemote;
+import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
+import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
+import org.rhq.enterprise.server.measurement.CallTimeDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementBaselineManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerRemote;
+import org.rhq.enterprise.server.operation.OperationManagerRemote;
+import org.rhq.enterprise.server.report.DataAccessManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceFactoryManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceTypeManagerRemote;
+import org.rhq.enterprise.server.resource.group.ResourceGroupManagerRemote;
+import org.rhq.enterprise.server.search.SavedSearchManagerRemote;
+import org.rhq.enterprise.server.support.SupportManagerRemote;
+import org.rhq.enterprise.server.sync.SynchronizationManagerRemote;
+import org.rhq.enterprise.server.system.SystemManagerRemote;
+import org.rhq.enterprise.server.tagging.TagManagerRemote;
+
+/**
+ * This is a support base class for the implementations of the RhqFacade interface that
+ * implements the deprecated methods by the means of the new version of the {@link
RhqFacade} methods.
+ *
+ * @author Lukas Krejci
+ * @since 4.10
+ */
+public abstract class AbstractRhqFacade implements RhqFacade {
+
+ @Override
+ public AlertDefinitionManagerRemote getAlertDefinitionManager() {
+ return getProxy(AlertDefinitionManagerRemote.class);
+ }
+
+ @Override
+ public AlertManagerRemote getAlertManager() {
+ return getProxy(AlertManagerRemote.class);
+ }
+
+ @Override
+ public AvailabilityManagerRemote getAvailabilityManager() {
+ return getProxy(AvailabilityManagerRemote.class);
+ }
+
+ @Override
+ public BundleManagerRemote getBundleManager() {
+ return getProxy(BundleManagerRemote.class);
+ }
+
+ @Override
+ public CallTimeDataManagerRemote getCallTimeDataManager() {
+ return getProxy(CallTimeDataManagerRemote.class);
+ }
+
+ @Override
+ public ConfigurationManagerRemote getConfigurationManager() {
+ return getProxy(ConfigurationManagerRemote.class);
+ }
+
+ @Override
+ public ContentManagerRemote getContentManager() {
+ return getProxy(ContentManagerRemote.class);
+ }
+
+ @Override
+ public DataAccessManagerRemote getDataAccessManager() {
+ return getProxy(DataAccessManagerRemote.class);
+ }
+
+ @Override
+ public DiscoveryBossRemote getDiscoveryBoss() {
+ return getProxy(DiscoveryBossRemote.class);
+ }
+
+ @Override
+ public DriftManagerRemote getDriftManager() {
+ return getProxy(DriftManagerRemote.class);
+ }
+
+ @Override
+ public EventManagerRemote getEventManager() {
+ return getProxy(EventManagerRemote.class);
+ }
+
+ @Override
+ public Map<RhqManagers, Object> getManagers() {
+ HashMap<RhqManagers, Object> ret = new HashMap<RhqManagers,
Object>();
+
+ for(RhqManagers m : RhqManagers.values()) {
+ ret.put(m, getProxy(m.remote()));
+ }
+
+ return ret;
+ }
+
+ @Override
+ public MeasurementBaselineManagerRemote getMeasurementBaselineManager() {
+ return getProxy(MeasurementBaselineManagerRemote.class);
+ }
+
+ @Override
+ public MeasurementDataManagerRemote getMeasurementDataManager() {
+ return getProxy(MeasurementDataManagerRemote.class);
+ }
+
+ @Override
+ public MeasurementDefinitionManagerRemote getMeasurementDefinitionManager() {
+ return getProxy(MeasurementDefinitionManagerRemote.class);
+ }
+
+ @Override
+ public MeasurementScheduleManagerRemote getMeasurementScheduleManager() {
+ return getProxy(MeasurementScheduleManagerRemote.class);
+ }
+
+ @Override
+ public OperationManagerRemote getOperationManager() {
+ return getProxy(OperationManagerRemote.class);
+ }
+
+ @Override
+ public RemoteInstallManagerRemote getRemoteInstallManager() {
+ return getProxy(RemoteInstallManagerRemote.class);
+ }
+
+ @Override
+ public RepoManagerRemote getRepoManager() {
+ return getProxy(RepoManagerRemote.class);
+ }
+
+ @Override
+ public ResourceFactoryManagerRemote getResourceFactoryManager() {
+ return getProxy(ResourceFactoryManagerRemote.class);
+ }
+
+ @Override
+ public ResourceGroupManagerRemote getResourceGroupManager() {
+ return getProxy(ResourceGroupManagerRemote.class);
+ }
+
+ @Override
+ public ResourceManagerRemote getResourceManager() {
+ return getProxy(ResourceManagerRemote.class);
+ }
+
+ @Override
+ public ResourceTypeManagerRemote getResourceTypeManager() {
+ return getProxy(ResourceTypeManagerRemote.class);
+ }
+
+ @Override
+ public RoleManagerRemote getRoleManager() {
+ return getProxy(RoleManagerRemote.class);
+ }
+
+ @Override
+ public SavedSearchManagerRemote getSavedSearchManager() {
+ return getProxy(SavedSearchManagerRemote.class);
+ }
+
+ @Override
+ public SubjectManagerRemote getSubjectManager() {
+ return getProxy(SubjectManagerRemote.class);
+ }
+
+ @Override
+ public SupportManagerRemote getSupportManager() {
+ return getProxy(SupportManagerRemote.class);
+ }
+
+ @Override
+ public SynchronizationManagerRemote getSynchronizationManager() {
+ return getProxy(SynchronizationManagerRemote.class);
+ }
+
+ @Override
+ public SystemManagerRemote getSystemManager() {
+ return getProxy(SystemManagerRemote.class);
+ }
+
+ @Override
+ public TagManagerRemote getTagManager() {
+ return getProxy(TagManagerRemote.class);
+ }
+}
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
index 2f80f0c..e6ec7a9 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
@@ -22,6 +22,35 @@ package org.rhq.bindings.client;
import java.util.Map;
import org.rhq.core.domain.auth.Subject;
+import org.rhq.enterprise.server.alert.AlertDefinitionManagerRemote;
+import org.rhq.enterprise.server.alert.AlertManagerRemote;
+import org.rhq.enterprise.server.auth.SubjectManagerRemote;
+import org.rhq.enterprise.server.authz.RoleManagerRemote;
+import org.rhq.enterprise.server.bundle.BundleManagerRemote;
+import org.rhq.enterprise.server.configuration.ConfigurationManagerRemote;
+import org.rhq.enterprise.server.content.ContentManagerRemote;
+import org.rhq.enterprise.server.content.RepoManagerRemote;
+import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
+import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.event.EventManagerRemote;
+import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
+import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
+import org.rhq.enterprise.server.measurement.CallTimeDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementBaselineManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerRemote;
+import org.rhq.enterprise.server.operation.OperationManagerRemote;
+import org.rhq.enterprise.server.report.DataAccessManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceFactoryManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceTypeManagerRemote;
+import org.rhq.enterprise.server.resource.group.ResourceGroupManagerRemote;
+import org.rhq.enterprise.server.search.SavedSearchManagerRemote;
+import org.rhq.enterprise.server.support.SupportManagerRemote;
+import org.rhq.enterprise.server.sync.SynchronizationManagerRemote;
+import org.rhq.enterprise.server.system.SystemManagerRemote;
+import org.rhq.enterprise.server.tagging.TagManagerRemote;
/**
* This is an interface through which the script can communicate with RHQ server.
@@ -59,4 +88,192 @@ public interface RhqFacade {
* @return the proxy of the remote API interface backed by this facade
*/
<T> T getProxy(Class<T> remoteApiIface);
+
+ ///////////////////// deprecated methods added to re-introduce compatibility with RHQ
4.4.0
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ AlertDefinitionManagerRemote getAlertDefinitionManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ AlertManagerRemote getAlertManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ AvailabilityManagerRemote getAvailabilityManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ BundleManagerRemote getBundleManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ CallTimeDataManagerRemote getCallTimeDataManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ConfigurationManagerRemote getConfigurationManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ContentManagerRemote getContentManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ DataAccessManagerRemote getDataAccessManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ DiscoveryBossRemote getDiscoveryBoss();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ DriftManagerRemote getDriftManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ EventManagerRemote getEventManager();
+
+ /**
+ * Kept for backwards compatibility but otherwise unused.
+ * In RHQ prior to 4.5.0, the values in the map, i.e. the manager objects themselves
both implemented the various
+ * {@code *Remote} interfaces and contained methods with the modified signatures with
the {@link Subject} parameter
+ * removed.
+ * <p />
+ * Since RHQ 4.5.0 the returned objects no longer contain the modified method. If you
want to obtain objects with
+ * such methods (intended for use in scripted environments), use {@link
#getScriptingAPI()} method instead.
+ */
+ @Deprecated
+ Map<RhqManagers, Object> getManagers();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ MeasurementBaselineManagerRemote getMeasurementBaselineManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ MeasurementDataManagerRemote getMeasurementDataManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ MeasurementDefinitionManagerRemote getMeasurementDefinitionManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ MeasurementScheduleManagerRemote getMeasurementScheduleManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ OperationManagerRemote getOperationManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ RemoteInstallManagerRemote getRemoteInstallManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ RepoManagerRemote getRepoManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ResourceFactoryManagerRemote getResourceFactoryManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ResourceGroupManagerRemote getResourceGroupManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ResourceManagerRemote getResourceManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ ResourceTypeManagerRemote getResourceTypeManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ RoleManagerRemote getRoleManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ SavedSearchManagerRemote getSavedSearchManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ SubjectManagerRemote getSubjectManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ SupportManagerRemote getSupportManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ SynchronizationManagerRemote getSynchronizationManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ SystemManagerRemote getSystemManager();
+
+ /**
+ * deprecated use {@code RhqFacade.getProxy(RhqManager.XXX.remote())} instead
+ */
+ @Deprecated
+ TagManagerRemote getTagManager();
}
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
new file mode 100644
index 0000000..77612d1
--- /dev/null
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
@@ -0,0 +1,139 @@
+package org.rhq.bindings.client;
+
+import org.rhq.enterprise.server.alert.AlertDefinitionManagerRemote;
+import org.rhq.enterprise.server.alert.AlertManagerRemote;
+import org.rhq.enterprise.server.auth.SubjectManagerRemote;
+import org.rhq.enterprise.server.authz.RoleManagerRemote;
+import org.rhq.enterprise.server.bundle.BundleManagerRemote;
+import org.rhq.enterprise.server.cloud.StorageNodeManagerRemote;
+import org.rhq.enterprise.server.configuration.ConfigurationManagerRemote;
+import org.rhq.enterprise.server.content.ContentManagerRemote;
+import org.rhq.enterprise.server.content.RepoManagerRemote;
+import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
+import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftTemplateManagerRemote;
+import org.rhq.enterprise.server.event.EventManagerRemote;
+import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
+import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
+import org.rhq.enterprise.server.measurement.CallTimeDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementBaselineManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDataManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerRemote;
+import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerRemote;
+import org.rhq.enterprise.server.operation.OperationManagerRemote;
+import org.rhq.enterprise.server.report.DataAccessManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceFactoryManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceManagerRemote;
+import org.rhq.enterprise.server.resource.ResourceTypeManagerRemote;
+import org.rhq.enterprise.server.resource.group.ResourceGroupManagerRemote;
+import org.rhq.enterprise.server.resource.group.definition.GroupDefinitionManagerRemote;
+import org.rhq.enterprise.server.search.SavedSearchManagerRemote;
+import org.rhq.enterprise.server.support.SupportManagerRemote;
+import org.rhq.enterprise.server.sync.SynchronizationManagerRemote;
+import org.rhq.enterprise.server.system.SystemManagerRemote;
+import org.rhq.enterprise.server.tagging.TagManagerRemote;
+
+/**
+ * @author Lukas Krejci
+ *
+ * @deprecated since 4.10 do not use this. Use {@link RhqManager} instead.
+ */
+@Deprecated
+public enum RhqManagers {
+ AlertManager(AlertManagerRemote.class, "${AlertManager}"), //
+ AlertDefinitionManager(AlertDefinitionManagerRemote.class,
"${AlertDefinitionManager}"), //
+ AvailabilityManager(AvailabilityManagerRemote.class,
"${AvailabilityManager}"), //
+ BundleManager(BundleManagerRemote.class, "${BundleManager}"), //
+ CallTimeDataManager(CallTimeDataManagerRemote.class,
"${CallTimeDataManager}"), //
+ RepoManager(RepoManagerRemote.class, "${RepoManager}"), //
+ ConfigurationManager(ConfigurationManagerRemote.class,
"${ConfigurationManager}"), //
+ ContentManager(ContentManagerRemote.class, "${ContentManager}"), //
+ DataAccessManager(DataAccessManagerRemote.class, "${DataAccessManager}"),
//
+ DriftManager(DriftManagerRemote.class, "${DriftManager}"), //
+ DriftTemplateManager(DriftTemplateManagerRemote.class,
"${DriftTemplateManager}"), //
+ DiscoveryBoss(DiscoveryBossRemote.class, "${DiscoveryBoss}"), //
+ EventManager(EventManagerRemote.class, "${EventManager}"), //
+ GroupDefinitionManager(GroupDefinitionManagerRemote.class,
"${GroupDefinitionManager}"), //
+ MeasurementBaselineManager(MeasurementBaselineManagerRemote.class,
"${MeasurementBaselineManager}"), //
+ MeasurementDataManager(MeasurementDataManagerRemote.class,
"${MeasurementDataManager}"), //
+ MeasurementDefinitionManager(MeasurementDefinitionManagerRemote.class,
"${MeasurementDefinitionManager}"), //
+ MeasurementScheduleManager(MeasurementScheduleManagerRemote.class,
"${MeasurementScheduleManager}"), //
+ OperationManager(OperationManagerRemote.class, "${OperationManager}"), //
+ ResourceManager(ResourceManagerRemote.class, "${ResourceManager}"), //
+ ResourceFactoryManager(ResourceFactoryManagerRemote.class,
"${ResourceFactoryManager}"), //
+ ResourceGroupManager(ResourceGroupManagerRemote.class,
"${ResourceGroupManager}"), //
+ ResourceTypeManager(ResourceTypeManagerRemote.class,
"${ResourceTypeManager}"), //
+ RoleManager(RoleManagerRemote.class, "${RoleManager}"), //
+ SavedSearchManager(SavedSearchManagerRemote.class,
"${SavedSearchManager}"), //
+ StorageNodeManager(StorageNodeManagerRemote.class,
"${StorageNodeManager}"), //
+ SubjectManager(SubjectManagerRemote.class, "${SubjectManager}"), //
+ SupportManager(SupportManagerRemote.class, "${SupportManager}"), //
+ SystemManager(SystemManagerRemote.class, "${SystemManager}"), //
+ RemoteInstallManager(RemoteInstallManagerRemote.class,
"${RemoteInstallManager}"), //
+ TagManager(TagManagerRemote.class, "${TagManager}"), //
+ SynchronizationManager(SynchronizationManagerRemote.class,
"${SynchronizationManager}");
+
+ private Class<?> remote;
+ private String localInterfaceClassName;
+ private String beanName;
+ private boolean enabled;
+
+
+ private RhqManagers(Class<?> remote, String enable) {
+ this.remote = remote;
+ this.beanName = this.name() + "Bean";
+ localInterfaceClassName = getLocalInterfaceClassName(remote);
+
+ //defaults and evaluates to TRUE unless the string contains "false".
Done to defend against
+ //possible errors in string replacement during rhq build.
+ this.enabled = true;
+ if ((enable != null) && (enable.trim().length() > 0)) {
+ this.enabled = (enable.trim().equalsIgnoreCase("false")) ?
Boolean.FALSE : Boolean.TRUE;
+ }
+ }
+
+ public static RhqManagers forInterface(Class<?> iface) {
+ for (RhqManagers m : values()) {
+ if (m.remote().equals(iface)) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+
+ public Class<?> remote() {
+ return this.remote;
+ }
+
+ /**
+ * @deprecated since 4.6.0, use the {@link #remote()} method instead
+ * @return the class name of the remote interface
+ */
+ @Deprecated
+ public String remoteName() {
+ return this.remote.getName();
+ }
+
+ public String localInterfaceClassName() {
+ return localInterfaceClassName;
+ }
+
+ public String beanName() {
+ return this.beanName;
+ }
+
+ public boolean enabled() {
+ return this.enabled;
+ }
+
+ private static String getLocalInterfaceClassName(Class<?> remoteIface) {
+ String ifaceName = remoteIface.getName();
+ if (!ifaceName.endsWith("Remote")) {
+ throw new AssertionError("Inconsistent SLSB naming in RHQ! Remote
interface '" + remoteIface.getName()
+ + "' does not follow the established naming convention. This is
a bug, please report it.");
+ }
+
+ return (ifaceName.substring(0, ifaceName.lastIndexOf("Remote")) +
"Local");
+ }
+}
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
b/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
index 39cb145..c420c1b 100644
--- a/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
@@ -22,11 +22,12 @@ package org.rhq.bindings;
import java.util.Collections;
import java.util.Map;
+import org.rhq.bindings.client.AbstractRhqFacade;
import org.rhq.bindings.client.RhqFacade;
import org.rhq.bindings.client.RhqManager;
import org.rhq.core.domain.auth.Subject;
-public class FakeRhqFacade implements RhqFacade {
+public class FakeRhqFacade extends AbstractRhqFacade {
public Subject getSubject() {
return null;
diff --git
a/modules/enterprise/binding/src/test/java/org/rhq/bindings/client/AbstractRhqFacadeProxyTest.java
b/modules/enterprise/binding/src/test/java/org/rhq/bindings/client/AbstractRhqFacadeProxyTest.java
index d1042df..65f6178 100644
---
a/modules/enterprise/binding/src/test/java/org/rhq/bindings/client/AbstractRhqFacadeProxyTest.java
+++
b/modules/enterprise/binding/src/test/java/org/rhq/bindings/client/AbstractRhqFacadeProxyTest.java
@@ -44,7 +44,7 @@ public class AbstractRhqFacadeProxyTest {
void method();
}
- public static class TestFacade implements RhqFacade {
+ public static class TestFacade extends AbstractRhqFacade {
private Subject subject;
diff --git
a/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/clientapi/RemoteClient.java
b/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/clientapi/RemoteClient.java
index 95c00ae..b0f25b7 100644
---
a/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/clientapi/RemoteClient.java
+++
b/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/clientapi/RemoteClient.java
@@ -35,6 +35,7 @@ import org.jboss.remoting.invocation.NameBasedInvocation;
import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker;
+import org.rhq.bindings.client.AbstractRhqFacade;
import org.rhq.bindings.client.RhqFacade;
import org.rhq.bindings.client.RhqManager;
import org.rhq.bindings.util.InterfaceSimplifier;
@@ -52,7 +53,7 @@ import org.rhq.enterprise.server.system.SystemManagerRemote;
* @author Jay Shaughnessy
* @author John Mazzitelli
*/
-public class RemoteClient implements RhqFacade {
+public class RemoteClient extends AbstractRhqFacade {
private static final Log LOG = LogFactory.getLog(RemoteClient.class);
@@ -512,4 +513,4 @@ public class RemoteClient implements RhqFacade {
}
}
}
-}
\ No newline at end of file
+}
diff --git
a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
index df0eab4..51b3b2e 100644
---
a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
+++
b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
@@ -28,6 +28,7 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.rhq.bindings.client.AbstractRhqFacade;
import org.rhq.bindings.client.RhqFacade;
import org.rhq.bindings.client.RhqManager;
import org.rhq.bindings.util.InterfaceSimplifier;
@@ -39,7 +40,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author Lukas Krejci
*/
-public class LocalClient implements RhqFacade {
+public class LocalClient extends AbstractRhqFacade {
private static final Log LOG = LogFactory.getLog(LocalClient.class);