modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
| 11 -
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
| 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
| 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
| 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
| 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
| 8
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
| 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
| 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
| 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
| 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
| 13 +
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
| 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
| 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
| 12 +
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
| 9 -
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
| 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
| 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
| 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
| 16 +
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
| 3
modules/enterprise/comm/pom.xml
| 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
| 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
| 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
| 18 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
| 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
| 10 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
| 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
| 7
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
| 12 -
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
| 84 +++++++---
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
| 7
modules/plugins/rhq-agent/pom.xml
| 14 -
pom.xml
| 5
39 files changed, 224 insertions(+), 70 deletions(-)
New commits:
commit 7d9645bfdb4985565a10aafed8eae9306d5d7a2b
Merge: aff60fc 3d0d044
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Feb 27 11:07:52 2012 -0500
Merge remote-tracking branch 'origin/master' into bug/747925
commit 3d0d0443d63042755967b493da3f3330f58aaea7
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sun Feb 26 21:00:56 2012 -0500
fix bad failure message; add an additonal failure check
diff --git
a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
index d7dde7b..50a061b 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
@@ -122,10 +122,9 @@ public class DriftFileTest extends DriftDataAccessTest {
int numDriftFiles = 2;
final List<String> driftFileHashIds = new ArrayList<String>();
- for (int i = 0; i < numDriftFiles; ++i) {
+ for (int driftFileNum = 0; driftFileNum < numDriftFiles; ++driftFileNum) {
File dataFile = createDataFile("test_data.txt", 10, 'X');
final JPADriftFileBits driftFile = new JPADriftFileBits();
- final int driftFileNum = i;
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
driftFile.setData(Hibernate.createBlob(new BufferedInputStream(new
FileInputStream(dataFile))));
@@ -139,10 +138,14 @@ public class DriftFileTest extends DriftDataAccessTest {
driftFileHashIds.add(driftFile.getHashId());
}
});
+ if (driftFileNum >= 1) {
+ fail("Should not be able to store JPADriftFile with same hashId
more than once.");
+ }
+
} catch (Exception e) {
- // expected for file 2 or higher
+ // expected for second file
if (driftFileNum == 0) {
- fail("Should not be able to store JPADriftFile with same hashId
more than once.");
+ fail("Should be able to store JPADriftFile with unique hashId -
cause: " + e);
}
}
}
commit ee4985638f67feed8d9eda5c69c0d192b8b41420
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sun Feb 26 17:25:20 2012 -0500
[BZ 749368] add Javadoc @since tags to plugin API classes
(
https://bugzilla.redhat.com/show_bug.cgi?id=749368)
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
index 94e475d..e6d5bf2 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
@@ -42,13 +42,14 @@ import org.rhq.core.util.exception.ThrowableUtil;
* reporting for the rest of the resources being managed within the system.
*
* This class provides an implementation to help resource components that can't
guarantee how fast its
- * availability checks will be. Some managed resources simply can't respond to
avaiability checks fast enough. In this
+ * availability checks will be. Some managed resources simply can't respond to
availability checks fast enough. In this
* case, this class will provide an asynchronous method that will collect availability
without a timeout being involved
* (in other words, availability will be retrieved by waiting as long as it takes). In
order to tell the plugin container
* what the managed resource's current availability is, this class will provide a
fast method to return the last known
* availability of the resource. In other words, it will be able to return the last know
availability that was last retrieved
* by the asynchronous task - this retrieval of the last known availability will be very
fast.
- *
+ *
+ * @since 1.3
* @author John Mazzitelli
*/
public class AvailabilityCollectorRunnable implements Runnable {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
index 8130ee3..07f2c18 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
@@ -30,6 +30,7 @@ import org.rhq.core.domain.content.PackageVersion;
/**
* A request to deploy a bundle.
*
+ * @since 3.0
* @author John Mazzitelli
*/
public class BundleDeployRequest implements Serializable {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
index b2b3628..cd7f9ac 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
@@ -28,6 +28,8 @@ import org.rhq.core.util.exception.ThrowableUtil;
/**
* The results after an attempt to deploy a bundle has been completed.
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public class BundleDeployResult implements Serializable {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
index 592e63f..18cc0f4 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
@@ -24,7 +24,8 @@ package org.rhq.core.pluginapi.bundle;
/**
* Facet that exposes a component's capabilities to process a bundle.
- *
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public interface BundleFacet {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
index 5eed5c0..4fd5dac 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
@@ -28,7 +28,8 @@ import org.rhq.core.domain.content.PackageVersion;
/**
* Provides bundle functionality that plugin components will need in order to process
bundles.
- *
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public interface BundleManagerProvider {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
index 8e9456d..3a6a481 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
@@ -28,6 +28,7 @@ import org.rhq.core.domain.bundle.BundleResourceDeployment;
/**
* A request to purge a bundle, essentially erasing the bundle files from the
destination.
*
+ * @since 4.0
* @author John Mazzitelli
*/
public class BundlePurgeRequest implements Serializable {
@@ -45,11 +46,18 @@ public class BundlePurgeRequest implements Serializable {
* where the bundle should be deployed. This is the bundle destination's
* {@link BundleDestination#getDeployDir() relative destination directory} under the
* {@link BundleDestination#getDestinationBaseDirectoryName() destination base
directory}.
+ *
+ * @since 4.1
*/
public File getAbsoluteDestinationDirectory() {
return this.absDestDir;
}
+ /**
+ * @since 4.1
+ *
+ * @param absoluteDestDir
+ */
public void setAbsoluteDestinationDirectory(File absoluteDestDir) {
this.absDestDir = absoluteDestDir;
}
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
index 71e0dfb..20eb016 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
@@ -29,6 +29,7 @@ import org.rhq.core.util.exception.ThrowableUtil;
/**
* The results after an attempt to purge a bundle has been completed.
*
+ * @since 4.0
* @author John Mazzitelli
*/
public class BundlePurgeResult implements Serializable {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
index 02b58a2..95965fd 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
@@ -31,7 +31,7 @@ import org.rhq.core.domain.configuration.Property;
*
* @author Jason Dobies
*/
-public interface ConfigurationFacet extends ConfigurationFacetSupport {
+public interface ConfigurationFacet {
/**
* Returns the current values for the specified resource. Note that the returns
configuration is the configuration
* settings for the managed resource itself, not to be confused with the
<i>plugin configuration</i> which is used
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
index b277663..788f432 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
@@ -28,6 +28,9 @@ import org.rhq.core.domain.configuration.RawConfiguration;
import java.util.Set;
+/**
+ * @since 3.0
+ */
public interface ResourceConfigurationFacet {
Configuration loadStructuredConfiguration();
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
index fdc3018..4770f58 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
@@ -39,6 +39,8 @@ package org.rhq.core.pluginapi.configuration;
* <br/><br/>
* With any other exception, the plugin container cannot reasonably assume that any
errors were handled and as such
* reports the entire stack trace back to the server to provide additional information
for debugging if necessary.
+ *
+ * @since 3.0
*/
public class ResourceConfigurationUpdateException extends RuntimeException {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
index d134638..937c032 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
@@ -43,7 +43,10 @@ import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.system.SystemInfoFactory;
/**
- * @author Ian Springer
+ * A helper class that plugins can use to start and stop {@link LogFileEventPoller}s.
+ *
+ * @since 1.3
+ * @author Ian Springer
*/
public class LogFileEventResourceComponentHelper {
public static final String LOG_ENTRY_EVENT_TYPE = "logEntry";
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
index df7dc31..98cb71b 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
@@ -35,6 +35,7 @@ import java.util.List;
*
* @param <T> the parent resource component type for those resources discovered by
this discovery component
*
+ * @since 1.3
* @author John Mazzitelli
*/
public interface ClassLoaderFacet<T extends ResourceComponent<?>> {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
index 54a6d41..5f6ad56 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
@@ -65,7 +65,9 @@ public class CreateResourceReport {
* may be <code>null</code>
* @param resourceConfiguration any configuration values necessary for the
resource; may be <code>null</code>
* @param packageDetails information regarding the package to be deployed
when creating the new
- * resource; may be <code>null</code>
+ * resource; may be <code>null</code>
+ *
+ * @since 1.1
*/
public CreateResourceReport(String userSpecifiedResourceName, ResourceType
resourceType, Configuration pluginConfiguration,
Configuration resourceConfiguration, ResourcePackageDetails packageDetails) {
@@ -78,10 +80,16 @@ public class CreateResourceReport {
// Public --------------------------------------------
+ /**
+ * @since 1.1
+ */
public String getUserSpecifiedResourceName() {
return userSpecifiedResourceName;
}
+ /**
+ * @since 1.1
+ */
public void setUserSpecifiedResourceName(String userSpecifiedResourceName) {
this.userSpecifiedResourceName = userSpecifiedResourceName;
}
@@ -118,6 +126,9 @@ public class CreateResourceReport {
return resourceConfiguration;
}
+ /**
+ * @since 1.1
+ */
public ResourcePackageDetails getPackageDetails() {
return packageDetails;
}
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
index 476e8d8..54f71a1 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
@@ -38,6 +38,7 @@ import org.rhq.core.domain.configuration.Configuration;
*
* @param <T> the parent resource component type for those resources discovered by
this discovery component
*
+ * @since 3.0
* @author Ian Springer
*/
public interface ManualAddFacet<T extends ResourceComponent<?>> {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
index ec253ae..ef46294 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
@@ -24,7 +24,8 @@ package org.rhq.core.pluginapi.inventory;
/**
* This enum indicates where the plugin container (and therefore the plugins) are
deployed.
- *
+ *
+ * @since 1.3
* @author John Mazzitelli
*/
public enum PluginContainerDeployment {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
index bcb16a1..20d7d17 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
@@ -119,8 +119,10 @@ public class ResourceContext<T extends
ResourceComponent<?>> {
private static Map<Children, ResourceTypeProcesses>
PROCESSES_PER_PARENT_PER_RESOURCE_TYPE = new HashMap<Children,
ResourceTypeProcesses>();
/**
- * Creates a new {@link ResourceContext} object. The plugin container is responsible
for instantiating these
- * objects; plugin writers should never have to actually create context objects.
+ * Creates a new {@link ResourceContext} object.
+ *
+ * <b>NOTE:</b> The plugin container is responsible for instantiating
these objects; plugin writers should never
+ * have to actually create context objects.
*
* @param resource the resource whose {@link
org.rhq.core.pluginapi.inventory.ResourceComponent}
* will be given this context object of the plugin
@@ -206,6 +208,8 @@ public class ResourceContext<T extends
ResourceComponent<?>> {
* The {@link Resource#getVersion() version} of the resource this context is
associated with.
*
* @return the resource's version string
+ *
+ * @since 1.2
*/
public String getVersion() {
return this.version;
@@ -408,6 +412,8 @@ public class ResourceContext<T extends
ResourceComponent<?>> {
* See {@link PluginContainerDeployment} for more information on what the return
value means.
*
* @return indicator of where the plugin container is deployed and running
+ *
+ * @since 1.3
*/
public PluginContainerDeployment getPluginContainerDeployment() {
return pluginContainerDeployment;
@@ -468,6 +474,8 @@ public class ResourceContext<T extends
ResourceComponent<?>> {
* for this parameter is {@link
AvailabilityCollectorRunnable#MIN_INTERVAL}.
*
* @return the availability collector runnable that will perform the asynchronous
checking
+ *
+ * @since 1.3
*/
public AvailabilityCollectorRunnable
createAvailabilityCollectorRunnable(AvailabilityFacet availChecker,
long interval) {
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
index b9e9bcd..d3bedd5 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
@@ -85,6 +85,8 @@ public class ResourceDiscoveryContext<T extends
ResourceComponent<?>> {
* @param pluginContainerName the name of the plugin container in which the
discovery component is running. Components
* can be assured this name is unique across
<b>all</b> plugin containers/agents running
* @param pluginContainerDeployment indicates where the plugin container is running
+ *
+ * @since 3.0
*/
public ResourceDiscoveryContext(ResourceType resourceType, T parentComponent,
ResourceContext<?> parentResourceContext, SystemInfo systemInfo,
List<ProcessScanResult> processScanResults,
@@ -115,6 +117,8 @@ public class ResourceDiscoveryContext<T extends
ResourceComponent<?>> {
* @param pluginContainerName the name of the plugin container in which the
discovery component is running. Components
* can be assured this name is unique across
<b>all</b> plugin containers/agents running
* @param pluginContainerDeployment indicates where the plugin container is running
+ *
+ * @since 1.3
*/
@SuppressWarnings("unchecked")
public ResourceDiscoveryContext(ResourceType resourceType, T parentComponent,
@@ -158,7 +162,8 @@ public class ResourceDiscoveryContext<T extends
ResourceComponent<?>> {
* plugin configuration values for use in discovery of the children.
*
* @return the resource context for the parent
- * @since 1.0.1
+ *
+ * @since 1.1
*/
public ResourceContext<?> getParentResourceContext() {
return parentResourceContext;
@@ -243,6 +248,8 @@ public class ResourceDiscoveryContext<T extends
ResourceComponent<?>> {
* See {@link PluginContainerDeployment} for more information on what the return
value means.
*
* @return indicator of where the plugin container is deployed and running
+ *
+ * @since 1.3
*/
public PluginContainerDeployment getPluginContainerDeployment() {
return pluginContainerDeployment;
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
index 59ca30f..715880d 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
@@ -93,7 +93,10 @@ public class OperationResult {
/**
* Returns the plugin-specific error message for this operation, or null if the
operation was successful.
+ *
* @return The stored message or null.
+ *
+ * @since 1.2
*/
public String getErrorMessage() {
return this.errorMessage;
@@ -106,6 +109,8 @@ public class OperationResult {
* be marked as FAILURE
*
* @param errorMessage a plugin specific error that indicates why this operation has
failed
+ *
+ * @since 1.2
*/
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
index 029ae26..b9d52ab 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
@@ -8,6 +8,8 @@ import org.rhq.core.system.SystemInfo;
* A global context containing information about a plugin.
*
* @author John Mazzitelli
+ *
+ * @since 1.2
*/
public class PluginContext {
private final String pluginName;
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
index 9acc0ab..e68abb4 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
@@ -29,6 +29,8 @@ package org.rhq.core.pluginapi.plugin;
* a place to clean up those resources.
*
* @author John Mazzitelli
+ *
+ * @since 1.2
*/
public interface PluginLifecycleListener {
/**
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
index cbd1b4b..84b3a5f 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
@@ -28,6 +28,8 @@ import java.io.Serializable;
* Encapsulates information about a snapshot report request.
*
* @author John Mazzitelli
+ *
+ * @since 1.3
*/
public class SnapshotReportRequest implements Serializable {
private static final long serialVersionUID = 1L;
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
index cad67f2..30d8882 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
@@ -29,6 +29,8 @@ import java.io.Serializable;
* Contains the results of a snapshot report, including a stream to the contents of the
snapshot.
*
* @author John Mazzitelli
+ *
+ * @since 1.3
*/
public class SnapshotReportResults implements Serializable {
private static final long serialVersionUID = 1L;
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
index 538eef6..c673923 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
@@ -28,6 +28,7 @@ package org.rhq.core.pluginapi.support;
*
* @author John Mazzitelli
*
+ * @since 1.3
*/
public interface SupportFacet {
/**
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
index 702a768..f1d6807 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
@@ -20,7 +20,6 @@
* if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
package org.rhq.core.pluginapi.upgrade;
import java.io.File;
@@ -41,7 +40,8 @@ import org.rhq.core.system.SystemInfo;
* Represents a resource during the resource upgrade phase of discovery.
*
* @see ResourceUpgradeFacet
- *
+ *
+ * @since 3.0
* @author Lukas Krejci
*/
public class ResourceUpgradeContext<T extends ResourceComponent<?>> extends
ResourceContext<T> {
@@ -51,7 +51,9 @@ public class ResourceUpgradeContext<T extends
ResourceComponent<?>> extends Reso
private final String description;
/**
- * @see ResourceContext#ResourceContext(Resource, ResourceComponent,
ResourceDiscoveryComponent, SystemInfo, File, File, String, EventContext,
OperationContext, ContentContext, Executor, PluginContainerDeployment)
+ * @see ResourceContext#ResourceContext(org.rhq.core.domain.resource.Resource,
org.rhq.core.pluginapi.inventory.ResourceComponent,
org.rhq.core.pluginapi.inventory.ResourceContext,
org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent,
org.rhq.core.system.SystemInfo, java.io.File, java.io.File, String,
org.rhq.core.pluginapi.event.EventContext,
org.rhq.core.pluginapi.operation.OperationContext,
org.rhq.core.pluginapi.content.ContentContext, java.util.concurrent.Executor,
org.rhq.core.pluginapi.inventory.PluginContainerDeployment)
+ *
+ * @since 4.0
*/
public ResourceUpgradeContext(Resource resource, ResourceContext<?>
parentResourceContext,
T parentResourceComponent, ResourceDiscoveryComponent<T>
resourceDiscoveryComponent, SystemInfo systemInfo,
@@ -68,6 +70,13 @@ public class ResourceUpgradeContext<T extends
ResourceComponent<?>> extends Reso
this.description = resource.getDescription();
}
+ /**
+ * Returns the context of the Resource component's parent Resource component.
+ *
+ * @return the context of the Resource component's parent Resource component
+ *
+ * @since 4.0
+ */
@Override
public ResourceContext<?> getParentResourceContext() {
return super.getParentResourceContext();
@@ -84,4 +93,5 @@ public class ResourceUpgradeContext<T extends
ResourceComponent<?>> extends Reso
public String getDescription() {
return description;
}
+
}
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
index 13c155a..55d541f 100644
---
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
+++
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
@@ -31,7 +31,8 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
* upgrading the existing resources to a new format needed by an updated resource
component.
* This is useful for example in the case when a new version of plugin redefined a
resource
* key generation algorithm and wants to upgrade the legacy resources to use the new
format.
- *
+ *
+ * @since 3.0
* @author Lukas Krejci
*/
public interface ResourceUpgradeFacet<T extends ResourceComponent<?>> {
commit d71b22a573d7f9e576b23407fcdc4ad4c0c3d846
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sat Feb 25 14:36:33 2012 -0500
use correct syntax for passing sysprop to surefire (fixes my previous commit)
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index ae11a4b..f8aa8f9 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -146,7 +146,7 @@
<!--
<argLine>-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
- <systemPropertyVariables>
+ <systemPropertyVariables combine.children="append">
<rhq.comm.test.connectorBindPort>${rhq.comm.test.connectorBindPort}</rhq.comm.test.connectorBindPort>
<rhq.comm.test.connector2BindPort>${rhq.comm.test.connector2BindPort}</rhq.comm.test.connector2BindPort>
</systemPropertyVariables>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 92068fd..47f2f1c 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -111,16 +111,10 @@
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
- <systemProperties>
- <property>
- <name>project.artifactId</name>
- <value>${project.artifactId}</value>
- </property>
- <property>
- <name>project.version</name>
- <value>${project.version}</value>
- </property>
- </systemProperties>
+ <systemPropertyVariables
combine.children="append">
+
<project.artifactId>${project.artifactId}</project.artifactId>
+
<project.version>${project.version}</project.version>
+ </systemPropertyVariables>
</configuration>
</execution>
</executions>
diff --git a/pom.xml b/pom.xml
index 2e346f8..e07cf64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -820,9 +820,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
- <systemProperties>
+ <systemPropertyVariables>
<java.util.prefs.userRoot>${java.io.tmpdir}/${user.name}</java.util.prefs.userRoot>
- </systemProperties>
+ </systemPropertyVariables>
</configuration>
</plugin>
commit 82bd4233ab03a113f51e46021bf94c36deba5dd3
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sat Feb 25 10:45:45 2012 -0500
write user prefs to /tmp/user, rather than /home/user, when running tests,
to avoid locking errors when running with NFS home dirs via Jenkins
diff --git a/pom.xml b/pom.xml
index 290a193..2e346f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -820,6 +820,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
+ <systemProperties>
+
<java.util.prefs.userRoot>${java.io.tmpdir}/${user.name}</java.util.prefs.userRoot>
+ </systemProperties>
</configuration>
</plugin>
commit 4a808b506c8ece503ec32fbd006d1dd1314fa3e5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 22:08:54 2012 -0600
Delete only changesets directory to preserve classes and resource created by the build
process.
diff --git
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 195cb4b..3f2f46f 100644
---
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -134,9 +134,8 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
@Test
public void testStoreChangeSet() throws Exception {
File rootDir = toFile(getClass().getResource("."));
- deleteDirectory(rootDir);
-
File changeSetsDir = new File(rootDir, "changesets");
+ deleteDirectory(changeSetsDir);
changeSetsDir.mkdirs();
Headers headers = new Headers();
commit f09ea66e14910e5fa3490cd1c12cf8278fa6145b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 19:04:47 2012 -0600
No need to enable tests based on a local private variable.
Because this test class was not compiled, TestDefService was not compiled either
resulting in build errors in integration tests component.
diff --git
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 276b669..195cb4b 100644
---
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -79,12 +79,9 @@ import org.rhq.enterprise.server.util.LookupUtil;
*/
// TODO: Figure out how to get this test class to run without causing issues in the
test-jar generation. I don't
// understand exactly what the deal is but removing this dependency on an itests group
causes the server test jar to
-// not correctly generate the drift package contents.
-@Test
+// not correctly generate the drift package contents.
public class DriftManagerBeanTest extends AbstractEJB3Test {
- private static final boolean ENABLE_TESTS = true;
-
private JPADriftServerLocal jpaDriftServer;
private DriftManagerLocal driftManager;
private Subject overlord;
@@ -134,7 +131,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
}
}
- @Test(enabled = ENABLE_TESTS)
+ @Test
public void testStoreChangeSet() throws Exception {
File rootDir = toFile(getClass().getResource("."));
deleteDirectory(rootDir);
@@ -214,7 +211,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
assertEquals(DriftFileStatus.REQUESTED, driftFile.getStatus());
}
- @Test(enabled = ENABLE_TESTS)
+ @Test
public void testDriftDef() throws Exception {
Configuration config = new Configuration();
DriftDefinition driftDefPojo = new DriftDefinition(config);
commit 00d6ba36588ff34470a018db685fe145c9ca507e
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Feb 24 17:08:27 2012 -0500
in DbSetupUtility, read the test datasource connection props from Maven's
rhq.test.ds.* props, rather than using hard-coded values
diff --git
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
index 753b8f5..5affecb 100644
---
a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
+++
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.server.util;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URL;
@@ -48,24 +49,35 @@ public class DbSetupUtility {
public static final String JON300_SCHEMA_VERSION = "2.116";
- private static final String DB_NAME =
System.getProperty("rhq.test.ds.db-name", "rhq");
- private static final String DB_SERVER_NAME =
System.getProperty("rhq.test.ds.server-name", "127.0.0.1");
- private static final String DB_CONNECTION_URL =
System.getProperty("rhq.test.ds.connection-url",
- "jdbc:postgresql://" + DB_SERVER_NAME + ":5432/" + DB_NAME);
- private static final String DB_USER_NAME =
System.getProperty("rhq.test.ds.user-name", "rhqadmin");
- private static final String DB_PASSWORD =
System.getProperty("rhq.test.ds.password", "rhqadmin");
-
private static final String BASE_RESOURCE_PATH =
DbSetupUtility.class.getPackage().getName().replace('.', '/');
+ private static TestDatasourceConfiguration testDsConfig;
+
+ private static TestDatasourceConfiguration getTestDatasourceConfiguration() {
+ if (testDsConfig == null) {
+ Properties testDsProperties = new Properties();
+ InputStream resourceAsStream =
DbSetupUtility.class.getResourceAsStream("test-ds.properties");
+ try {
+ testDsProperties.load(resourceAsStream);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to load test-ds.properties from
classloader.", e);
+ }
+ testDsConfig = new TestDatasourceConfiguration(testDsProperties);
+ System.out.println("Using test datasource with config " +
testDsConfig + "...");
+ }
+ return testDsConfig;
+ }
+
public static void dbreset() throws Exception {
- System.out.println("Resetting DB at " + DB_CONNECTION_URL +
"...");
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
+ System.out.println("Resetting DB at " + testDs.connectionUrl +
"...");
// NOTE: We do not use DBReset.performDBReset() here, since DBReset deletes the
schema, which requires there to
// be no active connections to the DB. Liquibase.dropAll(), on the other
hand, just deletes all the
// objects in the DB, which has no such requirement.
- String dbDriver =
DatabaseFactory.getInstance().findDefaultDriver(DB_CONNECTION_URL);
+ String dbDriver =
DatabaseFactory.getInstance().findDefaultDriver(testDs.connectionUrl);
Database database =
CommandLineUtils.createDatabaseObject(DbSetupUtility.class.getClassLoader(),
- DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD, dbDriver, null, null, null);
+ testDs.connectionUrl, testDs.userName, testDs.password, dbDriver, null, null,
null);
//Database database =
DatabaseFactory.getInstance().findCorrectDatabaseImplementation(
// new JdbcConnection(AbstractEJB3Test.getConnection()));
Liquibase liquibase = new Liquibase(null, new ClassLoaderResourceAccessor(),
database);
@@ -92,7 +104,9 @@ public class DbSetupUtility {
dataFileResourcePath = "db-data-combined.xml";
}
- DBSetup dbsetup = new DBSetup(DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD);
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
+
+ DBSetup dbsetup = new DBSetup(testDs.connectionUrl, testDs.userName,
testDs.password);
dbsetup.setup(schemaFileResourcePath);
dbsetup.setup(dataFileResourcePath);
}
@@ -101,20 +115,21 @@ public class DbSetupUtility {
System.out.println("Upgrading RHQ DB to schema version [" +
targetSchemaVersion + "]...");
File logfile = File.createTempFile("rhq.test",
"dbupgrade.log");
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
try {
- // get the URL for the dbupgrade Ant script, which is located in the dbutils
jar
+ // Get the URL for the dbupgrade Ant script, which is located in the dbutils
jar.
URL dbupgradeXmlFileUrl =
DbSetupUtility.class.getClassLoader().getResource("db-upgrade.xml");
Properties antProps = new Properties();
- antProps.setProperty("jdbc.url", DB_CONNECTION_URL);
- antProps.setProperty("jdbc.user", DB_USER_NAME);
- antProps.setProperty("jdbc.password", DB_PASSWORD);
+ antProps.setProperty("jdbc.url", testDs.connectionUrl);
+ antProps.setProperty("jdbc.user", testDs.userName);
+ antProps.setProperty("jdbc.password", testDs.password);
antProps.setProperty("target.schema.version",
targetSchemaVersion);
startAnt(dbupgradeXmlFileUrl, "db-ant-tasks.properties", antProps,
logfile);
} catch (Exception e) {
- throw new RuntimeException("Cannot upgrade the RHQ DB at URL " +
DB_CONNECTION_URL + " to schema version "
- + targetSchemaVersion + ".", e);
+ throw new RuntimeException("Cannot upgrade the RHQ DB at [" +
testDs.connectionUrl + "] to schema version ["
+ + targetSchemaVersion + "].", e);
}
return;
@@ -205,5 +220,40 @@ public class DbSetupUtility {
}
}
}
+
+ private static class TestDatasourceConfiguration {
+ abstract class Property {
+ public static final String DB_CONNECTION_URL =
"rhq.test.ds.connection-url";
+ public static final String DB_SERVER_NAME =
"rhq.test.ds.server-name";
+ public static final String DB_NAME = "rhq.test.ds.db-name";
+ public static final String DB_USER_NAME = "rhq.test.ds.user-name";
+ public static final String DB_PASSWORD = "rhq.test.ds.password";
+ }
+
+ String connectionUrl;
+ String serverName;
+ String dbName;
+ String userName;
+ String password;
+
+ private TestDatasourceConfiguration(Properties props) {
+ connectionUrl = props.getProperty(Property.DB_CONNECTION_URL);
+ serverName = props.getProperty(Property.DB_SERVER_NAME);
+ dbName = props.getProperty(Property.DB_NAME);
+ userName = props.getProperty(Property.DB_USER_NAME);
+ password = props.getProperty(Property.DB_PASSWORD);
+ }
+
+ @Override
+ public String toString() {
+ // NOTE: For the sake of security, we don't include the password here.
+ return "{" +
+ "connectionUrl='" + connectionUrl + '\'' +
+ ", serverName='" + serverName + '\'' +
+ ", dbName='" + dbName + '\'' +
+ ", userName='" + userName + '\'' +
+ '}';
+ }
+ }
}
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
new file mode 100644
index 0000000..448c69e
--- /dev/null
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
@@ -0,0 +1,7 @@
+# The values of these properties get substituted by Maven during the test:resources
phase.
+rhq.test.ds.driver-class = ${rhq.test.ds.driver-class}
+rhq.test.ds.connection-url = ${rhq.test.ds.connection-url}
+rhq.test.ds.server-name = ${rhq.test.ds.server-name}
+rhq.test.ds.db-name = ${rhq.test.ds.db-name}
+rhq.test.ds.user-name = ${rhq.test.ds.user-name}
+rhq.test.ds.password = ${rhq.test.ds.password}
commit 44ef286191883ac429d0eddb04b7a76bffc21a68
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 15:36:12 2012 -0600
[BZ 749315] Set max and min values for integer validators to corresponding integer
limits when they are not specified other config properties.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
index 2b76531..06330a8 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
@@ -1563,9 +1563,16 @@ public class ConfigurationEditor extends LocatableVLayout {
if (integerConstraint.getMinimum() != null) {
validator.setMin(integerConstraint.getMinimum().intValue());
}
+ else {
+ validator.setMin(Integer.MIN_VALUE);
+ }
if (integerConstraint.getMaximum() != null) {
validator.setMax(integerConstraint.getMaximum().intValue());
}
+ else {
+ validator.setMax(Integer.MAX_VALUE);
+ }
+
validators.add(validator);
} else if (constraint instanceof FloatRangeConstraint) {
FloatRangeConstraint floatConstraint = ((FloatRangeConstraint)
constraint);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
index ef4e20f..486b20b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
@@ -125,6 +125,7 @@ public class DurationItem extends CanvasItem {
valueItem.setValue(getValue());
IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
integerRangeValidator.setMin(1);
+ integerRangeValidator.setMax(Integer.MAX_VALUE);
valueItem.setValidators(integerRangeValidator);
valueItem.setValidateOnChange(true);
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
index 20c3d2a..00a4567 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
@@ -672,9 +672,16 @@ public abstract class RPCDataSource<T, C extends BaseCriteria>
extends DataSourc
if (minValue != null) {
integerRangeValidator.setMin(minValue);
}
+ else {
+ integerRangeValidator.setMin(Integer.MIN_VALUE);
+ }
if (maxValue != null) {
integerRangeValidator.setMax(maxValue);
}
+ else {
+ integerRangeValidator.setMax(Integer.MAX_VALUE);
+ }
+
textField.setValidators(integerRangeValidator);
}
return textField;
commit 5c0204f45a5f89649e44bca4c5b54f5742db39f0
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Feb 24 14:41:50 2012 -0500
update maven jar plugin from 2.3.1 to 2.4
diff --git a/pom.xml b/pom.xml
index a56fcd9..290a193 100644
--- a/pom.xml
+++ b/pom.xml
@@ -579,7 +579,7 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.1</version>
+ <version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
commit 5fdba59819810c5ae5cd76f7132cc8fc866ee722
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Fri Feb 24 10:22:37 2012 -0800
BZ795833 SearchBar Broken after gwt upgrade] Enabled enter key and fixed mangling of
critera in web mode.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index f72d12e..ad77c1a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -339,12 +339,6 @@ public class Table<DS extends RPCDataSource> extends
LocatableHLayout implements
contents.removeChild(child);
}
- if (filterForm.hasContent()) {
- contents.addMember(filterForm);
- }
-
- // add the listGrid defined in onInit
- contents.addMember(listGrid);
// Title
this.titleCanvas = new HTMLFlow();
@@ -357,6 +351,12 @@ public class Table<DS extends RPCDataSource> extends
LocatableHLayout implements
contents.addMember(titleLayout, 0);
}
+ if (filterForm.hasContent()) {
+ contents.addMember(filterForm);
+ }
+ // add the listGrid defined in onInit
+ contents.addMember(listGrid);
+
// Footer
// A second toolstrip that optionally appears before the main footer - it
will contain extra widgets.
@@ -1134,6 +1134,7 @@ public class Table<DS extends RPCDataSource> extends
LocatableHLayout implements
@Override
public void onKeyPress(KeyPressEvent event) {
if (event.getKeyName().equals("Enter")) {
+ Log.debug("Table.TableFilter Pressed Enter key");
fetchFilteredTableData();
}
}
@@ -1149,15 +1150,18 @@ public class Table<DS extends RPCDataSource> extends
LocatableHLayout implements
@Override
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
// TODO (ips, 10/14/11): Figure out why this event is being sent twice.
However, this is not urgent,
// since the if check below will prevent the 2nd
event from triggering a redundant
// fetch request.
+ Log.debug("Table.TableFilter Pressed Enter key2");
String searchBarValue = searchBarItem.getSearchBar().getValue();
String hiddenValue = (String) hiddenItem.getValue();
+ Log.debug("Table.TableFilter searchBarValue :"+searchBarValue+
", hiddenValue"+hiddenValue);
// Only send a fetch request if the user actually changed the search
expression.
if (!equals(searchBarValue, hiddenValue)) {
hiddenItem.setValue(searchBarValue);
+ Log.debug("Table.TableFilter fetchFilteredTableData");
fetchFilteredTableData();
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
index 15f16aa..cb39479 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
@@ -371,7 +371,7 @@ public class FlexSearchBar extends AbstractSearchBar {
class PatternNameFieldEventHandler implements KeyPressHandler, ClickHandler,
BlurHandler {
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
Log.debug("key press pattern name field");
turnNameFieldIntoLabel(true);
}
@@ -562,7 +562,7 @@ public class FlexSearchBar extends AbstractSearchBar {
}
public String getValue() {
- return autoCompletePatternField.getValue();
+ return autoCompletePatternField.getText();
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
index 3f18b97..c4dc6eb 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.search;
import java.util.List;
-import java.util.logging.Logger;
import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -401,8 +400,9 @@ public class SearchBar extends AbstractSearchBar {
class PatternNameFieldEventHandler implements KeyPressHandler, ClickHandler,
BlurHandler {
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
- Log.debug("key press pattern name field");
+ //if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
+ Log.debug("ENTER key press on pattern name field");
turnNameFieldIntoLabel();
}
}
@@ -414,6 +414,7 @@ public class SearchBar extends AbstractSearchBar {
}
public void onBlur(BlurEvent event) {
+ Log.debug("onblur event on pattern name field");
lastNameFieldBlurTime = System.currentTimeMillis();
turnNameFieldIntoLabel();
}
@@ -427,6 +428,8 @@ public class SearchBar extends AbstractSearchBar {
class StarImageEventHandler implements ClickHandler, MouseOverHandler,
MouseOutHandler {
public void onClick(ClickEvent event) {
+ Log.debug("onClick for StarImage");
+ lastNameFieldBlurTime = System.currentTimeMillis();
long diff = System.currentTimeMillis() - lastNameFieldBlurTime;
if (Math.abs(diff) < 750) {
/*
@@ -472,6 +475,7 @@ public class SearchBar extends AbstractSearchBar {
class ArrowImageEventHandler implements ClickHandler {
public void onClick(ClickEvent event) {
+ Log.debug("onClick for ArrowImage");
savedSearchesGrid.updateModel(new
AsyncCallback<List<SavedSearch>>() {
@Override
public void onFailure(Throwable caught) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index 9d92a4d..8030b2b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -23,7 +23,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import java.util.logging.Logger;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
@@ -235,7 +234,8 @@ public class SuggestTextBox_v3 extends Composite implements HasText,
HasAllFocus
}
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
+ Log.debug("****** Pressed Enter in SearchBar");
hideSuggestionList();
}
@@ -249,6 +249,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText,
HasAllFocus
}
public void onValueChange(ValueChangeEvent<String> event) {
+ Log.debug("OnValueChange in SearchBar: "+event.getValue());
delegateEvent(SuggestTextBox_v3.this, event);
}