modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/measurement/MeasurementAgentService.java | 6 +---- modules/core/dbutils/pom.xml | 2 - modules/core/dbutils/src/main/scripts/dbsetup/inventory-schema.xml | 1 modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 10 +++++++++ modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java | 11 ++++++++++ 5 files changed, 25 insertions(+), 5 deletions(-)
New commits: commit 0f62ed4950ae6f39a9905ba614ad2bba8ea3c44b Merge: e60ff62... 81d68da... Author: John Sanda jsanda@redhat.com Date: Tue Oct 19 13:16:52 2010 -0400
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit e60ff628d63a550a7ef0362cd4859c7b6d78b4c4 Author: John Sanda jsanda@redhat.com Date: Tue Oct 19 13:04:46 2010 -0400
Adding deleted flag to ResourceType
This commit also included the dbsetup/dbupgrade changes. The deleted flag will be set to indicate that a ResourceType will be deleted.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml index 379c31f..8f393cc 100644 --- a/modules/core/dbutils/pom.xml +++ b/modules/core/dbutils/pom.xml @@ -22,7 +22,7 @@
<properties> <scm.module.path>modules/core/dbutils/</scm.module.path> - <db.schema.version>2.100</db.schema.version> + <db.schema.version>2.101</db.schema.version> </properties>
<dependencies> diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/inventory-schema.xml b/modules/core/dbutils/src/main/scripts/dbsetup/inventory-schema.xml index 48f9f2a..1644849 100644 --- a/modules/core/dbutils/src/main/scripts/dbsetup/inventory-schema.xml +++ b/modules/core/dbutils/src/main/scripts/dbsetup/inventory-schema.xml @@ -17,6 +17,7 @@ <column name="PLUGIN" type="VARCHAR2" size="100"/> <column name="CTIME" type="LONG"/> <column name="MTIME" type="LONG"/> + <column name="DELETED" type="BOOLEAN" default="FALSE"/> <column name="SUBCATEGORY_ID" type="INTEGER"/> <!-- TODO add support to DB setup for tables with circular dependencies and then add back this RI diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml index b462cfa..4b4c6a0 100644 --- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml +++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml @@ -3254,6 +3254,16 @@ <!-- location was only exposed in the struts-based UI, so it hasn't been seen in years anyway --> <schema-deleteColumn table="RHQ_RESOURCE_GROUP" column="LOCATION" /> </schemaSpec> + + <schemaSpec version="2.101"> + <schema-addColumn table="RHQ_RESOURCE_TYPE" column="DELETED" columnType="BOOLEAN"/> + <schema-directSQL> + <statement desc="Set deleted flag for existing resources types to false"> + UPDATE RHQ_RESOURCE_TYPE + SET DELETED = false + </statement> + </schema-directSQL> + </schemaSpec> </dbupgrade> </target> </project> diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java index 19cdd11..add1a53 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java @@ -307,6 +307,9 @@ public class ResourceType implements Serializable, Comparable<ResourceType> { @Column(name = "MTIME") private Long mtime;
+ @Column(name = "DELETED") + private boolean deleted; + @ManyToMany(mappedBy = "parentResourceTypes", cascade = { CascadeType.REFRESH }) @OrderBy //@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @@ -534,6 +537,14 @@ public class ResourceType implements Serializable, Comparable<ResourceType> { return this.mtime; }
+ public boolean isDeleted() { + return deleted; + } + + public void setDeleted(boolean deleted) { + this.deleted = deleted; + } + @PreUpdate void onUpdate() { this.mtime = System.currentTimeMillis();
commit 1b5f9f9975a41f056db0c77639bd5563148b56d7 Merge: fba8b55... 06382be... Author: John Sanda jsanda@redhat.com Date: Tue Oct 19 11:09:16 2010 -0400
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit fba8b55540b9624ef53d3d6f14ffe2cd333deeba Merge: 9690d71... a6d0d0b... Author: John Sanda jsanda@redhat.com Date: Mon Oct 18 10:26:51 2010 -0400
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 9690d71a55f959b95ab6859b39d641ec0d3f4a4b Author: John Sanda jsanda@redhat.com Date: Tue Oct 12 17:48:48 2010 -0400
Updating javadocs
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/measurement/MeasurementAgentService.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/measurement/MeasurementAgentService.java index 786e60f..dba93fc 100644 --- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/measurement/MeasurementAgentService.java +++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/measurement/MeasurementAgentService.java @@ -70,10 +70,8 @@ public interface MeasurementAgentService { * <p>Measurement data collected via this call will have its non-persistent "name" field set the name of the * measurement, but will not have scheduleIds set.</p> * - * @param resourceId id of resource to collect from - * @param dataType the data type of the of the metrics to be collected - either - * {@link DataType#MEASUREMENT} or {@link DataType#TRAIT} - * @param measurementNames the names of the numeric metrics or traits to be collected + * @param resourceId id of resource to collect from + * @param requests Each request specifies a metric to be collected along with its corresponding data type * @return the set of collected measurements with their data values collected */ Set<MeasurementData> getRealTimeMeasurementValue(int resourceId, List<MeasurementDataRequest> requests);