modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AbstractConfigurationUpdateCriteria.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/core/client/RHQDomain.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java | 22
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleLdapGroupSelector.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java | 30
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NotificationsAlertDefinitionForm.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/EnhancedListGrid.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/HeaderLabel.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/carousel/Carousel.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java | 23
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java | 60 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/IsLongValidator.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/selector/AbstractSelector.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/sorter/ReorderableList.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/BooleanCellFormatter.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/EscapedHtmlCellFormatter.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TimestampCellFormatter.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/trigger/JobTriggerEditor.java | 515 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackForm.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java | 22
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftCarouselMemberView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/i18n/TestMessages.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java | 18
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/history/AbstractOperationHistoryListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionDataSource.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/SingleGroupDefinitionView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/HistoryGroupResourceConfigurationMembers.java | 35
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/HistoryGroupPluginConfigurationMembers.java | 35
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/table/GroupMembersHealthView.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryDataSource.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java | 42
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java | 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java | 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java | 29
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/DriftComplianceReportResourceSearchView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 48
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/GwtRelativeDurationConverter.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/async/CompoundAsyncOperationException.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/measurement/GwtMeasurementConverter.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java | 29
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/OperationGWTServiceImpl.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java | 11
66 files changed, 536 insertions(+), 574 deletions(-)
New commits:
commit bfc85777e412cc6fe91522b78893f9d07e29230c
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Jan 16 09:58:23 2012 -0500
trivial, add default serialVersionUID to Serializable class
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/async/CompoundAsyncOperationException.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/async/CompoundAsyncOperationException.java
index ef7dfd3..8990901 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/async/CompoundAsyncOperationException.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/async/CompoundAsyncOperationException.java
@@ -26,11 +26,13 @@ import java.util.Map;
*/
public class CompoundAsyncOperationException extends Exception {
- private Map<AsyncOperation,Object> successResults;
- private Map<AsyncOperation,Throwable> failureThrowables;
+ private static final long serialVersionUID = 1L;
+
+ private Map<AsyncOperation, Object> successResults;
+ private Map<AsyncOperation, Throwable> failureThrowables;
public CompoundAsyncOperationException(Map<AsyncOperation, Object> successResults,
- Map<AsyncOperation, Throwable> failureThrowables) {
+ Map<AsyncOperation, Throwable> failureThrowables) {
super("One or more child operations failed.");
this.successResults = successResults;
this.failureThrowables = failureThrowables;
commit dcdeed05468b6170e8abde0b9cc8c8a473e8b63e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Jan 16 09:57:59 2012 -0500
Fix deprecations after gwt/smartgwt upgrade
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index d331365..a59f6ef 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -344,7 +344,7 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
}
public void onValueChange(ValueChangeEvent<String> stringValueChangeEvent) {
- currentView = URL.decodeComponent(stringValueChangeEvent.getValue());
+ currentView = URL.decodeQueryString(stringValueChangeEvent.getValue());
Log.debug("Handling history event for view: " + currentView);
currentViewPath = new ViewPath(currentView);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
index 74d11e3..f52b06d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
@@ -521,8 +521,8 @@ public class LoginView extends LocatableCanvas {
requestBuilder.setHeader("Content-Type", "application/x-www-form-urlencoded");
// URL-encode the username and password in case they contain URL special characters ('?', '&', '%', '+',
// etc.), which would corrupt the request if not encoded.
- String encodedUsername = URL.encodeComponent(username);
- String encodedPassword = URL.encodeComponent(password);
+ String encodedUsername = URL.encodeQueryString(username);
+ String encodedPassword = URL.encodeQueryString(password);
String requestData = "j_username=" + encodedUsername + "&j_password=" + encodedPassword;
requestBuilder.setRequestData(requestData);
requestBuilder.setCallback(new RequestCallback() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TimestampCellFormatter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TimestampCellFormatter.java
index 85bb9e9..e9030d9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TimestampCellFormatter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TimestampCellFormatter.java
@@ -3,6 +3,7 @@ package org.rhq.enterprise.gui.coregui.client.components.table;
import java.util.Date;
import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.HoverCustomizer;
import com.smartgwt.client.widgets.grid.ListGridField;
@@ -15,10 +16,14 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
*/
public class TimestampCellFormatter implements CellFormatter {
- public static final DateTimeFormat DATE_TIME_FORMAT_FULL = DateTimeFormat.getFullDateTimeFormat();
- public static final DateTimeFormat DATE_TIME_FORMAT_LONG = DateTimeFormat.getLongDateTimeFormat();
- public static final DateTimeFormat DATE_TIME_FORMAT_MEDIUM = DateTimeFormat.getMediumDateTimeFormat();
- public static final DateTimeFormat DATE_TIME_FORMAT_SHORT = DateTimeFormat.getShortDateTimeFormat();
+ public static final DateTimeFormat DATE_TIME_FORMAT_FULL = DateTimeFormat
+ .getFormat(PredefinedFormat.DATE_TIME_FULL);
+ public static final DateTimeFormat DATE_TIME_FORMAT_LONG = DateTimeFormat
+ .getFormat(PredefinedFormat.DATE_TIME_LONG);
+ public static final DateTimeFormat DATE_TIME_FORMAT_MEDIUM = DateTimeFormat
+ .getFormat(PredefinedFormat.DATE_TIME_MEDIUM);
+ public static final DateTimeFormat DATE_TIME_FORMAT_SHORT = DateTimeFormat
+ .getFormat(PredefinedFormat.DATE_TIME_SHORT);
private DateTimeFormat dateTimeFormat;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackForm.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackForm.java
index 1d386b5..40614fc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackForm.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackForm.java
@@ -20,10 +20,10 @@ package org.rhq.enterprise.gui.coregui.client.components.upload;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
@@ -104,7 +104,7 @@ public class DynamicCallbackForm extends LocatableDynamicForm implements Dynamic
// because clients that detach the form panel when submission is
// complete can cause some browsers (i.e. Mozilla) to go into an
// 'infinite loading' state. See issue 916.
- DeferredCommand.addCommand(new Command() {
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
formHandlers.fireOnComplete(DynamicCallbackForm.this, impl.getContents(synthesizedFrame));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
index 69ed9f5..1a2893b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
@@ -98,8 +98,8 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
protected void onDraw() {
ArrayList<ListGridField> fields = new ArrayList<ListGridField>(5);
- ListGridField nameField = new ListGridField(ResourceDataSourceField.NAME.propertyName(), MSG
- .common_title_name());
+ ListGridField nameField = new ListGridField(ResourceDataSourceField.NAME.propertyName(),
+ MSG.common_title_name());
nameField.setCellFormatter(new CellFormatter() {
public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
return "<a href=\"" + LinkManager.getResourceLink(listGridRecord.getAttributeAsInt("id")) + "\">" + o
@@ -108,8 +108,8 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
});
fields.add(nameField);
- ListGridField versionField = new ListGridField(ResourceDataSourceField.VERSION.propertyName(), MSG
- .common_title_version());
+ ListGridField versionField = new ListGridField(ResourceDataSourceField.VERSION.propertyName(),
+ MSG.common_title_version());
fields.add(versionField);
ListGridField cpuField = new ListGridField("cpu", MSG.dataSource_platforms_field_cpu());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
index 934030b..cae65ef 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
@@ -93,35 +93,35 @@ public class InventorySummaryPortlet extends LocatableVLayout implements AutoRef
summary.getPlatformCount(), "Inventory/Resources/Platforms");
formItems.add(platformTotal);
- StaticTextItem serverTotal = createSummaryRow("serverTotal", MSG.common_title_server_total(), summary
- .getServerCount(), "Inventory/Resources/Servers");
+ StaticTextItem serverTotal = createSummaryRow("serverTotal", MSG.common_title_server_total(),
+ summary.getServerCount(), "Inventory/Resources/Servers");
formItems.add(serverTotal);
StaticTextItem serviceTotal = createSummaryRow("serviceTotal", MSG.common_title_service_total(),
summary.getServiceCount(), "Inventory/Resources/Services");
formItems.add(serviceTotal);
- StaticTextItem compatibleGroupTotal = createSummaryRow("compatibleGroupTotal", MSG
- .common_title_compatibleGroups_total(), summary.getCompatibleGroupCount(),
+ StaticTextItem compatibleGroupTotal = createSummaryRow("compatibleGroupTotal",
+ MSG.common_title_compatibleGroups_total(), summary.getCompatibleGroupCount(),
"Inventory/Groups/CompatibleGroups");
formItems.add(compatibleGroupTotal);
- StaticTextItem mixedGroupTotal = createSummaryRow("mixedGroupTotal", MSG
- .common_title_mixedGroups_total(), summary.getMixedGroupCount(), "Inventory/Groups/MixedGroups");
+ StaticTextItem mixedGroupTotal = createSummaryRow("mixedGroupTotal",
+ MSG.common_title_mixedGroups_total(), summary.getMixedGroupCount(), "Inventory/Groups/MixedGroups");
formItems.add(mixedGroupTotal);
- StaticTextItem groupDefinitionTotal = createSummaryRow("groupDefinitionTotal", MSG
- .common_title_group_def_total(), summary.getGroupDefinitionCount(),
+ StaticTextItem groupDefinitionTotal = createSummaryRow("groupDefinitionTotal",
+ MSG.common_title_group_def_total(), summary.getGroupDefinitionCount(),
"Inventory/Groups/DynagroupDefinitions");
formItems.add(groupDefinitionTotal);
- StaticTextItem avergeMetricsTotal = createSummaryRow("averageMetricsTotal", MSG
- .common_title_average_metrics(), summary.getScheduledMeasurementsPerMinute(), null);
+ StaticTextItem avergeMetricsTotal = createSummaryRow("averageMetricsTotal",
+ MSG.common_title_average_metrics(), summary.getScheduledMeasurementsPerMinute(), null);
formItems.add(avergeMetricsTotal);
form.setItems(formItems.toArray(new FormItem[formItems.size()]));
form.setWrapItemTitles(false);
- form.setCellSpacing(5);
+ form.setCellPadding(5);
addMember(form);
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/i18n/TestMessages.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/i18n/TestMessages.java
index 6ffba7c..9bf4676 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/i18n/TestMessages.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/i18n/TestMessages.java
@@ -18,8 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.i18n;
-import com.google.gwt.i18n.client.Messages;
import com.google.gwt.i18n.client.LocalizableResource.DefaultLocale;
+import com.google.gwt.i18n.client.Messages;
/*
* @PluralText takes an array of strings. The even indexes represent plural form names, while the odd indexes
@@ -52,6 +52,6 @@ public interface TestMessages extends Messages {
* @return a message specifying the number of items in the user's cart
*/
@DefaultMessage("{0}, there are {1,number} items in your cart")
- @PluralText( { "one", "{0}, there is {1,number} item in your cart" })
+ @AlternateMessage({ "one", "{0}, there is {1,number} item in your cart" })
String cartLabel(String subject, @PluralCount int cartItems);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java
index 6c9b167..01f350f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java
@@ -38,6 +38,7 @@ import ca.nanometrics.gflot.client.options.PointsSeriesOptions;
import ca.nanometrics.gflot.client.options.TickFormatter;
import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.smartgwt.client.types.AnimationEffect;
import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Img;
@@ -215,8 +216,8 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout {
// create the plot
SimplePlot plot = new SimplePlot(model, plotOptions);
- plot.setSize(String.valueOf(getInnerContentWidth()), String.valueOf(getInnerContentHeight()
- - titleHLayout.getHeight() - 50));
+ plot.setSize(String.valueOf(getInnerContentWidth()),
+ String.valueOf(getInnerContentHeight() - titleHLayout.getHeight() - 50));
// "80%","80%");
// add hover listener
@@ -267,8 +268,8 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout {
addMember(new LocatableWidgetCanvas(extendLocatorId("Plot"), plot));
- plot.setSize(String.valueOf(getInnerContentWidth()), String.valueOf(getInnerContentHeight()
- - titleHLayout.getHeight() - 50));
+ plot.setSize(String.valueOf(getInnerContentWidth()),
+ String.valueOf(getInnerContentHeight() - titleHLayout.getHeight() - 50));
}
@@ -294,7 +295,7 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout {
protected String getHover(PlotItem item) {
if (definition != null) {
- com.google.gwt.i18n.client.DateTimeFormat df = DateTimeFormat.getMediumDateTimeFormat();
+ com.google.gwt.i18n.client.DateTimeFormat df = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM);
return definition.getDisplayName() + ": "
+ MeasurementConverterClient.format(item.getDataPoint().getY(), definition.getUnits(), true) + "<br/>"
+ df.format(new Date((long) item.getDataPoint().getX()));
@@ -310,8 +311,8 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout {
handler.add(new DataPoint(d.getTimestamp(), d.getValue()));
}
- plotOptions.setYAxisOptions(new AxisOptions().setTicks(5).setLabelWidth(70).setTickFormatter(
- new TickFormatter() {
+ plotOptions.setYAxisOptions(new AxisOptions().setTicks(5).setLabelWidth(70)
+ .setTickFormatter(new TickFormatter() {
public String formatTickValue(double v, Axis axis) {
return MeasurementConverterClient.format(v, definition.getUnits(), true);
}
@@ -325,7 +326,8 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout {
plotOptions.setXAxisOptions(new AxisOptions().setTicks(xTicks).setMinimum(min).setMaximum(max)
.setTickFormatter(new TickFormatter() {
public String formatTickValue(double tickValue, Axis axis) {
- com.google.gwt.i18n.client.DateTimeFormat dateFormat = DateTimeFormat.getShortDateTimeFormat();
+ com.google.gwt.i18n.client.DateTimeFormat dateFormat = DateTimeFormat
+ .getFormat(PredefinedFormat.DATE_TIME_SHORT);
return dateFormat.format(new Date((long) tickValue));
// return String.valueOf(new Date((long) tickValue));
// return MONTH_NAMES[(int) (tickValue - 1)];
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionDataSource.java
index 0fa6245..04883bf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionDataSource.java
@@ -85,13 +85,13 @@ public class GroupDefinitionDataSource extends RPCDataSource<GroupDefinition, Re
fields.add(expressionField);
// it is a Long, but there is no DataSourceLongField and I've seen problems trying to use anything other than text field
- DataSourceTextField lastCalculationTimeIntervalField = new DataSourceTextField("lastCalculationTime", MSG
- .view_dynagroup_lastCalculationTime());
+ DataSourceTextField lastCalculationTimeIntervalField = new DataSourceTextField("lastCalculationTime",
+ MSG.view_dynagroup_lastCalculationTime());
fields.add(lastCalculationTimeIntervalField);
// it is a Long, but there is no DataSourceLongField and I've seen problems trying to use anything other than text field
- DataSourceTextField nextCalculationTimeField = new DataSourceTextField("nextCalculationTime", MSG
- .view_dynagroup_nextCalculationTime());
+ DataSourceTextField nextCalculationTimeField = new DataSourceTextField("nextCalculationTime",
+ MSG.view_dynagroup_nextCalculationTime());
fields.add(nextCalculationTimeField);
return fields;
@@ -108,8 +108,7 @@ public class GroupDefinitionDataSource extends RPCDataSource<GroupDefinition, Re
}
public void onSuccess(PageList<GroupDefinition> result) {
- populateSuccessResponse(result, response);
- processResponse(request.getRequestId(), response);
+ sendSuccessResponse(request, response, result);
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java
index 2346465..edc1611 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java
@@ -18,11 +18,29 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring;
-import ca.nanometrics.gflot.client.*;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Set;
+
+import ca.nanometrics.gflot.client.Axis;
+import ca.nanometrics.gflot.client.DataPoint;
+import ca.nanometrics.gflot.client.PlotItem;
+import ca.nanometrics.gflot.client.PlotModel;
+import ca.nanometrics.gflot.client.PlotModelStrategy;
+import ca.nanometrics.gflot.client.PlotPosition;
+import ca.nanometrics.gflot.client.SeriesHandler;
+import ca.nanometrics.gflot.client.SimplePlot;
import ca.nanometrics.gflot.client.event.PlotHoverListener;
import ca.nanometrics.gflot.client.jsni.Plot;
-import ca.nanometrics.gflot.client.options.*;
+import ca.nanometrics.gflot.client.options.AxisOptions;
+import ca.nanometrics.gflot.client.options.GridOptions;
+import ca.nanometrics.gflot.client.options.LineSeriesOptions;
+import ca.nanometrics.gflot.client.options.PlotOptions;
+import ca.nanometrics.gflot.client.options.PointsSeriesOptions;
+import ca.nanometrics.gflot.client.options.TickFormatter;
+
import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.AnimationEffect;
@@ -30,7 +48,13 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.events.*;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.events.CloseClickEvent;
+import com.smartgwt.client.widgets.events.CloseClickHandler;
+import com.smartgwt.client.widgets.events.MouseOutEvent;
+import com.smartgwt.client.widgets.events.MouseOutHandler;
+
import org.rhq.core.domain.measurement.MeasurementData;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementDefinition;
@@ -42,10 +66,6 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWidgetCanvas;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Set;
-
/**
* @author Greg Hinkle
*/
@@ -188,7 +208,7 @@ public class LiveGraphView extends LocatableVLayout {
private String getHover(PlotItem item) {
if (definition != null) {
- DateTimeFormat df = DateTimeFormat.getMediumDateTimeFormat();
+ DateTimeFormat df = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM);
return definition.getDisplayName() + ": "
+ MeasurementConverterClient.format(item.getDataPoint().getY(), definition.getUnits(), true) + "<br/>"
+ df.format(new Date((long) item.getDataPoint().getX()));
@@ -238,8 +258,8 @@ public class LiveGraphView extends LocatableVLayout {
dataLoader.scheduleRepeating(1000);
- plotOptions.setYAxisOptions(new AxisOptions().setLabelWidth(70).setTicks(5).setTickFormatter(
- new TickFormatter() {
+ plotOptions.setYAxisOptions(new AxisOptions().setLabelWidth(70).setTicks(5)
+ .setTickFormatter(new TickFormatter() {
public String formatTickValue(double v, Axis axis) {
return MeasurementConverterClient.format(v, definition.getUnits(), true);
}
@@ -250,7 +270,7 @@ public class LiveGraphView extends LocatableVLayout {
plotOptions.setXAxisOptions(new AxisOptions().setTicks(8).setTickFormatter(new TickFormatter() {
public String formatTickValue(double tickValue, Axis axis) {
- DateTimeFormat dateFormat = DateTimeFormat.getMediumTimeFormat();
+ DateTimeFormat dateFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM);
return dateFormat.format(new Date((long) tickValue));
}
}));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index 9daf6d5..0cc7f40 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -53,12 +53,12 @@ import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.SuggestOracle;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.TextBoxBase;
import com.google.gwt.user.client.ui.SuggestOracle.Callback;
import com.google.gwt.user.client.ui.SuggestOracle.Request;
import com.google.gwt.user.client.ui.SuggestOracle.Response;
import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.TextBoxBase;
import org.rhq.core.domain.search.SearchSuggestion;
import org.rhq.core.domain.search.SearchSuggestion.Kind;
@@ -665,32 +665,32 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
String expression = suggestionRequest.getQuery();
int caretPosition = suggestionRequest.getCursorPosition();
- searchService.getTabAwareSuggestions(searchBar.getSearchSubsystem(), expression, caretPosition, searchBar
- .getSelectedTab(), new AsyncCallback<List<SearchSuggestion>>() {
-
- public void onSuccess(List<SearchSuggestion> results) {
- adaptAndHandle(results.toArray(new SearchSuggestion[results.size()]));
- }
+ searchService.getTabAwareSuggestions(searchBar.getSearchSubsystem(), expression, caretPosition,
+ searchBar.getSelectedTab(), new AsyncCallback<List<SearchSuggestion>>() {
- public void onFailure(Throwable caught) {
- SearchSuggestion errorInform = new SearchSuggestion(Kind.InstructionalTextComment, MSG
- .view_searchBar_instructional_failSuggest());
- adaptAndHandle(errorInform);
- }
+ public void onSuccess(List<SearchSuggestion> results) {
+ adaptAndHandle(results.toArray(new SearchSuggestion[results.size()]));
+ }
- private void adaptAndHandle(SearchSuggestion... searchSuggestionResults) {
- List<SearchSuggestionOracleAdapter> adaptedResults = new java.util.ArrayList<SearchSuggestionOracleAdapter>();
- for (SearchSuggestion next : searchSuggestionResults) {
- adaptedResults.add(new SearchSuggestionOracleAdapter(next));
+ public void onFailure(Throwable caught) {
+ SearchSuggestion errorInform = new SearchSuggestion(Kind.InstructionalTextComment, MSG
+ .view_searchBar_instructional_failSuggest());
+ adaptAndHandle(errorInform);
}
- if (adaptedResults.isEmpty()) {
- adaptedResults.add(new SearchSuggestionOracleAdapter(new SearchSuggestion(
- Kind.InstructionalTextComment, MSG.view_searchBar_instructional_noSuggest())));
+
+ private void adaptAndHandle(SearchSuggestion... searchSuggestionResults) {
+ List<SearchSuggestionOracleAdapter> adaptedResults = new java.util.ArrayList<SearchSuggestionOracleAdapter>();
+ for (SearchSuggestion next : searchSuggestionResults) {
+ adaptedResults.add(new SearchSuggestionOracleAdapter(next));
+ }
+ if (adaptedResults.isEmpty()) {
+ adaptedResults.add(new SearchSuggestionOracleAdapter(new SearchSuggestion(
+ Kind.InstructionalTextComment, MSG.view_searchBar_instructional_noSuggest())));
+ }
+ SuggestOracle.Response response = new SuggestOracle.Response(adaptedResults);
+ callback.onSuggestionsReady(request, response);
}
- SuggestOracle.Response response = new SuggestOracle.Response(adaptedResults);
- callback.onSuggestionsReady(request, response);
- }
- });
+ });
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
index 9bfd7c3..16304dc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
@@ -18,10 +18,19 @@
*/
package org.rhq.enterprise.gui.coregui.client.util.message;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.Timer;
import com.smartgwt.client.data.SortSpecifier;
-import com.smartgwt.client.types.*;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.ListGridFieldType;
+import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.types.TimeDisplayFormat;
+import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.events.CloseClickEvent;
import com.smartgwt.client.widgets.events.CloseClickHandler;
@@ -30,7 +39,12 @@ import com.smartgwt.client.widgets.events.DoubleClickHandler;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
-import com.smartgwt.client.widgets.grid.*;
+import com.smartgwt.client.widgets.grid.HoverCustomizer;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.grid.SortNormalizer;
+
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
@@ -40,10 +54,6 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-
/**
* Message Center view that shows the latest messages generated by the app.
* This is a Table and can therefore be a member to any layout. However, it can
@@ -128,7 +138,8 @@ public class MessageCenterView extends Table implements MessageCenter.MessageLis
protected void configureTable() {
getListGrid().setEmptyMessage(MSG.view_messageCenter_noRecentMessages());
- updateTitleCanvas(MSG.view_messageCenter_lastNMessages(String.valueOf(CoreGUI.getMessageCenter().getMaxMessages())));
+ updateTitleCanvas(MSG.view_messageCenter_lastNMessages(String.valueOf(CoreGUI.getMessageCenter()
+ .getMaxMessages())));
ListGridField severityField = new ListGridField(FIELD_SEVERITY);
severityField.setType(ListGridFieldType.ICON);
@@ -178,7 +189,7 @@ public class MessageCenterView extends Table implements MessageCenter.MessageLis
ListGridField timeField = new ListGridField(FIELD_TIME, MSG.view_messageCenter_messageTime());
timeField.setType(ListGridFieldType.TIME);
- timeField.setAttribute("displayFormat", TimeFormatter.TOPADDEDTIME);
+ timeField.setAttribute("displayFormat", TimeDisplayFormat.TOPADDEDTIME);
timeField.setAlign(Alignment.LEFT);
timeField.setShowHover(true);
timeField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer(FIELD_TIME));
commit b0155c8cd39adb08b9e252c890d0673ec2391e92
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Jan 16 09:52:51 2012 -0500
trivial - clean up a bunch of unused imports
** Use your IDE settings to clean these up on file save! **
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/core/client/RHQDomain.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/core/client/RHQDomain.java
index 9669149..3140784 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/core/client/RHQDomain.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/core/client/RHQDomain.java
@@ -23,7 +23,6 @@
package org.rhq.core.client;
import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.ui.*;
public class RHQDomain implements EntryPoint {
public void onModuleLoad() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/EnhancedListGrid.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/EnhancedListGrid.java
index 596c7db..2edc60e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/EnhancedListGrid.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/EnhancedListGrid.java
@@ -18,13 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.components;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.grid.ListGrid;
-import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.layout.VStack;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
/**
@@ -32,7 +27,6 @@ import com.smartgwt.client.widgets.toolbar.ToolStrip;
*/
public class EnhancedListGrid extends VLayout {
-
ListGrid grid;
ToolStrip footer;
@@ -44,7 +38,6 @@ public class EnhancedListGrid extends VLayout {
addMember(footer);
}
-
public ListGrid getGrid() {
return grid;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/HeaderLabel.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/HeaderLabel.java
index 2052702..fed6efd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/HeaderLabel.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/HeaderLabel.java
@@ -18,9 +18,7 @@
*/
package org.rhq.enterprise.gui.coregui.client.components;
-
import com.smartgwt.client.widgets.HTMLFlow;
-import com.smartgwt.client.widgets.Label;
/**
* @author Greg Hinkle
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
index c1fb328..28bd22d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
@@ -62,7 +62,6 @@ import com.smartgwt.client.widgets.form.fields.PasswordItem;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.SpacerItem;
-import com.smartgwt.client.widgets.form.fields.SpinnerItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.form.fields.TextAreaItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
@@ -402,8 +401,8 @@ public class ConfigurationEditor extends LocatableVLayout {
if (groupDefinitions.isEmpty()) {
// No prop groups, so we just need a single form for the non-grouped props.
- List<PropertyDefinition> propertyDefinitions = new ArrayList<PropertyDefinition>(configurationDefinition
- .getNonGroupedProperties());
+ List<PropertyDefinition> propertyDefinitions = new ArrayList<PropertyDefinition>(
+ configurationDefinition.getNonGroupedProperties());
DynamicForm form = buildPropertiesForm(layout.extendLocatorId("Props"), propertyDefinitions, configuration);
form.setBorder("1px solid #AAA");
@@ -515,8 +514,8 @@ public class ConfigurationEditor extends LocatableVLayout {
}
List<PropertyDefinition> propertyDefinitions = new ArrayList<PropertyDefinition>(
- ((group == null) ? configurationDefinition.getNonGroupedProperties() : configurationDefinition
- .getPropertiesInGroup(group.getName())));
+ ((group == null) ? configurationDefinition.getNonGroupedProperties()
+ : configurationDefinition.getPropertiesInGroup(group.getName())));
DynamicForm form = buildPropertiesForm(locatorId, propertyDefinitions, configuration);
@@ -745,8 +744,8 @@ public class ConfigurationEditor extends LocatableVLayout {
invalidPropertySetChanged = (this.invalidPropertyNameToDisplayNameMap.remove(topLevelPropertyDefinition
.getName()) != null);
} else {
- invalidPropertySetChanged = (this.invalidPropertyNameToDisplayNameMap.put(topLevelPropertyDefinition
- .getName(), topLevelPropertyDefinition.getDisplayName()) == null);
+ invalidPropertySetChanged = (this.invalidPropertyNameToDisplayNameMap.put(
+ topLevelPropertyDefinition.getName(), topLevelPropertyDefinition.getDisplayName()) == null);
}
PropertyValueChangeEvent event = new PropertyValueChangeEvent(property, propertyDefinition,
@@ -768,8 +767,9 @@ public class ConfigurationEditor extends LocatableVLayout {
final PropertyMap propertyMap) {
boolean isDynamic = isDynamic(propertyDefinitionMap);
if (isDynamic) {
- PropertyDefinitionMap propertyDefinitionMapClone = new PropertyDefinitionMap(propertyDefinitionMap
- .getName(), propertyDefinitionMap.getDescription(), propertyDefinitionMap.isRequired());
+ PropertyDefinitionMap propertyDefinitionMapClone = new PropertyDefinitionMap(
+ propertyDefinitionMap.getName(), propertyDefinitionMap.getDescription(),
+ propertyDefinitionMap.isRequired());
propertyDefinitionMapClone.setConfigurationDefinition(propertyDefinitionMap.getConfigurationDefinition());
propertyDefinitionMapClone.setReadOnly(propertyDefinitionMap.isReadOnly());
addMemberPropertyDefinitionsToDynamicPropertyMap(propertyDefinitionMapClone, propertyMap);
@@ -830,8 +830,8 @@ public class ConfigurationEditor extends LocatableVLayout {
buttonBar.addMember(deleteControlsLayout);
final SelectItem selectItem = new SelectItem();
- selectItem.setValueMap(propertyDefinitionMap.getPropertyDefinitions().keySet().toArray(
- new String[propertyDefinitionMap.getPropertyDefinitions().size()]));
+ selectItem.setValueMap(propertyDefinitionMap.getPropertyDefinitions().keySet()
+ .toArray(new String[propertyDefinitionMap.getPropertyDefinitions().size()]));
selectItem.setMultiple(true);
selectItem.setMultipleAppearance(MultipleAppearance.GRID);
selectItem.setTitle(MSG.common_button_delete());
@@ -1050,18 +1050,18 @@ public class ConfigurationEditor extends LocatableVLayout {
PropertyDefinitionSimple defSimple = (PropertyDefinitionSimple) summaryPropDef;
PropertySimpleType propSimpleType = defSimple.getType();
switch (propSimpleType) {
- case BOOLEAN:
- field.setType(ListGridFieldType.BOOLEAN);
- break;
- case INTEGER:
- field.setType(ListGridFieldType.INTEGER);
- break;
- case FLOAT:
- case DOUBLE:
- field.setType(ListGridFieldType.FLOAT);
- break;
- default:
- field.setType(ListGridFieldType.TEXT);
+ case BOOLEAN:
+ field.setType(ListGridFieldType.BOOLEAN);
+ break;
+ case INTEGER:
+ field.setType(ListGridFieldType.INTEGER);
+ break;
+ case FLOAT:
+ case DOUBLE:
+ field.setType(ListGridFieldType.FLOAT);
+ break;
+ default:
+ field.setType(ListGridFieldType.TEXT);
}
return field;
}
@@ -1348,9 +1348,8 @@ public class ConfigurationEditor extends LocatableVLayout {
List<Validator> validators = buildValidators(propertyDefinitionSimple, propertySimple);
valueItem.setValidators(validators.toArray(new Validator[validators.size()]));
- if ((propertySimple.getConfiguration() != null) ||
- (propertySimple.getParentMap() != null) ||
- (propertySimple.getParentList() != null)) {
+ if ((propertySimple.getConfiguration() != null) || (propertySimple.getParentMap() != null)
+ || (propertySimple.getParentList() != null)) {
valueItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent changedEvent) {
updatePropertySimpleValue(changedEvent.getItem(), changedEvent.getValue(), propertySimple,
@@ -1407,7 +1406,7 @@ public class ConfigurationEditor extends LocatableVLayout {
}
protected void updatePropertySimpleValue(FormItem formItem, Object value, PropertySimple propertySimple,
- PropertyDefinitionSimple propertyDefinitionSimple) {
+ PropertyDefinitionSimple propertyDefinitionSimple) {
propertySimple.setErrorMessage(null);
propertySimple.setValue(value);
}
@@ -1461,8 +1460,7 @@ public class ConfigurationEditor extends LocatableVLayout {
if (isUnset) {
if (valueItem.getValue() != null) {
setValue(valueItem, null);
- updatePropertySimpleValue(unsetItem, null, propertySimple,
- propertyDefinitionSimple);
+ updatePropertySimpleValue(unsetItem, null, propertySimple, propertyDefinitionSimple);
firePropertyChangedEvent(propertySimple, propertyDefinitionSimple, true);
}
} else {
@@ -1668,8 +1666,8 @@ public class ConfigurationEditor extends LocatableVLayout {
buttonBar.addMember(okButton);
if (!mapReadOnly) {
- final IButton cancelButton = new LocatableIButton(buttonBar.extendLocatorId("Cancel"), MSG
- .common_button_cancel());
+ final IButton cancelButton = new LocatableIButton(buttonBar.extendLocatorId("Cancel"),
+ MSG.common_button_cancel());
cancelButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
public void onClick(ClickEvent clickEvent) {
layout.destroy();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/EscapedHtmlCellFormatter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/EscapedHtmlCellFormatter.java
index c60236c..27db60f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/EscapedHtmlCellFormatter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/EscapedHtmlCellFormatter.java
@@ -2,7 +2,7 @@ package org.rhq.enterprise.gui.coregui.client.components.table;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
+
import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
/**
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index d359e6b..e312b85 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -24,12 +24,10 @@ import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
import java.util.LinkedHashMap;
-import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.fields.CanvasItem;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.LinkItem;
import com.smartgwt.client.widgets.form.fields.SpacerItem;
@@ -175,8 +173,8 @@ public class DriftDetailsView extends LocatableVLayout {
category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
oldFileLink = createViewFileLink(driftDetails.getDrift().getOldDriftFile().getHashId(), driftDetails
- .getDrift().getPath(), driftDetails.getPreviousChangeSet().getVersion(), driftDetails
- .getOldFileStatus());
+ .getDrift().getPath(), driftDetails.getPreviousChangeSet().getVersion(),
+ driftDetails.getOldFileStatus());
newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
newFileLink = createViewFileLink(driftDetails.getDrift().getNewDriftFile().getHashId(), driftDetails
.getDrift().getPath(), driftDetails.getChangeSet().getVersion(), driftDetails.getNewFileStatus());
@@ -213,8 +211,8 @@ public class DriftDetailsView extends LocatableVLayout {
changeSetCategory.setValue(changeSet.getCategory().name());
StaticTextItem changeSetVersion = new StaticTextItem("changeSetVersion", MSG.common_title_version());
changeSetVersion.setValue(changeSet.getVersion());
- StaticTextItem changeSetDriftHandling = new StaticTextItem("changeSetDriftHandling", MSG
- .view_drift_table_driftHandlingMode());
+ StaticTextItem changeSetDriftHandling = new StaticTextItem("changeSetDriftHandling",
+ MSG.view_drift_table_driftHandlingMode());
changeSetDriftHandling.setValue(DriftDefinitionDataSource.getDriftHandlingModeDisplayName(changeSet
.getDriftHandlingMode()));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java
index 5725fb7..23f84ea 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java
@@ -24,7 +24,6 @@ import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.HTMLFlow;
-import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
index 35b97a0..c56638d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
@@ -19,7 +19,6 @@
package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.monitoring.traits;
import com.smartgwt.client.data.Criteria;
-import com.smartgwt.client.types.GroupStartOpen;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.HoverCustomizer;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryDataSource.java
index 37e93ce..9e7f94d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryDataSource.java
@@ -26,11 +26,8 @@ import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.GroupOperationHistoryCriteria;
import org.rhq.core.domain.operation.GroupOperationHistory;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.operation.ResourceOperationHistory;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.inventory.common.detail.operation.history.AbstractOperationHistoryDataSource;
commit a979e1be7391cc2239ad2ee268bce64f9dd0d5fc
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Jan 16 09:50:35 2012 -0500
trivial - clean up a bunch of unused/unnecessary variable compiler warnings
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AbstractConfigurationUpdateCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AbstractConfigurationUpdateCriteria.java
index f628b83..242de00 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AbstractConfigurationUpdateCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/AbstractConfigurationUpdateCriteria.java
@@ -34,7 +34,6 @@ import org.rhq.core.domain.util.PageOrdering;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
public abstract class AbstractConfigurationUpdateCriteria extends Criteria {
private static final long serialVersionUID = 1L;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
index 9317bab..2f9eb13 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
@@ -61,7 +61,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Ian Springer
*/
public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implements BookmarkableView {
-
+
private static final String HEADER_ICON = "global/Role_24.png";
private LocatableTab permissionsTab;
@@ -95,7 +95,8 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
public void onPermissionsLoaded(Set<Permission> perms) {
if (perms == null) {
// TODO: i18n
- CoreGUI.getErrorHandler().handleError("Failed to load global permissions for current user. Perhaps the Server is down.");
+ CoreGUI.getErrorHandler().handleError(
+ "Failed to load global permissions for current user. Perhaps the Server is down.");
return;
}
RoleEditView.this.hasManageSecurityPermission = perms.contains(Permission.MANAGE_SECURITY);
@@ -210,7 +211,6 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
@Override
protected Record createNewRecord() {
Role role = new Role();
- @SuppressWarnings( { "UnnecessaryLocalVariable" })
Record roleRecord = RolesDataSource.getInstance().copyValues(role);
return roleRecord;
}
@@ -234,15 +234,14 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
if (this.hasManageSecurityPermission || isMemberOfRole) {
// Create the permission editor and selectors and add them to the corresponding tabs.
- this.permissionsEditor = new PermissionsEditor(this, !hasManageSecurityPermission ||
- this.isSystemRole);
+ this.permissionsEditor = new PermissionsEditor(this, !hasManageSecurityPermission || this.isSystemRole);
updateTab(this.permissionsTab, this.permissionsEditor);
if (!this.isSystemRole) {
Record[] groupRecords = record.getAttributeAsRecordArray(RolesDataSource.Field.RESOURCE_GROUPS);
ListGridRecord[] groupListGridRecords = toListGridRecordArray(groupRecords);
- this.resourceGroupSelector = new RoleResourceGroupSelector(this.extendLocatorId("Groups"), groupListGridRecords,
- !this.hasManageSecurityPermission);
+ this.resourceGroupSelector = new RoleResourceGroupSelector(this.extendLocatorId("Groups"),
+ groupListGridRecords, !this.hasManageSecurityPermission);
this.resourceGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
public void onSelectionChanged(AssignedItemsChangedEvent event) {
onItemChanged();
@@ -265,7 +264,8 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
filteredSubjectRecords.add(subjectListGridRecord);
}
}
- subjectListGridRecords = filteredSubjectRecords.toArray(new ListGridRecord[filteredSubjectRecords.size()]);
+ subjectListGridRecords = filteredSubjectRecords.toArray(new ListGridRecord[filteredSubjectRecords
+ .size()]);
}
this.subjectSelector = new RoleSubjectSelector(this.extendLocatorId("Subjects"), subjectListGridRecords,
!this.hasManageSecurityPermission);
@@ -279,7 +279,7 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
if (this.isLdapConfigured) {
Record[] ldapGroupRecords = record.getAttributeAsRecordArray(RolesDataSource.Field.LDAP_GROUPS);
ListGridRecord[] ldapGroupListGridRecords = toListGridRecordArray(ldapGroupRecords);
- this.ldapGroupSelector = new RoleLdapGroupSelector(this.extendLocatorId("LdapGroups"),
+ this.ldapGroupSelector = new RoleLdapGroupSelector(this.extendLocatorId("LdapGroups"),
ldapGroupListGridRecords, !this.hasManageSecurityPermission);
this.ldapGroupSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
public void onSelectionChanged(AssignedItemsChangedEvent event) {
@@ -293,8 +293,8 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
Label label = new Label("<b>"
+ MSG.common_msg_emphasizedNotePrefix()
+ "</b> "
- + MSG.view_adminRoles_noLdap("href='#Administration/Configuration/SystemSettings'", MSG
- .view_adminConfig_systemSettings()));
+ + MSG.view_adminRoles_noLdap("href='#Administration/Configuration/SystemSettings'",
+ MSG.view_adminConfig_systemSettings()));
label.setWidth100();
label.setHeight(20);
label.setPadding(10);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleLdapGroupSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleLdapGroupSelector.java
index d3583ac..ee000a4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleLdapGroupSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleLdapGroupSelector.java
@@ -188,7 +188,7 @@ public class RoleLdapGroupSelector extends AbstractSelector<LdapGroup, org.rhq.c
} else {//return full list .. as no filtering done.
locatedGroupMaps = cachedLdapGroupsAvailable;
}
- @SuppressWarnings( { "UnnecessaryLocalVariable" })
+
PageList<LdapGroup> ldapGroups = convertToPageList(locatedGroupMaps);
return ldapGroups;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
index fd0c203..eed499f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
@@ -18,28 +18,37 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.users;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.Record;
-import com.smartgwt.client.widgets.form.fields.*;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.PasswordItem;
+import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
import com.smartgwt.client.widgets.grid.ListGridRecord;
+
import org.rhq.core.domain.auth.Principal;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.gui.coregui.client.*;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
+import org.rhq.enterprise.gui.coregui.client.PermissionsLoader;
+import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.form.AbstractRecordEditor;
import org.rhq.enterprise.gui.coregui.client.components.form.EnhancedDynamicForm;
import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsChangedEvent;
import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsChangedHandler;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
/**
* A form for viewing and/or editing an RHQ user (i.e. a {@link Subject}, and if the user is authenticated via RHQ and
* not LDAP, the password of the associated {@link Principal}).
@@ -70,11 +79,13 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
public void onPermissionsLoaded(Set<Permission> permissions) {
if (permissions == null) {
// TODO: i18n
- CoreGUI.getErrorHandler().handleError("Failed to load global permissions for current user. Perhaps the Server is down.");
+ CoreGUI.getErrorHandler().handleError(
+ "Failed to load global permissions for current user. Perhaps the Server is down.");
return;
}
- UserEditView.this.loggedInUserHasManageSecurityPermission = permissions.contains(Permission.MANAGE_SECURITY);
+ UserEditView.this.loggedInUserHasManageSecurityPermission = permissions
+ .contains(Permission.MANAGE_SECURITY);
Subject sessionSubject = UserSessionManager.getSessionSubject();
boolean isEditingSelf = (sessionSubject.getId() == getRecordId());
final boolean isReadOnly = (!UserEditView.this.loggedInUserHasManageSecurityPermission && !isEditingSelf);
@@ -105,7 +116,6 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
protected Record createNewRecord() {
Subject subject = new Subject();
subject.setFactive(true);
- @SuppressWarnings( { "UnnecessaryLocalVariable" })
Record userRecord = UsersDataSource.getInstance().copyUserValues(subject, false);
return userRecord;
}
@@ -162,7 +172,7 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
nameItem = new TextItem(UsersDataSource.Field.NAME);
} else {
nameItem = new StaticTextItem(UsersDataSource.Field.NAME);
- ((StaticTextItem)nameItem).setEscapeHTML(true);
+ ((StaticTextItem) nameItem).setEscapeHTML(true);
}
items.add(nameItem);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
index a0e3392..0526c07 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationComparisonView.java
@@ -18,6 +18,11 @@
*/
package org.rhq.enterprise.gui.coregui.client.components.configuration;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.List;
+
import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.events.CloseClickEvent;
import com.smartgwt.client.widgets.events.CloseClickHandler;
@@ -28,7 +33,12 @@ import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeGridField;
import com.smartgwt.client.widgets.tree.TreeNode;
-import org.rhq.core.domain.configuration.*;
+
+import org.rhq.core.domain.configuration.AbstractPropertyMap;
+import org.rhq.core.domain.configuration.AbstractResourceConfigurationUpdate;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.ResourceConfigurationUpdate;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
@@ -39,11 +49,6 @@ import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.List;
-
/**
* @author Greg Hinkle
*/
@@ -227,16 +232,10 @@ public class ConfigurationComparisonView extends VLayout {
private static class ComparisonTreeNode extends TreeNode {
- PropertyDefinitionSimple definition;
- List<PropertySimple> properties;
-
private ComparisonTreeNode(PropertyDefinitionSimple definition, List<PropertySimple> properties,
List<String> titles) {
super(definition.getDisplayName());
- this.definition = definition;
- this.properties = properties;
-
setAttribute("type", definition.getType().name());
int i = 0;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/IsLongValidator.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/IsLongValidator.java
index 2b25e73..fb66787 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/IsLongValidator.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/IsLongValidator.java
@@ -29,7 +29,6 @@ import com.smartgwt.client.widgets.form.validator.CustomValidator;
*
* @author Ian Springer
*/
-@SuppressWarnings({"UnnecessaryLocalVariable"})
public class IsLongValidator extends CustomValidator {
public IsLongValidator() {
@@ -84,11 +83,13 @@ public class IsLongValidator extends CustomValidator {
if (baseStringValue.length() == 19 && baseStringValue.charAt(0) == '9') {
if (isNegative) {
// must be <= 9223372036854775808
- boolean isValid = baseStringValue.matches("[9][0-2][0-2][0-3][0-3][0-7][0-2][0][0-3][0-6][0-8][0-5][0-4][0-7][0-7][0-5][0-8][0][0-8]");
+ boolean isValid = baseStringValue
+ .matches("[9][0-2][0-2][0-3][0-3][0-7][0-2][0][0-3][0-6][0-8][0-5][0-4][0-7][0-7][0-5][0-8][0][0-8]");
return isValid;
} else {
// must be <= 9223372036854775807
- boolean isValid = baseStringValue.matches("[9][0-2][0-2][0-3][0-3][0-7][0-2][0][0-3][0-6][0-8][0-5][0-4][0-7][0-7][0-5][0-8][0][0-7]");
+ boolean isValid = baseStringValue
+ .matches("[9][0-2][0-2][0-3][0-3][0-7][0-2][0][0-3][0-6][0-8][0-5][0-4][0-7][0-7][0-5][0-8][0][0-7]");
return isValid;
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/BooleanCellFormatter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/BooleanCellFormatter.java
index 1d3e13f..a8e81ea 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/BooleanCellFormatter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/BooleanCellFormatter.java
@@ -12,7 +12,8 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
*/
public class BooleanCellFormatter implements CellFormatter {
- private static String ICON_URL_NULL = ImageManager.getFullImagePath("subsystems/availability/availability_grey_16.png");
+ private static String ICON_URL_NULL = ImageManager
+ .getFullImagePath("subsystems/availability/availability_grey_16.png");
private static String ICON_URL_TRUE = ImageManager.getFullImagePath("global/permission_enabled_11.png");
private static String ICON_URL_FALSE = ImageManager.getFullImagePath("global/permission_disabled_11.png");
@@ -25,7 +26,6 @@ public class BooleanCellFormatter implements CellFormatter {
} else {
throw new IllegalArgumentException("value parameter is not a Boolean.");
}
- @SuppressWarnings({"UnnecessaryLocalVariable"})
String result = "<img src=\"" + imageUrl + "\" width=\"11\" height=\"11\"/>";
return result;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/trigger/JobTriggerEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/trigger/JobTriggerEditor.java
index 47f9014..3cde889 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/trigger/JobTriggerEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/trigger/JobTriggerEditor.java
@@ -40,9 +40,9 @@ import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
import com.smartgwt.client.widgets.form.fields.events.IconClickEvent;
import com.smartgwt.client.widgets.form.fields.events.IconClickHandler;
-
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
+
import org.rhq.core.domain.common.JobTrigger;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.form.DurationItem;
@@ -85,7 +85,6 @@ public class JobTriggerEditor extends LocatableVLayout {
private LocatableDynamicForm cronForm;
// These flags allow us to determine the trigger type.
- private boolean isCronMode;
private boolean isStartLater;
private boolean isRecurring;
private boolean isRepeatDuration;
@@ -212,7 +211,7 @@ public class JobTriggerEditor extends LocatableVLayout {
calendarTypeItem.setValue("now");
this.calendarTypeForm.setFields(calendarTypeItem);
-
+
this.calendarModeLayout.addMember(this.calendarTypeForm);
addMember(this.calendarModeLayout);
@@ -222,7 +221,7 @@ public class JobTriggerEditor extends LocatableVLayout {
this.cronForm = new LocatableDynamicForm(this.cronModeLayout.extendLocatorId("Form"));
TextItem cronExpressionItem = new TextItem(FIELD_CRON_EXPRESSION,
- MSG.widget_jobTriggerEditor_field_cronExpression());
+ MSG.widget_jobTriggerEditor_field_cronExpression());
cronExpressionItem.setRequired(true);
cronExpressionItem.setWidth(340);
@@ -244,279 +243,213 @@ public class JobTriggerEditor extends LocatableVLayout {
Tab formatTab = new Tab(MSG.widget_jobTriggerEditor_tab_format());
HTMLFlow formatPane = new HTMLFlow();
formatPane.setWidth100();
- formatPane.setContents("<p>A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the\n" +
- "allowed values, along with various combinations of the allowed special characters for that field. The fields are as\n" +
- "follows:</p>\n" +
- "<table cellpadding=\"3\" cellspacing=\"1\">\n" +
- " <tbody>\n" +
- "\n" +
- " <tr>\n" +
- " <th>Field Name</th>\n" +
- " <th>Mandatory</th>\n" +
- " <th>Allowed Values</th>\n" +
- " <th>Allowed Special Characters</th>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Seconds</td>\n" +
- " <td>YES</td>\n" +
- "\n" +
- " <td>0-59</td>\n" +
- " <td>, - * /</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Minutes</td>\n" +
- " <td>YES</td>\n" +
- " <td>0-59</td>\n" +
- "\n" +
- " <td>, - * /</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Hours</td>\n" +
- " <td>YES</td>\n" +
- " <td>0-23</td>\n" +
- " <td>, - * /</td>\n" +
- "\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Day of month</td>\n" +
- " <td>YES</td>\n" +
- " <td>1-31</td>\n" +
- " <td>, - * ? / L W<br clear=\"all\" />\n" +
- " </td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Month</td>\n" +
- " <td>YES</td>\n" +
- " <td>1-12 or JAN-DEC</td>\n" +
- " <td>, - * /</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Day of week</td>\n" +
- "\n" +
- " <td>YES</td>\n" +
- " <td>1-7 or SUN-SAT</td>\n" +
- " <td>, - * ? / L #</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td>Year</td>\n" +
- " <td>NO</td>\n" +
- "\n" +
- " <td>empty, 1970-2099</td>\n" +
- " <td>, - * /</td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "\n" +
- "</table>\n" +
- "<p>So cron expressions can be as simple as this: <tt>* * * * ? *</tt><br />\n" +
- "or more complex, like this: <tt>0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010</tt></p>\n" +
- "\n" +
- "<h2><a name=\"CronTriggersTutorial-Specialcharacters\"></a>Special Characters</h2>\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>*</b></tt> (<em>\"all values\"</em>) - used to select all values within a field. For example, \"*\"\n" +
- " in the minute field means <em>\"every minute\"</em>.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>?</b></tt> (<em>\"no specific value\"</em>) - useful when you need to specify something in one of the\n" +
- " two fields in which the character is allowed, but not the other. For example, if I want my trigger to fire on a\n" +
- " particular day of the month (say, the 10th), but don't care what day of the week that happens to be, I would put\n" +
- " \"10\" in the day-of-month field, and \"?\" in the day-of-week field. See the examples below for clarification.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>-</b></tt> - used to specify ranges. For example, \"10-12\" in the hour field means <em>\"the\n" +
- " hours 10, 11 and 12\"</em>.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>,</b></tt> - used to specify additional values. For example, \"MON,WED,FRI\" in the day-of-week\n" +
- " field means <em>\"the days Monday, Wednesday, and Friday\"</em>.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "\n" +
- "<ul>\n" +
- "\n" +
- " <li><tt><b>/</b></tt> - used to specify increments. For example, \"0/15\" in the seconds field means <em>\"the\n" +
- " seconds 0, 15, 30, and 45\"</em>. And \"5/15\" in the seconds field means <em>\"the seconds 5, 20, 35, and 50\"</em>. You can\n" +
- " also specify '/' after the '<b>' character - in this case '</b>' is equivalent to having '0' before the '/'. '1/3'\n" +
- " in the day-of-month field means <em>\"fire every 3 days starting on the first day of the month\"</em>.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>L</b></tt> (<em>\"last\"</em>) - has different meaning in each of the two fields in which it is\n" +
- " allowed. For example, the value \"L\" in the day-of-month field means <em>\"the last day of the month\"</em> - day\n" +
- " 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means\n" +
- " \"7\" or \"SAT\". But if used in the day-of-week field after another value, it means <em>\"the last xxx day of the\n" +
- " month\"</em> - for example \"6L\" means <em>\"the last friday of the month\"</em>. When using the 'L' option, it is\n" +
- " important not to specify lists, or ranges of values, as you'll get confusing results.</li>\n" +
- "\n" +
- "</ul>\n" +
- "\n" +
- "\n" +
- "<ul>\n" +
- " <li><tt><b>W</b></tt> (<em>\"weekday\"</em>) - used to specify the weekday (Monday-Friday) nearest the given day.\n" +
- " As an example, if you were to specify \"15W\" as the value for the day-of-month field, the meaning is: <em>\"the\n" +
- " nearest weekday to the 15th of the month\"</em>. So if the 15th is a Saturday, the trigger will fire on Friday the 14th.\n" +
- " If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on\n" +
- " Tuesday the 15th. However if you specify \"1W\" as the value for day-of-month, and the 1st is a Saturday, the trigger\n" +
- " will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only\n" +
- " be specified when the day-of-month is a single day, not a range or list of days.\n" +
- " <div class=\"tip\">\n" +
- " The 'L' and 'W' characters can also be combined in the day-of-month field to yield 'LW', which\n" +
- " translates to <em>\"last weekday of the month\"</em>.\n" +
- " </div>\n" +
- "\n" +
- " </li>\n" +
- "\n" +
- " <li><tt><b>#</b></tt> - used to specify \"the nth\" XXX day of the month. For example, the value of \"6#3\"\n" +
- " in the day-of-week field means <em>\"the third Friday of the month\"</em> (day 6 = Friday and \"#3\" = the 3rd one in\n" +
- " the month). Other examples: \"2#1\" = the first Monday of the month and \"4#5\" = the fifth Wednesday of the month. Note\n" +
- " that if you specify \"#5\" and there is not 5 of the given day-of-week in the month, then no firing will occur that\n" +
- " month.\n" +
- " <div class=\"tip\">\n" +
- " The legal characters and the names of months and days of the week are not case sensitive. <tt>MON</tt>\n" +
- " is the same as <tt>mon</tt>.\n" +
- " </div>\n" +
- "\n" +
- " </li>\n" +
- "</ul>" +
- "<h2><a name=\"CronTriggersTutorial-Notes\"></a>Notes</h2>\n" +
- "\n" +
- "<ul>\n" +
- " <li>Support for specifying both a day-of-week and a day-of-month value is not complete (you must currently use\n" +
- " the '?' character in one of these fields).</li>\n" +
- " <li>Be careful when setting fire times between mid-night and 1:00 AM - \"daylight savings\" can cause a skip or a\n" +
- " repeat depending on whether the time moves back or jumps forward.</li>\n" +
- "\n" +
- "</ul>");
+ formatPane
+ .setContents("<p>A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the\n"
+ + "allowed values, along with various combinations of the allowed special characters for that field. The fields are as\n"
+ + "follows:</p>\n"
+ + "<table cellpadding=\"3\" cellspacing=\"1\">\n"
+ + " <tbody>\n"
+ + "\n"
+ + " <tr>\n"
+ + " <th>Field Name</th>\n"
+ + " <th>Mandatory</th>\n"
+ + " <th>Allowed Values</th>\n"
+ + " <th>Allowed Special Characters</th>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Seconds</td>\n"
+ + " <td>YES</td>\n"
+ + "\n"
+ + " <td>0-59</td>\n"
+ + " <td>, - * /</td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Minutes</td>\n"
+ + " <td>YES</td>\n"
+ + " <td>0-59</td>\n"
+ + "\n"
+ + " <td>, - * /</td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Hours</td>\n"
+ + " <td>YES</td>\n"
+ + " <td>0-23</td>\n"
+ + " <td>, - * /</td>\n"
+ + "\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Day of month</td>\n"
+ + " <td>YES</td>\n"
+ + " <td>1-31</td>\n"
+ + " <td>, - * ? / L W<br clear=\"all\" />\n"
+ + " </td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Month</td>\n"
+ + " <td>YES</td>\n"
+ + " <td>1-12 or JAN-DEC</td>\n"
+ + " <td>, - * /</td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Day of week</td>\n"
+ + "\n"
+ + " <td>YES</td>\n"
+ + " <td>1-7 or SUN-SAT</td>\n"
+ + " <td>, - * ? / L #</td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + "\n"
+ + " <td>Year</td>\n"
+ + " <td>NO</td>\n"
+ + "\n"
+ + " <td>empty, 1970-2099</td>\n"
+ + " <td>, - * /</td>\n"
+ + " </tr>\n"
+ + " </tbody>\n"
+ + "\n"
+ + "</table>\n"
+ + "<p>So cron expressions can be as simple as this: <tt>* * * * ? *</tt><br />\n"
+ + "or more complex, like this: <tt>0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010</tt></p>\n"
+ + "\n"
+ + "<h2><a name=\"CronTriggersTutorial-Specialcharacters\"></a>Special Characters</h2>\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>*</b></tt> (<em>\"all values\"</em>) - used to select all values within a field. For example, \"*\"\n"
+ + " in the minute field means <em>\"every minute\"</em>.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>?</b></tt> (<em>\"no specific value\"</em>) - useful when you need to specify something in one of the\n"
+ + " two fields in which the character is allowed, but not the other. For example, if I want my trigger to fire on a\n"
+ + " particular day of the month (say, the 10th), but don't care what day of the week that happens to be, I would put\n"
+ + " \"10\" in the day-of-month field, and \"?\" in the day-of-week field. See the examples below for clarification.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>-</b></tt> - used to specify ranges. For example, \"10-12\" in the hour field means <em>\"the\n"
+ + " hours 10, 11 and 12\"</em>.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>,</b></tt> - used to specify additional values. For example, \"MON,WED,FRI\" in the day-of-week\n"
+ + " field means <em>\"the days Monday, Wednesday, and Friday\"</em>.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "\n"
+ + "<ul>\n"
+ + "\n"
+ + " <li><tt><b>/</b></tt> - used to specify increments. For example, \"0/15\" in the seconds field means <em>\"the\n"
+ + " seconds 0, 15, 30, and 45\"</em>. And \"5/15\" in the seconds field means <em>\"the seconds 5, 20, 35, and 50\"</em>. You can\n"
+ + " also specify '/' after the '<b>' character - in this case '</b>' is equivalent to having '0' before the '/'. '1/3'\n"
+ + " in the day-of-month field means <em>\"fire every 3 days starting on the first day of the month\"</em>.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>L</b></tt> (<em>\"last\"</em>) - has different meaning in each of the two fields in which it is\n"
+ + " allowed. For example, the value \"L\" in the day-of-month field means <em>\"the last day of the month\"</em> - day\n"
+ + " 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means\n"
+ + " \"7\" or \"SAT\". But if used in the day-of-week field after another value, it means <em>\"the last xxx day of the\n"
+ + " month\"</em> - for example \"6L\" means <em>\"the last friday of the month\"</em>. When using the 'L' option, it is\n"
+ + " important not to specify lists, or ranges of values, as you'll get confusing results.</li>\n"
+ + "\n"
+ + "</ul>\n"
+ + "\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li><tt><b>W</b></tt> (<em>\"weekday\"</em>) - used to specify the weekday (Monday-Friday) nearest the given day.\n"
+ + " As an example, if you were to specify \"15W\" as the value for the day-of-month field, the meaning is: <em>\"the\n"
+ + " nearest weekday to the 15th of the month\"</em>. So if the 15th is a Saturday, the trigger will fire on Friday the 14th.\n"
+ + " If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on\n"
+ + " Tuesday the 15th. However if you specify \"1W\" as the value for day-of-month, and the 1st is a Saturday, the trigger\n"
+ + " will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only\n"
+ + " be specified when the day-of-month is a single day, not a range or list of days.\n"
+ + " <div class=\"tip\">\n"
+ + " The 'L' and 'W' characters can also be combined in the day-of-month field to yield 'LW', which\n"
+ + " translates to <em>\"last weekday of the month\"</em>.\n"
+ + " </div>\n"
+ + "\n"
+ + " </li>\n"
+ + "\n"
+ + " <li><tt><b>#</b></tt> - used to specify \"the nth\" XXX day of the month. For example, the value of \"6#3\"\n"
+ + " in the day-of-week field means <em>\"the third Friday of the month\"</em> (day 6 = Friday and \"#3\" = the 3rd one in\n"
+ + " the month). Other examples: \"2#1\" = the first Monday of the month and \"4#5\" = the fifth Wednesday of the month. Note\n"
+ + " that if you specify \"#5\" and there is not 5 of the given day-of-week in the month, then no firing will occur that\n"
+ + " month.\n"
+ + " <div class=\"tip\">\n"
+ + " The legal characters and the names of months and days of the week are not case sensitive. <tt>MON</tt>\n"
+ + " is the same as <tt>mon</tt>.\n"
+ + " </div>\n"
+ + "\n"
+ + " </li>\n"
+ + "</ul>"
+ + "<h2><a name=\"CronTriggersTutorial-Notes\"></a>Notes</h2>\n"
+ + "\n"
+ + "<ul>\n"
+ + " <li>Support for specifying both a day-of-week and a day-of-month value is not complete (you must currently use\n"
+ + " the '?' character in one of these fields).</li>\n"
+ + " <li>Be careful when setting fire times between mid-night and 1:00 AM - \"daylight savings\" can cause a skip or a\n"
+ + " repeat depending on whether the time moves back or jumps forward.</li>\n" + "\n" + "</ul>");
formatTab.setPane(formatPane);
Tab examplesTab = new Tab(MSG.widget_jobTriggerEditor_tab_examples());
HTMLFlow examplesPane = new HTMLFlow();
examplesPane.setWidth100();
- examplesPane.setContents("<table cellpadding=\"3\" cellspacing=\"1\">\n" +
- " <tbody>\n" +
- " <tr>\n" +
- " <th>Expression</th>\n" +
- "\n" +
- " <th>Meaning</th>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 0 12 * * ?</tt></td>\n" +
- "\n" +
- " <td>Fire at 12pm (noon) every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td><tt>0 15 10 ? * *</tt></td>\n" +
- " <td>Fire at 10:15am every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 * * ?</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am every day</td>\n" +
- "\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 * * ? *</tt></td>\n" +
- " <td>Fire at 10:15am every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 * * ? 2005</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am every day during the year 2005</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 * 14 * * ?</tt></td>\n" +
- " <td>Fire every minute starting at 2pm and ending at 2:59pm, every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td><tt>0 0/5 14 * * ?</tt></td>\n" +
- "\n" +
- " <td>Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 0/5 14,18 * * ?</tt></td>\n" +
- " <td>Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5\n" +
- " minutes starting at 6pm and ending at 6:55pm, every day</td>\n" +
- "\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 0-5 14 * * ?</tt></td>\n" +
- "\n" +
- " <td>Fire every minute starting at 2pm and ending at 2:05pm, every day</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 10,44 14 ? 3 WED</tt></td>\n" +
- "\n" +
- " <td>Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 ? * MON-FRI</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td><tt>0 15 10 15 * ?</tt></td>\n" +
- " <td>Fire at 10:15am on the 15th day of every month</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 L * ?</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am on the last day of every month</td>\n" +
- "\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 ? * 6L</tt></td>\n" +
- " <td>Fire at 10:15am on the last Friday of every month</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 ? * 6L</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am on the last Friday of every month</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 15 10 ? * 6L 2002-2005</tt></td>\n" +
- " <td>Fire at 10:15am on every last friday of every month during the years 2002,\n" +
- " 2003, 2004 and 2005</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- "\n" +
- " <td><tt>0 15 10 ? * 6#3</tt></td>\n" +
- "\n" +
- " <td>Fire at 10:15am on the third Friday of every month</td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 0 12 1/5 * ?</tt></td>\n" +
- " <td>Fire at 12pm (noon) every 5 days every month, starting on the first day of the\n" +
- " month.</td>\n" +
- "\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td><tt>0 11 11 11 11 ?</tt></td>\n" +
- "\n" +
- " <td>Fire every November 11th at 11:11am.</td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "</table>");
+ examplesPane.setContents("<table cellpadding=\"3\" cellspacing=\"1\">\n" + " <tbody>\n" + " <tr>\n"
+ + " <th>Expression</th>\n" + "\n" + " <th>Meaning</th>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 0 12 * * ?</tt></td>\n" + "\n"
+ + " <td>Fire at 12pm (noon) every day</td>\n" + " </tr>\n" + " <tr>\n" + "\n"
+ + " <td><tt>0 15 10 ? * *</tt></td>\n" + " <td>Fire at 10:15am every day</td>\n"
+ + " </tr>\n" + " <tr>\n" + " <td><tt>0 15 10 * * ?</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am every day</td>\n" + "\n" + " </tr>\n" + " <tr>\n"
+ + " <td><tt>0 15 10 * * ? *</tt></td>\n" + " <td>Fire at 10:15am every day</td>\n"
+ + " </tr>\n" + " <tr>\n" + " <td><tt>0 15 10 * * ? 2005</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am every day during the year 2005</td>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 * 14 * * ?</tt></td>\n"
+ + " <td>Fire every minute starting at 2pm and ending at 2:59pm, every day</td>\n"
+ + " </tr>\n" + " <tr>\n" + "\n" + " <td><tt>0 0/5 14 * * ?</tt></td>\n" + "\n"
+ + " <td>Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day</td>\n"
+ + " </tr>\n" + " <tr>\n" + " <td><tt>0 0/5 14,18 * * ?</tt></td>\n"
+ + " <td>Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5\n"
+ + " minutes starting at 6pm and ending at 6:55pm, every day</td>\n" + "\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 0-5 14 * * ?</tt></td>\n" + "\n"
+ + " <td>Fire every minute starting at 2pm and ending at 2:05pm, every day</td>\n"
+ + " </tr>\n" + " <tr>\n" + " <td><tt>0 10,44 14 ? 3 WED</tt></td>\n" + "\n"
+ + " <td>Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.</td>\n"
+ + " </tr>\n" + " <tr>\n" + " <td><tt>0 15 10 ? * MON-FRI</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday</td>\n"
+ + " </tr>\n" + " <tr>\n" + "\n" + " <td><tt>0 15 10 15 * ?</tt></td>\n"
+ + " <td>Fire at 10:15am on the 15th day of every month</td>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 15 10 L * ?</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am on the last day of every month</td>\n" + "\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 15 10 ? * 6L</tt></td>\n"
+ + " <td>Fire at 10:15am on the last Friday of every month</td>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 15 10 ? * 6L</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am on the last Friday of every month</td>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 15 10 ? * 6L 2002-2005</tt></td>\n"
+ + " <td>Fire at 10:15am on every last friday of every month during the years 2002,\n"
+ + " 2003, 2004 and 2005</td>\n" + " </tr>\n" + " <tr>\n" + "\n"
+ + " <td><tt>0 15 10 ? * 6#3</tt></td>\n" + "\n"
+ + " <td>Fire at 10:15am on the third Friday of every month</td>\n" + " </tr>\n"
+ + " <tr>\n" + " <td><tt>0 0 12 1/5 * ?</tt></td>\n"
+ + " <td>Fire at 12pm (noon) every 5 days every month, starting on the first day of the\n"
+ + " month.</td>\n" + "\n" + " </tr>\n" + " <tr>\n"
+ + " <td><tt>0 11 11 11 11 ?</tt></td>\n" + "\n"
+ + " <td>Fire every November 11th at 11:11am.</td>\n" + " </tr>\n" + " </tbody>\n"
+ + "</table>");
examplesTab.setPane(examplesPane);
cronHelpTabSet.addTab(formatTab);
@@ -551,7 +484,7 @@ public class JobTriggerEditor extends LocatableVLayout {
calendarTypeItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
- String calendarType = (String)event.getValue();
+ String calendarType = (String) event.getValue();
changeCalendarType(calendarType);
}
});
@@ -588,12 +521,10 @@ public class JobTriggerEditor extends LocatableVLayout {
private void changeMode(String mode) {
if (mode.equals("calendar")) {
- this.isCronMode = false;
calendarModeLayout.show();
cronModeLayout.hide();
} else {
// cron expression mode
- this.isCronMode = true;
calendarModeLayout.hide();
cronModeLayout.show();
}
@@ -613,8 +544,7 @@ public class JobTriggerEditor extends LocatableVLayout {
supportedUnits.add(TimeUnit.MONTHS);
supportedUnits.add(TimeUnit.YEARS);
DurationItem repeatIntervalItem = new DurationItem(FIELD_REPEAT_INTERVAL,
- MSG.widget_jobTriggerEditor_field_repeatInterval_now(),
- supportedUnits, false, this.isReadOnly, repeatForm);
+ MSG.widget_jobTriggerEditor_field_repeatInterval_now(), supportedUnits, false, this.isReadOnly, repeatForm);
repeatIntervalItem.setRequired(true);
repeatIntervalItem.setContextualHelp(MSG.widget_jobTriggerEditor_fieldHelp_repeatInterval());
@@ -635,8 +565,8 @@ public class JobTriggerEditor extends LocatableVLayout {
supportedUnits.add(TimeUnit.WEEKS);
supportedUnits.add(TimeUnit.MONTHS);
supportedUnits.add(TimeUnit.YEARS);
- final DurationItem repeatDurationItem = new DurationItem(FIELD_REPEAT_DURATION, null,
- supportedUnits, true, this.isReadOnly, repeatForm);
+ final DurationItem repeatDurationItem = new DurationItem(FIELD_REPEAT_DURATION, null, supportedUnits, true,
+ this.isReadOnly, repeatForm);
repeatDurationItem.setShowTitle(false);
repeatDurationItem.setVisible(false);
repeatDurationItem.setContextualHelp(MSG.widget_jobTriggerEditor_fieldHelp_repeatDuration());
@@ -649,7 +579,7 @@ public class JobTriggerEditor extends LocatableVLayout {
recurrenceTypeItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
- String recurrenceType = (String)event.getValue();
+ String recurrenceType = (String) event.getValue();
changeRecurrenceType(recurrenceType, endTimeItem, repeatDurationItem);
}
});
@@ -692,7 +622,8 @@ public class JobTriggerEditor extends LocatableVLayout {
laterForm.setNumCols(4);
laterForm.setColWidths(140, 130, 130);
- RadioGroupItem startTypeItem = new RadioGroupItem(FIELD_START_TYPE, MSG.widget_jobTriggerEditor_field_startType());
+ RadioGroupItem startTypeItem = new RadioGroupItem(FIELD_START_TYPE,
+ MSG.widget_jobTriggerEditor_field_startType());
LinkedHashMap<String, String> startTypeValueMap = new LinkedHashMap<String, String>();
startTypeValueMap.put("on", MSG.widget_jobTriggerEditor_value_on());
startTypeValueMap.put("in", MSG.widget_jobTriggerEditor_value_in());
@@ -709,8 +640,8 @@ public class JobTriggerEditor extends LocatableVLayout {
supportedUnits.add(TimeUnit.WEEKS);
supportedUnits.add(TimeUnit.MONTHS);
supportedUnits.add(TimeUnit.YEARS);
- final DurationItem startDelayItem = new DurationItem(FIELD_START_DELAY, null,
- supportedUnits, false, this.isReadOnly, laterForm);
+ final DurationItem startDelayItem = new DurationItem(FIELD_START_DELAY, null, supportedUnits, false,
+ this.isReadOnly, laterForm);
startDelayItem.setShowTitle(false);
startDelayItem.setVisible(false);
startDelayItem.setContextualHelp(MSG.widget_jobTriggerEditor_fieldHelp_startDelay());
@@ -719,7 +650,7 @@ public class JobTriggerEditor extends LocatableVLayout {
startTypeItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
- String startType = (String)event.getValue();
+ String startType = (String) event.getValue();
changeStartType(startType, startDelayItem, startTimeItem);
}
});
@@ -771,7 +702,7 @@ public class JobTriggerEditor extends LocatableVLayout {
startTime = new Date(startTimestamp);
} else {
// start time
- DateTimeItem startTimeItem = (DateTimeItem)this.laterForm.getField(FIELD_START_TIME);
+ DateTimeItem startTimeItem = (DateTimeItem) this.laterForm.getField(FIELD_START_TIME);
startTime = startTimeItem.getValueAsDate();
}
return startTime;
@@ -824,7 +755,7 @@ public class JobTriggerEditor extends LocatableVLayout {
endTime = new Date(endTimestamp);
}
} else if (this.isEndTime) {
- DateTimeItem endTimeItem = (DateTimeItem)this.repeatForm.getField(FIELD_END_TIME);
+ DateTimeItem endTimeItem = (DateTimeItem) this.repeatForm.getField(FIELD_END_TIME);
endTime = endTimeItem.getValueAsDate();
} else {
endTime = null;
@@ -852,16 +783,15 @@ public class JobTriggerEditor extends LocatableVLayout {
if (startTime != null) {
if (startTime.before(currentTime)) {
Message message = new Message(MSG.widget_jobTriggerEditor_message_startTimeMustBeInFuture(),
- Message.Severity.Error,
- EnumSet.of(Message.Option.Transient));
+ Message.Severity.Error, EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(message);
isValid = false;
}
if (this.isRecurring && endTime != null) {
if (endTime.before(startTime)) {
- Message message = new Message(MSG.widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime(),
- Message.Severity.Error,
- EnumSet.of(Message.Option.Transient));
+ Message message = new Message(
+ MSG.widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime(), Message.Severity.Error,
+ EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(message);
isValid = false;
}
@@ -873,8 +803,7 @@ public class JobTriggerEditor extends LocatableVLayout {
if (endTime != null) {
if (endTime.before(currentTime)) {
Message message = new Message(MSG.widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime(),
- Message.Severity.Error,
- EnumSet.of(Message.Option.Transient));
+ Message.Severity.Error, EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(message);
isValid = false;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
index 04e92f5..08e4d75 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
@@ -46,6 +46,7 @@ import org.rhq.enterprise.gui.coregui.client.Messages;
*/
public class PortletHelpWindow extends Window {
private static Messages MSG = CoreGUI.getMessages();
+ @SuppressWarnings("unused")
private DashboardPortlet storedPortlet;
private Portlet view;
@@ -86,7 +87,5 @@ public class PortletHelpWindow extends Window {
}
addItem(layout);
-
}
-
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/HistoryGroupResourceConfigurationMembers.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/HistoryGroupResourceConfigurationMembers.java
index 4985158..1ba63bc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/HistoryGroupResourceConfigurationMembers.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/HistoryGroupResourceConfigurationMembers.java
@@ -70,6 +70,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
*/
public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
private final ResourceGroup group;
+ @SuppressWarnings("unused")
private final ResourcePermission groupPerms;
private final int groupUpdateId;
@@ -82,7 +83,8 @@ public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
setMargin(5);
setMembersMargin(5);
- String backPath = LinkManager.getGroupResourceConfigurationUpdateHistoryLink(EntityContext.forGroup(this.group), null);
+ String backPath = LinkManager.getGroupResourceConfigurationUpdateHistoryLink(
+ EntityContext.forGroup(this.group), null);
BackButton backButton = new BackButton(extendLocatorId("BackButton"), MSG.view_tableSection_backButton(),
backPath);
addMember(backButton);
@@ -107,8 +109,7 @@ public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
ListGridField fieldResource = new ListGridField(AncestryUtil.RESOURCE_NAME, MSG.common_title_resource());
fieldResource.setCellFormatter(new CellFormatter() {
public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
- String url = LinkManager
- .getResourceLink(listGridRecord.getAttributeAsInt(AncestryUtil.RESOURCE_ID));
+ String url = LinkManager.getResourceLink(listGridRecord.getAttributeAsInt(AncestryUtil.RESOURCE_ID));
return SeleniumUtility.getLocatableHref(url, o.toString(), null);
}
});
@@ -121,11 +122,11 @@ public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
});
ListGridField fieldAncestry = AncestryUtil.setupAncestryListGridField();
- ListGridField fieldDateCreated = new ListGridField(DataSource.Field.DATECREATED, MSG
- .common_title_dateCreated());
+ ListGridField fieldDateCreated = new ListGridField(DataSource.Field.DATECREATED,
+ MSG.common_title_dateCreated());
TimestampCellFormatter.prepareDateField(fieldDateCreated);
- ListGridField fieldLastUpdated = new ListGridField(DataSource.Field.LASTUPDATED, MSG
- .common_title_lastUpdated());
+ ListGridField fieldLastUpdated = new ListGridField(DataSource.Field.LASTUPDATED,
+ MSG.common_title_lastUpdated());
TimestampCellFormatter.prepareDateField(fieldLastUpdated);
ListGridField fieldStatus = new ListGridField(DataSource.Field.STATUS, MSG.common_title_status());
ListGridField fieldUser = new ListGridField(DataSource.Field.USER, MSG.common_title_user());
@@ -142,14 +143,14 @@ public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
fieldStatus.setType(ListGridFieldType.ICON);
HashMap<String, String> statusIcons = new HashMap<String, String>(4);
- statusIcons.put(ConfigurationUpdateStatus.SUCCESS.name(), ImageManager
- .getResourceConfigurationIcon(ConfigurationUpdateStatus.SUCCESS));
- statusIcons.put(ConfigurationUpdateStatus.FAILURE.name(), ImageManager
- .getResourceConfigurationIcon(ConfigurationUpdateStatus.FAILURE));
- statusIcons.put(ConfigurationUpdateStatus.INPROGRESS.name(), ImageManager
- .getResourceConfigurationIcon(ConfigurationUpdateStatus.INPROGRESS));
- statusIcons.put(ConfigurationUpdateStatus.NOCHANGE.name(), ImageManager
- .getResourceConfigurationIcon(ConfigurationUpdateStatus.NOCHANGE));
+ statusIcons.put(ConfigurationUpdateStatus.SUCCESS.name(),
+ ImageManager.getResourceConfigurationIcon(ConfigurationUpdateStatus.SUCCESS));
+ statusIcons.put(ConfigurationUpdateStatus.FAILURE.name(),
+ ImageManager.getResourceConfigurationIcon(ConfigurationUpdateStatus.FAILURE));
+ statusIcons.put(ConfigurationUpdateStatus.INPROGRESS.name(),
+ ImageManager.getResourceConfigurationIcon(ConfigurationUpdateStatus.INPROGRESS));
+ statusIcons.put(ConfigurationUpdateStatus.NOCHANGE.name(),
+ ImageManager.getResourceConfigurationIcon(ConfigurationUpdateStatus.NOCHANGE));
fieldStatus.setValueIcons(statusIcons);
fieldStatus.addRecordClickHandler(new RecordClickHandler() {
@Override
@@ -280,8 +281,8 @@ public class HistoryGroupResourceConfigurationMembers extends LocatableVLayout {
record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_TYPES, typesWrapper);
// Build the decoded ancestry Strings now for display
- record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_VALUE, AncestryUtil
- .getAncestryValue(record));
+ record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_VALUE,
+ AncestryUtil.getAncestryValue(record));
}
response.setData(records);
response.setTotalRows(result.getTotalSize()); // for paging to work we have to specify size of full result set
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/HistoryGroupPluginConfigurationMembers.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/HistoryGroupPluginConfigurationMembers.java
index 569e819..d473398 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/HistoryGroupPluginConfigurationMembers.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/HistoryGroupPluginConfigurationMembers.java
@@ -70,6 +70,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
*/
public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
private final ResourceGroup group;
+ @SuppressWarnings("unused")
private final ResourcePermission groupPerms;
private final int groupUpdateId;
@@ -81,7 +82,8 @@ public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
setMargin(5);
setMembersMargin(5);
- String backPath = LinkManager.getGroupPluginConfigurationUpdateHistoryLink(EntityContext.forGroup(this.group), null);
+ String backPath = LinkManager.getGroupPluginConfigurationUpdateHistoryLink(EntityContext.forGroup(this.group),
+ null);
BackButton backButton = new BackButton(extendLocatorId("BackButton"), MSG.view_tableSection_backButton(),
backPath);
addMember(backButton);
@@ -106,8 +108,7 @@ public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
ListGridField fieldResource = new ListGridField(AncestryUtil.RESOURCE_NAME, MSG.common_title_resource());
fieldResource.setCellFormatter(new CellFormatter() {
public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
- String url = LinkManager
- .getResourceLink(listGridRecord.getAttributeAsInt(AncestryUtil.RESOURCE_ID));
+ String url = LinkManager.getResourceLink(listGridRecord.getAttributeAsInt(AncestryUtil.RESOURCE_ID));
return SeleniumUtility.getLocatableHref(url, o.toString(), null);
}
});
@@ -120,11 +121,11 @@ public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
});
ListGridField fieldAncestry = AncestryUtil.setupAncestryListGridField();
- ListGridField fieldDateCreated = new ListGridField(DataSource.Field.DATECREATED, MSG
- .common_title_dateCreated());
+ ListGridField fieldDateCreated = new ListGridField(DataSource.Field.DATECREATED,
+ MSG.common_title_dateCreated());
TimestampCellFormatter.prepareDateField(fieldDateCreated);
- ListGridField fieldLastUpdated = new ListGridField(DataSource.Field.LASTUPDATED, MSG
- .common_title_lastUpdated());
+ ListGridField fieldLastUpdated = new ListGridField(DataSource.Field.LASTUPDATED,
+ MSG.common_title_lastUpdated());
TimestampCellFormatter.prepareDateField(fieldLastUpdated);
ListGridField fieldStatus = new ListGridField(DataSource.Field.STATUS, MSG.common_title_status());
ListGridField fieldUser = new ListGridField(DataSource.Field.USER, MSG.common_title_user());
@@ -141,14 +142,14 @@ public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
fieldStatus.setType(ListGridFieldType.ICON);
HashMap<String, String> statusIcons = new HashMap<String, String>(4);
- statusIcons.put(ConfigurationUpdateStatus.SUCCESS.name(), ImageManager
- .getPluginConfigurationIcon(ConfigurationUpdateStatus.SUCCESS));
- statusIcons.put(ConfigurationUpdateStatus.FAILURE.name(), ImageManager
- .getPluginConfigurationIcon(ConfigurationUpdateStatus.FAILURE));
- statusIcons.put(ConfigurationUpdateStatus.INPROGRESS.name(), ImageManager
- .getPluginConfigurationIcon(ConfigurationUpdateStatus.INPROGRESS));
- statusIcons.put(ConfigurationUpdateStatus.NOCHANGE.name(), ImageManager
- .getPluginConfigurationIcon(ConfigurationUpdateStatus.NOCHANGE));
+ statusIcons.put(ConfigurationUpdateStatus.SUCCESS.name(),
+ ImageManager.getPluginConfigurationIcon(ConfigurationUpdateStatus.SUCCESS));
+ statusIcons.put(ConfigurationUpdateStatus.FAILURE.name(),
+ ImageManager.getPluginConfigurationIcon(ConfigurationUpdateStatus.FAILURE));
+ statusIcons.put(ConfigurationUpdateStatus.INPROGRESS.name(),
+ ImageManager.getPluginConfigurationIcon(ConfigurationUpdateStatus.INPROGRESS));
+ statusIcons.put(ConfigurationUpdateStatus.NOCHANGE.name(),
+ ImageManager.getPluginConfigurationIcon(ConfigurationUpdateStatus.NOCHANGE));
fieldStatus.setValueIcons(statusIcons);
fieldStatus.addRecordClickHandler(new RecordClickHandler() {
@Override
@@ -279,8 +280,8 @@ public class HistoryGroupPluginConfigurationMembers extends LocatableVLayout {
record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_TYPES, typesWrapper);
// Build the decoded ancestry Strings now for display
- record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_VALUE, AncestryUtil
- .getAncestryValue(record));
+ record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY_VALUE,
+ AncestryUtil.getAncestryValue(record));
}
response.setData(records);
response.setTotalRows(result.getTotalSize()); // for paging to work we have to specify size of full result set
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/table/GroupMembersHealthView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/table/GroupMembersHealthView.java
index c8e6ee7..dcd450c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/table/GroupMembersHealthView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/table/GroupMembersHealthView.java
@@ -92,4 +92,9 @@ public class GroupMembersHealthView extends MembersView {
}
});
}
+
+ public boolean isCanModifyMembers() {
+ return canModifyMembers;
+ }
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java
index 9a2f729..d7c118a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryDetailsView.java
@@ -51,6 +51,7 @@ public class ResourceOperationHistoryDetailsView extends AbstractOperationHistor
private String disambiguatedResourceName;
private boolean showResourceField;
+ @SuppressWarnings("unused")
private ResourceComposite resourceComposite;
public ResourceOperationHistoryDetailsView(String locatorId) {
@@ -83,7 +84,8 @@ public class ResourceOperationHistoryDetailsView extends AbstractOperationHistor
if (groupOperationHistory != null) {
StaticTextItem groupOperationHistoryItem = new StaticTextItem(
ResourceOperationHistoryDataSource.Field.GROUP_OPERATION_HISTORY, "Parent Group Execution");
- String groupOperationHistoryUrl = LinkManager.getGroupOperationHistoryLink(groupOperationHistory.getGroup(), groupOperationHistory.getId());
+ String groupOperationHistoryUrl = LinkManager.getGroupOperationHistoryLink(
+ groupOperationHistory.getGroup(), groupOperationHistory.getId());
String value = "<a href=\"" + groupOperationHistoryUrl + "\">" + groupOperationHistory.getId()
+ "</a> (on group '" + groupOperationHistory.getGroup().getName() + "')";
groupOperationHistoryItem.setValue(value);
@@ -115,8 +117,8 @@ public class ResourceOperationHistoryDetailsView extends AbstractOperationHistor
if (showResourceField) {
Resource resource = resourceOperationHistory.getResource();
String url = LinkManager.getResourceLink(resource.getId());
- disambiguatedResourceName = SeleniumUtility.getLocatableHref(url, resource.getName(), String
- .valueOf(resource.getId()));
+ disambiguatedResourceName = SeleniumUtility.getLocatableHref(url, resource.getName(),
+ String.valueOf(resource.getId()));
}
displayDetails(resourceOperationHistory);
@@ -139,8 +141,8 @@ public class ResourceOperationHistoryDetailsView extends AbstractOperationHistor
.getResultsConfigurationDefinition();
if (resultsConfigurationDefinition != null
&& !resultsConfigurationDefinition.getPropertyDefinitions().isEmpty()) {
- ConfigurationEditor editor = new ConfigurationEditor(extendLocatorId("results"), operationDefinition
- .getResultsConfigurationDefinition(), operationHistory.getResults());
+ ConfigurationEditor editor = new ConfigurationEditor(extendLocatorId("results"),
+ operationDefinition.getResultsConfigurationDefinition(), operationHistory.getResults());
editor.setReadOnly(true);
resultsSection.addMember(editor);
} else {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
index 8d0b6c9..ffd35be 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
@@ -39,7 +39,6 @@ public class ResourceFactoryPackageStep extends AbstractWizardStep {
private PackageVersionFileUploadForm uploadForm;
private ResourceFactoryCreateWizard wizard;
private boolean isUploadComplete = false;
- private int packageVersionId;
public ResourceFactoryPackageStep(ResourceFactoryCreateWizard wizard) {
this.wizard = wizard;
@@ -50,12 +49,12 @@ public class ResourceFactoryPackageStep extends AbstractWizardStep {
if (parent != null) {
uploadForm = new PackageVersionFileUploadForm(parent.extendLocatorId("ResFactPackageStep"), wizard
- .getNewResourcePackageType().getId(), wizard.getChildType().getName(), wizard
- .getNewResourceVersion(), wizard.getNewResourceArchitectureId(), null, true, true, null);
+ .getNewResourcePackageType().getId(), wizard.getChildType().getName(),
+ wizard.getNewResourceVersion(), wizard.getNewResourceArchitectureId(), null, true, true, null);
} else {
uploadForm = new PackageVersionFileUploadForm("ResFactPackageStep", wizard.getNewResourcePackageType()
- .getId(), wizard.getChildType().getName(), wizard.getNewResourceVersion(), wizard
- .getNewResourceArchitectureId(), null, true, true, null);
+ .getId(), wizard.getChildType().getName(), wizard.getNewResourceVersion(),
+ wizard.getNewResourceArchitectureId(), null, true, true, null);
}
uploadForm.setPadding(20);
uploadForm.addFormHandler(new DynamicFormHandler() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
index e28b586..84235af 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
@@ -55,11 +55,10 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
*/
public class OperationHistoryView extends TableSection<OperationHistoryDataSource> {
- public static final ViewName SUBSYSTEM_VIEW_ID = new ViewName("RecentOperations", MSG
- .common_title_recent_operations());
+ public static final ViewName SUBSYSTEM_VIEW_ID = new ViewName("RecentOperations",
+ MSG.common_title_recent_operations());
private static final Criteria INITIAL_CRITERIA = new Criteria();
- private static final String HEADER_ICON = "subsystems/control/Operation_24.png";
private static final SortSpecifier DEFAULT_SORT_SPECIFIER = new SortSpecifier(
OperationHistoryDataSource.Field.CREATED_TIME, SortDirection.DESCENDING);
@@ -117,17 +116,17 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
statusValues.put(OperationRequestStatus.CANCELED.name(), MSG.common_status_canceled());
statusValues.put(OperationRequestStatus.FAILURE.name(), MSG.common_status_failed());
LinkedHashMap<String, String> statusIcons = new LinkedHashMap<String, String>(3);
- statusIcons.put(OperationRequestStatus.SUCCESS.name(), ImageManager
- .getOperationResultsIcon(OperationRequestStatus.SUCCESS));
- statusIcons.put(OperationRequestStatus.INPROGRESS.name(), ImageManager
- .getOperationResultsIcon(OperationRequestStatus.INPROGRESS));
- statusIcons.put(OperationRequestStatus.CANCELED.name(), ImageManager
- .getOperationResultsIcon(OperationRequestStatus.CANCELED));
- statusIcons.put(OperationRequestStatus.FAILURE.name(), ImageManager
- .getOperationResultsIcon(OperationRequestStatus.FAILURE));
-
- SelectItem statusFilter = new EnumSelectItem(OperationHistoryDataSource.Field.STATUS, MSG
- .common_title_operation_status(), OperationRequestStatus.class, statusValues, statusIcons);
+ statusIcons.put(OperationRequestStatus.SUCCESS.name(),
+ ImageManager.getOperationResultsIcon(OperationRequestStatus.SUCCESS));
+ statusIcons.put(OperationRequestStatus.INPROGRESS.name(),
+ ImageManager.getOperationResultsIcon(OperationRequestStatus.INPROGRESS));
+ statusIcons.put(OperationRequestStatus.CANCELED.name(),
+ ImageManager.getOperationResultsIcon(OperationRequestStatus.CANCELED));
+ statusIcons.put(OperationRequestStatus.FAILURE.name(),
+ ImageManager.getOperationResultsIcon(OperationRequestStatus.FAILURE));
+
+ SelectItem statusFilter = new EnumSelectItem(OperationHistoryDataSource.Field.STATUS,
+ MSG.common_title_operation_status(), OperationRequestStatus.class, statusValues, statusIcons);
statusFilter.setWidth(325);
if (isShowFilterForm()) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/GwtRelativeDurationConverter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/GwtRelativeDurationConverter.java
index 0959d9b..911400c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/GwtRelativeDurationConverter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/GwtRelativeDurationConverter.java
@@ -22,7 +22,6 @@ public class GwtRelativeDurationConverter {
private static final long MILLIS_IN_SECOND = 1000L;
private static final long MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND;
private static final long MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE;
- private static final long NEVER = -1;
private static final long MILLIS_IN_DAY = 24 * MILLIS_IN_HOUR;
private static final DateTimeFormat dayFormatter = DateTimeFormat.getFormat("d");
@@ -50,6 +49,7 @@ public class GwtRelativeDurationConverter {
return result;
}
+ @SuppressWarnings("unused")
private static TimeZone getTimeZone() {
if (tz == null) {
return TimeZone.createTimeZone(TimeZoneInfo.buildTimeZoneData(""));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/measurement/GwtMeasurementConverter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/measurement/GwtMeasurementConverter.java
index 6833d07..fe21676 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/measurement/GwtMeasurementConverter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/measurement/GwtMeasurementConverter.java
@@ -109,7 +109,6 @@ public class GwtMeasurementConverter {
targetUnits = fittedUnits;
}
- @SuppressWarnings("unused")
Set<String> existingStrings; // technically this *is* unused because
int precisionDigits = 1;
boolean scaleWithMorePrecision = true;
@@ -341,8 +340,8 @@ public class GwtMeasurementConverter {
}
if (wasNegative) {
- return new MeasurementNumericValueAndUnits(-currentValueAndUnits.getValue(), currentValueAndUnits
- .getUnits());
+ return new MeasurementNumericValueAndUnits(-currentValueAndUnits.getValue(),
+ currentValueAndUnits.getUnits());
}
return currentValueAndUnits;
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 1b844aa..6f56f65 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
@@ -104,7 +104,6 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl implements O
public void invokeResourceOperation(int resourceId, String operationName, Configuration parameters,
String description, int timeout) throws RuntimeException {
try {
- @SuppressWarnings("unused")
ResourceOperationSchedule opSchedule = operationManager.scheduleResourceOperation(getSessionSubject(),
resourceId, operationName, 0, 0, 0, 0, parameters, description);
} catch (Throwable t) {
@@ -117,7 +116,6 @@ public class OperationGWTServiceImpl extends AbstractGWTServiceImpl implements O
try {
CronTrigger cronTrigger = new CronTrigger("resource " + resourceId + "_" + operationName, "group",
cronString);
- @SuppressWarnings("unused")
ResourceOperationSchedule opSchedule = operationManager.scheduleResourceOperation(getSessionSubject(),
resourceId, operationName, parameters, cronTrigger, description);
} catch (Throwable 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 d4624ef..5cbc8de 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
@@ -135,11 +135,11 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
File downloadsDir = getCliAlertScriptDownloadsDir();
List<File> files = getFiles(downloadsDir);
if (files == null) {
- return new HashMap<String, String>(0);
+ return new HashMap<String, String>(0);
} else {
HashMap<String, String> ret = new HashMap<String, String>(files.size());
-
- for(File file : files) {
+
+ for (File file : files) {
ret.put(file.getName(), "/downloads/cli-alert-scripts/" + file.getName());
}
return ret;
@@ -148,7 +148,7 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
throw getExceptionToThrowToClient(t);
}
}
-
+
@Override
public HashMap<String, String> getClientVersionProperties() throws RuntimeException {
File versionFile = new File(getClientDownloadDir(), "rhq-client-version.properties");
@@ -210,7 +210,7 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
}
return downloadDir;
}
-
+
private File getClientDownloadDir() {
File serverHomeDir = getServerHomeDir();
File downloadDir = new File(serverHomeDir, "deploy/rhq.ear/rhq-downloads/rhq-client");
@@ -249,6 +249,7 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
}
// GWT does not support java.util.Properties - we have to convert to/from Properties <-> HashMap
+ @SuppressWarnings("unused")
private Properties convertToProperties(HashMap<String, String> map) {
Properties props = new Properties();
if (map != null) {
commit 536525a315b8665a18fe743d9ed5006c73d13d04
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jan 13 16:56:26 2012 -0500
Change deprecated ListGrid.getSelection() to ListGrid.getSelectedRecords()
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NotificationsAlertDefinitionForm.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NotificationsAlertDefinitionForm.java
index 1b3133f..26dbae8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NotificationsAlertDefinitionForm.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NotificationsAlertDefinitionForm.java
@@ -262,7 +262,7 @@ public class NotificationsAlertDefinitionForm extends LocatableVLayout implement
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
AlertNotification notif = (getDataSource()).copyValues(selectedRows[0]);
popupNotificationEditor(notif);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentListView.java
index a1f2c13..e6671ca 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentListView.java
@@ -147,7 +147,7 @@ public class BundleDeploymentListView extends Table<BundleDeploymentDataSource>
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_BUNDLE_ID);
String selectedVersionId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_ID);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationListView.java
index 6e3d4cd..42ef2b4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationListView.java
@@ -134,7 +134,7 @@ public class BundleDestinationListView extends Table<BundleDestinationDataSource
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute(BundleDestinationDataSource.FIELD_BUNDLE_ID);
String selectedDestId = selectedRows[0].getAttribute(BundleDestinationDataSource.FIELD_ID);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
index 9db4577..d3666fe 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
@@ -121,7 +121,7 @@ public class BundlesListView extends Table<BundlesWithLatestVersionDataSource> {
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute(BundlesWithLatestVersionDataSource.FIELD_ID);
CoreGUI.goToView(LinkManager.getBundleLink(Integer.valueOf(selectedId)));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java
index 10e1e43..ad0f43e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionListView.java
@@ -90,7 +90,7 @@ public class BundleVersionListView extends Table<BundleVersionDataSource> {
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_BUNDLE_ID);
String selectedVersionId = selectedRows[0].getAttribute(BundleVersionDataSource.FIELD_ID);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/carousel/Carousel.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/carousel/Carousel.java
index 55e3cbc..42403da 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/carousel/Carousel.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/carousel/Carousel.java
@@ -838,7 +838,7 @@ public abstract class Carousel extends LocatableHLayout implements RefreshableVi
//this.listGrid.setSelectionType(getDefaultSelectionStyle());
}
- //int selectionCount = this.listGrid.getSelection().length;
+ //int selectionCount = this.listGrid.getSelectedRecords().length;
for (CarouselActionInfo carouselAction : this.carouselActions) {
if (carouselAction.actionCanvas != null) { // if null, we haven't initialized our buttons yet, so skip this
boolean enabled = (!this.carouselActionDisableOverride && carouselAction.action.isEnabled());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/selector/AbstractSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/selector/AbstractSelector.java
index 63019a9..0d98e36 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/selector/AbstractSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/selector/AbstractSelector.java
@@ -537,7 +537,7 @@ public abstract class AbstractSelector<T, C extends org.rhq.core.domain.criteria
private void notifyAssignedItemsChangedHandlers() {
for (AssignedItemsChangedHandler handler : this.assignedItemsChangedHandlers) {
- handler.onSelectionChanged(new AssignedItemsChangedEvent(this.assignedGrid.getSelection()));
+ handler.onSelectionChanged(new AssignedItemsChangedEvent(this.assignedGrid.getSelectedRecords()));
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/sorter/ReorderableList.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/sorter/ReorderableList.java
index 7e06b20..134f8f4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/sorter/ReorderableList.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/sorter/ReorderableList.java
@@ -169,7 +169,7 @@ public class ReorderableList extends LocatableVLayout {
private void notifyListOrderChangedHandlers() {
for (ListOrderChangedHandler handler : this.listOrderChangedHandlers) {
- handler.onListOrderChanged(new ListOrderChangedEvent(this.listGrid.getSelection()));
+ handler.onListOrderChanged(new ListOrderChangedEvent(this.listGrid.getSelectedRecords()));
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
index b89934c..1092d74 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
@@ -166,7 +166,7 @@ public abstract class AbstractTableSection<DS extends RPCDataSource, ID> extends
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
showDetails(selectedRows[0]);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index 3be68ac..ad9e43c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -996,7 +996,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
this.listGrid.setSelectionType(getDefaultSelectionStyle());
}
- //int selectionCount = this.listGrid.getSelection().length;
+ //int selectionCount = this.listGrid.getSelectedRecords().length;
for (TableActionInfo tableAction : this.tableActions) {
if (tableAction.actionCanvas != null) { // if null, we haven't initialized our buttons yet, so skip this
boolean enabled = (!this.tableActionDisableOverride && tableAction.action.isEnabled(this.listGrid
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
index 1b23485..ba738a2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
@@ -357,7 +357,7 @@ public class GroupConfigurationUpdatesPortlet extends LocatableVLayout implement
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
index 9c54052..c6d8e9d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
@@ -368,7 +368,7 @@ class GroupOperationsCriteriaHistoryListView extends GroupOperationHistoryListVi
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index 55e8305..9be65b5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -292,7 +292,7 @@ public abstract class AbstractRecentAlertsPortlet extends AlertHistoryView imple
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
index f26e9b4..fe02236 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
@@ -296,7 +296,7 @@ public abstract class AbstractRecentDriftsPortlet extends DriftHistoryView imple
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
index 15f2428..66564c3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
@@ -262,7 +262,7 @@ public abstract class AbstractOperationHistoryPortlet extends OperationHistoryVi
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
index d56d95c..90e2ce3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
@@ -151,7 +151,7 @@ public class ResourceConfigurationUpdatesPortlet extends GroupConfigurationUpdat
public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
- int count = getListGrid().getSelection().length;
+ int count = getListGrid().getSelectedRecords().length;
getTableInfo().setContents(
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()), String.valueOf(count)));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftCarouselMemberView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftCarouselMemberView.java
index 991ec84..7488d8e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftCarouselMemberView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftCarouselMemberView.java
@@ -98,7 +98,7 @@ public class DriftCarouselMemberView extends DriftHistoryView implements Carouse
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
ListGridRecord record = selectedRows[0];
Integer resourceId = record.getAttributeAsInt(AncestryUtil.RESOURCE_ID);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/history/AbstractOperationHistoryListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/history/AbstractOperationHistoryListView.java
index 9309c48..e4b2d7f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/history/AbstractOperationHistoryListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/history/AbstractOperationHistoryListView.java
@@ -271,7 +271,7 @@ public abstract class AbstractOperationHistoryListView<T extends AbstractOperati
@Override
protected void deleteSelectedRecords(DSRequest requestProperties) {
- final ListGridRecord[] recordsToBeDeleted = getListGrid().getSelection();
+ final ListGridRecord[] recordsToBeDeleted = getListGrid().getSelectedRecords();
final int numberOfRecordsToBeDeleted = recordsToBeDeleted.length;
Boolean forceValue = (requestProperties != null &&
requestProperties.getAttributeAsBoolean(AbstractOperationHistoryDataSource.RequestAttribute.FORCE));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
index 65bcbae..a6740c0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
@@ -233,7 +233,7 @@ public class ResourceGroupListView extends Table<ResourceGroupCompositeDataSourc
setListGridDoubleClickHandler(new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute("id");
CoreGUI.goToView(LinkManager.getResourceGroupLink(Integer.valueOf(selectedId)));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/SingleGroupDefinitionView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/SingleGroupDefinitionView.java
index 73fa07f..e01d25a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/SingleGroupDefinitionView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/SingleGroupDefinitionView.java
@@ -300,7 +300,7 @@ public class SingleGroupDefinitionView extends LocatableVLayout implements Bookm
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String groupUrl = LinkManager.getResourceGroupLink(selectedRows[0].getAttributeAsInt("id"));
CoreGUI.goToView(groupUrl);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
index c9210e9..231ff56 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
@@ -175,7 +175,7 @@ public class ResourceSearchView extends Table {
setListGridDoubleClickHandler(new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute("id");
CoreGUI.goToView(LinkManager.getResourceLink(Integer.valueOf(selectedId)));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
index 94f0887..0d41906 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
@@ -171,7 +171,7 @@ public class ChildHistoryView extends Table<ChildHistoryView.DataSource> {
setListGridDoubleClickHandler(new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String typeString = selectedRows[0].getAttribute(DataSource.Field.TYPE);
ChildHistoryDetails detailsView = null;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
index ae1ebfc..b698e65 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
@@ -121,7 +121,7 @@ public class ResourceErrorsView extends Table<ResourceErrorsDataSource> {
@Override
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length > 0) {
String details = selectedRows[0].getAttribute(Field.DETAIL);
popupDetails(details);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index afbaeaf..af84edf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -389,7 +389,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
private void updateButtonEnablement(IButton selectAllButton, IButton deselectAllButton, IButton importButton,
IButton ignoreButton, IButton unignoreButton) {
- if (treeGrid.getSelection().length == 0) {
+ if (treeGrid.getSelectedRecords().length == 0) {
selectAllButton.setDisabled(false);
deselectAllButton.setDisabled(true);
importButton.setDisabled(true);
@@ -399,7 +399,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
return;
}
- boolean allSelected = (treeGrid.getSelection().length == treeGrid.getRecords().length);
+ boolean allSelected = (treeGrid.getSelectedRecords().length == treeGrid.getRecords().length);
selectAllButton.setDisabled(allSelected);
deselectAllButton.setDisabled(false);
@@ -407,7 +407,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
boolean ignoreOk = false;
boolean unignoreOk = false;
- for (ListGridRecord listGridRecord : treeGrid.getSelection()) {
+ for (ListGridRecord listGridRecord : treeGrid.getSelectedRecords()) {
TreeNode node = treeGrid.getTree().findById(listGridRecord.getAttribute("id"));
String status = node.getAttributeAsString("status");
TreeNode parentNode = treeGrid.getTree().getParent(node);
@@ -438,7 +438,7 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
private int[] getSelectedIds() {
List<Integer> selected = new ArrayList<Integer>();
- for (ListGridRecord node : treeGrid.getSelection()) {
+ for (ListGridRecord node : treeGrid.getSelectedRecords()) {
if (!InventoryStatus.COMMITTED.name().equals(node.getAttributeAsString("status"))) {
selected.add(Integer.parseInt(node.getAttributeAsString("id")));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
index 5461aa0..e28b586 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
@@ -180,7 +180,7 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
@Override
protected void deleteSelectedRecords(DSRequest requestProperties) {
- final ListGridRecord[] recordsToBeDeleted = getListGrid().getSelection();
+ final ListGridRecord[] recordsToBeDeleted = getListGrid().getSelectedRecords();
final int numberOfRecordsToBeDeleted = recordsToBeDeleted.length;
Boolean forceValue = (requestProperties != null && requestProperties.getAttributeAsBoolean("force"));
boolean force = ((forceValue != null) && forceValue);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/DriftComplianceReportResourceSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/DriftComplianceReportResourceSearchView.java
index e076aae..faca27b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/DriftComplianceReportResourceSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/DriftComplianceReportResourceSearchView.java
@@ -118,7 +118,7 @@ public class DriftComplianceReportResourceSearchView extends ResourceSearchView
setListGridDoubleClickHandler(new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length == 1) {
String selectedId = selectedRows[0].getAttribute("id");
CoreGUI.goToView(LinkManager.getResourceTabLink(Integer.valueOf(selectedId),
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
index 6722d5b..9bfd7c3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
@@ -196,7 +196,7 @@ public class MessageCenterView extends Table implements MessageCenter.MessageLis
public void onDoubleClick(DoubleClickEvent event) {
try {
ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
+ ListGridRecord[] selectedRows = listGrid.getSelectedRecords();
if (selectedRows != null && selectedRows.length > 0) {
Message message = (Message) selectedRows[0].getAttributeAsObject(FIELD_OBJECT); // show the first selected
showDetails(message);