[rhq] Branch 'feature/cassandra-backend' - modules/helpers
by John Sanda
modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java | 14 +++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 98030d80f768f87aa2eecf91b64f5b7c8e3b2240
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Mar 14 12:38:37 2013 -0400
do not use hard coded hostnames when creating session for simulator
diff --git a/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java b/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java
index 8901538..7cb1fbf 100644
--- a/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java
+++ b/modules/helpers/metrics-simulator/src/main/java/org/rhq/metrics/simulator/Simulator.java
@@ -72,7 +72,7 @@ public class Simulator implements ShutdownManager {
public void run(SimulationPlan plan) {
List<CassandraNode> nodes = initCluster(plan);
createSchema(nodes);
- Session session = createSession();
+ Session session = createSession(nodes);
MetricsServer metricsServer = new MetricsServer();
metricsServer.setSession(session);
@@ -200,13 +200,13 @@ public class Simulator implements ShutdownManager {
}
}
- private Session createSession() throws NoHostAvailableException {
+ private Session createSession(List<CassandraNode> nodes) throws NoHostAvailableException {
try {
SimpleAuthInfoProvider authInfoProvider = new SimpleAuthInfoProvider();
authInfoProvider.add("username", "rhqadmin").add("password", "rhqadmin");
Cluster cluster = Cluster.builder()
- .addContactPoints("127.0.0.1", "127.0.0.2")
+ .addContactPoints(getHostNames(nodes))
.withAuthInfoProvider(authInfoProvider)
.withCompression(SNAPPY)
.build();
@@ -222,6 +222,14 @@ public class Simulator implements ShutdownManager {
}
}
+ private String[] getHostNames(List<CassandraNode> nodes) {
+ String[] hostnames = new String[nodes.size()];
+ for (int i = 0; i < hostnames.length; ++i) {
+ hostnames[i] = nodes.get(i).getHostName();
+ }
+ return hostnames;
+ }
+
private Set<Schedule> initSchedules(ScheduleGroup scheduleSet) {
long nextCollection = System.currentTimeMillis();
Set<Schedule> schedules = new HashSet<Schedule>();
11 years, 3 months
[rhq] 2 commits - modules/enterprise
by mike thompson
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AbstractGraph.java | 4 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityGraph.java | 14 +++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityLineGraphType.java | 26 ++++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 2
6 files changed, 31 insertions(+), 19 deletions(-)
New commits:
commit 0db1a8ec8a0806e0123657969adc561d637f0afd
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Mar 13 15:56:47 2013 -0700
Trivial - add more docs, clean up unused code.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AbstractGraph.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AbstractGraph.java
index 65866ad..84655ef 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AbstractGraph.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AbstractGraph.java
@@ -18,12 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
-import java.util.List;
import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite;
-import org.rhq.core.domain.measurement.composite.MeasurementOOBComposite;
-import org.rhq.core.domain.util.PageList;
/**
* Common Graph capability used across multiple graphs.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
index 89b2942..2fa17eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
@@ -47,7 +47,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
* Build the Group version of the View that shows the individual graph views.
* @author Mike Thompson
*/
-public class D3GroupGraphListView extends AbstractD3GraphListView {
+public final class D3GroupGraphListView extends AbstractD3GraphListView {
private ResourceGroup resourceGroup;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 37a1cf2..e670392 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -317,8 +317,6 @@ public class ResourceGroupDetailView extends
viewFactory = (!visible) ? null : new ViewFactory() {
@Override
public Canvas createView() {
- // return new FullHTMLPane(
- // "/rhq/group/monitor/tables-plain.xhtml?groupId=" + groupId);
//gwt version of group table view.
return new GroupMonitoringTablesView(groupComposite);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index c60a714..ae141bc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -414,8 +414,6 @@ public class ResourceDetailView extends
viewFactory = (!visibleToIE8) ? null : new ViewFactory() {
@Override
public Canvas createView() {
- //d3GraphListView = D3GraphListView.createSummaryMultipleGraphs(monitoringTab.extendLocatorId("NewGraphs"), resourceComposite.getResource(), true);
- //return d3GraphListView;
return createD3GraphListView();
}
};
commit 8000c036b7af46f9d4053099851a2052b05a98c6
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Mar 13 15:54:35 2013 -0700
[BZ 872347] - Fix availability charting bug that blows up inside d3.js.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityGraph.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityGraph.java
index 0d40a29..a5f3f02 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityGraph.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityGraph.java
@@ -19,11 +19,23 @@
package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
/**
+ * Interface for AvailabilityGraphs. Implementations of this interface
+ * always need to define the capability of creating a graph marker
+ * - some kind of div with an id that d3 can bind to and able to
+ * drawJsniChart to actually draw(render) the d3 graph.
+ *
* @author Mike Thompson
*/
public interface AvailabilityGraph {
- void drawJsniChart();
+ /**
+ * Step 1 create the graph marker to allow d3 to bind.
+ */
+ void createGraphMarker();
+ /**
+ * Step 2 bind to the above div#id and render the chart.
+ */
+ void drawJsniChart();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityLineGraphType.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityLineGraphType.java
index e2c1b86..96f67d2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityLineGraphType.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityLineGraphType.java
@@ -32,7 +32,7 @@ import org.rhq.enterprise.gui.coregui.client.util.MeasurementConverterClient;
/**
* Contains the javascript chart definition for an implementation of the d3 availability chart. This implementation is
- * just a line that changes color based on availability type: up=green, down=red, unknown=grey.
+ * just a line that changes color based on availability type: up=green, down=red, orange=disabled, yellow=warn, unknown=grey.
*
* @author Mike Thompson
*/
@@ -144,24 +144,30 @@ public class AvailabilityLineGraphType {
var margin = {top: 5, right: 5, bottom: 5, left: 40},
width = 750 - margin.left - margin.right,
height = 20 - margin.top - margin.bottom,
+ xAxisMin = $wnd.d3.min(availChartContext.data, function(d){
+ return +d.x;
+ }),
+ xAxisMax = $wnd.d3.max(availChartContext.data,function(d){
+ return +d.x;
+ }),
timeScale = $wnd.d3.time.scale()
.range([0, width])
- .domain($wnd.d3.extent(availChartContext.data, function (d) {
- return d.x;
- })),
+ .domain($wnd.d3.extent(availChartContext.data, function(d){
+ return +d.x;
+ }));
- yScale = $wnd.d3.scale.linear()
+ var yScale = $wnd.d3.scale.linear()
.clamp(true)
.rangeRound([height, 0])
- .domain([0, 1]),
+ .domain([0, 1]);
- svg = $wnd.d3.select(availChartContext.chartSelection).append("g")
+
+ var svg = $wnd.d3.select(availChartContext.chartSelection).append("g")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
// The gray bars at the bottom leading up
svg.selectAll("rect.availBar")
.data(availChartContext.data)
@@ -250,7 +256,9 @@ public class AvailabilityLineGraphType {
}
- draw(availChartContext);
+ if(availChartContext.data.length > 0){
+ draw(availChartContext);
+ }
console.timeEnd("availabilityChart");
console.groupEnd("AvailabilityChart");
11 years, 3 months
[rhq] 2 commits - modules/core
by Jay Shaughnessy
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/Bundle.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDestination.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleFile.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeployment.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleType.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/AffinityGroup.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverList.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverListDetails.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEvent.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEventDetails.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/cloud/Server.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/common/SystemConfiguration.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/AbstractResourceConfigurationUpdate.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/RawConfiguration.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationTemplate.java | 6 ++----
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionEnumeration.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyGroupDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java | 6 ++----
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/constraint/Constraint.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/configuration/group/AbstractGroupConfigurationUpdate.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/Advisory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryBuglist.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryCVE.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryPackage.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/Architecture.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/CVE.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentServiceRequest.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceSyncResults.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/Distribution.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionFile.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionType.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackage.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/Package.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageBitsBlob.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageInstallationStep.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/Repo.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroup.java | 10 +++++-----
modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroupType.java | 8 ++++----
modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationship.java | 8 ++++----
modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationshipType.java | 8 ++++----
modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoSyncResults.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinitionTemplate.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftSet.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java | 5 +++--
modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java | 5 +++--
modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java | 5 +++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementSchedule.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataValue.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationScheduleEntity.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/plugin/AbstractPlugin.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/CreateResourceHistory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/DeleteResourceHistory.java | 6 ++----
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProcessScan.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProductVersion.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceError.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceSubCategory.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/GroupDefinition.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/LdapGroup.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java | 4 ++--
modules/core/domain/src/main/java/org/rhq/core/domain/tagging/Tag.java | 4 ++--
86 files changed, 184 insertions(+), 187 deletions(-)
New commits:
commit 9ff285a78afeb6843eaafbc4c6cdc078d47df5d4
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Mar 13 17:14:03 2013 -0400
We did not have a consistent approach to naming SequenceGenerators. To avoid
confusion, and because there is some evidence that duplicating names in the
same persistence context may be a bad idea, settle on using the name of
the underlying sequence as the generator name.
This should be safe for upgrades since (currently) hibernate seems to be
using the the desired sequence (specified by sequenceName) despite duplicate
generator names in the same context. We want to ensure that a change in
Hibernate impl won't affect us adversely.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/Bundle.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/Bundle.java
index de09d25..7b5499f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/Bundle.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/Bundle.java
@@ -65,7 +65,7 @@ import org.rhq.core.domain.tagging.Tag;
+ "(:type = b.bundleType.name OR :type IS NULL) AND (:name = b.name OR :name IS NULL)")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_ID_SEQ", sequenceName = "RHQ_BUNDLE_ID_SEQ")
@Table(name = "RHQ_BUNDLE")
@XmlAccessorType(XmlAccessType.FIELD)
public class Bundle implements Serializable {
@@ -76,7 +76,7 @@ public class Bundle implements Serializable {
public static final String QUERY_FIND_BY_TYPE_AND_NAME = "Bundle.findByTypeAndName";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
index a9680f3..1507f9a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
@@ -78,7 +78,7 @@ import org.rhq.core.domain.tagging.Tag;
+ " WHERE bd.replacedBundleDeploymentId IN " //
+ " ( SELECT innerbd.id FROM BundleDeployment innerbd " //
+ " WHERE innerbd.bundleVersion.id = :bundleVersionId ) ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ", sequenceName = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ")
@Table(name = "RHQ_BUNDLE_DEPLOYMENT")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleDeployment implements Serializable {
@@ -89,7 +89,7 @@ public class BundleDeployment implements Serializable {
public static final String QUERY_UPDATE_FOR_VERSION_REMOVE = "BundleDeployment.updateForVersionRemove";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDestination.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDestination.java
index a326b46..0d9e3ff 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDestination.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDestination.java
@@ -60,7 +60,7 @@ import org.rhq.core.domain.tagging.Tag;
@Entity
@NamedQueries( { @NamedQuery(name = BundleDestination.QUERY_FIND_ALL, query = "SELECT bd FROM BundleDestination bd") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_DESTINATION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_DESTINATION_ID_SEQ", sequenceName = "RHQ_BUNDLE_DESTINATION_ID_SEQ")
@Table(name = "RHQ_BUNDLE_DESTINATION")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleDestination implements Serializable {
@@ -69,7 +69,7 @@ public class BundleDestination implements Serializable {
public static final String QUERY_FIND_ALL = "BundleDestination.findAll";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_DESTINATION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleFile.java
index 60ebc13..00611e2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleFile.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleFile.java
@@ -52,7 +52,7 @@ import org.rhq.core.domain.content.PackageVersion;
@NamedQuery(name = BundleFile.QUERY_FIND_ALL, query = "SELECT bf FROM BundleFile bf"), //
@NamedQuery(name = BundleFile.QUERY_FIND_BY_BUNDLE_VERSION_ID, query = "SELECT bf FROM BundleFile bf WHERE bf.bundleVersion.id = :id") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_FILE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_FILE_ID_SEQ", sequenceName = "RHQ_BUNDLE_FILE_ID_SEQ")
@Table(name = "RHQ_BUNDLE_FILE")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleFile implements Serializable {
@@ -62,7 +62,7 @@ public class BundleFile implements Serializable {
public static final String QUERY_FIND_BY_BUNDLE_VERSION_ID = "BundleFile.findByBundleVersionId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_FILE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeployment.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeployment.java
index aa21aa1..a1c705f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeployment.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeployment.java
@@ -62,7 +62,7 @@ import org.rhq.core.domain.resource.Resource;
+ " WHERE brd.resource.id IN ( :resourceIds ) )"),
@NamedQuery(name = BundleResourceDeployment.QUERY_FIND_BY_DEPLOYMENT_ID_NO_FETCH, query = "SELECT brd FROM BundleResourceDeployment brd WHERE brd.bundleDeployment.id = :id "),
@NamedQuery(name = BundleResourceDeployment.QUERY_FIND_BY_RESOURCE_ID_NO_FETCH, query = "SELECT brd FROM BundleResourceDeployment brd WHERE brd.resource.id = :id ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_RES_DEPLOY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_RES_DEPLOY_ID_SEQ", sequenceName = "RHQ_BUNDLE_RES_DEPLOY_ID_SEQ")
@Table(name = "RHQ_BUNDLE_RES_DEPLOY")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleResourceDeployment implements Serializable {
@@ -73,7 +73,7 @@ public class BundleResourceDeployment implements Serializable {
public static final String QUERY_FIND_BY_RESOURCE_ID_NO_FETCH = "BundleResourceDeployment.findByResourceIdNoFetch";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_RES_DEPLOY_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java
index 05c2285..7d9e405 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java
@@ -53,7 +53,7 @@ import javax.xml.bind.annotation.XmlType;
+ " WHERE brdh.resourceDeployment IN ( SELECT brd FROM BundleResourceDeployment brd WHERE brd.resource.id IN ( :resourceIds ) ) )"),
@NamedQuery(name = BundleResourceDeploymentHistory.QUERY_FIND_ALL, query = "SELECT brdh FROM BundleResourceDeploymentHistory brdh") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_RES_DEP_HIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_RES_DEP_HIST_ID_SEQ", sequenceName = "RHQ_BUNDLE_RES_DEP_HIST_ID_SEQ")
@Table(name = "RHQ_BUNDLE_RES_DEP_HIST")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleResourceDeploymentHistory implements Serializable {
@@ -63,7 +63,7 @@ public class BundleResourceDeploymentHistory implements Serializable {
public static final String QUERY_FIND_ALL = "BundleResourceDeploymentHistory.findAll";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_RES_DEP_HIST_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleType.java
index 08c2df3..2801023 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleType.java
@@ -52,7 +52,7 @@ import org.rhq.core.domain.resource.ResourceType;
@NamedQueries( { @NamedQuery(name = BundleType.QUERY_FIND_ALL, query = "SELECT bt FROM BundleType bt"), //
@NamedQuery(name = BundleType.QUERY_FIND_BY_NAME, query = "SELECT bt FROM BundleType bt WHERE bt.name = :name") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_TYPE_ID_SEQ", sequenceName = "RHQ_BUNDLE_TYPE_ID_SEQ")
@Table(name = "RHQ_BUNDLE_TYPE")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleType implements Serializable {
@@ -62,7 +62,7 @@ public class BundleType implements Serializable {
public static final String QUERY_FIND_BY_NAME = "BundleType.findByName";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
index 33c5115..a667486 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleVersion.java
@@ -82,7 +82,7 @@ import org.rhq.core.domain.tagging.Tag;
@NamedQuery(name = BundleVersion.QUERY_FIND_BY_NAME, query = "SELECT bv FROM BundleVersion bv WHERE bv.name = :name "), //
@NamedQuery(name = BundleVersion.QUERY_FIND_BY_BUNDLE_ID, query = "SELECT bv FROM BundleVersion bv WHERE bv.bundle.id = :bundleId ") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_BUNDLE_VERSION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_BUNDLE_VERSION_ID_SEQ", sequenceName = "RHQ_BUNDLE_VERSION_ID_SEQ")
@Table(name = "RHQ_BUNDLE_VERSION")
@XmlAccessorType(XmlAccessType.FIELD)
public class BundleVersion implements Serializable {
@@ -97,7 +97,7 @@ public class BundleVersion implements Serializable {
public static final String QUERY_FIND_BY_BUNDLE_ID = "BundleVersion.findByBundleId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_BUNDLE_VERSION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/AffinityGroup.java b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/AffinityGroup.java
index 906fc6d..ef3a09c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/AffinityGroup.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/AffinityGroup.java
@@ -92,7 +92,7 @@ import org.rhq.core.domain.resource.Agent;
+ "DELETE FROM AffinityGroup ag " //
+ " WHERE ag.id IN ( :affinityGroupIds ) ") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_AFFINITY_GROUP_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_AFFINITY_GROUP_ID_SEQ", sequenceName = "RHQ_AFFINITY_GROUP_ID_SEQ")
@Table(name = "RHQ_AFFINITY_GROUP")
public class AffinityGroup implements Serializable {
@@ -110,7 +110,7 @@ public class AffinityGroup implements Serializable {
public static final String QUERY_DELETE_BY_IDS = "AffinityGroup.deleteByIds";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_AFFINITY_GROUP_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverList.java b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverList.java
index 50a3661..59a39df 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverList.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverList.java
@@ -60,7 +60,7 @@ import org.rhq.core.domain.resource.Agent;
@NamedQuery(name = FailoverList.QUERY_DELETE_VIA_PARTITION_EVENT, query = "DELETE FROM FailoverList fl WHERE fl.partitionEvent = :partitionEvent"),
@NamedQuery(name = FailoverList.QUERY_GET_VIA_AGENT, query = "SELECT fl FROM FailoverList fl WHERE fl.agent = :agent"),
@NamedQuery(name = FailoverList.QUERY_TRUNCATE, query = "DELETE FROM FailoverList") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_FAILOVER_LIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_FAILOVER_LIST_ID_SEQ", sequenceName = "RHQ_FAILOVER_LIST_ID_SEQ")
@Table(name = "RHQ_FAILOVER_LIST")
public class FailoverList implements Serializable {
@@ -72,7 +72,7 @@ public class FailoverList implements Serializable {
public static final String QUERY_TRUNCATE = "FailoverList.truncate";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_FAILOVER_LIST_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverListDetails.java b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverListDetails.java
index 790ba9a..b467ad7 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverListDetails.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/FailoverListDetails.java
@@ -55,7 +55,7 @@ import javax.persistence.Table;
@NamedQuery(name = FailoverListDetails.QUERY_DELETE_VIA_SERVER, query = "DELETE FROM FailoverListDetails fld WHERE fld.server.id = :serverId"),
@NamedQuery(name = FailoverListDetails.QUERY_GET_ASSIGNED_LOADS, query = "SELECT new org.rhq.core.domain.cloud.composite.FailoverListDetailsComposite(fld.ordinal, fld.serverId, COUNT(fld.serverId)) FROM FailoverListDetails fld GROUP BY fld.ordinal, fld.serverId ORDER BY fld.ordinal ASC"),
@NamedQuery(name = FailoverListDetails.QUERY_TRUNCATE, query = "DELETE FROM FailoverListDetails") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_FAILOVER_DETAILS_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_FAILOVER_DETAILS_ID_SEQ", sequenceName = "RHQ_FAILOVER_DETAILS_ID_SEQ")
@Table(name = "RHQ_FAILOVER_DETAILS")
public class FailoverListDetails implements Serializable {
@@ -69,7 +69,7 @@ public class FailoverListDetails implements Serializable {
public static final String QUERY_TRUNCATE = "FailoverListDetails.truncate";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_FAILOVER_DETAILS_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEvent.java b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEvent.java
index 25412fe..94d14a8 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEvent.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEvent.java
@@ -61,7 +61,7 @@ import javax.persistence.Table;
+ " AND (UPPER(pe.eventDetail) LIKE :details ESCAPE :escapeChar OR :details is null) "),
@NamedQuery(name = PartitionEvent.QUERY_FIND_BY_EXECUTION_STATUS, query = "SELECT pe FROM PartitionEvent pe WHERE pe.executionStatus = :executionStatus") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_PARTITION_EVENT_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PARTITION_EVENT_ID_SEQ", sequenceName = "RHQ_PARTITION_EVENT_ID_SEQ")
@Table(name = "RHQ_PARTITION_EVENT")
public class PartitionEvent implements Serializable {
@@ -71,7 +71,7 @@ public class PartitionEvent implements Serializable {
public static final String QUERY_FIND_BY_EXECUTION_STATUS = "PartitionEvent.findByExecutionStatus";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PARTITION_EVENT_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEventDetails.java b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEventDetails.java
index 2c6f2a8..73b1bea 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEventDetails.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/cloud/PartitionEventDetails.java
@@ -53,7 +53,7 @@ import org.rhq.core.domain.resource.Agent;
+ "SELECT ped " //
+ " FROM PartitionEventDetails ped " //
+ " WHERE ped.partitionEvent.id = :eventId ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_PARTITION_DETAILS_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PARTITION_DETAILS_ID_SEQ", sequenceName = "RHQ_PARTITION_DETAILS_ID_SEQ")
@Table(name = "RHQ_PARTITION_DETAILS")
public class PartitionEventDetails implements Serializable {
@@ -62,7 +62,7 @@ public class PartitionEventDetails implements Serializable {
public static final String QUERY_FIND_BY_EVENT_ID = "PartitionEventDetails.findByEventId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PARTITION_DETAILS_ID_SEQ")
@Id
private int id;
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 c1adcd7..e755597 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
@@ -90,7 +90,7 @@ import org.rhq.core.domain.resource.Agent;
+ " UPDATE Server s " //
+ " SET s.status = -1 " // negative numbers so that bitmask strat does not conflict with this one
+ " WHERE s.status = 0 ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_SERVER_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_SERVER_ID_SEQ", sequenceName = "RHQ_SERVER_ID_SEQ")
@Table(name = "RHQ_SERVER")
public class Server implements Serializable {
@@ -108,7 +108,7 @@ public class Server implements Serializable {
public static final String QUERY_UPDATE_STATUS_BY_NAME = "Server.updateStatusByName";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_SERVER_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/common/SystemConfiguration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/common/SystemConfiguration.java
index 5d3f010..a527eea 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/common/SystemConfiguration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/common/SystemConfiguration.java
@@ -41,7 +41,7 @@ import javax.persistence.Table;
@NamedQueries( {
@NamedQuery(name = SystemConfiguration.QUERY_FIND_ALL, query = "SELECT c FROM SystemConfiguration AS c"),
@NamedQuery(name = SystemConfiguration.FIND_PROPERTY_BY_KEY, query = "SELECT c FROM SystemConfiguration AS c WHERE c.propertyKey = :key") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_SYSTEM_CONFIG_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_SYSTEM_CONFIG_ID_SEQ", sequenceName = "RHQ_SYSTEM_CONFIG_ID_SEQ")
@Table(name = "RHQ_SYSTEM_CONFIG")
public class SystemConfiguration implements Serializable {
public static final String QUERY_FIND_ALL = "SystemConfiguration.findAll";
@@ -50,7 +50,7 @@ public class SystemConfiguration implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_SYSTEM_CONFIG_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/AbstractResourceConfigurationUpdate.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/AbstractResourceConfigurationUpdate.java
index b45954b..16e3883 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/AbstractResourceConfigurationUpdate.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/AbstractResourceConfigurationUpdate.java
@@ -51,12 +51,12 @@ import org.rhq.core.domain.resource.Resource;
@DiscriminatorColumn(name = "DTYPE")
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_UPDATE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_UPDATE_ID_SEQ", sequenceName = "RHQ_CONFIG_UPDATE_ID_SEQ")
@Table(name = "RHQ_CONFIG_UPDATE")
public abstract class AbstractResourceConfigurationUpdate extends AbstractConfigurationUpdate implements Serializable {
private static final long serialVersionUID = 1L;
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_UPDATE_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
index 87fbcdf..591d2e9 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
@@ -126,7 +126,7 @@ import org.jetbrains.annotations.Nullable;
@NamedQuery(name = Configuration.QUERY_DELETE_CONFIGURATIONS_BY_CONFIGURATION_IDs, query = "" //
+ "DELETE FROM Configuration c " //
+ " WHERE c.id IN ( :configurationIds )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_ID_SEQ", sequenceName = "RHQ_CONFIG_ID_SEQ")
@Table(name = "RHQ_CONFIG")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@@ -144,7 +144,7 @@ public class Configuration implements Serializable, Cloneable, AbstractPropertyM
public static final String QUERY_DELETE_RAW_CONFIGURATIONS_CONFIGURATION_IDS = "Configuration.deleteRawByConfigurationIds";
public static final String QUERY_DELETE_CONFIGURATIONS_BY_CONFIGURATION_IDs = "Configuration.deleteByConfigurationIdS";
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java
index 264dcb4..3132c5f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java
@@ -80,7 +80,7 @@ import org.jetbrains.annotations.Nullable;
@NamedQuery(name = Property.QUERY_DELETE_BY_PROPERTY_IDS, query = "" //
+ "DELETE FROM Property p WHERE p.id IN ( :propertyIds ) ") })
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_PROPERTY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_PROPERTY_ID_SEQ", sequenceName = "RHQ_CONFIG_PROPERTY_ID_SEQ")
@Table(name = "RHQ_CONFIG_PROPERTY")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@@ -91,7 +91,7 @@ public class Property implements Serializable, DeepCopyable<Property>, Comparabl
public static final String QUERY_DELETE_BY_PROPERTY_IDS = "Property.deleteByPropertyIds";
@Column(name = "ID")
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_PROPERTY_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/RawConfiguration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/RawConfiguration.java
index fc493db..f1a32a3 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/RawConfiguration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/RawConfiguration.java
@@ -52,13 +52,13 @@ import javax.persistence.Transient;
* the virtual host config files.
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_RAW_CONFIG_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RAW_CONFIG_ID_SEQ", sequenceName = "RHQ_RAW_CONFIG_ID_SEQ")
@Table(name = "RHQ_RAW_CONFIG")
public class RawConfiguration implements Serializable, DeepCopyable<RawConfiguration> {
private static final long serialVersionUID = 1L;
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_RAW_CONFIG_ID_SEQ", strategy = GenerationType.AUTO)
@Id
@Column(name = "ID")
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java
index ff679ae..a4bd587 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationDefinition.java
@@ -68,7 +68,7 @@ import org.jetbrains.annotations.Nullable;
+ "WHERE rt.id = :resourceTypeId AND rt.deleted = false"),
@NamedQuery(name = ConfigurationDefinition.QUERY_FIND_PLUGIN_BY_RESOURCE_TYPE_ID, query = "SELECT cd FROM ResourceType rt JOIN rt.pluginConfigurationDefinition cd "
+ "WHERE rt.id = :resourceTypeId AND rt.deleted = false") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_DEF_ID_SEQ", sequenceName = "RHQ_CONFIG_DEF_ID_SEQ")
@Table(name = "RHQ_CONFIG_DEF")
@XmlSeeAlso({ PropertyDefinitionSimple.class, PropertyDefinitionList.class, PropertyDefinitionMap.class })
public class ConfigurationDefinition implements Serializable {
@@ -79,7 +79,7 @@ public class ConfigurationDefinition implements Serializable {
public static final String QUERY_FIND_PLUGIN_BY_RESOURCE_TYPE_ID = "ConfigurationDefinition.findPluginByResourceTypeId";
@Column(name = "id")
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_DEF_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationTemplate.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationTemplate.java
index f2f813d..5f4e4c7 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationTemplate.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/ConfigurationTemplate.java
@@ -31,7 +31,6 @@ import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
@@ -44,7 +43,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.resource.ResourceType;
/**
* This object represents a single template of configuration values for a given definition. Definitions may have many
@@ -54,7 +52,7 @@ import org.rhq.core.domain.resource.ResourceType;
* @author Greg Hinkle
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_TEMPLATE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_TEMPLATE_ID_SEQ", sequenceName = "RHQ_CONFIG_TEMPLATE_ID_SEQ")
@Table(name = "RHQ_CONFIG_TEMPLATE")
@XmlAccessorType(XmlAccessType.FIELD)
public class ConfigurationTemplate implements Serializable {
@@ -62,7 +60,7 @@ public class ConfigurationTemplate implements Serializable {
public static final String DEFAULT_TEMPLATE_NAME = "default";
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_TEMPLATE_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinition.java
index 43631b7..db22c1d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinition.java
@@ -56,7 +56,7 @@ import org.jetbrains.annotations.NotNull;
@DiscriminatorColumn(name = "dtype")
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_PROP_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_PROP_DEF_ID_SEQ", sequenceName = "RHQ_CONFIG_PROP_DEF_ID_SEQ")
@Table(name = "RHQ_CONFIG_PROP_DEF")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlSeeAlso( { PropertyDefinitionSimple.class, PropertyDefinitionList.class, PropertyDefinitionMap.class })
@@ -65,7 +65,7 @@ public class PropertyDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "id")
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_PROP_DEF_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionEnumeration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionEnumeration.java
index 2587038..019dc6b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionEnumeration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyDefinitionEnumeration.java
@@ -43,14 +43,14 @@ import org.jetbrains.annotations.NotNull;
* @author Jason Dobies
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONF_PROP_DEF_ENUM_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONF_PROP_DEF_ENUM_ID_SEQ", sequenceName = "RHQ_CONF_PROP_DEF_ENUM_ID_SEQ")
@Table(name = "RHQ_CONF_PROP_DEF_ENUM")
@XmlAccessorType(XmlAccessType.FIELD)
public class PropertyDefinitionEnumeration implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CONF_PROP_DEF_ENUM_ID_SEQ")
@Id
private long id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyGroupDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyGroupDefinition.java
index 73e28fb..a1df948 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyGroupDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyGroupDefinition.java
@@ -41,13 +41,13 @@ import org.jetbrains.annotations.NotNull;
* @author Greg Hinkle
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_PROP_GRP_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_PROP_GRP_DEF_ID_SEQ", sequenceName = "RHQ_CONFIG_PROP_GRP_DEF_ID_SEQ")
@Table(name = "RHQ_CONFIG_PROP_GRP_DEF")
public class PropertyGroupDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID")
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_PROP_GRP_DEF_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
index fb1f347..70c9a1f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/PropertyOptionsSource.java
@@ -33,8 +33,6 @@ import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
@@ -46,12 +44,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
*/
@Entity
@Table(name="RHQ_CONFIG_PD_OSRC")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_PD_OSRC_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_PD_OSRC_ID_SEQ", sequenceName = "RHQ_CONFIG_PD_OSRC_ID_SEQ")
@XmlAccessorType(XmlAccessType.FIELD)
public class PropertyOptionsSource implements Serializable{
@Id
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_PD_OSRC_ID_SEQ", strategy = GenerationType.AUTO)
private int id;
@Column(name="LINK_TO_TARGET")
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/constraint/Constraint.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/constraint/Constraint.java
index 720a25f..2d9ec61 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/constraint/Constraint.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/definition/constraint/Constraint.java
@@ -49,7 +49,7 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
@DiscriminatorColumn(name = "dtype", discriminatorType = DiscriminatorType.STRING)
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_PROP_CONSTR_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_PROP_CONSTR_ID_SEQ", sequenceName = "RHQ_CONFIG_PROP_CONSTR_ID_SEQ")
@Table(name = "RHQ_CONFIG_PROP_CONSTR")
public abstract class Constraint implements Serializable {
private static final long serialVersionUID = 1L;
@@ -57,7 +57,7 @@ public abstract class Constraint implements Serializable {
protected static final String DELIMITER = "#";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CONFIG_PROP_CONSTR_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/group/AbstractGroupConfigurationUpdate.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/group/AbstractGroupConfigurationUpdate.java
index ef53e4f..41340c9 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/group/AbstractGroupConfigurationUpdate.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/group/AbstractGroupConfigurationUpdate.java
@@ -42,13 +42,13 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
@DiscriminatorColumn(name = "DTYPE")
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONFIG_GROUP_UPDATE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONFIG_GROUP_UPDATE_ID_SEQ", sequenceName = "RHQ_CONFIG_GROUP_UPDATE_ID_SEQ")
@Table(name = "RHQ_CONFIG_GROUP_UPDATE")
public abstract class AbstractGroupConfigurationUpdate extends AbstractConfigurationUpdate implements Serializable {
private static final long serialVersionUID = 1L;
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONFIG_GROUP_UPDATE_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Advisory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Advisory.java
index 7ab63a0..1f9fcbe 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Advisory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Advisory.java
@@ -39,7 +39,7 @@ import javax.persistence.Table;
+ " ) "
+ " FROM Advisory a "
+ " WHERE a.id = :id ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_ADVISORY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ADVISORY_ID_SEQ", sequenceName = "RHQ_ADVISORY_ID_SEQ")
@Table(name = "RHQ_ADVISORY")
public class Advisory implements Serializable {
@@ -52,7 +52,7 @@ public class Advisory implements Serializable {
public static final String QUERY_FIND_BY_ADV_ID = "Advisory.queryFindByAdvId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ADVISORY_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryBuglist.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryBuglist.java
index 7d70613..fb39a5b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryBuglist.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryBuglist.java
@@ -51,7 +51,7 @@ import javax.xml.bind.annotation.XmlTransient;
@NamedQuery(name = AdvisoryBuglist.DELETE_BY_ADV_ID, query = "DELETE AdvisoryBuglist ab WHERE ab.advisory.id = :advId"),
@NamedQuery(name = AdvisoryBuglist.FIND_ADVISORY_BUGLIST, query = "SELECT ab FROM AdvisoryBuglist AS ab "
+ "WHERE ab.advisory.id = :advId AND ab.bugid = :buginfo") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_ADVISORY_BUGLIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ADVISORY_BUGLIST_ID_SEQ", sequenceName = "RHQ_ADVISORY_BUGLIST_ID_SEQ")
@Table(name = "RHQ_ADVISORY_BUGLIST")
public class AdvisoryBuglist implements Serializable {
@@ -65,7 +65,7 @@ public class AdvisoryBuglist implements Serializable {
* @IdClass.
*/
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ADVISORY_BUGLIST_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryCVE.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryCVE.java
index fd9d84e..8317604 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryCVE.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryCVE.java
@@ -47,7 +47,7 @@ import javax.persistence.Table;
@NamedQueries( {
@NamedQuery(name = AdvisoryCVE.FIND_CVE_BY_ADV_ID, query = "SELECT ac FROM AdvisoryCVE AS ac WHERE ac.advisory.id = :advId"),
@NamedQuery(name = AdvisoryCVE.DELETE_BY_ADV_ID, query = "DELETE AdvisoryCVE ac WHERE ac.advisory.id = :advId") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_ADVISORY_CVE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ADVISORY_CVE_ID_SEQ", sequenceName = "RHQ_ADVISORY_CVE_ID_SEQ")
@Table(name = "RHQ_ADVISORY_CVE")
public class AdvisoryCVE implements Serializable {
@@ -61,7 +61,7 @@ public class AdvisoryCVE implements Serializable {
* @IdClass.
*/
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ADVISORY_CVE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryPackage.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryPackage.java
index 3b23f4f..ffeb809 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryPackage.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/AdvisoryPackage.java
@@ -51,7 +51,7 @@ import javax.xml.bind.annotation.XmlTransient;
@NamedQuery(name = AdvisoryPackage.DELETE_PACKAGES_BY_ADV_ID, query = "DELETE AdvisoryPackage ap WHERE ap.advisory.id = :advId"),
@NamedQuery(name = AdvisoryPackage.FIND_ADVISORY_PACKAGE, query = "SELECT ap FROM AdvisoryPackage AS ap "
+ "WHERE ap.advisory.id = :advId AND ap.pkg.id = :pkgVerId") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_ADVISORY_PACKAGE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ADVISORY_PACKAGE_ID_SEQ", sequenceName = "RHQ_ADVISORY_PACKAGE_ID_SEQ")
@Table(name = "RHQ_ADVISORY_PACKAGE")
public class AdvisoryPackage implements Serializable {
@@ -66,7 +66,7 @@ public class AdvisoryPackage implements Serializable {
* @IdClass.
*/
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ADVISORY_PACKAGE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Architecture.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Architecture.java
index bac4046..661822f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Architecture.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Architecture.java
@@ -47,7 +47,7 @@ import org.rhq.core.domain.resource.Resource;
@NamedQuery(name = Architecture.QUERY_FIND_BY_NAME, query = "SELECT arch FROM Architecture arch WHERE arch.name = :name"),
@NamedQuery(name = Architecture.QUERY_FIND_ALL, query = "SELECT arch FROM Architecture arch"),
@NamedQuery(name = Architecture.QUERY_DYNAMIC_CONFIG_VALUES, query = "SELECT arch.name, arch.name FROM Architecture arch") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_ARCHITECTURE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ARCHITECTURE_ID_SEQ", sequenceName = "RHQ_ARCHITECTURE_ID_SEQ")
@Table(name = "RHQ_ARCHITECTURE")
public class Architecture implements Serializable {
@@ -59,7 +59,7 @@ public class Architecture implements Serializable {
public static final String QUERY_DYNAMIC_CONFIG_VALUES = "Architecture.dynamicConfigValues";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ARCHITECTURE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/CVE.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/CVE.java
index 5655fd9..fd3e8a4 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/CVE.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/CVE.java
@@ -42,7 +42,7 @@ import javax.persistence.Table;
@Entity
@NamedQueries({ @NamedQuery(name = CVE.DELETE_BY_CVE_ID, query = "DELETE CVE cve WHERE cve.id = :cveId"),
@NamedQuery(name = CVE.FIND_BY_CVE_ID, query = "SELECT cve FROM CVE as cve WHERE cve.id = :cveId") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CVE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CVE_ID_SEQ", sequenceName = "RHQ_CVE_ID_SEQ")
@Table(name = "RHQ_CVE")
public class CVE implements Serializable {
@@ -51,7 +51,7 @@ public class CVE implements Serializable {
public static final String DELETE_BY_CVE_ID = "CVE.deleteByCVEId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CVE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentServiceRequest.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentServiceRequest.java
index 3f1159b..c0909e6 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentServiceRequest.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentServiceRequest.java
@@ -66,7 +66,7 @@ import org.rhq.core.domain.resource.Resource;
+ " FROM ContentServiceRequest AS csr WHERE csr.id = :id"),
@NamedQuery(name = ContentServiceRequest.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM ContentServiceRequest csr WHERE csr.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONTENT_REQ_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONTENT_REQ_ID_SEQ", sequenceName = "RHQ_CONTENT_REQ_ID_SEQ")
@Table(name = "RHQ_CONTENT_REQ")
public class ContentServiceRequest implements Serializable {
@@ -80,7 +80,7 @@ public class ContentServiceRequest implements Serializable {
public static final String QUERY_DELETE_BY_RESOURCES = "ContentServiceRequest.deleteByResources";
@Column(name = "ID", nullable = false)
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CONTENT_REQ_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
index ed03b52..d5078fc 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSource.java
@@ -76,7 +76,7 @@ import org.rhq.core.domain.configuration.Configuration;
+ " ( SELECT ccs.contentSource.id " //
+ " FROM RepoContentSource ccs " //
+ " WHERE ccs.repo.id = :repoId ) ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONTENT_SOURCE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONTENT_SOURCE_ID_SEQ", sequenceName = "RHQ_CONTENT_SOURCE_ID_SEQ")
@Table(name = "RHQ_CONTENT_SOURCE")
public class ContentSource implements Serializable {
public static final String QUERY_FIND_ALL = "ContentSource.findAll";
@@ -89,7 +89,7 @@ public class ContentSource implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CONTENT_SOURCE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceSyncResults.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceSyncResults.java
index 540e9eb..5ae1b76 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceSyncResults.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceSyncResults.java
@@ -53,7 +53,7 @@ import javax.persistence.Table;
+ " AND status = 'INPROGRESS' " + " ORDER BY cssr.startTime DESC "),
@NamedQuery(name = ContentSourceSyncResults.QUERY_GET_ALL_BY_CONTENT_SOURCE_ID, query = "SELECT cssr "
+ " FROM ContentSourceSyncResults cssr " + " WHERE cssr.contentSource.id = :contentSourceId ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONTENT_SRC_SYNC_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONTENT_SRC_SYNC_ID_SEQ", sequenceName = "RHQ_CONTENT_SRC_SYNC_ID_SEQ")
@Table(name = "RHQ_CONTENT_SRC_SYNC")
public class ContentSourceSyncResults implements ContentSyncResults, Serializable {
public static final String QUERY_GET_INPROGRESS_BY_CONTENT_SOURCE_ID = "ContentSourceSyncResults.getInProgressByCSId";
@@ -62,7 +62,7 @@ public class ContentSourceSyncResults implements ContentSyncResults, Serializabl
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CONTENT_SRC_SYNC_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
index 7802ea1..5cbbc36 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/ContentSourceType.java
@@ -63,7 +63,7 @@ import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+ " LEFT JOIN FETCH d.templates t " + " WHERE cst.name = :name"),
@NamedQuery(name = ContentSourceType.QUERY_FIND_BY_NAME, query = "SELECT cst " + " FROM ContentSourceType cst "
+ " WHERE cst.name = :name") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CONTENT_SOURCE_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CONTENT_SOURCE_TYPE_ID_SEQ", sequenceName = "RHQ_CONTENT_SOURCE_TYPE_ID_SEQ")
@Table(name = "RHQ_CONTENT_SOURCE_TYPE")
public class ContentSourceType implements Serializable {
@@ -74,7 +74,7 @@ public class ContentSourceType implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CONTENT_SOURCE_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Distribution.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Distribution.java
index e29417b..f6b576b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Distribution.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Distribution.java
@@ -55,7 +55,7 @@ import org.hibernate.annotations.NamedQuery;
@NamedQuery(name = Distribution.QUERY_FIND_BY_DIST_LABEL, query = "SELECT dt FROM Distribution dt WHERE dt.label = :label"),
@NamedQuery(name = Distribution.QUERY_FIND_BY_DIST_PATH, query = "SELECT dt FROM Distribution dt WHERE dt.basePath = :path"),
@NamedQuery(name = Distribution.QUERY_DELETE_BY_DIST_ID, query = "DELETE Distribution dt WHERE dt.id = :distid") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DISTRIBUTION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DISTRIBUTION_ID_SEQ", sequenceName = "RHQ_DISTRIBUTION_ID_SEQ")
@Table(name = "RHQ_DISTRIBUTION")
public class Distribution implements Serializable {
@@ -67,7 +67,7 @@ public class Distribution implements Serializable {
public static final String QUERY_DELETE_BY_DIST_ID = "Distribution.deleteByDistId";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DISTRIBUTION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionFile.java
index 3de37d4..3cc3d15 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionFile.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionFile.java
@@ -49,7 +49,7 @@ import javax.xml.bind.annotation.XmlTransient;
@NamedQueries({
@NamedQuery(name = DistributionFile.SELECT_BY_DIST_ID, query = "SELECT df from DistributionFile df WHERE df.distribution.id = :distId"),
@NamedQuery(name = DistributionFile.DELETE_BY_DIST_ID, query = "DELETE DistributionFile df WHERE df.distribution.id = :distId") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DISTRIBUTION_FILE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DISTRIBUTION_FILE_ID_SEQ", sequenceName = "RHQ_DISTRIBUTION_FILE_ID_SEQ")
@Table(name = "RHQ_DISTRIBUTION_FILE")
public class DistributionFile {
public static final String SELECT_BY_DIST_ID = "DistributionFile.selectByDistId";
@@ -63,7 +63,7 @@ public class DistributionFile {
* @IdClass.
*/
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DISTRIBUTION_FILE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionType.java
index d54a192..fcce5b1 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/DistributionType.java
@@ -45,7 +45,7 @@ import javax.persistence.Table;
@NamedQueries({
@NamedQuery(name = DistributionType.QUERY_FIND_BY_NAME, query = "SELECT dt FROM DistributionType dt WHERE dt.name = :name"),
@NamedQuery(name = DistributionType.QUERY_DELETE_BY_NAME, query = "DELETE FROM DistributionType dt where dt.name = :name") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DISTRIBUTION_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DISTRIBUTION_TYPE_ID_SEQ", sequenceName = "RHQ_DISTRIBUTION_TYPE_ID_SEQ")
@Table(name = "RHQ_DISTRIBUTION_TYPE")
public class DistributionType implements Serializable {
@@ -55,7 +55,7 @@ public class DistributionType implements Serializable {
public static final String QUERY_DELETE_BY_NAME = "DistributionType.deleteByName";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DISTRIBUTION_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackage.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackage.java
index e259317..179561d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackage.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackage.java
@@ -70,7 +70,7 @@ import org.rhq.core.domain.resource.Resource;
+ "WHERE res.id = :resourceId " + " AND gp.id = :generalPackageId"),
@NamedQuery(name = InstalledPackage.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM InstalledPackage ip "
+ " WHERE ip.resource.id IN ( :resourceIds )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_INSTALLED_PACKAGE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_INSTALLED_PACKAGE_ID_SEQ", sequenceName = "RHQ_INSTALLED_PACKAGE_ID_SEQ")
@Table(name = "RHQ_INSTALLED_PACKAGE")
public class InstalledPackage implements Serializable {
// Constants --------------------------------------------
@@ -90,7 +90,7 @@ public class InstalledPackage implements Serializable {
public static final String QUERY_DELETE_BY_RESOURCES = "InstalledPackage.deleteByResources";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_INSTALLED_PACKAGE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
index a882543..93fbc3c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/InstalledPackageHistory.java
@@ -72,7 +72,7 @@ import org.rhq.core.domain.resource.Resource;
+ "WHERE iph.id = :id"),
@NamedQuery(name = InstalledPackageHistory.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM InstalledPackageHistory iph "
+ " WHERE iph.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_INSTALLED_PKG_HIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_INSTALLED_PKG_HIST_ID_SEQ", sequenceName = "RHQ_INSTALLED_PKG_HIST_ID_SEQ")
@Table(name = "RHQ_INSTALLED_PKG_HIST")
public class InstalledPackageHistory implements Serializable {
@@ -87,7 +87,7 @@ public class InstalledPackageHistory implements Serializable {
public static final String QUERY_DELETE_BY_RESOURCES = "InstalledPackageHistory.deleteByResources";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_INSTALLED_PKG_HIST_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Package.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Package.java
index 1018b7c..1a33c13 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Package.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Package.java
@@ -62,7 +62,7 @@ import org.hibernate.annotations.NamedQuery;
@NamedQuery(name = Package.QUERY_FIND_BY_NAME_PKG_TYPE_RESOURCE_TYPE, query = "SELECT p FROM Package AS p "
+ "WHERE p.name = :name " + "AND p.packageType.name = :packageTypeName "
+ "AND p.packageType.resourceType.id = :resourceTypeId") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PACKAGE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PACKAGE_ID_SEQ", sequenceName = "RHQ_PACKAGE_ID_SEQ")
@Table(name = "RHQ_PACKAGE")
public class Package implements Serializable {
// Constants --------------------------------------------
@@ -75,7 +75,7 @@ public class Package implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PACKAGE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageBitsBlob.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageBitsBlob.java
index 2e48354..41b68be 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageBitsBlob.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageBitsBlob.java
@@ -54,7 +54,7 @@ import javax.xml.bind.annotation.XmlTransient;
* @author Jay Shaughnessy
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PACKAGE_BITS_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PACKAGE_BITS_ID_SEQ", sequenceName = "RHQ_PACKAGE_BITS_ID_SEQ")
@Table(name = PackageBits.TABLE_NAME)
public class PackageBitsBlob implements Serializable {
public static final String TABLE_NAME = "RHQ_PACKAGE_BITS";
@@ -62,7 +62,7 @@ public class PackageBitsBlob implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PACKAGE_BITS_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageInstallationStep.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageInstallationStep.java
index ee4450a..93ff702 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageInstallationStep.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageInstallationStep.java
@@ -53,7 +53,7 @@ import org.rhq.core.domain.content.transfer.ContentResponseResult;
+ "WHERE pis.installedPackageHistory.id = :installedPackageHistoryId")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PACKAGE_INST_STEP_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PACKAGE_INST_STEP_ID_SEQ", sequenceName = "RHQ_PACKAGE_INST_STEP_ID_SEQ")
@Table(name = "RHQ_PACKAGE_INST_STEP")
public class PackageInstallationStep implements Serializable {
// Constants --------------------------------------------
@@ -69,7 +69,7 @@ public class PackageInstallationStep implements Serializable {
* Database assigned ID.
*/
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PACKAGE_INST_STEP_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
index 98caeb5..72ab637 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageType.java
@@ -72,7 +72,7 @@ import org.rhq.core.domain.resource.ResourceType;
+ "LEFT JOIN FETCH pt.deploymentConfigurationDefinition cd "
+ "LEFT JOIN FETCH cd.templates cts " + "WHERE rt.id = :typeId AND pt.isCreationData = true"),
@NamedQuery(name = PackageType.QUERY_DYNAMIC_CONFIG_VALUES, query = "SELECT pt.resourceType.plugin || ' - ' || pt.resourceType.name || ' - ' || pt.displayName, pt.name FROM PackageType AS pt") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PACKAGE_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PACKAGE_TYPE_ID_SEQ", sequenceName = "RHQ_PACKAGE_TYPE_ID_SEQ")
@Table(name = "RHQ_PACKAGE_TYPE")
@XmlAccessorType(XmlAccessType.FIELD)
public class PackageType implements Serializable {
@@ -92,7 +92,7 @@ public class PackageType implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PACKAGE_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
index 591ce68..54dc416 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/PackageVersion.java
@@ -264,7 +264,7 @@ import org.rhq.core.domain.util.OSGiVersionComparator;
+ " (SELECT pv2.id, (SELECT COUNT(rpv) FROM RepoPackageVersion rpv WHERE rpv.packageVersion.id = pv2.id)"
+ " FROM PackageVersion pv2" + " WHERE pv2.id IN ( :packageVersionIds )"
+ " AND pv2.id IN (SELECT rpv.packageVersion.id FROM RepoPackageVersion rpv WHERE rpv.repo.id = :repoId))") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PACKAGE_VERSION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PACKAGE_VERSION_ID_SEQ", sequenceName = "RHQ_PACKAGE_VERSION_ID_SEQ")
@Table(name = "RHQ_PACKAGE_VERSION")
public class PackageVersion implements Serializable {
// Constants --------------------------------------------
@@ -351,7 +351,7 @@ public class PackageVersion implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PACKAGE_VERSION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Repo.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Repo.java
index f41efd2..c0fe712 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/Repo.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/Repo.java
@@ -130,7 +130,7 @@ import org.rhq.core.domain.resource.Resource;
@NamedQuery(name = Repo.QUERY_UPDATE_REMOVE_OWNER_FROM_REPOS_OWNED_BY_SUBJECT, query = "" +
"UPDATE Repo r SET r.owner = null WHERE r.owner.id = :ownerId")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_ID_SEQ", sequenceName = "RHQ_REPO_ID_SEQ")
@Table(name = "RHQ_REPO")
public class Repo implements Serializable {
@@ -161,7 +161,7 @@ public class Repo implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroup.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroup.java
index 73b6dec..2166e4c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroup.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroup.java
@@ -26,6 +26,7 @@ import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@@ -34,12 +35,11 @@ import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
-import javax.persistence.CascadeType;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
/**
* A RepoGroup represents a set of related {@link Repo}s. Repos can be tied together
@@ -52,7 +52,7 @@ import javax.persistence.NamedQuery;
@NamedQueries(
@NamedQuery(name = RepoGroup.QUERY_FIND_BY_NAME, query = "SELECT g FROM RepoGroup g WHERE g.name = :name")
)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_GROUP_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_GROUP_ID_SEQ", sequenceName = "RHQ_REPO_GROUP_ID_SEQ")
@Table(name = "RHQ_REPO_GROUP")
public class RepoGroup implements Serializable {
// Constants --------------------------------------------
@@ -64,7 +64,7 @@ public class RepoGroup implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_GROUP_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroupType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroupType.java
index 121030b..526e455 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroupType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoGroupType.java
@@ -32,11 +32,11 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
/**
* Defines a type of (@link RepoGroup) e.g. Channel families in RHN map to a type of
@@ -48,7 +48,7 @@ import javax.persistence.NamedQuery;
@NamedQueries(
@NamedQuery(name = RepoGroupType.QUERY_FIND_BY_NAME, query = "SELECT t FROM RepoGroupType t WHERE t.name = :name")
)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_GROUP_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_GROUP_TYPE_ID_SEQ", sequenceName = "RHQ_REPO_GROUP_TYPE_ID_SEQ")
@Table(name = "RHQ_REPO_GROUP_TYPE")
public class RepoGroupType implements Serializable {
@@ -59,7 +59,7 @@ public class RepoGroupType implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_GROUP_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationship.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationship.java
index 8d7685a..6fd6633 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationship.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationship.java
@@ -34,11 +34,11 @@ import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
/**
* A RepoRelationship represents relationship with a {@link Repo}
@@ -52,7 +52,7 @@ import javax.persistence.NamedQuery;
@NamedQueries({
@NamedQuery(name = RepoRelationship.DELETE_BY_RELATED_REPO_ID, query = "DELETE RepoRelationship rr WHERE rr.relatedRepo.id = :relatedRepoId")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_RELATION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_RELATION_ID_SEQ", sequenceName = "RHQ_REPO_RELATION_ID_SEQ")
@Table(name = "RHQ_REPO_RELATION")
public class RepoRelationship implements Serializable {
// Constants --------------------------------------------
@@ -64,7 +64,7 @@ public class RepoRelationship implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_RELATION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationshipType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationshipType.java
index 5e3b853..f5e3346 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationshipType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoRelationshipType.java
@@ -32,11 +32,11 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
/**
* Defines a type of (@link RepoRelationship) e.g. Clone, Parent-child are types of
@@ -49,7 +49,7 @@ import javax.persistence.NamedQuery;
@NamedQuery(name = RepoRelationshipType.QUERY_FIND_BY_NAME, query = "SELECT r FROM RepoRelationshipType r WHERE r.name = :name")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_RELATION_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_RELATION_TYPE_ID_SEQ", sequenceName = "RHQ_REPO_RELATION_TYPE_ID_SEQ")
@Table(name = "RHQ_REPO_RELATION_TYPE")
public class RepoRelationshipType implements Serializable {
@@ -60,7 +60,7 @@ public class RepoRelationshipType implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_RELATION_TYPE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoSyncResults.java b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoSyncResults.java
index 5fb231a..675f0d4 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoSyncResults.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/content/RepoSyncResults.java
@@ -52,7 +52,7 @@ import javax.persistence.Table;
+ " ORDER BY rssr.startTime DESC "),
@NamedQuery(name = RepoSyncResults.QUERY_GET_ALL_BY_REPO_ID, query = "SELECT rssr "
+ " FROM RepoSyncResults rssr " + " WHERE rssr.repo.id = :repoId ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_REPO_SYNC_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_REPO_SYNC_ID_SEQ", sequenceName = "RHQ_REPO_SYNC_ID_SEQ")
@Table(name = "RHQ_REPO_SYNC")
public class RepoSyncResults implements Serializable, ContentSyncResults {
public static final String QUERY_GET_INPROGRESS_BY_REPO_ID = "RepoSyncResults.getInProgressByRepoId";
@@ -61,7 +61,7 @@ public class RepoSyncResults implements Serializable, ContentSyncResults {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_REPO_SYNC_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
index a9b0ad3..6b37edb 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
@@ -65,12 +65,12 @@ import org.rhq.core.domain.util.StringUtils;
*/
@Entity
@Table(name = "RHQ_DRIFT_DEFINITION")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DRIFT_DEFINITION_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DRIFT_DEFINITION_ID_SEQ", sequenceName = "RHQ_DRIFT_DEFINITION_ID_SEQ")
public class DriftDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DRIFT_DEFINITION_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinitionTemplate.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinitionTemplate.java
index d7cfc4d..5fac548 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinitionTemplate.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinitionTemplate.java
@@ -64,13 +64,13 @@ import org.rhq.core.domain.resource.ResourceType;
*/
@Entity
@Table(name = "RHQ_DRIFT_DEF_TEMPLATE")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DRIFT_DEF_TEMPLATE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DRIFT_DEF_TEMPLATE_ID_SEQ", sequenceName = "RHQ_DRIFT_DEF_TEMPLATE_ID_SEQ")
public class DriftDefinitionTemplate implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DRIFT_DEF_TEMPLATE_ID_SEQ")
private int id;
@Column(name = "CTIME", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java
index c3d6bb3..219fbe7 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java
@@ -57,7 +57,7 @@ import javax.persistence.Table;
+ " FROM JPADriftChangeSet dcs " //
+ " WHERE dcs.driftDefinition.name = :driftDefinitionName AND dcs.resource.id = :resourceId)") })
@Table(name = "RHQ_DRIFT")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DRIFT_ID_SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
public class JPADrift implements Serializable, Drift<JPADriftChangeSet, JPADriftFile> {
private static final long serialVersionUID = 1L;
@@ -65,7 +65,7 @@ public class JPADrift implements Serializable, Drift<JPADriftChangeSet, JPADrift
public static final String QUERY_DELETE_BY_DRIFTDEF_RESOURCE = "JPADrift.deleteByDriftDefResource";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DRIFT_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java
index c43324d..68177d4 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java
@@ -100,7 +100,7 @@ import org.rhq.core.domain.resource.Resource;
+ " WHERE dc.resource.id = :resourceId AND dc.name = :driftDefinitionName)" //
) })
@Table(name = "RHQ_DRIFT_CHANGE_SET")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DRIFT_CHANGE_SET_ID_SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
public class JPADriftChangeSet implements Serializable, DriftChangeSet<JPADrift> {
private static final long serialVersionUID = 1L;
@@ -108,7 +108,7 @@ public class JPADriftChangeSet implements Serializable, DriftChangeSet<JPADrift>
public static final String QUERY_DELETE_BY_DRIFTDEF_RESOURCE = "JPADriftChangeSet.deleteByDriftDefResource";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftSet.java
index f40bde2..bd07c0a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftSet.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftSet.java
@@ -38,12 +38,12 @@ import javax.persistence.Table;
@Entity
@Table(name = "RHQ_DRIFT_SET")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DRIFT_SET_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DRIFT_SET_ID_SEQ", sequenceName = "RHQ_DRIFT_SET_ID_SEQ")
public class JPADriftSet implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_DRIFT_SET_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
index d8c41b3..1c5a79d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java
@@ -89,7 +89,8 @@ import org.rhq.core.domain.resource.Resource;
+ "GROUP BY ev.severity") })
@Entity
@Table(name = Event.TABLE_NAME)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "idGenerator", sequenceName = Event.TABLE_NAME + "_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = Event.TABLE_NAME
+ + "_ID_SEQ", sequenceName = Event.TABLE_NAME + "_ID_SEQ")
public class Event implements Serializable {
private static final long serialVersionUID = 1L;
@@ -108,7 +109,7 @@ public class Event implements Serializable {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = Event.TABLE_NAME + "_ID_SEQ")
private int id;
@JoinColumn(name = "EVENT_SOURCE_ID", referencedColumnName = "ID", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
index 7f88007..bfab674 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventDefinition.java
@@ -46,7 +46,8 @@ import org.rhq.core.domain.resource.ResourceType;
*/
@Entity
@Table(name = EventDefinition.TABLE_NAME)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "idGenerator", sequenceName = EventDefinition.TABLE_NAME + "_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = EventDefinition.TABLE_NAME
+ + "_ID_SEQ", sequenceName = EventDefinition.TABLE_NAME + "_ID_SEQ")
public class EventDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@@ -54,7 +55,7 @@ public class EventDefinition implements Serializable {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = EventDefinition.TABLE_NAME + "_ID_SEQ")
private int id;
@JoinColumn(name = "RESOURCE_TYPE_ID", referencedColumnName = "ID", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
index 170b0d2..ae58f96 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/EventSource.java
@@ -56,7 +56,8 @@ import org.rhq.core.domain.resource.Resource;
@NamedQuery(name = EventSource.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM EventSource evs WHERE evs.resource.id IN ( :resourceIds ) "),
@NamedQuery(name = EventSource.QUERY_BY_EVENT_DEFINITION, query = "SELECT evs FROM EventSource evs WHERE evs.eventDefinition = :definition") })
@Table(name = EventSource.TABLE_NAME)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "idGenerator", sequenceName = EventSource.TABLE_NAME + "_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = EventSource.TABLE_NAME
+ + "_ID_SEQ", sequenceName = EventSource.TABLE_NAME + "_ID_SEQ")
public class EventSource implements Serializable {
private static final long serialVersionUID = 1L;
@@ -66,7 +67,7 @@ public class EventSource implements Serializable {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = EventSource.TABLE_NAME + "_ID_SEQ")
private int id;
@JoinColumn(name = "EVENT_DEF_ID", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
index c66d488..05217e1 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
@@ -132,7 +132,7 @@ import org.rhq.core.domain.resource.Resource;
+ " ( SELECT res.id FROM Resource res " //
+ " WHERE res.agent.id = :agentId " //
+ " AND res.parentResource.id IS NULL )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "Generator", sequenceName = "RHQ_AVAILABILITY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_AVAILABILITY_ID_SEQ", sequenceName = "RHQ_AVAILABILITY_ID_SEQ")
@Table(name = "RHQ_AVAILABILITY")
@XmlRootElement
public class Availability implements Serializable {
@@ -153,7 +153,7 @@ public class Availability implements Serializable {
public static final String NATIVE_QUERY_PURGE = "DELETE FROM RHQ_AVAILABILITY WHERE END_TIME < ?";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "Generator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_AVAILABILITY_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
index 4df256b..82df397 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementBaseline.java
@@ -101,7 +101,7 @@ import javax.persistence.Table;
+ "DELETE MeasurementBaseline bl " //
+ " WHERE bl.computeTime < :timestamp "),
@NamedQuery(name = MeasurementBaseline.QUERY_DELETE_BY_RESOURCES, query = "DELETE MeasurementBaseline bl WHERE bl.schedule IN ( SELECT ms FROM MeasurementSchedule ms WHERE ms.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "MEAS_BL_GEN", sequenceName = "RHQ_MEASUREMENT_BLINE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_MEASUREMENT_BLINE_ID_SEQ", sequenceName = "RHQ_MEASUREMENT_BLINE_ID_SEQ")
@SuppressWarnings("unused")
@Table(name = "RHQ_MEASUREMENT_BLINE")
public class MeasurementBaseline implements Serializable {
@@ -195,7 +195,7 @@ public class MeasurementBaseline implements Serializable {
+ " WHERE mdata.TIME_STAMP <= ? ) "; // ?4=startTime
}
private static final long serialVersionUID = 1L;
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "MEAS_BL_GEN")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_MEASUREMENT_BLINE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementDefinition.java
index 5d9253b..519f2f8 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementDefinition.java
@@ -80,7 +80,7 @@ import org.rhq.core.domain.resource.ResourceType;
+ " AND md.resourceType.name = :resourceTypeName"
+ " AND md.resourceType.plugin = :resourceTypePlugin"
+ " AND ((:perMinute = 1 AND md.rawNumericType IS NOT NULL) OR (:perMinute = 0 AND md.rawNumericType IS NULL))") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_MEASUREMENT_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_MEASUREMENT_DEF_ID_SEQ", sequenceName = "RHQ_MEASUREMENT_DEF_ID_SEQ")
@Table(name = "RHQ_MEASUREMENT_DEF")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@@ -118,7 +118,7 @@ public class MeasurementDefinition implements Serializable {
public static final String AVAILABILITY_DISPLAY_NAME = "Availability";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_MEASUREMENT_DEF_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementSchedule.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementSchedule.java
index b862deb..e560879 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementSchedule.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/MeasurementSchedule.java
@@ -112,7 +112,7 @@ import org.rhq.core.domain.resource.Resource;
@NamedQuery(name = MeasurementSchedule.DELETE_BY_RESOURCES, query = "" //
+ "DELETE MeasurementSchedule ms " //
+ " WHERE ms.resource.id IN ( :resourceIds )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_METRIC_SCHED_ID_SEQ", sequenceName = "RHQ_MEASUREMENT_SCHED_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_MEASUREMENT_SCHED_ID_SEQ", sequenceName = "RHQ_MEASUREMENT_SCHED_ID_SEQ")
@Table(name = "RHQ_MEASUREMENT_SCHED", uniqueConstraints = { @UniqueConstraint(columnNames = { "DEFINITION",
"RESOURCE_ID" }) })
public class MeasurementSchedule implements Serializable {
@@ -204,7 +204,7 @@ public class MeasurementSchedule implements Serializable {
+ " WHERE ms.RESOURCE_ID = res.ID " //
+ " AND ms.DEFINITION = def.ID ) ";
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_METRIC_SCHED_ID_SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_MEASUREMENT_SCHED_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
index a258dbd..4a58f99 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/ResourceAvailability.java
@@ -81,7 +81,7 @@ import org.rhq.core.domain.resource.Resource;
+ " AND res.parentResource IS NULL " // we only want platforms
+ " AND avail.availabilityType <> 1") // get all NOT UP
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_AVAIL_SEQ", sequenceName = "RHQ_RESOURCE_AVAIL_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_AVAIL_ID_SEQ", sequenceName = "RHQ_RESOURCE_AVAIL_ID_SEQ")
public class ResourceAvailability implements Serializable {
private static final long serialVersionUID = 1L;
@@ -94,7 +94,7 @@ public class ResourceAvailability implements Serializable {
@SuppressWarnings("unused")
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_AVAIL_SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_AVAIL_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
index f26ecbf..3ee9adc 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataKey.java
@@ -50,7 +50,7 @@ import org.rhq.core.domain.measurement.MeasurementSchedule;
*/
@Entity
@NamedQueries( { @NamedQuery(name = CallTimeDataKey.QUERY_DELETE_BY_RESOURCES, query = "DELETE CallTimeDataKey ctdk WHERE ctdk.schedule IN ( SELECT ms FROM MeasurementSchedule ms WHERE ms.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "idGenerator", sequenceName = "RHQ_CALLTIME_DATA_KEY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CALLTIME_DATA_KEY_ID_SEQ", sequenceName = "RHQ_CALLTIME_DATA_KEY_ID_SEQ")
@Table(name = "RHQ_CALLTIME_DATA_KEY")
public class CallTimeDataKey implements Serializable {
private static final long serialVersionUID = 1L;
@@ -59,7 +59,7 @@ public class CallTimeDataKey implements Serializable {
public static final int DESTINATION_MAX_LENGTH = 4000;
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CALLTIME_DATA_KEY_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataValue.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataValue.java
index 96d3b54..5a2a8ad 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataValue.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/calltime/CallTimeDataValue.java
@@ -64,7 +64,7 @@ import org.jetbrains.annotations.Nullable;
+ "AND value.endTime <= :endTime "
+ "GROUP BY key.callDestination "),
@NamedQuery(name = CallTimeDataValue.QUERY_DELETE_BY_RESOURCES, query = "DELETE CallTimeDataValue ctdv WHERE ctdv.key IN ( SELECT ctdk.id FROM CallTimeDataKey ctdk WHERE ctdk.schedule.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "idGenerator", sequenceName = "RHQ_CALLTIME_DATA_VALUE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CALLTIME_DATA_VALUE_ID_SEQ", sequenceName = "RHQ_CALLTIME_DATA_VALUE_ID_SEQ")
@Table(name = "RHQ_CALLTIME_DATA_VALUE")
public class CallTimeDataValue implements Serializable {
private static final long serialVersionUID = 1L;
@@ -72,7 +72,7 @@ public class CallTimeDataValue implements Serializable {
public static final String QUERY_FIND_COMPOSITES_FOR_RESOURCE = "CallTimeDataValue.findCompositesForResource";
public static final String QUERY_DELETE_BY_RESOURCES = "CallTimeDataValue.deleteByResources";
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_CALLTIME_DATA_VALUE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationDefinition.java
index da2f29f..17ed113 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationDefinition.java
@@ -98,7 +98,7 @@ import org.rhq.core.domain.resource.ResourceType;
+ " AND rg.id = :groupId " //
+ " AND ( od.name = :operationName or :operationName IS NULL )" //
+ " ORDER BY od.displayName") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_OPERATION_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_OPERATION_DEF_ID_SEQ", sequenceName = "RHQ_OPERATION_DEF_ID_SEQ")
@Table(name = "RHQ_OPERATION_DEF")
public class OperationDefinition implements Serializable {
public static final String QUERY_FIND_BY_TYPE_AND_NAME = "OperationDefinition.findByTypeAndName";
@@ -122,7 +122,7 @@ public class OperationDefinition implements Serializable {
public static final String TIMEOUT_PARAM_NAME = "rhq.timeout";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_OPERATION_DEF_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
index ff4d4c6..f81ec9a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationHistory.java
@@ -124,7 +124,7 @@ import org.rhq.core.domain.configuration.Configuration;
)
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_OPERATION_HISTORY_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_OPERATION_HISTORY_ID_SEQ", sequenceName = "RHQ_OPERATION_HISTORY_ID_SEQ")
@Table(name = "RHQ_OPERATION_HISTORY")
public abstract class OperationHistory implements Serializable {
public static final String QUERY_FIND_BY_JOB_ID = "OperationHistory.findByJobId";
@@ -142,7 +142,7 @@ public abstract class OperationHistory implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID")
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_OPERATION_HISTORY_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationScheduleEntity.java b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationScheduleEntity.java
index eab6e43..d593622 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationScheduleEntity.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/operation/OperationScheduleEntity.java
@@ -114,7 +114,7 @@ import javax.persistence.Table;
+ " JOIN r.subjects s " //
+ " WHERE go.nextFireTime IS NOT NULL " //
+ " AND s = :subject ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_OPERATION_SCHEDULE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_OPERATION_SCHEDULE_ID_SEQ", sequenceName = "RHQ_OPERATION_SCHEDULE_ID_SEQ")
@Table(name = "RHQ_OPERATION_SCHEDULE")
public abstract class OperationScheduleEntity implements Serializable {
@@ -127,7 +127,7 @@ public abstract class OperationScheduleEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_OPERATION_SCHEDULE_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/AbstractPlugin.java b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/AbstractPlugin.java
index 642e064..7f3a138 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/AbstractPlugin.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/AbstractPlugin.java
@@ -48,7 +48,7 @@ import javax.persistence.Transient;
@DiscriminatorColumn(name = "DEPLOYMENT")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PLUGIN_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PLUGIN_ID_SEQ", sequenceName = "RHQ_PLUGIN_ID_SEQ")
@Table(name = Plugin.TABLE_NAME)
public class AbstractPlugin implements Serializable {
private static final long serialVersionUID = 1L;
@@ -56,7 +56,7 @@ public class AbstractPlugin implements Serializable {
public static final String TABLE_NAME = "RHQ_PLUGIN";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PLUGIN_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
index 5948a7e..788e189 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Agent.java
@@ -139,7 +139,7 @@ import org.rhq.core.domain.cloud.Server;
+ " SET a.status = -1 " // negative numbers so that bitmask strategy does not conflict with this one
+ " WHERE a.status = 0 ") //
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_AGENT_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_AGENT_ID_SEQ", sequenceName = "RHQ_AGENT_ID_SEQ")
@Table(name = "RHQ_AGENT")
public class Agent implements Serializable {
public static final long serialVersionUID = 1L;
@@ -177,7 +177,7 @@ public class Agent implements Serializable {
public static final String SECURITY_TOKEN_RESET = "@#$reset$#@";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_AGENT_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/CreateResourceHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/CreateResourceHistory.java
index c2a369a..e0a345d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/CreateResourceHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/CreateResourceHistory.java
@@ -63,7 +63,7 @@ import org.rhq.core.domain.content.InstalledPackage;
+ " AND ( crh.mtime < :endTime OR :endTime IS NULL ) "),
@NamedQuery(name = CreateResourceHistory.QUERY_FIND_BY_ID, query = "SELECT crh FROM CreateResourceHistory AS crh WHERE crh.id = :id"),
@NamedQuery(name = CreateResourceHistory.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM CreateResourceHistory crh WHERE crh.parentResource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_CREATE_RES_HIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_CREATE_RES_HIST_ID_SEQ", sequenceName = "RHQ_CREATE_RES_HIST_ID_SEQ")
@Table(name = "RHQ_CREATE_RES_HIST")
public class CreateResourceHistory implements Serializable {
@@ -77,7 +77,7 @@ public class CreateResourceHistory implements Serializable {
// Attributes --------------------------------------------
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_CREATE_RES_HIST_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/DeleteResourceHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/DeleteResourceHistory.java
index 4abef95..43b700f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/DeleteResourceHistory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/DeleteResourceHistory.java
@@ -22,8 +22,6 @@
*/
package org.rhq.core.domain.resource;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
import java.io.Serializable;
import java.util.Date;
@@ -58,7 +56,7 @@ import javax.persistence.Table;
+ " AND ( drh.ctime > :startTime OR :startTime IS NULL ) " //
+ " AND ( drh.mtime < :endTime OR :endTime IS NULL ) "),
@NamedQuery(name = DeleteResourceHistory.QUERY_DELETE_BY_RESOURCES, query = "DELETE FROM DeleteResourceHistory drh WHERE drh.resource.id IN ( :resourceIds ) )") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_DELETE_RES_HIST_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_DELETE_RES_HIST_ID_SEQ", sequenceName = "RHQ_DELETE_RES_HIST_ID_SEQ")
@Table(name = "RHQ_DELETE_RES_HIST")
public class DeleteResourceHistory implements Serializable {
@@ -72,7 +70,7 @@ public class DeleteResourceHistory implements Serializable {
// Attributes --------------------------------------------
- @GeneratedValue(generator = "SEQ", strategy = GenerationType.AUTO)
+ @GeneratedValue(generator = "RHQ_DELETE_RES_HIST_ID_SEQ", strategy = GenerationType.AUTO)
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProcessScan.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProcessScan.java
index c4b9c56..d9aaaea 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProcessScan.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProcessScan.java
@@ -38,13 +38,13 @@ import javax.persistence.Table;
* @author John Mazzitelli
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PROCESS_SCAN_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PROCESS_SCAN_ID_SEQ", sequenceName = "RHQ_PROCESS_SCAN_ID_SEQ")
@Table(name = "RHQ_PROCESS_SCAN")
public class ProcessScan implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PROCESS_SCAN_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProductVersion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProductVersion.java
index 553f11f..629499e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProductVersion.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ProductVersion.java
@@ -52,7 +52,7 @@ import org.rhq.core.domain.content.ProductVersionPackageVersion;
*/
@Entity
@NamedQueries( { @NamedQuery(name = ProductVersion.QUERY_FIND_BY_RESOURCE_TYPE_AND_VERSION, query = "SELECT pv FROM ProductVersion AS pv WHERE pv.resourceType = :resourceType AND pv.version = :version") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_PRD_VER_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_PRD_VER_ID_SEQ", sequenceName = "RHQ_PRD_VER_ID_SEQ")
@Table(name = "RHQ_PRD_VER")
public class ProductVersion implements Serializable {
// Constants --------------------------------------------
@@ -64,7 +64,7 @@ public class ProductVersion implements Serializable {
// Attributes --------------------------------------------
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_PRD_VER_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index be29fd6..c54d987 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -765,7 +765,7 @@ import org.rhq.core.domain.util.Summary;
+ " 0 < ( SELECT COUNT(defs) FROM r.driftDefinitions defs WHERE defs.complianceStatus <> 0) "
+ "GROUP BY rt.name, rt.plugin, rt.category, rt.id, r.version "
+ "ORDER BY rt.category, rt.plugin, rt.name, r.version ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_SEQ", sequenceName = "RHQ_RESOURCE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_ID_SEQ", sequenceName = "RHQ_RESOURCE_ID_SEQ")
@Table(name = Resource.TABLE_NAME)
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@@ -915,7 +915,7 @@ public class Resource implements Comparable<Resource>, Serializable {
public static final int ROOT_ID = -1;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_ID_SEQ")
@Id
@Summary(index = 0)
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceError.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceError.java
index b0e22ed..b557ac8 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceError.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceError.java
@@ -56,7 +56,7 @@ import org.jetbrains.annotations.Nullable;
@NamedQuery(name = ResourceError.QUERY_DELETE_BY_RESOURCES, query = "DELETE From ResourceError re WHERE re.resource.id IN ( :resourceIds )"),
@NamedQuery(name = ResourceError.QUERY_FIND_BY_RESOURCE_ID, query = "SELECT re FROM ResourceError re WHERE re.resource.id = :resourceId"),
@NamedQuery(name = ResourceError.QUERY_FIND_BY_RESOURCE_ID_AND_ERROR_TYPE, query = "SELECT re FROM ResourceError re WHERE re.resource.id = :resourceId AND re.errorType = :errorType") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_ERROR_SEQ", sequenceName = "RHQ_RESOURCE_ERROR_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_ERROR_ID_SEQ", sequenceName = "RHQ_RESOURCE_ERROR_ID_SEQ")
@Table(name = "RHQ_RESOURCE_ERROR")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class ResourceError implements Serializable {
@@ -69,7 +69,7 @@ public class ResourceError implements Serializable {
private static final int MAX_SUMMARY_LENGTH = 1000;
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_ERROR_SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_ERROR_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceSubCategory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceSubCategory.java
index e2bd3e6..10b0247 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceSubCategory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceSubCategory.java
@@ -53,7 +53,7 @@ import org.jetbrains.annotations.NotNull;
* Class representing a sub category, where a sub category is meant to group similar Resource types together.
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_RESOURCE_SUBCAT_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_SUBCAT_ID_SEQ", sequenceName = "RHQ_RESOURCE_SUBCAT_ID_SEQ")
@Table(name = "RHQ_RESOURCE_SUBCAT")
@NamedQueries( { @NamedQuery(name = ResourceSubCategory.QUERY_FIND_BY_NAME_AND_PLUGIN, query = "SELECT rsc FROM ResourceSubCategory AS rsc WHERE rsc.name = :name AND rsc.resourceType.plugin = :plugin") })
public class ResourceSubCategory implements Comparable<ResourceSubCategory>, Serializable {
@@ -62,7 +62,7 @@ public class ResourceSubCategory implements Comparable<ResourceSubCategory>, Ser
public static final String QUERY_FIND_BY_NAME_AND_PLUGIN = "ResourceSubCategory.findByNameAndPlugin";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_SUBCAT_ID_SEQ")
@Id
private int id;
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 4833613..3e8f6f7 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
@@ -80,7 +80,7 @@ import org.rhq.core.domain.util.Summary;
*/
@Entity
@Table(name = ResourceType.TABLE_NAME)
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "SEQ", sequenceName = "RHQ_RESOURCE_TYPE_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_TYPE_ID_SEQ", sequenceName = "RHQ_RESOURCE_TYPE_ID_SEQ")
@NamedQueries( {
@NamedQuery(name = ResourceType.QUERY_GET_BUNDLE_CONFIG_BY_GROUP_ID, query = "SELECT rg.resourceType.bundleConfiguration FROM ResourceGroup rg WHERE rg.id = :groupId"),
@NamedQuery(name = ResourceType.QUERY_FIND_BY_PLUGIN, query = "SELECT rt FROM ResourceType AS rt "
@@ -296,7 +296,7 @@ public class ResourceType implements Serializable, Comparable<ResourceType> {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_TYPE_ID_SEQ")
@Summary(index = 0)
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/GroupDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/GroupDefinition.java
index 4f3f510..e48c0e7 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/GroupDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/GroupDefinition.java
@@ -84,7 +84,7 @@ import org.rhq.core.domain.util.StringUtils;
+ "SELECT gd " //
+ " FROM GroupDefinition AS gd " //
+ " WHERE gd.recalculationInterval != 0 ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_GROUP_DEF_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_GROUP_DEF_ID_SEQ", sequenceName = "RHQ_GROUP_DEF_ID_SEQ")
@Table(name = "RHQ_GROUP_DEF")
public class GroupDefinition implements Serializable {
private static final long serialVersionUID = 1L;
@@ -99,7 +99,7 @@ public class GroupDefinition implements Serializable {
public static final String QUERY_FIND_ALL_RECALCULATING = "GroupDefinition.findAllRecalculating_admin";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_GROUP_DEF_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/LdapGroup.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/LdapGroup.java
index 7ba5a6b..4da7625 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/LdapGroup.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/LdapGroup.java
@@ -47,7 +47,7 @@ import org.rhq.core.domain.authz.Role;
@NamedQuery(name = LdapGroup.QUERY_FIND_ALL, query = "SELECT g FROM LdapGroup AS g"), //
@NamedQuery(name = LdapGroup.FIND_BY_ROLES_GROUP_NAMES, query = "SELECT distinct l.role FROM LdapGroup l WHERE l.name in (:names)") })
@Table(name = "RHQ_ROLE_LDAP_GROUP")
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_ROLE_LDAP_GROUP_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_ROLE_LDAP_GROUP_ID_SEQ", sequenceName = "RHQ_ROLE_LDAP_GROUP_ID_SEQ")
@XmlAccessorType(XmlAccessType.FIELD)
public class LdapGroup implements Serializable {
@@ -59,7 +59,7 @@ public class LdapGroup implements Serializable {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_ROLE_LDAP_GROUP_ID_SEQ")
private int id;
@ManyToOne
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
index 954568d..eda9d9f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
@@ -199,7 +199,7 @@ import org.rhq.core.domain.tagging.Tag;
+ " JOIN rg.explicitResources explicitRes " //
+ " WHERE rg.id = :groupId ) " //
+ " AND res.inventoryStatus = 'COMMITTED' ") })
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_RESOURCE_GROUP_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_RESOURCE_GROUP_ID_SEQ", sequenceName = "RHQ_RESOURCE_GROUP_ID_SEQ")
@Table(name = "RHQ_RESOURCE_GROUP")
@XmlAccessorType(XmlAccessType.FIELD)
public class ResourceGroup extends Group {
@@ -442,7 +442,7 @@ public class ResourceGroup extends Group {
+ " g6parent.ID = alreadyMember.RESOURCE_ID ) ) ";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_RESOURCE_GROUP_ID_SEQ")
@Id
private int id;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
index 0988d19..a3dff26 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SavedSearch.java
@@ -58,7 +58,7 @@ import org.rhq.core.domain.auth.Subject;
* @author Joseph Marques
*/
@Entity
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_SAVED_SEARCH_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_SAVED_SEARCH_ID_SEQ", sequenceName = "RHQ_SAVED_SEARCH_ID_SEQ")
@Table(name = "RHQ_SAVED_SEARCH")
public class SavedSearch implements Serializable {
@@ -66,7 +66,7 @@ public class SavedSearch implements Serializable {
@Id
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_SAVED_SEARCH_ID_SEQ")
private Integer id;
@Column(name = "CONTEXT", nullable = false)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/tagging/Tag.java b/modules/core/domain/src/main/java/org/rhq/core/domain/tagging/Tag.java
index 2818f77..d2ca730 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/tagging/Tag.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/tagging/Tag.java
@@ -62,7 +62,7 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
"GROUP BY t.id, t.namespace, t.semantic, t.name\n" +
"ORDER BY (count(r) + count(g) + count(b) + count(bv) + count(bd)) desc")
})
-@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_TAGGING_SEQ", sequenceName = "RHQ_TAGGING_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "RHQ_TAGGING_ID_SEQ", sequenceName = "RHQ_TAGGING_ID_SEQ")
@Table(name = "RHQ_TAGGING")
@XmlAccessorType(XmlAccessType.FIELD)
public class Tag implements Serializable {
@@ -72,7 +72,7 @@ public class Tag implements Serializable {
public static final String QUERY_TAG_COMPOSITE_REPORT = "Tag.compositeReport";
@Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_TAGGING_SEQ")
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "RHQ_TAGGING_ID_SEQ")
@Id
private int id;
commit dece2af450b52df1600f582ebaffba06e0d9b1e2
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Mar 13 16:21:58 2013 -0400
The SequenceGenerator allocation size must match the increment size of
the underlying sequence.
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 a114843..c1adcd7 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
@@ -90,7 +90,7 @@ import org.rhq.core.domain.resource.Agent;
+ " UPDATE Server s " //
+ " SET s.status = -1 " // negative numbers so that bitmask strat does not conflict with this one
+ " WHERE s.status = 0 ") })
-@SequenceGenerator(name = "id", sequenceName = "RHQ_SERVER_ID_SEQ")
+@SequenceGenerator(allocationSize = org.rhq.core.domain.util.Constants.ALLOCATION_SIZE, name = "id", sequenceName = "RHQ_SERVER_ID_SEQ")
@Table(name = "RHQ_SERVER")
public class Server implements Serializable {
11 years, 3 months
[rhq] modules/enterprise
by Thomas Segismont
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java | 89 ++++++++--
1 file changed, 76 insertions(+), 13 deletions(-)
New commits:
commit c4d54dcd4dfae2d99848f9a208066438b79913d4
Author: Thomas Segismont <tsegismo(a)redhat.com>
Date: Wed Mar 13 21:16:41 2013 +0100
More itests for DiscoveryBoss
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
index 95aa603..4736bc3 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -27,6 +27,7 @@ import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.sql.Connection;
+import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.UUID;
@@ -58,8 +59,10 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.discovery.MergeResourceResponse;
import org.rhq.core.domain.discovery.ResourceSyncInfo;
import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.util.collection.ArrayUtils;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
@@ -127,6 +130,8 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
return response;
}
});
+
+ prepareScheduler();
}
@Override
@@ -135,6 +140,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
cleanDB();
} finally {
unprepareForTestAgents();
+ unprepareScheduler();
}
}
@@ -150,10 +156,10 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
server.addChildResource(service1);
server.addChildResource(service2);
- platform.setUuid("" + new Random().nextInt());
- server.setUuid("" + new Random().nextInt());
- service1.setUuid("" + new Random().nextInt());
- service2.setUuid("" + new Random().nextInt());
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ service1.setUuid(String.valueOf(new Random().nextInt()));
+ service2.setUuid(String.valueOf(new Random().nextInt()));
inventoryReport.addAddedRoot(platform);
@@ -166,7 +172,7 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
// First just submit the platform
InventoryReport inventoryReport = new InventoryReport(agent);
Resource platform = new Resource("alpha", "platform", platformType);
- platform.setUuid("" + new Random().nextInt());
+ platform.setUuid(String.valueOf(new Random().nextInt()));
inventoryReport.addAddedRoot(platform);
ResourceSyncInfo syncInfo = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
assert syncInfo != null;
@@ -182,9 +188,9 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
server.addChildResource(service1);
server.addChildResource(service2);
- server.setUuid("" + new Random().nextInt());
- service1.setUuid("" + new Random().nextInt());
- service2.setUuid("" + new Random().nextInt());
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ service1.setUuid(String.valueOf(new Random().nextInt()));
+ service2.setUuid(String.valueOf(new Random().nextInt()));
inventoryReport.addAddedRoot(server);
@@ -202,9 +208,9 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
Resource service2 = new Resource("delta", "service 2", serviceType2);
server.addChildResource(service2);
- platform.setUuid("" + new Random().nextInt());
- server.setUuid("" + new Random().nextInt());
- service2.setUuid("" + new Random().nextInt());
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ service2.setUuid(String.valueOf(new Random().nextInt()));
inventoryReport.addAddedRoot(platform);
@@ -225,6 +231,63 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
}
}
+ @Test(groups = "integration.ejb3")
+ public void testIgnoreUnignoreAndImportResources() throws Exception {
+
+ // First create an inventory report for a new platform with servers
+
+ InventoryReport inventoryReport = new InventoryReport(agent);
+
+ Resource platform = new Resource("platform", "platform", platformType);
+ platform.setUuid(String.valueOf(new Random().nextInt()));
+ for (int i = 0; i < 17; i++) {
+ String serverString = "server " + String.valueOf(i);
+ Resource server = new Resource(serverString, serverString, serverType);
+ server.setUuid(String.valueOf(new Random().nextInt()));
+ platform.addChildResource(server);
+ }
+
+ inventoryReport.addAddedRoot(platform);
+
+ // Merge this inventory report
+ ResourceSyncInfo platformSyncInfo = discoveryBoss.mergeInventoryReport(serialize(inventoryReport));
+
+ // Check merge result
+ assertEquals(InventoryStatus.NEW, platformSyncInfo.getInventoryStatus());
+ assertEquals(platform.getChildResources().size(), platformSyncInfo.getChildSyncInfos().size());
+
+ // Collect the resource ids generated for the platform and the servers
+
+ int platformId = platformSyncInfo.getId();
+ List<Integer> serverIds = new LinkedList<Integer>();
+ for (ResourceSyncInfo serverSyncInfo : platformSyncInfo.getChildSyncInfos()) {
+ serverIds.add(serverSyncInfo.getId());
+ }
+ int[] arrayOfServerIds = ArrayUtils.unwrapCollection(serverIds);
+
+ // Now test ignore, unignore and import behavior
+
+ try {
+ discoveryBoss.ignoreResources(subjectManager.getOverlord(), arrayOfServerIds);
+ fail("Ignore resources should fail as platform resource has not yet been comitted");
+ } catch (EJBException e) {
+ assertEquals(String.valueOf(e.getCause()), IllegalStateException.class, e.getCause().getClass());
+ assertTrue(String.valueOf(e.getCause()), e.getCause().getMessage().contains("has not yet been committed"));
+ }
+ discoveryBoss.importResources(subjectManager.getOverlord(), new int[] { platformId });
+ discoveryBoss.ignoreResources(subjectManager.getOverlord(), arrayOfServerIds);
+ try {
+ discoveryBoss.importResources(subjectManager.getOverlord(), arrayOfServerIds);
+ fail("Import resources should fail for ignored resources");
+ } catch (EJBException e) {
+ assertEquals(String.valueOf(e.getCause()), IllegalArgumentException.class, e.getCause().getClass());
+ assertTrue(String.valueOf(e.getCause()),
+ e.getCause().getMessage().startsWith("Can only set inventory status to"));
+ }
+ discoveryBoss.unignoreResources(subjectManager.getOverlord(), arrayOfServerIds);
+ discoveryBoss.importResources(subjectManager.getOverlord(), arrayOfServerIds);
+ }
+
/**
* Use this to fake like your remoting objects. Can be used to keep your own copy of objects locally transient.
*
@@ -332,4 +395,4 @@ public class DiscoveryBossBeanTest extends AbstractEJB3Test {
return getClass().getSimpleName() + ".xml";
}
-}
\ No newline at end of file
+}
11 years, 3 months
[rhq] modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java | 15 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java | 6 +++-
modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_closed.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_open.png |binary
4 files changed, 19 insertions(+), 2 deletions(-)
New commits:
commit 8b0f4b53d64097e217b0f5dc51dc0d4767858e5b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Mar 13 12:57:51 2013 -0400
minor issue - fixing the icons in the discovery queue so they make a bit more sense
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
index a15857e..76ee6ae 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
@@ -8,7 +8,11 @@ import org.rhq.core.domain.event.EventSeverity;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.ResourceAvailability;
import org.rhq.core.domain.operation.OperationRequestStatus;
-import org.rhq.core.domain.resource.*;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.DeleteResourceStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceCategory;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupCategory;
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite.GroupAvailabilityType;
@@ -26,6 +30,15 @@ public class ImageManager {
public static final String IMAGES_DIR = "images/";
/**
+ * Returns the base icon name for the discovery queue's platform folder nodes.
+ * There are actually two icons, open and closed - the returned string is just
+ * the base icon name.
+ */
+ public static String getDiscoveryQueuePlatformIconBase() {
+ return "global/DiscoveryQueue_Platform_16.png";
+ }
+
+ /**
* Returns a generic "help" icon. This will also have a peer "disabled" help icon.
*/
public static String getHelpIcon() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index 0233e3e..2223ed7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -48,8 +48,10 @@ import com.smartgwt.client.widgets.tree.TreeGridField;
import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.resource.InventoryStatus;
+import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.RefreshableView;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
@@ -57,9 +59,9 @@ import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.util.TableUtility;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedIButton;
import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Greg Hinkle
@@ -111,6 +113,8 @@ public class ResourceAutodiscoveryView extends EnhancedVLayout implements Refres
treeGrid.setAutoFitData(Autofit.HORIZONTAL);
treeGrid.setWrapCells(true);
treeGrid.setFixedRecordHeights(false);
+ treeGrid.setFolderIcon(ImageManager.getDiscoveryQueuePlatformIconBase());
+ treeGrid.setNodeIcon(ImageManager.getResourceIcon(ResourceCategory.SERVER));
final TreeGridField name, key, type, description, status, ctime;
name = new TreeGridField("name");
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_closed.png b/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_closed.png
new file mode 100644
index 0000000..65e8952
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_closed.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_open.png
new file mode 100644
index 0000000..b9b3d14
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/global/DiscoveryQueue_Platform_16_open.png differ
11 years, 3 months
[rhq] modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java | 13 ++++++++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java | 7 ++++-
2 files changed, 17 insertions(+), 3 deletions(-)
New commits:
commit 737e543becd2449b9db3c0d8774e52c41ad3db94
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Mar 13 16:15:20 2013 +0100
[BZ 849711] Showing the delete button only from the list of agents page (hiding it on the aff. group details page and server detail page). Adding JavaDoc.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index 55bddbb..a5e9ac5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -51,7 +51,12 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Shows the table of all agents.
- *
+ *
+ * This component is used from three various contexts:
+ * 1) simple list of all available agents (url fragment - #Administration/Topology/Agents)
+ * 2) list of agents connected to the server on server detail page (#Administration/Topology/Servers/{serverId})
+ * 3) list of agents assigned to a affinity group (#Administration/Topology/AffinityGroups/{aGroupId})
+ *
* @author Jirka Kremser
*/
public class AgentTableView extends TableSection<AgentDatasource> implements HasViewName {
@@ -127,8 +132,12 @@ public class AgentTableView extends TableSection<AgentDatasource> implements Has
}
}
- setupDeleteButton();
+ // list of all agents (context #1 see the class JavaDoc)
+ if (id == null) {
+ setupDeleteButton();
+ }
+ // list of agents assigned to affinity group (context #3)
if (isAffinityGroupId) {
showUpdateMembersAction();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
index cdce529..c46c925 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java
@@ -55,7 +55,12 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Shows the table of all servers.
- *
+ *
+ * This component is used from three various contexts:
+ * 1) simple list of all available servers (url fragment - #Administration/Topology/Servers)
+ * 2) list of servers in the agent's failover list (#Administration/Topology/Agents/{agentId})
+ * 3) list of servers assigned to a affinity group (#Administration/Topology/AffinityGroups/{aGroupId})
+ *
* @author Jirka Kremser
*/
public class ServerTableView extends
11 years, 3 months
[rhq] modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java | 46 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java | 16
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 23 -
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 217 ++++------
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java | 164 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java | 10
15 files changed, 372 insertions(+), 137 deletions(-)
New commits:
commit c9287f6c75b16712c45f03d24ea363524921ae39
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Mar 13 10:14:30 2013 -0400
[BZ 849711] be able to delete agent simply from the admin agent UI page
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index 8376594..55bddbb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -25,6 +25,7 @@ import static org.rhq.enterprise.gui.coregui.client.admin.topology.AgentDatasour
import java.util.List;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.CellFormatter;
@@ -33,6 +34,8 @@ import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
@@ -41,7 +44,10 @@ import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablem
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Shows the table of all agents.
@@ -120,11 +126,51 @@ public class AgentTableView extends TableSection<AgentDatasource> implements Has
});
}
}
+
+ setupDeleteButton();
+
if (isAffinityGroupId) {
showUpdateMembersAction();
}
}
+ private void setupDeleteButton() {
+ addTableAction(MSG.common_button_delete(), MSG.view_adminTopology_agent_delete_confirm(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY, Permission.MANAGE_INVENTORY) {
+ public void executeAction(final ListGridRecord[] selections, Object actionValue) {
+ if (selections == null || selections.length == 0) {
+ return; // do nothing since nothing is selected (we really shouldn't get here)
+ }
+
+ final ResourceGWTServiceAsync resourceManager = GWTServiceLookup.getResourceService();
+ final Agent[] agents = new Agent[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ final int agentId = selection.getAttributeAsInt(FIELD_ID);
+ final String agentName = selection.getAttribute(FIELD_NAME);
+ final Agent agent = new Agent();
+ agent.setId(agentId);
+ agent.setName(agentName);
+ agents[i++] = agent;
+ }
+
+ resourceManager.uninventoryAllResourcesByAgent(agents, new AsyncCallback<Void>() {
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_adminTopology_agent_delete_submitted(Integer
+ .toString(agents.length))));
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_adminTopology_agent_delete_error(), caught);
+ refresh();
+ }
+ });
+ }
+ });
+ }
+
private void showUpdateMembersAction() {
addTableAction(MSG.view_groupInventoryMembers_button_updateMembership(), new AuthorizedTableAction(this,
TableActionEnablement.ALWAYS, Permission.MANAGE_SETTINGS) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
index 1cdc64c..6d7d00c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
@@ -26,6 +26,7 @@ import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.CreateResourceHistory;
import org.rhq.core.domain.resource.DeleteResourceHistory;
import org.rhq.core.domain.resource.InventoryStatus;
@@ -106,6 +107,8 @@ public interface ResourceGWTService extends RemoteService {
void unignoreResources(int[] resourceIds) throws RuntimeException;
+ void uninventoryAllResourcesByAgent(Agent[] agents) throws RuntimeException;
+
List<Integer> uninventoryResources(int[] resourceIds) throws RuntimeException;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
index 4ee821b..d9c74f6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.CannotConnectToAgentException;
import org.rhq.core.domain.resource.CreateResourceHistory;
import org.rhq.core.domain.resource.DeleteResourceHistory;
@@ -259,6 +260,21 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl implements Re
}
}
+ public void uninventoryAllResourcesByAgent(Agent[] agents) throws RuntimeException {
+ try {
+ if (agents != null && agents.length > 0) {
+ // we want to uninventory them one at a time to ensure our server-side doesn't do too much in a single SLSB method/tx
+ // If one fails and throws an exception, we abort the whole thing. This may or may not be a good thing.
+ for (Agent agent : agents) {
+ resourceManager.uninventoryAllResourcesByAgent(getSessionSubject(), agent);
+ }
+ }
+ return;
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
public List<Integer> uninventoryResources(int[] resourceIds) throws RuntimeException {
try {
return resourceManager.uninventoryResources(getSessionSubject(), resourceIds);
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index d552e48..6d0851d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -8,19 +8,19 @@
###################################
chart_date_label = Date
chart_down_label = Down
-chart_time_label = Start
-chart_unknown_label = Unknown
-chart_no_data_label = No Data
-chart_title_avg_label = Avg
-chart_title_min_label = Min
-chart_title_peak_label = Max
chart_hover_availability_label = Availability
+chart_hover_bar_label = Duration
chart_hover_date_format = %m/%d/%y
-chart_hover_time_format = %I:%M:%S %p
-chart_hover_start_label = Start
chart_hover_end_label = End
chart_hover_period_label = Period
-chart_hover_bar_label = Duration
+chart_hover_start_label = Start
+chart_hover_time_format = %I:%M:%S %p
+chart_no_data_label = No Data
+chart_time_label = Start
+chart_title_avg_label = Avg
+chart_title_min_label = Min
+chart_title_peak_label = Max
+chart_unknown_label = Unknown
common_alert_high = High
common_alert_low = Low
common_alert_medium = Medium
@@ -566,6 +566,9 @@ view_adminTopology_agent_agentBindAddress = Agent Bind Address
view_adminTopology_agent_agentBindPort = Agent Bind Port
view_adminTopology_agent_agentName = Agent Name
view_adminTopology_agent_connectedServer = Connected Server
+view_adminTopology_agent_delete_confirm = This will delete the selected agents and uninventory any and all resources associated with them. Are you sure you want to do this?
+view_adminTopology_agent_delete_error = The request to delete the selected agents failed.
+view_adminTopology_agent_delete_submitted = Deleted [{0}] agents and all of their associated resources are uninventoried.\n
view_adminTopology_agent_lastAvailabilityPing = Last Availability Ping
view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
view_adminTopology_agents = Agents
@@ -811,8 +814,8 @@ view_admin_topology = Topology
view_alert_common_tab_conditions = Conditions
view_alert_common_tab_conditions_expression = Fire alert when
view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = Add Condition
view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Add Condition
view_alert_common_tab_conditions_recovery_disabled = This alert caused its alert definition to be disabled
view_alert_common_tab_conditions_recovery_enabled = Triggered ''{0}'' to be re-enabled
view_alert_common_tab_conditions_text = Condition
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index bebeb16..1a27856 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -829,8 +829,8 @@ view_admin_topology = Topologie
view_alert_common_tab_conditions = Podmínky
view_alert_common_tab_conditions_expression = Vyvolat výstrahu když
view_alert_common_tab_conditions_expression_tooltip = Určí jestli některé (ANY) nebo všechny (ALL) podmínky se musí vyhodnotit na true, aby celková podmínka byla splněna.
-view_alert_common_tab_conditions_modal_title = Přidat podmínku
view_alert_common_tab_conditions_modalEdit_title = Editovat podmínku
+view_alert_common_tab_conditions_modal_title = Přidat podmínku
view_alert_common_tab_conditions_recovery_disabled = Tato výstraha způsobí, že definice této výstrahy bude zneplatněna
view_alert_common_tab_conditions_recovery_enabled = Odpáleno ''{0}'' bude znovupovolen
view_alert_common_tab_conditions_text = Podmínka
@@ -1302,8 +1302,8 @@ view_bundle_version_deleteFailure = Nepodařilo se smazat verzi balíku [{0}]
view_bundle_version_deleteSuccessful = Úspěšně jste smazali verzi balíku [{0}]
view_bundle_version_loadFailure = Nepodařilo s načíst verzi balíku
view_bundle_versions = Verze
-view_configCompare_comparingConfigs = Porovnat konfigurace
##view_charts_time_axis_label = Time
+view_configCompare_comparingConfigs = Porovnat konfigurace
view_configCompare_configCompare = Porovnání konfigurace
view_configEdit_addItem = Přidat položku do seznamu
view_configEdit_confirm_1 = Jste si jisti, že chcete smazat vybrané vlastnosti z množiny?
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 91145ac..a276a6b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -722,8 +722,8 @@ view_admin_topology = Topologie
view_alert_common_tab_conditions = Bedingungen
view_alert_common_tab_conditions_expression = Alarm auslösen wenn
##view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = Bedingung hinzufügen
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Bedingung hinzufügen
view_alert_common_tab_conditions_recovery_disabled = Dieser Alarm hat seine Definition deaktiviert.
view_alert_common_tab_conditions_recovery_enabled = Ausgelöst, dass ''{0}'' wieder aktiviert wurde
view_alert_common_tab_conditions_text = Bedingung
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index aa4c5fd..3ad6421 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -805,8 +805,8 @@ view_admin_topology = トポロジー
view_alert_common_tab_conditions = 条件
view_alert_common_tab_conditions_expression = アラート発火
view_alert_common_tab_conditions_expression_tooltip = 全体の条件がtrueであると認められるために、条件の一部またはすべてがtrueと評価されなければならないかどうか決定します
-view_alert_common_tab_conditions_modal_title = 条件追加
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = 条件追加
view_alert_common_tab_conditions_recovery_disabled = このアラートはそのアラート定義が無効化される原因となりました
view_alert_common_tab_conditions_recovery_enabled = トリガー ''{0}'' が再び有効化される
view_alert_common_tab_conditions_text = 条件
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
index 36dbda8..8d8eaea 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
@@ -698,8 +698,8 @@ view_admin_topology = 토폴로지
view_alert_common_tab_conditions = 조건
view_alert_common_tab_conditions_expression = 경고 발생시
view_alert_common_tab_conditions_expression_tooltip = 전체 조건이 true로 인정받기 위해 조건의 일부 또는 전부가 true로 평가되어야 하는지 결정합니다.
-view_alert_common_tab_conditions_modal_title = 조건 추가
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = 조건 추가
view_alert_common_tab_conditions_recovery_disabled = 이 경고는 경고 정의가 비활성화되는 원인이 되었습니다.
view_alert_common_tab_conditions_recovery_enabled = 트리거 ''{0}''이 다시 활성화 되는
view_alert_common_tab_conditions_text = 조건
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index dd3a3e6..ea8827d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -21,7 +21,6 @@
##chart_hover_end_label = End
##chart_hover_period_label = Period
##chart_hover_bar_label = Duration
-view_admin_systemSettings_BaselineDataSet_desc = Quantidade de dados mensurados que ser\u00E1 utilizada para determinar um baseline. Valor especificado em dias.
common_alert_high = Alto
common_alert_low = Baixo
common_alert_medium = M\u00E9dio
@@ -740,6 +739,7 @@ view_admin_systemSettings_AvailabilityPurge_desc = Tempo de vida das m\u00E9tric
view_admin_systemSettings_AvailabilityPurge_name = Excluir m\u00E9tricas de disponibilidade com mais de
view_admin_systemSettings_BaseURL_desc = URL do servidor GUI, usada principalmente nas notifica\u00F5es de alertas por email.
view_admin_systemSettings_BaseURL_name = GUI Console URL
+view_admin_systemSettings_BaselineDataSet_desc = Quantidade de dados mensurados que ser\u00E1 utilizada para determinar um baseline. Valor especificado em dias.
view_admin_systemSettings_BaselineDataSet_name = Conjunto de dados para o Baseline
view_admin_systemSettings_BaselineFrequency_desc = A frequ\u00EAncia na qual o c\u00E1lculo autom\u00E1tico de baselines ser\u00E1 realizado. O valor 0 desabilita o c\u00E1lculo autom\u00E1tico. Valor espeficicado em dias.
view_admin_systemSettings_BaselineFrequency_name = Frequ\u00EAncia do c\u00E1lculo baseline
@@ -811,8 +811,8 @@ view_admin_topology = Topologia
view_alert_common_tab_conditions = Condi\u00E7\u00F5es
view_alert_common_tab_conditions_expression = Disparar alerta quando
view_alert_common_tab_conditions_expression_tooltip = Determina se QUALQUER UMA ou TODAS as condi\u00E7\u00F5es devem ser satisfeitas para que todo o conjunto de condi\u00E7\u00F5es seja considerado verdadeiro.
-view_alert_common_tab_conditions_modal_title = Adicionar nova condi\u00E7\u00E3o.
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Adicionar nova condi\u00E7\u00E3o.
view_alert_common_tab_conditions_recovery_disabled = Este alerta desativou a sua defini\u00E7\u00E3o.
view_alert_common_tab_conditions_recovery_enabled = ''{0}'' disparado para ser reativado.
view_alert_common_tab_conditions_text = Condi\u00E7\u00E3o
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 6fba7f5..85cd1d9 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2521,6 +2521,81 @@ view_aboutBox_homepage = Домашняя страница
view_aboutBox_jbossByRedHat = JBoss by Red Hat
view_aboutBox_title = О {0}
view_aboutBox_version = Версия\:
+view_adminConfig_downloads = Загрузки
+view_adminConfig_systemSettings = Системные настройки
+view_adminContent_contentSources = Источники контента
+view_adminRoles_assignedGroups = Назначенные группы ресурсов
+view_adminRoles_assignedSubjects = Назначенные субъекты
+view_adminRoles_failLdap = Не удалось определить, настроен ли LDAP - предположительно LDAP отсутствует.
+view_adminRoles_failLdapGroups = Не удалось получить LDAP-группы. Предположительно LDAP группы отсутствуют
+view_adminRoles_failLdapGroupsRole = Не удалось загрузить LDAP группы, доступные для роли.
+view_adminRoles_failRoles = Не удалось получить роли.
+view_adminRoles_globalPerms = Глобальные полномочия
+view_adminRoles_ldapGroups = LDAP-группы
+view_adminRoles_ldapGroupsReadOnly = данные LDAP групп доступны только для чтения
+view_adminRoles_permissions_autoselecting_configureRead_implied = Автоматически отключено CONFIGURE_WRITE полномочие, поскольку отсутствует CONFIGURE_READ...
+view_adminRoles_permissions_autoselecting_configureWrite_implied = Автоматически выбрано CONFIGURE_READ полномочие, поскольку CONFIGURE_WRITE подразумевает, что ...
+view_adminRoles_permissions_autoselecting_manageInventory_implied = Автоматически установлены не выбранные полномочия реусурсов, поскольку MANAGE_INVENTORY предполагает все полномочия ресурса...
+view_adminRoles_permissions_autoselecting_manageSecurity_implied = Автоматически установлены невыбранные полномочия, поскольку MANAGE_SECURITY включает все другие полномочия...
+view_adminRoles_permissions_globalPermissions = Глобальные полномчия
+view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection = {0} полномочия на чтение не могут быть отключены, пока предварительно {0} полномочия записи, которые включают полномочия на чтение, не будут отключены.
+view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection = {0} полномочия не могут быть отключены, пока предварительно Manage Inventory, которая включает все полномочия ресурса, не будет отключено.
+view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection = {0} полномочия не могут быть отключены, пока предватильно Manage Security полномочие, которое включает все другие полномочия, не будет отключено.
+view_adminRoles_permissions_isAuthorized = Авторизованы?
+view_adminRoles_permissions_isRead = Читать?
+view_adminRoles_permissions_isWrite = Запись?
+view_adminRoles_permissions_permDesc_manageBundles = Можно создавать, обновлять и удалять узлы предоставления (просмотр предоставляется всем)
+view_adminRoles_permissions_permDesc_manageRepositories = можно создавать, обновлять или удалять репозитории любого пользователя (каждый может создавать свои собственные репозитории), можно ассоциировать источники контента с резпозиториями.
+view_adminRoles_permissions_permDesc_manageSecurity = можно создавать, обновлять или удалять пользователей и роли - включает все другие полномочия
+view_adminRoles_permissions_permReadDesc_configure = просмотр конфигурации ресурса и историю версий конфигурации ресурса
+view_adminRoles_permissions_permReadDesc_createChildResources = (ПОДРАЗУМЕВАЕМЫЙ) просмотр истории создания дочернего ресурса
+view_adminRoles_permissions_permReadDesc_deleteChildResources = (ПОДРАЗУМЕВАЕМЫЙ) просмотр истории удаления дочернего ресурса
+view_adminRoles_permissions_permReadDesc_inventory = (ПОДРАЗУМЕВАЕМЫЙ) просмотр свойств ресурса (наименование, описание, версия и т.д.), настройки подключения, и историю настроек подключения
+view_adminRoles_permissions_permReadDesc_manageAlerts = (ПОДРАЗУМЕВАЕМЫЙ) просмотр определений предупреждений и истории предупреждения
+view_adminRoles_permissions_permReadDesc_manageEvents = (ПОДРАЗУМЕВАЕМЫЙ) просмотр событий
+view_adminRoles_permissions_permWriteDesc_configure = обновить конфигурацию ресурса; удалить элементы истории версий конфигурации ресурса
+view_adminRoles_permissions_permWriteDesc_control = выполнять операции; удалить элементы истории выполнения операций
+view_adminRoles_permissions_permWriteDesc_deleteChildResources = убрать ресурс из инвентаризации; удалить ресурсы (для типов ресурсов, которые могут быть удалены)
+view_adminRoles_permissions_permWriteDesc_inventory = обновить наименование ресурса, версию, описание и настройки подключения; удалить элементы истории настроек подключения
+view_adminRoles_permissions_permWriteDesc_manageAlerts = создать, обновить и удалить определения уведомлений; подтверждать и удалять элементы истории предупреждений
+view_adminRoles_permissions_permWriteDesc_manageContent = подписаться на источники контента; устанавливать и удалять пакеты
+view_adminRoles_permissions_permWriteDesc_manageEvents = удалять события
+view_adminRoles_permissions_permWriteDesc_manageMeasurements = обновление метрик коллекции планировщиков
+view_adminRoles_permissions_perm_configure = Конфигурация
+view_adminRoles_permissions_perm_control = Управление
+view_adminRoles_permissions_perm_inventory = Инвентаризация
+view_adminRoles_permissions_perm_manageAlerts = Управление предупреждениями
+view_adminRoles_permissions_perm_manageBundles = Управление узлами
+view_adminRoles_permissions_perm_manageContent = Управление контентом
+view_adminRoles_permissions_perm_manageEvents = Управление событиями
+view_adminRoles_permissions_perm_manageInventory = Управление инвентаризацией
+view_adminRoles_permissions_perm_manageMeasurements = Управление измерениями
+view_adminRoles_permissions_perm_manageRepositories = Управление репозиториями
+view_adminRoles_permissions_perm_manageSecurity = Управление безопасностью
+view_adminRoles_permissions_perm_manageSettings = Управление настройками
+view_adminRoles_permissions_read = Чтение\:
+view_adminRoles_permissions_readAccessImplied = Доступ чтения для {0} полномочия подразумевается и не может быть закрыт.
+view_adminRoles_permissions_resourcePermissions = Полномчия ресурса
+view_adminRoles_permissions_write = Запись\:
+view_adminRoles_resourcePerms = Полномочия ресурса
+view_adminRoles_roleAdded = Роль [{0}] добавлена.
+view_adminRoles_roleDeleteFailed = Не удалось удалить роль [{0}].
+view_adminRoles_roleDeleted = Роль [{0}] удалена
+view_adminRoles_roleUpdateFailed = Не удалось обновить роль [{0}].
+view_adminRoles_roleUpdated = Роль [{0}] обновлена.
+view_adminTemplates_editAlertTemplate = Редактировать шаблон предупреждения
+view_adminTemplates_platformServices = Сервисы платформы
+view_adminTemplates_platforms = Платформы
+view_adminTemplates_prompt_disabledAlertTemplates = Количество шаблонов предупреждений, которые были созданы, но закрыты для этого типа ресурсов
+view_adminTemplates_prompt_disabledMetricTemplates = Количество планировщиком метрик, которые закрыты по умолчанию для этого типа ресурсов
+view_adminTemplates_prompt_enabledAlertTemplates = Количество шаблонов уведомлений, которые включены для этого типа ресурсов
+view_adminTemplates_prompt_enabledMetricTemplates = Количество планировщиков метрик, которые включены по умолчанию для этого типа ресурсов
+view_adminTemplates_servers = Серверы
+view_adminTopology_agents = Агенты
+view_adminTopology_partitionEvents = События раздела
+view_adminTopology_remoteAgentInstall = Установка удаленного агента
+view_adminTopology_servers = Серверы
+view_adminUsersDetails_dataTypeName = пользователь
view_admin_administration = Администрация
view_admin_configuration = Конфигурация
view_admin_content = Контент
@@ -2546,21 +2621,41 @@ view_admin_downloads_cli_link_value = Загрузить CLI {0} ({1})
view_admin_downloads_cli_loadError = Не удалось получить версию CLI
view_admin_downloads_cli_md5 = CLI MD5
view_admin_downloads_cli_version = Версия CLI
-view_tabs_common_graphs_cubism=Cubism графики
##view_admin_downloads_connectorsDownload = Connectors Download
##view_admin_downloads_connectors_help = Connectors are software that is needed in order for some products to be manageable by {0}. You install connectors into some managed products so {0} agents can talk to them. See the documentation for more information.
##view_admin_downloads_connectors_loadError = Cannot get connectors info
##view_admin_downloads_connectors_none = No connectors are available for download
+view_admin_plugins_server = Сервер
+view_admin_security = Безопасность
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_desc = Если в течение этого количества
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_name = Максимально допустимое время "молчания" агента
+view_admin_systemSettings_AlertPurge_name = Удалить предупреждения, старше чем
+view_admin_systemSettings_AvailabilityPurge_name = Удалить данные о доступности, старше чем
+view_admin_systemSettings_BaseURL_desc = URL GUI сервера, используемый главным образом для предупреждений посредством email уведомлений.
+view_admin_systemSettings_BaseURL_name = URL GUI консоли
+view_admin_systemSettings_BaselineFrequency_name = Частота вычисления базовой линии
+view_admin_systemSettings_DataMaintenance_name = Период обслуживания БД
+view_admin_systemSettings_DataReindex_desc = Если включено, определенные таблицы БД будут периодически переиндексироваться.
+view_admin_systemSettings_EnableAgentAutoUpdate_desc = Определяет, разрешает ли сервер агентам самостоятельное автообновление. Вы не сможете загрузить дистрибутивы агента с сервера, если эта опция отключена.
+view_admin_systemSettings_EnableAgentAutoUpdate_name = Включить автообновление агентов
+view_admin_systemSettings_EnableDebugMode_name = Включить режим отладки
+view_admin_systemSettings_EventPurge_name = Удалить события, старше чем
+view_admin_systemSettings_JAASProvider_desc = Использовать LDAP для определения идентичности пользователя?
+view_admin_systemSettings_JAASProvider_name = Включить LDAP
+view_admin_systemSettings_LDAPBaseDN_desc = Основание дерева каталогов для поиска имен пользователей и паролей при аутентификации пользователей, например ou\=People,dc\=redhat,dc\=com
+view_admin_systemSettings_LDAPBaseDN_name = Поиск в базе
+view_admin_systemSettings_LDAPBindDN_name = Имя пользователя
+view_admin_systemSettings_LDAPBindPW_name = Пароль
##view_alert_details_field_resource_ancestry = Resource Ancestry
##view_alert_details_field_watched_resource = Watched Resource
##view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From] {0} [REVERT To] {1}
##view_configEdit_description = Description
##view_configEdit_property = Vlastnost
##view_configEdit_unset = Unset?
+##view_configEdit_value = Value
##view_dashboardsManager_message_title_details = <h1>Welcome to {0}</h1>\n<p>This dashboard can be edited by clicking the (Edit Mode) button above.</p>\n<p>What would you like to do?</p>\n<p> <a href=\"{1}\">Import newly discovered resources.</a></p>\n<p> <a href=\"{2}\">Search for resources.</a></p>\n<p> <a href=\"{3}\">See help and documentation.</a></p>
##view_group_common_emptyGroup = An empty group is always considered as mixed.
##view_inventory_resources_disableSuccessful = You have successfully disabled the selected resources and their children, [{0}] resources.
-##view_configEdit_value = Value
##view_messageCenter_messageRootCause = Root Cause
##view_operationHistoryList_cancelConfirm = Are you sure you want to cancel the selected operations? NOTE: Only those selected operations that are currently "in progress" will be attempted to be canceled.
##view_operationHistoryList_cancelFailure = The cancel request failed for the operation with the history ID of [{0}].
@@ -2569,120 +2664,4 @@ view_tabs_common_graphs_cubism=Cubism графики
##view_operationHistoryList_deleteFailure = Failed to delete operation history [{0}].
##view_operationHistoryList_deletePartialSuccess = Deleted [{0}] operation history items, but failed to delete the items with the following IDs: {1}
##view_operationHistoryList_deleteSuccess = Deleted [{0}] operation history items.
-view_admin_plugins_server=Сервер
-view_admin_security=Безопасность
-view_admin_systemSettings_AgentMaxQuietTimeAllowed_desc=Если в течение этого количества
-view_adminConfig_downloads=Загрузки
-view_adminConfig_systemSettings=Системные настройки
-view_adminContent_contentSources=Источники контента
-view_adminRoles_assignedGroups=Назначенные группы ресурсов
-view_adminRoles_assignedSubjects=Назначенные субъекты
-view_adminRoles_failLdap=Не удалось определить, настроен ли LDAP - предположительно LDAP отсутствует.
-view_adminRoles_failLdapGroups=Не удалось получить LDAP-группы. Предположительно LDAP группы отсутствуют
-view_adminRoles_failLdapGroupsRole=Не удалось загрузить LDAP группы, доступные для роли.
-view_adminRoles_failRoles=Не удалось получить роли.
-view_adminRoles_globalPerms=Глобальные полномочия
-view_adminRoles_ldapGroups=LDAP-группы
-view_adminRoles_ldapGroupsReadOnly=данные LDAP групп доступны только для чтения
-view_adminRoles_permissions_autoselecting_configureRead_implied=Автоматически отключено CONFIGURE_WRITE полномочие, поскольку отсутствует CONFIGURE_READ...
-view_adminRoles_permissions_autoselecting_configureWrite_implied=Автоматически выбрано CONFIGURE_READ полномочие, поскольку CONFIGURE_WRITE подразумевает, что ...
-view_adminRoles_permissions_autoselecting_manageInventory_implied=Автоматически установлены не выбранные полномочия реусурсов, поскольку MANAGE_INVENTORY предполагает все полномочия ресурса...
-view_adminRoles_permissions_autoselecting_manageSecurity_implied=Автоматически установлены невыбранные полномочия, поскольку MANAGE_SECURITY включает все другие полномочия...
-view_adminRoles_permissions_globalPermissions=Глобальные полномчия
-view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection={0} полномочия на чтение не могут быть отключены, пока предварительно {0} полномочия записи, которые включают полномочия на чтение, не будут отключены.
-view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection={0} полномочия не могут быть отключены, пока предварительно Manage Inventory, которая включает все полномочия ресурса, не будет отключено.
-view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection={0} полномочия не могут быть отключены, пока предватильно Manage Security полномочие, которое включает все другие полномочия, не будет отключено.
-view_adminRoles_permissions_isAuthorized=Авторизованы?
-view_adminRoles_permissions_isRead=Читать?
-view_adminRoles_permissions_isWrite=Запись?
-view_adminRoles_permissions_permDesc_manageBundles=Можно создавать, обновлять и удалять узлы предоставления (просмотр предоставляется всем)
-view_adminRoles_permissions_permDesc_manageInventory=обладает полными полномочиями ресурса, как описано ниже, для всех ресурсов; можно создавать, обновлять и удалять группы; можно импортировать автоматически-обнаруживаемые и обнаруживаемые вручную ресурсы
-view_adminRoles_permissions_permDesc_manageRepositories=можно создавать, обновлять или удалять репозитории любого пользователя (каждый может создавать свои собственные репозитории), можно ассоциировать источники контента с резпозиториями.
-view_adminRoles_permissions_permDesc_manageSecurity=можно создавать, обновлять или удалять пользователей и роли - включает все другие полномочия
-view_adminRoles_permissions_permReadDesc_configure=просмотр конфигурации ресурса и историю версий конфигурации ресурса
-view_adminRoles_permissions_permReadDesc_control=(ПОДРАЗУМЕВАЕМЫЙ) просмотр доступных операций и итории выполнения операции
-view_adminRoles_permissions_permReadDesc_createChildResources=(ПОДРАЗУМЕВАЕМЫЙ) просмотр истории создания дочернего ресурса
-view_adminRoles_permissions_permReadDesc_deleteChildResources=(ПОДРАЗУМЕВАЕМЫЙ) просмотр истории удаления дочернего ресурса
-view_adminRoles_permissions_permReadDesc_inventory=(ПОДРАЗУМЕВАЕМЫЙ) просмотр свойств ресурса (наименование, описание, версия и т.д.), настройки подключения, и историю настроек подключения
-view_adminRoles_permissions_permReadDesc_manageAlerts=(ПОДРАЗУМЕВАЕМЫЙ) просмотр определений предупреждений и истории предупреждения
-view_adminRoles_permissions_permReadDesc_manageContent=(ПОДРАЗУМЕВАЕМЫЙ) просмотр установленных и доступных пакетов; просмотр истории установки пакета
-view_adminRoles_permissions_permReadDesc_manageEvents=(ПОДРАЗУМЕВАЕМЫЙ) просмотр событий
-view_adminRoles_permissions_permReadDesc_manageMeasurements=(ПОДРАЗУМЕВАЕМЫЙ) просмотр данных метрики и коллекции планировщиков
-view_adminRoles_permissions_permWriteDesc_configure=обновить конфигурацию ресурса; удалить элементы истории версий конфигурации ресурса
-view_adminRoles_permissions_permWriteDesc_control=выполнять операции; удалить элементы истории выполнения операций
-view_adminRoles_permissions_permWriteDesc_createChildResources=создать новый дочерний ресурсы (для типов дочерних ресурсов, которые могут быть созданы)
-view_adminRoles_permissions_permWriteDesc_deleteChildResources=убрать ресурс из инвентаризации; удалить ресурсы (для типов ресурсов, которые могут быть удалены)
-view_adminRoles_permissions_permWriteDesc_inventory=обновить наименование ресурса, версию, описание и настройки подключения; удалить элементы истории настроек подключения
-view_adminRoles_permissions_permWriteDesc_manageAlerts=создать, обновить и удалить определения уведомлений; подтверждать и удалять элементы истории предупреждений
-view_adminRoles_permissions_permWriteDesc_manageContent=подписаться на источники контента; устанавливать и удалять пакеты
-view_adminRoles_permissions_permWriteDesc_manageEvents=удалять события
-view_adminRoles_permissions_permWriteDesc_manageMeasurements=обновление метрик коллекции планировщиков
-view_adminRoles_permissions_perm_configure=Конфигурация
-view_adminRoles_permissions_perm_control=Управление
-view_adminRoles_permissions_perm_createChildResources=Создание дочерних ресурсов
-view_adminRoles_permissions_perm_deleteChildResources=Удаление дочерних ресурсов
-view_adminRoles_permissions_perm_inventory=Инвентаризация
-view_adminRoles_permissions_perm_manageAlerts=Управление предупреждениями
-view_adminRoles_permissions_perm_manageBundles=Управление узлами
-view_adminRoles_permissions_perm_manageContent=Управление контентом
-view_adminRoles_permissions_perm_manageEvents=Управление событиями
-view_adminRoles_permissions_perm_manageInventory=Управление инвентаризацией
-view_adminRoles_permissions_perm_manageMeasurements=Управление измерениями
-view_adminRoles_permissions_perm_manageRepositories=Управление репозиториями
-view_adminRoles_permissions_perm_manageSecurity=Управление безопасностью
-view_adminRoles_permissions_perm_manageSettings=Управление настройками
-view_adminRoles_permissions_read=Чтение\:
-view_adminRoles_permissions_readAccessImplied=Доступ чтения для {0} полномочия подразумевается и не может быть закрыт.
-view_adminRoles_permissions_resourcePermissions=Полномчия ресурса
-view_adminRoles_permissions_write=Запись\:
-view_adminRoles_resourcePerms=Полномочия ресурса
-view_adminRoles_roleAdded=Роль [{0}] добавлена.
-view_adminRoles_roleDeleteFailed=Не удалось удалить роль [{0}].
-view_adminRoles_roleDeleted=Роль [{0}] удалена
-view_adminRoles_roleUpdateFailed=Не удалось обновить роль [{0}].
-view_adminRoles_roleUpdated=Роль [{0}] обновлена.
-view_adminTemplates_editAlertTemplate=Редактировать шаблон предупреждения
-view_adminTemplates_platformServices=Сервисы платформы
-view_adminTemplates_platforms=Платформы
-view_adminTemplates_prompt_disabledAlertTemplates=Количество шаблонов предупреждений, которые были созданы, но закрыты для этого типа ресурсов
-view_adminTemplates_prompt_disabledMetricTemplates=Количество планировщиком метрик, которые закрыты по умолчанию для этого типа ресурсов
-view_adminTemplates_prompt_enabledAlertTemplates=Количество шаблонов уведомлений, которые включены для этого типа ресурсов
-view_adminTemplates_prompt_enabledMetricTemplates=Количество планировщиков метрик, которые включены по умолчанию для этого типа ресурсов
-view_adminTemplates_servers=Серверы
-view_adminTopology_affinityGroups=Похожие группы
-view_adminTopology_agents=Агенты
-view_adminTopology_partitionEvents=События раздела
-view_adminTopology_remoteAgentInstall=Установка удаленного агента
-view_adminTopology_servers=Серверы
-view_adminUsersDetails_dataTypeName=пользователь
-view_admin_systemSettings_AgentMaxQuietTimeAllowed_name=Максимально допустимое время "молчания" агента
-view_admin_systemSettings_AlertPurge_desc=Как долго история предупреждений должна храниться прежде чем будет очищена из БД. Указывается в днях.
-view_admin_systemSettings_AlertPurge_name=Удалить предупреждения, старше чем
-view_admin_systemSettings_AvailabilityPurge_desc=Как долго данные о доступности должны храниться, прежде чем будут очищены из БД. Указывается в днях.
-view_admin_systemSettings_AvailabilityPurge_name=Удалить данные о доступности, старше чем
-view_admin_systemSettings_BaseURL_desc=URL GUI сервера, используемый главным образом для предупреждений посредством email уведомлений.
-view_admin_systemSettings_BaseURL_name=URL GUI консоли
-view_admin_systemSettings_BaselineDataSet_desc=Количество прошедщих измерений, используемых для определения базовой линии. Указывается в днях.
-view_admin_systemSettings_BaselineDataSet_name=Набор данных базовой линии
-view_admin_systemSettings_BaselineFrequency_desc=Частота, с которой выполняется авто-расчет базовых линий. Если 0, авто-расчет базовой линии отключен. Указывается в днях. Максимальное значение - 'Baseline Dataset'.
-view_admin_systemSettings_BaselineFrequency_name=Частота вычисления базовой линии
-view_admin_systemSettings_DataMaintenance_desc=Как часто выполняется обслуживание БД (например, vacuuming если используется Postgres). Указывается в часах.
-view_admin_systemSettings_DataMaintenance_name=Период обслуживания БД
-view_admin_systemSettings_DataReindex_desc=Если включено, определенные таблицы БД будут периодически переиндексироваться.
-view_admin_systemSettings_DataReindex_name=Переиндексировать таблицы данных каждую ночь
-view_admin_systemSettings_EnableAgentAutoUpdate_desc=Определяет, разрешает ли сервер агентам самостоятельное автообновление. Вы не сможете загрузить дистрибутивы агента с сервера, если эта опция отключена.
-view_admin_systemSettings_EnableAgentAutoUpdate_name=Включить автообновление агентов
-view_admin_systemSettings_EnableDebugMode_desc=Если включено, сервер будет входить в отладочный режим.
-view_admin_systemSettings_EnableDebugMode_name=Включить режим отладки
-view_admin_systemSettings_EnableExperimentalFeatures_desc=Если включено, любые экспериментальные характеристики, которые существуют в текущем продукте будут доступны.
-view_admin_systemSettings_EnableExperimentalFeatures_name=Включить экспериментальные характеристики
-view_admin_systemSettings_EventPurge_desc=Как долго данные событий должны храниться, прежде чем будут удалены из БД. Указывается в днях.
-view_admin_systemSettings_EventPurge_name=Удалить события, старше чем
-view_admin_systemSettings_LDAPBaseDN_name=Поиск в базе
-view_admin_systemSettings_LDAPBindDN_desc=Имя пользователя для подключения к LDAP-серверу при запросе LDAP базы данных. Как правило, это полное отличительное имя (DN) LDAP менеджера пользователя, например cn\=Manager,dc\=redhat,dc\=com
-view_admin_systemSettings_LDAPBindDN_name=Имя пользователя
-view_admin_systemSettings_LDAPBindPW_desc=Идентификационная информация пользователя для подключения к LDAP серверу при запросе LDAP базы данных
-view_admin_systemSettings_LDAPBindPW_name=Пароль
-view_admin_systemSettings_JAASProvider_desc=Использовать LDAP для определения идентичности пользователя?
-view_admin_systemSettings_JAASProvider_name=Включить LDAP
-view_admin_systemSettings_LDAPBaseDN_desc=Основание дерева каталогов для поиска имен пользователей и паролей при аутентификации пользователей, например ou\=People,dc\=redhat,dc\=com
+view_tabs_common_graphs_cubism = Cubism графики
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index e2cf0da..48dbdd8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -799,8 +799,8 @@ view_admin_topology = \u62d3\u6251
view_alert_common_tab_conditions = Conditions
view_alert_common_tab_conditions_expression = \u89e6\u53d1\u4e8b\u4ef6\u5f53
view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = \u6dfb\u52a0\u6761\u4ef6
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = \u6dfb\u52a0\u6761\u4ef6
view_alert_common_tab_conditions_recovery_disabled = This alert caused its alert definition to be disabled
view_alert_common_tab_conditions_recovery_enabled = Triggered ''{0}'' to be re-enabled
view_alert_common_tab_conditions_text = \u6761\u4ef6
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java
new file mode 100644
index 0000000..c2ef1d4
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java
@@ -0,0 +1,164 @@
+/*
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.resource.test;
+
+import java.util.HashMap;
+import java.util.Random;
+
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.resource.InventoryStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceCategory;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceNotFoundException;
+import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
+import org.rhq.enterprise.server.resource.metadata.test.UpdatePluginMetadataTestBase;
+import org.rhq.enterprise.server.util.LookupUtil;
+
+/**
+ * Testing the deletion of agents and uninventoring their resources, if there are any.
+ * This is testing BZ 849711.
+ */
+@Test
+public class UninventoryAndDeleteAgentTest extends UpdatePluginMetadataTestBase {
+ private AgentManagerLocal agentManager;
+ private ResourceGroupManagerLocal groupManager;
+ private ResourceGroup newGroup;
+ private ResourceType platformType;
+
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+ platformType = createPlatformResourceType();
+ groupManager = LookupUtil.getResourceGroupManager();
+ newGroup = createNewGroup();
+ agentManager = LookupUtil.getAgentManager();
+ }
+
+ @Override
+ protected void afterMethod() throws Exception {
+ if (newGroup != null) {
+ groupManager.deleteResourceGroup(getOverlord(), newGroup.getId());
+ }
+ cleanupResourceType(platformType.getName());
+ super.afterMethod();
+ }
+
+ public void testDeletingAgents() throws Exception {
+ // create three agents:
+ // 1) agent is the only thing registered - has no inventory yet
+ // 2) agent's platform is NEW, not yet committed to inventory yet (it is in the discovery queue)
+ // 3) agent's platform is COMMITTED in inventory
+ Agent agentRegistered = createOnlyAgent(1);
+ HashMap<Agent, Resource> agentPlatNew = createAgentWithResource(2, InventoryStatus.NEW);
+ HashMap<Agent, Resource> agentPlatCommitted = createAgentWithResource(3, InventoryStatus.COMMITTED);
+
+ Agent agentNew = agentPlatNew.keySet().iterator().next();
+ Agent agentCommitted = agentPlatCommitted.keySet().iterator().next();
+
+ // just for some complexity - we'll want to add our committed resource to a group
+ Resource committedResource = agentPlatCommitted.values().iterator().next();
+ groupManager.addResourcesToGroup(getOverlord(), newGroup.getId(), new int[] { committedResource.getId() });
+
+ // delete our agents
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentRegistered);
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentNew);
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentCommitted);
+
+ assert null == agentManager.getAgentByID(agentRegistered.getId());
+ assert null == agentManager.getAgentByID(agentNew.getId());
+ assert null == agentManager.getAgentByID(agentCommitted.getId());
+
+ try {
+ Resource doomed = resourceManager.getResourceById(getOverlord(), committedResource.getId());
+ assert doomed.getAgent() == null : "Resource should not have an agent attached, it should have been uninventoried";
+ assert doomed.getInventoryStatus() == InventoryStatus.UNINVENTORIED : "Should have been uninventoried";
+ } catch (ResourceNotFoundException rnfe) {
+ // this could happen if the quartz job already purged the uninventoried resource; test is success if this happens
+ }
+
+ return;
+ }
+
+ private ResourceType createPlatformResourceType() throws Exception {
+ ResourceType resourceType;
+ getTransactionManager().begin();
+ try {
+ resourceType = new ResourceType("DeleteAgentTest-PlatType" + System.currentTimeMillis(), PLUGIN_NAME,
+ ResourceCategory.PLATFORM, null);
+ em.persist(resourceType);
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+ return resourceType;
+ }
+
+ private Agent createOnlyAgent(int index) throws Exception {
+ Agent agent;
+ getTransactionManager().begin();
+ try {
+ agent = new Agent("DeleteAgentTest-Agent" + index, "testaddr", 16163 + index, "", "testtoken" + index);
+ em.persist(agent);
+ em.flush();
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+ return agent;
+ }
+
+ private HashMap<Agent, Resource> createAgentWithResource(int index, InventoryStatus invStatus) throws Exception {
+ HashMap<Agent, Resource> ret = new HashMap<Agent, Resource>(1);
+
+ Agent agent = createOnlyAgent(index);
+ Resource resource;
+
+ getTransactionManager().begin();
+ try {
+ resource = new Resource("DeleteAgentTest-Res" + index, "DeleteAgentTest-Res" + index, platformType);
+ resource.setUuid("" + new Random().nextInt());
+ resource.setAgent(agent);
+ resource.setInventoryStatus(invStatus);
+ em.persist(resource);
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+
+ ret.put(agent, resource);
+ return ret;
+ }
+
+ private ResourceGroup createNewGroup() {
+ ResourceGroup group = new ResourceGroup("DeleteAgentTest-Group");
+ groupManager.createResourceGroup(getOverlord(), group);
+ return group;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d332161..6c46172 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -249,6 +249,18 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
return entityManager.merge(persistedResource);
}
+ @TransactionAttribute(TransactionAttributeType.NEVER)
+ public void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent) {
+ Resource platform = resourceManager.getPlatform(doomedAgent);
+ if (platform == null) {
+ // there is no platform resource - just delete the agent itself
+ agentManager.deleteAgent(doomedAgent);
+ } else {
+ resourceManager.uninventoryResources(user, new int[] { platform.getId() });
+ }
+ }
+
+ @TransactionAttribute(TransactionAttributeType.SUPPORTS)
public List<Integer> uninventoryResources(Subject user, int[] resourceIds) {
List<Integer> result = new ArrayList<Integer>();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index b4c90f2..d0b959e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -508,6 +508,8 @@ public interface ResourceManagerLocal {
*/
List<Resource> findResourceLineage(Subject subject, int resourceId);
+ void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent);
+
/**
* This will uninventory the resources with the given ID along with all of their child resources. This method will not
* create its own transaction; each individual child resource as well as the top level resources identified with the
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
index 3a0c282..aa202d3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
@@ -27,6 +27,7 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.ResourceAvailability;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceAncestryFormat;
import org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary;
@@ -105,6 +106,15 @@ public interface ResourceManagerRemote {
Resource updateResource(Subject subject, Resource resource);
/**
+ * This will uninventory all resources managed by the given agent. Since this
+ * also removes the platform resource, this will also remove the given agent as well.
+ *
+ * @param user the logged in user
+ * @param doomedAgent the agent to be deleted and whose resources are to be uninventoried
+ */
+ void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent);
+
+ /**
* Removes these resources from inventory. The resources may subsequently be rediscovered. Note that for
* each specified resource all children will also be removed, it it not necessary or recommended to
* specify more than one resource in the same ancestry line.
11 years, 3 months
[rhq] modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java | 46 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java | 16
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 23 -
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 217 ++++------
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java | 164 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java | 10
15 files changed, 372 insertions(+), 137 deletions(-)
New commits:
commit 227053907683a943ea002ad91eda7a44a86f18da
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Mar 13 10:14:30 2013 -0400
[BZ 849711] be able to delete agent simply from the admin agent UI page
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
index 8376594..55bddbb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentTableView.java
@@ -25,6 +25,7 @@ import static org.rhq.enterprise.gui.coregui.client.admin.topology.AgentDatasour
import java.util.List;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.CellFormatter;
@@ -33,6 +34,8 @@ import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
@@ -41,7 +44,10 @@ import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablem
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.HasViewName;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Shows the table of all agents.
@@ -120,11 +126,51 @@ public class AgentTableView extends TableSection<AgentDatasource> implements Has
});
}
}
+
+ setupDeleteButton();
+
if (isAffinityGroupId) {
showUpdateMembersAction();
}
}
+ private void setupDeleteButton() {
+ addTableAction(MSG.common_button_delete(), MSG.view_adminTopology_agent_delete_confirm(),
+ new AuthorizedTableAction(this, TableActionEnablement.ANY, Permission.MANAGE_INVENTORY) {
+ public void executeAction(final ListGridRecord[] selections, Object actionValue) {
+ if (selections == null || selections.length == 0) {
+ return; // do nothing since nothing is selected (we really shouldn't get here)
+ }
+
+ final ResourceGWTServiceAsync resourceManager = GWTServiceLookup.getResourceService();
+ final Agent[] agents = new Agent[selections.length];
+ int i = 0;
+ for (ListGridRecord selection : selections) {
+ final int agentId = selection.getAttributeAsInt(FIELD_ID);
+ final String agentName = selection.getAttribute(FIELD_NAME);
+ final Agent agent = new Agent();
+ agent.setId(agentId);
+ agent.setName(agentName);
+ agents[i++] = agent;
+ }
+
+ resourceManager.uninventoryAllResourcesByAgent(agents, new AsyncCallback<Void>() {
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_adminTopology_agent_delete_submitted(Integer
+ .toString(agents.length))));
+ refresh();
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_adminTopology_agent_delete_error(), caught);
+ refresh();
+ }
+ });
+ }
+ });
+ }
+
private void showUpdateMembersAction() {
addTableAction(MSG.view_groupInventoryMembers_button_updateMembership(), new AuthorizedTableAction(this,
TableActionEnablement.ALWAYS, Permission.MANAGE_SETTINGS) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
index 1cdc64c..6d7d00c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
@@ -26,6 +26,7 @@ import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.CreateResourceHistory;
import org.rhq.core.domain.resource.DeleteResourceHistory;
import org.rhq.core.domain.resource.InventoryStatus;
@@ -106,6 +107,8 @@ public interface ResourceGWTService extends RemoteService {
void unignoreResources(int[] resourceIds) throws RuntimeException;
+ void uninventoryAllResourcesByAgent(Agent[] agents) throws RuntimeException;
+
List<Integer> uninventoryResources(int[] resourceIds) throws RuntimeException;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
index 4ee821b..d9c74f6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.CannotConnectToAgentException;
import org.rhq.core.domain.resource.CreateResourceHistory;
import org.rhq.core.domain.resource.DeleteResourceHistory;
@@ -259,6 +260,21 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl implements Re
}
}
+ public void uninventoryAllResourcesByAgent(Agent[] agents) throws RuntimeException {
+ try {
+ if (agents != null && agents.length > 0) {
+ // we want to uninventory them one at a time to ensure our server-side doesn't do too much in a single SLSB method/tx
+ // If one fails and throws an exception, we abort the whole thing. This may or may not be a good thing.
+ for (Agent agent : agents) {
+ resourceManager.uninventoryAllResourcesByAgent(getSessionSubject(), agent);
+ }
+ }
+ return;
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
public List<Integer> uninventoryResources(int[] resourceIds) throws RuntimeException {
try {
return resourceManager.uninventoryResources(getSessionSubject(), resourceIds);
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index d552e48..6d0851d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -8,19 +8,19 @@
###################################
chart_date_label = Date
chart_down_label = Down
-chart_time_label = Start
-chart_unknown_label = Unknown
-chart_no_data_label = No Data
-chart_title_avg_label = Avg
-chart_title_min_label = Min
-chart_title_peak_label = Max
chart_hover_availability_label = Availability
+chart_hover_bar_label = Duration
chart_hover_date_format = %m/%d/%y
-chart_hover_time_format = %I:%M:%S %p
-chart_hover_start_label = Start
chart_hover_end_label = End
chart_hover_period_label = Period
-chart_hover_bar_label = Duration
+chart_hover_start_label = Start
+chart_hover_time_format = %I:%M:%S %p
+chart_no_data_label = No Data
+chart_time_label = Start
+chart_title_avg_label = Avg
+chart_title_min_label = Min
+chart_title_peak_label = Max
+chart_unknown_label = Unknown
common_alert_high = High
common_alert_low = Low
common_alert_medium = Medium
@@ -566,6 +566,9 @@ view_adminTopology_agent_agentBindAddress = Agent Bind Address
view_adminTopology_agent_agentBindPort = Agent Bind Port
view_adminTopology_agent_agentName = Agent Name
view_adminTopology_agent_connectedServer = Connected Server
+view_adminTopology_agent_delete_confirm = This will delete the selected agents and uninventory any and all resources associated with them. Are you sure you want to do this?
+view_adminTopology_agent_delete_error = The request to delete the selected agents failed.
+view_adminTopology_agent_delete_submitted = Deleted [{0}] agents and all of their associated resources are uninventoried.\n
view_adminTopology_agent_lastAvailabilityPing = Last Availability Ping
view_adminTopology_agent_lastAvailabilityReport = Last Availability Report
view_adminTopology_agents = Agents
@@ -811,8 +814,8 @@ view_admin_topology = Topology
view_alert_common_tab_conditions = Conditions
view_alert_common_tab_conditions_expression = Fire alert when
view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = Add Condition
view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Add Condition
view_alert_common_tab_conditions_recovery_disabled = This alert caused its alert definition to be disabled
view_alert_common_tab_conditions_recovery_enabled = Triggered ''{0}'' to be re-enabled
view_alert_common_tab_conditions_text = Condition
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index bebeb16..1a27856 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -829,8 +829,8 @@ view_admin_topology = Topologie
view_alert_common_tab_conditions = Podmínky
view_alert_common_tab_conditions_expression = Vyvolat výstrahu když
view_alert_common_tab_conditions_expression_tooltip = Určí jestli některé (ANY) nebo všechny (ALL) podmínky se musí vyhodnotit na true, aby celková podmínka byla splněna.
-view_alert_common_tab_conditions_modal_title = Přidat podmínku
view_alert_common_tab_conditions_modalEdit_title = Editovat podmínku
+view_alert_common_tab_conditions_modal_title = Přidat podmínku
view_alert_common_tab_conditions_recovery_disabled = Tato výstraha způsobí, že definice této výstrahy bude zneplatněna
view_alert_common_tab_conditions_recovery_enabled = Odpáleno ''{0}'' bude znovupovolen
view_alert_common_tab_conditions_text = Podmínka
@@ -1302,8 +1302,8 @@ view_bundle_version_deleteFailure = Nepodařilo se smazat verzi balíku [{0}]
view_bundle_version_deleteSuccessful = Úspěšně jste smazali verzi balíku [{0}]
view_bundle_version_loadFailure = Nepodařilo s načíst verzi balíku
view_bundle_versions = Verze
-view_configCompare_comparingConfigs = Porovnat konfigurace
##view_charts_time_axis_label = Time
+view_configCompare_comparingConfigs = Porovnat konfigurace
view_configCompare_configCompare = Porovnání konfigurace
view_configEdit_addItem = Přidat položku do seznamu
view_configEdit_confirm_1 = Jste si jisti, že chcete smazat vybrané vlastnosti z množiny?
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 91145ac..a276a6b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -722,8 +722,8 @@ view_admin_topology = Topologie
view_alert_common_tab_conditions = Bedingungen
view_alert_common_tab_conditions_expression = Alarm auslösen wenn
##view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = Bedingung hinzufügen
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Bedingung hinzufügen
view_alert_common_tab_conditions_recovery_disabled = Dieser Alarm hat seine Definition deaktiviert.
view_alert_common_tab_conditions_recovery_enabled = Ausgelöst, dass ''{0}'' wieder aktiviert wurde
view_alert_common_tab_conditions_text = Bedingung
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index aa4c5fd..3ad6421 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -805,8 +805,8 @@ view_admin_topology = トポロジー
view_alert_common_tab_conditions = 条件
view_alert_common_tab_conditions_expression = アラート発火
view_alert_common_tab_conditions_expression_tooltip = 全体の条件がtrueであると認められるために、条件の一部またはすべてがtrueと評価されなければならないかどうか決定します
-view_alert_common_tab_conditions_modal_title = 条件追加
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = 条件追加
view_alert_common_tab_conditions_recovery_disabled = このアラートはそのアラート定義が無効化される原因となりました
view_alert_common_tab_conditions_recovery_enabled = トリガー ''{0}'' が再び有効化される
view_alert_common_tab_conditions_text = 条件
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
index 36dbda8..8d8eaea 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
@@ -698,8 +698,8 @@ view_admin_topology = 토폴로지
view_alert_common_tab_conditions = 조건
view_alert_common_tab_conditions_expression = 경고 발생시
view_alert_common_tab_conditions_expression_tooltip = 전체 조건이 true로 인정받기 위해 조건의 일부 또는 전부가 true로 평가되어야 하는지 결정합니다.
-view_alert_common_tab_conditions_modal_title = 조건 추가
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = 조건 추가
view_alert_common_tab_conditions_recovery_disabled = 이 경고는 경고 정의가 비활성화되는 원인이 되었습니다.
view_alert_common_tab_conditions_recovery_enabled = 트리거 ''{0}''이 다시 활성화 되는
view_alert_common_tab_conditions_text = 조건
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index dd3a3e6..ea8827d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -21,7 +21,6 @@
##chart_hover_end_label = End
##chart_hover_period_label = Period
##chart_hover_bar_label = Duration
-view_admin_systemSettings_BaselineDataSet_desc = Quantidade de dados mensurados que ser\u00E1 utilizada para determinar um baseline. Valor especificado em dias.
common_alert_high = Alto
common_alert_low = Baixo
common_alert_medium = M\u00E9dio
@@ -740,6 +739,7 @@ view_admin_systemSettings_AvailabilityPurge_desc = Tempo de vida das m\u00E9tric
view_admin_systemSettings_AvailabilityPurge_name = Excluir m\u00E9tricas de disponibilidade com mais de
view_admin_systemSettings_BaseURL_desc = URL do servidor GUI, usada principalmente nas notifica\u00F5es de alertas por email.
view_admin_systemSettings_BaseURL_name = GUI Console URL
+view_admin_systemSettings_BaselineDataSet_desc = Quantidade de dados mensurados que ser\u00E1 utilizada para determinar um baseline. Valor especificado em dias.
view_admin_systemSettings_BaselineDataSet_name = Conjunto de dados para o Baseline
view_admin_systemSettings_BaselineFrequency_desc = A frequ\u00EAncia na qual o c\u00E1lculo autom\u00E1tico de baselines ser\u00E1 realizado. O valor 0 desabilita o c\u00E1lculo autom\u00E1tico. Valor espeficicado em dias.
view_admin_systemSettings_BaselineFrequency_name = Frequ\u00EAncia do c\u00E1lculo baseline
@@ -811,8 +811,8 @@ view_admin_topology = Topologia
view_alert_common_tab_conditions = Condi\u00E7\u00F5es
view_alert_common_tab_conditions_expression = Disparar alerta quando
view_alert_common_tab_conditions_expression_tooltip = Determina se QUALQUER UMA ou TODAS as condi\u00E7\u00F5es devem ser satisfeitas para que todo o conjunto de condi\u00E7\u00F5es seja considerado verdadeiro.
-view_alert_common_tab_conditions_modal_title = Adicionar nova condi\u00E7\u00E3o.
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = Adicionar nova condi\u00E7\u00E3o.
view_alert_common_tab_conditions_recovery_disabled = Este alerta desativou a sua defini\u00E7\u00E3o.
view_alert_common_tab_conditions_recovery_enabled = ''{0}'' disparado para ser reativado.
view_alert_common_tab_conditions_text = Condi\u00E7\u00E3o
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 6fba7f5..85cd1d9 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2521,6 +2521,81 @@ view_aboutBox_homepage = Домашняя страница
view_aboutBox_jbossByRedHat = JBoss by Red Hat
view_aboutBox_title = О {0}
view_aboutBox_version = Версия\:
+view_adminConfig_downloads = Загрузки
+view_adminConfig_systemSettings = Системные настройки
+view_adminContent_contentSources = Источники контента
+view_adminRoles_assignedGroups = Назначенные группы ресурсов
+view_adminRoles_assignedSubjects = Назначенные субъекты
+view_adminRoles_failLdap = Не удалось определить, настроен ли LDAP - предположительно LDAP отсутствует.
+view_adminRoles_failLdapGroups = Не удалось получить LDAP-группы. Предположительно LDAP группы отсутствуют
+view_adminRoles_failLdapGroupsRole = Не удалось загрузить LDAP группы, доступные для роли.
+view_adminRoles_failRoles = Не удалось получить роли.
+view_adminRoles_globalPerms = Глобальные полномочия
+view_adminRoles_ldapGroups = LDAP-группы
+view_adminRoles_ldapGroupsReadOnly = данные LDAP групп доступны только для чтения
+view_adminRoles_permissions_autoselecting_configureRead_implied = Автоматически отключено CONFIGURE_WRITE полномочие, поскольку отсутствует CONFIGURE_READ...
+view_adminRoles_permissions_autoselecting_configureWrite_implied = Автоматически выбрано CONFIGURE_READ полномочие, поскольку CONFIGURE_WRITE подразумевает, что ...
+view_adminRoles_permissions_autoselecting_manageInventory_implied = Автоматически установлены не выбранные полномочия реусурсов, поскольку MANAGE_INVENTORY предполагает все полномочия ресурса...
+view_adminRoles_permissions_autoselecting_manageSecurity_implied = Автоматически установлены невыбранные полномочия, поскольку MANAGE_SECURITY включает все другие полномочия...
+view_adminRoles_permissions_globalPermissions = Глобальные полномчия
+view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection = {0} полномочия на чтение не могут быть отключены, пока предварительно {0} полномочия записи, которые включают полномочия на чтение, не будут отключены.
+view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection = {0} полномочия не могут быть отключены, пока предварительно Manage Inventory, которая включает все полномочия ресурса, не будет отключено.
+view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection = {0} полномочия не могут быть отключены, пока предватильно Manage Security полномочие, которое включает все другие полномочия, не будет отключено.
+view_adminRoles_permissions_isAuthorized = Авторизованы?
+view_adminRoles_permissions_isRead = Читать?
+view_adminRoles_permissions_isWrite = Запись?
+view_adminRoles_permissions_permDesc_manageBundles = Можно создавать, обновлять и удалять узлы предоставления (просмотр предоставляется всем)
+view_adminRoles_permissions_permDesc_manageRepositories = можно создавать, обновлять или удалять репозитории любого пользователя (каждый может создавать свои собственные репозитории), можно ассоциировать источники контента с резпозиториями.
+view_adminRoles_permissions_permDesc_manageSecurity = можно создавать, обновлять или удалять пользователей и роли - включает все другие полномочия
+view_adminRoles_permissions_permReadDesc_configure = просмотр конфигурации ресурса и историю версий конфигурации ресурса
+view_adminRoles_permissions_permReadDesc_createChildResources = (ПОДРАЗУМЕВАЕМЫЙ) просмотр истории создания дочернего ресурса
+view_adminRoles_permissions_permReadDesc_deleteChildResources = (ПОДРАЗУМЕВАЕМЫЙ) просмотр истории удаления дочернего ресурса
+view_adminRoles_permissions_permReadDesc_inventory = (ПОДРАЗУМЕВАЕМЫЙ) просмотр свойств ресурса (наименование, описание, версия и т.д.), настройки подключения, и историю настроек подключения
+view_adminRoles_permissions_permReadDesc_manageAlerts = (ПОДРАЗУМЕВАЕМЫЙ) просмотр определений предупреждений и истории предупреждения
+view_adminRoles_permissions_permReadDesc_manageEvents = (ПОДРАЗУМЕВАЕМЫЙ) просмотр событий
+view_adminRoles_permissions_permWriteDesc_configure = обновить конфигурацию ресурса; удалить элементы истории версий конфигурации ресурса
+view_adminRoles_permissions_permWriteDesc_control = выполнять операции; удалить элементы истории выполнения операций
+view_adminRoles_permissions_permWriteDesc_deleteChildResources = убрать ресурс из инвентаризации; удалить ресурсы (для типов ресурсов, которые могут быть удалены)
+view_adminRoles_permissions_permWriteDesc_inventory = обновить наименование ресурса, версию, описание и настройки подключения; удалить элементы истории настроек подключения
+view_adminRoles_permissions_permWriteDesc_manageAlerts = создать, обновить и удалить определения уведомлений; подтверждать и удалять элементы истории предупреждений
+view_adminRoles_permissions_permWriteDesc_manageContent = подписаться на источники контента; устанавливать и удалять пакеты
+view_adminRoles_permissions_permWriteDesc_manageEvents = удалять события
+view_adminRoles_permissions_permWriteDesc_manageMeasurements = обновление метрик коллекции планировщиков
+view_adminRoles_permissions_perm_configure = Конфигурация
+view_adminRoles_permissions_perm_control = Управление
+view_adminRoles_permissions_perm_inventory = Инвентаризация
+view_adminRoles_permissions_perm_manageAlerts = Управление предупреждениями
+view_adminRoles_permissions_perm_manageBundles = Управление узлами
+view_adminRoles_permissions_perm_manageContent = Управление контентом
+view_adminRoles_permissions_perm_manageEvents = Управление событиями
+view_adminRoles_permissions_perm_manageInventory = Управление инвентаризацией
+view_adminRoles_permissions_perm_manageMeasurements = Управление измерениями
+view_adminRoles_permissions_perm_manageRepositories = Управление репозиториями
+view_adminRoles_permissions_perm_manageSecurity = Управление безопасностью
+view_adminRoles_permissions_perm_manageSettings = Управление настройками
+view_adminRoles_permissions_read = Чтение\:
+view_adminRoles_permissions_readAccessImplied = Доступ чтения для {0} полномочия подразумевается и не может быть закрыт.
+view_adminRoles_permissions_resourcePermissions = Полномчия ресурса
+view_adminRoles_permissions_write = Запись\:
+view_adminRoles_resourcePerms = Полномочия ресурса
+view_adminRoles_roleAdded = Роль [{0}] добавлена.
+view_adminRoles_roleDeleteFailed = Не удалось удалить роль [{0}].
+view_adminRoles_roleDeleted = Роль [{0}] удалена
+view_adminRoles_roleUpdateFailed = Не удалось обновить роль [{0}].
+view_adminRoles_roleUpdated = Роль [{0}] обновлена.
+view_adminTemplates_editAlertTemplate = Редактировать шаблон предупреждения
+view_adminTemplates_platformServices = Сервисы платформы
+view_adminTemplates_platforms = Платформы
+view_adminTemplates_prompt_disabledAlertTemplates = Количество шаблонов предупреждений, которые были созданы, но закрыты для этого типа ресурсов
+view_adminTemplates_prompt_disabledMetricTemplates = Количество планировщиком метрик, которые закрыты по умолчанию для этого типа ресурсов
+view_adminTemplates_prompt_enabledAlertTemplates = Количество шаблонов уведомлений, которые включены для этого типа ресурсов
+view_adminTemplates_prompt_enabledMetricTemplates = Количество планировщиков метрик, которые включены по умолчанию для этого типа ресурсов
+view_adminTemplates_servers = Серверы
+view_adminTopology_agents = Агенты
+view_adminTopology_partitionEvents = События раздела
+view_adminTopology_remoteAgentInstall = Установка удаленного агента
+view_adminTopology_servers = Серверы
+view_adminUsersDetails_dataTypeName = пользователь
view_admin_administration = Администрация
view_admin_configuration = Конфигурация
view_admin_content = Контент
@@ -2546,21 +2621,41 @@ view_admin_downloads_cli_link_value = Загрузить CLI {0} ({1})
view_admin_downloads_cli_loadError = Не удалось получить версию CLI
view_admin_downloads_cli_md5 = CLI MD5
view_admin_downloads_cli_version = Версия CLI
-view_tabs_common_graphs_cubism=Cubism графики
##view_admin_downloads_connectorsDownload = Connectors Download
##view_admin_downloads_connectors_help = Connectors are software that is needed in order for some products to be manageable by {0}. You install connectors into some managed products so {0} agents can talk to them. See the documentation for more information.
##view_admin_downloads_connectors_loadError = Cannot get connectors info
##view_admin_downloads_connectors_none = No connectors are available for download
+view_admin_plugins_server = Сервер
+view_admin_security = Безопасность
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_desc = Если в течение этого количества
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_name = Максимально допустимое время "молчания" агента
+view_admin_systemSettings_AlertPurge_name = Удалить предупреждения, старше чем
+view_admin_systemSettings_AvailabilityPurge_name = Удалить данные о доступности, старше чем
+view_admin_systemSettings_BaseURL_desc = URL GUI сервера, используемый главным образом для предупреждений посредством email уведомлений.
+view_admin_systemSettings_BaseURL_name = URL GUI консоли
+view_admin_systemSettings_BaselineFrequency_name = Частота вычисления базовой линии
+view_admin_systemSettings_DataMaintenance_name = Период обслуживания БД
+view_admin_systemSettings_DataReindex_desc = Если включено, определенные таблицы БД будут периодически переиндексироваться.
+view_admin_systemSettings_EnableAgentAutoUpdate_desc = Определяет, разрешает ли сервер агентам самостоятельное автообновление. Вы не сможете загрузить дистрибутивы агента с сервера, если эта опция отключена.
+view_admin_systemSettings_EnableAgentAutoUpdate_name = Включить автообновление агентов
+view_admin_systemSettings_EnableDebugMode_name = Включить режим отладки
+view_admin_systemSettings_EventPurge_name = Удалить события, старше чем
+view_admin_systemSettings_JAASProvider_desc = Использовать LDAP для определения идентичности пользователя?
+view_admin_systemSettings_JAASProvider_name = Включить LDAP
+view_admin_systemSettings_LDAPBaseDN_desc = Основание дерева каталогов для поиска имен пользователей и паролей при аутентификации пользователей, например ou\=People,dc\=redhat,dc\=com
+view_admin_systemSettings_LDAPBaseDN_name = Поиск в базе
+view_admin_systemSettings_LDAPBindDN_name = Имя пользователя
+view_admin_systemSettings_LDAPBindPW_name = Пароль
##view_alert_details_field_resource_ancestry = Resource Ancestry
##view_alert_details_field_watched_resource = Watched Resource
##view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From] {0} [REVERT To] {1}
##view_configEdit_description = Description
##view_configEdit_property = Vlastnost
##view_configEdit_unset = Unset?
+##view_configEdit_value = Value
##view_dashboardsManager_message_title_details = <h1>Welcome to {0}</h1>\n<p>This dashboard can be edited by clicking the (Edit Mode) button above.</p>\n<p>What would you like to do?</p>\n<p> <a href=\"{1}\">Import newly discovered resources.</a></p>\n<p> <a href=\"{2}\">Search for resources.</a></p>\n<p> <a href=\"{3}\">See help and documentation.</a></p>
##view_group_common_emptyGroup = An empty group is always considered as mixed.
##view_inventory_resources_disableSuccessful = You have successfully disabled the selected resources and their children, [{0}] resources.
-##view_configEdit_value = Value
##view_messageCenter_messageRootCause = Root Cause
##view_operationHistoryList_cancelConfirm = Are you sure you want to cancel the selected operations? NOTE: Only those selected operations that are currently "in progress" will be attempted to be canceled.
##view_operationHistoryList_cancelFailure = The cancel request failed for the operation with the history ID of [{0}].
@@ -2569,120 +2664,4 @@ view_tabs_common_graphs_cubism=Cubism графики
##view_operationHistoryList_deleteFailure = Failed to delete operation history [{0}].
##view_operationHistoryList_deletePartialSuccess = Deleted [{0}] operation history items, but failed to delete the items with the following IDs: {1}
##view_operationHistoryList_deleteSuccess = Deleted [{0}] operation history items.
-view_admin_plugins_server=Сервер
-view_admin_security=Безопасность
-view_admin_systemSettings_AgentMaxQuietTimeAllowed_desc=Если в течение этого количества
-view_adminConfig_downloads=Загрузки
-view_adminConfig_systemSettings=Системные настройки
-view_adminContent_contentSources=Источники контента
-view_adminRoles_assignedGroups=Назначенные группы ресурсов
-view_adminRoles_assignedSubjects=Назначенные субъекты
-view_adminRoles_failLdap=Не удалось определить, настроен ли LDAP - предположительно LDAP отсутствует.
-view_adminRoles_failLdapGroups=Не удалось получить LDAP-группы. Предположительно LDAP группы отсутствуют
-view_adminRoles_failLdapGroupsRole=Не удалось загрузить LDAP группы, доступные для роли.
-view_adminRoles_failRoles=Не удалось получить роли.
-view_adminRoles_globalPerms=Глобальные полномочия
-view_adminRoles_ldapGroups=LDAP-группы
-view_adminRoles_ldapGroupsReadOnly=данные LDAP групп доступны только для чтения
-view_adminRoles_permissions_autoselecting_configureRead_implied=Автоматически отключено CONFIGURE_WRITE полномочие, поскольку отсутствует CONFIGURE_READ...
-view_adminRoles_permissions_autoselecting_configureWrite_implied=Автоматически выбрано CONFIGURE_READ полномочие, поскольку CONFIGURE_WRITE подразумевает, что ...
-view_adminRoles_permissions_autoselecting_manageInventory_implied=Автоматически установлены не выбранные полномочия реусурсов, поскольку MANAGE_INVENTORY предполагает все полномочия ресурса...
-view_adminRoles_permissions_autoselecting_manageSecurity_implied=Автоматически установлены невыбранные полномочия, поскольку MANAGE_SECURITY включает все другие полномочия...
-view_adminRoles_permissions_globalPermissions=Глобальные полномчия
-view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection={0} полномочия на чтение не могут быть отключены, пока предварительно {0} полномочия записи, которые включают полномочия на чтение, не будут отключены.
-view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection={0} полномочия не могут быть отключены, пока предварительно Manage Inventory, которая включает все полномочия ресурса, не будет отключено.
-view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection={0} полномочия не могут быть отключены, пока предватильно Manage Security полномочие, которое включает все другие полномочия, не будет отключено.
-view_adminRoles_permissions_isAuthorized=Авторизованы?
-view_adminRoles_permissions_isRead=Читать?
-view_adminRoles_permissions_isWrite=Запись?
-view_adminRoles_permissions_permDesc_manageBundles=Можно создавать, обновлять и удалять узлы предоставления (просмотр предоставляется всем)
-view_adminRoles_permissions_permDesc_manageInventory=обладает полными полномочиями ресурса, как описано ниже, для всех ресурсов; можно создавать, обновлять и удалять группы; можно импортировать автоматически-обнаруживаемые и обнаруживаемые вручную ресурсы
-view_adminRoles_permissions_permDesc_manageRepositories=можно создавать, обновлять или удалять репозитории любого пользователя (каждый может создавать свои собственные репозитории), можно ассоциировать источники контента с резпозиториями.
-view_adminRoles_permissions_permDesc_manageSecurity=можно создавать, обновлять или удалять пользователей и роли - включает все другие полномочия
-view_adminRoles_permissions_permReadDesc_configure=просмотр конфигурации ресурса и историю версий конфигурации ресурса
-view_adminRoles_permissions_permReadDesc_control=(ПОДРАЗУМЕВАЕМЫЙ) просмотр доступных операций и итории выполнения операции
-view_adminRoles_permissions_permReadDesc_createChildResources=(ПОДРАЗУМЕВАЕМЫЙ) просмотр истории создания дочернего ресурса
-view_adminRoles_permissions_permReadDesc_deleteChildResources=(ПОДРАЗУМЕВАЕМЫЙ) просмотр истории удаления дочернего ресурса
-view_adminRoles_permissions_permReadDesc_inventory=(ПОДРАЗУМЕВАЕМЫЙ) просмотр свойств ресурса (наименование, описание, версия и т.д.), настройки подключения, и историю настроек подключения
-view_adminRoles_permissions_permReadDesc_manageAlerts=(ПОДРАЗУМЕВАЕМЫЙ) просмотр определений предупреждений и истории предупреждения
-view_adminRoles_permissions_permReadDesc_manageContent=(ПОДРАЗУМЕВАЕМЫЙ) просмотр установленных и доступных пакетов; просмотр истории установки пакета
-view_adminRoles_permissions_permReadDesc_manageEvents=(ПОДРАЗУМЕВАЕМЫЙ) просмотр событий
-view_adminRoles_permissions_permReadDesc_manageMeasurements=(ПОДРАЗУМЕВАЕМЫЙ) просмотр данных метрики и коллекции планировщиков
-view_adminRoles_permissions_permWriteDesc_configure=обновить конфигурацию ресурса; удалить элементы истории версий конфигурации ресурса
-view_adminRoles_permissions_permWriteDesc_control=выполнять операции; удалить элементы истории выполнения операций
-view_adminRoles_permissions_permWriteDesc_createChildResources=создать новый дочерний ресурсы (для типов дочерних ресурсов, которые могут быть созданы)
-view_adminRoles_permissions_permWriteDesc_deleteChildResources=убрать ресурс из инвентаризации; удалить ресурсы (для типов ресурсов, которые могут быть удалены)
-view_adminRoles_permissions_permWriteDesc_inventory=обновить наименование ресурса, версию, описание и настройки подключения; удалить элементы истории настроек подключения
-view_adminRoles_permissions_permWriteDesc_manageAlerts=создать, обновить и удалить определения уведомлений; подтверждать и удалять элементы истории предупреждений
-view_adminRoles_permissions_permWriteDesc_manageContent=подписаться на источники контента; устанавливать и удалять пакеты
-view_adminRoles_permissions_permWriteDesc_manageEvents=удалять события
-view_adminRoles_permissions_permWriteDesc_manageMeasurements=обновление метрик коллекции планировщиков
-view_adminRoles_permissions_perm_configure=Конфигурация
-view_adminRoles_permissions_perm_control=Управление
-view_adminRoles_permissions_perm_createChildResources=Создание дочерних ресурсов
-view_adminRoles_permissions_perm_deleteChildResources=Удаление дочерних ресурсов
-view_adminRoles_permissions_perm_inventory=Инвентаризация
-view_adminRoles_permissions_perm_manageAlerts=Управление предупреждениями
-view_adminRoles_permissions_perm_manageBundles=Управление узлами
-view_adminRoles_permissions_perm_manageContent=Управление контентом
-view_adminRoles_permissions_perm_manageEvents=Управление событиями
-view_adminRoles_permissions_perm_manageInventory=Управление инвентаризацией
-view_adminRoles_permissions_perm_manageMeasurements=Управление измерениями
-view_adminRoles_permissions_perm_manageRepositories=Управление репозиториями
-view_adminRoles_permissions_perm_manageSecurity=Управление безопасностью
-view_adminRoles_permissions_perm_manageSettings=Управление настройками
-view_adminRoles_permissions_read=Чтение\:
-view_adminRoles_permissions_readAccessImplied=Доступ чтения для {0} полномочия подразумевается и не может быть закрыт.
-view_adminRoles_permissions_resourcePermissions=Полномчия ресурса
-view_adminRoles_permissions_write=Запись\:
-view_adminRoles_resourcePerms=Полномочия ресурса
-view_adminRoles_roleAdded=Роль [{0}] добавлена.
-view_adminRoles_roleDeleteFailed=Не удалось удалить роль [{0}].
-view_adminRoles_roleDeleted=Роль [{0}] удалена
-view_adminRoles_roleUpdateFailed=Не удалось обновить роль [{0}].
-view_adminRoles_roleUpdated=Роль [{0}] обновлена.
-view_adminTemplates_editAlertTemplate=Редактировать шаблон предупреждения
-view_adminTemplates_platformServices=Сервисы платформы
-view_adminTemplates_platforms=Платформы
-view_adminTemplates_prompt_disabledAlertTemplates=Количество шаблонов предупреждений, которые были созданы, но закрыты для этого типа ресурсов
-view_adminTemplates_prompt_disabledMetricTemplates=Количество планировщиком метрик, которые закрыты по умолчанию для этого типа ресурсов
-view_adminTemplates_prompt_enabledAlertTemplates=Количество шаблонов уведомлений, которые включены для этого типа ресурсов
-view_adminTemplates_prompt_enabledMetricTemplates=Количество планировщиков метрик, которые включены по умолчанию для этого типа ресурсов
-view_adminTemplates_servers=Серверы
-view_adminTopology_affinityGroups=Похожие группы
-view_adminTopology_agents=Агенты
-view_adminTopology_partitionEvents=События раздела
-view_adminTopology_remoteAgentInstall=Установка удаленного агента
-view_adminTopology_servers=Серверы
-view_adminUsersDetails_dataTypeName=пользователь
-view_admin_systemSettings_AgentMaxQuietTimeAllowed_name=Максимально допустимое время "молчания" агента
-view_admin_systemSettings_AlertPurge_desc=Как долго история предупреждений должна храниться прежде чем будет очищена из БД. Указывается в днях.
-view_admin_systemSettings_AlertPurge_name=Удалить предупреждения, старше чем
-view_admin_systemSettings_AvailabilityPurge_desc=Как долго данные о доступности должны храниться, прежде чем будут очищены из БД. Указывается в днях.
-view_admin_systemSettings_AvailabilityPurge_name=Удалить данные о доступности, старше чем
-view_admin_systemSettings_BaseURL_desc=URL GUI сервера, используемый главным образом для предупреждений посредством email уведомлений.
-view_admin_systemSettings_BaseURL_name=URL GUI консоли
-view_admin_systemSettings_BaselineDataSet_desc=Количество прошедщих измерений, используемых для определения базовой линии. Указывается в днях.
-view_admin_systemSettings_BaselineDataSet_name=Набор данных базовой линии
-view_admin_systemSettings_BaselineFrequency_desc=Частота, с которой выполняется авто-расчет базовых линий. Если 0, авто-расчет базовой линии отключен. Указывается в днях. Максимальное значение - 'Baseline Dataset'.
-view_admin_systemSettings_BaselineFrequency_name=Частота вычисления базовой линии
-view_admin_systemSettings_DataMaintenance_desc=Как часто выполняется обслуживание БД (например, vacuuming если используется Postgres). Указывается в часах.
-view_admin_systemSettings_DataMaintenance_name=Период обслуживания БД
-view_admin_systemSettings_DataReindex_desc=Если включено, определенные таблицы БД будут периодически переиндексироваться.
-view_admin_systemSettings_DataReindex_name=Переиндексировать таблицы данных каждую ночь
-view_admin_systemSettings_EnableAgentAutoUpdate_desc=Определяет, разрешает ли сервер агентам самостоятельное автообновление. Вы не сможете загрузить дистрибутивы агента с сервера, если эта опция отключена.
-view_admin_systemSettings_EnableAgentAutoUpdate_name=Включить автообновление агентов
-view_admin_systemSettings_EnableDebugMode_desc=Если включено, сервер будет входить в отладочный режим.
-view_admin_systemSettings_EnableDebugMode_name=Включить режим отладки
-view_admin_systemSettings_EnableExperimentalFeatures_desc=Если включено, любые экспериментальные характеристики, которые существуют в текущем продукте будут доступны.
-view_admin_systemSettings_EnableExperimentalFeatures_name=Включить экспериментальные характеристики
-view_admin_systemSettings_EventPurge_desc=Как долго данные событий должны храниться, прежде чем будут удалены из БД. Указывается в днях.
-view_admin_systemSettings_EventPurge_name=Удалить события, старше чем
-view_admin_systemSettings_LDAPBaseDN_name=Поиск в базе
-view_admin_systemSettings_LDAPBindDN_desc=Имя пользователя для подключения к LDAP-серверу при запросе LDAP базы данных. Как правило, это полное отличительное имя (DN) LDAP менеджера пользователя, например cn\=Manager,dc\=redhat,dc\=com
-view_admin_systemSettings_LDAPBindDN_name=Имя пользователя
-view_admin_systemSettings_LDAPBindPW_desc=Идентификационная информация пользователя для подключения к LDAP серверу при запросе LDAP базы данных
-view_admin_systemSettings_LDAPBindPW_name=Пароль
-view_admin_systemSettings_JAASProvider_desc=Использовать LDAP для определения идентичности пользователя?
-view_admin_systemSettings_JAASProvider_name=Включить LDAP
-view_admin_systemSettings_LDAPBaseDN_desc=Основание дерева каталогов для поиска имен пользователей и паролей при аутентификации пользователей, например ou\=People,dc\=redhat,dc\=com
+view_tabs_common_graphs_cubism = Cubism графики
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index e2cf0da..48dbdd8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -799,8 +799,8 @@ view_admin_topology = \u62d3\u6251
view_alert_common_tab_conditions = Conditions
view_alert_common_tab_conditions_expression = \u89e6\u53d1\u4e8b\u4ef6\u5f53
view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
-view_alert_common_tab_conditions_modal_title = \u6dfb\u52a0\u6761\u4ef6
##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modal_title = \u6dfb\u52a0\u6761\u4ef6
view_alert_common_tab_conditions_recovery_disabled = This alert caused its alert definition to be disabled
view_alert_common_tab_conditions_recovery_enabled = Triggered ''{0}'' to be re-enabled
view_alert_common_tab_conditions_text = \u6761\u4ef6
diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java
new file mode 100644
index 0000000..c2ef1d4
--- /dev/null
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/resource/test/UninventoryAndDeleteAgentTest.java
@@ -0,0 +1,164 @@
+/*
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.resource.test;
+
+import java.util.HashMap;
+import java.util.Random;
+
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.resource.InventoryStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceCategory;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceNotFoundException;
+import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
+import org.rhq.enterprise.server.resource.metadata.test.UpdatePluginMetadataTestBase;
+import org.rhq.enterprise.server.util.LookupUtil;
+
+/**
+ * Testing the deletion of agents and uninventoring their resources, if there are any.
+ * This is testing BZ 849711.
+ */
+@Test
+public class UninventoryAndDeleteAgentTest extends UpdatePluginMetadataTestBase {
+ private AgentManagerLocal agentManager;
+ private ResourceGroupManagerLocal groupManager;
+ private ResourceGroup newGroup;
+ private ResourceType platformType;
+
+ @Override
+ protected void beforeMethod() throws Exception {
+ super.beforeMethod();
+ platformType = createPlatformResourceType();
+ groupManager = LookupUtil.getResourceGroupManager();
+ newGroup = createNewGroup();
+ agentManager = LookupUtil.getAgentManager();
+ }
+
+ @Override
+ protected void afterMethod() throws Exception {
+ if (newGroup != null) {
+ groupManager.deleteResourceGroup(getOverlord(), newGroup.getId());
+ }
+ cleanupResourceType(platformType.getName());
+ super.afterMethod();
+ }
+
+ public void testDeletingAgents() throws Exception {
+ // create three agents:
+ // 1) agent is the only thing registered - has no inventory yet
+ // 2) agent's platform is NEW, not yet committed to inventory yet (it is in the discovery queue)
+ // 3) agent's platform is COMMITTED in inventory
+ Agent agentRegistered = createOnlyAgent(1);
+ HashMap<Agent, Resource> agentPlatNew = createAgentWithResource(2, InventoryStatus.NEW);
+ HashMap<Agent, Resource> agentPlatCommitted = createAgentWithResource(3, InventoryStatus.COMMITTED);
+
+ Agent agentNew = agentPlatNew.keySet().iterator().next();
+ Agent agentCommitted = agentPlatCommitted.keySet().iterator().next();
+
+ // just for some complexity - we'll want to add our committed resource to a group
+ Resource committedResource = agentPlatCommitted.values().iterator().next();
+ groupManager.addResourcesToGroup(getOverlord(), newGroup.getId(), new int[] { committedResource.getId() });
+
+ // delete our agents
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentRegistered);
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentNew);
+ resourceManager.uninventoryAllResourcesByAgent(getOverlord(), agentCommitted);
+
+ assert null == agentManager.getAgentByID(agentRegistered.getId());
+ assert null == agentManager.getAgentByID(agentNew.getId());
+ assert null == agentManager.getAgentByID(agentCommitted.getId());
+
+ try {
+ Resource doomed = resourceManager.getResourceById(getOverlord(), committedResource.getId());
+ assert doomed.getAgent() == null : "Resource should not have an agent attached, it should have been uninventoried";
+ assert doomed.getInventoryStatus() == InventoryStatus.UNINVENTORIED : "Should have been uninventoried";
+ } catch (ResourceNotFoundException rnfe) {
+ // this could happen if the quartz job already purged the uninventoried resource; test is success if this happens
+ }
+
+ return;
+ }
+
+ private ResourceType createPlatformResourceType() throws Exception {
+ ResourceType resourceType;
+ getTransactionManager().begin();
+ try {
+ resourceType = new ResourceType("DeleteAgentTest-PlatType" + System.currentTimeMillis(), PLUGIN_NAME,
+ ResourceCategory.PLATFORM, null);
+ em.persist(resourceType);
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+ return resourceType;
+ }
+
+ private Agent createOnlyAgent(int index) throws Exception {
+ Agent agent;
+ getTransactionManager().begin();
+ try {
+ agent = new Agent("DeleteAgentTest-Agent" + index, "testaddr", 16163 + index, "", "testtoken" + index);
+ em.persist(agent);
+ em.flush();
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+ return agent;
+ }
+
+ private HashMap<Agent, Resource> createAgentWithResource(int index, InventoryStatus invStatus) throws Exception {
+ HashMap<Agent, Resource> ret = new HashMap<Agent, Resource>(1);
+
+ Agent agent = createOnlyAgent(index);
+ Resource resource;
+
+ getTransactionManager().begin();
+ try {
+ resource = new Resource("DeleteAgentTest-Res" + index, "DeleteAgentTest-Res" + index, platformType);
+ resource.setUuid("" + new Random().nextInt());
+ resource.setAgent(agent);
+ resource.setInventoryStatus(invStatus);
+ em.persist(resource);
+ } catch (Exception e) {
+ System.out.println("CANNOT PREPARE TEST: " + e);
+ getTransactionManager().rollback();
+ throw e;
+ }
+ getTransactionManager().commit();
+
+ ret.put(agent, resource);
+ return ret;
+ }
+
+ private ResourceGroup createNewGroup() {
+ ResourceGroup group = new ResourceGroup("DeleteAgentTest-Group");
+ groupManager.createResourceGroup(getOverlord(), group);
+ return group;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d332161..6c46172 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -249,6 +249,18 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
return entityManager.merge(persistedResource);
}
+ @TransactionAttribute(TransactionAttributeType.NEVER)
+ public void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent) {
+ Resource platform = resourceManager.getPlatform(doomedAgent);
+ if (platform == null) {
+ // there is no platform resource - just delete the agent itself
+ agentManager.deleteAgent(doomedAgent);
+ } else {
+ resourceManager.uninventoryResources(user, new int[] { platform.getId() });
+ }
+ }
+
+ @TransactionAttribute(TransactionAttributeType.SUPPORTS)
public List<Integer> uninventoryResources(Subject user, int[] resourceIds) {
List<Integer> result = new ArrayList<Integer>();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index b4c90f2..d0b959e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -508,6 +508,8 @@ public interface ResourceManagerLocal {
*/
List<Resource> findResourceLineage(Subject subject, int resourceId);
+ void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent);
+
/**
* This will uninventory the resources with the given ID along with all of their child resources. This method will not
* create its own transaction; each individual child resource as well as the top level resources identified with the
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
index 3a0c282..aa202d3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
@@ -27,6 +27,7 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.ResourceAvailability;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceAncestryFormat;
import org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary;
@@ -105,6 +106,15 @@ public interface ResourceManagerRemote {
Resource updateResource(Subject subject, Resource resource);
/**
+ * This will uninventory all resources managed by the given agent. Since this
+ * also removes the platform resource, this will also remove the given agent as well.
+ *
+ * @param user the logged in user
+ * @param doomedAgent the agent to be deleted and whose resources are to be uninventoried
+ */
+ void uninventoryAllResourcesByAgent(Subject user, Agent doomedAgent);
+
+ /**
* Removes these resources from inventory. The resources may subsequently be rediscovered. Note that for
* each specified resource all children will also be removed, it it not necessary or recommended to
* specify more than one resource in the same ancestry line.
11 years, 3 months
[rhq] modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java | 35 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java | 35 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java | 2
3 files changed, 68 insertions(+), 4 deletions(-)
New commits:
commit 3a22a79738fea4739cda2fe5a5aa6dbec84ac2a1
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Mar 13 15:13:54 2013 +0100
[BZ 919416] - A server or agent in the cluster can be added to two different affinity groups - Adding the filtering to the coregui preventing adding the agent/server to more than one affinity group.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java
index a7bd313..781212c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java
@@ -25,10 +25,13 @@ package org.rhq.enterprise.gui.coregui.client.admin.topology;
import static org.rhq.enterprise.gui.coregui.client.admin.topology.AgentDatasourceField.FIELD_NAME;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Window;
@@ -113,8 +116,36 @@ public class AffinityGroupAgentsSelector extends AbstractSelector<Agent, AgentCr
@Override
protected RPCDataSource<Agent, AgentCriteria> getDataSource() {
if (datasource == null) {
- // fetch all available agents by default
- datasource = new AgentDatasource(null, false);
+ // fetch all available agents without an affinity group
+ datasource = new AgentDatasource(null, false) {
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, AgentCriteria criteria) {
+ criteria.fetchAffinityGroup(true);
+ GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria,
+ new AsyncCallback<PageList<Agent>>() {
+ public void onSuccess(PageList<Agent> result) {
+ Iterator<Agent> it = result.iterator();
+ while (it.hasNext()) {
+ Agent agent = it.next();
+ if (agent.getAffinityGroup() != null) {
+ it.remove();
+ }
+ }
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_adminTopology_message_fetchAgents2Fail(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+ };
}
return datasource;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java
index 4fe9732..59e250e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java
@@ -25,10 +25,13 @@ package org.rhq.enterprise.gui.coregui.client.admin.topology;
import static org.rhq.enterprise.gui.coregui.client.admin.topology.ServerDatasourceField.FIELD_NAME;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Window;
@@ -45,6 +48,7 @@ import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.cloud.Server.OperationMode;
import org.rhq.core.domain.criteria.ServerCriteria;
+import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
@@ -118,7 +122,36 @@ public class AffinityGroupServersSelector extends AbstractSelector<Server, Serve
@Override
protected RPCDataSource<Server, ServerCriteria> getDataSource() {
if (datasource == null) {
- datasource = new ServerDatasource(null);
+ // fetch all available servers without an affinity group
+ datasource = new ServerDatasource(null) {
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, ServerCriteria criteria) {
+ criteria.fetchAffinityGroup(true);
+ GWTServiceLookup.getTopologyService().findServersByCriteria(criteria,
+ new AsyncCallback<PageList<Server>>() {
+ public void onSuccess(PageList<Server> result) {
+ Iterator<Server> it = result.iterator();
+ while (it.hasNext()) {
+ Server agent = it.next();
+ if (agent.getAffinityGroup() != null) {
+ it.remove();
+ }
+ }
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_adminTopology_message_fetchAgents2Fail(), t);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ }
+ };
}
return datasource;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java
index 0b13a1b..12dc52e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java
@@ -53,7 +53,7 @@ import org.rhq.enterprise.gui.coregui.client.util.Log;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
/**
- * Datasource for @see FailoverListDetails.
+ * Datasource for @see Agent.
*
* @author Jirka Kremser
*/
11 years, 3 months