modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
| 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
| 55 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
| 30 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertTemplateGWTServiceImpl.java
| 30 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
| 30 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AvailabilityGWTServiceImpl.java
| 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleGWTServiceImpl.java
| 136 ++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ClusterGWTServiceImpl.java
| 42 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ConfigurationGWTServiceImpl.java
| 161 +++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ContentGWTServiceImpl.java
| 35 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DashboardGWTServiceImpl.java
| 24 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/EventGWTServiceImpl.java
| 44 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/GroupAlertDefinitionGWTServiceImpl.java
| 30 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/LdapGWTServiceImpl.java
| 52 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java
| 124 ++++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java
| 53 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RemoteInstallGWTServiceImpl.java
| 43 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RepoGWTServiceImpl.java
| 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceBossGWTServiceImpl.java
| 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
| 125 ++++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
| 33 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceTypeGWTServiceImpl.java
| 31 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RoleGWTServiceImpl.java
| 42 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
| 37 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
| 89 ++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
| 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TagGWTServiceImpl.java
| 61 +--
27 files changed, 693 insertions(+), 654 deletions(-)
New commits:
commit 4bda12a4c8de28aa2f7f8bf30d2536b1a4b7d9e5
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Dec 21 15:07:34 2010 -0500
fix serialization issues across the board for all gwt service implementations
use the following coding style:
public ReturnType someMethod(Args...) throws RuntimeException {
try {
// method body
} catch (Throwable t) {
throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
index 80bc779..448debd 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AgentGWTServiceImpl.java
@@ -35,24 +35,24 @@ public class AgentGWTServiceImpl extends AbstractGWTServiceImpl
implements Agent
private AgentManagerLocal agentManager = LookupUtil.getAgentManager();
@Override
- public Agent getAgentForResource(int resourceId) {
+ public Agent getAgentForResource(int resourceId) throws RuntimeException {
try {
//security handled in AgentManagerBean. requires View_Resource.
return
SerialUtility.prepare(agentManager.getAgentByResourceId(getSessionSubject(), resourceId),
"AgentService.getAgentForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public Boolean pingAgentForResource(int resourceId) {
+ public Boolean pingAgentForResource(int resourceId) throws RuntimeException {
try {
//security handled in AgentManagerBean. requires View_Resource.
return
SerialUtility.prepare(agentManager.pingAgentByResourceId(getSessionSubject(),
resourceId),
"AgentService.pingAgentForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -60,8 +60,8 @@ public class AgentGWTServiceImpl extends AbstractGWTServiceImpl
implements Agent
// try {
// return
SerialUtility.prepare(availabilityManager.findAvailabilityForResource(getSessionSubject(),
// resourceId, pc),
"AvailabilityService.findAvailabilityForResource");
- // } catch (Exception e) {
- // throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ // } catch (Throwable t) {
+ // throw new RuntimeException(ThrowableUtil.getAllMessages(t));
// }
// }
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
index c704b49..3ed01c2 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
@@ -39,98 +39,99 @@ public class AlertDefinitionGWTServiceImpl extends
AbstractGWTServiceImpl implem
private AlertNotificationManagerLocal alertNotifManager =
LookupUtil.getAlertNotificationManager();
@Override
- public PageList<AlertDefinition>
findAlertDefinitionsByCriteria(AlertDefinitionCriteria criteria) {
+ public PageList<AlertDefinition>
findAlertDefinitionsByCriteria(AlertDefinitionCriteria criteria)
+ throws RuntimeException {
try {
PageList<AlertDefinition> results =
this.alertDefManager.findAlertDefinitionsByCriteria(
getSessionSubject(), criteria);
return SerialUtility.prepare(results,
"findAlertDefinitionsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int createAlertDefinition(AlertDefinition alertDefinition, Integer resourceId)
throws Exception {
+ public int createAlertDefinition(AlertDefinition alertDefinition, Integer resourceId)
throws RuntimeException {
try {
int results = alertDefManager.createAlertDefinition(getSessionSubject(),
alertDefinition, resourceId);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
public AlertDefinition updateAlertDefinition(int alertDefinitionId, AlertDefinition
alertDefinition,
- boolean updateInternals) throws Exception {
+ boolean updateInternals) throws RuntimeException {
try {
AlertDefinition results =
alertDefManager.updateAlertDefinition(getSessionSubject(), alertDefinitionId,
alertDefinition, updateInternals);
return SerialUtility.prepare(results, "updateAlertDefinition");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int enableAlertDefinitions(int[] alertDefinitionIds) throws Exception {
+ public int enableAlertDefinitions(int[] alertDefinitionIds) throws RuntimeException
{
try {
int results = alertDefManager.enableAlertDefinitions(getSessionSubject(),
alertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int disableAlertDefinitions(int[] alertDefinitionIds) throws Exception {
+ public int disableAlertDefinitions(int[] alertDefinitionIds) throws RuntimeException
{
try {
int results = alertDefManager.disableAlertDefinitions(getSessionSubject(),
alertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int removeAlertDefinitions(int[] alertDefinitionIds) throws Exception {
+ public int removeAlertDefinitions(int[] alertDefinitionIds) throws RuntimeException
{
try {
int results = alertDefManager.removeAlertDefinitions(getSessionSubject(),
alertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public String[] getAlertNotificationConfigurationPreview(AlertNotification[] notifs)
throws Exception {
+ public String[] getAlertNotificationConfigurationPreview(AlertNotification[] notifs)
throws RuntimeException {
try {
String[] results =
alertDefManager.getAlertNotificationConfigurationPreview(getSessionSubject(), notifs);
return SerialUtility.prepare(results,
"getAlertNotificationConfigurationPreview");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public String[] getAllAlertSenders() throws Exception {
+ public String[] getAllAlertSenders() throws RuntimeException {
try {
List<String> results = alertNotifManager.listAllAlertSenders();
if (results == null) {
return null;
}
return SerialUtility.prepare(results.toArray(new String[results.size()]),
"getAllAlertSenders");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public ConfigurationDefinition getConfigurationDefinitionForSender(String sender)
throws Exception {
+ public ConfigurationDefinition getConfigurationDefinitionForSender(String sender)
throws RuntimeException {
try {
ConfigurationDefinition results =
alertNotifManager.getConfigurationDefinitionForSender(sender);
return SerialUtility.prepare(results,
"getConfigurationDefinitionForSender");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
index 9f66d19..3072708 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
@@ -37,44 +37,44 @@ public class AlertGWTServiceImpl extends AbstractGWTServiceImpl
implements Alert
private AlertManagerLocal alertManager = LookupUtil.getAlertManager();
- public PageList<Alert> findAlertsByCriteria(AlertCriteria criteria) {
+ public PageList<Alert> findAlertsByCriteria(AlertCriteria criteria) throws
RuntimeException {
try {
return
SerialUtility.prepare(this.alertManager.findAlertsByCriteria(getSessionSubject(),
criteria),
"AlertService.findAlertsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int deleteAlerts(int[] alertIds) {
+ public int deleteAlerts(int[] alertIds) throws RuntimeException {
try {
return this.alertManager.deleteAlerts(getSessionSubject(), alertIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int deleteAlertsByContext(EntityContext context) {
+ public int deleteAlertsByContext(EntityContext context) throws RuntimeException {
try {
return this.alertManager.deleteAlertsByContext(getSessionSubject(),
context);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int acknowledgeAlerts(int[] alertIds) {
+ public int acknowledgeAlerts(int[] alertIds) throws RuntimeException {
try {
return this.alertManager.acknowledgeAlerts(getSessionSubject(), alertIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int acknowledgeAlertsByContext(EntityContext context) {
+ public int acknowledgeAlertsByContext(EntityContext context) throws RuntimeException
{
try {
return this.alertManager.acknowledgeAlertsByContext(getSessionSubject(),
context);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertTemplateGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertTemplateGWTServiceImpl.java
index 55a24e3..7179ffc 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertTemplateGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertTemplateGWTServiceImpl.java
@@ -31,55 +31,55 @@ public class AlertTemplateGWTServiceImpl extends
AbstractGWTServiceImpl implemen
private AlertTemplateManagerLocal alertTemplateManager =
LookupUtil.getAlertTemplateManager();
@Override
- public int createAlertTemplate(AlertDefinition alertDefinition, Integer
resourceTypeId) throws Exception {
+ public int createAlertTemplate(AlertDefinition alertDefinition, Integer
resourceTypeId) throws RuntimeException {
try {
int results = alertTemplateManager
.createAlertTemplate(getSessionSubject(), alertDefinition,
resourceTypeId);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
public AlertDefinition updateAlertTemplate(AlertDefinition alertDefinition, boolean
purgeInternals)
- throws Exception {
+ throws RuntimeException {
try {
AlertDefinition results =
alertTemplateManager.updateAlertTemplate(getSessionSubject(), alertDefinition,
purgeInternals);
return SerialUtility.prepare(results,
"AlertTemplateService.updateAlertTemplate");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public void enableAlertTemplates(Integer[] alertDefinitionIds) throws Exception {
+ public void enableAlertTemplates(Integer[] alertDefinitionIds) throws
RuntimeException {
try {
alertTemplateManager.enableAlertTemplates(getSessionSubject(),
alertDefinitionIds);
return;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public void disableAlertTemplates(Integer[] alertDefinitionIds) throws Exception {
+ public void disableAlertTemplates(Integer[] alertDefinitionIds) throws
RuntimeException {
try {
alertTemplateManager.disableAlertTemplates(getSessionSubject(),
alertDefinitionIds);
return;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public void removeAlertTemplates(Integer[] alertDefinitionIds) throws Exception {
+ public void removeAlertTemplates(Integer[] alertDefinitionIds) throws
RuntimeException {
try {
alertTemplateManager.removeAlertTemplates(getSessionSubject(),
alertDefinitionIds);
return;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
index 56a4857..a23bf27 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
@@ -37,49 +37,49 @@ public class AuthorizationGWTServiceImpl extends
AbstractGWTServiceImpl implemen
private AuthorizationManagerLocal authorizationManager =
LookupUtil.getAuthorizationManager();
- public Set<Permission> getExplicitResourcePermissions(int resourceId) {
+ public Set<Permission> getExplicitResourcePermissions(int resourceId) throws
RuntimeException {
try {
return SerialUtility.prepare(new
HashSet<Permission>(authorizationManager.getExplicitResourcePermissions(
getSessionSubject(), resourceId)),
"AuthorizationManager.getExplicitResourcePermissions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<Permission> getImplicitResourcePermissions(int resourceId) {
+ public Set<Permission> getImplicitResourcePermissions(int resourceId) throws
RuntimeException {
try {
return SerialUtility.prepare(new
HashSet<Permission>(authorizationManager.getImplicitResourcePermissions(
getSessionSubject(), resourceId)),
"AuthorizationManager.getImplicitResourcePermissions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<Permission> getExplicitGroupPermissions(int groupId) {
+ public Set<Permission> getExplicitGroupPermissions(int groupId) throws
RuntimeException {
try {
return SerialUtility.prepare(new
HashSet<Permission>(authorizationManager.getExplicitGroupPermissions(
getSessionSubject(), groupId)),
"AuthorizationManager.getExplicitGroupPermissions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<Permission> getImplicitGroupPermissions(int groupId) {
+ public Set<Permission> getImplicitGroupPermissions(int groupId) throws
RuntimeException {
try {
return SerialUtility.prepare(new
HashSet<Permission>(authorizationManager.getImplicitGroupPermissions(
getSessionSubject(), groupId)),
"AuthorizationManager.getImplicitGroupPermissions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<Permission> getExplicitGlobalPermissions() {
+ public Set<Permission> getExplicitGlobalPermissions() throws RuntimeException
{
try {
return SerialUtility.prepare(new
HashSet<Permission>(authorizationManager
.getExplicitGlobalPermissions(getSessionSubject())),
"AuthorizationManager.getExplicitGlobalPermissions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AvailabilityGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AvailabilityGWTServiceImpl.java
index 4b636f0..93e16c9 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AvailabilityGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AvailabilityGWTServiceImpl.java
@@ -36,12 +36,12 @@ public class AvailabilityGWTServiceImpl extends AbstractGWTServiceImpl
implement
private AvailabilityManagerLocal availabilityManager =
LookupUtil.getAvailabilityManager();
- public PageList<Availability> findAvailabilityForResource(int resourceId,
PageControl pc) {
+ public PageList<Availability> findAvailabilityForResource(int resourceId,
PageControl pc) throws RuntimeException {
try {
return
SerialUtility.prepare(availabilityManager.findAvailabilityForResource(getSessionSubject(),
resourceId, pc),
"AvailabilityService.findAvailabilityForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleGWTServiceImpl.java
index 103fcac..4049454 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleGWTServiceImpl.java
@@ -48,218 +48,222 @@ public class BundleGWTServiceImpl extends AbstractGWTServiceImpl
implements Bund
private BundleManagerLocal bundleManager = LookupUtil.getBundleManager();
- public BundleVersion createBundleVersionViaURL(String url) throws Exception {
+ public BundleVersion createBundleVersionViaURL(String url) throws RuntimeException {
try {
BundleVersion results =
bundleManager.createBundleVersionViaURL(getSessionSubject(), url);
return SerialUtility.prepare(results,
"createBundleVersionViaURL");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public BundleVersion createBundleVersionViaRecipe(String recipe) throws Exception {
+ public BundleVersion createBundleVersionViaRecipe(String recipe) throws
RuntimeException {
try {
BundleVersion results =
bundleManager.createBundleVersionViaRecipe(getSessionSubject(), recipe);
return SerialUtility.prepare(results,
"createBundleVersionViaRecipe");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public BundleDeployment createBundleDeployment(int bundleVersionId, int
bundleDestinationId, String description,
Configuration configuration, boolean enforcePolicy, int enforcementInterval,
boolean pinToBundle)
- throws Exception {
+ throws RuntimeException {
try {
BundleDeployment result =
bundleManager.createBundleDeployment(getSessionSubject(), bundleVersionId,
bundleDestinationId, description, configuration);
return SerialUtility.prepare(result, "createBundleDeployment");
- } catch (Exception e) {
- throw new Exception(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public BundleDestination createBundleDestination(int bundleId, String name, String
description, String deployDir,
- int groupId) throws Exception {
+ int groupId) throws RuntimeException {
try {
BundleDestination result =
bundleManager.createBundleDestination(getSessionSubject(), bundleId, name,
description, deployDir, groupId);
return SerialUtility.prepare(result, "createBundleDestination");
- } catch (Exception e) {
- throw new Exception(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public BundleVersion createBundleVersion(int bundleId, String name, String version,
String recipe) throws Exception {
+ public BundleVersion createBundleVersion(int bundleId, String name, String version,
String recipe)
+ throws RuntimeException {
try {
BundleVersion results =
bundleManager.createBundleVersion(getSessionSubject(), bundleId, name, null,
version, recipe);
return SerialUtility.prepare(results, "createBundleVersion");
- } catch (Exception e) {
- throw new Exception(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteBundles(int[] bundleIds) throws Exception {
+ public void deleteBundles(int[] bundleIds) throws RuntimeException {
try {
bundleManager.deleteBundles(getSessionSubject(), bundleIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteBundle(int bundleId) throws Exception {
+ public void deleteBundle(int bundleId) throws RuntimeException {
try {
bundleManager.deleteBundle(getSessionSubject(), bundleId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteBundleDeployment(int bundleDeploymentId) throws Exception {
+ public void deleteBundleDeployment(int bundleDeploymentId) throws RuntimeException {
try {
bundleManager.deleteBundleDeployment(getSessionSubject(),
bundleDeploymentId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteBundleDestination(int bundleDestinationId) throws Exception {
+ public void deleteBundleDestination(int bundleDestinationId) throws RuntimeException
{
try {
bundleManager.deleteBundleDestination(getSessionSubject(),
bundleDestinationId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteBundleVersion(int bundleVersionId, boolean deleteBundleIfEmpty)
throws Exception {
+ public void deleteBundleVersion(int bundleVersionId, boolean deleteBundleIfEmpty)
throws RuntimeException {
try {
bundleManager.deleteBundleVersion(getSessionSubject(), bundleVersionId,
deleteBundleIfEmpty);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public ArrayList<BundleType> getAllBundleTypes() throws Exception {
+ public ArrayList<BundleType> getAllBundleTypes() throws RuntimeException {
try {
ArrayList<BundleType> bundleTypes = new ArrayList<BundleType>();
bundleTypes.addAll(bundleManager.getAllBundleTypes(getSessionSubject()));
return SerialUtility.prepare(bundleTypes, "getAllBundleTypes");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public HashMap<String, Boolean> getAllBundleVersionFilenames(int
bundleVersionId) throws Exception {
+ public HashMap<String, Boolean> getAllBundleVersionFilenames(int
bundleVersionId) throws RuntimeException {
HashMap<String, Boolean> results = new HashMap<String, Boolean>();
try {
results.putAll(bundleManager.getAllBundleVersionFilenames(getSessionSubject(),
bundleVersionId));
return SerialUtility.prepare(results,
"getAllBundleVersionFilenames");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String getBundleDeploymentName(int bundleDestinationId, int bundleVersionId,
int prevDeploymentId) {
+ public String getBundleDeploymentName(int bundleDestinationId, int bundleVersionId,
int prevDeploymentId)
+ throws RuntimeException {
String result;
try {
result = bundleManager.getBundleDeploymentName(getSessionSubject(),
bundleDestinationId, bundleVersionId,
prevDeploymentId);
return SerialUtility.prepare(result, "getBundleDeploymentName");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public BundleDeployment scheduleBundleDeployment(int bundleDeploymentId, boolean
isCleanDeployment)
- throws Exception {
+ throws RuntimeException {
try {
BundleDeployment result =
bundleManager.scheduleBundleDeployment(getSessionSubject(), bundleDeploymentId,
isCleanDeployment);
return SerialUtility.prepare(result, "scheduleBundleDeployment");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public BundleDeployment scheduleRevertBundleDeployment(int bundleDeploymentId, String
deploymentDescription,
- boolean isCleanDeployment) throws Exception {
+ boolean isCleanDeployment) throws RuntimeException {
try {
BundleDeployment result =
bundleManager.scheduleRevertBundleDeployment(getSessionSubject(),
bundleDeploymentId, deploymentDescription, isCleanDeployment);
return SerialUtility.prepare(result,
"scheduleRevertBundleDeployment");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<Bundle> findBundlesByCriteria(BundleCriteria criteria) throws
Exception {
+ public PageList<Bundle> findBundlesByCriteria(BundleCriteria criteria) throws
RuntimeException {
try {
PageList<Bundle> results =
bundleManager.findBundlesByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(results, "findBundlesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<BundleDeployment>
findBundleDeploymentsByCriteria(BundleDeploymentCriteria criteria) {
+ public PageList<BundleDeployment>
findBundleDeploymentsByCriteria(BundleDeploymentCriteria criteria)
+ throws RuntimeException {
try {
PageList<BundleDeployment> result =
bundleManager.findBundleDeploymentsByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(result,
"BundleService.findBundleDeploymentsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<BundleDestination>
findBundleDestinationsByCriteria(BundleDestinationCriteria criteria) {
+ public PageList<BundleDestination>
findBundleDestinationsByCriteria(BundleDestinationCriteria criteria)
+ throws RuntimeException {
try {
PageList<BundleDestination> result =
bundleManager.findBundleDestinationsByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(result,
"BundleService.findBundleDestinationsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<BundleFile> findBundleFilesByCriteria(BundleFileCriteria
criteria) {
+ public PageList<BundleFile> findBundleFilesByCriteria(BundleFileCriteria
criteria) throws RuntimeException {
try {
PageList<BundleFile> result =
bundleManager.findBundleFilesByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(result,
"BundleService.findBundleFilesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<BundleResourceDeployment>
findBundleResourceDeploymentsByCriteria(
- BundleResourceDeploymentCriteria criteria) {
+ BundleResourceDeploymentCriteria criteria) throws RuntimeException {
try {
PageList<BundleResourceDeployment> result =
bundleManager.findBundleResourceDeploymentsByCriteria(
getSessionSubject(), criteria);
return SerialUtility.prepare(result,
"BundleService.findBundleResourceDeploymentsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<BundleVersion>
findBundleVersionsByCriteria(BundleVersionCriteria criteria) throws Exception {
+ public PageList<BundleVersion>
findBundleVersionsByCriteria(BundleVersionCriteria criteria) throws RuntimeException {
try {
PageList<BundleVersion> results =
bundleManager.findBundleVersionsByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(results,
"findBundleVersionsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<BundleWithLatestVersionComposite>
findBundlesWithLatestVersionCompositesByCriteria(
- BundleCriteria criteria) throws Exception {
+ BundleCriteria criteria) throws RuntimeException {
try {
PageList<BundleWithLatestVersionComposite> results;
results =
bundleManager.findBundlesWithLatestVersionCompositesByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(results,
"findBundlesWithLatestVersionCompositesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ClusterGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ClusterGWTServiceImpl.java
index 211735d..ad81c84 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ClusterGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ClusterGWTServiceImpl.java
@@ -28,6 +28,7 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.group.ClusterKey;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.resource.group.composite.ClusterFlyweight;
+import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.enterprise.gui.coregui.client.gwt.ClusterGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.resource.cluster.ClusterManagerLocal;
@@ -42,24 +43,41 @@ public class ClusterGWTServiceImpl extends AbstractGWTServiceImpl
implements Clu
private ClusterManagerLocal clusterManager = LookupUtil.getClusterManager();
- public ResourceGroup createAutoClusterBackingGroup(ClusterKey clusterKey, boolean
addResources) {
- return
SerialUtility.prepare(clusterManager.createAutoClusterBackingGroup(getSessionSubject(),
clusterKey,
- addResources),
"ClusterGWTServiceImpl.createAutoClusterBackingGroup");
+ public ResourceGroup createAutoClusterBackingGroup(ClusterKey clusterKey, boolean
addResources)
+ throws RuntimeException {
+ try {
+ return
SerialUtility.prepare(clusterManager.createAutoClusterBackingGroup(getSessionSubject(),
clusterKey,
+ addResources),
"ClusterGWTServiceImpl.createAutoClusterBackingGroup");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
- public ResourceGroup getAutoClusterBackingGroup(ClusterKey clusterKey) {
- return
SerialUtility.prepare(clusterManager.getAutoClusterBackingGroup(getSessionSubject(),
clusterKey),
- "ClusterGWTServiceImpl.getAutoClusterBackingGroup");
+ public ResourceGroup getAutoClusterBackingGroup(ClusterKey clusterKey) throws
RuntimeException {
+ try {
+ return
SerialUtility.prepare(clusterManager.getAutoClusterBackingGroup(getSessionSubject(),
clusterKey),
+ "ClusterGWTServiceImpl.getAutoClusterBackingGroup");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
- public List<Resource> getAutoClusterResources(ClusterKey clusterKey) {
- return
SerialUtility.prepare(clusterManager.getAutoClusterResources(getSessionSubject(),
clusterKey),
- "ClusterGWTServiceImpl.getAutoClusterResources");
+ public List<Resource> getAutoClusterResources(ClusterKey clusterKey) throws
RuntimeException {
+ try {
+ return
SerialUtility.prepare(clusterManager.getAutoClusterResources(getSessionSubject(),
clusterKey),
+ "ClusterGWTServiceImpl.getAutoClusterResources");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
- public ClusterFlyweight getClusterTree(int groupId) {
- return SerialUtility.prepare(clusterManager.getClusterTree(getSessionSubject(),
groupId),
- "ClusterGWTServiceImpl.getClusterTree");
+ public ClusterFlyweight getClusterTree(int groupId) throws RuntimeException {
+ try {
+ return
SerialUtility.prepare(clusterManager.getClusterTree(getSessionSubject(), groupId),
+ "ClusterGWTServiceImpl.getClusterTree");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ConfigurationGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ConfigurationGWTServiceImpl.java
index 72515a4..935a3dd 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ConfigurationGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ConfigurationGWTServiceImpl.java
@@ -47,122 +47,125 @@ public class ConfigurationGWTServiceImpl extends
AbstractGWTServiceImpl implemen
private ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
private ResourceGroupManagerLocal groupManager =
LookupUtil.getResourceGroupManager();
- public Configuration getPluginConfiguration(int resourceId) {
+ public Configuration getPluginConfiguration(int resourceId) throws RuntimeException
{
try {
Configuration configuration =
configurationManager.getPluginConfiguration(getSessionSubject(), resourceId);
return SerialUtility.prepare(configuration,
"PluginConfiguration");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public ConfigurationDefinition getPluginConfigurationDefinition(int resourceTypeId)
{
+ public ConfigurationDefinition getPluginConfigurationDefinition(int resourceTypeId)
throws RuntimeException {
try {
ConfigurationDefinition definition =
configurationManager.getPluginConfigurationDefinitionForResourceType(
getSessionSubject(), resourceTypeId);
return SerialUtility.prepare(definition, "PluginDefinition");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Configuration getResourceConfiguration(int resourceId) {
+ public Configuration getResourceConfiguration(int resourceId) throws RuntimeException
{
try {
Configuration configuration = configurationManager
.getResourceConfiguration(getSessionSubject(), resourceId);
return SerialUtility.prepare(configuration,
"ResourceConfiguration");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public ConfigurationDefinition getResourceConfigurationDefinition(int resourceTypeId)
{
+ public ConfigurationDefinition getResourceConfigurationDefinition(int resourceTypeId)
throws RuntimeException {
try {
ConfigurationDefinition definition = configurationManager
.getResourceConfigurationDefinitionWithTemplatesForResourceType(getSessionSubject(),
resourceTypeId);
return SerialUtility.prepare(definition, "ResourceDefinition");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<ResourceConfigurationUpdate>
findResourceConfigurationUpdates(Integer resourceId, Long beginDate,
- Long endDate, boolean suppressOldest, PageControl pc) {
+ Long endDate, boolean suppressOldest, PageControl pc) throws RuntimeException {
try {
PageList<ResourceConfigurationUpdate> result =
configurationManager.findResourceConfigurationUpdates(
getSessionSubject(), resourceId, beginDate, endDate, suppressOldest,
pc);
return SerialUtility.prepare(result,
"ConfigurationService.findResourceConfigurationUpdates");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public ResourceConfigurationUpdate updateResourceConfiguration(int resourceId,
Configuration configuration) {
+ public ResourceConfigurationUpdate updateResourceConfiguration(int resourceId,
Configuration configuration)
+ throws RuntimeException {
try {
ResourceConfigurationUpdate update =
configurationManager.updateResourceConfiguration(getSessionSubject(),
resourceId, configuration);
return SerialUtility.prepare(update,
"ConfigurationService.updateResourceConfiguration");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PluginConfigurationUpdate updatePluginConfiguration(int resourceId,
Configuration configuration) {
+ public PluginConfigurationUpdate updatePluginConfiguration(int resourceId,
Configuration configuration)
+ throws RuntimeException {
try {
PluginConfigurationUpdate update =
configurationManager.updatePluginConfiguration(getSessionSubject(),
resourceId, configuration);
return SerialUtility.prepare(update,
"ConfigurationService.updatePluginConfiguration");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<ResourceConfigurationUpdate>
findResourceConfigurationUpdatesByCriteria(
- ResourceConfigurationUpdateCriteria criteria) {
+ ResourceConfigurationUpdateCriteria criteria) throws RuntimeException {
try {
PageList<ResourceConfigurationUpdate> updates = configurationManager
.findResourceConfigurationUpdatesByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(updates,
"ConfigurationService.findResourceConfigurationUpdatesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<PluginConfigurationUpdate>
findPluginConfigurationUpdatesByCriteria(
- PluginConfigurationUpdateCriteria criteria) {
+ PluginConfigurationUpdateCriteria criteria) throws RuntimeException {
try {
PageList<PluginConfigurationUpdate> updates = configurationManager
.findPluginConfigurationUpdatesByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(updates,
"ConfigurationService.findPluginConfigurationUpdatesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<GroupResourceConfigurationUpdate>
findGroupResourceConfigurationUpdatesByCriteria(
- GroupResourceConfigurationUpdateCriteria criteria) {
+ GroupResourceConfigurationUpdateCriteria criteria) throws RuntimeException {
try {
PageList<GroupResourceConfigurationUpdate> updates =
configurationManager
.findGroupResourceConfigurationUpdatesByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(updates,
"ConfigurationService.findGroupResourceConfigurationUpdatesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<GroupPluginConfigurationUpdate>
findGroupPluginConfigurationUpdatesByCriteria(
- GroupPluginConfigurationUpdateCriteria criteria) {
+ GroupPluginConfigurationUpdateCriteria criteria) throws RuntimeException {
try {
PageList<GroupPluginConfigurationUpdate> updates =
configurationManager
.findGroupPluginConfigurationUpdatesByCriteria(getSessionSubject(),
criteria);
return SerialUtility.prepare(updates,
"ConfigurationService.findGroupPluginConfigurationUpdatesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<DisambiguationReport<ResourceConfigurationComposite>>
findResourceConfigurationsForGroup(int groupId) {
+ public List<DisambiguationReport<ResourceConfigurationComposite>>
findResourceConfigurationsForGroup(int groupId)
+ throws RuntimeException {
try {
ResourceGroup group = this.groupManager.getResourceGroup(getSessionSubject(),
groupId);
Map<Integer, Configuration> configurations = this.configurationManager
@@ -176,12 +179,13 @@ public class ConfigurationGWTServiceImpl extends
AbstractGWTServiceImpl implemen
return SerialUtility.prepare(disambiguatedConfigurationComposites,
"ConfigurationService.findResourceConfigurationsForGroup");
- } catch (RuntimeException e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<DisambiguationReport<ResourceConfigurationComposite>>
findPluginConfigurationsForGroup(int groupId) {
+ public List<DisambiguationReport<ResourceConfigurationComposite>>
findPluginConfigurationsForGroup(int groupId)
+ throws RuntimeException {
try {
Map<Integer, Configuration> configurations = this.configurationManager
.getPluginConfigurationsForCompatibleGroup(getSessionSubject(),
groupId);
@@ -194,13 +198,13 @@ public class ConfigurationGWTServiceImpl extends
AbstractGWTServiceImpl implemen
return SerialUtility.prepare(disambiguatedConfigurationComposites,
"ConfigurationService.findPluginConfigurationsForGroup");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public List<DisambiguationReport<ResourceConfigurationComposite>>
findPluginConfigurationsForGroupUpdate(
- int groupUpdateId) {
+ int groupUpdateId) throws RuntimeException {
try {
Map<Integer, Configuration> configurations = this.configurationManager
.getPluginConfigurationMapForGroupUpdate(groupUpdateId);
@@ -213,76 +217,81 @@ public class ConfigurationGWTServiceImpl extends
AbstractGWTServiceImpl implemen
return SerialUtility.prepare(disambiguatedConfigurationComposites,
"ConfigurationService.findPluginConfigurationsForGroupUpdate");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void updateResourceConfigurationsForGroup(int groupId,
- List<ResourceConfigurationComposite> resourceConfigurations) {
+ List<ResourceConfigurationComposite> resourceConfigurations) throws
RuntimeException {
try {
Map<Integer, Configuration> configurations =
convertToMap(resourceConfigurations);
this.configurationManager.scheduleGroupResourceConfigurationUpdate(getSessionSubject(),
groupId,
configurations);
- } catch (RuntimeException e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void updatePluginConfigurationsForGroup(int groupId,
- List<ResourceConfigurationComposite> pluginConfigurations) {
+ List<ResourceConfigurationComposite> pluginConfigurations) throws
RuntimeException {
try {
Map<Integer, Configuration> configurations =
convertToMap(pluginConfigurations);
this.configurationManager.scheduleGroupPluginConfigurationUpdate(getSessionSubject(),
groupId,
configurations);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteGroupPluginConfigurationUpdate(Integer groupId, Integer[]
groupPluginConfigUpdateIds) {
+ public void deleteGroupPluginConfigurationUpdate(Integer groupId, Integer[]
groupPluginConfigUpdateIds)
+ throws RuntimeException {
try {
this.configurationManager.deleteGroupPluginConfigurationUpdates(getSessionSubject(),
groupId,
groupPluginConfigUpdateIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteGroupResourceConfigurationUpdate(Integer groupId, Integer[]
groupResourceConfigUpdateIds) {
+ public void deleteGroupResourceConfigurationUpdate(Integer groupId, Integer[]
groupResourceConfigUpdateIds)
+ throws RuntimeException {
try {
this.configurationManager.deleteGroupResourceConfigurationUpdates(getSessionSubject(),
groupId,
groupResourceConfigUpdateIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- /*
- // Dummy method for gwt compiler
- public RawConfiguration dummy(RawConfiguration config) {
- Log.info(config.getPath());
- return new RawConfiguration();
- }
- */
-
- private List<ResourceConfigurationComposite>
convertToCompositesList(Map<Integer, Configuration> configurations) {
- List<ResourceConfigurationComposite> configurationComposites = new
ArrayList<ResourceConfigurationComposite>(
- configurations.size());
- for (Integer resourceId : configurations.keySet()) {
- Configuration configuration = configurations.get(resourceId);
- ResourceConfigurationComposite configurationComposite = new
ResourceConfigurationComposite(resourceId,
- configuration);
- configurationComposites.add(configurationComposite);
+ private List<ResourceConfigurationComposite>
convertToCompositesList(Map<Integer, Configuration> configurations)
+ throws RuntimeException {
+ try {
+ List<ResourceConfigurationComposite> configurationComposites = new
ArrayList<ResourceConfigurationComposite>(
+ configurations.size());
+ for (Integer resourceId : configurations.keySet()) {
+ Configuration configuration = configurations.get(resourceId);
+ ResourceConfigurationComposite configurationComposite = new
ResourceConfigurationComposite(resourceId,
+ configuration);
+ configurationComposites.add(configurationComposite);
+ }
+ return configurationComposites;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
- return configurationComposites;
}
- private Map<Integer, Configuration>
convertToMap(List<ResourceConfigurationComposite> resourceConfigurations) {
- Map<Integer, Configuration> configurations = new HashMap<Integer,
Configuration>(resourceConfigurations.size());
- for (ResourceConfigurationComposite resourceConfiguration :
resourceConfigurations) {
- configurations.put(resourceConfiguration.getResourceId(),
resourceConfiguration.getConfiguration());
+ private Map<Integer, Configuration>
convertToMap(List<ResourceConfigurationComposite> resourceConfigurations)
+ throws RuntimeException {
+ try {
+ Map<Integer, Configuration> configurations = new HashMap<Integer,
Configuration>(resourceConfigurations
+ .size());
+ for (ResourceConfigurationComposite resourceConfiguration :
resourceConfigurations) {
+ configurations.put(resourceConfiguration.getResourceId(),
resourceConfiguration.getConfiguration());
+ }
+ return configurations;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
- return configurations;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ContentGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ContentGWTServiceImpl.java
index cc9c288..3df2f0b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ContentGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ContentGWTServiceImpl.java
@@ -33,7 +33,6 @@ import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.enterprise.gui.coregui.client.gwt.ContentGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.content.ContentManagerLocal;
-import org.rhq.enterprise.server.content.ContentUIManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -44,50 +43,52 @@ public class ContentGWTServiceImpl extends AbstractGWTServiceImpl
implements Con
private static final long serialVersionUID = 1L;
private ContentManagerLocal contentManager = LookupUtil.getContentManager();
- private ContentUIManagerLocal contentUiManager = LookupUtil.getContentUIManager();
- public void deletePackageVersion(int packageVersionId) {
+ //private ContentUIManagerLocal contentUiManager = LookupUtil.getContentUIManager();
+
+ public void deletePackageVersion(int packageVersionId) throws RuntimeException {
try {
contentManager.deletePackageVersion(getSessionSubject(), packageVersionId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<PackageVersion>
findPackageVersionsByCriteria(PackageVersionCriteria criteria) {
+ public PageList<PackageVersion>
findPackageVersionsByCriteria(PackageVersionCriteria criteria)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(contentManager.findPackageVersionsByCriteria(getSessionSubject(),
criteria),
"ContentService.findPackageVersionsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- // public PageList<InstalledPackageHistory>
getInstalledPackageHistoryForResource(int resourceId, int count) {
+ // public PageList<InstalledPackageHistory>
getInstalledPackageHistoryForResource(int resourceId, int count) throws RuntimeException
{
// try {
// PageControl pc = new PageControl(0, count);
// return
SerialUtility.prepare(contentUiManager.getInstalledPackageHistoryForResource(resourceId,
pc),
// "ContentService.getInstalledPackageHistoryForResource");
- // } catch (Exception e) {
- // throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ // } catch (Throwable t) {
+ // throw new RuntimeException(ThrowableUtil.getAllMessages(t));
// }
// }
- public List<Architecture> getArchitectures() {
+ public List<Architecture> getArchitectures() throws RuntimeException {
try {
return
SerialUtility.prepare(contentManager.findArchitectures(getSessionSubject()),
"ContentService.getArchitectures");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PackageType getResourceCreationPackageType(int resourceTypeId) {
+ public PackageType getResourceCreationPackageType(int resourceTypeId) throws
RuntimeException {
try {
return
SerialUtility.prepare(contentManager.getResourceCreationPackageType(resourceTypeId),
"ContentService.getResourceCreationPackageType");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DashboardGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DashboardGWTServiceImpl.java
index 742c68e..c45ca10 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DashboardGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DashboardGWTServiceImpl.java
@@ -40,38 +40,38 @@ public class DashboardGWTServiceImpl extends AbstractGWTServiceImpl
implements D
private DashboardManagerLocal dashboardManager =
LookupUtil.getDashboardManagerLocal();
- public List<Dashboard> findDashboardsForSubject() {
+ public List<Dashboard> findDashboardsForSubject() throws RuntimeException {
try {
return
SerialUtility.prepare(dashboardManager.findDashboardsForSubject(getSessionSubject()),
"DashboardManager.findDashboardsForSubject");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<Dashboard> findSharedDashboards() {
+ public List<Dashboard> findSharedDashboards() throws RuntimeException {
try {
return
SerialUtility.prepare(dashboardManager.findSharedDashboards(getSessionSubject()),
"DashboardManager.findSharedDashboards");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Dashboard storeDashboard(Dashboard dashboard) {
+ public Dashboard storeDashboard(Dashboard dashboard) throws RuntimeException {
try {
return
SerialUtility.prepare(dashboardManager.storeDashboard(getSessionSubject(), dashboard),
"DashboardManager.storeDashboard");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void removeDashboard(int dashboardId) {
+ public void removeDashboard(int dashboardId) throws RuntimeException {
try {
dashboardManager.removeDashboard(getSessionSubject(), dashboardId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/EventGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/EventGWTServiceImpl.java
index 6369c90..9654a9d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/EventGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/EventGWTServiceImpl.java
@@ -46,32 +46,34 @@ public class EventGWTServiceImpl extends AbstractGWTServiceImpl
implements Event
private EventManagerLocal eventManager = LookupUtil.getEventManager();
- public EventSeverity[] getSeverityBuckets(int resourceId, long begin, long end, int
numBuckets) {
+ public EventSeverity[] getSeverityBuckets(int resourceId, long begin, long end, int
numBuckets)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(eventManager.getSeverityBuckets(getSessionSubject(), resourceId,
begin, end,
numBuckets), "EventService.getSeverityBuckets");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public EventSeverity[] getSeverityBucketsForAutoGroup(int parentResourceId, int
resourceTypeId, long begin,
- long end, int numBuckets) {
+ long end, int numBuckets) throws RuntimeException {
try {
return
SerialUtility.prepare(eventManager.getSeverityBucketsForAutoGroup(getSessionSubject(),
parentResourceId, resourceTypeId, begin, end, numBuckets),
"EventService.getSeverityBucketsForAutoGroup");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public EventSeverity[] getSeverityBucketsForCompGroup(int resourceGroupId, long
begin, long end, int numBuckets) {
+ public EventSeverity[] getSeverityBucketsForCompGroup(int resourceGroupId, long
begin, long end, int numBuckets)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(eventManager.getSeverityBucketsForCompGroup(getSessionSubject(),
resourceGroupId, begin, end, numBuckets),
"EventService.getSeverityBucketsForCompGroup");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -84,37 +86,37 @@ public class EventGWTServiceImpl extends AbstractGWTServiceImpl
implements Event
// }
// }
- public PageList<Event> findEventsByCriteria(EventCriteria criteria) {
+ public PageList<Event> findEventsByCriteria(EventCriteria criteria) throws
RuntimeException {
try {
return
SerialUtility.prepare(eventManager.findEventsByCriteria(getSessionSubject(), criteria),
"EventService.findEventsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<EventComposite> findEventCompositesByCriteria(EventCriteria
criteria) {
+ public PageList<EventComposite> findEventCompositesByCriteria(EventCriteria
criteria) throws RuntimeException {
try {
return
SerialUtility.prepare(eventManager.findEventCompositesByCriteria(getSessionSubject(),
criteria),
"EventService.findEventsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int deleteEventsForContext(EntityContext context, List<Integer>
eventIds) {
+ public int deleteEventsForContext(EntityContext context, List<Integer>
eventIds) throws RuntimeException {
try {
return eventManager.deleteEventsForContext(getSessionSubject(), context,
eventIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int purgeEventsForContext(EntityContext context) {
+ public int purgeEventsForContext(EntityContext context) throws RuntimeException {
try {
return eventManager.purgeEventsForContext(getSessionSubject(), context);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/GroupAlertDefinitionGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/GroupAlertDefinitionGWTServiceImpl.java
index 7b65ee2..38a076b 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/GroupAlertDefinitionGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/GroupAlertDefinitionGWTServiceImpl.java
@@ -33,58 +33,58 @@ public class GroupAlertDefinitionGWTServiceImpl extends
AbstractGWTServiceImpl i
@Override
public int createGroupAlertDefinitions(AlertDefinition groupAlertDefinition, Integer
resourceGroupId)
- throws Exception {
+ throws RuntimeException {
try {
int results =
groupAlertDefManager.createGroupAlertDefinitions(getSessionSubject(),
groupAlertDefinition,
resourceGroupId);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
public AlertDefinition updateGroupAlertDefinitions(AlertDefinition
groupAlertDefinition, boolean purgeInternals)
- throws Exception {
+ throws RuntimeException {
try {
AlertDefinition results =
groupAlertDefManager.updateGroupAlertDefinitions(getSessionSubject(),
groupAlertDefinition, purgeInternals);
return SerialUtility.prepare(results,
"updateGroupAlertDefinitions");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int enableGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
Exception {
+ public int enableGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
RuntimeException {
try {
int results = groupAlertDefManager
.enableGroupAlertDefinitions(getSessionSubject(),
groupAlertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int disableGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
Exception {
+ public int disableGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
RuntimeException {
try {
int results =
groupAlertDefManager.disableGroupAlertDefinitions(getSessionSubject(),
groupAlertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public int removeGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
Exception {
+ public int removeGroupAlertDefinitions(Integer[] groupAlertDefinitionIds) throws
RuntimeException {
try {
int results = groupAlertDefManager
.removeGroupAlertDefinitions(getSessionSubject(),
groupAlertDefinitionIds);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/LdapGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/LdapGWTServiceImpl.java
index 5969954..6e3363e 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/LdapGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/LdapGWTServiceImpl.java
@@ -19,7 +19,6 @@
package org.rhq.enterprise.gui.coregui.server.gwt;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -57,11 +56,12 @@ public class LdapGWTServiceImpl extends AbstractGWTServiceImpl
implements LdapGW
private final Log log = LogFactory.getLog(LdapGWTServiceImpl.class);
@Override
- public Set<Map<String, String>> findAvailableGroups() {
- //add permissions check
- Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
- Boolean accessGranted = globalPermissions.contains(Permission.MANAGE_SECURITY);
+ public Set<Map<String, String>> findAvailableGroups() throws
RuntimeException {
try {
+ //add permissions check
+ Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
+ Boolean accessGranted =
globalPermissions.contains(Permission.MANAGE_SECURITY);
+
Set<Map<String, String>> results = null;
if (accessGranted) {
results = ldapManager.findAvailableGroups();
@@ -77,11 +77,12 @@ public class LdapGWTServiceImpl extends AbstractGWTServiceImpl
implements LdapGW
}
}
- public void setLdapGroupsForRole(int roleId, List<String> groupIds) {
- //add permissions check
- Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
- Boolean accessGranted = globalPermissions.contains(Permission.MANAGE_SECURITY);
+ public void setLdapGroupsForRole(int roleId, List<String> groupIds) throws
RuntimeException {
try {
+ //add permissions check
+ Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
+ Boolean accessGranted =
globalPermissions.contains(Permission.MANAGE_SECURITY);
+
if (accessGranted) {
//clean out existing roles as this defines the new list of roles
PageList<LdapGroup> existing =
ldapManager.findLdapGroupsByRole(roleId, PageControl
@@ -122,13 +123,12 @@ public class LdapGWTServiceImpl extends AbstractGWTServiceImpl
implements LdapGW
}
}
- @Override
- public PageList<LdapGroup> findLdapGroupsAssignedToRole(int roleId) {
- //add permissions check
- Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
- Boolean accessGranted = globalPermissions.contains(Permission.MANAGE_SECURITY);
-
+ public PageList<LdapGroup> findLdapGroupsAssignedToRole(int roleId) throws
RuntimeException {
try {
+ //add permissions check
+ Set<Permission> globalPermissions =
authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
+ Boolean accessGranted =
globalPermissions.contains(Permission.MANAGE_SECURITY);
+
PageList<LdapGroup> allAssignedLdapGroups = null;
if (accessGranted) {
allAssignedLdapGroups = ldapManager.findLdapGroupsByRole(roleId,
PageControl.getUnlimitedInstance());
@@ -144,32 +144,26 @@ public class LdapGWTServiceImpl extends AbstractGWTServiceImpl
implements LdapGW
}
}
- /**Light call to determine ldap configuration status.
- *
+ /**
+ * Light call to determine ldap configuration status.
*/
- @Override
- public Boolean checkLdapConfiguredStatus() {
- Boolean ldapEnabled = false;
+ public Boolean checkLdapConfiguredStatus() throws RuntimeException {
try {
String provider =
systemManager.getSystemConfiguration().getProperty(RHQConstants.JAASProvider);
- ldapEnabled = ((provider != null) &&
provider.equals(RHQConstants.LDAPJAASProvider));
+ return ((provider != null) &&
provider.equals(RHQConstants.LDAPJAASProvider));
} catch (Exception e) {
throw new RuntimeException(ThrowableUtil.getAllMessages(e));
}
- return ldapEnabled;
}
- /**Returns all LDAP details for a given user, using the configured ldap details of
server.
- *
+ /**
+ * Returns all LDAP details for a given user, using the configured ldap details of
server.
*/
- @Override
- public Map<String, String> getLdapDetailsFor(String user) {
- Map<String, String> ldapDetails = new HashMap<String, String>();
+ public Map<String, String> getLdapDetailsFor(String user) throws
RuntimeException {
try {
- ldapDetails = ldapManager.findLdapUserDetails(user);
+ return ldapManager.findLdapUserDetails(user);
} catch (Exception e) {
throw new RuntimeException(ThrowableUtil.getAllMessages(e));
}
- return ldapDetails;
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java
index 0a83095..5ac43c3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java
@@ -60,179 +60,189 @@ public class MeasurementDataGWTServiceImpl extends
AbstractGWTServiceImpl implem
private MeasurementScheduleManagerLocal scheduleManager =
LookupUtil.getMeasurementScheduleManager();
private MeasurementDefinitionManagerLocal definitionManager =
LookupUtil.getMeasurementDefinitionManager();
- public List<MeasurementDataTrait> findCurrentTraitsForResource(int resourceId,
DisplayType displayType) {
+ public List<MeasurementDataTrait> findCurrentTraitsForResource(int resourceId,
DisplayType displayType)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(dataManager.findCurrentTraitsForResource(getSessionSubject(),
resourceId,
displayType),
"MeasurementDataService.findCurrentTraitsForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<MeasurementData> findLiveData(int resourceId, int[] definitionIds)
{
+ public Set<MeasurementData> findLiveData(int resourceId, int[] definitionIds)
throws RuntimeException {
try {
return SerialUtility.prepare(dataManager.findLiveData(getSessionSubject(),
resourceId, definitionIds),
"MeasurementDataService.findLiveData");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public List<List<MeasurementDataNumericHighLowComposite>>
findDataForResource(int resourceId, int[] definitionIds,
- long beginTime, long endTime, int numPoints) {
+ long beginTime, long endTime, int numPoints) throws RuntimeException {
try {
return
SerialUtility.prepare(dataManager.findDataForResource(getSessionSubject(), resourceId,
definitionIds, beginTime, endTime, numPoints),
"MeasurementDataService.findDataForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<CallTimeDataComposite> findCallTimeDataForResource(int
scheduleId, long start, long end,
- PageControl pageControl) {
+ PageControl pageControl) throws RuntimeException {
try {
return
SerialUtility.prepare(callTimeDataManager.findCallTimeDataForResource(getSessionSubject(),
scheduleId, start, end, pageControl),
"MeasurementDataService.findCallTimeDataForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<MeasurementDefinition>
findMeasurementDefinitionsByCriteria(MeasurementDefinitionCriteria criteria) {
+ public PageList<MeasurementDefinition>
findMeasurementDefinitionsByCriteria(MeasurementDefinitionCriteria criteria)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(definitionManager.findMeasurementDefinitionsByCriteria(getSessionSubject(),
criteria),
"MeasurementDataService.findMeasurementDefinintionsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<MeasurementSchedule>
findMeasurementSchedulesByCriteria(MeasurementScheduleCriteria criteria) {
+ public PageList<MeasurementSchedule>
findMeasurementSchedulesByCriteria(MeasurementScheduleCriteria criteria)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(scheduleManager.findSchedulesByCriteria(getSessionSubject(),
criteria),
"MeasurementDataService.findMeasurementSchedulesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<MeasurementScheduleComposite>
getMeasurementScheduleCompositesByContext(EntityContext context) {
+ public PageList<MeasurementScheduleComposite>
getMeasurementScheduleCompositesByContext(EntityContext context)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(scheduleManager.getMeasurementScheduleCompositesByContext(getSessionSubject(),
context, PageControl.getUnlimitedInstance()),
"MeasurementDataService.getMeasurementScheduleCompositesByContext");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public PageList<MeasurementOOBComposite> getSchedulesWithOOBs(String
metricNameFilter, String resourceNameFilter,
- String parentNameFilter, PageControl pc) {
+ String parentNameFilter, PageControl pc) throws RuntimeException {
try {
return
SerialUtility.prepare(measurementOOBManager.getSchedulesWithOOBs(getSessionSubject(),
metricNameFilter, resourceNameFilter, parentNameFilter, pc),
"MeasurementDataService.getSchedulesWithOOBs");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<MeasurementOOBComposite> getHighestNOOBsForResource(int
resourceId, int n) {
+ public PageList<MeasurementOOBComposite> getHighestNOOBsForResource(int
resourceId, int n) throws RuntimeException {
try {
return
SerialUtility.prepare(measurementOOBManager.getHighestNOOBsForResource(getSessionSubject(),
resourceId, n),
"MeasurementDataService.getHighestNOOBsForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void enableSchedulesForResource(int resourceId, int[]
measurementDefinitionIds) {
+ public void enableSchedulesForResource(int resourceId, int[]
measurementDefinitionIds) throws RuntimeException {
try {
scheduleManager.enableSchedulesForResource(getSessionSubject(), resourceId,
measurementDefinitionIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void disableSchedulesForResource(int resourceId, int[]
measurementDefinitionIds) {
+ public void disableSchedulesForResource(int resourceId, int[]
measurementDefinitionIds) throws RuntimeException {
try {
scheduleManager.disableSchedulesForResource(getSessionSubject(), resourceId,
measurementDefinitionIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateSchedulesForResource(int resourceId, int[]
measurementDefinitionIds, long collectionInterval) {
+ public void updateSchedulesForResource(int resourceId, int[]
measurementDefinitionIds, long collectionInterval)
+ throws RuntimeException {
try {
scheduleManager.updateSchedulesForResource(getSessionSubject(), resourceId,
measurementDefinitionIds,
collectionInterval);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void enableSchedulesForCompatibleGroup(int resourceGroupId, int[]
measurementDefinitionIds) {
+ public void enableSchedulesForCompatibleGroup(int resourceGroupId, int[]
measurementDefinitionIds)
+ throws RuntimeException {
try {
scheduleManager.enableSchedulesForCompatibleGroup(getSessionSubject(),
resourceGroupId,
measurementDefinitionIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void disableSchedulesForCompatibleGroup(int resourceGroupId, int[]
measurementDefinitionIds) {
+ public void disableSchedulesForCompatibleGroup(int resourceGroupId, int[]
measurementDefinitionIds)
+ throws RuntimeException {
try {
scheduleManager.disableSchedulesForCompatibleGroup(getSessionSubject(),
resourceGroupId,
measurementDefinitionIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void updateSchedulesForCompatibleGroup(int resourceGroupId, int[]
measurementDefinitionIds,
- long collectionInterval) {
+ long collectionInterval) throws RuntimeException {
try {
scheduleManager.updateSchedulesForCompatibleGroup(getSessionSubject(),
resourceGroupId,
measurementDefinitionIds, collectionInterval);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void enableSchedulesForResourceType(int[] measurementDefinitionIds, boolean
updateExistingSchedules) {
+ public void enableSchedulesForResourceType(int[] measurementDefinitionIds, boolean
updateExistingSchedules)
+ throws RuntimeException {
try {
scheduleManager.updateDefaultCollectionIntervalForMeasurementDefinitions(getSessionSubject(),
measurementDefinitionIds, 0, updateExistingSchedules);
- } catch (RuntimeException e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void disableSchedulesForResourceType(int[] measurementDefinitionIds, boolean
updateExistingSchedules) {
+ public void disableSchedulesForResourceType(int[] measurementDefinitionIds, boolean
updateExistingSchedules)
+ throws RuntimeException {
try {
scheduleManager.updateDefaultCollectionIntervalForMeasurementDefinitions(getSessionSubject(),
measurementDefinitionIds, -1, updateExistingSchedules);
- } catch (RuntimeException e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void updateSchedulesForResourceType(int[] measurementDefinitionIds, long
collectionInterval,
- boolean updateExistingSchedules) {
+ boolean updateExistingSchedules) throws RuntimeException {
try {
scheduleManager.updateDefaultCollectionIntervalForMeasurementDefinitions(getSessionSubject(),
measurementDefinitionIds, collectionInterval, updateExistingSchedules);
- } catch (RuntimeException e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<MeasurementDataTrait>
findTraitsByCriteria(MeasurementDataTraitCriteria criteria) {
+ public PageList<MeasurementDataTrait>
findTraitsByCriteria(MeasurementDataTraitCriteria criteria)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(dataManager.findTraitsByCriteria(getSessionSubject(), criteria),
"MeasurementDataService.findTraitsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java
index a51ed3f..8d15f3c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java
@@ -52,21 +52,22 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
private ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
public PageList<ResourceOperationHistory>
findResourceOperationHistoriesByCriteria(
- ResourceOperationHistoryCriteria criteria) {
+ ResourceOperationHistoryCriteria criteria) throws RuntimeException {
try {
return
SerialUtility.prepare(operationManager.findResourceOperationHistoriesByCriteria(getSessionSubject(),
criteria),
"OperationService.findResourceOperationHistoriesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<GroupOperationHistory>
findGroupOperationHistoriesByCriteria(GroupOperationHistoryCriteria criteria) {
+ public PageList<GroupOperationHistory>
findGroupOperationHistoriesByCriteria(GroupOperationHistoryCriteria criteria)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(operationManager.findGroupOperationHistoriesByCriteria(getSessionSubject(),
criteria),
"OperationService.findGroupOperationHistoriesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -75,8 +76,8 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
try {
ResourceOperationSchedule opSchedule =
operationManager.scheduleResourceOperation(getSessionSubject(),
resourceId, operationName, 0, 0, 0, 0, parameters, description);
- } catch (Exception e) {
- throw new RuntimeException("Unable to invoke operation: " +
e.getMessage());
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -86,9 +87,8 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
CronTrigger ct = new CronTrigger("resource " + resourceId +
"_" + operationName, "group", cronString);
ResourceOperationSchedule opSchedule =
operationManager.scheduleResourceOperation(getSessionSubject(),
resourceId, operationName, parameters, ct, description);
-
- } catch (Exception e) {
- throw new RuntimeException("Unable to schedule operation execution:
" + e.getMessage());
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -96,7 +96,7 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
*
*/
public
List<DisambiguationReport<ResourceOperationLastCompletedComposite>>
findRecentCompletedOperations(
- int pageSize) {
+ int pageSize) throws RuntimeException {
try {
PageControl pageControl = new PageControl(0, pageSize);
PageList<ResourceOperationLastCompletedComposite>
lastCompletedResourceOps = operationManager
@@ -108,15 +108,16 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
DefaultDisambiguationUpdateStrategies.getDefault());
return disambiguatedLastCompletedResourceOps;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
/** Find scheduled operations, disambiguate them and return that list.
*
*/
- public List<DisambiguationReport<ResourceOperationScheduleComposite>>
findScheduledOperations(int pageSize) {
+ public List<DisambiguationReport<ResourceOperationScheduleComposite>>
findScheduledOperations(int pageSize)
+ throws RuntimeException {
try {
PageControl pageControl = new PageControl(0, pageSize);
PageList<ResourceOperationScheduleComposite> scheduledResourceOps =
operationManager
@@ -128,30 +129,28 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl
implements O
DefaultDisambiguationUpdateStrategies.getDefault());
return disambiguatedNextScheduledResourceOps;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public List<ResourceOperationSchedule> findScheduledResourceOperations(int
resourceId) throws RuntimeException {
try {
- List<ResourceOperationSchedule> resourceOperationSchedules =
- operationManager.findScheduledResourceOperations(getSessionSubject(),
resourceId);
+ List<ResourceOperationSchedule> resourceOperationSchedules =
operationManager
+ .findScheduledResourceOperations(getSessionSubject(), resourceId);
return SerialUtility.prepare(resourceOperationSchedules,
"findScheduledResourceOperations");
- }
- catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public List<GroupOperationSchedule> findScheduledGroupOperations(int groupId)
throws RuntimeException {
try {
- List<GroupOperationSchedule> groupOperationSchedules =
- operationManager.findScheduledGroupOperations(getSessionSubject(),
groupId);
+ List<GroupOperationSchedule> groupOperationSchedules =
operationManager.findScheduledGroupOperations(
+ getSessionSubject(), groupId);
return SerialUtility.prepare(groupOperationSchedules,
"findScheduledGroupOperations");
- }
- catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RemoteInstallGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RemoteInstallGWTServiceImpl.java
index f29598f..b397c15 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RemoteInstallGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RemoteInstallGWTServiceImpl.java
@@ -38,66 +38,67 @@ public class RemoteInstallGWTServiceImpl extends
AbstractGWTServiceImpl implemen
private RemoteInstallManagerLocal remoteInstallManager =
LookupUtil.getRemoteInstallManager();
- public boolean agentInstallCheck(RemoteAccessInfo remoteAccessInfo, String
agentInstallPath) {
+ public boolean agentInstallCheck(RemoteAccessInfo remoteAccessInfo, String
agentInstallPath)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(remoteInstallManager.agentInstallCheck(getSessionSubject(),
remoteAccessInfo,
agentInstallPath), "RemoteInstallService.agentInstallCheck");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public AgentInstallInfo installAgent(RemoteAccessInfo remoteAccessInfo, String
parentPath) {
+ public AgentInstallInfo installAgent(RemoteAccessInfo remoteAccessInfo, String
parentPath) throws RuntimeException {
try {
return
SerialUtility.prepare(remoteInstallManager.installAgent(getSessionSubject(),
remoteAccessInfo,
parentPath), "RemoteInstallService.installAgent");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String startAgent(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
{
+ public String startAgent(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
throws RuntimeException {
try {
return
SerialUtility.prepare(remoteInstallManager.startAgent(getSessionSubject(),
remoteAccessInfo,
agentInstallPath), "RemoteInstallService.startAgent");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String stopAgent(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
{
+ public String stopAgent(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
throws RuntimeException {
try {
return
SerialUtility.prepare(remoteInstallManager.stopAgent(getSessionSubject(),
remoteAccessInfo,
agentInstallPath), "RemoteInstallService.stopAgent");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String agentStatus(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
{
+ public String agentStatus(RemoteAccessInfo remoteAccessInfo, String agentInstallPath)
throws RuntimeException {
try {
return
SerialUtility.prepare(remoteInstallManager.agentStatus(getSessionSubject(),
remoteAccessInfo,
agentInstallPath), "RemoteInstallService.agentStatus");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String findAgentInstallPath(RemoteAccessInfo remoteAccessInfo, String
parentPath) {
+ public String findAgentInstallPath(RemoteAccessInfo remoteAccessInfo, String
parentPath) throws RuntimeException {
try {
return
SerialUtility.prepare((remoteInstallManager.findAgentInstallPath(getSessionSubject(),
remoteAccessInfo, parentPath)),
"RemoteInstallService.findAgentInstallPath");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public String[] remotePathDiscover(RemoteAccessInfo remoteAccessInfo, String
parentPath) {
+ public String[] remotePathDiscover(RemoteAccessInfo remoteAccessInfo, String
parentPath) throws RuntimeException {
try {
return
SerialUtility.prepare((remoteInstallManager.remotePathDiscover(getSessionSubject(),
remoteAccessInfo, parentPath)),
"RemoteInstallService.remotePathDiscover");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RepoGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RepoGWTServiceImpl.java
index 98c26cc..100289c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RepoGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RepoGWTServiceImpl.java
@@ -40,12 +40,12 @@ public class RepoGWTServiceImpl extends AbstractGWTServiceImpl
implements RepoGW
private RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
- public PageList<Repo> findReposByCriteria(RepoCriteria criteria) throws
Exception {
+ public PageList<Repo> findReposByCriteria(RepoCriteria criteria) throws
RuntimeException {
try {
return
SerialUtility.prepare(repoManager.findReposByCriteria(getSessionSubject(), criteria),
"RepoService.findReposByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceBossGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceBossGWTServiceImpl.java
index fb00c3a..046443d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceBossGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceBossGWTServiceImpl.java
@@ -44,11 +44,11 @@ public class ResourceBossGWTServiceImpl extends AbstractGWTServiceImpl
implement
return getInventorySummary(subject);
}
- public InventorySummary getInventorySummary(Subject user) {
+ public InventorySummary getInventorySummary(Subject user) throws RuntimeException {
try {
return resourceBoss.getInventorySummary(user);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
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 105963c..c2b7ab4 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
@@ -110,6 +110,12 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
private static Set<String> importantFieldsSet = new
HashSet<String>(Arrays.asList(importantFields));
+ private static final IntExtractor<ProblemResourceComposite>
RESOURCE_ID_EXTRACTOR = new IntExtractor<ProblemResourceComposite>() {
+ public int extract(ProblemResourceComposite object) {
+ return object.getResourceId();
+ }
+ };
+
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
@@ -119,19 +125,20 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
public ResourceGWTServiceImpl() {
}
- public PageList<Resource> findResourcesByCriteria(ResourceCriteria criteria) {
+ public PageList<Resource> findResourcesByCriteria(ResourceCriteria criteria)
throws RuntimeException {
try {
PageList<Resource> result =
resourceManager.findResourcesByCriteria(getSessionSubject(), criteria);
ObjectFilter.filterFieldsInCollection(result, importantFieldsSet);
return SerialUtility.prepare(result,
"ResourceService.findResourcesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<ResourceComposite>
findResourceCompositesByCriteria(ResourceCriteria criteria) {
+ public PageList<ResourceComposite>
findResourceCompositesByCriteria(ResourceCriteria criteria)
+ throws RuntimeException {
try {
PageList<ResourceComposite> result =
resourceManager.findResourceCompositesByCriteria(getSessionSubject(),
criteria);
@@ -142,15 +149,16 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
}
return SerialUtility.prepare(result,
"ResourceService.findResourceCompositesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
/** Locate ProblemResourcesComposites and generate the disambiguation reports for
them.
* Criteria passed in not currently used.
*/
- public List<DisambiguationReport<ProblemResourceComposite>>
findProblemResources(long ctime, int maxItems) {
+ public List<DisambiguationReport<ProblemResourceComposite>>
findProblemResources(long ctime, int maxItems)
+ throws RuntimeException {
try {
List<ProblemResourceComposite> located = new
ArrayList<ProblemResourceComposite>();
MeasurementProblemManagerLocal problemManager =
LookupUtil.getMeasurementProblemManager();
@@ -163,38 +171,33 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
List<DisambiguationReport<ProblemResourceComposite>> translated =
resourceManager.disambiguate(located,
RESOURCE_ID_EXTRACTOR,
DefaultDisambiguationUpdateStrategies.getDefault());
return translated;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- private static final IntExtractor<ProblemResourceComposite>
RESOURCE_ID_EXTRACTOR = new IntExtractor<ProblemResourceComposite>() {
- public int extract(ProblemResourceComposite object) {
- return object.getResourceId();
- }
- };
-
- public List<ResourceLineageComposite> getResourceLineageAndSiblings(int
resourceId) {
+ public List<ResourceLineageComposite> getResourceLineageAndSiblings(int
resourceId) throws RuntimeException {
try {
return SerialUtility.prepare(
resourceManager.getResourceLineageAndSiblings(getSessionSubject(),
resourceId),
"ResourceService.getResourceLineageAndSiblings");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Resource getPlatformForResource(int resourceId) {
+ public Resource getPlatformForResource(int resourceId) throws RuntimeException {
try {
return
SerialUtility.prepare(resourceManager.getRootResourceForResource(resourceId),
"ResourceService.getPlatformForResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<RecentlyAddedResourceComposite> findRecentlyAddedResources(long
ctime, int maxItems) {
+ public List<RecentlyAddedResourceComposite> findRecentlyAddedResources(long
ctime, int maxItems)
+ throws RuntimeException {
try {
List<RecentlyAddedResourceComposite> platforms =
resourceManager.findRecentlyAddedPlatforms(
getSessionSubject(), ctime, maxItems);
@@ -206,32 +209,31 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
}
return SerialUtility.prepare(platforms,
"ResourceService.findRecentlyAddedResources");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<Integer> uninventoryResources(int[] resourceIds) {
+ public List<Integer> uninventoryResources(int[] resourceIds) throws
RuntimeException {
try {
return
SerialUtility.prepare(resourceManager.uninventoryResources(getSessionSubject(),
resourceIds),
"ResourceService.uninventoryResources");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateResource(Resource resource) {
+ public void updateResource(Resource resource) throws RuntimeException {
try {
resourceManager.updateResource(getSessionSubject(), resource);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void createResource(int parentResourceId, int newResourceTypeId, String
newResourceName,
- Configuration newResourceConfiguration) {
+ Configuration newResourceConfiguration) throws RuntimeException {
try {
-
ConfigurationDefinition pluginConfigDefinition =
LookupUtil.getConfigurationManager()
.getPluginConfigurationDefinitionForResourceType(getSessionSubject(),
newResourceTypeId);
Configuration pluginConfig = null;
@@ -246,15 +248,14 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
resourceFactoryManager.createResource(getSessionSubject(), parentResourceId,
newResourceTypeId,
newResourceName, pluginConfig, newResourceConfiguration);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
public void createResource(int parentResourceId, int newResourceTypeId, String
newResourceName,
- Configuration deploymentTimeConfiguration, int packageVersionId) {
+ Configuration deploymentTimeConfiguration, int packageVersionId) throws
RuntimeException {
try {
-
ConfigurationDefinition pluginConfigDefinition =
LookupUtil.getConfigurationManager()
.getPluginConfigurationDefinitionForResourceType(getSessionSubject(),
newResourceTypeId);
Configuration pluginConfig = null;
@@ -269,65 +270,71 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl
implements Re
resourceFactoryManager.createPackageBackedResourceViaPackageVersion(getSessionSubject(),
parentResourceId,
newResourceTypeId, newResourceName, pluginConfig,
deploymentTimeConfiguration, packageVersionId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<DeleteResourceHistory> deleteResources(int[] resourceIds) {
+ public List<DeleteResourceHistory> deleteResources(int[] resourceIds) throws
RuntimeException {
try {
return
SerialUtility.prepare(resourceFactoryManager.deleteResources(getSessionSubject(),
resourceIds),
"ResourceService.deleteResources");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Map<Resource, List<Resource>>
getQueuedPlatformsAndServers(HashSet<InventoryStatus> statuses, PageControl pc) {
+ public Map<Resource, List<Resource>>
getQueuedPlatformsAndServers(HashSet<InventoryStatus> statuses, PageControl pc)
+ throws RuntimeException {
try {
return
SerialUtility.prepare(discoveryBoss.getQueuedPlatformsAndServers(getSessionSubject(),
EnumSet
.copyOf(statuses), pc),
"ResourceService.getQueuedPlatformsAndServers");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void importResources(int[] resourceIds) {
+ public void importResources(int[] resourceIds) throws RuntimeException {
try {
discoveryBoss.importResources(getSessionSubject(), resourceIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void ignoreResources(int[] resourceIds) {
+ public void ignoreResources(int[] resourceIds) throws RuntimeException {
try {
discoveryBoss.ignoreResources(getSessionSubject(), resourceIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void unignoreResources(int[] resourceIds) {
+ public void unignoreResources(int[] resourceIds) throws RuntimeException {
try {
discoveryBoss.unignoreResources(getSessionSubject(), resourceIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<ResourceError> findResourceErrors(int resourceId) {
- return
SerialUtility.prepare(resourceManager.findResourceErrors(getSessionSubject(),
resourceId),
- "ResourceService.getResourceErrors");
+ public List<ResourceError> findResourceErrors(int resourceId) throws
RuntimeException {
+ try {
+ return
SerialUtility.prepare(resourceManager.findResourceErrors(getSessionSubject(),
resourceId),
+ "ResourceService.getResourceErrors");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
- public Resource manuallyAddResource(int resourceTypeId, int parentResourceId,
Configuration pluginConfiguration) {
+ public Resource manuallyAddResource(int resourceTypeId, int parentResourceId,
Configuration pluginConfiguration)
+ throws RuntimeException {
try {
Resource result = discoveryBoss.manuallyAddResource(getSessionSubject(),
resourceTypeId, parentResourceId,
pluginConfiguration);
return SerialUtility.prepare(result,
"ResourceService.manuallyAddResource");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
index 2ef7eec..6963b8c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
@@ -42,7 +42,7 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
private ResourceGroupManagerLocal groupManager =
LookupUtil.getResourceGroupManager();
private GroupDefinitionManagerLocal definitionManager =
LookupUtil.getGroupDefinitionManager();
- public PageList<ResourceGroup>
findResourceGroupsByCriteria(ResourceGroupCriteria criteria) {
+ public PageList<ResourceGroup>
findResourceGroupsByCriteria(ResourceGroupCriteria criteria) throws RuntimeException {
try {
PageList<ResourceGroup> groups =
groupManager.findResourceGroupsByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(groups,
"ResourceGroupService.findResourceGroupsByCriteria");
@@ -51,7 +51,8 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public PageList<ResourceGroupComposite>
findResourceGroupCompositesByCriteria(ResourceGroupCriteria criteria) {
+ public PageList<ResourceGroupComposite>
findResourceGroupCompositesByCriteria(ResourceGroupCriteria criteria)
+ throws RuntimeException {
try {
PageList<ResourceGroupComposite> composites =
groupManager.findResourceGroupCompositesByCriteria(
getSessionSubject(), criteria);
@@ -61,7 +62,8 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public PageList<GroupDefinition>
findGroupDefinitionsByCriteria(ResourceGroupDefinitionCriteria criteria) {
+ public PageList<GroupDefinition>
findGroupDefinitionsByCriteria(ResourceGroupDefinitionCriteria criteria)
+ throws RuntimeException {
try {
PageList<GroupDefinition> definitions =
definitionManager.findGroupDefinitionsByCriteria(
getSessionSubject(), criteria);
@@ -71,7 +73,7 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public void setAssignedResources(int groupId, int[] resourceIds, boolean setType) {
+ public void setAssignedResources(int groupId, int[] resourceIds, boolean setType)
throws RuntimeException {
try {
groupManager.setAssignedResources(getSessionSubject(), groupId, resourceIds,
setType);
} catch (Throwable t) {
@@ -79,7 +81,8 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public void setAssignedResourceGroupsForResource(int resourceId, int[]
resourceGroupIds, boolean setType) {
+ public void setAssignedResourceGroupsForResource(int resourceId, int[]
resourceGroupIds, boolean setType)
+ throws RuntimeException {
try {
groupManager.setAssignedResourceGroupsForResource(getSessionSubject(),
resourceId, resourceGroupIds,
setType);
@@ -88,7 +91,7 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public ResourceGroup createPrivateResourceGroup(ResourceGroup group, int[]
resourceIds) {
+ public ResourceGroup createPrivateResourceGroup(ResourceGroup group, int[]
resourceIds) throws RuntimeException {
try {
Subject user = getSessionSubject();
group = groupManager.createPrivateResourceGroup(user, group);
@@ -99,7 +102,7 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl
implemen
}
}
- public ResourceGroup createResourceGroup(ResourceGroup group, int[] resourceIds) {
+ public ResourceGroup createResourceGroup(ResourceGroup group, int[] resourceIds)
throws RuntimeException {
try {
Subject user = getSessionSubject();
group = groupManager.createResourceGroup(user, group);
@@ -110,7 +113,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void deleteResourceGroups(int[] groupIds) {
+ public void deleteResourceGroups(int[] groupIds) throws RuntimeException {
try {
groupManager.deleteResourceGroups(getSessionSubject(), groupIds);
} catch (Throwable t) {
@@ -118,7 +121,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void updateResourceGroup(ResourceGroup group) {
+ public void updateResourceGroup(ResourceGroup group) throws RuntimeException {
try {
groupManager.updateResourceGroup(getSessionSubject(), group);
} catch (Throwable t) {
@@ -126,7 +129,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void updateResourceGroup(ResourceGroup group, boolean updateMembership) {
+ public void updateResourceGroup(ResourceGroup group, boolean updateMembership) throws
RuntimeException {
try {
groupManager.updateResourceGroup(getSessionSubject(), group, null,
updateMembership);
} catch (Throwable t) {
@@ -134,7 +137,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public GroupDefinition createGroupDefinition(GroupDefinition groupDefinition) {
+ public GroupDefinition createGroupDefinition(GroupDefinition groupDefinition) throws
RuntimeException {
try {
GroupDefinition results =
definitionManager.createGroupDefinition(getSessionSubject(), groupDefinition);
@@ -144,7 +147,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void updateGroupDefinition(GroupDefinition groupDefinition) {
+ public void updateGroupDefinition(GroupDefinition groupDefinition) throws
RuntimeException {
try {
definitionManager.updateGroupDefinition(getSessionSubject(),
groupDefinition);
} catch (Throwable t) {
@@ -152,7 +155,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void recalculateGroupDefinitions(int[] groupDefinitionIds) {
+ public void recalculateGroupDefinitions(int[] groupDefinitionIds) throws
RuntimeException {
try {
for (int nextGroupDefinitionId : groupDefinitionIds) {
definitionManager.calculateGroupMembership(getSessionSubject(),
nextGroupDefinitionId);
@@ -162,7 +165,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
}
- public void deleteGroupDefinitions(int[] groupDefinitionIds) {
+ public void deleteGroupDefinitions(int[] groupDefinitionIds) throws RuntimeException
{
try {
for (int nextGroupDefinitionId : groupDefinitionIds) {
definitionManager.removeGroupDefinition(getSessionSubject(),
nextGroupDefinitionId);
@@ -173,7 +176,7 @@ public class ResourceGroupGWTServiceImpl extends
AbstractGWTServiceImpl implemen
}
@Override
- public void setRecursive(int groupId, boolean isRecursive) throws Exception {
+ public void setRecursive(int groupId, boolean isRecursive) throws RuntimeException {
try {
groupManager.setRecursive(getSessionSubject(), groupId, isRecursive);
} catch (Throwable t) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceTypeGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceTypeGWTServiceImpl.java
index 5cffd24..223a23e 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceTypeGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceTypeGWTServiceImpl.java
@@ -22,14 +22,14 @@ public class ResourceTypeGWTServiceImpl extends AbstractGWTServiceImpl
implement
private static final long serialVersionUID = 1L;
@Override
- public PageList<ResourceType> findResourceTypesByCriteria(ResourceTypeCriteria
criteria) {
+ public PageList<ResourceType> findResourceTypesByCriteria(ResourceTypeCriteria
criteria) throws RuntimeException {
try {
ResourceTypeManagerLocal typeManager = LookupUtil.getResourceTypeManager();
return
SerialUtility.prepare(typeManager.findResourceTypesByCriteria(getSessionSubject(),
criteria),
"ResourceTypes.findResourceTypesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@@ -37,7 +37,7 @@ public class ResourceTypeGWTServiceImpl extends AbstractGWTServiceImpl
implement
* Given a resource ID, this gets all resource types for all ancestors in that
resource's lineage.
*/
@Override
- public ArrayList<ResourceType> getResourceTypesForResourceAncestors(int
resourceId) {
+ public ArrayList<ResourceType> getResourceTypesForResourceAncestors(int
resourceId) throws RuntimeException {
try {
ResourceManagerLocal manager = LookupUtil.getResourceManager();
List<ResourceLineageComposite> lineage =
manager.getResourceLineage(getSessionSubject(), resourceId);
@@ -46,43 +46,44 @@ public class ResourceTypeGWTServiceImpl extends AbstractGWTServiceImpl
implement
types.add(composite.getResource().getResourceType());
}
return SerialUtility.prepare(types,
"ResourceTypes.getResourceTypesForResourceAncestors");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public ArrayList<ResourceType> getAllResourceTypeAncestors(int resourceTypeId)
{
+ public ArrayList<ResourceType> getAllResourceTypeAncestors(int resourceTypeId)
throws RuntimeException {
try {
ResourceTypeManagerLocal typeManager = LookupUtil.getResourceTypeManager();
List<ResourceType> list =
typeManager.getAllResourceTypeAncestors(getSessionSubject(), resourceTypeId);
return SerialUtility
.prepare(new ArrayList<ResourceType>(list),
"ResourceTypes.getAllResourceTypeAncestors");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public HashMap<Integer, String> getResourceTypeDescendantsWithOperations(int
resourceTypeId) {
+ public HashMap<Integer, String> getResourceTypeDescendantsWithOperations(int
resourceTypeId)
+ throws RuntimeException {
try {
ResourceTypeManagerLocal typeManager = LookupUtil.getResourceTypeManager();
HashMap<Integer, String> map =
typeManager.getResourceTypeDescendantsWithOperations(getSessionSubject(),
resourceTypeId);
return SerialUtility.prepare(map,
"ResourceTypes.getResourceTypeDescendantsWithOperations");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
@Override
- public Map<Integer, ResourceTypeTemplateCountComposite>
getTemplateCountCompositeMap() {
+ public Map<Integer, ResourceTypeTemplateCountComposite>
getTemplateCountCompositeMap() throws RuntimeException {
try {
ResourceTypeManagerLocal typeManager = LookupUtil.getResourceTypeManager();
Map<Integer, ResourceTypeTemplateCountComposite> map =
typeManager.getTemplateCountCompositeMap();
return SerialUtility.prepare(map,
"ResourceTypes.getTemplateCountCompositeMap");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RoleGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RoleGWTServiceImpl.java
index 2f1dcbc..73659e0 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RoleGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/RoleGWTServiceImpl.java
@@ -36,60 +36,60 @@ public class RoleGWTServiceImpl extends AbstractGWTServiceImpl
implements RoleGW
private RoleManagerLocal roleManager = LookupUtil.getRoleManager();
- public PageList<Role> findRolesByCriteria(RoleCriteria criteria) {
+ public PageList<Role> findRolesByCriteria(RoleCriteria criteria) throws
RuntimeException {
try {
return
SerialUtility.prepare(roleManager.findRolesByCriteria(getSessionSubject(), criteria),
"RoleService.findRolesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Role createRole(Role role) {
+ public Role createRole(Role role) throws RuntimeException {
try {
return SerialUtility.prepare(roleManager.createRole(getSessionSubject(),
role), "RoleService.createRole");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Role updateRole(Role role) {
+ public Role updateRole(Role role) throws RuntimeException {
try {
return SerialUtility.prepare(roleManager.updateRole(getSessionSubject(),
role), "RoleService.updateRole");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void removeRoles(int[] roleIds) {
+ public void removeRoles(int[] roleIds) throws RuntimeException {
try {
roleManager.deleteRoles(getSessionSubject(), roleIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void setAssignedResourceGroups(int roleId, int[] resourceGroupIds) {
+ public void setAssignedResourceGroups(int roleId, int[] resourceGroupIds) throws
RuntimeException {
try {
roleManager.setAssignedResourceGroups(getSessionSubject(), roleId,
resourceGroupIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void setAssignedSubjects(int roleId, int[] subjectIds) {
+ public void setAssignedSubjects(int roleId, int[] subjectIds) throws RuntimeException
{
try {
roleManager.setAssignedSubjects(getSessionSubject(), roleId, subjectIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void setAssignedRolesForSubject(int subjectId, int[] roleIds) {
+ public void setAssignedRolesForSubject(int subjectId, int[] roleIds) throws
RuntimeException {
try {
roleManager.setAssignedSubjectRoles(getSessionSubject(), subjectId,
roleIds);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
index ae72b4c..c80728e 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
@@ -41,56 +41,57 @@ public class SearchGWTServiceImpl extends AbstractGWTServiceImpl
implements Sear
private SavedSearchManagerLocal savedSearchManager =
LookupUtil.getSavedSearchManager();
public List<SearchSuggestion> getTabAwareSuggestions(SearchSubsystem
searchSubsystem, String expression,
- int caretPosition, String tab) {
+ int caretPosition, String tab) throws RuntimeException {
try {
SearchAssistManager searchAssistManager = new
SearchAssistManager(getSessionSubject(), searchSubsystem);
List<SearchSuggestion> results =
searchAssistManager.getTabAwareSuggestions(expression, caretPosition, tab);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<SearchSuggestion> getSuggestions(SearchSubsystem searchSubsystem,
String expression, int caretPosition) {
+ public List<SearchSuggestion> getSuggestions(SearchSubsystem searchSubsystem,
String expression, int caretPosition)
+ throws RuntimeException {
try {
SearchAssistManager searchAssistManager = new
SearchAssistManager(getSessionSubject(), searchSubsystem);
List<SearchSuggestion> results =
searchAssistManager.getSuggestions(expression, caretPosition);
return results;
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public int createSavedSearch(SavedSearch savedSearch) {
+ public int createSavedSearch(SavedSearch savedSearch) throws RuntimeException {
try {
return savedSearchManager.createSavedSearch(getSessionSubject(),
savedSearch);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateSavedSearch(SavedSearch savedSearch) {
+ public void updateSavedSearch(SavedSearch savedSearch) throws RuntimeException {
try {
savedSearchManager.updateSavedSearch(getSessionSubject(), savedSearch);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteSavedSearch(int savedSearchId) {
+ public void deleteSavedSearch(int savedSearchId) throws RuntimeException {
try {
savedSearchManager.deleteSavedSearch(getSessionSubject(), savedSearchId);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public List<SavedSearch> findSavedSearchesByCriteria(SavedSearchCriteria
criteria) {
+ public List<SavedSearch> findSavedSearchesByCriteria(SavedSearchCriteria
criteria) throws RuntimeException {
try {
return
SerialUtility.prepare(savedSearchManager.findSavedSearchesByCriteria(getSessionSubject(),
criteria),
"SearchService.findRolesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
index d9b50fd..df34cab 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
@@ -18,8 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.SubjectCriteria;
import org.rhq.core.domain.util.PageList;
@@ -37,85 +35,77 @@ public class SubjectGWTServiceImpl extends AbstractGWTServiceImpl
implements Sub
private static final long serialVersionUID = 1L;
- private final Log log = LogFactory.getLog(this.getClass());
-
private SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
- public void createPrincipal(String username, String password) {
+ public void createPrincipal(String username, String password) throws RuntimeException
{
try {
subjectManager.createPrincipal(getSessionSubject(), username, password);
- } catch (RuntimeException e) {
- handleException(e);
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject createSubject(Subject subjectToCreate) {
+ public Subject createSubject(Subject subjectToCreate) throws RuntimeException {
try {
return
SerialUtility.prepare(subjectManager.createSubject(getSessionSubject(), subjectToCreate),
"SubjectManager.createSubject");
- } catch (RuntimeException e) {
- handleException(e);
- return null;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject createSubject(Subject subjectToCreate, String password) throws
Exception {
+ public Subject createSubject(Subject subjectToCreate, String password) throws
RuntimeException {
try {
return
SerialUtility.prepare(subjectManager.createSubject(getSessionSubject(), subjectToCreate,
password),
"SubjectManager.createSubject");
- } catch (RuntimeException e) {
- throw new Exception(e);
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void deleteSubjects(int[] subjectIds) {
+ public void deleteSubjects(int[] subjectIds) throws RuntimeException {
try {
subjectManager.deleteSubjects(getSessionSubject(), subjectIds);
- } catch (RuntimeException e) {
- handleException(e);
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject login(String username, String password) {
+ public Subject login(String username, String password) throws RuntimeException {
try {
return SerialUtility.prepare(subjectManager.login(username, password),
"SubjectManager.login");
- } catch (LoginException e) {
- throw new RuntimeException("LoginException: " + e.getMessage());
- } catch (RuntimeException e) {
- handleException(e);
- return null;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void logout(Subject subject) {
+ public void logout(Subject subject) throws RuntimeException {
try {
subjectManager.logout(subject.getSessionId());
- } catch (RuntimeException e) {
- handleException(e);
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject updateSubject(Subject subjectToModify) {
+ public Subject updateSubject(Subject subjectToModify) throws RuntimeException {
try {
return
SerialUtility.prepare(subjectManager.updateSubject(getSessionSubject(), subjectToModify),
"SubjectManager.updateSubject");
- } catch (RuntimeException e) {
- handleException(e);
- return null;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject updateSubject(Subject subjectToModify, String newPassword) {
+ public Subject updateSubject(Subject subjectToModify, String newPassword) throws
RuntimeException {
try {
- return
SerialUtility.prepare(subjectManager.updateSubject(getSessionSubject(), subjectToModify,
newPassword),
- "SubjectManager.updateSubject");
- } catch (RuntimeException e) {
- handleException(e);
- return null;
+ return SerialUtility.prepare(subjectManager
+ .updateSubject(getSessionSubject(), subjectToModify, newPassword),
"SubjectManager.updateSubject");
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Subject processSubjectForLdap(Subject subjectToModify, String password) {
+ public Subject processSubjectForLdap(Subject subjectToModify, String password) throws
RuntimeException {
//no permissions check as embedded in the SLSB call.
try {
Subject processedSubject =
subjectManager.processSubjectForLdap(subjectToModify, password);
@@ -146,28 +136,25 @@ public class SubjectGWTServiceImpl extends AbstractGWTServiceImpl
implements Sub
} catch (LoginException e) {
throw new RuntimeException("LoginException: " + e.getMessage());
} catch (RuntimeException e) {
- handleException(e);
- return null;
+ throw new RuntimeException(ThrowableUtil.getAllMessages(e));
}
}
- public PageList<Subject> findSubjectsByCriteria(SubjectCriteria criteria) {
+ public PageList<Subject> findSubjectsByCriteria(SubjectCriteria criteria)
throws RuntimeException {
try {
return
SerialUtility.prepare(subjectManager.findSubjectsByCriteria(getSessionSubject(),
criteria),
"SubjectManager.findSubjectsByCriteria");
- } catch (RuntimeException e) {
- handleException(e);
- return null;
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
-
- public boolean isUserWithPrincipal(String username) {
- return subjectManager.isUserWithPrincipal(username);
- }
- private void handleException(Exception e) {
- log.error("Unexpected error.", e);
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ public boolean isUserWithPrincipal(String username) throws RuntimeException {
+ try {
+ return subjectManager.isUserWithPrincipal(username);
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
+ }
}
-
+
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
index 43431c7..eb1f3c9 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
@@ -33,11 +33,11 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl
implements Syst
private SystemManagerLocal systemManager = LookupUtil.getSystemManager();
- public ProductInfo getProductInfo() {
+ public ProductInfo getProductInfo() throws RuntimeException {
try {
return this.systemManager.getProductInfo(getSessionSubject());
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}
\ No newline at end of file
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TagGWTServiceImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TagGWTServiceImpl.java
index 7ab6941..2f28bbf 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TagGWTServiceImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TagGWTServiceImpl.java
@@ -43,86 +43,87 @@ public class TagGWTServiceImpl extends AbstractGWTServiceImpl
implements TagGWTS
private TagManagerLocal tagManager = LookupUtil.getTagManager();
- public PageList<Tag> findTagsByCriteria(TagCriteria tagCriteria) {
+ public PageList<Tag> findTagsByCriteria(TagCriteria tagCriteria) throws
RuntimeException {
try {
return
SerialUtility.prepare(tagManager.findTagsByCriteria(getSessionSubject(), tagCriteria),
"TagService.findTagsByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public Set<Tag> addTags(Set<Tag> tags) {
+ public Set<Tag> addTags(Set<Tag> tags) throws RuntimeException {
try {
return SerialUtility.prepare(tagManager.addTags(getSessionSubject(), tags),
"TagService.addTags");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void removeTags(Set<Tag> tags) {
+ public void removeTags(Set<Tag> tags) throws RuntimeException {
try {
tagManager.removeTags(getSessionSubject(), tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateResourceTags(int resourceId, Set<Tag> tags) {
+ public void updateResourceTags(int resourceId, Set<Tag> tags) throws
RuntimeException {
try {
tagManager.updateResourceTags(getSessionSubject(), resourceId, tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateResourceGroupTags(int resourceGroupId, Set<Tag> tags) {
+ public void updateResourceGroupTags(int resourceGroupId, Set<Tag> tags) throws
RuntimeException {
try {
tagManager.updateResourceGroupTags(getSessionSubject(), resourceGroupId,
tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateBundleTags(int bundleId, Set<Tag> tags) {
+ public void updateBundleTags(int bundleId, Set<Tag> tags) throws
RuntimeException {
try {
tagManager.updateBundleTags(getSessionSubject(), bundleId, tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateBundleVersionTags(int bundleVersionId, Set<Tag> tags) {
+ public void updateBundleVersionTags(int bundleVersionId, Set<Tag> tags) throws
RuntimeException {
try {
tagManager.updateBundleVersionTags(getSessionSubject(), bundleVersionId,
tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateBundleDeploymentTags(int bundleDeploymentId, Set<Tag> tags)
{
+ public void updateBundleDeploymentTags(int bundleDeploymentId, Set<Tag> tags)
throws RuntimeException {
try {
tagManager.updateBundleDeploymentTags(getSessionSubject(),
bundleDeploymentId, tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public void updateBundleDestinationTags(int bundleDestinationId, Set<Tag> tags)
{
+ public void updateBundleDestinationTags(int bundleDestinationId, Set<Tag> tags)
throws RuntimeException {
try {
tagManager.updateBundleDestinationTags(getSessionSubject(),
bundleDestinationId, tags);
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
- public PageList<TagReportComposite>
findTagReportCompositesByCriteria(TagCriteria tagCriteria) {
+ public PageList<TagReportComposite>
findTagReportCompositesByCriteria(TagCriteria tagCriteria)
+ throws RuntimeException {
try {
return SerialUtility.prepare(
tagManager.findTagReportCompositesByCriteria(getSessionSubject(),
tagCriteria),
"TagService.findTagReportCompositesByCriteria");
- } catch (Exception e) {
- throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ } catch (Throwable t) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(t));
}
}
}