modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AgentCriteria.java | 16
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/PartitionEventCriteria.java | 1
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/ServerCriteria.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupAgentsSelector.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupDetailView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupServersSelector.java | 36 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupTableView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupWithCountsDatasource.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasource.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDatasourceField.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDetailView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerTableView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java | 237 -------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TopologyGWTService.java | 237 +++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java | 272 --------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TopologyGWTServiceImpl.java | 272 ++++++++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ListServersUIBean.java | 10
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewAgentUIBean.java | 6
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewServerUIBean.java | 8
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/alert/test/AlertConditionTest.java | 2
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/cloud/FailoverListManagerBeanTest.java | 8
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/core/CoreServerServiceImplTest.java | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/AffinityGroupManagerLocal.java | 67 +-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java | 316 ----------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerException.java | 43 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerLocal.java | 102 ---
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/FailoverListManagerBean.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerBean.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/PartitionEventManagerLocal.java | 39 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/TopologyManagerBean.java | 316 ++++++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/TopologyManagerException.java | 43 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/TopologyManagerLocal.java | 155 ++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java | 10
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/AgentManagerLocal.java | 15
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/ShutdownListener.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/AbstractJobWrapper.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/scheduler/jobs/CloudManagerJob.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java | 8
modules/enterprise/server/jar/src/main/resources/META-INF/jboss.xml | 4
modules/enterprise/server/plugins/cloud/src/main/java/org/rhq/enterprise/server/plugins/cloud/CloudServerPluginComponent.java | 6
51 files changed, 1266 insertions(+), 1103 deletions(-)
New commits:
commit 2d5ccbf8e6756ccc444b540420938071c4842fa2
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Thu Dec 20 20:28:24 2012 +0100
Refactoring: renaming "CloudManager" to "TopologyManager".
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 f7c8083..3be1d58 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
@@ -94,7 +94,7 @@ public class AffinityGroupAgentsSelector extends AbstractSelector<Agent, AgentCr
private void prepareMembers(final AffinityGroupAgentsSelector selector) {
AgentCriteria criteria = new AgentCriteria();
criteria.addFilterAffinityGroupId(affinityGroupId);
- GWTServiceLookup.getCloudService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
+ GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
public void onSuccess(PageList<Agent> result) {
ListGridRecord[] records = getDataSource().buildRecords(result);
originallyAssignedIds = getIdList(records);
@@ -179,7 +179,7 @@ public class AffinityGroupAgentsSelector extends AbstractSelector<Agent, AgentCr
shouldBeClosed = true;
if (!originallySelected.isEmpty()) {
shouldBeClosed = false;
- GWTServiceLookup.getCloudService().removeAgentsFromGroup(
+ GWTServiceLookup.getTopologyService().removeAgentsFromGroup(
originallySelected.toArray(new Integer[originallySelected.size()]), new AsyncCallback<Void>() {
public void onSuccess(Void result) {
closeAndRefresh(parrent, true);
@@ -194,7 +194,7 @@ public class AffinityGroupAgentsSelector extends AbstractSelector<Agent, AgentCr
}
if (!actuallySelected.isEmpty()) {
shouldBeClosed = false;
- GWTServiceLookup.getCloudService().addAgentsToGroup(selector.getAffinityGroupId(),
+ GWTServiceLookup.getTopologyService().addAgentsToGroup(selector.getAffinityGroupId(),
actuallySelected.toArray(new Integer[actuallySelected.size()]), new AsyncCallback<Void>() {
public void onSuccess(Void result) {
closeAndRefresh(parrent, true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupDetailView.java
index 669ea22..03711a4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupDetailView.java
@@ -79,7 +79,7 @@ public class AffinityGroupDetailView extends LocatableVLayout implements Bookmar
@Override
protected void onInit() {
super.onInit();
- GWTServiceLookup.getCloudService().getAffinityGroupById(affinityGroupId, new AsyncCallback<AffinityGroup>() {
+ GWTServiceLookup.getTopologyService().getAffinityGroupById(affinityGroupId, new AsyncCallback<AffinityGroup>() {
public void onSuccess(final AffinityGroup affinityGroup) {
prepareDetailsSection(sectionStack, affinityGroup);
}
@@ -180,7 +180,7 @@ public class AffinityGroupDetailView extends LocatableVLayout implements Bookmar
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
affinityGroup.setName(nameItem.getValueAsString());
- GWTServiceLookup.getCloudService().updateAffinityGroup(affinityGroup, new AsyncCallback<Void>() {
+ GWTServiceLookup.getTopologyService().updateAffinityGroup(affinityGroup, new AsyncCallback<Void>() {
public void onSuccess(Void result) {
Message msg = new Message(MSG.view_adminTopology_message_agroupRenamed(
String.valueOf(affinityGroupId), affinityGroup.getName(), nameItem.getValueAsString()),
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 d1d97d4..0f64fd7 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
@@ -98,7 +98,7 @@ public class AffinityGroupServersSelector extends AbstractSelector<Server, Serve
private void prepareMembers(final AffinityGroupServersSelector selector) {
ServerCriteria criteria = new ServerCriteria();
criteria.addFilterAffinityGroupId(affinityGroupId);
- GWTServiceLookup.getCloudService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
+ GWTServiceLookup.getTopologyService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
public void onSuccess(PageList<Server> result) {
ListGridRecord[] records = getDataSource().buildRecords(result);
originallyAssignedIds = getIdList(records);
@@ -184,7 +184,7 @@ public class AffinityGroupServersSelector extends AbstractSelector<Server, Serve
shouldBeClosed = true;
if (!originallySelected.isEmpty()) {
shouldBeClosed = false;
- GWTServiceLookup.getCloudService().removeServersFromGroup(
+ GWTServiceLookup.getTopologyService().removeServersFromGroup(
originallySelected.toArray(new Integer[originallySelected.size()]), new AsyncCallback<Void>() {
public void onSuccess(Void result) {
closeAndRefresh(parrent, true);
@@ -199,7 +199,7 @@ public class AffinityGroupServersSelector extends AbstractSelector<Server, Serve
}
if (!actuallySelected.isEmpty()) {
shouldBeClosed = false;
- GWTServiceLookup.getCloudService().addServersToGroup(selector.getAffinityGroupId(),
+ GWTServiceLookup.getTopologyService().addServersToGroup(selector.getAffinityGroupId(),
actuallySelected.toArray(new Integer[actuallySelected.size()]), new AsyncCallback<Void>() {
public void onSuccess(Void result) {
closeAndRefresh(parrent, true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupTableView.java
index ef271dc..90b0dc3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupTableView.java
@@ -110,7 +110,7 @@ public class AffinityGroupTableView extends TableSection<AffinityGroupWithCounts
public void execute(Boolean confirmed) {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
- GWTServiceLookup.getCloudService().deleteAffinityGroups(selectedIds,
+ GWTServiceLookup.getTopologyService().deleteAffinityGroups(selectedIds,
new AsyncCallback<Integer>() {
public void onSuccess(Integer count) {
Message msg = new Message(MSG
@@ -232,7 +232,7 @@ public class AffinityGroupTableView extends TableSection<AffinityGroupWithCounts
if (form.validate()) {
String name = form.getValueAsString(FIELD_NAME);
AffinityGroup affinityGroup = new AffinityGroup(name);
- GWTServiceLookup.getCloudService().createAffinityGroup(affinityGroup, new AsyncCallback<Integer>() {
+ GWTServiceLookup.getTopologyService().createAffinityGroup(affinityGroup, new AsyncCallback<Integer>() {
public void onSuccess(Integer affinityGroupId) {
modalWindow.destroy();
CoreGUI.goToView(VIEW_PATH + "/" + affinityGroupId);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupWithCountsDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupWithCountsDatasource.java
index bd8b6b3..33a0e5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupWithCountsDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AffinityGroupWithCountsDatasource.java
@@ -116,7 +116,7 @@ public class AffinityGroupWithCountsDatasource extends RPCDataSource<AffinityGro
protected void executeFetch(final DSRequest request, final DSResponse response, Criteria criteria) {
final PageControl pc = getPageControl(request);
- GWTServiceLookup.getCloudService().getAffinityGroupCountComposites(pc,
+ GWTServiceLookup.getTopologyService().getAffinityGroupCountComposites(pc,
new AsyncCallback<PageList<AffinityGroupCountComposite>>() {
public void onSuccess(PageList<AffinityGroupCountComposite> result) {
response.setData(buildRecords(result));
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 f35aaee..ac33e74 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
@@ -122,7 +122,7 @@ public class AgentDatasource extends RPCDataSource<Agent, AgentCriteria> {
criteria.addFilterServerId(id);
}
- GWTServiceLookup.getCloudService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
+ GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
public void onSuccess(PageList<Agent> result) {
response.setData(buildRecords(result));
response.setTotalRows(result.size());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
index 255a571..92ee011 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/AgentDetailView.java
@@ -84,7 +84,7 @@ public class AgentDetailView extends LocatableVLayout {
super.onInit();
AgentCriteria criteria = new AgentCriteria();
criteria.addFilterId(agentId);
- GWTServiceLookup.getCloudService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
+ GWTServiceLookup.getTopologyService().findAgentsByCriteria(criteria, new AsyncCallback<PageList<Agent>>() {
public void onSuccess(final PageList<Agent> agents) {
if (agents == null || agents.isEmpty() || agents.size() != 1) {
CoreGUI.getErrorHandler().handleError(
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
index c21d086..8146a42 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/FailoverListItemDatasource.java
@@ -103,7 +103,7 @@ public class FailoverListItemDatasource extends AbstractServerNodeDatasource<Fai
final PageControl pc = getPageControl(request);
// if agentId == null all FailoverListDetails are returned
- GWTServiceLookup.getCloudService().getFailoverListDetailsByAgentId(agentId, pc,
+ GWTServiceLookup.getTopologyService().getFailoverListDetailsByAgentId(agentId, pc,
new AsyncCallback<List<FailoverListDetails>>() {
public void onSuccess(List<FailoverListDetails> result) {
response.setData(buildRecords(result));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
index 39bd457..9042b6b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDatasource.java
@@ -100,7 +100,7 @@ public class PartitionEventDatasource extends RPCDataSource<PartitionEvent, Part
processResponse(request.getRequestId(), response);
return;
}
- GWTServiceLookup.getCloudService().findPartitionEventsByCriteria(criteria,
+ GWTServiceLookup.getTopologyService().findPartitionEventsByCriteria(criteria,
new AsyncCallback<PageList<PartitionEvent>>() {
public void onSuccess(PageList<PartitionEvent> result) {
response.setData(buildRecords(result));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDetailView.java
index 43ac373..d9103eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventDetailView.java
@@ -46,7 +46,7 @@ import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.gwt.CloudGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.TopologyGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.Log;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
@@ -89,7 +89,7 @@ public class PartitionEventDetailView extends LocatableVLayout implements Bookma
super.onInit();
PartitionEventCriteria criteria = new PartitionEventCriteria();
criteria.addFilterId(partitionEventId);
- final CloudGWTServiceAsync service = GWTServiceLookup.getCloudService();
+ final TopologyGWTServiceAsync service = GWTServiceLookup.getTopologyService();
service.findPartitionEventsByCriteria(criteria, new AsyncCallback<PageList<PartitionEvent>>() {
public void onSuccess(final PageList<PartitionEvent> events) {
if (events == null || events.size() != 1) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
index 3cbfdb1..dc7e545 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/PartitionEventTableView.java
@@ -209,13 +209,13 @@ public class PartitionEventTableView extends TableSection<PartitionEventDatasour
};
switch (action) {
case REMOVE_SELECTED:
- GWTServiceLookup.getCloudService().deletePartitionEvents(selectedIds, callback);
+ GWTServiceLookup.getTopologyService().deletePartitionEvents(selectedIds, callback);
break;
case PURGE_ALL:
- GWTServiceLookup.getCloudService().purgeAllEvents(callback);
+ GWTServiceLookup.getTopologyService().purgeAllEvents(callback);
break;
case FORCE_REPARTITION:
- GWTServiceLookup.getCloudService().cloudPartitionEventRequest(callback);
+ GWTServiceLookup.getTopologyService().cloudPartitionEventRequest(callback);
}
} else {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
index 09ea8c3..76ba87c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDatasource.java
@@ -119,7 +119,7 @@ public class ServerDatasource extends AbstractServerNodeDatasource<Server, Serve
if (affinityGroupId != null) {
criteria.addFilterAffinityGroupId(affinityGroupId);
}
- GWTServiceLookup.getCloudService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
+ GWTServiceLookup.getTopologyService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
public void onSuccess(PageList<Server> result) {
response.setData(buildRecords(result));
response.setTotalRows(result.size());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
index ccc11aa..1e15208 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerDetailView.java
@@ -97,7 +97,7 @@ public class ServerDetailView extends LocatableVLayout implements BookmarkableVi
super.onInit();
ServerCriteria criteria = new ServerCriteria();
criteria.addFilterId(serverId);
- GWTServiceLookup.getCloudService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
+ GWTServiceLookup.getTopologyService().findServersByCriteria(criteria, new AsyncCallback<PageList<Server>>() {
public void onSuccess(final PageList<Server> servers) {
if (servers == null || servers.isEmpty() || servers.size() != 1) {
CoreGUI.getErrorHandler().handleError(
@@ -229,7 +229,7 @@ public class ServerDetailView extends LocatableVLayout implements BookmarkableVi
server.setPort(Integer.parseInt(portItem.getValueAsString()));
server.setSecurePort(Integer.parseInt(securePortItem.getValueAsString()));
server.setOperationMode(OperationMode.valueOf(operationModeItem.getValueAsString()));
- GWTServiceLookup.getCloudService().updateServer(server, new AsyncCallback<Void>() {
+ GWTServiceLookup.getTopologyService().updateServer(server, new AsyncCallback<Void>() {
public void onSuccess(Void result) {
Message msg = new Message(MSG.view_adminTopology_message_serverUpdated(server.getName()),
Message.Severity.Info);
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 6cae592..1c6e6d5 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
@@ -157,7 +157,7 @@ public class ServerTableView extends
public void execute(Boolean confirmed) {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
- GWTServiceLookup.getCloudService().deleteServers(selectedIds,
+ GWTServiceLookup.getTopologyService().deleteServers(selectedIds,
new AsyncCallback<Void>() {
public void onSuccess(Void arg0) {
Message msg = new Message(MSG
@@ -192,7 +192,7 @@ public class ServerTableView extends
public void execute(Boolean confirmed) {
if (confirmed) {
int[] selectedIds = getSelectedIds(selections);
- GWTServiceLookup.getCloudService().updateServerMode(selectedIds, mode,
+ GWTServiceLookup.getTopologyService().updateServerMode(selectedIds, mode,
new AsyncCallback<Void>() {
public void onSuccess(Void result) {
Message msg = new Message(MSG.view_adminTopology_message_setMode(
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
index d686395..91f5f53 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/topology/ServerWithAgentCountDatasource.java
@@ -78,7 +78,7 @@ public class ServerWithAgentCountDatasource extends
protected void executeFetch(final DSRequest request, final DSResponse response, Criteria criteria) {
final PageControl pc = getPageControl(request);
- GWTServiceLookup.getCloudService().getServers(pc, new AsyncCallback<List<ServerWithAgentCountComposite>>() {
+ GWTServiceLookup.getTopologyService().getServers(pc, new AsyncCallback<List<ServerWithAgentCountComposite>>() {
public void onSuccess(List<ServerWithAgentCountComposite> result) {
response.setData(buildRecords(result));
response.setTotalRows(result.size());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
deleted file mode 100644
index 4b92d6f..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/CloudGWTService.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.enterprise.gui.coregui.client.gwt;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-import org.rhq.core.domain.cloud.AffinityGroup;
-import org.rhq.core.domain.cloud.FailoverListDetails;
-import org.rhq.core.domain.cloud.PartitionEvent;
-import org.rhq.core.domain.cloud.PartitionEventDetails;
-import org.rhq.core.domain.cloud.Server;
-import org.rhq.core.domain.cloud.composite.AffinityGroupCountComposite;
-import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
-import org.rhq.core.domain.criteria.AgentCriteria;
-import org.rhq.core.domain.criteria.PartitionEventCriteria;
-import org.rhq.core.domain.criteria.ServerCriteria;
-import org.rhq.core.domain.resource.Agent;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageList;
-
-/**
- * API for HAAC console, mostly CRUD operations for entities <code>Server</code>, <code>Agent</code>,
- * <code>PartitionEvent</code> and <code>AffinityGroup</code>.
- *
- * @author Jiri Kremser
- */
-public interface CloudGWTService extends RemoteService {
-
- /**
- * Returns all the servers with agent count.
- *
- * @param pageControl the page control instance
- * @return a list of all available servers (the servers in <code>MAINTENANCE</code> or <code>DOWN</code> mode are included as well)
- * @throws RuntimeException
- */
- List<ServerWithAgentCountComposite> getServers(PageControl pageControl) throws RuntimeException;
-
- /**
- * Deletes the servers with provided ids.
- *
- * @param serverIds array of server ids
- * @throws RuntimeException
- */
- void deleteServers(int[] serverIds) throws RuntimeException;
-
- /**
- * Updates the server mode to particular servers.
- *
- * @param serverIds the array of ids of the servers whose modes are object of update
- * @param mode the new operation mode
- * @throws RuntimeException
- */
- void updateServerMode(int[] serverIds, Server.OperationMode mode) throws RuntimeException;
-
- /**
- * Updates the server.
- *
- * @param server instance of Server
- * @throws RuntimeException
- */
- void updateServer(Server server) throws RuntimeException;
-
- /**
- * Returns the list of <code>FailoverListDetails</code> for a particular agent.
- *
- * @param agentId the id the agent
- * @param pageControl the page control instance
- * @return a list of <code>FailoverListDetails</code> instances
- * @throws RuntimeException
- */
- List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId, PageControl pageControl) throws RuntimeException;;
-
- /**
- * Finder for <code>PartitionEvent</code> instances
- *
- * @param criteria the criteria for finding partition events
- * @return a list of <code>codePartitionEvent</code> instances
- * @throws RuntimeException
- */
- PageList<PartitionEvent> findPartitionEventsByCriteria(PartitionEventCriteria criteria) throws RuntimeException;
-
- /**
- * Finder for <code>Server</code> instances
- *
- * @param criteria the criteria for finding servers
- * @return a list of <code>Server</code> instances
- * @throws RuntimeException
- */
- PageList<Server> findServersByCriteria(ServerCriteria criteria) throws RuntimeException;
-
- /**
- * Finder for <code>Agent</code> instances
- *
- * @param criteria the criteria for finding agents
- * @return a list of <code>Agent</code> instances
- * @throws RuntimeException
- */
- PageList<Agent> findAgentsByCriteria(AgentCriteria criteria) throws RuntimeException;
-
- /**
- * Request forcing the repartition of the cluster. All agents should eventually reconnects to its most preferred server
- * (The first one in their failover list.)
- *
- * @throws RuntimeException
- */
- void cloudPartitionEventRequest() throws RuntimeException;
-
- /**
- * Deletes all the partition events.
- *
- * @throws RuntimeException
- */
- void purgeAllEvents() throws RuntimeException;
-
- /**
- * Deletes some partition events.
- *
- * @param eventIds the list of ids of partition events to delete
- * @throws RuntimeException
- */
- void deletePartitionEvents(int[] eventIds) throws RuntimeException;
-
- /**
- * Returns the list of <code>PartitionEventDetails</code> instances.
- *
- * @param partitionEventId
- * @param pageControl the page control instance
- * @return list of <code>PartitionEventDetails</code> instances
- * @throws RuntimeException
- */
- PageList<PartitionEventDetails> getPartitionEventDetails(int partitionEventId, PageControl pageControl)
- throws RuntimeException;
-
- /**
- * Returns the list with <code>AffinityGroupCountComposite</code> instances, i.e. affinity groups with agent and server
- * counts.
- *
- * @param pageControl the page control instance
- * @return list with <code>AffinityGroupCountComposite</code> instances
- * @throws RuntimeException
- */
- PageList<AffinityGroupCountComposite> getAffinityGroupCountComposites(PageControl pageControl)
- throws RuntimeException;
-
- /**
- * Deletes some affinity groups.
- *
- * @param affinityGroupIds array of ids of affinity group to delete
- * @return the number of deleted affinity groups
- * @throws RuntimeException
- */
- int deleteAffinityGroups(int[] affinityGroupIds) throws RuntimeException;
-
- /**
- * Creates new affinity group.
- *
- * @param affinityGroup instance of <code>AffinityGroup</code> to create
- * @return the new id of the affinity group
- * @throws RuntimeException
- */
- int createAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException;
-
- /**
- * Updates existing affinity group.
- *
- * @param affinityGroup instance of <code>AffinityGroup</code>
- * @throws RuntimeException
- */
- void updateAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException;
-
- /**
- * Returns the affinity group based on the provided id.
- *
- * @param affinityGroupId the id of an affinity group
- * @return the instance of <code>AffinityGroup</code>
- * @throws RuntimeException
- */
- AffinityGroup getAffinityGroupById(int affinityGroupId) throws RuntimeException;
-
- /**
- * Add servers to an existing affinity group.
- *
- * @param affinityGroupId id of the affinity group into which the servers should be added
- * @param serverIds array of ids of servers to be added
- * @throws RuntimeException
- */
- void addServersToGroup(int affinityGroupId, Integer[] serverIds) throws RuntimeException;
-
- /**
- * Removes the servers from the affinity group. There is no need to provide the id of affinity group,
- * because it is part of the server data.
- *
- * @param serverIds array of ids of servers to be removed
- * @throws RuntimeException
- */
- void removeServersFromGroup(Integer[] serverIds) throws RuntimeException;
-
- /**
- * Add agents to an existing affinity group.
- *
- * @param affinityGroupId id of the affinity group into which the agents should be added
- * @param agentIds array of ids of agents to be added
- * @throws RuntimeException
- */
- void addAgentsToGroup(int affinityGroupId, Integer[] agentIds) throws RuntimeException;
-
- /**
- * Removes the agents from the affinity group. There is no need to provide the id of affinity group,
- * because it is part of the agent data.
- *
- * @param agentIds array of ids of agents to be removed
- * @throws RuntimeException
- */
- void removeAgentsFromGroup(Integer[] agentIds) throws RuntimeException;
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
index d41b173..8e883af 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
@@ -202,8 +202,8 @@ public class GWTServiceLookup {
return secure(PlatformUtilizationGWTServiceAsync.Util.getInstance());
}
- public static CloudGWTServiceAsync getCloudService() {
- return secure(CloudGWTServiceAsync.Util.getInstance());
+ public static TopologyGWTServiceAsync getTopologyService() {
+ return secure(TopologyGWTServiceAsync.Util.getInstance());
}
@SuppressWarnings("unchecked")
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TopologyGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TopologyGWTService.java
new file mode 100644
index 0000000..666fb3e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TopologyGWTService.java
@@ -0,0 +1,237 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.gwt;
+
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import org.rhq.core.domain.cloud.AffinityGroup;
+import org.rhq.core.domain.cloud.FailoverListDetails;
+import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.cloud.PartitionEventDetails;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.composite.AffinityGroupCountComposite;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.AgentCriteria;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
+import org.rhq.core.domain.criteria.ServerCriteria;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+
+/**
+ * API for HAAC console, mostly CRUD operations for entities <code>Server</code>, <code>Agent</code>,
+ * <code>PartitionEvent</code> and <code>AffinityGroup</code>.
+ *
+ * @author Jiri Kremser
+ */
+public interface TopologyGWTService extends RemoteService {
+
+ /**
+ * Returns all the servers with agent count.
+ *
+ * @param pageControl the page control instance
+ * @return a list of all available servers (the servers in <code>MAINTENANCE</code> or <code>DOWN</code> mode are included as well)
+ * @throws RuntimeException
+ */
+ List<ServerWithAgentCountComposite> getServers(PageControl pageControl) throws RuntimeException;
+
+ /**
+ * Deletes the servers with provided ids.
+ *
+ * @param serverIds array of server ids
+ * @throws RuntimeException
+ */
+ void deleteServers(int[] serverIds) throws RuntimeException;
+
+ /**
+ * Updates the server mode to particular servers.
+ *
+ * @param serverIds the array of ids of the servers whose modes are object of update
+ * @param mode the new operation mode
+ * @throws RuntimeException
+ */
+ void updateServerMode(int[] serverIds, Server.OperationMode mode) throws RuntimeException;
+
+ /**
+ * Updates the server.
+ *
+ * @param server instance of Server
+ * @throws RuntimeException
+ */
+ void updateServer(Server server) throws RuntimeException;
+
+ /**
+ * Returns the list of <code>FailoverListDetails</code> for a particular agent.
+ *
+ * @param agentId the id the agent
+ * @param pageControl the page control instance
+ * @return a list of <code>FailoverListDetails</code> instances
+ * @throws RuntimeException
+ */
+ List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId, PageControl pageControl) throws RuntimeException;;
+
+ /**
+ * Finder for <code>PartitionEvent</code> instances
+ *
+ * @param criteria the criteria for finding partition events
+ * @return a list of <code>codePartitionEvent</code> instances
+ * @throws RuntimeException
+ */
+ PageList<PartitionEvent> findPartitionEventsByCriteria(PartitionEventCriteria criteria) throws RuntimeException;
+
+ /**
+ * Finder for <code>Server</code> instances
+ *
+ * @param criteria the criteria for finding servers
+ * @return a list of <code>Server</code> instances
+ * @throws RuntimeException
+ */
+ PageList<Server> findServersByCriteria(ServerCriteria criteria) throws RuntimeException;
+
+ /**
+ * Finder for <code>Agent</code> instances
+ *
+ * @param criteria the criteria for finding agents
+ * @return a list of <code>Agent</code> instances
+ * @throws RuntimeException
+ */
+ PageList<Agent> findAgentsByCriteria(AgentCriteria criteria) throws RuntimeException;
+
+ /**
+ * Request forcing the repartition of the cluster. All agents should eventually reconnects to its most preferred server
+ * (The first one in their failover list.)
+ *
+ * @throws RuntimeException
+ */
+ void cloudPartitionEventRequest() throws RuntimeException;
+
+ /**
+ * Deletes all the partition events.
+ *
+ * @throws RuntimeException
+ */
+ void purgeAllEvents() throws RuntimeException;
+
+ /**
+ * Deletes some partition events.
+ *
+ * @param eventIds the list of ids of partition events to delete
+ * @throws RuntimeException
+ */
+ void deletePartitionEvents(int[] eventIds) throws RuntimeException;
+
+ /**
+ * Returns the list of <code>PartitionEventDetails</code> instances.
+ *
+ * @param partitionEventId
+ * @param pageControl the page control instance
+ * @return list of <code>PartitionEventDetails</code> instances
+ * @throws RuntimeException
+ */
+ PageList<PartitionEventDetails> getPartitionEventDetails(int partitionEventId, PageControl pageControl)
+ throws RuntimeException;
+
+ /**
+ * Returns the list with <code>AffinityGroupCountComposite</code> instances, i.e. affinity groups with agent and server
+ * counts.
+ *
+ * @param pageControl the page control instance
+ * @return list with <code>AffinityGroupCountComposite</code> instances
+ * @throws RuntimeException
+ */
+ PageList<AffinityGroupCountComposite> getAffinityGroupCountComposites(PageControl pageControl)
+ throws RuntimeException;
+
+ /**
+ * Deletes some affinity groups.
+ *
+ * @param affinityGroupIds array of ids of affinity group to delete
+ * @return the number of deleted affinity groups
+ * @throws RuntimeException
+ */
+ int deleteAffinityGroups(int[] affinityGroupIds) throws RuntimeException;
+
+ /**
+ * Creates new affinity group.
+ *
+ * @param affinityGroup instance of <code>AffinityGroup</code> to create
+ * @return the new id of the affinity group
+ * @throws RuntimeException
+ */
+ int createAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException;
+
+ /**
+ * Updates existing affinity group.
+ *
+ * @param affinityGroup instance of <code>AffinityGroup</code>
+ * @throws RuntimeException
+ */
+ void updateAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException;
+
+ /**
+ * Returns the affinity group based on the provided id.
+ *
+ * @param affinityGroupId the id of an affinity group
+ * @return the instance of <code>AffinityGroup</code>
+ * @throws RuntimeException
+ */
+ AffinityGroup getAffinityGroupById(int affinityGroupId) throws RuntimeException;
+
+ /**
+ * Add servers to an existing affinity group.
+ *
+ * @param affinityGroupId id of the affinity group into which the servers should be added
+ * @param serverIds array of ids of servers to be added
+ * @throws RuntimeException
+ */
+ void addServersToGroup(int affinityGroupId, Integer[] serverIds) throws RuntimeException;
+
+ /**
+ * Removes the servers from the affinity group. There is no need to provide the id of affinity group,
+ * because it is part of the server data.
+ *
+ * @param serverIds array of ids of servers to be removed
+ * @throws RuntimeException
+ */
+ void removeServersFromGroup(Integer[] serverIds) throws RuntimeException;
+
+ /**
+ * Add agents to an existing affinity group.
+ *
+ * @param affinityGroupId id of the affinity group into which the agents should be added
+ * @param agentIds array of ids of agents to be added
+ * @throws RuntimeException
+ */
+ void addAgentsToGroup(int affinityGroupId, Integer[] agentIds) throws RuntimeException;
+
+ /**
+ * Removes the agents from the affinity group. There is no need to provide the id of affinity group,
+ * because it is part of the agent data.
+ *
+ * @param agentIds array of ids of agents to be removed
+ * @throws RuntimeException
+ */
+ void removeAgentsFromGroup(Integer[] agentIds) throws RuntimeException;
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
deleted file mode 100644
index ab46527..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/CloudGWTServiceImpl.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.enterprise.gui.coregui.server.gwt;
-
-import java.util.List;
-
-import org.apache.commons.lang.ArrayUtils;
-
-import org.rhq.core.domain.cloud.AffinityGroup;
-import org.rhq.core.domain.cloud.FailoverListDetails;
-import org.rhq.core.domain.cloud.PartitionEvent;
-import org.rhq.core.domain.cloud.PartitionEventDetails;
-import org.rhq.core.domain.cloud.PartitionEventType;
-import org.rhq.core.domain.cloud.Server;
-import org.rhq.core.domain.cloud.Server.OperationMode;
-import org.rhq.core.domain.cloud.composite.AffinityGroupCountComposite;
-import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
-import org.rhq.core.domain.criteria.AgentCriteria;
-import org.rhq.core.domain.criteria.PartitionEventCriteria;
-import org.rhq.core.domain.criteria.ServerCriteria;
-import org.rhq.core.domain.resource.Agent;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.coregui.client.gwt.CloudGWTService;
-import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
-import org.rhq.enterprise.server.cloud.AffinityGroupManagerLocal;
-import org.rhq.enterprise.server.cloud.CloudManagerLocal;
-import org.rhq.enterprise.server.cloud.PartitionEventManagerLocal;
-import org.rhq.enterprise.server.core.AgentManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * @author Jiri Kremser
- */
-public class CloudGWTServiceImpl extends AbstractGWTServiceImpl implements CloudGWTService {
-
- private static final long serialVersionUID = 1L;
-
- private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
-
- private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
-
- private PartitionEventManagerLocal partitionEventManager = LookupUtil.getPartitionEventManager();
-
- private AffinityGroupManagerLocal affinityGroupManager = LookupUtil.getAffinityGroupManager();
-
- @Override
- public PageList<ServerWithAgentCountComposite> getServers(PageControl pc) throws RuntimeException {
- try {
- return SerialUtility.prepare(cloudManager.getServerComposites(getSessionSubject(), pc),
- "CloudGWTServiceImpl.getServers");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void deleteServers(int[] serverIds) throws RuntimeException {
- try {
- cloudManager.deleteServers(getSessionSubject(), ArrayUtils.toObject(serverIds));
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void updateServerMode(int[] serverIds, OperationMode mode) throws RuntimeException {
- try {
- cloudManager.updateServerMode(getSessionSubject(), ArrayUtils.toObject(serverIds), mode);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId, PageControl pc)
- throws RuntimeException {
- try {
- return SerialUtility.prepare(
- cloudManager.getFailoverListDetailsByAgentId(getSessionSubject(), agentId, pc),
- "CloudGWTServiceImpl.getFailoverListDetailsByAgentId");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public PageList<PartitionEvent> findPartitionEventsByCriteria(PartitionEventCriteria criteria)
- throws RuntimeException {
- try {
- return SerialUtility.prepare(
- partitionEventManager.findPartitionEventsByCriteria(getSessionSubject(), criteria),
- "CloudGWTServiceImpl.findPartitionEventsByCriteria");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public PageList<Server> findServersByCriteria(ServerCriteria criteria) throws RuntimeException {
- try {
- return SerialUtility.prepare(cloudManager.findServersByCriteria(getSessionSubject(), criteria),
- "CloudGWTServiceImpl.findServersByCriteria");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public PageList<Agent> findAgentsByCriteria(AgentCriteria criteria) throws RuntimeException {
- try {
- return SerialUtility.prepare(agentManager.findAgentsByCriteria(getSessionSubject(), criteria),
- "CloudGWTServiceImpl.findAgentsByCriteria");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void cloudPartitionEventRequest() throws RuntimeException {
- try {
- partitionEventManager.cloudPartitionEventRequest(getSessionSubject(),
- PartitionEventType.ADMIN_INITIATED_PARTITION, "");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void purgeAllEvents() throws RuntimeException {
- try {
- partitionEventManager.purgeAllEvents(getSessionSubject());
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void deletePartitionEvents(int[] eventIds) throws RuntimeException {
- try {
- partitionEventManager.deletePartitionEvents(getSessionSubject(), ArrayUtils.toObject(eventIds));
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public PageList<PartitionEventDetails> getPartitionEventDetails(int partitionEventId, PageControl pageControl)
- throws RuntimeException {
- try {
- return SerialUtility.prepare(
- partitionEventManager.getPartitionEventDetails(getSessionSubject(), partitionEventId, pageControl),
- "CloudGWTServiceImpl.getPartitionEventDetails");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public PageList<AffinityGroupCountComposite> getAffinityGroupCountComposites(PageControl pageControl)
- throws RuntimeException {
- try {
- return SerialUtility.prepare(affinityGroupManager.getComposites(getSessionSubject(), pageControl),
- "CloudGWTServiceImpl.getAffinityGroupCountComposites");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public int deleteAffinityGroups(int[] affinityGroupIds) throws RuntimeException {
- try {
- return affinityGroupManager.delete(getSessionSubject(), ArrayUtils.toObject(affinityGroupIds));
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public int createAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException {
- try {
- return affinityGroupManager.create(getSessionSubject(), affinityGroup);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public AffinityGroup getAffinityGroupById(int affinityGroupId) throws RuntimeException {
- try {
- return SerialUtility.prepare(affinityGroupManager.getById(getSessionSubject(), affinityGroupId),
- "CloudGWTServiceImpl.getAffinityGroupById");
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void addServersToGroup(int affinityGroupId, Integer[] serverIds) throws RuntimeException {
- try {
- affinityGroupManager.addServersToGroup(getSessionSubject(), affinityGroupId, serverIds);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void removeServersFromGroup(Integer[] serverIds) throws RuntimeException {
- try {
- affinityGroupManager.removeServersFromGroup(getSessionSubject(), serverIds);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void addAgentsToGroup(int affinityGroupId, Integer[] agentIds) throws RuntimeException {
- try {
- affinityGroupManager.addAgentsToGroup(getSessionSubject(), affinityGroupId, agentIds);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void removeAgentsFromGroup(Integer[] agentIds) throws RuntimeException {
- try {
- affinityGroupManager.removeAgentsFromGroup(getSessionSubject(), agentIds);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void updateServer(Server server) throws RuntimeException {
- try {
- cloudManager.updateServer(getSessionSubject(), server);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
- @Override
- public void updateAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException {
- try {
- affinityGroupManager.update(getSessionSubject(), affinityGroup);
- } catch (Throwable t) {
- throw getExceptionToThrowToClient(t);
- }
- }
-
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TopologyGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TopologyGWTServiceImpl.java
new file mode 100644
index 0000000..4445368
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TopologyGWTServiceImpl.java
@@ -0,0 +1,272 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.server.gwt;
+
+import java.util.List;
+
+import org.apache.commons.lang.ArrayUtils;
+
+import org.rhq.core.domain.cloud.AffinityGroup;
+import org.rhq.core.domain.cloud.FailoverListDetails;
+import org.rhq.core.domain.cloud.PartitionEvent;
+import org.rhq.core.domain.cloud.PartitionEventDetails;
+import org.rhq.core.domain.cloud.PartitionEventType;
+import org.rhq.core.domain.cloud.Server;
+import org.rhq.core.domain.cloud.Server.OperationMode;
+import org.rhq.core.domain.cloud.composite.AffinityGroupCountComposite;
+import org.rhq.core.domain.cloud.composite.ServerWithAgentCountComposite;
+import org.rhq.core.domain.criteria.AgentCriteria;
+import org.rhq.core.domain.criteria.PartitionEventCriteria;
+import org.rhq.core.domain.criteria.ServerCriteria;
+import org.rhq.core.domain.resource.Agent;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.coregui.client.gwt.TopologyGWTService;
+import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
+import org.rhq.enterprise.server.cloud.AffinityGroupManagerLocal;
+import org.rhq.enterprise.server.cloud.PartitionEventManagerLocal;
+import org.rhq.enterprise.server.cloud.TopologyManagerLocal;
+import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.util.LookupUtil;
+
+/**
+ * @author Jiri Kremser
+ */
+public class TopologyGWTServiceImpl extends AbstractGWTServiceImpl implements TopologyGWTService {
+
+ private static final long serialVersionUID = 1L;
+
+ private TopologyManagerLocal topologyManager = LookupUtil.getTopologyManager();
+
+ private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
+
+ private PartitionEventManagerLocal partitionEventManager = LookupUtil.getPartitionEventManager();
+
+ private AffinityGroupManagerLocal affinityGroupManager = LookupUtil.getAffinityGroupManager();
+
+ @Override
+ public PageList<ServerWithAgentCountComposite> getServers(PageControl pc) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(topologyManager.getServerComposites(getSessionSubject(), pc),
+ "TopologyGWTServiceImpl.getServers");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void deleteServers(int[] serverIds) throws RuntimeException {
+ try {
+ topologyManager.deleteServers(getSessionSubject(), ArrayUtils.toObject(serverIds));
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void updateServerMode(int[] serverIds, OperationMode mode) throws RuntimeException {
+ try {
+ topologyManager.updateServerMode(getSessionSubject(), ArrayUtils.toObject(serverIds), mode);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId, PageControl pc)
+ throws RuntimeException {
+ try {
+ return SerialUtility.prepare(
+ topologyManager.getFailoverListDetailsByAgentId(getSessionSubject(), agentId, pc),
+ "TopologyGWTServiceImpl.getFailoverListDetailsByAgentId");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public PageList<PartitionEvent> findPartitionEventsByCriteria(PartitionEventCriteria criteria)
+ throws RuntimeException {
+ try {
+ return SerialUtility.prepare(
+ partitionEventManager.findPartitionEventsByCriteria(getSessionSubject(), criteria),
+ "TopologyGWTServiceImpl.findPartitionEventsByCriteria");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public PageList<Server> findServersByCriteria(ServerCriteria criteria) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(topologyManager.findServersByCriteria(getSessionSubject(), criteria),
+ "TopologyGWTServiceImpl.findServersByCriteria");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public PageList<Agent> findAgentsByCriteria(AgentCriteria criteria) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(agentManager.findAgentsByCriteria(getSessionSubject(), criteria),
+ "TopologyGWTServiceImpl.findAgentsByCriteria");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void cloudPartitionEventRequest() throws RuntimeException {
+ try {
+ partitionEventManager.cloudPartitionEventRequest(getSessionSubject(),
+ PartitionEventType.ADMIN_INITIATED_PARTITION, "");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void purgeAllEvents() throws RuntimeException {
+ try {
+ partitionEventManager.purgeAllEvents(getSessionSubject());
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void deletePartitionEvents(int[] eventIds) throws RuntimeException {
+ try {
+ partitionEventManager.deletePartitionEvents(getSessionSubject(), ArrayUtils.toObject(eventIds));
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public PageList<PartitionEventDetails> getPartitionEventDetails(int partitionEventId, PageControl pageControl)
+ throws RuntimeException {
+ try {
+ return SerialUtility.prepare(
+ partitionEventManager.getPartitionEventDetails(getSessionSubject(), partitionEventId, pageControl),
+ "TopologyGWTServiceImpl.getPartitionEventDetails");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public PageList<AffinityGroupCountComposite> getAffinityGroupCountComposites(PageControl pageControl)
+ throws RuntimeException {
+ try {
+ return SerialUtility.prepare(affinityGroupManager.getComposites(getSessionSubject(), pageControl),
+ "TopologyGWTServiceImpl.getAffinityGroupCountComposites");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public int deleteAffinityGroups(int[] affinityGroupIds) throws RuntimeException {
+ try {
+ return affinityGroupManager.delete(getSessionSubject(), ArrayUtils.toObject(affinityGroupIds));
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public int createAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException {
+ try {
+ return affinityGroupManager.create(getSessionSubject(), affinityGroup);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public AffinityGroup getAffinityGroupById(int affinityGroupId) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(affinityGroupManager.getById(getSessionSubject(), affinityGroupId),
+ "TopologyGWTServiceImpl.getAffinityGroupById");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void addServersToGroup(int affinityGroupId, Integer[] serverIds) throws RuntimeException {
+ try {
+ affinityGroupManager.addServersToGroup(getSessionSubject(), affinityGroupId, serverIds);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void removeServersFromGroup(Integer[] serverIds) throws RuntimeException {
+ try {
+ affinityGroupManager.removeServersFromGroup(getSessionSubject(), serverIds);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void addAgentsToGroup(int affinityGroupId, Integer[] agentIds) throws RuntimeException {
+ try {
+ affinityGroupManager.addAgentsToGroup(getSessionSubject(), affinityGroupId, agentIds);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void removeAgentsFromGroup(Integer[] agentIds) throws RuntimeException {
+ try {
+ affinityGroupManager.removeAgentsFromGroup(getSessionSubject(), agentIds);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void updateServer(Server server) throws RuntimeException {
+ try {
+ topologyManager.updateServer(getSessionSubject(), server);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
+ public void updateAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException {
+ try {
+ affinityGroupManager.update(getSessionSubject(), affinityGroup);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ListServersUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ListServersUIBean.java
index ef4b65a..cc85b4d 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ListServersUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ListServersUIBean.java
@@ -31,13 +31,13 @@ import org.rhq.enterprise.gui.common.framework.PagedDataTableUIBean;
import org.rhq.enterprise.gui.common.paging.PageControlView;
import org.rhq.enterprise.gui.common.paging.PagedListDataModel;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
-import org.rhq.enterprise.server.cloud.CloudManagerLocal;
+import org.rhq.enterprise.server.cloud.TopologyManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class ListServersUIBean extends PagedDataTableUIBean {
public static final String MANAGED_BEAN_NAME = "ListServersUIBean";
- private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
+ private TopologyManagerLocal topologyManager = LookupUtil.getTopologyManager();
public ListServersUIBean() {
}
@@ -49,7 +49,7 @@ public class ListServersUIBean extends PagedDataTableUIBean {
if (ids.length > 0) {
try {
- cloudManager.deleteServers(subject, ids);
+ topologyManager.deleteServers(subject, ids);
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Removed [" + ids.length
+ "] servers from the cloud.");
@@ -70,7 +70,7 @@ public class ListServersUIBean extends PagedDataTableUIBean {
if (ids.length > 0) {
try {
- cloudManager.updateServerMode(EnterpriseFacesContextUtility.getSubject(), ids, mode);
+ topologyManager.updateServerMode(EnterpriseFacesContextUtility.getSubject(), ids, mode);
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Set [" + ids.length + "] servers to mode "
+ mode);
@@ -109,7 +109,7 @@ public class ListServersUIBean extends PagedDataTableUIBean {
public PageList<ServerWithAgentCountComposite> fetchPage(PageControl pc) {
Subject subject = EnterpriseFacesContextUtility.getSubject();
- PageList<ServerWithAgentCountComposite> results = cloudManager.getServerComposites(subject, pc);
+ PageList<ServerWithAgentCountComposite> results = topologyManager.getServerComposites(subject, pc);
return results;
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewAgentUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewAgentUIBean.java
index 4ccba78..be91add 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewAgentUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewAgentUIBean.java
@@ -32,7 +32,7 @@ import org.rhq.enterprise.gui.common.paging.PageControlView;
import org.rhq.enterprise.gui.common.paging.PagedListDataModel;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.PermissionException;
-import org.rhq.enterprise.server.cloud.CloudManagerLocal;
+import org.rhq.enterprise.server.cloud.TopologyManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -47,7 +47,7 @@ public class ViewAgentUIBean extends PagedDataTableUIBean {
public static final String MANAGED_BEAN_NAME = "ViewAgentUIBean";
private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
- private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
+ private TopologyManagerLocal topologyManager = LookupUtil.getTopologyManager();
private Agent agent;
@@ -81,7 +81,7 @@ public class ViewAgentUIBean extends PagedDataTableUIBean {
@Override
public PageList<FailoverListDetails> fetchPage(PageControl pc) {
int agentId = getAgent().getId();
- PageList<FailoverListDetails> pageList = cloudManager.getFailoverListDetailsByAgentId(
+ PageList<FailoverListDetails> pageList = topologyManager.getFailoverListDetailsByAgentId(
EnterpriseFacesContextUtility.getSubject(), agentId, pc);
return pageList;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewServerUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewServerUIBean.java
index 7811b57..0674cf5 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewServerUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/ha/ViewServerUIBean.java
@@ -33,7 +33,7 @@ import org.rhq.enterprise.gui.common.paging.PageControlView;
import org.rhq.enterprise.gui.common.paging.PagedListDataModel;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.PermissionException;
-import org.rhq.enterprise.server.cloud.CloudManagerLocal;
+import org.rhq.enterprise.server.cloud.TopologyManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -41,13 +41,13 @@ public class ViewServerUIBean extends PagedDataTableUIBean {
public static final String MANAGED_BEAN_NAME = "ViewServerUIBean";
private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
- private CloudManagerLocal cloudManager = LookupUtil.getCloudManager();
+ private TopologyManagerLocal topologyManager = LookupUtil.getTopologyManager();
private Server server;
public ViewServerUIBean() {
hasPermission();
int serverId = FacesContextUtility.getRequiredRequestParameter("serverId", Integer.class);
- server = cloudManager.getServerById(serverId);
+ server = topologyManager.getServerById(serverId);
}
@Override
@@ -69,7 +69,7 @@ public class ViewServerUIBean extends PagedDataTableUIBean {
public String save() {
try {
- cloudManager.updateServer(getSubject(), getServer());
+ topologyManager.updateServer(getSubject(), getServer());
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO,
"This server's public address and ports have been updated.");
} catch (Exception e) {
diff --git a/modules/enterprise/server/itests-2/src/test