modules/enterprise/binding/pom.xml | 18
++++++++++
modules/enterprise/binding/src/main/java/org/rhq/bindings/StandardBindings.java | 10
+++--
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java | 11
+++++-
3 files changed, 35 insertions(+), 4 deletions(-)
New commits:
commit 29b87752782a07869894b5c3eccb8d47dd11f46a
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Feb 21 23:56:16 2013 +0100
Adding the API checks to the script bindings.
Also corrected a minor incompatible change that was introduced since 4.5.1.
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 08cfdd4..709a213 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -12,6 +12,7 @@
<properties>
<filtered.location>src/main/java</filtered.location>
+ <rhq.internal>false</rhq.internal>
</properties>
<dependencies>
@@ -240,6 +241,23 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <configuration>
+ <includes>
+ <!-- Hand picked stuff that corresponds to what is the script
context initialized to
+ in the org/rhq/bindings/StandardBindings. -->
+ <include>org/rhq/bindings/client/*</include>
+ <include>org/rhq/bindings/export/*</include>
+ <include>org/rhq/bindings/output/*</include>
+ <include>org/rhq/bindings/util/ScriptAssert</include>
+
<include>org/rhq/bindings/util/ScriptAssertException</include>
+ <include>org/rhq/bindings/util/ScriptUtil</include>
+ </includes>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/StandardBindings.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/StandardBindings.java
index 3e1e137..e0e794c 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/StandardBindings.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/StandardBindings.java
@@ -46,6 +46,10 @@ import org.rhq.core.domain.util.PageControl;
* is available for all the users of this class. The user is however able to later modify
these defaults to provide
* use-case specific overrides (for example the CLI might want to supply impls that hook
into the console to provide
* interactivity with user in some workflows, which, generically, is not possible in a
common case).
+ * <p>
+ * *NOTE*: any change in what is exposed to the scripting clients needs to be reflected
in the API check configuration
+ * in the pom.xml of the corresponding modules, because any class that gets exposed in
the script context essentially
+ * becomes a public API.
*
* @author Lukas Krejci
*/
@@ -118,10 +122,10 @@ public class StandardBindings extends HashMap<String, Object>
{
/**
* If you want to preserve non-client-dependent bindings when the facade changes,
call this as opposed to
- * constructing new StandardBindings.
+ * constructing new StandardBindings.
*/
public void setFacade(PrintWriter output, RhqFacade rhqFacade) {
- // remove any existing managers
+ // remove any existing managers
if (null != managers) {
for (RhqManager manager : managers.keySet()) {
remove(manager.name());
@@ -204,7 +208,7 @@ public class StandardBindings extends HashMap<String, Object> {
}
public Map<RhqManager, Object> getManagers() {
- //XXX ideally this should be a projection into our map
+ //XXX ideally this should be a projection into our map
return (null == managers) ? managers = Collections.emptyMap() : managers;
}
diff --git
a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
index 32832b2..2c781a1 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManager.java
@@ -101,7 +101,7 @@ public enum RhqManager {
this.beanName = this.name() + "Bean";
localInterfaceClassName = getLocalInterfaceClassName(remote);
- //defaults and evaluates to TRUE unless the string contains "false".
Done to defend against
+ //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)) {
@@ -123,6 +123,15 @@ public enum RhqManager {
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;
}
Show replies by date