[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rhq-commits
Subject:    [rhq] Branch 'refs/tags/RHQ_4_7_0_JONCI' - 105 commits - .classpath .gitignore .mailmap etc/rhq-ircB
From:       rhqci <rhqci () fedoraproject ! org>
Date:       2013-05-30 17:20:28
Message-ID: 20130530172028.0D9C760E9C () fedorahosted ! org
[Download RAW message or body]

--===============1124916583532021835==
Content-Type: text/plain

 .classpath                                                                           \
                |    4 
 .gitignore                                                                           \
                |    2 
 .mailmap                                                                             \
|    1   etc/rhq-ircBot/pom.xml                                                       \
|   15   etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java               \
|  270   etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java       \
|  375 +  etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/cacerts.jks            \
|binary  etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/rhq-ircbot.properties   \
|    2   etc/samples/embedded-ext-plugin/pom.xml                                      \
|   72   etc/samples/embedded-ext-plugin/src/main/java/org/rhq/sample/embeddedextplugin/EmbeddedExtensionDiscoveryComponent.java \
|   58   etc/samples/embedded-ext-plugin/src/main/resources/META-INF/rhq-plugin.xml   \
|   21   etc/samples/skeleton-plugin/pom.xml                                          \
|   99   etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildDiscoveryComponent.java \
|   47   etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildServiceComponent.java \
|   61   etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml       \
|   20   etc/samples/skinny-platform/pom.xml                                          \
|   60   etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformComponent.java \
|   39   etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformDiscoveryComponent.java \
|   67   etc/samples/skinny-platform/src/main/resources/META-INF/rhq-plugin.xml       \
|   18   modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/CoreJBossASClient.java \
|   50   modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/LoggingJBossASClient.java \
|    4   modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java \
|  140   modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java \
|   78   modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java \
|    9   modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java \
|    9   modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java \
|   12   modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java \
|  113   modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java \
|   27   modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java  \
|   40   modules/core/domain/src/main/java/org/rhq/core/domain/util/UnlimitedPageControl.java \
|    5   modules/core/domain/src/main/resources/META-INF/persistence.xml              \
|    8   modules/core/util/src/main/java/org/rhq/core/util/updater/DeploymentData.java \
|   92   modules/core/util/src/test/java/org/rhq/core/util/updater/DeployerCanonicalPathTest.java \
|  275   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationConstants.java \
|    2   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationUpgrade.java \
|   63   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java \
|   40   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateDownload.java \
|   32   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateVersion.java \
|   33   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java \
|  212   modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java \
|    6   modules/enterprise/agent/src/main/resources/agent-configuration.xml          \
|   15   modules/enterprise/binding/src/main/java/org/rhq/bindings/script/BaseRhqSchemeScriptSourceProvider.java \
|    7   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java \
|    5   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java \
|    6   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/AlertDefinitionTemplateTypeView.java \
|   11   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/DriftDefinitionTemplateTypeView.java \
|   11   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java \
|    7   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/MetricTemplateTypeView.java \
|   11   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java \
|  153   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java \
|    5   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java \
|    6   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/EditAlertDefinitionForm.java \
|    5   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java \
|    9   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java \
|   42   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/buttons/BackButton.java \
|    1   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/GroupConfigurationEditor.java \
|   72   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java \
|   31   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/measurement/AbstractMeasurementRangeEditor.java \
|    2   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java \
|    1   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletFactory.java \
|    6   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java \
|   32   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/groups/graph/ResourceGroupD3GraphPortlet.java \
|    2   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/groups/graph/ResourceGroupGraphPortlet.java \
|  214   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/ResourceD3GraphPortlet.java \
|    2   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/ResourceGraphPortlet.java \
|  203   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java \
|   31   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionEditView.java \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplateEditView.java \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertDefinitionGWTService.java \
|    3   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractD3GraphListView.java \
|    4   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java \
|  358 -  modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
|  383 +  modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricNvd3BarChartGraph.java \
|    8   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphIE8Impl.java \
|    4   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java \
|   34   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java \
|    2   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java \
|    3   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java \
|  340 -  modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java \
|   39   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/c \
lient/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java   \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/GroupPluginConfigurationEditView.java \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java \
|  137   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/c \
lient/inventory/groups/detail/monitoring/table/CompositeGroupMultiLineGraphListView.java \
|    1   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java \
|   35   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java \
|   44   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java \
|   10   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java \
|    3   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java \
|  146   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java \
|  303 -  modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3GraphView.java \
|   34   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java \
|  159   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityBarView.java \
|  137   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java \
|   23   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MeasurementTableView.java \
|   49   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java \
|    2   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java \
|   16   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestConfigurationView.java \
|   13   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestGroupConfigurationView.java \
|   13   modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java \
|   18   modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml \
|    3   modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java \
|    9   modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java \
|    7   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml \
|   14   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties \
|   89   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties \
|    5   modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties \
|    5   modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html                  \
|   18   modules/enterprise/gui/coregui/src/main/webapp/css/charts.css                \
|    7   modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css                 \
|  128   modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_end.png \
|binary  modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_start.png \
|binary  modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_stretch.png \
|binary  modules/enterprise/gui/coregui/src/main/webapp/js/nv.d3.js                   \
| 2855 ++++++++--  modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js           \
|   32   modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/authentication/SessionAccessServlet.java \
|   15   modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/AuthenticationFilter.java \
|   15   modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/jboss-web.xml \
|    2   modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/web.xml     \
|    4   modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/jboss-web.xml        \
|    2   modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml              \
|    4   modules/enterprise/remoting/cli/src/main/samples/deploy-to-and-restart-JBAS.js \
|    2   modules/enterprise/scripting/api/src/main/java/org/rhq/scripting/ScriptSourceProvider.java \
|   16   modules/enterprise/server/appserver/src/main/bin-resources/bin/rhq-server.sh \
|    3   modules/enterprise/server/appserver/src/main/bin-resources/bin/wrapper/rhq-server-wrapper.conf \
|    9   modules/enterprise/server/appserver/src/main/dev-resources/bin/rhq-autoinstall.sh \
|    2   modules/enterprise/server/appserver/src/main/dev-resources/bin/wrapper/rhq-server-wrapper.inc \
|    6   modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml \
|   31   modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/RhqDownloadsScriptSourceProvider.java \
|   66   modules/enterprise/server/client-api/src/test/java/org/rhq/enterprise/client/test/RhqDownloadsScriptSourceProviderTest.java \
|    4   modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java \
|   30   modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerService.java \
|   17   modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java \
|   86   modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java \
|  323 -  modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/client/security/test/ScriptingAPIServerTest.java \
|    4   modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/auth/test/SubjectManagerBeanTest.java \
|   33   modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/drift/ManageDriftDefinitionsTest.java \
|    4   modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementScheduleManagerTest.java \
|    9   modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/StrippedDownStartupBean.java \
|    5   modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java \
|   18   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/agentclient/AgentClient.java \
|   18   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/agentclient/impl/AgentClientImpl.java \
|   18   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java \
|   27   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java \
|   23   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java \
|   54   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServer.java \
|   27   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java \
|   52   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentServiceMBean.java \
|    8   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java \
|   30   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBeanPreparation.java \
|    2   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupLocal.java \
|   39   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java \
|  209   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCLoginModule.java \
|    2   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCPrincipalCheckLoginModule.java \
|    1   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java \
|   12   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java \
|    8   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
|  231   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java \
|  124   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java \
|   41   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/BadArgumentException.java \
|    5   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java \
|   26   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java \
|   75   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java \
|   20   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java \
|  210   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ParameterMissingException.java \
|    3   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ReportsHandlerBean.java \
|   20   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
|  102   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RootHandlerBean.java \
|    2   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/SetCallerInterceptor.java \
|    7   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/StatusHandlerBean.java \
|    4   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/UserHandlerBean.java \
|   57   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AlertDefinitionRest.java \
|   24   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/Link.java \
|   16   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/PagingCollection.java \
|   97   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java \
|   30   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/ConfigurationHelper.java \
|  432 +  modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java \
|    2   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQuery.java \
|   15   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java \
|  120   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java \
|   21   modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java \
|    6   modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java \
|  756 ++  modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/CriteriaQueryTest.java \
|   22   modules/enterprise/server/plugins/alert-snmp/pom.xml                         \
|   32   modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java \
|   59   modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java \
|   32   modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java \
|   38   modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml \
|   36   modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java \
|  106   modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSenderTest.java \
|  378 +  modules/enterprise/server/plugins/alert-snmp/src/test/resources/log4j.xml   \
|   32   modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java \
|    4   modules/integration-tests/jndi-access/jndi-access-test/pom.xml               \
|   47   modules/integration-tests/jndi-access/jndi-access-test/src/test/resources/arquillian.xml \
|    2   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java \
|    9   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java \
|  106   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java \
 modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java \
|   44   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/OperationsTest.java \
|  188   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
|  269   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/RootURITest.java \
|    2   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/UserTest.java \
|    4   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/AlertDefinition.java \
|   21   modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/Resource.java \
|    9   modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java \
|  186   modules/plugins/ant-bundle/src/test/resources/test-bundle-dotdot.xml         \
|   19   modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java \
|   50   modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstanceInfo.java \
|    2   modules/plugins/jboss-as-7/pom.xml                                           \
|   12   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java \
|   13   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java \
|   25   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java \
|   86   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java \
|   39   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java \
|   43   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java \
|   10   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/HostConfiguration.java \
|    8   modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/ServerPluginConfiguration.java \
|   19   modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml        \
|   50   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractJBossAS7PluginTest.java \
|   33   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java \
|   14   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java \
|   17   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java \
|   19   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java \
|   74   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java \
|  239   modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java \
|   24   modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstanceInfo.java \
|    2   pom.xml                                                                      \
|    7   233 files changed, 10757 insertions(+), 4522 deletions(-)

New commits:
commit 45c43c4848b6672ccf9ffc7784ba671c6b840ae4
Author: Simeon Pinder <spinder@redhat.com>
Date:   Thu May 30 04:32:46 2013 -0400

     Moving pom versions back to 4.7.0.JON for ALPHA build.

diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
index dbb487d..4aae357 100644
--- a/code-coverage/pom.xml
+++ b/code-coverage/pom.xml
@@ -3,7 +3,7 @@
    <parent>
       <artifactId>rhq-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-code-coverage</artifactId>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index efe6d1f..434edad 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -8,7 +8,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 138e9ca..86baa5a 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 5afdead..0faef44 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-common-drift</artifactId>
diff --git a/modules/common/filetemplate-bundle/pom.xml \
b/modules/common/filetemplate-bundle/pom.xml index 0beb20b..5949978 100644
--- a/modules/common/filetemplate-bundle/pom.xml
+++ b/modules/common/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <artifactId>rhq-filetemplate-bundle-common</artifactId>
diff --git a/modules/common/jboss-as-dmr-client/pom.xml \
b/modules/common/jboss-as-dmr-client/pom.xml index b8c1682..cbb58f3 100644
--- a/modules/common/jboss-as-dmr-client/pom.xml
+++ b/modules/common/jboss-as-dmr-client/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-common-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <artifactId>rhq-jboss-as-dmr-client</artifactId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 6dac77b..7ce384f 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-jboss-as-common</artifactId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index 088e268..da1d138 100644
--- a/modules/common/pom.xml
+++ b/modules/common/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/arquillian-integration/archive/pom.xml \
b/modules/core/arquillian-integration/archive/pom.xml index fe5f377..f4b2afa 100644
--- a/modules/core/arquillian-integration/archive/pom.xml
+++ b/modules/core/arquillian-integration/archive/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-arquillian-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/container/pom.xml \
b/modules/core/arquillian-integration/container/pom.xml index 258d050..33e48b1 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-arquillian-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/pom.xml \
b/modules/core/arquillian-integration/pom.xml index 67b02a8..66df7dd 100644
--- a/modules/core/arquillian-integration/pom.xml
+++ b/modules/core/arquillian-integration/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/arquillian-integration/suite-extension/pom.xml \
b/modules/core/arquillian-integration/suite-extension/pom.xml index 231ab67..bbe0954 \
                100644
--- a/modules/core/arquillian-integration/suite-extension/pom.xml
+++ b/modules/core/arquillian-integration/suite-extension/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/test-agent-plugin/pom.xml \
b/modules/core/arquillian-integration/test-agent-plugin/pom.xml index \
                4ed7bca..b560968 100644
--- a/modules/core/arquillian-integration/test-agent-plugin/pom.xml
+++ b/modules/core/arquillian-integration/test-agent-plugin/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index 7adcd3b..c5184a1 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 1fb2161..62028e4 100644
--- a/modules/core/comm-api/pom.xml
+++ b/modules/core/comm-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index cc040f8..b30f82e 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 776459d..8c36237 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-core-domain</artifactId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index dc21aad..52e1956 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 46fe305..86a3e7e 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index 8060a89..adf5bd4 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container-itest/pom.xml \
b/modules/core/plugin-container-itest/pom.xml index 9c801de..2ed4c26 100644
--- a/modules/core/plugin-container-itest/pom.xml
+++ b/modules/core/plugin-container-itest/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container-itest</artifactId>
diff --git a/modules/core/plugin-container/pom.xml \
b/modules/core/plugin-container/pom.xml index 3c070a9..e03ac78 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container</artifactId>
diff --git a/modules/core/plugin-test-api/pom.xml \
b/modules/core/plugin-test-api/pom.xml index 18fa318..97ed3ab 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <artifactId>rhq-core-plugin-test-api</artifactId>
diff --git a/modules/core/plugin-test-util/pom.xml \
b/modules/core/plugin-test-util/pom.xml index 0374729..b2c1184 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml \
b/modules/core/plugin-validator/pom.xml index 99c875d..0820f4b 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 426d298..ecdde93 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index c41a8f4..9765a55 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index cdc3b9b..2bd8b52 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <artifactId>rhq-core-util</artifactId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 2d7093d..c832b41 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/agentupdate/pom.xml \
b/modules/enterprise/agentupdate/pom.xml index 67ed9a8..329f7fb 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index d5b7643..91ab077 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-enterprise-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <artifactId>rhq-script-bindings</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>RHQ Script Bindings</name>
     <description>Abstraction of different facilities and default configurations for \
script bindings</description>  
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 8148262..9ade65f 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/content_http-war/pom.xml \
b/modules/enterprise/gui/content_http-war/pom.xml index a140a9c..539cff8 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-gui-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml \
b/modules/enterprise/gui/coregui/pom.xml index cb7dd3a..3dea516 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 018a802..57c01e8 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -8,7 +8,7 @@
     <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/portal-war/pom.xml \
b/modules/enterprise/gui/portal-war/pom.xml index d2998cc..8b742ff 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/gui/remoting-war/pom.xml \
b/modules/enterprise/gui/remoting-war/pom.xml index 638bccd..0dae4ac 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml \
b/modules/enterprise/gui/rest-examples-war/pom.xml index c9aa075..0cd7bf7 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-war/pom.xml \
b/modules/enterprise/gui/rest-war/pom.xml index 33e330e..10a7cd8 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 3fad441..0e5c315 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/cli/pom.xml \
b/modules/enterprise/remoting/cli/pom.xml index dec19d0..40ed02c 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-api/pom.xml \
b/modules/enterprise/remoting/client-api/pom.xml index cba50db..49e0186 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-deps/pom.xml \
b/modules/enterprise/remoting/client-deps/pom.xml index 6db40f2..a087cb1 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/pom.xml \
b/modules/enterprise/remoting/pom.xml index 7bf574e..bbd87da 100644
--- a/modules/enterprise/remoting/pom.xml
+++ b/modules/enterprise/remoting/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/scripting/api/pom.xml \
b/modules/enterprise/scripting/api/pom.xml index 268af3a..b584947 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <artifactId>rhq-scripting-api</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>RHQ Scripting API</name>
     <description>Provides API for adding scripting support to RHQ using different \
javax.scripting - based interpreters</description>  
diff --git a/modules/enterprise/scripting/javascript/pom.xml \
b/modules/enterprise/scripting/javascript/pom.xml index acc09aa..c376943 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -4,10 +4,10 @@
    <parent>
       <artifactId>rhq-scripting-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
    <artifactId>rhq-scripting-javascript</artifactId>
-   <version>4.8.0-SNAPSHOT</version>
+   <version>4.7.0.JON</version>
    <name>RHQ Javascript support</name>
    <description>Provides RHQ scripting in Javascript using Rhino</description>
 
diff --git a/modules/enterprise/scripting/pom.xml \
b/modules/enterprise/scripting/pom.xml index a58f1ca..4c47992 100644
--- a/modules/enterprise/scripting/pom.xml
+++ b/modules/enterprise/scripting/pom.xml
@@ -3,12 +3,12 @@
    <parent>
       <artifactId>rhq-enterprise-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
    <artifactId>rhq-scripting-parent</artifactId>
    <packaging>pom</packaging>
    
-   <version>4.8.0-SNAPSHOT</version>
+   <version>4.7.0.JON</version>
    <name>RHQ Scripting Parent Module</name>
 
    <modules>
diff --git a/modules/enterprise/scripting/python/pom.xml \
b/modules/enterprise/scripting/python/pom.xml index dc69d9e..385978a 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <artifactId>rhq-scripting-python</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>RHQ Python support</name>
     <description>Provides RHQ scripting in Python using Jython</description>
 
diff --git a/modules/enterprise/server/appserver/pom.xml \
b/modules/enterprise/server/appserver/pom.xml index f186d70..d6e97a0 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/client-api/pom.xml \
b/modules/enterprise/server/client-api/pom.xml index 3e69ded..560de86 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -5,13 +5,13 @@
     <parent>
         <artifactId>rhq-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-server-client-api</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>RHQ Enterprise Server Client API</name>
     <description>The implementation of the client API when accessing the server \
locally</description>  
diff --git a/modules/enterprise/server/ear/pom.xml \
b/modules/enterprise/server/ear/pom.xml index 867ebe1..dd10dec 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/installer/pom.xml \
b/modules/enterprise/server/installer/pom.xml index 23d8e94..9ee8e93 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/itests-2/pom.xml \
b/modules/enterprise/server/itests-2/pom.xml index 5e4e076..460342b 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/jar/pom.xml \
b/modules/enterprise/server/jar/pom.xml index 84e34c4..c0a0bae 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml \
b/modules/enterprise/server/plugins/alert-cli/pom.xml index ea9bd42..1bd8378 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <groupId>org.rhq</groupId>
     <artifactId>alert-cli</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>RHQ Enterprise Server CLI Script Alert Plugin</name>
     <description>An alert sender able to execute an arbitrary CLI script as a \
response to an alert</description>  
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml \
b/modules/enterprise/server/plugins/alert-email/pom.xml index a2102a3..5252acc 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.server</groupId>
     <artifactId>alert-email</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Email Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml \
b/modules/enterprise/server/plugins/alert-irc/pom.xml index bd5f656..ee5adda 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-irc</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server IRC Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml \
b/modules/enterprise/server/plugins/alert-log4j/pom.xml index 934cb7e..8c7670d 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-log4j</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Log4J Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml \
b/modules/enterprise/server/plugins/alert-microblog/pom.xml index 28d1d56..80d32e7 \
                100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-microblog</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Microblog Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml \
b/modules/enterprise/server/plugins/alert-mobicents/pom.xml index 4338526..6438e21 \
                100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-mobicents</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Mobicents Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml \
b/modules/enterprise/server/plugins/alert-operations/pom.xml index 21ec5f7..b2ecdbe \
                100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -2,14 +2,14 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-operations</artifactId>
     <packaging>jar</packaging>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Opertions Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml \
b/modules/enterprise/server/plugins/alert-roles/pom.xml index a6c054a..cb37a34 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-roles</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Roles Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml \
b/modules/enterprise/server/plugins/alert-snmp/pom.xml index f84398b..12ac31b 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-snmp</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server SNMP Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml \
b/modules/enterprise/server/plugins/alert-subject/pom.xml index d4d2564..3e43ea6 \
                100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-subject</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Subject Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml \
b/modules/enterprise/server/plugins/ant-bundle/pom.xml index 648b451..7784473 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml \
b/modules/enterprise/server/plugins/cobbler/pom.xml index 6f56e82..5c79143 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -4,14 +4,14 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-serverplugin-cobbler</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server Cobbler Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/disk/pom.xml \
b/modules/enterprise/server/plugins/disk/pom.xml index 21bb689..dde366f 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml \
b/modules/enterprise/server/plugins/drift-rhq/pom.xml index 7111543..6429931 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml \
b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml index \
                6ab0964..b36fcbb 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml \
b/modules/enterprise/server/plugins/jboss-software/pom.xml index 32ffc76..6285905 \
                100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml \
b/modules/enterprise/server/plugins/packagetype-cli/pom.xml index 2a75e07..de6f9c4 \
                100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>packagetype-cli</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <name>RHQ Enterprise Server CLI Package Type Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/pom.xml \
b/modules/enterprise/server/plugins/pom.xml index dc862db..7e75407 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/plugins/url/pom.xml \
b/modules/enterprise/server/plugins/url/pom.xml index bb1740d..19bc8b1 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml \
b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml index \
                06da613..32d9a39 100644
--- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
+++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml \
b/modules/enterprise/server/plugins/yum/pom.xml index 6f8ac10..c97e216 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml
index 9c60e30..48fd5ea 100644
--- a/modules/enterprise/server/pom.xml
+++ b/modules/enterprise/server/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/safe-invoker/pom.xml \
b/modules/enterprise/server/safe-invoker/pom.xml index b2b741e..ab869f2 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/sars/pom.xml \
b/modules/enterprise/server/sars/pom.xml index d4f7715..fc69668 100644
--- a/modules/enterprise/server/sars/pom.xml
+++ b/modules/enterprise/server/sars/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml \
b/modules/enterprise/server/sars/services-sar/pom.xml index 014420b..6377787 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-sars-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/startup-subsystem/pom.xml \
b/modules/enterprise/server/startup-subsystem/pom.xml index 7152fc3..286398c 100644
--- a/modules/enterprise/server/startup-subsystem/pom.xml
+++ b/modules/enterprise/server/startup-subsystem/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/xml-schemas/pom.xml \
b/modules/enterprise/server/xml-schemas/pom.xml index 00e558b..2f0d910 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index f2f2455..e63e38e 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.helpers</groupId>
     <artifactId>bundleGen</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
 
     <build>
      <plugins>
diff --git a/modules/helpers/jeeGen/pom.xml b/modules/helpers/jeeGen/pom.xml
index 6f36514..a7ed4cc 100644
--- a/modules/helpers/jeeGen/pom.xml
+++ b/modules/helpers/jeeGen/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/perftest-support/pom.xml \
b/modules/helpers/perftest-support/pom.xml index 8772058..84d6d04 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>perftest-support</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <name>Performance Testing Support</name>
     <description>To support performance testing, this is a basic tool to support \
extracting and later reimporting of  data from/to a database.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index ecebf6c..a853c5e 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/rest-docs-generator/pom.xml \
b/modules/helpers/rest-docs-generator/pom.xml index c5a4a41..2ef0b85 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <artifactId>rhq-helpers</artifactId>
     <groupId>org.rhq.helpers</groupId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/modules/helpers/rtfilter-subsystem/pom.xml \
b/modules/helpers/rtfilter-subsystem/pom.xml index baf0801..0567602 100644
--- a/modules/helpers/rtfilter-subsystem/pom.xml
+++ b/modules/helpers/rtfilter-subsystem/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index bf4ca3d..24f015d 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml \
b/modules/integration-tests/apache-plugin-test/pom.xml index a9d7296..ca3d81f 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml \
b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml index \
                48808ac..0b0c363 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <artifactId>jndi-access-test</artifactId>
diff --git a/modules/integration-tests/jndi-access/pom.xml \
b/modules/integration-tests/jndi-access/pom.xml index 6ded494..5e1f84c 100644
--- a/modules/integration-tests/jndi-access/pom.xml
+++ b/modules/integration-tests/jndi-access/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml \
b/modules/integration-tests/jndi-access/remote-server/pom.xml index d11992a..777f236 \
                100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <artifactId>jndi-access-remote-server</artifactId>
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index 7e5f521..ac50627 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/modules/integration-tests/rest-api/pom.xml \
b/modules/integration-tests/rest-api/pom.xml index bca2fe4..8debbc4 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-integration-tests</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 2809e95..d74b6cc 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 75a98a4..780b6e3 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 380f6e6..cead04e 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index ada89b3..d68d451 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 37ffe0e..2e80e03 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index a17a3d8..79f789b 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 9424397..f37463b 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 3aa5463..cd8f563 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 03349f8..2292a6f 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml \
b/modules/plugins/filetemplate-bundle/pom.xml index 8a5f0e6..7da6b89 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index a1c3353..8a77511 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index d8325e4..1618ff0 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index adee980..d2dc58a 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -6,7 +6,7 @@
       <groupId>org.rhq</groupId>
       <!--  Bypass the jopr-plugins-parent which can not have children. It must \
build after the plugins in order to execute integration tests on them. -->  \
                <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index f587112..0a159b5 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index d1f3e43..b31fd66 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -6,12 +6,12 @@
   <parent>
       <artifactId>rhq-plugins-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-hudson-plugin</artifactId>
-  <version>4.8.0-SNAPSHOT</version>
+  <version>4.7.0.JON</version>
   <packaging>jar</packaging>
 
   <name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 93a915f..34e2f82 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index b043e7b..daaa104 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -5,7 +5,7 @@
     <parent>
          <artifactId>rhq-plugins-parent</artifactId>
          <groupId>org.rhq</groupId>
-         <version>4.8.0-SNAPSHOT</version>
+         <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index f2e6f8a..7dc2147 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index d85e7e3..397026c 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index b792d26..155912f 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml \
b/modules/plugins/jboss-cache-v3/pom.xml index 837852d..896a15d 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -5,7 +5,7 @@
     <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
     </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml \
b/modules/plugins/jboss-cache/pom.xml index 3828a6a..6976d9b 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 864f675..5ac7010 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 094f451..1dee28d 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml \
b/modules/plugins/mod-cluster/pom.xml index 54b9f53..e8fe102 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 572851e..22d5822 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml \
b/modules/plugins/netservices/pom.xml index 6b663ff..3b6bd23 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/noop/pom.xml b/modules/plugins/noop/pom.xml
index 68af26a..f479b37 100644
--- a/modules/plugins/noop/pom.xml
+++ b/modules/plugins/noop/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index ed93d10..a55e980 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml \
b/modules/plugins/pattern-generator/pom.xml index 5653d69..4811181 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index f852e8a..8d330c6 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index e28148c..48bd3e1 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 0e27179..8b95b87 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 12ae83c..45c5ae5 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 26d37b3..b2f56ff 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 6bf549f..0805240 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 968a154..5b0231a 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 20e41c4..8eb6a1b 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index d31500b..9cf27a2 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 36ab8be..8eb8486 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 74d740b..cca0dfb 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>rhq-plugins-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index e0a216e..e99a393 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 3891b84..6ccc01b 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index eb97008..2848dbb 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 45c2544..928ab6c 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.8.0-SNAPSHOT</version>
+        <version>4.7.0.JON</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/validate-all-plugins/pom.xml \
b/modules/plugins/validate-all-plugins/pom.xml index 63eb6ae..f590ca2 100644
--- a/modules/plugins/validate-all-plugins/pom.xml
+++ b/modules/plugins/validate-all-plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index de510c5..17d502f 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -4,7 +4,7 @@
       <parent>
          <groupId>org.rhq</groupId>
          <artifactId>rhq-plugins-parent</artifactId>
-         <version>4.8.0-SNAPSHOT</version>
+         <version>4.7.0.JON</version>
       </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index 8f4cf31..0e18cc9 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.8.0-SNAPSHOT</version>
+      <version>4.7.0.JON</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index c343deb..3407cad 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <artifactId>rhq-modules-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.8.0-SNAPSHOT</version>
+    <version>4.7.0.JON</version>
   </parent>
 
   <artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index b46ee9e..314c512 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-parent</artifactId>
-  <version>4.8.0-SNAPSHOT</version>
+  <version>4.7.0.JON</version>
   <packaging>pom</packaging>
 
   <name>RHQ</name>


commit 914ec1e15b09a712f18ce46e4c3124e1a8baa6d4
Merge: 3368ace 2eef3b4
Author: Simeon Pinder <spinder@redhat.com>
Date:   Thu May 30 04:31:15 2013 -0400

    Merge branch 'master' into nightly/rhq.jon
    
    Conflicts:
    	modules/plugins/jboss-as-7/pom.xml



commit 3368acebc21e2a43a981379774d319781daabffa
Author: Simeon Pinder <spinder@redhat.com>
Date:   Thu May 30 04:27:37 2013 -0400

     Temporarily move the pom version to minimize auto commit issues.

diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
index 4aae357..dbb487d 100644
--- a/code-coverage/pom.xml
+++ b/code-coverage/pom.xml
@@ -3,7 +3,7 @@
    <parent>
       <artifactId>rhq-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-code-coverage</artifactId>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index 434edad..efe6d1f 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -8,7 +8,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 86baa5a..138e9ca 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 0faef44..5afdead 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-common-drift</artifactId>
diff --git a/modules/common/filetemplate-bundle/pom.xml \
b/modules/common/filetemplate-bundle/pom.xml index 5949978..0beb20b 100644
--- a/modules/common/filetemplate-bundle/pom.xml
+++ b/modules/common/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>rhq-filetemplate-bundle-common</artifactId>
diff --git a/modules/common/jboss-as-dmr-client/pom.xml \
b/modules/common/jboss-as-dmr-client/pom.xml index cbb58f3..b8c1682 100644
--- a/modules/common/jboss-as-dmr-client/pom.xml
+++ b/modules/common/jboss-as-dmr-client/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-common-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>rhq-jboss-as-dmr-client</artifactId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 7ce384f..6dac77b 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-jboss-as-common</artifactId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index da1d138..088e268 100644
--- a/modules/common/pom.xml
+++ b/modules/common/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/arquillian-integration/archive/pom.xml \
b/modules/core/arquillian-integration/archive/pom.xml index f4b2afa..fe5f377 100644
--- a/modules/core/arquillian-integration/archive/pom.xml
+++ b/modules/core/arquillian-integration/archive/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-arquillian-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/container/pom.xml \
b/modules/core/arquillian-integration/container/pom.xml index 33e48b1..258d050 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-arquillian-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/pom.xml \
b/modules/core/arquillian-integration/pom.xml index 66df7dd..67b02a8 100644
--- a/modules/core/arquillian-integration/pom.xml
+++ b/modules/core/arquillian-integration/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/arquillian-integration/suite-extension/pom.xml \
b/modules/core/arquillian-integration/suite-extension/pom.xml index bbe0954..231ab67 \
                100644
--- a/modules/core/arquillian-integration/suite-extension/pom.xml
+++ b/modules/core/arquillian-integration/suite-extension/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/test-agent-plugin/pom.xml \
b/modules/core/arquillian-integration/test-agent-plugin/pom.xml index \
                b560968..4ed7bca 100644
--- a/modules/core/arquillian-integration/test-agent-plugin/pom.xml
+++ b/modules/core/arquillian-integration/test-agent-plugin/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index c5184a1..7adcd3b 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 62028e4..1fb2161 100644
--- a/modules/core/comm-api/pom.xml
+++ b/modules/core/comm-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index b30f82e..cc040f8 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 8c36237..776459d 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-domain</artifactId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 52e1956..dc21aad 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 86a3e7e..46fe305 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index adf5bd4..8060a89 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container-itest/pom.xml \
b/modules/core/plugin-container-itest/pom.xml index 2ed4c26..9c801de 100644
--- a/modules/core/plugin-container-itest/pom.xml
+++ b/modules/core/plugin-container-itest/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container-itest</artifactId>
diff --git a/modules/core/plugin-container/pom.xml \
b/modules/core/plugin-container/pom.xml index e03ac78..3c070a9 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container</artifactId>
diff --git a/modules/core/plugin-test-api/pom.xml \
b/modules/core/plugin-test-api/pom.xml index 97ed3ab..18fa318 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-test-api</artifactId>
diff --git a/modules/core/plugin-test-util/pom.xml \
b/modules/core/plugin-test-util/pom.xml index b2c1184..0374729 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml \
b/modules/core/plugin-validator/pom.xml index 0820f4b..99c875d 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index ecdde93..426d298 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 9765a55..c41a8f4 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index 2bd8b52..cdc3b9b 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>rhq-core-util</artifactId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index c832b41..2d7093d 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/agentupdate/pom.xml \
b/modules/enterprise/agentupdate/pom.xml index 329f7fb..67ed9a8 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 91ab077..d5b7643 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-enterprise-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-script-bindings</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Script Bindings</name>
     <description>Abstraction of different facilities and default configurations for \
script bindings</description>  
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index 9ade65f..8148262 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/content_http-war/pom.xml \
b/modules/enterprise/gui/content_http-war/pom.xml index 539cff8..a140a9c 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-gui-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml \
b/modules/enterprise/gui/coregui/pom.xml index 3dea516..cb7dd3a 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 57c01e8..018a802 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -8,7 +8,7 @@
     <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/portal-war/pom.xml \
b/modules/enterprise/gui/portal-war/pom.xml index 8b742ff..d2998cc 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/gui/remoting-war/pom.xml \
b/modules/enterprise/gui/remoting-war/pom.xml index 0dae4ac..638bccd 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml \
b/modules/enterprise/gui/rest-examples-war/pom.xml index 0cd7bf7..c9aa075 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-war/pom.xml \
b/modules/enterprise/gui/rest-war/pom.xml index 10a7cd8..33e330e 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 0e5c315..3fad441 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/cli/pom.xml \
b/modules/enterprise/remoting/cli/pom.xml index 40ed02c..dec19d0 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-api/pom.xml \
b/modules/enterprise/remoting/client-api/pom.xml index 49e0186..cba50db 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-deps/pom.xml \
b/modules/enterprise/remoting/client-deps/pom.xml index a087cb1..6db40f2 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/pom.xml \
b/modules/enterprise/remoting/pom.xml index bbd87da..7bf574e 100644
--- a/modules/enterprise/remoting/pom.xml
+++ b/modules/enterprise/remoting/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/scripting/api/pom.xml \
b/modules/enterprise/scripting/api/pom.xml index b584947..268af3a 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-scripting-api</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Scripting API</name>
     <description>Provides API for adding scripting support to RHQ using different \
javax.scripting - based interpreters</description>  
diff --git a/modules/enterprise/scripting/javascript/pom.xml \
b/modules/enterprise/scripting/javascript/pom.xml index c376943..acc09aa 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -4,10 +4,10 @@
    <parent>
       <artifactId>rhq-scripting-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
    <artifactId>rhq-scripting-javascript</artifactId>
-   <version>4.7.0.JON</version>
+   <version>4.8.0-SNAPSHOT</version>
    <name>RHQ Javascript support</name>
    <description>Provides RHQ scripting in Javascript using Rhino</description>
 
diff --git a/modules/enterprise/scripting/pom.xml \
b/modules/enterprise/scripting/pom.xml index 4c47992..a58f1ca 100644
--- a/modules/enterprise/scripting/pom.xml
+++ b/modules/enterprise/scripting/pom.xml
@@ -3,12 +3,12 @@
    <parent>
       <artifactId>rhq-enterprise-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
    <artifactId>rhq-scripting-parent</artifactId>
    <packaging>pom</packaging>
    
-   <version>4.7.0.JON</version>
+   <version>4.8.0-SNAPSHOT</version>
    <name>RHQ Scripting Parent Module</name>
 
    <modules>
diff --git a/modules/enterprise/scripting/python/pom.xml \
b/modules/enterprise/scripting/python/pom.xml index 385978a..dc69d9e 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-scripting-python</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Python support</name>
     <description>Provides RHQ scripting in Python using Jython</description>
 
diff --git a/modules/enterprise/server/appserver/pom.xml \
b/modules/enterprise/server/appserver/pom.xml index d6e97a0..f186d70 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/client-api/pom.xml \
b/modules/enterprise/server/client-api/pom.xml index 560de86..3e69ded 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -5,13 +5,13 @@
     <parent>
         <artifactId>rhq-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-server-client-api</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Enterprise Server Client API</name>
     <description>The implementation of the client API when accessing the server \
locally</description>  
diff --git a/modules/enterprise/server/ear/pom.xml \
b/modules/enterprise/server/ear/pom.xml index dd10dec..867ebe1 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/installer/pom.xml \
b/modules/enterprise/server/installer/pom.xml index 9ee8e93..23d8e94 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/itests-2/pom.xml \
b/modules/enterprise/server/itests-2/pom.xml index 460342b..5e4e076 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/jar/pom.xml \
b/modules/enterprise/server/jar/pom.xml index c0a0bae..84e34c4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml \
b/modules/enterprise/server/plugins/alert-cli/pom.xml index 1bd8378..ea9bd42 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <groupId>org.rhq</groupId>
     <artifactId>alert-cli</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Enterprise Server CLI Script Alert Plugin</name>
     <description>An alert sender able to execute an arbitrary CLI script as a \
response to an alert</description>  
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml \
b/modules/enterprise/server/plugins/alert-email/pom.xml index 5252acc..a2102a3 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.server</groupId>
     <artifactId>alert-email</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Email Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml \
b/modules/enterprise/server/plugins/alert-irc/pom.xml index ee5adda..bd5f656 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-irc</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server IRC Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml \
b/modules/enterprise/server/plugins/alert-log4j/pom.xml index 8c7670d..934cb7e 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-log4j</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Log4J Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml \
b/modules/enterprise/server/plugins/alert-microblog/pom.xml index 80d32e7..28d1d56 \
                100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-microblog</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Microblog Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml \
b/modules/enterprise/server/plugins/alert-mobicents/pom.xml index 6438e21..4338526 \
                100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-mobicents</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Mobicents Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml \
b/modules/enterprise/server/plugins/alert-operations/pom.xml index b2ecdbe..21ec5f7 \
                100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -2,14 +2,14 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-operations</artifactId>
     <packaging>jar</packaging>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Opertions Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml \
b/modules/enterprise/server/plugins/alert-roles/pom.xml index cb37a34..a6c054a 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-roles</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Roles Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml \
b/modules/enterprise/server/plugins/alert-snmp/pom.xml index 87a66cc..b933e91 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-snmp</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server SNMP Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml \
b/modules/enterprise/server/plugins/alert-subject/pom.xml index 3e43ea6..d4d2564 \
                100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-subject</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Subject Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml \
b/modules/enterprise/server/plugins/ant-bundle/pom.xml index 7784473..648b451 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml \
b/modules/enterprise/server/plugins/cobbler/pom.xml index 5c79143..6f56e82 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -4,14 +4,14 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-serverplugin-cobbler</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Cobbler Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/disk/pom.xml \
b/modules/enterprise/server/plugins/disk/pom.xml index dde366f..21bb689 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml \
b/modules/enterprise/server/plugins/drift-rhq/pom.xml index 6429931..7111543 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml \
b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml index \
                b36fcbb..6ab0964 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml \
b/modules/enterprise/server/plugins/jboss-software/pom.xml index 6285905..32ffc76 \
                100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml \
b/modules/enterprise/server/plugins/packagetype-cli/pom.xml index de6f9c4..2a75e07 \
                100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>packagetype-cli</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server CLI Package Type Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/pom.xml \
b/modules/enterprise/server/plugins/pom.xml index 7e75407..dc862db 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/plugins/url/pom.xml \
b/modules/enterprise/server/plugins/url/pom.xml index 19bc8b1..bb1740d 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml \
b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml index \
                32d9a39..06da613 100644
--- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
+++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml \
b/modules/enterprise/server/plugins/yum/pom.xml index c97e216..6f8ac10 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml
index 48fd5ea..9c60e30 100644
--- a/modules/enterprise/server/pom.xml
+++ b/modules/enterprise/server/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/safe-invoker/pom.xml \
b/modules/enterprise/server/safe-invoker/pom.xml index ab869f2..b2b741e 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/sars/pom.xml \
b/modules/enterprise/server/sars/pom.xml index fc69668..d4f7715 100644
--- a/modules/enterprise/server/sars/pom.xml
+++ b/modules/enterprise/server/sars/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml \
b/modules/enterprise/server/sars/services-sar/pom.xml index 6377787..014420b 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-sars-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/startup-subsystem/pom.xml \
b/modules/enterprise/server/startup-subsystem/pom.xml index 286398c..7152fc3 100644
--- a/modules/enterprise/server/startup-subsystem/pom.xml
+++ b/modules/enterprise/server/startup-subsystem/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/xml-schemas/pom.xml \
b/modules/enterprise/server/xml-schemas/pom.xml index 2f0d910..00e558b 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index e63e38e..f2f2455 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.helpers</groupId>
     <artifactId>bundleGen</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <build>
      <plugins>
diff --git a/modules/helpers/jeeGen/pom.xml b/modules/helpers/jeeGen/pom.xml
index a7ed4cc..6f36514 100644
--- a/modules/helpers/jeeGen/pom.xml
+++ b/modules/helpers/jeeGen/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/perftest-support/pom.xml \
b/modules/helpers/perftest-support/pom.xml index 84d6d04..8772058 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>perftest-support</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>Performance Testing Support</name>
     <description>To support performance testing, this is a basic tool to support \
extracting and later reimporting of  data from/to a database.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index a853c5e..ecebf6c 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/rest-docs-generator/pom.xml \
b/modules/helpers/rest-docs-generator/pom.xml index 2ef0b85..c5a4a41 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <artifactId>rhq-helpers</artifactId>
     <groupId>org.rhq.helpers</groupId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/modules/helpers/rtfilter-subsystem/pom.xml \
b/modules/helpers/rtfilter-subsystem/pom.xml index 0567602..baf0801 100644
--- a/modules/helpers/rtfilter-subsystem/pom.xml
+++ b/modules/helpers/rtfilter-subsystem/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 24f015d..bf4ca3d 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml \
b/modules/integration-tests/apache-plugin-test/pom.xml index ca3d81f..a9d7296 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml \
b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml index \
                59becbb..7ae77d3 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>jndi-access-test</artifactId>
diff --git a/modules/integration-tests/jndi-access/pom.xml \
b/modules/integration-tests/jndi-access/pom.xml index 5e1f84c..6ded494 100644
--- a/modules/integration-tests/jndi-access/pom.xml
+++ b/modules/integration-tests/jndi-access/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml \
b/modules/integration-tests/jndi-access/remote-server/pom.xml index 777f236..d11992a \
                100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>jndi-access-remote-server</artifactId>
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index ac50627..7e5f521 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/modules/integration-tests/rest-api/pom.xml \
b/modules/integration-tests/rest-api/pom.xml index 8debbc4..bca2fe4 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-integration-tests</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index d74b6cc..2809e95 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 780b6e3..75a98a4 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index cead04e..380f6e6 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index d68d451..ada89b3 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 2e80e03..37ffe0e 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index 79f789b..a17a3d8 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index f37463b..9424397 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index cd8f563..3aa5463 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 2292a6f..03349f8 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml \
b/modules/plugins/filetemplate-bundle/pom.xml index 7da6b89..8a5f0e6 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 8a77511..a1c3353 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 1618ff0..d8325e4 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index d2dc58a..adee980 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -6,7 +6,7 @@
       <groupId>org.rhq</groupId>
       <!--  Bypass the jopr-plugins-parent which can not have children. It must \
build after the plugins in order to execute integration tests on them. -->  \
                <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 0a159b5..f587112 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index b31fd66..d1f3e43 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -6,12 +6,12 @@
   <parent>
       <artifactId>rhq-plugins-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-hudson-plugin</artifactId>
-  <version>4.7.0.JON</version>
+  <version>4.8.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 34e2f82..93a915f 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index daaa104..b043e7b 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -5,7 +5,7 @@
     <parent>
          <artifactId>rhq-plugins-parent</artifactId>
          <groupId>org.rhq</groupId>
-         <version>4.7.0.JON</version>
+         <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 7dc2147..f2e6f8a 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 75e7b74..0b36f29 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index 155912f..b792d26 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml \
b/modules/plugins/jboss-cache-v3/pom.xml index 896a15d..837852d 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -5,7 +5,7 @@
     <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
     </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml \
b/modules/plugins/jboss-cache/pom.xml index 6976d9b..3828a6a 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 5ac7010..864f675 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 1dee28d..094f451 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml \
b/modules/plugins/mod-cluster/pom.xml index e8fe102..54b9f53 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 22d5822..572851e 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml \
b/modules/plugins/netservices/pom.xml index 3b6bd23..6b663ff 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/noop/pom.xml b/modules/plugins/noop/pom.xml
index f479b37..68af26a 100644
--- a/modules/plugins/noop/pom.xml
+++ b/modules/plugins/noop/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index a55e980..ed93d10 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml \
b/modules/plugins/pattern-generator/pom.xml index 4811181..5653d69 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 8d330c6..f852e8a 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 48bd3e1..e28148c 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 8b95b87..0e27179 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 45c5ae5..12ae83c 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index b2f56ff..26d37b3 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 0805240..6bf549f 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 5b0231a..968a154 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 8eb6a1b..20e41c4 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 9cf27a2..d31500b 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 8eb8486..36ab8be 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index cca0dfb..74d740b 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>rhq-plugins-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index e99a393..e0a216e 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 6ccc01b..3891b84 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 2848dbb..eb97008 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 928ab6c..45c2544 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0.JON</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/validate-all-plugins/pom.xml \
b/modules/plugins/validate-all-plugins/pom.xml index f590ca2..63eb6ae 100644
--- a/modules/plugins/validate-all-plugins/pom.xml
+++ b/modules/plugins/validate-all-plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 17d502f..de510c5 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -4,7 +4,7 @@
       <parent>
          <groupId>org.rhq</groupId>
          <artifactId>rhq-plugins-parent</artifactId>
-         <version>4.7.0.JON</version>
+         <version>4.8.0-SNAPSHOT</version>
       </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index 0e18cc9..8f4cf31 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0.JON</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 3407cad..c343deb 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <artifactId>rhq-modules-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.7.0.JON</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 9b29fab..a5588bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-parent</artifactId>
-  <version>4.7.0.JON</version>
+  <version>4.8.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>RHQ</name>


commit 2eef3b4fcd05fc1b248ab3c95fbc115e3758079d
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Wed May 29 13:48:05 2013 +0200

    [BZ 967542] - UI shows confusing units when editing Availability Duration alert \
condition type  
    Now if user iserts e.g. 90 mins and reopens the dialog, it won't display
    1.5 hours anymore, but 90 mins as expected.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
 index 104b84c..6c41897 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
 @@ -38,6 +38,7 @@ import \
com.smartgwt.client.widgets.form.fields.events.ChangedHandler;  import \
com.smartgwt.client.widgets.form.validator.IntegerRangeValidator;  
 import org.rhq.core.domain.measurement.MeasurementUnits;
+import org.rhq.core.domain.measurement.composite.MeasurementNumericValueAndUnits;
 import org.rhq.enterprise.gui.coregui.client.CoreGUI;
 import org.rhq.enterprise.gui.coregui.client.Messages;
 import org.rhq.enterprise.gui.coregui.client.util.FormUtility;
@@ -238,26 +239,17 @@ public class DurationItem extends CanvasItem {
             this.form.setValue(FIELD_VALUE, formattedOutput);
             setValue(formattedOutput);
         } else {
-            String valueWithUnits = MeasurementConverterClient.format((double) \
                longValue,
-                MeasurementUnits.MILLISECONDS, true);
-            String[] chunks = valueWithUnits.split(" ");
-            String value = chunks[0];
-            if (value.endsWith(".0")) {
-                value = value.substring(0, value.indexOf(".0"));
+            MeasurementNumericValueAndUnits valueWithUnits;
+            if (longValue % HOUR_IN_MILLIS == 0) {
+                valueWithUnits = MeasurementConverterClient.fit((double) longValue, \
MeasurementUnits.MILLISECONDS, +                    MeasurementUnits.HOURS, \
MeasurementUnits.HOURS); +            } else {
+                valueWithUnits = MeasurementConverterClient.fit((double) longValue, \
MeasurementUnits.MILLISECONDS, +                    MeasurementUnits.MINUTES, \
MeasurementUnits.MINUTES);  }
-            this.form.setValue(FIELD_VALUE, value);
-            String units = chunks[1];
             SelectItem unitsItem = (SelectItem) this.form.getItem(FIELD_UNITS);
-            if (MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.SECONDS).equals(units)) \
                {
-                unitsItem.setValue(TimeUnit.SECONDS.name().toLowerCase());
-            } else if \
                (MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.MINUTES)
                
-                .equals(units)) {
-                unitsItem.setValue(TimeUnit.MINUTES.name().toLowerCase());
-            } else if \
(MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.HOURS).equals(units)) \
                {
-                unitsItem.setValue(TimeUnit.HOURS.name().toLowerCase());
-            } else if \
(MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.DAYS).equals(units)) \
                {
-                unitsItem.setValue(TimeUnit.DAYS.name().toLowerCase());
-            }
+            this.form.setValue(FIELD_VALUE, valueWithUnits.getValue().intValue());
+            unitsItem.setValue(valueWithUnits.getUnits().name().toLowerCase());
         }
     }
 


commit 2e3f2b2e2f8db3894fea0777508e79e4bf3817cd
Author: John Mazzitelli <mazz@redhat.com>
Date:   Tue May 28 14:32:14 2013 -0400

    BZ 967990 the installer now turns off the admin console

diff --git a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/CoreJBossASClient.java \
b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/CoreJBossASClient.java
 index 8cef6e1..eaf6f66 100644
--- a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/CoreJBossASClient.java
                
+++ b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/CoreJBossASClient.java
 @@ -40,12 +40,33 @@ public class CoreJBossASClient extends JBossASClient {
     public static final String SCANNER = "scanner";
     public static final String EXTENSION = "extension";
     public static final String MODULE = "module";
+    public static final String CORE_SERVICE_MGMT = "management";
+    public static final String MGMT_INTERFACE = "management-interface";
+    public static final String MGMT_INTERFACE_HTTP = "http-interface";
 
     public CoreJBossASClient(ModelControllerClient client) {
         super(client);
     }
 
     /**
+     * Allows the caller to turn on or off complete access for the app server's \
admin console. +     *
+     * @param enableFlag true if the admin console enabled and visible; false if you \
want to prohibit all access to the admin console +     * @throws Exception 
+     */
+    public void setEnableAdminConsole(boolean enableFlag) throws Exception {
+        // /core-service=management/management-interface=http-interface/:write-attribute(name=console-enabled,value=false)
 +        final Address address = Address.root()
+            .add(CORE_SERVICE, CORE_SERVICE_MGMT, MGMT_INTERFACE, \
MGMT_INTERFACE_HTTP); +        final ModelNode req = \
createWriteAttributeRequest("console-enabled", Boolean.toString(enableFlag), \
address); +        final ModelNode response = execute(req);
+        if (!isSuccess(response)) {
+            throw new FailureException(response);
+        }
+        return;
+    }
+
+    /**
      * Given a string with possible ${x} expressions in it, this will resolve that \
                expression
      * using system property values that are set within the AS JVM itself. If the \
                string
      * to resolve has no expressions, or has no expressions that are resolveable, \
                the expression
diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java \
b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
 index 0b9c078..bb42d4a 100644
--- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
                
+++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
 @@ -1034,6 +1034,9 @@ public class InstallerServiceImpl implements InstallerService \
{  // we don't want to the JBossAS welcome screen; turn it off
             new WebJBossASClient(mcc).setEnableWelcomeRoot(false);
 
+            // we don't want users to access the admin console
+            new CoreJBossASClient(mcc).setEnableAdminConsole(false);
+
         } catch (Exception e) {
             log("deployServices failed", e);
             throw new Exception("Failed to deploy services: " + \
ThrowableUtil.getAllMessages(e));


commit 57333dd7c4a683fe39bfcf68ea706cbfa6feded9
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Tue May 28 18:40:38 2013 +0200

    [BZ 967542] - UI shows confusing units when editing Availability Duration alert \
condition type  
    I improved the DurationItem component to use internally the SelectItem
    instead of ComboBoxItem. When using ComboBoxItem, it was possible to
    write to the combobox and this is something that shouldn't happen in
    this component because the unit types should be fixed. The DurationItem
    is also used from the operation tab view, but no reggression was
    introduced by this commit in this view.
    
    Modifying also the DurationItem.setAndFormatValue() to populate the time \
                correctly when
    !isReadOnly.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
 index 8fe6d4b..0a2627c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
 @@ -65,7 +65,6 @@ import \
org.rhq.enterprise.gui.coregui.client.components.form.DurationItem;  import \
org.rhq.enterprise.gui.coregui.client.components.form.NumberWithUnitsValidator;  \
import org.rhq.enterprise.gui.coregui.client.components.form.SortedSelectItem;  \
                import \
                org.rhq.enterprise.gui.coregui.client.components.form.TimeUnit;
-import org.rhq.enterprise.gui.coregui.client.components.form.UnitType;
 import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
 import org.rhq.enterprise.gui.coregui.client.util.measurement.MeasurementParser;
 import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -959,7 +958,7 @@ public class ConditionEditor extends EnhancedVLayout {
         durationValue.setTooltip(MSG.view_alert_definition_condition_editor_availabilityDuration_tooltip_duration());
  durationValue.setHoverWidth(200);
         if (editMode) {
-            durationValue.setValue(Integer.parseInt(existingCondition.getOption()), \
UnitType.TIME); +            \
durationValue.setAndFormatValue(Integer.parseInt(existingCondition.getOption()) * \
1000L);  }
         durationValue.setShowIfCondition(ifFunc);
         formItems.add(durationValue);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 index 25742f5..e24d1b4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 @@ -211,6 +211,8 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
                         public void execute(Boolean value) {
                             if (value) {
                                 save();
+                            } else {
+                                unregisterHandler();
                             }
                         }
                     });
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
 index 633188a..104b84c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
 @@ -29,17 +29,19 @@ import java.util.TreeSet;
 
 import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.CanvasItem;
-import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
 import com.smartgwt.client.widgets.form.fields.FormItem;
 import com.smartgwt.client.widgets.form.fields.IntegerItem;
+import com.smartgwt.client.widgets.form.fields.SelectItem;
 import com.smartgwt.client.widgets.form.fields.StaticTextItem;
 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
 import com.smartgwt.client.widgets.form.validator.IntegerRangeValidator;
 
+import org.rhq.core.domain.measurement.MeasurementUnits;
 import org.rhq.enterprise.gui.coregui.client.CoreGUI;
 import org.rhq.enterprise.gui.coregui.client.Messages;
 import org.rhq.enterprise.gui.coregui.client.util.FormUtility;
+import org.rhq.enterprise.gui.coregui.client.util.MeasurementConverterClient;
 import org.rhq.enterprise.gui.coregui.client.util.TypeConversionUtility;
 
 /**
@@ -142,7 +144,7 @@ public class DurationItem extends CanvasItem {
                 }
             });
 
-            ComboBoxItem unitsItem = new ComboBoxItem(FIELD_UNITS);
+            SelectItem unitsItem = new SelectItem(FIELD_UNITS);
             unitsItem.setShowTitle(false);
 
             LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, \
String>(); @@ -230,10 +232,33 @@ public class DurationItem extends CanvasItem {
         if (longValue < 0) {
             throw new IllegalArgumentException("negative time period " + longValue);
         }
-        String formattedOutput = formatMilliseconds(longValue);
-        this.unitType = UnitType.TIME;
-        this.form.setValue(FIELD_VALUE, formattedOutput);
-        setValue(formattedOutput);
+        if (isReadOnly) {
+            String formattedOutput = formatMilliseconds(longValue);
+            this.unitType = UnitType.TIME;
+            this.form.setValue(FIELD_VALUE, formattedOutput);
+            setValue(formattedOutput);
+        } else {
+            String valueWithUnits = MeasurementConverterClient.format((double) \
longValue, +                MeasurementUnits.MILLISECONDS, true);
+            String[] chunks = valueWithUnits.split(" ");
+            String value = chunks[0];
+            if (value.endsWith(".0")) {
+                value = value.substring(0, value.indexOf(".0"));
+            }
+            this.form.setValue(FIELD_VALUE, value);
+            String units = chunks[1];
+            SelectItem unitsItem = (SelectItem) this.form.getItem(FIELD_UNITS);
+            if (MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.SECONDS).equals(units)) \
{ +                unitsItem.setValue(TimeUnit.SECONDS.name().toLowerCase());
+            } else if \
(MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.MINUTES) \
+                .equals(units)) { +                \
unitsItem.setValue(TimeUnit.MINUTES.name().toLowerCase()); +            } else if \
(MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.HOURS).equals(units)) \
{ +                unitsItem.setValue(TimeUnit.HOURS.name().toLowerCase());
+            } else if \
(MeasurementConverterClient.getMeasurementUnitAbbreviation(MeasurementUnits.DAYS).equals(units)) \
{ +                unitsItem.setValue(TimeUnit.DAYS.name().toLowerCase());
+            }
+        }
     }
 
     /**
@@ -474,7 +499,7 @@ public class DurationItem extends CanvasItem {
     }
 
     private TimeUnit getInputTimeUnit() {
-        ComboBoxItem unitsItem = (ComboBoxItem) this.form.getItem(FIELD_UNITS);
+        SelectItem unitsItem = (SelectItem) this.form.getItem(FIELD_UNITS);
         String unitString = unitsItem.getValueAsString(); // this will always be \
non-null  TimeUnit unit;
         try {


commit ecb57a4e3e147e18b000388a2baec312c31c7bf2
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Tue May 28 12:36:26 2013 -0400

    Make sure sub-queries used for updates do not include implicit
    paging/sorting.
    
    Also, make a small change to test cleanup in related test class.
    
    Note: Fix by lkrejci

diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementScheduleManagerTest.java \
b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementScheduleManagerTest.java
 index 9febeb8..24bcc84 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementScheduleManagerTest.java
                
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementScheduleManagerTest.java
 @@ -342,10 +342,15 @@ public class MeasurementScheduleManagerTest extends \
AbstractMeasurementScheduleM  try {
             if (null != em) {
                 em.flush();
-                getTransactionManager().commit();
             }
         } catch (Throwable t) {
-
+            // best effort
+        }
+        try {
+            getTransactionManager().commit();
+        } catch (Throwable t) {
+            // best effort                
         }
     }
+
 }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
 index 2e4eeda..d53a037 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
 @@ -820,6 +820,7 @@ public class MeasurementScheduleManagerBean implements \
                MeasurementScheduleManage
      */
     private void markResources(EntityContext context, int agentId) {
         ResourceCriteria criteria = new ResourceCriteria();
+        criteria.clearPaging(); //important to avoid setting the ordering in the \
generated query  if (context.type == EntityContext.Type.Resource) {
             criteria.addFilterId(context.resourceId);
         } else if (context.type == EntityContext.Type.ResourceGroup) {
@@ -832,7 +833,7 @@ public class MeasurementScheduleManagerBean implements \
MeasurementScheduleManage  
         try {
             CriteriaQueryGenerator generator = new CriteriaQueryGenerator(criteria);
-            ;
+
             generator.alterProjection("resource.id");
             String resourceSubQuery = generator.getParameterReplacedQuery(false);
 
@@ -848,7 +849,7 @@ public class MeasurementScheduleManagerBean implements \
                MeasurementScheduleManage
             markResourceQuery.setParameter("now", System.currentTimeMillis());
             int affectedRows = markResourceQuery.executeUpdate();
             if (log.isDebugEnabled()) {
-                log.debug("Marked " + affectedRows + " for future measurement \
scheudle update"); +                log.debug("Marked " + affectedRows + " for future \
measurement schedule update");  }
         } catch (Throwable t) {
             log.error("Could not notify agents of updates", t);
@@ -877,6 +878,7 @@ public class MeasurementScheduleManagerBean implements \
MeasurementScheduleManage  }
 
         MeasurementScheduleCriteria criteria = new MeasurementScheduleCriteria();
+        criteria.clearPaging(); //important to avoid setting the ordering in the \
generated query  if (context.type == EntityContext.Type.Resource) {
             criteria.addFilterResourceId(context.resourceId);
         } else if (context.type == EntityContext.Type.ResourceGroup) {
@@ -1607,4 +1609,4 @@ public class MeasurementScheduleManagerBean implements \
MeasurementScheduleManage  //        }
     //    }
 
-}
+}
\ No newline at end of file


commit 2f15379bb357495c558b05fb271e247fa1681d01
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Tue May 28 17:36:13 2013 +0200

    Bug 885686 - Tomcat web application configuration form allows save without Config \
File required field  
    It's not a Tomcat specific issue. We had a problem in *EditView classes: the \
check to enable/disable the save button was only based on the invalid properties set \
having been changed. Now it also looks at the set being empty or not.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionEditView.java
 index c7604c4..a428a22 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.drift;
 
@@ -190,8 +190,10 @@ public class DriftDefinitionEditView extends EnhancedVLayout \
                implements Property
                     .toString()), Message.Severity.Error, \
EnumSet.of(Message.Option.Transient, Message.Option.Sticky));  }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplateEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplateEditView.java
 index dd69993..0ccc445 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplateEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplateEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.drift;
 
@@ -178,8 +178,10 @@ public class DriftDefinitionTemplateEditView extends \
                EnhancedVLayout implements
                     .toString()), Message.Severity.Error, \
EnumSet.of(Message.Option.Transient, Message.Option.Sticky));  }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coreg \
ui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
 index 55ac8fd..d0c440f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.configuration;
 
@@ -261,8 +261,10 @@ public class GroupResourceConfigurationEditView extends \
                EnhancedVLayout implemen
                     Message.Severity.Error, EnumSet.of(Message.Option.Transient, \
Message.Option.Sticky));  }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coreg \
ui/client/inventory/groups/detail/inventory/GroupPluginConfigurationEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/GroupPluginConfigurationEditView.java
 index b6e892f..8680cc4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/GroupPluginConfigurationEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/GroupPluginConfigurationEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory;
 
@@ -256,8 +256,10 @@ public class GroupPluginConfigurationEditView extends \
                EnhancedVLayout implements
                     Message.Severity.Error, EnumSet.of(Message.Option.Transient, \
Message.Option.Sticky));  }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coreg \
ui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
 index ae7fde1..e3b119c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration;
  
@@ -222,8 +222,10 @@ public class ResourceConfigurationEditView extends \
                EnhancedVLayout implements Pr
                     .toString()), Message.Severity.Error, \
EnumSet.of(Message.Option.Transient, Message.Option.Sticky));  }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
 index fd374eb..63245a2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory;
 
@@ -171,8 +171,10 @@ public class PluginConfigurationEditView extends EnhancedVLayout \
implements Prop  Message.Option.Sticky));
             }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestConfigurationView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestConfigurationView.java
 index 128a540..bdbe026 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestConfigurationView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestConfigurationView.java
 @@ -1,8 +1,7 @@
 /*
  * RHQ Management Platform
- * Copyright 2010-2011, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.test.configuration;
 
@@ -111,8 +110,10 @@ public class TestConfigurationView extends EnhancedVLayout \
                implements PropertyVa
                     EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
             }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestGroupConfigurationView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestGroupConfigurationView.java
 index 483e71c..00da718 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestGroupConfigurationView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/configuration/TestGroupConfigurationView.java
 @@ -1,8 +1,7 @@
 /*
  * RHQ Management Platform
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.test.configuration;
 
@@ -112,8 +111,10 @@ public class TestGroupConfigurationView extends EnhancedVLayout \
                implements Prope
                     EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
             }
             messageCenter.notify(message);
-        } else {
+        } else if (event.getInvalidPropertyNames().isEmpty()) {
             this.saveButton.enable();
+        } else {
+            this.saveButton.disable();
         }
     }
 


commit eeffaed93e68612eb6a88226479702d4f373e510
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Tue May 28 03:11:56 2013 +0200

    [BZ 967622 - Server CLI script can't require modules from rhq://downloads]
    
    This was primarily caused by a new permission required by EAP 6.1 we've
    switched to. To access the ModelControllerClient, the code now needs a
    RuntimePermission("canAccessModelController").
    
    We need the ModelControllerClient when determining the EAR installation
    dir, which we in turn need when determining where to locate the scripts
    in the "rhq://downloads" location. This is done while running a script,
    which is done in a restricted access control context which does not and
    should not have that permission.
    
    The minimal fix is to wrap the getting of the ModelControllerClient in a
    privileged action but some more "defensive" code was added in the
    RhqDownloadScriptSourceProvider, too, to guard against different times it
    might get instantiated during the script execution.
    
    Javadocs were updated to warn about the security considerations when
    writing a script source provider available on the server side.

diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/script/BaseRhqSchemeScriptSourceProvider.java \
b/modules/enterprise/binding/src/main/java/org/rhq/bindings/script/BaseRhqSchemeScriptSourceProvider.java
 index 4c6756f..87241ef 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/script/BaseRhqSchemeScriptSourceProvider.java
                
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/script/BaseRhqSchemeScriptSourceProvider.java
 @@ -55,8 +55,11 @@ public abstract class BaseRhqSchemeScriptSourceProvider \
                implements ScriptSourceP
      * The base implementation of the {@link #getScriptSource(URI)} method
      * only checks that the scheme of the URI is "rhq" and that the scheme
      * specific part starts with "//".
-     * 
-     * @param scriptUri
+     * <p/>
+     * Please follow the general suggestions mentioned in {@link \
ScriptSourceProvider#getScriptSource(java.net.URI)} +     * docs.
+     *
+     * @param scriptUri the URI to load the script from
      * @return the reader of the script or null if the script could not be 
      * found using the URI
      * 
diff --git a/modules/enterprise/scripting/api/src/main/java/org/rhq/scripting/ScriptSourceProvider.java \
b/modules/enterprise/scripting/api/src/main/java/org/rhq/scripting/ScriptSourceProvider.java
 index e65f793..fb0f606 100644
--- a/modules/enterprise/scripting/api/src/main/java/org/rhq/scripting/ScriptSourceProvider.java
                
+++ b/modules/enterprise/scripting/api/src/main/java/org/rhq/scripting/ScriptSourceProvider.java
 @@ -29,14 +29,26 @@ import java.net.URI;
  * <p>
  * Implementations of this interface can be located using the {@link \
                ScriptSourceProviderFactory}
  * if they are registered in META-INF/services.
- * 
+ * <p/>
+ * Note that instances of this class can be created and called in an access control \
context with limited privileges. + * If you need to make safe calls that require \
privileges not granted to a script run in the RHQ server (by default this + * is \
determined by the {@code org.rhq.bindings.StandardScriptPermissions} class), make \
sure to call such actions with + * elevated permissions through
+ * {@link java.security.AccessController#doPrivileged(java.security.PrivilegedExceptionAction)} \
or any of its + * derivatives.
+ * <p/>
+ * For example JNDI look-ups are not allowed by default for the scripts, so if your \
provider needs to perform some + * JNDI lookups to locate the script to include, you \
need to wrap any code that does a JNDI look-up as above. + *
  * @author Lukas Krejci
  */
 public interface ScriptSourceProvider {
 
     /**
      * Returns the reader of the source of the script specified by given location.
-     * 
+     * <p/>
+     * Review the class description for the security considerations.
+     *
      * @param location the location of the script
      * @return the reader of the script source or null if it could not be found
      */
diff --git a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/RhqDownloadsScriptSourceProvider.java \
b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/RhqDownloadsScriptSourceProvider.java
 index 1cbbe39..23e8fb5 100644
--- a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/RhqDownloadsScriptSourceProvider.java
                
+++ b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/RhqDownloadsScriptSourceProvider.java
 @@ -26,6 +26,11 @@ import java.io.FileNotFoundException;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.net.URI;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.concurrent.Callable;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -45,20 +50,67 @@ public class RhqDownloadsScriptSourceProvider extends \
BaseRhqSchemeScriptSourceP  
     private CoreServerMBean coreServer;
 
+    /**
+     * A bunch of methods optionally enclosed in privileged actions to ensure that \
we can access the information +     * inside RHQ server even though it might not be \
accessible in the access control context the scripts run in +     * in the RHQ \
server. +     */
+    private static class SecurityActions {
+        private SecurityActions() {
+
+        }
+
+        private static CoreServerMBean lookupCoreServer() {
+            if (System.getSecurityManager() == null) {
+                return LookupUtil.getCoreServer();
+            } else {
+                return AccessController.doPrivileged(new \
PrivilegedAction<CoreServerMBean>() { +                    @Override
+                    public CoreServerMBean run() {
+                        return LookupUtil.getCoreServer();
+                    }
+                });
+            }
+        }
+
+        private static File getDownloadDir(final CoreServerMBean coreServer) {
+            File earDeployDir;
+            if (System.getSecurityManager() == null) {
+                earDeployDir = coreServer.getEarDeploymentDir();
+            } else {
+               earDeployDir = AccessController.doPrivileged(new \
PrivilegedAction<File>() { +                    @Override
+                    public File run() {
+                        return coreServer.getEarDeploymentDir();
+                    }
+                });
+            }
+            File downloadDir = new File(earDeployDir, "rhq-downloads");
+            return downloadDir;
+        }
+    }
+
     public RhqDownloadsScriptSourceProvider() {
-        this(LookupUtil.getCoreServer());
+        //we need to do a safe JNDI lookup, but we may run in unprivileged \
context... +        this(SecurityActions.lookupCoreServer());
     }
-    
+
+    /**
+     * This is meant only for testing purposes.
+     *
+     * @param coreServerMBean the CoreServer MBean to use
+     */
     public RhqDownloadsScriptSourceProvider(CoreServerMBean coreServerMBean) {
         super(AUTHORITY);
         this.coreServer = coreServerMBean;
     }
-    
+
     @Override
     protected Reader doGetScriptSource(URI scriptUri) {
         String path = scriptUri.getPath().substring(1); //remove the leading /
 
-        File downloadsDir = getDownloadHomeDir();
+        //We're going to be doing an MBean call here which the scripts don't have \
privs for by default +        File downloadsDir = \
SecurityActions.getDownloadDir(coreServer);  File scriptDownloads = new \
File(downloadsDir, "script-modules");  File file = new File(scriptDownloads, path);
 
@@ -69,10 +121,4 @@ public class RhqDownloadsScriptSourceProvider extends \
BaseRhqSchemeScriptSourceP  return null;
         }
     }
-
-    private File getDownloadHomeDir() {
-        File earDeployDir = this.coreServer.getEarDeploymentDir();
-        File downloadDir = new File(earDeployDir, "rhq-downloads");
-        return downloadDir;
-    }
 }
diff --git a/modules/enterprise/server/client-api/src/test/java/org/rhq/enterprise/client/test/RhqDownloadsScriptSourceProviderTest.java \
b/modules/enterprise/server/client-api/src/test/java/org/rhq/enterprise/client/test/RhqDownloadsScriptSourceProviderTest.java
 index e62dd32..1b366ba 100644
--- a/modules/enterprise/server/client-api/src/test/java/org/rhq/enterprise/client/test/RhqDownloadsScriptSourceProviderTest.java
                
+++ b/modules/enterprise/server/client-api/src/test/java/org/rhq/enterprise/client/test/RhqDownloadsScriptSourceProviderTest.java
 @@ -85,8 +85,8 @@ public class RhqDownloadsScriptSourceProviderTest {
         try {
             String contents = StreamUtil.slurp(rdr);
             assertEquals(contents, EXPECTED_CONTENTS, "Unexpected script loaded");
-        } finally {        
-            rdr.close();
+        } finally {
+            StreamUtil.safeClose(rdr);
         }
     }
 }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServer.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServer.java
 index 9a60f12..b74b704 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServer.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServer.java
 @@ -22,6 +22,8 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.management.ManagementFactory;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Properties;
@@ -69,6 +71,24 @@ public class CoreServer implements CoreServerMBean {
      */
     private static final String PROP_BUILD_DATE = "Build-Date";
 
+    private static class SecurityActions {
+        private SecurityActions() {
+
+        }
+
+        private static ModelControllerClient getModelControllerClient() {
+            if (System.getSecurityManager() == null) {
+                return ManagementService.getClient();
+            } else {
+                return AccessController.doPrivileged(new \
PrivilegedAction<ModelControllerClient>() { +                    @Override
+                    public ModelControllerClient run() {
+                        return ManagementService.getClient();
+                    }
+                });
+            }
+        }
+    }
     private Properties buildProps;
 
     private Date bootTime;
@@ -136,7 +156,10 @@ public class CoreServer implements CoreServerMBean {
 
     @Override
     public File getEarDeploymentDir() {
-        ModelControllerClient mcc = ManagementService.getClient();
+        //Getting model controller client requires privs our callers might not have, \
but we want to provide this +        //function even to them.
+        ModelControllerClient mcc = SecurityActions.getModelControllerClient();
+
         try {
             DeploymentJBossASClient client = new DeploymentJBossASClient(mcc);
             String earPath = client.getDeploymentPath(RHQConstants.EAR_FILE_NAME);
@@ -229,4 +252,4 @@ public class CoreServer implements CoreServerMBean {
 
         return buildProps;
     }
-}
\ No newline at end of file
+}


commit ff37cd971a73a9fefc4024f5022aff85b7b90b90
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Fri May 24 23:29:46 2013 -0400

    remove use of method not supported by GWT

diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java index \
                d8552de..f398020 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
@@ -179,7 +179,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  this.sortId = sortId;
 
         } else {
-            throw new UnsupportedOperationException("ID sort is not supported by " + \
this.getClass().getSimpleName()); +            throw new \
UnsupportedOperationException("ID sort is not supported by supported by this class"); \
}  }
 
@@ -188,7 +188,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  this.filterId = filterId;
 
         } else {
-            throw new UnsupportedOperationException("ID filter is not supported by " \
+ this.getClass().getSimpleName()); +            throw new \
UnsupportedOperationException("ID filter is not supported by this class");  }
     }
 
@@ -197,7 +197,7 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
             this.filterIds = CriteriaUtils.getListIgnoringNulls(filterIds);
 
         } else {
-            throw new UnsupportedOperationException("IDS filter is not supported by \
" + this.getClass().getSimpleName()); +            throw new \
UnsupportedOperationException("IDS filter is not supported by this class");  }
     }
 


commit 471b8a20f984f79d448acf58c01ec8c38cee8e67
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Fri May 24 19:45:41 2013 -0400

    Bug 966665
    - Criteria queries with paging and sorting on non unique fields may return same \
item on different pages  
    All paged criteria queries now apply ID as the least significant
    ordering field (see exceptions below).  Since ID is unique, this ensures
    that queries for pages always return the same ordering of rows.
    
    ID will not be automatically appended as an ordering field if:
    - the paging is unlimited (i.e. no pagesize, all rows returned)
    - the Criteria class does not support an ID sort
    - the caller has set the Criteria class instance to not support the ID sort
    - ID is already specified as an ordering field
    - the max number of ordering fields has already been set (3)
    
    Note that CriteriaQuery has had its support for implicit ID sorting removed,
    as the new mechanism, which moves support to the CriteriaQueryGenerator,
    replaces it.

diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java index \
                2dde3a4..d8552de 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
@@ -109,6 +109,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  private List<Permission> requiredPermissions;
     private boolean strict;
     private Restriction restriction = null;
+    private boolean supportsAddSortId = true;
 
     protected Map<String, String> filterOverrides;
     protected Map<String, String> sortOverrides;
@@ -173,16 +174,54 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  }
 
     public void addSortId(PageOrdering sortId) {
-        addSortField("id");
-        this.sortId = sortId;
+        if (isSupportsAddSortId()) {
+            addSortField("id");
+            this.sortId = sortId;
+
+        } else {
+            throw new UnsupportedOperationException("ID sort is not supported by " + \
this.getClass().getSimpleName()); +        }
     }
 
     public void addFilterId(Integer filterId) {
-        this.filterId = filterId;
+        if (isSupportsAddFilterId()) {
+            this.filterId = filterId;
+
+        } else {
+            throw new UnsupportedOperationException("ID filter is not supported by " \
+ this.getClass().getSimpleName()); +        }
     }
 
     public void addFilterIds(Integer... filterIds) {
-        this.filterIds = CriteriaUtils.getListIgnoringNulls(filterIds);
+        if (isSupportsAddFilterIds()) {
+            this.filterIds = CriteriaUtils.getListIgnoringNulls(filterIds);
+
+        } else {
+            throw new UnsupportedOperationException("IDS filter is not supported by \
" + this.getClass().getSimpleName()); +        }
+    }
+
+    /**
+     * By default all Criteria support sort on ID.  And this sort is applied \
implicitly to criteria +     * queries involving paging, to ensure consistent \
ordering of query results. If for some unlikely reason +     * the caller needs to \
disable the implicit ID sort then call this, setting the value to false. +     *  
+     * @param supportsAddSortId
+     */
+    public void setSupportsAddSortId(boolean supportsAddSortId) {
+        this.supportsAddSortId = supportsAddSortId;
+    }
+
+    public boolean isSupportsAddSortId() {
+        return supportsAddSortId;
+    }
+
+    public boolean isSupportsAddFilterId() {
+        return true;
+    }
+
+    public boolean isSupportsAddFilterIds() {
+        return true;
     }
 
     protected void addSortField(String fieldName) {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
 index af888ea..2b03228 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
                
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
 @@ -292,13 +292,12 @@ public class JPADriftChangeSetCriteria extends Criteria \
implements DriftChangeSe  }
 
     @Override
-    public void addSortId(PageOrdering pageOrdering) {
-        throw new UnsupportedOperationException("The sort is not supported by \
DriftChangeSetCriteria."); +    public boolean isSupportsAddSortId() {
+        return false;
     }
 
     @Override
-    public void addFilterIds(Integer... filterIds) {
-        throw new UnsupportedOperationException("The filter is not supported by \
DriftChangeSetCriteria."); +    public boolean isSupportsAddFilterIds() {
+        return false;
     }
-
 }
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java
 index 56f0ddf..b13ca90 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java
                
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java
 @@ -245,13 +245,12 @@ public class JPADriftCriteria extends Criteria implements \
DriftCriteria {  }
 
     @Override
-    public void addFilterIds(Integer... filterIds) {
-        throw new UnsupportedOperationException("The filter is not supported by \
DriftCriteria."); +    public boolean isSupportsAddSortId() {
+        return false;
     }
 
     @Override
-    public void addSortId(PageOrdering pageOrdering) {
-        throw new UnsupportedOperationException("The sort is not supported by \
DriftCriteria."); +    public boolean isSupportsAddFilterIds() {
+        return false;
     }
-
 }
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
 index a27e58d..3a2a2c1 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
                
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/MeasurementDataTraitCriteria.java
 @@ -135,17 +135,17 @@ public class MeasurementDataTraitCriteria extends Criteria {
     }
 
     @Override
-    public void addSortId(PageOrdering sortId) {
-        throw new UnsupportedOperationException("The id column is not defined on \
this entity."); +    public boolean isSupportsAddSortId() {
+        return false;
     }
 
     @Override
-    public void addFilterId(Integer filterId) {
-        throw new UnsupportedOperationException("The id column is not defined on \
this entity."); +    public boolean isSupportsAddFilterId() {
+        return false;
     }
 
     @Override
-    public void addFilterIds(Integer... filterIds) {
-        throw new UnsupportedOperationException("The id column is not defined on \
this entity."); +    public boolean isSupportsAddFilterIds() {
+        return false;
     }
 }
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java index \
                f87a814..888c821 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java
@@ -82,14 +82,22 @@ public class PageControl implements Serializable, Cloneable {
         return new PageControl(0, 1);
     }
 
+    /**
+     * Equivalent to initDefaultOrderingField(defaultField, PageOrdering.ASC). 
+     * 
+     * @param defaultField
+     * @see #initDefaultOrderingField(String, PageOrdering)
+     */
     public void initDefaultOrderingField(String defaultField) {
         initDefaultOrderingField(defaultField, PageOrdering.ASC);
     }
 
-    public void addDefaultOrderingField(String defaultField) {
-        addDefaultOrderingField(defaultField, PageOrdering.ASC);
-    }
-
+    /**
+     * Sets initial sort.  If sorting is already defined this call will have no \
effect. +     * 
+     * @param defaultField
+     * @param defaultPageOrdering
+     */
     public void initDefaultOrderingField(String defaultField, PageOrdering \
defaultPageOrdering) {  if (orderingFields.size() > 0) {
             return;
@@ -98,6 +106,24 @@ public class PageControl implements Serializable, Cloneable {
         addDefaultOrderingField(defaultField, defaultPageOrdering);
     }
 
+    /**
+     * Equivalent to addDefaultOrderingField(defaultField, PageOrdering.ASC). 
+     * 
+     * @param defaultField
+     * @see #addDefaultOrderingField(String, PageOrdering)
+     */
+    public void addDefaultOrderingField(String defaultField) {
+        addDefaultOrderingField(defaultField, PageOrdering.ASC);
+    }
+
+    /**
+     * Add a default ordering field.  If the maximum number of sort fields \
(currently 3) are already +     * defined this call will have no effect.  If the \
field is already a sort field this call will have no +     * effect.  Otherwise, the \
ordering field will be appended to the existing ordering fields.   +     * 
+     * @param defaultField
+     * @param defaultPageOrdering
+     */
     public void addDefaultOrderingField(String defaultField, PageOrdering \
defaultPageOrdering) {  if (orderingFields.size() >= MAX_ORDERING_FIELD_COUNT) {
             return; // only need to add defaults if there are less than 3 sort \
                orders
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQuery.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQuery.java
 index 2d40388..a2bbfee 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQuery.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQuery.java
 @@ -27,7 +27,6 @@ import java.util.NoSuchElementException;
 import org.rhq.core.domain.criteria.BaseCriteria;
 import org.rhq.core.domain.util.PageControl;
 import org.rhq.core.domain.util.PageList;
-import org.rhq.core.domain.util.PageOrdering;
 
 /** This class provides a way to make PageList results easily iterable with 'for \
                each','while',etc. loops
  *  and importantly automatically handles iteration through all PageControl results. \
This  @@ -62,17 +61,6 @@ public class CriteriaQuery<T, C extends BaseCriteria> \
                implements Iterable<T> {
     public CriteriaQuery(C criteria, CriteriaQueryExecutor<T, C> queryExecutor) {
         this.criteria = criteria;
         this.queryExecutor = queryExecutor;
-
-        // make sure we have at least a default sort, otherwise chunking doesn't \
                work
-        PageControl pageControlOverrides = this.criteria.getPageControlOverrides();
-        if (null != pageControlOverrides) {
-            if (pageControlOverrides.getOrderingFields().isEmpty()) {
-                pageControlOverrides.addDefaultOrderingField("id");
-            }
-
-        } else if (this.criteria.getOrderingFieldNames().isEmpty()) {
-            this.criteria.addSortId(PageOrdering.ASC);
-        }
     }
 
     /** Returns iterator for a single page of results as defined by
@@ -110,7 +98,8 @@ public class CriteriaQuery<T, C extends BaseCriteria> implements \
Iterable<T> {  public QueryResultsIterator(PageList<T> firstPage) {
             currentPage = firstPage;
             iterator = currentPage.iterator();
-            count = firstPage == null || firstPage.getPageControl() == null ? 0 : \
firstPage.getPageControl().getStartRow(); +            count = firstPage == null || \
firstPage.getPageControl() == null ? 0 : firstPage.getPageControl() +                \
.getStartRow();  }
 
         @Override
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 index d1d2f73..574fe73 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 @@ -951,6 +951,7 @@ public final class CriteriaQueryGenerator {
             } else {
                 pc = new PageControl(criteria.getPageNumber(), \
criteria.getPageSize());  }
+
             for (String fieldName : criteria.getOrderingFieldNames()) {
                 for (Field sortField : getFields(criteria, Criteria.Type.SORT)) {
                     if (sortField.getName().equals(fieldName) == false) {
@@ -969,6 +970,15 @@ public final class CriteriaQueryGenerator {
                 }
             }
         }
+
+        // Unless paging is unlimited or it's not supported, add a sort on ID.  This \
ensures that when paging +        // we always have a consistent ordering. In other \
words, if the data set is unchanged between pages, there +        // will no \
overlap/repetition of rows. Note that this applies even if other sort fields have \
been +        // set, because they may still not have unique values. See \
https://bugzilla.redhat.com/show_bug.cgi?id=966665. +        if (!pc.isUnlimited() && \
criteria.isSupportsAddSortId()) { +            pc.addDefaultOrderingField("id");
+        }
+
         return pc;
     }
 
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/CriteriaQueryTest.java \
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/CriteriaQueryTest.java
 index 2e1c897..b1f5272 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/CriteriaQueryTest.java
                
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/CriteriaQueryTest.java
 @@ -24,11 +24,15 @@ import static org.testng.Assert.assertEquals;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
 import org.rhq.core.domain.criteria.Criteria;
+import org.rhq.core.domain.criteria.JPADriftCriteria;
+import org.rhq.core.domain.criteria.ResourceCriteria;
 import org.rhq.core.domain.util.PageControl;
 import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
 
 public class CriteriaQueryTest {
 
@@ -229,4 +233,22 @@ public class CriteriaQueryTest {
             assert e.getMessage().contains("NonUniqueResultException");
         }
     }
+
+    @Test
+    public void testAddSort() {
+        try {
+            JPADriftCriteria c = new JPADriftCriteria();
+            c.addSortId(PageOrdering.ASC);
+            AssertJUnit.fail("Should have thrown exception");
+        } catch (UnsupportedOperationException e) {
+            //expected
+        }
+
+        ResourceCriteria c = new ResourceCriteria();
+        c.addSortName(PageOrdering.ASC);
+
+        assertEquals(2, \
CriteriaQueryGenerator.getPageControl(c).getOrderingFields().size()); +        \
assertEquals("name", \
CriteriaQueryGenerator.getPageControl(c).getOrderingFields().get(0).getField()); +    \
assertEquals("id", CriteriaQueryGenerator.getPageControl(c).getOrderingFields().get(1).getField());
 +    }
 }


commit 6613ba3db6f3c57c2d2ecac4823e368269a07152
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Fri May 24 15:40:51 2013 -0400

    Use only apache logger and not the jboss logger from the base class.

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java
 index d89c04b..b83a037 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java
 @@ -84,7 +84,7 @@ public class DelegatingLoginModule extends \
                UsernamePasswordLoginModule {
     public void initialize(Subject subject, CallbackHandler callbackHandler, \
Map<String, ?> sharedState,  Map<String, ?> options) {
 
-        debugEnabled = log.isDebugEnabled();
+        debugEnabled = LOG.isDebugEnabled();
 
         super.initialize(subject, callbackHandler, sharedState, options);
 
@@ -101,14 +101,14 @@ public class DelegatingLoginModule extends \
UsernamePasswordLoginModule {  }
 
         if (debugEnabled) {
-            log.debug("Delegating to " + delegateTo + " with roles " + \
additionalRoles); +            LOG.debug("Delegating to " + delegateTo + " with roles \
" + additionalRoles);  }
 
         // Now create the context for later use
         try {
             loginContext = new LoginContext(delegateTo, new \
DelegateCallbackHandler());  } catch (LoginException e) {
-            log.warn("Initialize failed : " + e.getMessage());
+            LOG.warn("Initialize failed : " + e.getMessage());
         }
     }
 
@@ -123,7 +123,7 @@ public class DelegatingLoginModule extends \
UsernamePasswordLoginModule {  @Override
     public boolean login() throws LoginException {
         try {
-            // Get the username / password the user entred and save if for later use
+            // Get the username / password the user entered and save if for later \
use  usernamePassword = super.getUsernameAndPassword();
 
             // Try to log in via the delegate
@@ -141,7 +141,7 @@ public class DelegatingLoginModule extends \
UsernamePasswordLoginModule {  loginOk = true;
 
             if (debugEnabled) {
-                log.debug("Login ok for " + usernamePassword[0]);
+                LOG.debug("Login ok for " + usernamePassword[0]);
             }
 
             return true;


commit dfa94acdf6e92526bf35f08ebd2199c3c4c4db87
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Fri May 24 23:56:54 2013 +0200

    Bug 920214 - [as7] add async avail check support to AS7 plugin
    
    Only applies to server level resource (Standalone, Domain and Managed servers)

diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 5f538b7..d85e7e3 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -617,6 +617,7 @@
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java</include>-->
 +                <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/nonpc/ManagementConnectionPersistenceTest.java</include>-->
  </includes>
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
 index b80a39a..5d540fd 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
 @@ -16,6 +16,7 @@
  * along with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
 package org.rhq.modules.plugins.jbossas7;
 
 import java.io.File;
@@ -40,6 +41,8 @@ import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.domain.measurement.MeasurementDataTrait;
 import org.rhq.core.domain.measurement.MeasurementReport;
 import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
+import org.rhq.core.pluginapi.availability.AvailabilityFacet;
 import org.rhq.core.pluginapi.event.log.LogFileEventResourceComponentHelper;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
 import org.rhq.core.pluginapi.inventory.ResourceComponent;
@@ -81,7 +84,8 @@ public abstract class BaseServerComponent<T extends \
ResourceComponent<?>> extend  private LogFileEventResourceComponentHelper \
logFileEventDelegate;  private StartScriptConfiguration startScriptConfig;
     private ServerPluginConfiguration serverPluginConfig;
-    private AvailabilityType lastAvail;
+    private AvailabilityType previousAvailabilityType;
+    private AvailabilityCollectorRunnable availabilityCollector;
 
     @Override
     public void start(ResourceContext<T> resourceContext) throws \
InvalidPluginConfigurationException, Exception { @@ -89,38 +93,69 @@ public abstract \
class BaseServerComponent<T extends ResourceComponent<?>> extend  
         serverPluginConfig = new ServerPluginConfiguration(pluginConfiguration);
         connection = \
ASConnection.newInstanceForServerPluginConfiguration(serverPluginConfig); +        // \
The availabilityCollector is still null at this point. So this call will always \
perform a real availability +        // check and throw \
InvalidPluginConfigurationException as needed.  getAvailability();
         logFileEventDelegate = new LogFileEventResourceComponentHelper(context);
         logFileEventDelegate.startLogFileEventPollers();
         startScriptConfig = new StartScriptConfiguration(pluginConfiguration);
+
+        Integer availabilityCheckPeriod = null;
+        try {
+            availabilityCheckPeriod = \
serverPluginConfig.getAvailabilityCheckPeriod(); +        } catch \
(NumberFormatException e) { +            log.error("Avail check period config prop \
was not a valid number. Cause: " + e); +        }
+        if (availabilityCheckPeriod != null) {
+            long availCheckMillis = availabilityCheckPeriod * 1000L;
+            this.availabilityCollector = \
resourceContext.getAvailabilityContext().createAvailabilityCollectorRunnable( +       \
new AvailabilityFacet() { +                        public AvailabilityType \
getAvailability() { +                            return getAvailabilityNow();
+                        }
+                    }, availCheckMillis);
+            this.availabilityCollector.start();
+        }
     }
 
     @Override
     public void stop() {
         logFileEventDelegate.stopLogFileEventPollers();
-        lastAvail = null;
+        previousAvailabilityType = null;
+        if (this.availabilityCollector != null) {
+            this.availabilityCollector.stop();
+            this.availabilityCollector = null;
+        }
     }
 
     @Override
     public AvailabilityType getAvailability() {
-        AvailabilityType avail;
+        if (this.availabilityCollector != null) {
+            return this.availabilityCollector.getLastKnownAvailability();
+        } else {
+            return getAvailabilityNow();
+        }
+    }
+
+    private AvailabilityType getAvailabilityNow() {
+        AvailabilityType availabilityType;
         try {
             readAttribute("launch-type");
-            avail = AvailabilityType.UP;
+            availabilityType = AvailabilityType.UP;
         } catch (Exception e) {
-            avail = AvailabilityType.DOWN;
+            availabilityType = AvailabilityType.DOWN;
         }
 
         try {
-            if ((avail == AvailabilityType.UP) && (lastAvail != \
AvailabilityType.UP)) { +            if ((availabilityType == AvailabilityType.UP) && \
(previousAvailabilityType != AvailabilityType.UP)) {  validateServerAttributes();
                 log.info(getResourceDescription() + " has just come UP.");
             }
         } finally {
-            lastAvail = avail;
+            previousAvailabilityType = availabilityType;
         }
 
-        return avail;
+        return availabilityType;
     }
 
     private void validateServerAttributes() throws \
                InvalidPluginConfigurationException {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
 index e7fcd5b..4f0ea36 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,11 +13,14 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
 package org.rhq.modules.plugins.jbossas7;
 
+import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.AVAIL_CHECK_PERIOD_CONFIG_PROP;
 +
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashSet;
@@ -30,6 +33,8 @@ import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.domain.measurement.MeasurementDataTrait;
 import org.rhq.core.domain.measurement.MeasurementReport;
 import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
+import org.rhq.core.pluginapi.availability.AvailabilityFacet;
 import org.rhq.core.pluginapi.event.log.LogFileEventResourceComponentHelper;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
 import org.rhq.core.pluginapi.inventory.ResourceContext;
@@ -51,6 +56,7 @@ public class ManagedASComponent extends \
BaseComponent<HostControllerComponent<?>  
     private static final String MANAGED_SERVER_TYPE_NAME = "Managed Server";
     private LogFileEventResourceComponentHelper logFileEventDelegate;
+    private AvailabilityCollectorRunnable availabilityCollector;
 
     @Override
     public void start(ResourceContext<HostControllerComponent<?>> \
hostControllerComponentResourceContext) @@ -59,13 +65,34 @@ public class \
ManagedASComponent extends BaseComponent<HostControllerComponent<?>  
         logFileEventDelegate = new LogFileEventResourceComponentHelper(context);
         logFileEventDelegate.startLogFileEventPollers();
+
+        Integer availabilityCheckPeriod = null;
+        try {
+            availabilityCheckPeriod = \
pluginConfiguration.getSimple(AVAIL_CHECK_PERIOD_CONFIG_PROP).getIntegerValue(); +    \
} catch (NumberFormatException e) { +            log.error("Avail check period config \
prop was not a valid number. Cause: " + e); +        }
+        if (availabilityCheckPeriod != null) {
+            long availCheckMillis = availabilityCheckPeriod * 1000L;
+            this.availabilityCollector = \
hostControllerComponentResourceContext.getAvailabilityContext() +                    \
.createAvailabilityCollectorRunnable(new AvailabilityFacet() { +                      \
public AvailabilityType getAvailability() { +                            return \
getAvailabilityNow(); +                        }
+                    }, availCheckMillis);
+            this.availabilityCollector.start();
+        }
+
     }
 
     @Override
     public void stop() {
         super.stop();
-
         logFileEventDelegate.stopLogFileEventPollers();
+        if (this.availabilityCollector != null) {
+            this.availabilityCollector.stop();
+            this.availabilityCollector = null;
+        }
     }
 
     /**
@@ -76,6 +103,14 @@ public class ManagedASComponent extends \
                BaseComponent<HostControllerComponent<?>
      */
     @Override
     public AvailabilityType getAvailability() {
+        if (this.availabilityCollector != null) {
+            return this.availabilityCollector.getLastKnownAvailability();
+        } else {
+            return getAvailabilityNow();
+        }
+    }
+
+    private AvailabilityType getAvailabilityNow() {
         if (context.getResourceType().getName().equals(MANAGED_SERVER_TYPE_NAME)) {
             Address theAddress = new Address();
             String host = pluginConfiguration.getSimpleValue("domainHost", "local");
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/ServerPluginConfiguration.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/ServerPluginConfiguration.java
 index 1433c17..3832ed2 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/ServerPluginConfiguration.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/ServerPluginConfiguration.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,14 +13,16 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
 package org.rhq.modules.plugins.jbossas7.helper;
 
 import java.io.File;
 
 import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.modules.plugins.jbossas7.JBossProductType;
 
 /**
@@ -43,6 +45,7 @@ public class ServerPluginConfiguration {
         public static final String LOG_DIR = "logDir";
         public static final String PRODUCT_TYPE = "productType";
         public static final String HOST_CONFIG_FILE = "hostConfigFile";
+        public static final String AVAIL_CHECK_PERIOD_CONFIG_PROP = \
"availabilityCheckPeriod";  }
 
     private Configuration pluginConfig;
@@ -143,4 +146,14 @@ public class ServerPluginConfiguration {
                 hostConfigFile.toString() : null);
     }
 
+    public Integer getAvailabilityCheckPeriod() {
+        PropertySimple propertySimple = \
this.pluginConfig.getSimple(Property.AVAIL_CHECK_PERIOD_CONFIG_PROP); +        return \
propertySimple == null ? null : propertySimple.getIntegerValue(); +    }
+
+    public void setAvailabilityCheckPeriod(Integer availabilityCheckPeriod) {
+        this.pluginConfig.setSimpleValue(Property.AVAIL_CHECK_PERIOD_CONFIG_PROP,
+                availabilityCheckPeriod == null ? null : \
availabilityCheckPeriod.toString()); +    }
+
 }
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml \
b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml index \
                ad22370..7213acd 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -82,6 +82,17 @@
         </c:list-property>
     </c:group>
 '>
+
+    <!ENTITY availabilityCheckPeriod '
+        <c:simple-property name="availabilityCheckPeriod"
+                           description="The amount of time, in seconds, that must \
elapse between availability checks to see if the server is up. If set, the \
availability checks will be performed asynchronously thus allowing slow-responding \
servers to avoid being falsely reported as down. Minimum value is 60 seconds." +      \
units="seconds" required="false" type="integer"> +          <c:constraint>
+            <c:integer-constraint minimum="60"/>
+          </c:constraint>
+        </c:simple-property>
+'>
+
     <!ENTITY serverKindMetrics '
         <metric property="_skm:release-codename" dataType="trait"  \
                displayName="Server Code Name"/>
         <metric property="_skm:release-version" dataType="trait"  \
displayName="Server Version"/> @@ -862,6 +873,10 @@
 
       &startScriptPluginConfigGroup;
       &logSources;
+
+      <c:group name="advanced" displayName="Advanced" hiddenByDefault="true">
+        &availabilityCheckPeriod;
+      </c:group>
     </plugin-configuration>
 
     <process-scan name="HostController" \
query="process|basename|match=^java.*,arg|org.jboss.as.host-controller|match=.*"/> @@ \
-1173,6 +1188,10 @@  
       &startScriptPluginConfigGroup;
       &logSources;
+
+      <c:group name="advanced" displayName="Advanced" hiddenByDefault="true">
+        &availabilityCheckPeriod;
+      </c:group>
     </plugin-configuration>
 
     <process-scan name="StandaloneAS" \
query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/> @@ \
-1621,6 +1640,9 @@  <plugin-configuration>
       <c:simple-property name="path" readOnly="true"/>
       &logSources;
+      <c:group name="advanced" displayName="Advanced" hiddenByDefault="true">
+        &availabilityCheckPeriod;
+      </c:group>
     </plugin-configuration>
 
     <operation name="start" description="Start this server instance." \
                displayName="Start">
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractJBossAS7PluginTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractJBossAS7PluginTest.java
 index 43e6e06..8c61c8e 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractJBossAS7PluginTest.java
                
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractJBossAS7PluginTest.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,11 +13,14 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
 package org.rhq.modules.plugins.jbossas7.itest;
 
+import static org.rhq.core.domain.measurement.AvailabilityType.UP;
+import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
 
 import java.util.Set;
@@ -31,8 +34,10 @@ import org.rhq.core.domain.util.ResourceFilter;
 import org.rhq.core.domain.util.ResourceUtility;
 import org.rhq.core.domain.util.TypeAndKeyResourceFilter;
 import org.rhq.core.pc.inventory.InventoryManager;
+import org.rhq.core.pc.inventory.ResourceContainer;
 import org.rhq.core.plugin.testutil.AbstractAgentPluginTest;
 import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration;
 import org.rhq.modules.plugins.jbossas7.itest.domain.DomainServerComponentTest;
 import org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest;
  import org.rhq.test.arquillian.AfterDiscovery;
@@ -152,4 +157,26 @@ public abstract class AbstractJBossAS7PluginTest extends \
AbstractAgentPluginTest  return serverResource;
     }
 
+    protected void testAsynchronousAvailabilityCheck(Resource resource) throws \
Exception { +        // Activate asynchronous availability checking
+        ServerPluginConfiguration serverPluginConfig = new \
ServerPluginConfiguration(resource.getPluginConfiguration()); +        int \
availabilityCheckPeriod = 65; +        \
serverPluginConfig.setAvailabilityCheckPeriod(availabilityCheckPeriod); +        \
restartResourceComponent(resource); +
+        Thread.sleep((3 * availabilityCheckPeriod * 1000L) / 2);
+        assertEquals(getAvailability(resource), UP);
+
+        // Deactivate asynchronous availability checking as subsequent tests may \
rely on immediate availabilty checking +        \
serverPluginConfig.setAvailabilityCheckPeriod(null); +        \
restartResourceComponent(resource); +    }
+
+    private void restartResourceComponent(Resource resource) throws \
PluginContainerException { +        InventoryManager inventoryManager = \
this.pluginContainer.getInventoryManager(); +        \
inventoryManager.deactivateResource(resource); +        ResourceContainer \
serverContainer = inventoryManager.getResourceContainer(resource); +        \
inventoryManager.activateResource(resource, serverContainer, true); +    }
+
 }
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java
 index 4effd50..91ece92 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java
                
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,9 +13,10 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
 package org.rhq.modules.plugins.jbossas7.itest.domain;
 
 import java.io.File;
@@ -76,14 +77,20 @@ public class DomainServerComponentTest extends \
AbstractServerComponentTest {  testServerAttributeValidation();
     }
 
+    @Test(priority = 1002)
+    public void testDomainServerAsynchronousAvailabilityCheck() throws Exception {
+        testAsynchronousAvailabilityCheck(getServerResource());
+    }
+
+
     // ******************************* METRICS ******************************* //
-    @Test(priority = 1002, enabled = true)
+    @Test(priority = 1003, enabled = true)
     public void testDomainReleaseVersionTrait() throws Exception {
         super.testReleaseVersionTrait();
     }
 
     // ******************************* OPERATIONS ******************************* //
-    @Test(priority = 1003, enabled = true)
+    @Test(priority = 1004, enabled = true)
     public void testDomainServerShutdownAndStartOperations() throws Exception {
         super.testShutdownAndStartOperations();
     }
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java
 index 3f9f101..42bab08 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java
                
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ManagedServerTest.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,11 +13,14 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.modules.plugins.jbossas7.itest.domain;
 
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
 import org.testng.annotations.Test;
 
 import org.rhq.core.clientapi.agent.PluginContainerException;
@@ -32,9 +35,6 @@ import org.rhq.core.pc.inventory.InventoryManager;
 import org.rhq.modules.plugins.jbossas7.itest.AbstractJBossAS7PluginTest;
 import org.rhq.test.arquillian.RunDiscovery;
 
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
 /**
  * Test dealing with managed servers
  * @author Heiko W. Rupp
@@ -45,7 +45,7 @@ public class ManagedServerTest extends AbstractJBossAS7PluginTest {
    public static final ResourceType RESOURCE_TYPE = new ResourceType("Managed \
Server", PLUGIN_NAME, ResourceCategory.SERVER, null);  private static final String \
RESOURCE_KEY = "master/server-one";  
-   @Test(priority = 1020, groups = "discovery", enabled = false)
+   @Test(priority = 1020, groups = "discovery", enabled = true)
    @RunDiscovery(discoverServices = true, discoverServers = true)
    public void runDiscovery() throws Exception {
        Resource platform = this.pluginContainer.getInventoryManager().getPlatform();
@@ -93,6 +93,11 @@ public class ManagedServerTest extends AbstractJBossAS7PluginTest \
{  assertEquals(avail, AvailabilityType.UP);
     }
 
+    @Test(priority = 1022)
+    public void testManagedServerAsynchronousAvailabilityCheck() throws Exception {
+        testAsynchronousAvailabilityCheck(getResource());
+    }
+
    private Resource getResource() {
 
        InventoryManager im = pluginContainer.getInventoryManager();
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java
 index 9845b03..8446345 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java
                
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,11 +13,14 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.modules.plugins.jbossas7.itest.standalone;
 
+import static org.rhq.core.domain.measurement.AvailabilityType.UP;
+import static org.testng.Assert.assertEquals;
+
 import java.io.File;
 import java.util.Arrays;
 import java.util.List;
@@ -38,8 +41,6 @@ import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.modules.plugins.jbossas7.itest.AbstractServerComponentTest;
 import org.rhq.test.arquillian.RunDiscovery;
 
-import static org.testng.Assert.assertEquals;
-
 /**
  * Test discovery and facets of the "JBossAS7 Standalone Server" Resource type.
  *
@@ -105,20 +106,20 @@ public class StandaloneServerComponentTest extends \
AbstractServerComponentTest {  }
 
     // TODO: Re-enable once fixed.
-    @Test(priority = 5, dependsOnMethods = \
"testStandaloneServerShutdownAndStartOperations", enabled = false) +    \
@Test(priority = 6, dependsOnMethods = \
"testStandaloneServerShutdownAndStartOperations", enabled = false)  public void \
testRestartOperation() throws Exception {  // First make sure the server is up.
         AvailabilityType avail = getAvailability(getServerResource());
-        assertEquals(avail, AvailabilityType.UP);
+        assertEquals(avail, UP);
 
         // Make sure the server is back up.
         // TODO (ips): Check that the server is a different process now.
         invokeOperationAndAssertSuccess(getServerResource(), RESTART_OPERATION_NAME, \
null);  avail = getAvailability(getServerResource());
-        assertEquals(avail, AvailabilityType.UP);
+        assertEquals(avail, UP);
     }
 
-    @Test(priority = 6, enabled = true)
+    @Test(priority = 7, enabled = true)
     public void testSystemPropertiesSettings() throws Exception {
 
         Configuration config = loadResourceConfiguration(getServerResource());
@@ -152,6 +153,11 @@ public class StandaloneServerComponentTest extends \
AbstractServerComponentTest {  
     }
 
+    @Test(priority = 8)
+    public void testStandaloneServerAsynchronousAvailabilityCheck() throws Exception \
{ +        testAsynchronousAvailabilityCheck(getServerResource());
+    }
+
     protected String getExpectedStartScriptFileName() {
         return (File.separatorChar == '/') ? "standalone.sh" : "standalone.bat";
     }


commit 64c225a14337769a1f6ce1df40a9e025ee3258e0
Merge: 078a2da e87ea03
Author: Jirka Kremser <jiri.kremser@gmail.com>
Date:   Fri May 24 14:40:00 2013 -0700

    Merge pull request #1 from lzoubek/master
    
    Merging the rhq bot improvements



commit 078a2da4e488645284359940e3df7a61a0299109
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Fri May 24 16:43:50 2013 +0200

    [BZ 965833 - Potential bug in join/fetch/avoidance code]
    It is now possible to lazily fetch fields defined in super classes.
    
    The avoidance of the join-fetch with limits exposed a missing feature that
    was present in the code from the day one. It would be failing if the
    criteria query was used to fetch a custom object (i.e. not the primary
    persistent class of the criteria object) using an "altered projection" and
    a fetch would be set on a field defined in a super class of the persistent
    class of the criteria object. Only by chance this has never happened
    before, because we don't use the altered projections on the criteria
    queries that often.
    
    Now that we lazily fetch fields much more often (to avoid join fetch
    with limits) this is a problem even in cases without an altered projection.
    
    The fix is fortunately very simple - we need to also search the
    superclasses of the criteria's persistent class when looking for a field
    to lazily fetch.
    
    The possibility of fields being present in super-classes was taken into
    account on other places in the CriteriaQueryGenerator class, too.
    
    Documentation on the getJoinFetchFields() and alterProjection() was
    enhanced to hopefully better explain the conditions underwhich you can
    combine fetching and altered projection together.

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 index 867ea16..d1d2f73 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 @@ -343,7 +343,7 @@ public final class CriteriaQueryGenerator {
                 } else {
                     if (this.projection == null) {
                         /*
-                         * if not altering the projection, join fetching can be \
using +                         * if not altering the projection, join fetching can \
                be used
                          * to retrieve the associated instance in the same SELECT
                          *
                          * We further avoid a JOIN FETCH when executing queries with \
limits. @@ -664,14 +664,9 @@ public final class CriteriaQueryGenerator {
     }
 
     private boolean isPersistentBag(String fieldName) {
-        try {
-            Class<?> persistentClass = criteria.getPersistentClass();
-            Field field = persistentClass.getDeclaredField(fieldName);
+        Field field = findField(fieldName);
 
-            return isAList(field) && !field.isAnnotationPresent(IndexColumn.class);
-        } catch (NoSuchFieldException e) {
-            return false;
-        }
+        return field != null && isAList(field) && \
!field.isAnnotationPresent(IndexColumn.class);  }
 
     private boolean isAList(Field field) {
@@ -690,23 +685,40 @@ public final class CriteriaQueryGenerator {
     }
 
     private void addPersistentBag(String fieldName) {
-        try {
-            Field field = criteria.getPersistentClass().getDeclaredField(fieldName);
-            persistentBagFields.add(field);
-        } catch (NoSuchFieldException e) {
-            LOG.warn("Failed to add persistent bag collection on class [" + \
criteria.getPersistentClass().getName() +"]: ", e); +        Field f = \
findField(fieldName); +        if (f == null) {
+            LOG.warn(
+                "Failed to add persistent bag collection [" + fieldName + "] on \
class [" + criteria.getPersistentClass().getName() + +                    "]. There \
doesn't seem to be a field of that name on the class or any of its superclasses."); + \
} else { +            persistentBagFields.add(f);
         }
     }
 
     private void addJoinFetch(String fieldName) {
-        try {
-            Field field = criteria.getPersistentClass().getDeclaredField(fieldName);
-            joinFetchFields.add(field);
-        } catch (NoSuchFieldException e) {
-            LOG.warn("Failed to add join fetch field on class [" + \
criteria.getPersistentClass().getName() + "]: ", e); +        Field f = \
findField(fieldName); +        if (f == null) {
+            LOG.warn(
+                "Failed to add join fetch field [" + fieldName + "] on class [" + \
criteria.getPersistentClass().getName() + +                    "]. There doesn't seem \
to be a field of that name on the class or any of its superclasses."); +        } \
else { +            joinFetchFields.add(f);
         }
     }
 
+    private Field findField(String fieldName) {
+        Class<?> cls = criteria.getPersistentClass();
+        while (cls != null) {
+            try {
+                return cls.getDeclaredField(fieldName);
+            } catch (NoSuchFieldException e) {
+                cls = cls.getSuperclass();
+            }
+        }
+
+        return null;
+    }
+
     /**
      * <strong>Note:</strong> This method should only be called after {@link \
                #getQueryString(boolean)}} because it is
      * that method where the persistentBagFields property is initialized.
@@ -718,6 +730,21 @@ public final class CriteriaQueryGenerator {
         return persistentBagFields;
     }
 
+    /**
+     * <strong>Note:</strong> This method should only be called after {@link \
#getQueryString(boolean)}} because it is +     * that method where the \
persistentBagFields property is initialized. +     * <p/>
+     * The elements of the returned list are a (sub)set of the fields that the \
criteria object specified to be fetched +     * (using the fetchXXX() methods). If \
the {@link CriteriaQueryRunner} is not set to automatically fetch all the +     * \
fields, you need to manually initialize these fields by for example using +     * \
{@link CriteriaQueryRunner#initFetchFields(Object)} method on each of the results. +  \
* +     * @see #alterProjection(String) <code>alterProjection(String)</code> for \
special attention you need to make when +     * mixing fetching fields and altered \
projection. +     *
+     * @return Returns a list of fields from the persistent class to which the \
criteria class corresponds. The fields in +     *         the list are fields \
specified by the criteria to be fetched (using the fetchXXX() methods). +     */
     public List<Field> getJoinFetchFields() {
         return joinFetchFields;
     }
@@ -728,8 +755,11 @@ public final class CriteriaQueryGenerator {
      * only affect the ResultSet for the data query, not the count query.
      * <p/>
      * If you are projecting a composite object that does not directly extend the \
                entity your Criteria object
-     * represents, then you will need to manually initialize the persistent bags \
                using the methods exposed on
-     * {@link CriteriaQueryRunner}
+     * represents, then you will need to manually initialize the persistent bags and \
fetch fields using the +     * {@link CriteriaQueryRunner#initFetchFields(Object)} \
method for each object in the results (for which you need +     * to instantiate the \
{@link CriteriaQueryRunner} with automatic fetching switched OFF). <b>Note</b> that \
this will +     * NOT work on the composite object itself. You need to pass an \
instance of the entity class to the +     *{@link \
                CriteriaQueryRunner#initFetchFields(Object)} method.
      */
     public void alterProjection(String projection) {
         this.projection = projection;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
 index a788fb0..73292be 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
 @@ -129,9 +129,7 @@ public class CriteriaQueryRunner<T> {
 
     public void initFetchFields(Object entity) {
         initPersistentBags(entity);
-        if (queryGenerator.isProjectionAltered()) {
-            initJoinFetchFields(entity);
-        }
+        initJoinFetchFields(entity);
     }
 
     private void initPersistentBags(Object entity) {


commit e87ea0381518ffda4a42be7a119ce0ab764cd551
Author: Libor Zoubek <lzoubek@jezzovo.net>
Date:   Fri May 24 16:45:08 2013 +0200

    rhq-Bot: only devs can send private echo command to bot

diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java \
b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java index \
                1960f1d..a7b3e78 100644
--- a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
@@ -209,8 +209,12 @@ public class RhqIrcBotListener extends \
ListenerAdapter<RhqIrcBot> {  String message = privateMessageEvent.getMessage();
         Matcher echoMatcher = ECHO_PATTERN.matcher(message);
         if (echoMatcher.matches()) {
-            String echoMessage = echoMatcher.group(1);
-            bot.sendMessage(this.channel, echoMessage);
+	    if (!JON_DEVS.contains(privateMessageEvent.getUser().getNick())) {
+		privateMessageEvent.respond("You're not my master, I am your master, go away");
+	    } else {
+		String echoMessage = echoMatcher.group(1);
+		bot.sendMessage(this.channel, echoMessage);
+	    }
         } else if (message.equalsIgnoreCase(Command.PREFIX + "listrenames")) {
             //Generate a list of renames in the form of old1 changed to new1, old2 \
changed to new2, etc  StringBuilder users = new StringBuilder();


commit 66c47dde1721632eca6990d389195708e8deeefe
Author: Libor Zoubek <lzoubek@jezzovo.net>
Date:   Fri May 24 16:40:57 2013 +0200

    ircBot: improved recognition of commands
    
    Bot now recognizes commands only when in the beginning of message or if you
    highlight bot's nick and command is the very first word (like rhq-bot:
    !help)

diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java \
b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java index \
                cd6d43a..1960f1d 100644
--- a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
@@ -61,7 +61,7 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> {
         SUPPORT, 
         WIKI("Our wiki is available from \
https://docs.jboss.org/author/display/RHQ/Home", true);  
-        public static final char PREFIX = '!';
+        public static final String PREFIX = "!";
         private final String staticRespond;
         private final boolean includeInHelp;
 
@@ -106,7 +106,7 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> \
{  this.channel = channel;
         isRedHatChannel = "irc.devel.redhat.com".equals(channel);
         StringBuilder commandRegExp = new StringBuilder();
-        commandRegExp.append("(?i)\\").append(Command.PREFIX).append("[ ]*(");
+        commandRegExp.append("^(?i)[ ]*").append(Command.PREFIX).append("(");
         for (Command command : Command.values()) {
             commandRegExp.append(command.name()).append('|');
         }
@@ -173,6 +173,11 @@ public class RhqIrcBotListener extends \
                ListenerAdapter<RhqIrcBot> {
             bot.sendMessage(event.getChannel(), event.getUser().getNick() + ": " + \
response);  }
         
+        if (message.startsWith(event.getBot().getNick())) {
+    		// someone asked bot directly, we have to remove that from message
+            	message = message.substring(event.getBot().getNick().length());
+    		message = message.replaceFirst("[^ ]*", "");
+        }
         // react to commands included in the messages
         Matcher commandMatcher = commandPattern.matcher(message);
         while (commandMatcher.find()) {


commit adac13e48ddd26aa55b6a6cbc6f3c3bcff5f802e
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 24 11:14:44 2013 +0200

    Add some translations

diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 index 057785a..d158243 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 @@ -10,25 +10,25 @@
 #
 ###################################
 ##avail_chart_down_label = DOWN
-##avail_chart_title_label = Availability
+avail_chart_title_label = Verfügbarkeit
 ##avail_chart_up_label = UP
-##chart_date_label = Date
+chart_date_label = Datum
 ##chart_down_label = Down
 ##chart_time_label = Start
-##chart_unknown_label = Unknown
-##chart_no_data_label = No Data
-##chart_title_avg_label = Avg
-##chart_title_min_label = Min
-##chart_title_peak_label = Max
-##chart_hover_availability_label = Availability
-##chart_hover_availability_type_warn = MIXED
-##chart_hover_date_format = %m/%d/%y
+chart_unknown_label = Unbekannt
+chart_no_data_label = Keine Daten vorhanden
+chart_title_avg_label = Durchschn.
+chart_title_min_label = Min
+chart_title_peak_label = Max
+chart_hover_availability_label = Verfügbarkeit
+chart_hover_availability_type_warn = Gemischt
+chart_hover_date_format = %d.%m.%y
 ##chart_hover_time_format = %I:%M:%S %p
-##chart_ie_not_supported = Charting is not available for this browser.
-##chart_hover_start_label = Start
-##chart_hover_end_label = End
+chart_ie_not_supported = Charting ist bei diesem Browser nicht unterstützt
+chart_hover_start_label = Start
+chart_hover_end_label = Ende
 ##chart_hover_period_label = Period
-##chart_hover_bar_label = Duration
+chart_hover_bar_label = Dauer
 common_alert_high = HOCH
 common_alert_low = NIEDRIG
 common_alert_medium = MITTEL
@@ -68,7 +68,7 @@ common_button_schedule = Planen
 common_button_search = Suchen
 common_button_set = Setzen
 common_button_showDetails = Details anzeigen...
-##common_button_unignore = Unignore
+common_button_unignore = Ignorieren aufheben
 common_button_uninventory = Aus dem Inventar löschen
 common_calendar_april_short = Apr
 common_calendar_august_short = Aug
@@ -91,7 +91,7 @@ common_label_filters = Filter
 common_label_hour = Stunde
 common_label_item = Eintrag
 common_label_items = Einträge
-##common_label_link = Link
+common_label_link = Link
 common_label_month = Monat
 common_label_none = keine
 common_label_none2 = keines
@@ -128,7 +128,7 @@ common_status_nochange = Keine Änderung
 common_status_partial = partiell
 common_status_success = Erfolg
 common_status_unknown = Unbekannt
-##common_title_acknowledged = Acknowledged
+common_title_acknowledged = Bestätigt
 common_title_add_column = Spalte hinzufügen
 common_title_add_portlet = Portlet hinzufügen
 common_title_address = Adresse
@@ -418,7 +418,7 @@ favorites_recentlyViewed = Kürzlich angesehen
 favorites_resources = Gemerkte Ressourcen
 filter_from_date = Von
 filter_to_date = Bis
-##group_tree_groupOfResourceType = Group of [{0}]
+group_tree_groupOfResourceType = Gruppe von [{0}]
 group_tree_partialClusterTooltip = {0} der {1} Gruppenmitglieder haben eine ''{2}'' \
Ressource  util_disambiguationReportDecorator_pluginSuffix = ({0} Plugin)
 util_errorHandler_nullException = Exception war null
@@ -441,8 +441,8 @@ view_adminConfig_agentPlugins = Agent Plugins
 view_adminConfig_alertDefTemplates = Vorlagen für Alarmdefinitionen
 view_adminConfig_downloads = Downloads
 view_adminConfig_driftDefTemplates = Vorlagen für Dritf-Definitionen
-##view_adminConfig_ignoreResourceTypes = Ignored Resource Types
-##view_adminConfig_ignoreResourceTypes_changeTitle = Change?
+view_adminConfig_ignoreResourceTypes = Ignorierte Ressource Typen
+view_adminConfig_ignoreResourceTypes_changeTitle = Ändern?
 ##view_adminConfig_ignoreResourceTypes_confirmIgnore = Are you sure you want to \
ignore the resource type [{0}]? You will no longer be able to import resources of \
this type and any resources of this type that are already in inventory will be \
uninventoried and you can no longer manage them.  \
##view_adminConfig_ignoreResourceTypes_confirmUnignore = Are you sure you want to \
unignore the resource type [{0}]? Any resources of this type that exist in your \
managed environment will be able to be discovered and inventoried.  \
##view_adminConfig_ignoreResourceTypes_failure = Failed to set the ignore flag on the \
selected resource type. @@ -456,7 +456,7 @@ view_adminConfig_systemSettings = \
Systemeinstellungen  view_adminContent_contentSources = Quellen für Inhalte
 view_adminRoles_assignedGroups = Zugewiesene Ressourcen-Gruppen
 view_adminRoles_assignedSubjects = Zugewisene Benutzer
-##view_adminRoles_failCreateRoleWithExistingName = Failed to create role with \
existing name [{0}]. Please use another name. \
+view_adminRoles_failCreateRoleWithExistingName = Konnte die Rolle mit dem \
existierenden Namen [{0}] nicht anlegen. Bitte wählen Sie einen anderen Namen.  \
view_adminRoles_failLdap = Konnte nicht ermitteln, ob LDAP konfiguriert ist - gehe \
von keiner LDAP-Konfiguration aus.  view_adminRoles_failLdapGroups = Konnte de \
LDAP-Gruppen nicht laden. Annahme ist, dass es keine gibt.  \
view_adminRoles_failLdapGroupsRole = Konnte die LDAP-Gruppen für die Rolle nicht \
laden. @@ -526,23 +526,23 @@ view_adminTemplates_pluginTemplates = Vorlagen für \
Plugins Plugins  view_adminTemplates_servers = Server
 view_adminTemplates_userTemplates = Nutzers-spezifische Vorlagen
 view_adminTopology_affinityGroups = Affinitätsgruppen
-##view_adminTopology_affinityGroups_agentCount = Agent Count
-##view_adminTopology_affinityGroups_agentsInThisGroup = Agents in This Group
+view_adminTopology_affinityGroups_agentCount = Anzahl Agenten
+view_adminTopology_affinityGroups_agentsInThisGroup = Agenten in dieser Gruppe
 ##view_adminTopology_affinityGroups_agentsNotPartOfAnAffinityGroup = Agents not Part \
of an Affinity Group  ##view_adminTopology_affinityGroups_agetnMembers = Agent \
                Members
-##view_adminTopology_affinityGroups_createNew = Create New
+view_adminTopology_affinityGroups_createNew = Neu anlegen
 ##view_adminTopology_affinityGroups_details = Affinity Group Details
-##view_adminTopology_affinityGroups_removeSelected = Remove Selected
-##view_adminTopology_affinityGroups_serverCount = Server Count
+view_adminTopology_affinityGroups_removeSelected = Ausgewählte entfernen
+view_adminTopology_affinityGroups_serverCount = Anzahl Server
 ##view_adminTopology_affinityGroups_serverMembers = Server Members
-##view_adminTopology_agentDetail_address = Address
+view_adminTopology_agentDetail_address = Adresse
 ##view_adminTopology_agentDetail_agentFailoverList = Agent Failover List
-##view_adminTopology_agentDetail_currentServer = Current Server
+view_adminTopology_agentDetail_currentServer = Aktueller Server
 ##view_adminTopology_agentDetail_token = Token
 ##view_adminTopology_agent_agentBindAddress = Agent Bind Address
 ##view_adminTopology_agent_agentBindPort = Agent Bind Port
-##view_adminTopology_agent_agentName = Agent Name
-##view_adminTopology_agent_connectedServer = Connected Server
+view_adminTopology_agent_agentName = Name des Agenten
+view_adminTopology_agent_connectedServer = Verbundener Server
 ##view_adminTopology_agent_delete_confirm = This will deregister the selected agents \
and uninventory their corresponding platforms and all other resources associated with \
them. There is no way to undo this action. Are you sure you want to do this?  \
##view_adminTopology_agent_lastAvailabilityPing = Last Availability Ping  \
##view_adminTopology_agent_lastAvailabilityReport = Last Availability Report @@ \
-592,7 +592,7 @@ view_adminTopology_partitionEvents = Partitionierungs-Ereignisse  \
##view_adminTopology_partitionEventsDetail_eventDetails = Event Details  \
##view_adminTopology_partitionEventsDetail_eventExecutionTime = Event Execution Time  \
                ##view_adminTopology_partitionEventsDetail_eventType = Event Type
-##view_adminTopology_partitionEvents_details = Details
+view_adminTopology_partitionEvents_details = Details
 ##view_adminTopology_partitionEvents_detailsFilter = Details Filter
 ##view_adminTopology_partitionEvents_execStatusFilter = Execution Status Filter
 ##view_adminTopology_partitionEvents_execTime = Execution Time
@@ -600,7 +600,7 @@ view_adminTopology_partitionEvents = Partitionierungs-Ereignisse
 ##view_adminTopology_partitionEvents_forceRepartition = Force Repartition
 ##view_adminTopology_partitionEvents_initiatedBy = Initiated By
 ##view_adminTopology_partitionEvents_purgeAll = Purge All
-##view_adminTopology_partitionEvents_type = Type
+view_adminTopology_partitionEvents_type = Typ
 ##view_adminTopology_partitionEvents_typeFilter = Type Filter
 view_adminTopology_remoteAgentInstall = Installation entfernter Agenten
 ##view_adminTopology_serverDetail_connectedAgents = Connected Agents
@@ -610,7 +610,7 @@ view_adminTopology_remoteAgentInstall = Installation entfernter \
Agenten  ##view_adminTopology_server_agentCount = Agent Count
 ##view_adminTopology_server_endpointAddress = Endpoint Address
 ##view_adminTopology_server_lastUpdateTime = Last Update Time
-##view_adminTopology_server_mode = Mode
+view_adminTopology_server_mode = Modus
 ##view_adminTopology_server_nonSecurePort = Nonsecure Port
 ##view_adminTopology_server_removeSelected = Remove Selected
 ##view_adminTopology_server_securePort = Secure Port
@@ -728,15 +728,15 @@ view_admin_systemSettings_serverDetails_dbUrl = URL der \
Datenbankverbindung  view_admin_systemSettings_serverDetails_dbVersion = \
Produktversion der Datenbank  view_admin_systemSettings_serverDetails_installDir = \
Installationsverzeichnis des Servers  \
view_admin_systemSettings_serverDetails_nextRotation = Nächste Rotation der \
                Metrik-Tabellen
-##view_admin_systemSettings_serverDetails_productName = Product Name
-##view_admin_systemSettings_serverDetails_serverName = Server Name
+view_admin_systemSettings_serverDetails_productName = Produktname
+view_admin_systemSettings_serverDetails_serverName = Servername
 view_admin_systemSettings_serverDetails_time = Lokale Zeit des Servers
 view_admin_systemSettings_serverDetails_tz = Zeitzone des Servers
 view_admin_topology = Topologie
 view_alert_common_tab_conditions = Bedingungen
 view_alert_common_tab_conditions_expression = Alarm auslösen wenn
 ##view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of \
the conditions must evaluate to true in order for the entire condition set to be \
                considered true.
-##view_alert_common_tab_conditions_modalEdit_title = Edit Condition
+view_alert_common_tab_conditions_modalEdit_title = Bedingungen ändern
 view_alert_common_tab_conditions_modal_title = Bedingung hinzufügen
 view_alert_common_tab_conditions_recovery_disabled = Dieser Alarm hat seine \
Definition deaktiviert.  view_alert_common_tab_conditions_recovery_enabled = \
Ausgelöst, dass ''{0}'' wieder aktiviert wurde @@ -883,7 +883,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Änderung de  \
view_alert_definition_condition_editor_option_operation = Ausführung der Operation  \
view_alert_definition_condition_editor_option_resource_configuration = Änderung der \
Konfiguration der Ressource  \
##view_alert_definition_condition_editor_resource_configuration_tooltip = This \
                condition is triggered when the resource configuration changes.
-##view_alert_definition_editCondition = Edit Condition
+view_alert_definition_editCondition = Bedingungen ändern
 view_alert_definition_for_group = Gruppendefinition ansehen
 view_alert_definition_for_type = Vorlage ansehen
 view_alert_definition_notification_cliScript_editor_anotherUser = Anderer Benutzer
@@ -892,7 +892,7 @@ view_alert_definition_notification_cliScript_editor_script = \
Skript  view_alert_definition_notification_cliScript_editor_thisUser = Aktueller \
Benutzer  view_alert_definition_notification_editor_delete_confirm = Sind Sie sicher, \
dass sie die ausgewählten Alarm-Benachrichtigungen löschen wollen?  \
                view_alert_definition_notification_editor_field_configuration = \
                Konfiguration
-##view_alert_definition_notification_editor_field_configuration_loadFailed = Failed \
to get notification configuration preview \
+view_alert_definition_notification_editor_field_configuration_loadFailed = Konte die \
Vorschau der Benachrichtigung nicht laden  \
view_alert_definition_notification_editor_field_configuration_not_loaded = Unbekannt  \
view_alert_definition_notification_editor_field_sender = Sender  \
view_alert_definition_notification_editor_loadFailed = Kann die Alarm-Sender nicht \
laden @@ -946,7 +946,7 @@ view_alert_definitions_disable_success = Es wurden {0} \
Alarm-Definitionen erfolg  view_alert_definitions_enable_confirm = Die ausgewählten \
Alarm-Definitionen aktivieren?  view_alert_definitions_enable_failure = Konnte die \
ausgewählten Alarm-Definitionen nicht aktivieren  \
view_alert_definitions_enable_success = Es wurden {0} Alarm-Definitionen erfolgreich \
                aktiviert
-##view_alert_definitions_leaveUnsaved = Do you want to save the modified alert \
definition? +view_alert_definitions_leaveUnsaved = Möchten Sie die geänderte \
Alarm-Definition speichern?  view_alert_definitions_loadFailed = Konnte die Daten \
für die Alarm-Definitionen nicht laden  view_alert_definitions_loadFailed_single = \
Konnte die Daten für die Alarm-Definition mit der id {0}  \
view_alert_definitions_table_title_group = Alarm-Definitionen für Gruppen @@ -1184,7 \
+1184,7 @@ view_bundle_version_backToBundle = Zurück zum Bundle  \
##view_bundle_version_deleteSuccessful = You successfully deleted the bundle version \
[{0}]  ##view_bundle_version_loadFailure = Failed to load bundle version
 view_bundle_versions = Versionen
-##view_charts_time_axis_label = Time
+view_charts_time_axis_label = Zeit
 view_configCompare_comparingConfigs = Konfigurationen vergleichen
 ##view_configCompare_configCompare = Configuration Comparison
 view_configEdit_addItem = Eintrag zur Liste hinzufügen
@@ -1483,13 +1483,13 @@ view_inventory_groups_children = Kinder
 ##view_inventory_groups_deleteSuccessful = You have successfully deleted the \
selected resource groups  ##view_inventory_groups_descendants = Descendants
 ##view_inventory_groups_loadFailed = Failed to load group composite data
-##view_inventory_ignoredResources = Ignored Resources
+view_inventory_ignoredResources = Ignorierte Ressourcen
 view_inventory_mixed = gemischt
 view_inventory_platforms = Platformen
 view_inventory_problemGroups = Gruppen mit Problemen
 ##view_inventory_resource_loadFailed = Resource with id [{0}] does not exist or is \
                not accessible
-##view_inventory_resources_deleteConfirm = Are you sure you want to delete the \
                selected resources?
-##view_inventory_resources_deleteFailed = Failed to delete the selected resources
+view_inventory_resources_deleteConfirm = Sind Sie sicher, dass Sie die ausgewählten \
Ressourcen löschen wollen? +view_inventory_resources_deleteFailed = Löschen der \
ausgewählten Ressourcen ist fehlgeschlagen  \
##view_inventory_resources_deleteSuccessful = A request to perform the resource \
deletion has been submitted successfully to the agent(s).  \
##view_inventory_resources_disableSuccessful = You have successfully disabled the \
selected resources and their children, [{0}] resources.  \
##view_inventory_resources_ignoreConfirm = Are you sure you want the selected \
resources to be ignored? They will no longer show up in inventory.


commit 0d6dcd43a16699348430e81a241ae38da6d431af
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Thu May 23 17:14:50 2013 -0400

    Fix test that started failing after the change to remove JOIN FETCH
    from Criteria calls that include paging and optional data.  It seems the
    new approach changes slightly the way the data is returned.
    
    loadDefinition() returns hibernate proxied data. It is not safe to pass
    proxies into equals() impls because these typically access fields directly,
    not through getters, and therefore bypass the proxied data.
    
    Note that this change in behavior due to the JOIN FETCH fix would only
    affect non-client code (like test code or intra-slsb calls) because return
    values to client code would already be cleansed of the proxies.  The test
    is fixed in the same way, by using HibernateDetachUtility to scrub the
    proxies before attempting the assertEquals().

diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/drift/ManageDriftDefinitionsTest.java \
b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/drift/ManageDriftDefinitionsTest.java
 index 18c7093..4202d6a 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/drift/ManageDriftDefinitionsTest.java
                
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/drift/ManageDriftDefinitionsTest.java
 @@ -57,6 +57,7 @@ import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.util.PageList;
 import org.rhq.enterprise.server.safeinvoker.HibernateDetachUtility;
+import org.rhq.enterprise.server.safeinvoker.HibernateDetachUtility.SerializationType;
  import org.rhq.enterprise.server.test.TransactionCallback;
 import org.rhq.test.AssertUtils;
 
@@ -91,7 +92,7 @@ public class ManageDriftDefinitionsTest extends \
AbstractDriftServerTest {  deleteEntity(ResourceType.class, \
DRIFT_NOT_SUPPORTED_TYPE);  }
 
-    public void createDefinitionFromUnpinnedTemplate() {
+    public void createDefinitionFromUnpinnedTemplate() throws Exception {
         // first create a template
         final DriftDefinition templateDef = new DriftDefinition(new \
Configuration());  templateDef.setName(NAME_PREFIX + "createUnpinnedDefinition");
@@ -114,6 +115,7 @@ public class ManageDriftDefinitionsTest extends \
                AbstractDriftServerTest {
         DriftDefinitionComparator comparator = new DriftDefinitionComparator(
             BOTH_BASE_INFO_AND_DIRECTORY_SPECIFICATIONS);
 
+        HibernateDetachUtility.nullOutUninitializedFields(newDef, \
                SerializationType.SERIALIZATION);
         assertEquals("The drift definition was not persisted correctly", 0, \
                comparator.compare(definition, newDef));
         assertEquals("The template association was not set on the definition", \
template, newDef.getTemplate());  }


commit 301a28ce97530f69416677a8b8b470e3f157d9bd
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 23 22:38:18 2013 +0200

    Bit of cleanup and testing of alert->ack and alert->purge

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 92d2499..224ab3f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -25,12 +25,9 @@ package org.rhq.enterprise.server.rest;
 import java.io.IOException;
 import java.io.StringWriter;
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -251,89 +248,8 @@ public class AbstractRestBean {
         return result;
     }
 
-    protected void putResourceToCache(Resource res) {
-        putToCache(res.getId(), Resource.class, res);
 
-        CacheKey callerKey = new CacheKey("rhq.rest.caller", caller.getId());
 
-        try {
-            Set<Integer> visibleResources = (Set<Integer>) cache.get(callerKey);
-
-            if (null == visibleResources) {
-                visibleResources = new HashSet<Integer>();
-            }
-
-            visibleResources.add(res.getId());
-            cache.put(callerKey, visibleResources);
-
-            Map<Integer, Integer> childParentMap = (Map<Integer, Integer>) \
                cache.get(META_KEY);
-
-            if (null == childParentMap) {
-                childParentMap = new HashMap<Integer, Integer>();
-            }
-            int pid = res.getParentResource() == null ? 0 : \
                res.getParentResource().getId();
-            childParentMap.put(res.getId(), pid);
-            cache.put(META_KEY, childParentMap);
-
-        } catch (Exception e) {
-            log.warn(e.getMessage());
-        }
-    }
-
-    protected List<Resource> getResourcesFromCacheByParentId(int pid) {
-        List<Integer> candidateIds = new ArrayList<Integer>();
-        List<Resource> ret = new ArrayList<Resource>();
-
-        // First determine candidate children
-        Map<Integer, Integer> childParentMap = (Map<Integer, Integer>) \
                cache.get(META_KEY);
-
-        if (null != childParentMap) {
-            try {
-                for (Map.Entry<Integer, Integer> entry : childParentMap.entrySet()) \
                {
-                    if (entry.getValue() == pid)
-                        candidateIds.add(entry.getKey());
-                }
-                // then see if the current user can see them
-                CacheKey callerKey = new CacheKey("rhq.rest.caller", \
                caller.getId());
-                Set<Integer> visibleResources = (Set<Integer>) cache.get(callerKey);
-                Iterator<Integer> iter = candidateIds.iterator();
-                while (iter.hasNext()) {
-                    Integer resId = iter.next();
-                    if (!visibleResources.contains(resId)) {
-                        iter.remove();
-                    }
-                }
-
-                // Last but not least, get the resources and return them
-                for (Integer resId : candidateIds) {
-                    ret.add(getFromCache(resId, Resource.class));
-                }
-            } catch (Exception e) {
-                log.warn(e.getMessage());
-            }
-
-        }
-        return ret;
-    }
-
-    protected Resource getResourceFromCache(int resourceid) {
-
-        Resource res = null;
-        // check if the current user can see the resource
-        CacheKey callerKey = new CacheKey("rhq.rest.caller", caller.getId());
-        Set<Integer> visibleResources = (Set<Integer>) cache.get(callerKey);
-        if (null != visibleResources) {
-            try {
-                if (visibleResources.contains(resourceid)) {
-                    res = getFromCache(resourceid, Resource.class);
-                }
-            } catch (Exception e) {
-                log.warn(e.getMessage());
-            }
-        }
-
-        return res;
-    }
 
     /**
      * Remove an item from the cache
@@ -393,6 +309,7 @@ public class AbstractRestBean {
         uriBuilder.path("/resource/{id}/children");
         uri = uriBuilder.build(res.getId());
         link = new Link("children", uri.toString());
+        rwt.addLink(link);
         uriBuilder = uriInfo.getBaseUriBuilder();
         uriBuilder.path("/resource/{id}/alerts");
         uri = uriBuilder.build(res.getId());
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 index acbb492..355adcd 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 @@ -1434,6 +1434,8 @@ public class AlertTest extends AbstractBase {
 
         int definitionId = createEmptyAlertDefinition(true);
 
+        int alertId;
+
         // Now add a condition
         try {
 
@@ -1481,7 +1483,7 @@ public class AlertTest extends AbstractBase {
             // wait a little
             Thread.sleep(5000);
 
-            int alertId =
+            alertId =
             given()
                 .header(acceptJson)
                 .queryParam("definitionId",definitionId)
@@ -1543,9 +1545,32 @@ public class AlertTest extends AbstractBase {
             .when()
                 .get("/resource/{resourceId}/alerts");
 
+            if (alertId>0) {
+                // Acknowledge the alert
+                given()
+                    .header(acceptWrappedJson)
+                    .pathParam("id", alertId)
+                .expect()
+                    .statusCode(200)
+                    .log().ifError()
+                .when()
+                    .put("/alert/{id}");
+
+                Thread.sleep(500);
+
+                // purge the alert
+                given()
+                    .header(acceptJson)
+                    .pathParam("id", alertId)
+                .expect()
+                    .statusCode(204)
+                    .log().ifError()
+                .when()
+                    .delete("/alert/{id}");
+            }
         }
-
         finally {
+
             // delete the definition again
             cleanupDefinition(definitionId);
         }


commit e290b1316861f301f25cdef2e537751eb5eed689
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Thu May 23 22:21:32 2013 +0200

    rhq irc bot: disabling the !pto and !support commands on Freenode channel

diff --git a/etc/rhq-ircBot/pom.xml b/etc/rhq-ircBot/pom.xml
index 6e66187..a6ab873 100644
--- a/etc/rhq-ircBot/pom.xml
+++ b/etc/rhq-ircBot/pom.xml
@@ -8,7 +8,7 @@
 
   <groupId>org.rhq.etc</groupId>
   <artifactId>rhq-ircbot</artifactId>
-  <version>1.0</version>
+  <version>1.1</version>
   <packaging>jar</packaging>
 
   <name>RHQ IRC Bot</name>
diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java \
b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java index \
                8a7e578..cd6d43a 100644
--- a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
@@ -93,6 +93,7 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> {
 
     private final String server;
     private final String channel;
+    private final boolean isRedHatChannel;
     private String docspaceLogin;
     private String docspacePassword;
     private BugzillaConnector bzConnector = new BugzillaConnector();
@@ -103,6 +104,7 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> \
{  public RhqIrcBotListener(String server, String channel) {
         this.server = server;
         this.channel = channel;
+        isRedHatChannel = "irc.devel.redhat.com".equals(channel);
         StringBuilder commandRegExp = new StringBuilder();
         commandRegExp.append("(?i)\\").append(Command.PREFIX).append("[ ]*(");
         for (Command command : Command.values()) {
@@ -176,7 +178,9 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> \
{  while (commandMatcher.find()) {
             Command command = \
Command.valueOf(commandMatcher.group(1).toUpperCase());  String response = \
                prepareResponseForCommand(command);
-            bot.sendMessage(event.getChannel(), event.getUser().getNick() + ": " + \
response); +            if (response != null) {
+                bot.sendMessage(event.getChannel(), event.getUser().getNick() + ": " \
+ response); +            }
         }
 
         // ping JON devs
@@ -215,9 +219,12 @@ public class RhqIrcBotListener extends \
ListenerAdapter<RhqIrcBot> {  // react to commands included in the messages
             Matcher commandMatcher = commandPattern.matcher(message);
             while (commandMatcher.find()) {
+                isCommand = true;
                 Command command = \
Command.valueOf(commandMatcher.group(1).toUpperCase());  String response = \
                prepareResponseForCommand(command);
-                bot.sendMessage(privateMessageEvent.getUser(), response);
+                if (response != null) {
+                    bot.sendMessage(privateMessageEvent.getUser(), response);
+                }
             }
             if (!isCommand) {
                 bot.sendMessage(privateMessageEvent.getUser(), "Hi, I am " + \
bot.getFinger() + ".\n" @@ -271,8 +278,10 @@ public class RhqIrcBotListener extends \
ListenerAdapter<RhqIrcBot> {  }
         switch (command) {
         case SUPPORT:
+            if (isRedHatChannel)
             return whoIsOnSupport(SUPPORT_LINK);
         case PTO:
+            if (isRedHatChannel)
             return whoIsOnPto(PTO_LINK);
         default:
             System.err.println("Unknown command:" + command);


commit b33564602373317e5e73adbc71e0521929e0762e
Author: John Mazzitelli <mazz@redhat.com>
Date:   Thu May 23 15:04:09 2013 -0400

    BZ 962841 962845 fix the resource type admin pages to support types with multiple \
parents (i.e. types with <runs-inside>)

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/AlertDefinitionTemplateTypeView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/AlertDefinitionTemplateTypeView.java
 index 9b4027e..4f790a1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/AlertDefinitionTemplateTypeView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/AlertDefinitionTemplateTypeView.java
 @@ -197,14 +197,19 @@ public class AlertDefinitionTemplateTypeView extends \
ResourceTypeTreeView {  }
 
         public static class TreeNode extends ResourceTypeTreeNode {
-
             public TreeNode(ResourceTypeTemplateCountComposite composite, String \
                plugin) {
-
                 super(composite, plugin);
-
                 setAttribute(ATTR_ENABLED_TEMPLATES, \
                composite.getEnabledAlertCount());
                 setAttribute(ATTR_DISABLED_TEMPLATES, \
composite.getDisabledAlertCount());  }
+
+            @Override
+            public ResourceTypeTreeNode copy() {
+                ResourceTypeTreeNode dup = super.copy();
+                dup.setAttribute(ATTR_ENABLED_TEMPLATES, \
this.getAttributeAsLong(ATTR_ENABLED_TEMPLATES)); +                \
dup.setAttribute(ATTR_DISABLED_TEMPLATES, \
this.getAttributeAsLong(ATTR_DISABLED_TEMPLATES)); +                return dup;
+            }
         }
 
     }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/DriftDefinitionTemplateTypeView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/DriftDefinitionTemplateTypeView.java
 index 143c475..ebb2d9d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/DriftDefinitionTemplateTypeView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/DriftDefinitionTemplateTypeView.java
 @@ -211,11 +211,8 @@ public class DriftDefinitionTemplateTypeView extends \
ResourceTypeTreeView {  }
 
         public static class TreeNode extends ResourceTypeTreeNode {
-
             public TreeNode(ResourceTypeTemplateCountComposite composite, String \
                plugin) {
-
                 super(composite, plugin);
-
                 setAttribute(ATTR_PLUGIN_TEMPLATES, \
                composite.getPluginDriftTemplates());
                 setAttribute(ATTR_USER_TEMPLATES, \
                composite.getUserDriftTemplates());
                 // If the type has no plugin templates then drift monitoring is not \
enabled for the type @@ -223,6 +220,14 @@ public class \
                DriftDefinitionTemplateTypeView extends ResourceTypeTreeView {
                     setAttribute(ATTRIB_EDIT, ImageManager.getEditDisabledIcon());
                 }
             }
+
+            @Override
+            public ResourceTypeTreeNode copy() {
+                ResourceTypeTreeNode dup = super.copy();
+                dup.setAttribute(ATTR_PLUGIN_TEMPLATES, \
this.getAttributeAsLong(ATTR_PLUGIN_TEMPLATES)); +                \
dup.setAttribute(ATTR_USER_TEMPLATES, this.getAttributeAsLong(ATTR_USER_TEMPLATES)); \
+                return dup; +            }
         }
 
     }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
 index 246a71e..91a4ca2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/IgnoreResourceTypesView.java
 @@ -182,6 +182,13 @@ public class IgnoreResourceTypesView extends \
ResourceTypeTreeView {  super(composite, plugin);
                 setAttribute(ATTR_ENABLED, \
ImageManager.getAvailabilityIcon(!composite.getType().isIgnored()));  }
+
+            @Override
+            public ResourceTypeTreeNode copy() {
+                ResourceTypeTreeNode dup = super.copy();
+                dup.setAttribute(ATTR_ENABLED, this.getAttribute(ATTR_ENABLED));
+                return dup;
+            }
         }
     }
 }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/MetricTemplateTypeView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/MetricTemplateTypeView.java
 index 19c53d2..e4aa4fe 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/MetricTemplateTypeView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/MetricTemplateTypeView.java
 @@ -170,11 +170,8 @@ public class MetricTemplateTypeView extends \
ResourceTypeTreeView {  }
 
         public static class TreeNode extends ResourceTypeTreeNode {
-
             public TreeNode(ResourceTypeTemplateCountComposite composite, String \
                plugin) {
-
                 super(composite, plugin);
-
                 setAttribute(ATTR_ENABLED_TEMPLATES, \
                composite.getEnabledMetricCount());
                 setAttribute(ATTR_DISABLED_TEMPLATES, \
                composite.getDisabledMetricCount());
                 // If the type has no metrics then metric templates are enabled for \
the type @@ -182,6 +179,14 @@ public class MetricTemplateTypeView extends \
                ResourceTypeTreeView {
                     setAttribute(ATTRIB_EDIT, ImageManager.getEditDisabledIcon());
                 }
             }
+
+            @Override
+            public ResourceTypeTreeNode copy() {
+                ResourceTypeTreeNode dup = super.copy();
+                dup.setAttribute(ATTR_ENABLED_TEMPLATES, \
this.getAttributeAsLong(ATTR_ENABLED_TEMPLATES)); +                \
dup.setAttribute(ATTR_DISABLED_TEMPLATES, \
this.getAttributeAsLong(ATTR_DISABLED_TEMPLATES)); +                return dup;
+            }
         }
 
     }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java
 index 72563c2..e90f398 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java
 @@ -18,11 +18,14 @@
  */
 package org.rhq.enterprise.gui.coregui.client.admin.templates;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.types.TreeModelType;
 import com.smartgwt.client.widgets.grid.ListGrid;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
 import com.smartgwt.client.widgets.tree.Tree;
@@ -48,7 +51,7 @@ public abstract class ResourceTypeTreeNodeBuilder {
     static private final Messages MSG = CoreGUI.getMessages();
 
     public static final String ATTRIB_ID = "id";
-    public static final String ATTRIB_PARENT_ID = "parentId";
+    public static final String ATTRIB_CHILDREN = "children";
     public static final String ATTRIB_NAME = "name";
     public static final String ATTRIB_PLUGIN = "plugin";
     public static final String ATTRIB_CATEGORY = "category";
@@ -67,13 +70,18 @@ public abstract class ResourceTypeTreeNodeBuilder {
 
                 @Override
                 public void onSuccess(Map<Integer, \
ResourceTypeTemplateCountComposite> result) { +                    // result contains \
all of our resource types, including the parent hierarchy  \
                HashSet<ResourceTypeListGridRecord> platformsRecords;
                     HashSet<ResourceTypeListGridRecord> platformServicesRecords;
-                    HashSet<ResourceTypeTreeNode> treeNodes;
+                    HashMap<Integer, ResourceTypeTreeNode> serversNodes; // all \
server nodes (top level and below) +                    HashSet<Integer> topServers; \
// those servers that are at the root of the tree +                    \
HashMap<Integer, ArrayList<Integer>> childrenGraph; // defines the children of all \
server nodes  
                     platformsRecords = new HashSet<ResourceTypeListGridRecord>();
                     platformServicesRecords = new \
                HashSet<ResourceTypeListGridRecord>();
-                    treeNodes = new HashSet<ResourceTypeTreeNode>();
+                    serversNodes = new HashMap<Integer, ResourceTypeTreeNode>();
+                    topServers = new HashSet<Integer>();
+                    childrenGraph = new HashMap<Integer, ArrayList<Integer>>();
 
                     for (ResourceTypeTemplateCountComposite composite : \
result.values()) {  ResourceType type = composite.getType();
@@ -84,7 +92,9 @@ public abstract class ResourceTypeTreeNodeBuilder {
                                 \
platformsRecords.add(getGridRecordInstance(composite));  } else {
                                 // no parents but not a platform - these are our \
                top-level servers
-                                treeNodes.add(getTreeNodeInstance(composite, \
type.getPlugin())); +                                ResourceTypeTreeNode node = \
getTreeNodeInstance(composite, type.getPlugin()); +                                \
topServers.add(node.getResourceTypeId()); +                                \
serversNodes.put(node.getResourceTypeId(), node);  }
                         } else {
                             // has parents; if all the direct parents are top level \
platforms @@ -106,22 +116,37 @@ public abstract class ResourceTypeTreeNodeBuilder {
 
                             if (isPlatformService) {
                                 \
                platformServicesRecords.add(getGridRecordInstance(composite));
-
                             } else {
-                                // in some cases, a top level server is limited to \
                which platforms it can run on.
-                                // therefore, the parents will not be null/empty (as \
would be the case if the top level +                                // In some cases, \
a top level server is limited to which platforms it can run on. +                     \
// Therefore, the parents will not be null/empty (as would be the case if the top \
                level
                                 // server can run on ALL platforms), but instead it \
                will have the subset of platforms
-                                // the type is valid on. But its the same type - so \
                we only want to show it once. Therefore,
-                                // once we see a parent that is a top level \
                platform, we don't add the type again for other
-                                // top level platforms. That's what gotPlatform \
boolean tracks. +                                // the type is valid on. But its the \
same type - so we only want to show it once. +                                // This \
is what gotPlatform tracks - whether we saw a parent platform or not. +               \
// +                                // But we also have the case where a server type \
can run inside multiple parent server types. +                                // We \
want to show these under all their parents to make it easier for the user to find \
them.  boolean gotPlatform = false;
                                 for (ResourceType parentType : \
                type.getParentResourceTypes()) {
-                                    boolean isPlatform = (parentType.getCategory() \
== ResourceCategory.PLATFORM && isEmpty(parentType +                                  \
boolean isParentAPlatform = (parentType.getCategory() == ResourceCategory.PLATFORM && \
                isEmpty(parentType
                                         .getParentResourceTypes()));
-                                    if (!isPlatform || !gotPlatform) {
-                                        treeNodes.add(getTreeNodeInstance(composite, \
String.valueOf(parentType.getId()))); +                                    if \
(!isParentAPlatform || !gotPlatform) { +                                        int \
parentId = parentType.getId(); +                                        String \
parentIdString = String.valueOf(parentId); +                                        \
ResourceTypeTreeNode node = getTreeNodeInstance(composite, parentIdString); +         \
serversNodes.put(node.getResourceTypeId(), node); +                                   \
if (isParentAPlatform) { +                                            \
topServers.add(node.getResourceTypeId()); +                                        } \
else { +                                            // we are a child to other type, \
add it to the list of children +                                            \
ArrayList<Integer> childList = childrenGraph.get(parentId); +                         \
if (childList == null) { +                                                childList = \
new ArrayList<Integer>(); +                                                \
childrenGraph.put(parentId, childList); +                                            \
} +                                            \
childList.add(node.getResourceTypeId()); +                                        }
                                     }
-                                    if (isPlatform) {
+                                    if (isParentAPlatform) {
                                         gotPlatform = true;
                                     }
                                 }
@@ -129,14 +154,50 @@ public abstract class ResourceTypeTreeNodeBuilder {
                         }
                     }
 
+                    // now set up our UI components to show the data
+                    platformsGrid.setSortField(ATTRIB_NAME);
+                    platformServicesGrid.setSortField(ATTRIB_NAME);
+                    serversGrid.setSortField(ATTRIB_NAME);
+
                     platformsGrid.setData(platformsRecords.toArray(new \
ListGridRecord[platformsRecords.size()]));  \
                platformServicesGrid.setData(platformServicesRecords
                         .toArray(new \
                ListGridRecord[platformServicesRecords.size()]));
-                    Tree tree = serversGrid.getTree();
-                    if (tree != null) {
-                        TreeNode[] treeNodeArray = treeNodes.toArray(new \
                TreeNode[treeNodes.size()]);
-                        tree.linkNodes(treeNodeArray);
+                    Tree tree = new Tree();
+                    tree.setModelType(TreeModelType.CHILDREN);
+                    tree.setChildrenProperty(ATTRIB_CHILDREN);
+                    TreeNode rootNode = new TreeNode("0");
+                    tree.setRoot(rootNode);
+
+                    for (Integer topServerId : topServers) {
+                        ResourceTypeTreeNode topServerNode = \
serversNodes.get(topServerId); +                        topServerNode = \
topServerNode.copy(); +                        fillHierarchy(topServerNode, \
serversNodes, childrenGraph); +                        tree.add(topServerNode, \
rootNode);  }
+                    serversGrid.setData(tree);
+                }
+
+                private void fillHierarchy(ResourceTypeTreeNode node,
+                    HashMap<Integer, ResourceTypeTreeNode> serversNodes,
+                    HashMap<Integer, ArrayList<Integer>> childrenGraph) {
+
+                    if (node.getChildren().length > 0) {
+                        return; // we've already populated this node's children \
before; nothing to do +                    }
+
+                    ArrayList<Integer> childrenIds = \
childrenGraph.get(node.getResourceTypeId()); +                    if (childrenIds != \
null) { +                        for (Integer childrenId : childrenIds) {
+                            ResourceTypeTreeNode childNode = \
serversNodes.get(childrenId); +                            if (childNode != null) { \
// this should never be null, but this let's us continue if we have a bug +           \
childNode = childNode.copy(); +                                \
fillHierarchy(childNode, serversNodes, childrenGraph); +                              \
node.addChild(childNode); +                            }
+                        }
+                    }
+
+                    return;
                 }
 
                 @Override
@@ -184,25 +245,63 @@ public abstract class ResourceTypeTreeNodeBuilder {
 
     public static class ResourceTypeTreeNode extends TreeNode {
 
-        private String id;
+        private int id;
         private String parentId;
+        private TreeNode[] children;
+
+        private ResourceTypeTreeNode() {
+            // for use by copy() method
+        }
 
         protected ResourceTypeTreeNode(ResourceTypeTemplateCountComposite composite, \
String parentId) {  ResourceType resourceType = composite.getType();
 
-            String id = String.valueOf(resourceType.getId());
-            setID(id);
-            this.id = id;
-
-            setParentID(parentId);
+            this.id = resourceType.getId();
             this.parentId = parentId;
 
             setAttribute(ATTRIB_ID, id);
-            setAttribute(ATTRIB_PARENT_ID, parentId);
             setAttribute(ATTRIB_NAME, resourceType.getName());
             setAttribute(ATTRIB_PLUGIN, resourceType.getPlugin());
             setAttribute(ATTRIB_CATEGORY, resourceType.getCategory().name());
             setAttribute(ATTRIB_EDIT, ImageManager.getEditIcon());
+            setChildren(new TreeNode[0]);
+        }
+
+        public int getResourceTypeId() {
+            return this.id;
+        }
+
+        public TreeNode[] getChildren() {
+            return this.children;
+        }
+
+        @Override
+        public void setChildren(TreeNode[] children) {
+            this.children = children;
+            super.setChildren(children);
+        }
+
+        public void addChild(TreeNode newChild) {
+            TreeNode[] newChildren = new TreeNode[this.children.length + 1];
+            System.arraycopy(this.children, 0, newChildren, 0, \
this.children.length); +            newChildren[this.children.length] = newChild;
+            setChildren(newChildren);
+        }
+
+        // clone this object and return it - subclasses should override this to copy \
their own attributes +        public ResourceTypeTreeNode copy() {
+            ResourceTypeTreeNode dup = new ResourceTypeTreeNode();
+            dup.id = this.id;
+            dup.parentId = this.parentId;
+            dup.children = this.children;
+
+            dup.setAttribute(ATTRIB_ID, this.getAttributeAsInt(ATTRIB_ID));
+            dup.setAttribute(ATTRIB_NAME, this.getAttribute(ATTRIB_NAME));
+            dup.setAttribute(ATTRIB_PLUGIN, this.getAttribute(ATTRIB_PLUGIN));
+            dup.setAttribute(ATTRIB_CATEGORY, this.getAttribute(ATTRIB_CATEGORY));
+            dup.setAttribute(ATTRIB_EDIT, this.getAttribute(ATTRIB_EDIT));
+
+            return dup;
         }
 
         @Override
@@ -216,7 +315,7 @@ public abstract class ResourceTypeTreeNodeBuilder {
 
             ResourceTypeTreeNode that = (ResourceTypeTreeNode) o;
 
-            if (!this.id.equals(that.id)) {
+            if (this.id != that.id) {
                 return false;
             }
             if (this.parentId == null) {
@@ -228,7 +327,7 @@ public abstract class ResourceTypeTreeNodeBuilder {
         @Override
         public int hashCode() {
             int result = 31;
-            result = result * id.hashCode();
+            result = result * id;
             result = result + (parentId != null ? parentId.hashCode() : 0);
             return result;
         }


commit 6d5e400decd1b55624daedda9a8e0a6814155eda
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 23 20:40:21 2013 +0200

    BZ use explicit paging fields, as there is no default. In the specific case, the \
'name' field was not unique and thus 'random within the resources with the same name'

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 index 4ceae82..305d867 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 @@ -79,6 +79,7 @@ import org.rhq.core.domain.measurement.MeasurementDefinition;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.resource.group.ResourceGroup;
 import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
 import org.rhq.enterprise.server.RHQConstants;
 import org.rhq.enterprise.server.alert.AlertConditionManagerLocal;
 import org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal;
@@ -148,11 +149,11 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  public Response listAlertDefinitions(
             @ApiParam(value = "Page number") @QueryParam("page")  Integer page,
             @ApiParam(value = "Page size") @DefaultValue("20") @QueryParam("ps") int \
                pageSize,
-            @ApiParam(value = "Limit to status, UNUSED AT THE MOMENT ") \
@QueryParam("status") String status, // TODO  @Context HttpHeaders headers,
             @Context UriInfo uriInfo) {
 
         AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
+        criteria.addSortId(PageOrdering.ASC);
         if (page!=null) {
             criteria.setPaging(page,pageSize);
         }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 index fd8a835..4f4d6b4 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 @@ -62,6 +62,7 @@ import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.util.PageControl;
 import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
 import org.rhq.enterprise.server.RHQConstants;
 import org.rhq.enterprise.server.event.EventManagerLocal;
 import org.rhq.enterprise.server.rest.domain.EventDefinitionRest;
@@ -243,6 +244,7 @@ public class EventHandlerBean extends AbstractRestBean {
         EventSource source = findEventSourceById(sourceId);
 
         EventCriteria criteria = new EventCriteria();
+        criteria.addSortId(PageOrdering.ASC);
         criteria.addFilterSourceId(source.getId());
         if (startTime>0) {
             criteria.addFilterStartTime(startTime);
@@ -291,6 +293,8 @@ public class EventHandlerBean extends AbstractRestBean {
         }
 
         EventCriteria criteria = new EventCriteria();
+        criteria.addSortId(PageOrdering.ASC);
+
         criteria.addFilterResourceId(resourceId);
         if (startTime>0) {
             criteria.addFilterStartTime(startTime);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 index d65a850..006c8a0 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 @@ -27,8 +27,6 @@ import java.util.Set;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import javax.interceptor.Interceptors;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.DefaultValue;
@@ -67,6 +65,7 @@ import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.resource.group.GroupDefinition;
 import org.rhq.core.domain.resource.group.ResourceGroup;
 import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
 import org.rhq.enterprise.server.RHQConstants;
 import org.rhq.enterprise.server.resource.ResourceManagerLocal;
 import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
@@ -105,9 +104,6 @@ public class GroupHandlerBean extends AbstractRestBean  {
     @EJB
     GroupDefinitionManagerLocal definitionManager;
 
-    @PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
-    EntityManager em;
-
 
     @GZIP
     @GET
@@ -119,6 +115,8 @@ public class GroupHandlerBean extends AbstractRestBean  {
                               @Context HttpHeaders headers, @Context UriInfo \
uriInfo) {  
         ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+        criteria.addSortId(PageOrdering.ASC);
+
         if (q!=null) {
             criteria.addFilterName(q);
         }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 index 81d490b..d46850c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 @@ -401,12 +401,12 @@ public class OperationsHandlerBean extends AbstractRestBean  {
             @Context HttpHeaders httpHeaders) {
 
         ResourceOperationHistoryCriteria criteria = new \
ResourceOperationHistoryCriteria(); +        \
criteria.addSortStartTime(PageOrdering.ASC);  if (resourceId>0) {
             criteria.addFilterResourceIds(resourceId);
         }
         if (page!=null) {
             criteria.setPaging(page,pageSize);
-            criteria.addSortStartTime(PageOrdering.ASC);
         }
 
         criteria.addSortEndTime(PageOrdering.DESC);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 0c3a7cd..332dfbc 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -188,6 +188,8 @@ public class ResourceHandlerBean extends AbstractRestBean {
                                         @Context UriInfo uriInfo) {
 
         ResourceCriteria criteria = new ResourceCriteria();
+        criteria.addSortName(PageOrdering.ASC);
+        criteria.addSortId(PageOrdering.ASC);
         if (!status.toLowerCase().equals("all")) {
             try {
                 criteria.addFilterInventoryStatus(InventoryStatus.valueOf(status.toUpperCase()));
 @@ -206,7 +208,6 @@ public class ResourceHandlerBean extends AbstractRestBean {
         }
         if (page!=null) {
             criteria.setPaging(page,pageSize);
-            criteria.addSortName(PageOrdering.ASC);
         }
         PageList<Resource> ret = resMgr.findResourcesByCriteria(caller,criteria);
 
@@ -232,6 +233,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
         else {
             pc = PageControl.getUnlimitedInstance();
         }
+        pc.setPrimarySort("id",PageOrdering.ASC);
 
         PageList<Resource> ret = resMgr.findResourcesByCategory(caller, \
ResourceCategory.PLATFORM,  InventoryStatus.COMMITTED, pc);
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index cd103ca..900ab10 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -24,11 +24,16 @@ package org.rhq.modules.integrationTests.restApi;
 
 
 
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import com.jayway.restassured.http.ContentType;
 import com.jayway.restassured.path.json.JsonPath;
 import com.jayway.restassured.path.xml.XmlPath;
 import com.jayway.restassured.path.xml.element.Node;
 import com.jayway.restassured.response.Response;
+import com.jayway.restassured.response.ResponseBody;
 
 import org.apache.http.HttpStatus;
 import org.junit.Test;
@@ -73,8 +78,8 @@ public class ResourcesTest extends AbstractBase {
             .contentType(ContentType.JSON)
             .log().everything()
             .body("links.self", notNullValue())
-            .body("resourceId",is(_platformId))
-            .body("typeId",is(_platformTypeId))
+            .body("resourceId", is(_platformId))
+            .body("typeId", is(_platformTypeId))
             .body("parentId",is(0))
         .when()
             .get("/resource/{id}");
@@ -94,8 +99,8 @@ public class ResourcesTest extends AbstractBase {
             .contentType(WRAPPED_JSON)
             .log().everything()
             .body("links.self", notNullValue())
-            .body("resourceId",is(_platformId))
-            .body("typeId",is(_platformTypeId))
+            .body("resourceId", is(_platformId))
+            .body("typeId", is(_platformTypeId))
             .body("parentId",is(0))
         .when()
             .get("/resource/{id}");
@@ -277,13 +282,50 @@ public class ResourcesTest extends AbstractBase {
             .statusCode(200)
             .log().everything()
            // .header("Link", allOf(containsString("page=2"), \
                containsString("current")))
-            .header("Link",not(containsString("prev")))
+            .header("Link", not(containsString("prev")))
             .body("links.self", notNullValue())
         .when()
             .get("/resource");
     }
 
     @Test
+    public void testGetResourcesWithPagingAndUniquenessCheck() throws Exception {
+
+        int currentPage = 0;
+        Set<Integer> seen = new HashSet<Integer>();
+
+        for(;;) {
+            JsonPath path =
+            given()
+                .header("Accept", "application/vnd.rhq.wrapped+json")
+            .with()
+                .queryParam("page", currentPage)
+                .queryParam("ps", 5)  // Unusually small to provoke having more than \
1 page +                .queryParam("status","COMMITTED")
+            .expect()
+                .statusCode(200)
+                .log().ifError()
+            .when()
+                .get("/resource")
+            .jsonPath();
+
+            List<Integer> ids = path.getList("data.resourceId");
+
+            for (Integer id : ids ) {
+                assert !seen.contains(id);
+                seen.add(id);
+            }
+
+            currentPage++;
+            if (currentPage > path.getInt("lastPage")) {
+                break;
+            }
+            System.out.print("+");
+        }
+        System.out.println();
+    }
+
+    @Test
     public void testGetResourcesWithPagingAndWrapping() throws Exception {
 
         given()
@@ -314,7 +356,7 @@ public class ResourcesTest extends AbstractBase {
             .log().ifError()
             .body("links.self", notNullValue())
             .header("Link", not(containsString("prev=")))
-            .header("Link", anyOf(containsString("current"),containsString("last")))
+            .header("Link", anyOf(containsString("current"), \
                containsString("last")))
         .when().get("/resource/platforms");
     }
 


commit c09b8f16d4a4375a01241f2a1f042f59a9130735
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 23 15:14:23 2013 +0200

    Support paging in the body with the appropriate media type

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 5652f9f..92d2499 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -448,14 +448,14 @@ public class AbstractRestBean {
             uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed  uriBuilder.replaceQueryParam("page",nextPage);
 
-            builder.header("Link",new Link("next",uriBuilder.build().toString()));
+            builder.header("Link",new \
Link("next",uriBuilder.build().toString()).rfc5988String());  }
 
         if (page>0) {
             int prevPage = page -1;
             uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed  uriBuilder.replaceQueryParam("page",prevPage);
-            builder.header("Link", new Link("prev",uriBuilder.build().toString()));
+            builder.header("Link", new \
Link("prev",uriBuilder.build().toString()).rfc5988String());  }
 
         // A link to the last page
@@ -463,12 +463,12 @@ public class AbstractRestBean {
             int lastPage = resultList.getTotalSize() / pc.getPageSize();
             uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed  uriBuilder.replaceQueryParam("page",lastPage);
-            builder.header("Link", new Link("last",uriBuilder.build().toString()));
+            builder.header("Link", new \
Link("last",uriBuilder.build().toString()).rfc5988String());  }
 
         // A link to the current page
         uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and ?category \
                if needed
-        builder.header("Link", new Link("current",uriBuilder.build().toString()));
+        builder.header("Link", new \
Link("current",uriBuilder.build().toString()).rfc5988String());  
 
         // Create a total size header
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/Link.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/Link.java
 index 129ccfa..6eecf3e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/Link.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/Link.java
 @@ -59,4 +59,20 @@ public class Link {
             href + "; "  +
                 "rel='" + rel + '\'' ;
     }
+
+    /**
+     * Return the link in the format of RFC 5988 Web Linking.
+     *
+     * See <a href="http://tools.ietf.org/html/rfc5988#page-7">RFC 5988 Web \
Linking</a> +     * @return String that contains the link with href and rel
+     */
+    public String rfc5988String() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("<")
+            .append(href)
+            .append(">; rel=\"")
+            .append(rel)
+            .append("\"");
+        return builder.toString();
+    }
 }
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
 index 40ae7b0..75be637 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
 @@ -366,13 +366,13 @@ public class EventTest extends AbstractBase {
             Headers headers = response.getHeaders();
             int found = 0;
             for (String link: headers.getValues("Link")) {
-                if (link.contains("rel='last'"))
+                if (link.contains("rel=\"last\""))
                     found++;
-                if (link.contains("rel='prev'"))
+                if (link.contains("rel=\"prev\""))
                     found++;
-                if (link.contains("rel='current'"))
+                if (link.contains("rel=\"current\""))
                     found++;
-                assert !link.contains("rel='next");
+                assert !link.contains("rel=\"next\"");
             }
             assert found == 3;
 


commit cd1087a1789973d74b85e7bffa99893a32ea603e
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Wed May 22 22:37:33 2013 +0200

    Support paging in the body with the appropriate media type

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 8e4a826..5652f9f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -26,6 +26,7 @@ import java.io.IOException;
 import java.io.StringWriter;
 import java.net.URI;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -35,7 +36,9 @@ import java.util.Set;
 
 import javax.annotation.PostConstruct;
 import javax.ejb.EJB;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
@@ -66,6 +69,7 @@ import \
org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;  import \
org.rhq.enterprise.server.rest.domain.GroupRest;  import \
org.rhq.enterprise.server.rest.domain.Link;  import \
org.rhq.enterprise.server.rest.domain.MetricSchedule; +import \
org.rhq.enterprise.server.rest.domain.PagingCollection;  import \
org.rhq.enterprise.server.rest.domain.ResourceWithType;  
 /**
@@ -77,12 +81,16 @@ import org.rhq.enterprise.server.rest.domain.ResourceWithType;
  * @author Heiko W. Rupp
  * @author Jay Shaughnessy
  */
+@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML,"application/vnd.rhq.wrapped+json"})
  @javax.annotation.Resource(name = "ISPN", mappedName = "java:jboss/infinispan/rhq")
 @SuppressWarnings("unchecked")
 public class AbstractRestBean {
 
     protected Log log = LogFactory.getLog(getClass().getName());
 
+    protected final MediaType wrappedCollectionJsonType = new \
MediaType("application","vnd.rhq.wrapped+json"); +    protected final String \
wrappedCollectionJson = "application/vnd.rhq.wrapped+json"; +
     private static final CacheKey META_KEY = new CacheKey("rhq.rest.resourceMeta", \
0);  
     @javax.annotation.Resource( name = "ISPN")
@@ -468,6 +476,52 @@ public class AbstractRestBean {
     }
 
     /**
+     * Wrap the passed collection #resultList in an object with paging information
+     * @param builder ResonseBuilder to add the entity to
+     * @param uriInfo UriInfo to construct paging links
+     * @param originalList The original list to obtain the paging info from
+     * @param resultList The list of result items
+     */
+    protected void wrapForPaging(Response.ResponseBuilder builder, UriInfo uriInfo, \
final PageList<?> originalList, final Collection resultList) { +
+        PagingCollection pColl = new PagingCollection(resultList);
+        pColl.setTotalSize(originalList.getTotalSize());
+        PageControl pageControl = originalList.getPageControl();
+        pColl.setPageSize(pageControl.getPageSize());
+        int page = pageControl.getPageNumber();
+        pColl.setCurrentPage(page);
+        pColl.setLastPage(originalList.getTotalSize()/pageControl.getPageSize());
+
+        UriBuilder uriBuilder;
+        if (originalList.getTotalSize() > (page +1 ) * pageControl.getPageSize()) {
+            int nextPage = page +1;
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",nextPage);
+            pColl.addLink(new Link("next",uriBuilder.build().toString()));
+        }
+        if (page > 0) {
+            int prevPage = page -1;
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",prevPage);
+            pColl.addLink(new Link("prev",uriBuilder.build().toString()));
+        }
+
+        // A link to the last page
+        if (!pageControl.isUnlimited()) {
+            int lastPage = originalList.getTotalSize() / pageControl.getPageSize();
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",lastPage);
+            pColl.addLink( new Link("last",uriBuilder.build().toString()));
+        }
+
+        // A link to the current page
+        uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and ?category \
if needed +        pColl.addLink(new Link("current",uriBuilder.build().toString()));
+
+        builder.entity(pColl);
+    }
+
+    /**
      * Fetch the group with the passed id
      *
      * @param groupId id of the resource group
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 index 6ea3d03..4ceae82 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 @@ -46,6 +46,7 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.EntityTag;
 import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Request;
 import javax.ws.rs.core.Response;
@@ -98,7 +99,6 @@ import org.rhq.enterprise.server.rest.domain.Link;
  * AlertHandlerBean
  * @author Heiko W. Rupp
  */
-@Produces({"application/json","application/xml","text/plain"})
 @Path("/alert")
 @Api(value = "Deal with Alert Definitions",description = "This api deals with alert \
                definitions. Everything " +
     " is purely experimental at the moment and can change without notice at any \
time.") @@ -149,6 +149,7 @@ public class AlertDefinitionHandlerBean extends \
                AbstractRestBean {
             @ApiParam(value = "Page number") @QueryParam("page")  Integer page,
             @ApiParam(value = "Page size") @DefaultValue("20") @QueryParam("ps") int \
                pageSize,
             @ApiParam(value = "Limit to status, UNUSED AT THE MOMENT ") \
@QueryParam("status") String status, // TODO +            @Context HttpHeaders \
headers,  @Context UriInfo uriInfo) {
 
         AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
@@ -163,10 +164,17 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  ret.add(adr);
         }
 
-        Response.ResponseBuilder builder = Response.ok(ret);
-        createPagingHeader(builder,uriInfo,defs);
+        Response.ResponseBuilder builder = Response.ok();
 
-        // TODO media type etc
+        MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
+        builder.type(mediaType);
+
+        if (mediaType.equals(wrappedCollectionJsonType)) {
+            wrapForPaging(builder,uriInfo,defs,ret);
+        } else {
+            createPagingHeader(builder,uriInfo,defs);
+            builder.entity(ret); // TODO generic entity for XML
+        }
 
         return builder.build();
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 index 5da3fb9..5c6a06f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 @@ -32,7 +32,6 @@ import javax.ws.rs.GET;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.EntityTag;
@@ -72,7 +71,6 @@ import org.rhq.enterprise.server.rest.domain.*;
  * Deal with alert related stuff
  * @author Heiko W. Rupp
  */
-@Produces({"application/json","application/xml","text/html"})
 @Path("/alert")
 @Api(value = "Deal with Alerts",description = "This api deals with alerts that have \
fired.")  @Stateless
@@ -148,17 +146,22 @@ public class AlertHandlerBean extends AbstractRestBean {
         }
 
         MediaType type = headers.getAcceptableMediaTypes().get(0);
-        Response.ResponseBuilder builder;
+        Response.ResponseBuilder builder = Response.ok();
+        builder.type(type);
 
         if (type.equals(MediaType.TEXT_HTML_TYPE)) {
-            builder = Response.ok(renderTemplate("listAlerts.ftl",ret),type);
+            builder.entity(renderTemplate("listAlerts.ftl",ret));
         } else {
-            GenericEntity<List<AlertRest>> entity = new \
                GenericEntity<List<AlertRest>>(ret) {};
-            builder = Response.ok(entity);
+            if (type.equals(wrappedCollectionJsonType)) {
+                wrapForPaging(builder,uriInfo,alerts,ret);
+            }
+            else {
+                GenericEntity<List<AlertRest>> entity = new \
GenericEntity<List<AlertRest>>(ret) {}; +                builder.entity(entity);
+                createPagingHeader(builder,uriInfo,alerts);
+            }
         }
 
-        createPagingHeader(builder,uriInfo,alerts);
-
         return builder.build();
     }
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 index 7402550..fd8a835 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 @@ -37,13 +37,11 @@ import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.GenericEntity;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Request;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
@@ -76,7 +74,6 @@ import org.rhq.enterprise.server.rest.domain.EventSourceRest;
  */
 @Path("/event")
 @Api("Api that deals with Events (e.g snmp traps, logfile lines)")
-@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
  @Stateless
 @Interceptors(SetCallerInterceptor.class)
 public class EventHandlerBean extends AbstractRestBean {
@@ -348,17 +345,20 @@ public class EventHandlerBean extends AbstractRestBean {
         }
 
         MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
-        Response.ResponseBuilder builder;
+        Response.ResponseBuilder builder = Response.ok();
+        builder.type(mediaType);
         if (mediaType.equals(MediaType.APPLICATION_XML_TYPE)) {
             GenericEntity<List<EventRest>> list = new \
                GenericEntity<List<EventRest>>(restEvents) {};
-            builder = Response.ok(list, mediaType);
+            builder.entity(list);
+            createPagingHeader(builder,uriInfo,eventList);
+        } else if (mediaType.equals(MediaType.APPLICATION_JSON_TYPE)) {
+            builder.entity(restEvents);
+            createPagingHeader(builder,uriInfo,eventList);
         }
-        else {
-            builder = Response.ok(restEvents, mediaType);
+        else  {
+            wrapForPaging(builder,uriInfo,eventList,restEvents);
         }
 
-        createPagingHeader(builder,uriInfo,eventList);
-
         return builder;
     }
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 index be2419b..d65a850 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 @@ -37,7 +37,6 @@ import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.GenericEntity;
@@ -93,7 +92,6 @@ import org.rhq.enterprise.server.rest.domain.ResourceWithType;
 @Interceptors(SetCallerInterceptor.class)
 @Path("/group")
 @Api(value="Deal with groups and DynaGroups", description = "Api that deals with \
                resource groups and group definitions")
-@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
  public class GroupHandlerBean extends AbstractRestBean  {
 
     private final Log log = LogFactory.getLog(GroupHandlerBean.class);
@@ -142,12 +140,15 @@ public class GroupHandlerBean extends AbstractRestBean  {
         if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
             builder.entity(renderTemplate("listGroup", list));
         }
+        else if (mediaType.equals(wrappedCollectionJsonType)) {
+            wrapForPaging(builder,uriInfo,groups,list);
+        }
         else {
             GenericEntity<List<GroupRest>> ret = new \
GenericEntity<List<GroupRest>>(list) {};  builder.entity(ret);
+            createPagingHeader(builder,uriInfo,groups);
         }
 
-        createPagingHeader(builder,uriInfo,groups);
 
         return builder.build();
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 index e32ea03..81d490b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 @@ -420,16 +420,19 @@ public class OperationsHandlerBean extends AbstractRestBean  {
         }
 
         MediaType mediaType = httpHeaders.getAcceptableMediaTypes().get(0);
-        Response.ResponseBuilder builder;
+        Response.ResponseBuilder builder = Response.ok();
+        builder.type(mediaType);
+
         if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
-            builder = Response.ok(renderTemplate("listOperationHistory.ftl", \
result)); +            builder.entity(renderTemplate("listOperationHistory.ftl", \
result)); +        } else if (mediaType.equals(wrappedCollectionJsonType)) {
+            wrapForPaging(builder,uriInfo,histories,result);
         } else {
             GenericEntity<List<OperationHistoryRest>> res = new \
                GenericEntity<List<OperationHistoryRest>>(result) {};
-            builder = Response.ok(res);
+            builder.entity(res);
+            createPagingHeader(builder,uriInfo,histories);
         }
 
-        createPagingHeader(builder,uriInfo,histories);
-
         return builder.build();
     }
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index a783ac8..0c3a7cd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -114,7 +114,6 @@ import \
                org.rhq.enterprise.server.rest.helper.ConfigurationHelper;
  * Class that deals with getting data about resources
  * @author Heiko W. Rupp
  */
-@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
  @Path("/resource")
 @Api(value="Resource related", description = "This endpoint deals with individual \
resources, not resource groups")  @Interceptors(SetCallerInterceptor.class)
@@ -263,15 +262,19 @@ public class ResourceHandlerBean extends AbstractRestBean {
         Response.ResponseBuilder builder = Response.ok();
         builder.type(mediaType);
 
-        createPagingHeader(builder,uriInfo,resources);
 
         if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
             builder.entity(renderTemplate("listResourceWithType", rwtList));
 
         } else {
-            GenericEntity<List<ResourceWithType>> list = new \
GenericEntity<List<ResourceWithType>>(rwtList) { +            if \
(mediaType.equals(wrappedCollectionJsonType)) { +                \
wrapForPaging(builder,uriInfo,resources,rwtList); +            } else {
+                GenericEntity<List<ResourceWithType>> list = new \
GenericEntity<List<ResourceWithType>>(rwtList) {  };
-            builder.entity(list);
+                builder.entity(list);
+                createPagingHeader(builder,uriInfo,resources);
+            }
         }
         return builder;
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/PagingCollection.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/PagingCollection.java
 new file mode 100644
index 0000000..4a0f892
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/PagingCollection.java
 @@ -0,0 +1,97 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest.domain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * A wrapper for collections with paging entries
+ * @author Heiko W. Rupp
+ */
+@XmlRootElement
+public class PagingCollection<T> {
+
+    Collection<T> data;
+    int pageSize;
+    int currentPage;
+    int lastPage;
+    int totalSize;
+    List<Link> links = new ArrayList<Link>();
+
+    public PagingCollection(Collection<T> data) {
+        this.data = data;
+    }
+
+    public int getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(int currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public Collection<T> getData() {
+        return data;
+    }
+
+    public void setData(Collection<T> data) {
+        this.data = data;
+    }
+
+    public int getLastPage() {
+        return lastPage;
+    }
+
+    public void setLastPage(int lastPage) {
+        this.lastPage = lastPage;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public int getTotalSize() {
+        return totalSize;
+    }
+
+    public void setTotalSize(int totalSize) {
+        this.totalSize = totalSize;
+    }
+
+    public List<Link> getLinks() {
+        return links;
+    }
+
+    public void setLinks(List<Link> links) {
+        this.links = links;
+    }
+
+    public void addLink(Link link) {
+        links.add(link);
+    }
+}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java \
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 index 7e20630..3a7e961 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
                
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 @@ -703,7 +703,7 @@ public class ConfigurationHelperTest {
 
     }
 
-    @Test
+    @Test(enabled = false)
     public void testConfigToMapComplexMapWithBadSetupLenient() throws Exception {
 
         Configuration config = new Configuration();
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
 index ae4e81d..fd154ef 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
 @@ -40,6 +40,7 @@ import static com.jayway.restassured.RestAssured.given;
 public abstract class AbstractBase {
 
     static final String APPLICATION_JSON = "application/json";
+    static final String WRAPPED_JSON = "application/vnd.rhq.wrapped+json";
     private static final String APPLICATION_XML = "application/xml";
     private static final String TEXT_CSV = "text/csv";
     private static final String TEXT_HTML = "text/html";
@@ -48,6 +49,7 @@ public abstract class AbstractBase {
     static Header acceptXml = new Header("Accept", APPLICATION_XML);
     static Header acceptHtml = new Header("Accept", TEXT_HTML);
     static Header acceptCsv = new Header("Accept", TEXT_CSV);
+    static Header acceptWrappedJson = new Header("Accept",WRAPPED_JSON);
 
     int _platformId ;
     int _platformTypeId;
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 index e02a723..acbb492 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 @@ -39,6 +39,7 @@ import static org.hamcrest.CoreMatchers.anyOf;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.emptyIterable;
 import static org.hamcrest.Matchers.instanceOf;
@@ -116,6 +117,22 @@ public class AlertTest extends AbstractBase {
             .get("/alert");
     }
 
+    @Test
+    public void testListAlertsWithPagingAndWrapped() throws Exception {
+
+        given()
+            .header(acceptWrappedJson)
+            .queryParam("ps", 2)
+            .queryParam("page", 0)
+        .expect()
+            .statusCode(200)
+            .header("Link", nullValue())
+            .body("totalSize", notNullValue())
+            .log().ifError()
+        .when()
+            .get("/alert");
+    }
+
 
     @Test
     public void testGetAlertCountJson() throws Exception {
@@ -192,6 +209,21 @@ public class AlertTest extends AbstractBase {
     }
 
     @Test
+    public void testListAllAlertDefinitionsWithWrapping() throws Exception {
+
+        given()
+            .header(acceptWrappedJson)
+            .log().everything()
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+            .body("currentPage", Matchers.notNullValue())
+            .body("totalSize", Matchers.notNullValue())
+        .when()
+            .get("/alert/definitions");
+    }
+
+    @Test
     public void testRedirectForDefinition() throws Exception {
         given()
             .header(acceptJson)
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 index 3515fac..ebd72c0 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 @@ -306,13 +306,13 @@ public class ContentTest extends AbstractBase {
         .as(List.class);
 
         if (resources!=null && resources.size()>0) {
-            int resourceId = resources.get(0).getResourceId();
+            int resourceId = (Integer) ((Map < \
String,Object>)resources.get(0)).get("resourceId");  
             given()
                 .pathParam("id", resourceId)
                 .queryParam("physical", "true") // Also remove target on the EAP \
                instance
             .expect()
-                .statusCode(200)
+                .statusCode(204)
             .when()
                 .delete("/resource/{id}");
         }
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
 index a4ef048..ef575d1 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
 @@ -35,6 +35,8 @@ import org.rhq.modules.integrationTests.restApi.d.GroupDef;
 import static com.jayway.restassured.RestAssured.expect;
 import static com.jayway.restassured.RestAssured.given;
 import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.iterableWithSize;
 
@@ -69,17 +71,37 @@ public class GroupTest extends AbstractBase {
 
     @Test
     public void testGetGroups() throws Exception {
-        expect().statusCode(200)
-                .when().get("/group");
+        expect()
+            .statusCode(200)
+        .when()
+            .get("/group");
     }
 
     @Test
     public void testGetGroupsWithPaging() throws Exception {
         given()
+            .header(acceptJson)
+            .queryParam("page",0)
+            .queryParam("ps",2)
+        .expect()
+            .statusCode(200)
+            .header("Link", notNullValue())
+        .when()
+            .get("/group");
+    }
+
+    @Test
+    public void testGetGroupsWithPagingWrapped() throws Exception {
+        given()
+            .header(acceptWrappedJson)
             .queryParam("page",0)
             .queryParam("ps",2)
         .expect()
             .statusCode(200)
+            .log().ifError()
+            .header("Link",nullValue())
+            .body("pageSize",is(2))
+            .body("currentPage",is(0))
         .when()
             .get("/group");
     }
@@ -87,10 +109,11 @@ public class GroupTest extends AbstractBase {
     @Test
     public void testGetGroupsQuery() throws Exception {
         given()
-                .queryParam("q","lala")
+            .queryParam("q", "lala")
         .expect()
-                .statusCode(200)
-                .when().get("/group");
+            .statusCode(200)
+        .when()
+            .get("/group");
     }
 
     @Test
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index b66d9b5..cd103ca 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -82,6 +82,27 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testGetPlatformJsonWrapping() {
+
+        // Actually this object should not be wrapped
+        // as it is no list
+        given()
+            .header(acceptWrappedJson)
+            .pathParam("id",_platformId)
+        .expect()
+            .statusCode(200)
+            .contentType(WRAPPED_JSON)
+            .log().everything()
+            .body("links.self", notNullValue())
+            .body("resourceId",is(_platformId))
+            .body("typeId",is(_platformTypeId))
+            .body("parentId",is(0))
+        .when()
+            .get("/resource/{id}");
+
+    }
+
+    @Test
     public void testGetPlatformAndTypeJson() {
 
         Integer typeId =
@@ -258,7 +279,26 @@ public class ResourcesTest extends AbstractBase {
            // .header("Link", allOf(containsString("page=2"), \
                containsString("current")))
             .header("Link",not(containsString("prev")))
             .body("links.self", notNullValue())
-        .when().get("/resource");
+        .when()
+            .get("/resource");
+    }
+
+    @Test
+    public void testGetResourcesWithPagingAndWrapping() throws Exception {
+
+        given()
+            .header("Accept", "application/vnd.rhq.wrapped+json")
+        .with()
+            .queryParam("page", 1)
+            .queryParam("ps", 2)  // Unusually small to provoke having more than 1 \
page +            .queryParam("category", "service")
+        .expect()
+            .statusCode(200)
+            .log().everything()
+            .body("pageSize",is(2))
+            .body("currentPage",is(1))
+        .when()
+            .get("/resource");
     }
 
     @Test


commit e725ed0658bae7bd5f33dbbc4a2b30eb02a6057f
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Wed May 22 19:36:09 2013 +0200

    Improvements to RHQ irc bot. New set of commands is now supported.

diff --git a/etc/rhq-ircBot/pom.xml b/etc/rhq-ircBot/pom.xml
index 40b6952..6e66187 100644
--- a/etc/rhq-ircBot/pom.xml
+++ b/etc/rhq-ircBot/pom.xml
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>org.pircbotx</groupId>
       <artifactId>pircbotx</artifactId>
-      <version>1.7</version>
+      <version>1.9</version>
     </dependency>
 
     <dependency>
@@ -50,6 +50,17 @@
       <version>2.0</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.jsoup</groupId>
+      <artifactId>jsoup</artifactId>
+      <version>1.7.2</version>
+    </dependency>
+  
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.4</version>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java \
b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java index \
                ce7535f..7e8f563 100644
--- a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
@@ -1,163 +1,63 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
 package org.rhq.etc.ircbot;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.j2bugzilla.base.Bug;
-import com.j2bugzilla.base.BugzillaConnector;
-import com.j2bugzilla.base.BugzillaException;
-import com.j2bugzilla.rpc.GetBug;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.util.Properties;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
 
-import org.apache.xmlrpc.XmlRpcException;
 import org.pircbotx.PircBotX;
-import org.pircbotx.User;
-import org.pircbotx.hooks.Listener;
-import org.pircbotx.hooks.ListenerAdapter;
-import org.pircbotx.hooks.events.DisconnectEvent;
-import org.pircbotx.hooks.events.MessageEvent;
-import org.pircbotx.hooks.events.PrivateMessageEvent;
 
 /**
- * An IRC bot for doing helpful stuff on the Freenode #rhq channel.
+ * @author Jirka Kremser
  *
- * @author Ian Springer
  */
-public class RhqIrcBot extends ListenerAdapter {
-
-    private static final Pattern BUG_PATTERN = Pattern.compile("(?i)(bz|bug)[ \
                ]*(\\d{6,7})");
-    private static final Pattern ECHO_PATTERN = Pattern.compile("(?i)echo[ ]+(.+)");
-
-    private static final Set<String> JON_DEVS = new HashSet<String>();
-    static {
-        JON_DEVS.add("ccrouch");
-        JON_DEVS.add("ips");
-        JON_DEVS.add("jkremser");
-        JON_DEVS.add("jsanda");
-        JON_DEVS.add("jshaughn");
-        JON_DEVS.add("lkrejci");
-        JON_DEVS.add("mazz");
-        JON_DEVS.add("mtho11");
-        JON_DEVS.add("pilhuhn");
-        JON_DEVS.add("spinder");
-        JON_DEVS.add("stefan_n");
-    }
-
-    private String server;
-    private String channel;
-    private BugzillaConnector bzConnector = new BugzillaConnector();
-    private Map<Integer, Long> bugLogTimestamps = new HashMap<Integer, Long>();
-
-    public RhqIrcBot(String server, String channel) {
-        this.server = server;
-        this.channel = channel;
-    }
-
-    @Override
-    public void onMessage(MessageEvent event) throws Exception {
-        PircBotX bot = event.getBot();
-        if (!bot.getNick().equals(bot.getName())) {
-            bot.changeNick(bot.getName());
-        }
-
-        String message = event.getMessage();
-        Matcher bugMatcher = BUG_PATTERN.matcher(message);
-        while (bugMatcher.find()) {
-            int bugId = Integer.valueOf(bugMatcher.group(2));
-            GetBug getBug = new GetBug(bugId);
-            try {
-                bzConnector.executeMethod(getBug);
-            } catch (Exception e) {
-                bzConnector = new BugzillaConnector();
-                bzConnector.connectTo("https://bugzilla.redhat.com");
-                try {
-                    bzConnector.executeMethod(getBug);
-                } catch (BugzillaException e1) {
-                    //e1.printStackTrace();
-                    Throwable cause = e1.getCause();
-                    String details = (cause instanceof XmlRpcException) ? \
                cause.getMessage() : e1.getMessage();
-                    bot.sendMessage(event.getChannel(), "Failed to access BZ " + \
                bugId + ": " + details);
-                    continue;
-                }
-            }
-            Bug bug = getBug.getBug();
-            if (bug != null) {
-                String product = bug.getProduct();
-                if (product.equals("RHQ Project")) {
-                    product = "RHQ";
-                } else if (product.equals("JBoss Operations Network")) {
-                    product = "JON";
-                }
-                Long timestamp = bugLogTimestamps.get(bugId);
-                if ((timestamp == null) || ((System.currentTimeMillis() - timestamp) \
>                 (5 * 60 * 1000L))) {
-                    bot.sendMessage(event.getChannel(), "BZ " + bugId + " [product=" \
                + product
-                            + ", priority=" + bug.getPriority() + ", status=" + \
                bug.getStatus() + "] "
-                            + bug.getSummary() + " [ https://bugzilla.redhat.com/" + \
                bugId + " ]");
-                }
-                bugLogTimestamps.put(bugId, System.currentTimeMillis());
-            } else {
-                bot.sendMessage(event.getChannel(), "BZ " + bugId + " does not \
                exist.");
-            }
-        }
-
-        if (message.matches(".*\\b(jon-team|jboss-on-team)\\b.*")) {
-            Set<User> users = bot.getUsers(event.getChannel());
-            StringBuilder presentJonDevs = new StringBuilder();
-            for (User user : users) {
-                String nick = user.getNick();
-                if (JON_DEVS.contains(nick) && \
                !nick.equals(event.getUser().getNick())) {
-                    presentJonDevs.append(nick).append(' ');
-                }
-            }
-            bot.sendMessage(event.getChannel(), presentJonDevs + ": see message from \
                "
-                    + event.getUser().getNick() + " above");
-        }
+public class RhqIrcBot extends PircBotX {
+    
+    private static final String TRUSTSTORE_NAME = "cacerts.jks";
+    
+    public RhqIrcBot(RhqIrcBotListener rhqBot) {
+        setName("rhq-bot");
+        setVersion("1.1");
+        setFinger("RHQ IRC bot (source code in RHQ git under etc/rhq-ircBot/)");
+
+        setVerbose(true);
+        setAutoNickChange(true);
+
+        getListenerManager().addListener(rhqBot);
+        setSocketTimeout(1 * 60 * 1000); // 1 minute
     }
-
-    @Override
-    public void onPrivateMessage(PrivateMessageEvent privateMessageEvent) throws \
                Exception {
-        PircBotX bot = privateMessageEvent.getBot();
-        String message = privateMessageEvent.getMessage();
-        Matcher echoMatcher = ECHO_PATTERN.matcher(message);
-        if (echoMatcher.matches()) {
-            String echoMessage = echoMatcher.group(1);
-            bot.sendMessage(this.channel, echoMessage);
-        } else {
-            bot.sendMessage(privateMessageEvent.getUser(), "Hi, I am " + \
                bot.getFinger() + ".");
-        }
-        // TODO: Implement a HELP command.
-    }
-
-    @Override
-    public void onDisconnect(DisconnectEvent disconnectEvent) throws Exception {
-        boolean connected = false;
-        while (!connected) {
-            Thread.sleep(60 * 1000L); // 1 minute
-            try {
-                PircBotX newBot = createBot(this);
-                newBot.connect(this.server);
-                newBot.joinChannel(this.channel);
-
-                connected = true;
-            } catch (Exception e) {
-                System.err.println("Failed to reconnect to " + \
                disconnectEvent.getBot().getServer() + " IRC server: " + e);
-            }
-        }
-
-        // Try to clean up the old bot, so it can release any memory, sockets, etc. \
                it's using.
-        PircBotX oldBot = disconnectEvent.getBot();
-        Set<Listener> oldListeners = new \
                HashSet<Listener>(oldBot.getListenerManager().getListeners());
-        for (Listener oldListener : oldListeners) {
-            oldBot.getListenerManager().removeListener(oldListener);
-        }
-    }
-
+    
     public static void main(String[] args) throws Exception {
-        if (args.length != 2) {
-            System.err.println("Usage: RhqIrcBot IRC_SERVER IRC_CHANNEL");
+        if (args.length != 2 && args.length != 3) {
+            System.err.println("Usage: RhqIrcBot IRC_SERVER IRC_CHANNEL \
                [rhq-ircBot.properties]");
             System.err.println(" e.g.: RhqIrcBot irc.freenode.net '#rhq'");
             System.exit(1);
         }
@@ -167,26 +67,62 @@ public class RhqIrcBot extends ListenerAdapter {
             channel = '#' + channel;
         }
 
-        RhqIrcBot rhqBot = new RhqIrcBot(server, channel);
+        RhqIrcBotListener rhqBotListener = new RhqIrcBotListener(server, channel);
+        if (args.length == 3) {
+            File propertyFile = new File(args[2]);
+            if (!propertyFile.exists()) {
+                System.err.println("Provided property file [" + args[2] +  "] does \
not exist"); +                System.exit(2);
+            }
+            Properties properties = new Properties();
+            FileInputStream fis = new FileInputStream(propertyFile);
+            properties.load(fis);
+            String docspaceLogin = properties.getProperty("docspace_login");
+            String docspacePassword = properties.getProperty("docspace_password");
+            if (docspaceLogin == null || docspaceLogin.isEmpty() || docspacePassword \
== null || docspacePassword.isEmpty()) { +                System.err.println("The \
property format has bad format"); +                System.err.println("It must \
contain following key-value pairs\n"); +                \
System.err.println("docspace_login=X"); +                \
System.err.println("docspace_password=Y"); +                System.exit(3);
+            }
+            fis.close();
+            
+            setupTrustStore();
+            
+            rhqBotListener.setDocspaceLogin(docspaceLogin);
+            rhqBotListener.setDocspacePassword(docspacePassword);
+        }
 
-        PircBotX bot = createBot(rhqBot);
+        PircBotX bot = new RhqIrcBot(rhqBotListener);
         bot.connect(server);
         bot.joinChannel(channel);
     }
-
-    private static PircBotX createBot(RhqIrcBot rhqBot) {
-        PircBotX bot = new PircBotX();
-
-        bot.setName("rhq-bot");
-        bot.setVersion("1.0");
-        bot.setFinger("RHQ IRC bot (source code in RHQ git under etc/rhq-ircBot/)");
-
-        bot.setVerbose(true);
-        bot.setAutoNickChange(true);
-
-        bot.getListenerManager().addListener(rhqBot);
-        bot.setSocketTimeout(1 * 60 * 1000); // 1 minute
-        return bot;
+    
+    private static void setupTrustStore() {
+        TrustManagerFactory trustManagerFactory;
+        try {
+            trustManagerFactory = \
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); +         \
KeyStore keystore; +            keystore = \
KeyStore.getInstance(KeyStore.getDefaultType()); +            InputStream \
keystoreStream = RhqIrcBot.class.getResourceAsStream(TRUSTSTORE_NAME); +            \
keystore.load(keystoreStream, "rhqirc".toCharArray()); +            \
trustManagerFactory.init(keystore); +            TrustManager[] trustManagers = \
trustManagerFactory.getTrustManagers(); +            SSLContext ctx = \
SSLContext.getInstance("SSL"); +            ctx.init(null, trustManagers, null);
+
+            SSLContext.setDefault(ctx);
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        } catch (KeyStoreException e) {
+            e.printStackTrace();
+        } catch (CertificateException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (KeyManagementException e) {
+            e.printStackTrace();
+        }
     }
-
 }
diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java \
b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java new file \
mode 100644 index 0000000..8a7e578
--- /dev/null
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBotListener.java
@@ -0,0 +1,357 @@
+package org.rhq.etc.ircbot;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.j2bugzilla.base.Bug;
+import com.j2bugzilla.base.BugzillaConnector;
+import com.j2bugzilla.base.BugzillaException;
+import com.j2bugzilla.rpc.GetBug;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.xmlrpc.XmlRpcException;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
+import org.pircbotx.PircBotX;
+import org.pircbotx.User;
+import org.pircbotx.hooks.Listener;
+import org.pircbotx.hooks.ListenerAdapter;
+import org.pircbotx.hooks.events.DisconnectEvent;
+import org.pircbotx.hooks.events.MessageEvent;
+import org.pircbotx.hooks.events.NickChangeEvent;
+import org.pircbotx.hooks.events.PrivateMessageEvent;
+
+/**
+ * An IRC bot for doing helpful stuff on the Freenode #rhq channel.
+ *
+ * @author Ian Springer
+ * @author Jiri Kremser
+ */
+public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> {
+
+    private static final Pattern BUG_PATTERN = Pattern.compile("(?i)(bz|bug)[ \
]*(\\d{6,7})"); +    private static final Pattern COMMIT_PATTERN = \
Pattern.compile("(?i)(\\!commit|cm)[ ]*([0-9a-f]{3,40})"); +    private static final \
Pattern ECHO_PATTERN = Pattern.compile("(?i)echo[ ]+(.+)"); +    private static final \
String SUPPORT_LINK = "https://docspace.corp.redhat.com/docs/DOC-124477"; +    \
private static final String COMMIT_LINK = \
"https://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=%s"; +    private static \
final String PTO_LINK = \
"https://mail.corp.redhat.com/home/ccrouch@redhat.com/JBoss%20ON%20OOO?fmt=rss&view=day";
 +    private static final DateFormat monthFormat = new SimpleDateFormat("MMM");
+    private static final DateFormat dayInMonthFormat = new SimpleDateFormat("d");
+
+    private static enum Command {
+
+        FORUM("Our forum is available from \
https://community.jboss.org/en/rhq?view=discussions", true),  +        HELP("You can \
use one of the following commands: ", true),  +        LISTS("Feel free to enroll to \
the user list https://lists.fedorahosted.org/mailman/listinfo/rhq-users" +            \
+ " or the devel list https://lists.fedorahosted.org/mailman/listinfo/rhq-devel", \
true),  +        LOGS("IRC logs are available from \
http://transcripts.jboss.org/channel/irc.freenode.org/%23rhq/index.html", true), +    \
PTO, +        SOURCE("The code could be viewed/cloned on \
https://github.com/rhq-project or https://git.fedorahosted.org/cgit/rhq/rhq.git/", \
true),  +        SUPPORT, 
+        WIKI("Our wiki is available from \
https://docs.jboss.org/author/display/RHQ/Home", true); +
+        public static final char PREFIX = '!';
+        private final String staticRespond;
+        private final boolean includeInHelp;
+
+        Command(String staticRespond, boolean includeInHelp) {
+            this.staticRespond = staticRespond;
+            this.includeInHelp = includeInHelp;
+        }
+
+        Command() {
+            this(null, false);
+        }
+    }
+
+    private static final Set<String> JON_DEVS = new HashSet<String>();
+    static {
+        JON_DEVS.add("ccrouch");
+        JON_DEVS.add("ips");
+        JON_DEVS.add("jkremser");
+        JON_DEVS.add("jsanda");
+        JON_DEVS.add("jshaughn");
+        JON_DEVS.add("lkrejci");
+        JON_DEVS.add("mazz");
+        JON_DEVS.add("mtho11");
+        JON_DEVS.add("pilhuhn");
+        JON_DEVS.add("spinder");
+        JON_DEVS.add("stefan_n");
+        JON_DEVS.add("tsegismont");
+    }
+
+    private final String server;
+    private final String channel;
+    private String docspaceLogin;
+    private String docspacePassword;
+    private BugzillaConnector bzConnector = new BugzillaConnector();
+    private final Map<Integer, Long> bugLogTimestamps = new HashMap<Integer, \
Long>(); +    private final Map<String, String> names = new HashMap<String, \
String>(); +    private final Pattern commandPattern;
+
+    public RhqIrcBotListener(String server, String channel) {
+        this.server = server;
+        this.channel = channel;
+        StringBuilder commandRegExp = new StringBuilder();
+        commandRegExp.append("(?i)\\").append(Command.PREFIX).append("[ ]*(");
+        for (Command command : Command.values()) {
+            commandRegExp.append(command.name()).append('|');
+        }
+        commandRegExp.deleteCharAt(commandRegExp.length() - 1);
+        commandRegExp.append(')');
+        commandPattern = Pattern.compile(commandRegExp.toString());
+    }
+
+    @Override
+    public void onMessage(MessageEvent<RhqIrcBot> event) throws Exception {
+        PircBotX bot = event.getBot();
+        if (!bot.getNick().equals(bot.getName())) {
+            bot.changeNick(bot.getName());
+        }
+
+        // react to BZs in the messages
+        String message = event.getMessage();
+        Matcher bugMatcher = BUG_PATTERN.matcher(message);
+        while (bugMatcher.find()) {
+            int bugId = Integer.valueOf(bugMatcher.group(2));
+            GetBug getBug = new GetBug(bugId);
+            try {
+                bzConnector.executeMethod(getBug);
+            } catch (Exception e) {
+                bzConnector = new BugzillaConnector();
+                bzConnector.connectTo("https://bugzilla.redhat.com");
+                try {
+                    bzConnector.executeMethod(getBug);
+                } catch (BugzillaException e1) {
+                    //e1.printStackTrace();
+                    Throwable cause = e1.getCause();
+                    String details = (cause instanceof XmlRpcException) ? \
cause.getMessage() : e1.getMessage(); +                    \
bot.sendMessage(event.getChannel(), "Failed to access BZ " + bugId + ": " + details); \
+                    continue; +                }
+            }
+            Bug bug = getBug.getBug();
+            if (bug != null) {
+                String product = bug.getProduct();
+                if (product.equals("RHQ Project")) {
+                    product = "RHQ";
+                } else if (product.equals("JBoss Operations Network")) {
+                    product = "JON";
+                }
+                Long timestamp = bugLogTimestamps.get(bugId);
+                if ((timestamp == null) || ((System.currentTimeMillis() - timestamp) \
> (5 * 60 * 1000L))) { +                    bot.sendMessage(
+                        event.getChannel(),
+                        "BZ " + bugId + " [product=" + product + ", priority=" + \
bug.getPriority() + ", status=" +                            + bug.getStatus() + "] " \
+ bug.getSummary() + " [ https://bugzilla.redhat.com/" + bugId +                      \
+ " ]"); +                }
+                bugLogTimestamps.put(bugId, System.currentTimeMillis());
+            } else {
+                bot.sendMessage(event.getChannel(), "BZ " + bugId + " does not \
exist."); +            }
+        }
+
+        // react to the commit hashs included in the messages
+        Matcher commitMatcher = COMMIT_PATTERN.matcher(message);
+        while (commitMatcher.find()) {
+            String shaHash = commitMatcher.group(2);
+            String response = String.format(COMMIT_LINK, shaHash);
+            bot.sendMessage(event.getChannel(), event.getUser().getNick() + ": " + \
response); +        }
+        
+        // react to commands included in the messages
+        Matcher commandMatcher = commandPattern.matcher(message);
+        while (commandMatcher.find()) {
+            Command command = \
Command.valueOf(commandMatcher.group(1).toUpperCase()); +            String response \
= prepareResponseForCommand(command); +            \
bot.sendMessage(event.getChannel(), event.getUser().getNick() + ": " + response); +   \
} +
+        // ping JON devs
+        if (message.matches(".*\\b(jon-team|jboss-on-team)\\b.*")) {
+            Set<User> users = bot.getUsers(event.getChannel());
+            StringBuilder presentJonDevs = new StringBuilder();
+            for (User user : users) {
+                String nick = user.getNick();
+                if (JON_DEVS.contains(nick) && \
!nick.equals(event.getUser().getNick())) { +                    \
presentJonDevs.append(nick).append(' '); +                }
+            }
+            bot.sendMessage(event.getChannel(), presentJonDevs + ": see message from \
" + event.getUser().getNick() +                + " above");
+        }
+    }
+
+    @Override
+    public void onPrivateMessage(PrivateMessageEvent<RhqIrcBot> privateMessageEvent) \
throws Exception { +        PircBotX bot = privateMessageEvent.getBot();
+        String message = privateMessageEvent.getMessage();
+        Matcher echoMatcher = ECHO_PATTERN.matcher(message);
+        if (echoMatcher.matches()) {
+            String echoMessage = echoMatcher.group(1);
+            bot.sendMessage(this.channel, echoMessage);
+        } else if (message.equalsIgnoreCase(Command.PREFIX + "listrenames")) {
+            //Generate a list of renames in the form of old1 changed to new1, old2 \
changed to new2, etc +            StringBuilder users = new StringBuilder();
+            for (Map.Entry<String, String> curUser : names.entrySet()) {
+                users.append(curUser.getKey()).append(" changed to \
").append(curUser.getValue()).append(", "); +            }
+            String usersString = users.substring(0, users.length() - 3);
+            privateMessageEvent.respond("Renamed users: " + usersString);
+        } else {
+            boolean isCommand = false;
+            // react to commands included in the messages
+            Matcher commandMatcher = commandPattern.matcher(message);
+            while (commandMatcher.find()) {
+                Command command = \
Command.valueOf(commandMatcher.group(1).toUpperCase()); +                String \
response = prepareResponseForCommand(command); +                \
bot.sendMessage(privateMessageEvent.getUser(), response); +            }
+            if (!isCommand) {
+                bot.sendMessage(privateMessageEvent.getUser(), "Hi, I am " + \
bot.getFinger() + ".\n" +                    + \
prepareResponseForCommand(Command.HELP)); +            }
+        }
+    }
+
+    @Override
+    public void onDisconnect(DisconnectEvent<RhqIrcBot> disconnectEvent) throws \
Exception { +        boolean connected = false;
+        while (!connected) {
+            Thread.sleep(60 * 1000L); // 1 minute
+            try {
+                PircBotX newBot = new RhqIrcBot(this);
+                newBot.connect(this.server);
+                newBot.joinChannel(this.channel);
+
+                connected = true;
+            } catch (Exception e) {
+                System.err.println("Failed to reconnect to " + \
disconnectEvent.getBot().getServer() + " IRC server: " +                    + e);
+            }
+        }
+
+        // Try to clean up the old bot, so it can release any memory, sockets, etc. \
it's using. +        PircBotX oldBot = disconnectEvent.getBot();
+        Set<Listener> oldListeners = new \
HashSet<Listener>(oldBot.getListenerManager().getListeners()); +        for (Listener \
oldListener : oldListeners) { +            \
oldBot.getListenerManager().removeListener(oldListener); +        }
+    }
+
+    @Override
+    public void onNickChange(NickChangeEvent<RhqIrcBot> event) throws Exception {
+        //Store the result
+        names.put(event.getOldNick(), event.getNewNick());
+    }
+
+    private String prepareResponseForCommand(Command command) {
+        if (command.staticRespond != null) {
+            String response = command.staticRespond;
+            if (command == Command.HELP) {
+                for (Command com : Command.values()) {
+                    if (com.includeInHelp) {
+                        response += Command.PREFIX + com.toString().toLowerCase() + \
" "; +                    }
+                }
+            }
+            return response;
+        }
+        switch (command) {
+        case SUPPORT:
+            return whoIsOnSupport(SUPPORT_LINK);
+        case PTO:
+            return whoIsOnPto(PTO_LINK);
+        default:
+            System.err.println("Unknown command:" + command);
+            break;
+        }
+        return null;
+    }
+
+    private String whoIsOnSupport(String link) {
+        if (docspaceLogin == null || docspaceLogin.isEmpty() || docspacePassword == \
null || docspacePassword.isEmpty()) { +            return "This command is not \
supported."; +        }
+        String month = monthFormat.format(new Date());
+        String dayInMonth = dayInMonthFormat.format(new Date());
+        int dayInMonthInt = Integer.parseInt(dayInMonth);
+        try {
+            boolean monthFound = false;
+            String login = docspaceLogin + ":" + docspacePassword;
+            String base64login = new String(Base64.encodeBase64(login.getBytes()));
+            Document doc = Jsoup.connect(link).header("Authorization", "Basic " + \
base64login).get(); +            Elements cells = doc.select("tr td");
+            for (Element cell : cells) {
+                String cellText = cell.text().toLowerCase();
+                if (cellText.startsWith(month.toLowerCase())) {
+                    monthFound = true;
+                    if (cellText.substring(cellText.length() - 1, \
cellText.length()).equals(dayInMonth)) { +                        return \
cell.firstElementSibling().text() + " is on support this week"; +                    \
} +                    continue;
+                }
+                if (monthFound && cellText.equals(dayInMonth)) {
+                    return cell.firstElementSibling().text() + " is on support this \
week"; +                } else if (monthFound) {
+                    if (cell.equals(cell.firstElementSibling()) || \
cell.equals(cell.lastElementSibling())) { +                        continue; //the \
first row with name or the last row with a comment +                    }
+                    int day = -1;
+                    try {
+                        day = Integer.parseInt(cellText);
+                        if (day > dayInMonthInt) {
+                            return \
cell.parent().previousElementSibling().child(0).text() + " is on support this week"; \
+                        } +                    } catch (NumberFormatException nfe) {
+                        break; // next month
+                    }
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        // fallback solution if SSL is not set correctly
+        String randomDevel = JON_DEVS.toArray(new String[JON_DEVS.size()])[new \
Random().nextInt(JON_DEVS.size())]; +        return "404 Developer Not Found, \
selecting randomly " + randomDevel + ". Check the " + SUPPORT_LINK; +    }
+    
+    private static String whoIsOnPto(String link) {
+        String month = monthFormat.format(new Date());
+        String dayInMonth = dayInMonthFormat.format(new Date());
+        try {
+            String onPto = "";
+            Document doc = Jsoup.connect(link).ignoreContentType(true).get();
+            Elements dates = doc.getElementsContainingOwnText(dayInMonth + " " + \
month); +            for (Element date : dates) {
+                onPto += date.firstElementSibling().text() + ", ";
+            }
+            if (!onPto.isEmpty()) {
+                return onPto.substring(0, onPto.length() - 2);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return "noone is on PTO today";
+    }
+
+    public void setDocspaceLogin(String docspaceLogin) {
+        this.docspaceLogin = docspaceLogin;
+    }
+
+    public void setDocspacePassword(String docspacePassword) {
+        this.docspacePassword = docspacePassword;
+    }
+}
diff --git a/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/cacerts.jks \
b/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/cacerts.jks new file mode \
100644 index 0000000..3d73cbc
Binary files /dev/null and \
                b/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/cacerts.jks \
                differ
diff --git a/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/rhq-ircbot.properties \
b/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/rhq-ircbot.properties new file \
mode 100644 index 0000000..25e325c
--- /dev/null
+++ b/etc/rhq-ircBot/src/main/resources/org/rhq/etc/ircbot/rhq-ircbot.properties
@@ -0,0 +1,2 @@
+docspace_login=
+docspace_password=


commit 6742d1fda892047e45a0b5cffe9df42957318a54
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Wed May 22 14:12:32 2013 +0200

    Enable paging on (some) endpoints that return lists

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 0038099..8e4a826 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -59,6 +59,8 @@ import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.resource.group.GroupCategory;
 import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
 import org.rhq.enterprise.server.resource.ResourceManagerLocal;
 import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
 import org.rhq.enterprise.server.rest.domain.GroupRest;
@@ -419,6 +421,53 @@ public class AbstractRestBean {
     }
 
     /**
+     * Create the paging headers for collections and attach them to the passed \
builder. Those are represented as +     * <i>Link:</i> http headers that carry the \
URL for the pages and the respective relation. +     * <br/>In addition a \
<i>X-total-size</i> header is created that contains the whole collection size. +     \
* @param builder The ResponseBuilder that receives the headers +     * @param uriInfo \
The uriInfo of the incoming request to build the urls +     * @param resultList The \
collection with its paging information +     */
+    protected void createPagingHeader(final Response.ResponseBuilder builder, final \
UriInfo uriInfo, final PageList<?> resultList) { +
+        UriBuilder uriBuilder;
+
+        PageControl pc = resultList.getPageControl();
+        int page = pc.getPageNumber();
+
+        if (resultList.getTotalSize()> (pc.getPageNumber() +1 ) * pc.getPageSize()) \
{ +            int nextPage = page+1;
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",nextPage);
+
+            builder.header("Link",new Link("next",uriBuilder.build().toString()));
+        }
+
+        if (page>0) {
+            int prevPage = page -1;
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",prevPage);
+            builder.header("Link", new Link("prev",uriBuilder.build().toString()));
+        }
+
+        // A link to the last page
+        if (!pc.isUnlimited()) {
+            int lastPage = resultList.getTotalSize() / pc.getPageSize();
+            uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
?category if needed +            uriBuilder.replaceQueryParam("page",lastPage);
+            builder.header("Link", new Link("last",uriBuilder.build().toString()));
+        }
+
+        // A link to the current page
+        uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and ?category \
if needed +        builder.header("Link", new \
Link("current",uriBuilder.build().toString())); +
+
+        // Create a total size header
+        builder.header("X-collection-size",resultList.getTotalSize());
+    }
+
+    /**
      * Fetch the group with the passed id
      *
      * @param groupId id of the resource group
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 index d203cd3..6ea3d03 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 @@ -77,6 +77,7 @@ import org.rhq.core.domain.criteria.AlertDefinitionCriteria;
 import org.rhq.core.domain.measurement.MeasurementDefinition;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.util.PageList;
 import org.rhq.enterprise.server.RHQConstants;
 import org.rhq.enterprise.server.alert.AlertConditionManagerLocal;
 import org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal;
@@ -143,21 +144,31 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  @GZIP
     @GET
     @Path("/definitions")
-    @ApiOperation("List all Alert Definition")
-    public List<AlertDefinitionRest> listAlertDefinitions(
-            @ApiParam(value = "Page number", defaultValue = "0") @QueryParam("page") \
                int page,
-            @ApiParam(value = "Limit to status, UNUSED AT THE MOMENT ") \
@QueryParam("status") String status, +    @ApiOperation(value = "List all Alert \
Definition", responseClass = "AlertDefinitionRest", multiValueResponse = true) +    \
public Response listAlertDefinitions( +            @ApiParam(value = "Page number") \
@QueryParam("page")  Integer page, +            @ApiParam(value = "Page size") \
@DefaultValue("20") @QueryParam("ps") int pageSize, +            @ApiParam(value = \
"Limit to status, UNUSED AT THE MOMENT ") @QueryParam("status") String status, // \
TODO  @Context UriInfo uriInfo) {
 
         AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
-        criteria.setPaging(page,20); // TODO add link to next page
-        List<AlertDefinition> defs = \
alertDefinitionManager.findAlertDefinitionsByCriteria(caller, criteria); +        if \
(page!=null) { +            criteria.setPaging(page,pageSize);
+        }
+
+        PageList<AlertDefinition> defs = \
                alertDefinitionManager.findAlertDefinitionsByCriteria(caller, \
                criteria);
         List<AlertDefinitionRest> ret = new \
ArrayList<AlertDefinitionRest>(defs.size());  for (AlertDefinition def : defs) {
             AlertDefinitionRest adr = definitionToDomain(def, false, uriInfo);
             ret.add(adr);
         }
-        return ret;
+
+        Response.ResponseBuilder builder = Response.ok(ret);
+        createPagingHeader(builder,uriInfo,defs);
+
+        // TODO media type etc
+
+        return builder.build();
     }
 
     @GET
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 index 4c80bd1..5da3fb9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 @@ -90,10 +90,10 @@ public class AlertHandlerBean extends AbstractRestBean {
     @ApiErrors({
         @ApiError(code = 406, reason = "There are 'resourceId' and 'definitionId' \
passed as query parameters"),  @ApiError(code = 406, reason = "Page size was 0"),
-        @ApiError(code = 406, reason = "Page number was < 1")
+        @ApiError(code = 406, reason = "Page number was < 0")
     })
     public Response listAlerts(
-        @ApiParam(value = "Page number") @QueryParam("page") @DefaultValue("1") int \
page, +        @ApiParam(value = "Page number") @QueryParam("page") \
                @DefaultValue("0") int page,
         @ApiParam(value = "Page size; use -1 for 'unlimited'") @QueryParam("size") \
                @DefaultValue("100")int size,
         @ApiParam(value = "Limit to priority", allowableValues = "High, Medium, Low, \
                All") @DefaultValue("All") @QueryParam("prio") String prio,
         @ApiParam(value = "Should full resources and definitions be sent") \
@QueryParam("slim") @DefaultValue("false") boolean slim, @@ -108,7 +108,7 @@ public \
class AlertHandlerBean extends AbstractRestBean {  if (size==0) {
             throw new BadArgumentException("size","Must not be 0");
         }
-        if (page<1) {
+        if (page<0) {
             throw new BadArgumentException("page","Must be >=1");
         }
 
@@ -120,7 +120,7 @@ public class AlertHandlerBean extends AbstractRestBean {
             criteria.setPageControl(pageControl);
         }
         else {
-            criteria.setPaging(page-1, size); // TODO implement linking to next page
+            criteria.setPaging(page, size);
         }
 
         if (since!=null) {
@@ -157,6 +157,8 @@ public class AlertHandlerBean extends AbstractRestBean {
             builder = Response.ok(entity);
         }
 
+        createPagingHeader(builder,uriInfo,alerts);
+
         return builder.build();
     }
 
@@ -306,7 +308,7 @@ public class AlertHandlerBean extends AbstractRestBean {
 
     @DELETE
     @Path("/{id}")
-    @ApiOperation(value = "Remove the alert from the lit of alerts")
+    @ApiOperation(value = "Remove the alert from the list of alerts")
     public void purgeAlert(@ApiParam(value = "Id of the alert to remove") \
@PathParam("id") int id) {  alertManager.deleteAlerts(caller, new int[]{id});
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 index becb680..7402550 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java
 @@ -32,6 +32,7 @@ import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
 import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
@@ -44,6 +45,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Request;
 import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
 
 import com.wordnik.swagger.annotations.Api;
 import com.wordnik.swagger.annotations.ApiError;
@@ -61,6 +63,7 @@ import org.rhq.core.domain.event.EventSource;
 import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
 import org.rhq.enterprise.server.RHQConstants;
 import org.rhq.enterprise.server.event.EventManagerLocal;
 import org.rhq.enterprise.server.rest.domain.EventDefinitionRest;
@@ -227,9 +230,19 @@ public class EventHandlerBean extends AbstractRestBean {
                                        @QueryParam("endTime")  long endTime,
                                        @ApiParam(value="Select the severity to \
                display. Default is to show all",
                                                                        \
allowableValues = "DEBUG, INFO, WARN, ERROR, FATAL") @QueryParam("severity") String \
                severity,
-                                       @Context Request request,
+                                       @ApiParam("Page size for paging") \
@QueryParam("ps") @DefaultValue("20") int pageSize, +                                 \
@ApiParam("Page for paging, 0-based") @QueryParam("page") Integer page, +             \
@Context UriInfo uriInfo,  @Context HttpHeaders headers) {
 
+        if (severity!=null) {
+            try {
+                EventSeverity.valueOf(severity.toUpperCase());
+            } catch (Exception e) {
+                throw new BadArgumentException("severity",severity + " is bad. \
Allowed values are DEBUG, INFO, WARN, ERROR, FATAL"); +            }
+        }
+
         EventSource source = findEventSourceById(sourceId);
 
         EventCriteria criteria = new EventCriteria();
@@ -240,13 +253,19 @@ public class EventHandlerBean extends AbstractRestBean {
         if (endTime>0) {
             criteria.addFilterEndTime(endTime);
         }
-        if (startTime==0 && endTime==0) {
+        if (page!=null) {
+            criteria.setPaging(page,pageSize);
+        }
+        else if (startTime==0 && endTime==0) {
             PageControl pageControl = new PageControl();
             pageControl.setPageSize(200);
             criteria.setPageControl(pageControl);
         }
+        if (severity!=null) {
+            criteria.addFilterSeverities(EventSeverity.valueOf(severity.toUpperCase()));
 +        }
 
-        Response.ResponseBuilder builder = getEventsAsBuilderForCriteria(headers, \
criteria); +        Response.ResponseBuilder builder = \
getEventsAsBuilderForCriteria(headers, criteria, uriInfo);  
         return builder.build();
     }
@@ -259,10 +278,21 @@ public class EventHandlerBean extends AbstractRestBean {
     public Response getEventsForResource(@PathParam("id")  int resourceId,
                                          @QueryParam("startTime") long startTime,
                                          @QueryParam("endTime")  long endTime,
-                                         @QueryParam("severity") String severity,
-                                         @Context Request request,
+                                         @ApiParam("Page size for paging") \
@QueryParam("ps") @DefaultValue("20") int pageSize, +                                 \
@ApiParam("Page for paging, 0-based") @QueryParam("page") Integer page, +             \
@ApiParam(value="Select the severity to display. Default is to show all", +           \
allowableValues = "DEBUG, INFO, WARN, ERROR, FATAL") @QueryParam("severity") String \
severity, +                                         @Context UriInfo uriInfo,
                                          @Context HttpHeaders headers) {
 
+        if (severity!=null) {
+            try {
+                EventSeverity.valueOf(severity.toUpperCase());
+            } catch (Exception e) {
+                throw new BadArgumentException("severity",severity + " is bad. \
Allowed values are DEBUG, INFO, WARN, ERROR, FATAL"); +            }
+        }
+
         EventCriteria criteria = new EventCriteria();
         criteria.addFilterResourceId(resourceId);
         if (startTime>0) {
@@ -271,13 +301,19 @@ public class EventHandlerBean extends AbstractRestBean {
         if (endTime>0) {
             criteria.addFilterEndTime(endTime);
         }
-        if (startTime==0 && endTime==0) {
+        if (page!=null) {
+            criteria.setPaging(page,pageSize);
+        }
+        else if (startTime==0 && endTime==0) {
             PageControl pageControl = new PageControl();
             pageControl.setPageSize(200);
             criteria.setPageControl(pageControl);
         }
+        if (severity!=null) {
+            criteria.addFilterSeverities(EventSeverity.valueOf(severity.toUpperCase()));
 +        }
 
-        Response.ResponseBuilder builder = getEventsAsBuilderForCriteria(headers, \
criteria); +        Response.ResponseBuilder builder = \
getEventsAsBuilderForCriteria(headers, criteria, uriInfo);  
         return builder.build();
 
@@ -304,8 +340,8 @@ public class EventHandlerBean extends AbstractRestBean {
     }
 
 
-    private Response.ResponseBuilder getEventsAsBuilderForCriteria(HttpHeaders \
                headers, EventCriteria criteria) {
-        List<Event> eventList = eventManager.findEventsByCriteria(caller, criteria);
+    private Response.ResponseBuilder getEventsAsBuilderForCriteria(HttpHeaders \
headers, EventCriteria criteria, UriInfo uriInfo) { +        PageList<Event> \
                eventList = eventManager.findEventsByCriteria(caller, criteria);
         List<EventRest> restEvents = new ArrayList<EventRest>(eventList.size());
         for (Event event : eventList) {
             restEvents.add(convertEvent(event));
@@ -320,6 +356,9 @@ public class EventHandlerBean extends AbstractRestBean {
         else {
             builder = Response.ok(restEvents, mediaType);
         }
+
+        createPagingHeader(builder,uriInfo,eventList);
+
         return builder;
     }
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 index 6791bdf..be2419b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/GroupHandlerBean.java
 @@ -116,12 +116,17 @@ public class GroupHandlerBean extends AbstractRestBean  {
     @Path("/")
     @ApiOperation(value = "List all groups", multiValueResponse = true, \
                responseClass = "GroupRest")
     public Response getGroups(@ApiParam("String to search in the group name") \
@QueryParam("q") String q, +                              @ApiParam("Page size for \
paging") @QueryParam("ps") @DefaultValue("20") int pageSize, +                        \
                @ApiParam("Page for paging, 0-based") @QueryParam("page") Integer \
                page,
                               @Context HttpHeaders headers, @Context UriInfo \
uriInfo) {  
         ResourceGroupCriteria criteria = new ResourceGroupCriteria();
         if (q!=null) {
             criteria.addFilterName(q);
         }
+        if (page!=null) {
+            criteria.setPaging(page,pageSize);
+        }
 
         PageList<ResourceGroup> groups = \
resourceGroupManager.findResourceGroupsByCriteria(caller, criteria);  
@@ -142,6 +147,8 @@ public class GroupHandlerBean extends AbstractRestBean  {
             builder.entity(ret);
         }
 
+        createPagingHeader(builder,uriInfo,groups);
+
         return builder.build();
 
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 index 8bc2cb9..e32ea03 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 @@ -29,6 +29,7 @@ import javax.ejb.Stateless;
 import javax.interceptor.Interceptors;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
@@ -353,7 +354,6 @@ public class OperationsHandlerBean extends AbstractRestBean  {
     public Response outcome(
             @ApiParam("Name of the submitted job.") @PathParam("id") String jobName,
             @Context UriInfo uriInfo,
-            @Context Request request,
             @Context HttpHeaders httpHeaders) {
 
         MediaType mediaType = httpHeaders.getAcceptableMediaTypes().get(0);
@@ -395,21 +395,26 @@ public class OperationsHandlerBean extends AbstractRestBean  {
     @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML})
  public Response listHistory(
             @ApiParam("Id of a resource to limit to") @QueryParam("resourceId") int \
resourceId, +            @ApiParam("Page size for paging") @QueryParam("ps") \
@DefaultValue("20") int pageSize, +            @ApiParam("Page for paging, 0-based") \
@QueryParam("page") Integer page,  @Context UriInfo uriInfo,
-            @Context Request request,
             @Context HttpHeaders httpHeaders) {
 
         ResourceOperationHistoryCriteria criteria = new \
ResourceOperationHistoryCriteria();  if (resourceId>0) {
             criteria.addFilterResourceIds(resourceId);
         }
+        if (page!=null) {
+            criteria.setPaging(page,pageSize);
+            criteria.addSortStartTime(PageOrdering.ASC);
+        }
 
         criteria.addSortEndTime(PageOrdering.DESC);
 
-        PageList<ResourceOperationHistory> list = \
opsManager.findResourceOperationHistoriesByCriteria(caller, criteria); +        \
PageList<ResourceOperationHistory> histories = \
opsManager.findResourceOperationHistoriesByCriteria(caller, criteria);  
         List<OperationHistoryRest> result = new ArrayList<OperationHistoryRest>();
-        for (ResourceOperationHistory roh : list) {
+        for (ResourceOperationHistory roh : histories) {
             OperationHistoryRest historyRest = historyToHistoryRest(roh,uriInfo);
             result.add(historyRest);
         }
@@ -422,6 +427,9 @@ public class OperationsHandlerBean extends AbstractRestBean  {
             GenericEntity<List<OperationHistoryRest>> res = new \
GenericEntity<List<OperationHistoryRest>>(result) {};  builder = Response.ok(res);
         }
+
+        createPagingHeader(builder,uriInfo,histories);
+
         return builder.build();
     }
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 70cc588..a783ac8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -211,7 +211,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
         }
         PageList<Resource> ret = resMgr.findResourcesByCriteria(caller,criteria);
 
-        Response.ResponseBuilder builder = \
getResponseBuilderForResourceList(headers,uriInfo,ret, page, pageSize); +        \
Response.ResponseBuilder builder = \
getResponseBuilderForResourceList(headers,uriInfo,ret);  
         return builder.build();
     }
@@ -221,13 +221,22 @@ public class ResourceHandlerBean extends AbstractRestBean {
     @Path("/platforms")
     @Cache(isPrivate = true,maxAge = 300)
     @ApiOperation(value = "List all platforms in the system", multiValueResponse = \
                true, responseClass = "ResourceWithType")
-    public Response getPlatforms(@Context HttpHeaders headers,
-                                 @Context UriInfo uriInfo) {
+    public Response getPlatforms(
+        @ApiParam("Page size for paging") @QueryParam("ps") @DefaultValue("20") int \
pageSize, +        @ApiParam("Page for paging, 0-based") @QueryParam("page") Integer \
page, +        @Context HttpHeaders headers, @Context UriInfo uriInfo) {
+
+        PageControl pc;
+        if (page!=null) {
+            pc = new PageControl(page,pageSize);
+        }
+        else {
+            pc = PageControl.getUnlimitedInstance();
+        }
 
-        PageControl pc = new PageControl();
         PageList<Resource> ret = resMgr.findResourcesByCategory(caller, \
ResourceCategory.PLATFORM,  InventoryStatus.COMMITTED, pc);
-        Response.ResponseBuilder builder = \
getResponseBuilderForResourceList(headers, uriInfo, ret, null, 20); +        \
Response.ResponseBuilder builder = getResponseBuilderForResourceList(headers, \
uriInfo, ret);  
         return builder.build();
     }
@@ -239,13 +248,10 @@ public class ResourceHandlerBean extends AbstractRestBean {
      * @param headers HttpHeaders from the request
      * @param uriInfo Uri from the request
      * @param resources List of resources
-     * @param page Page of pageSize. If null, paging is ignored
-     * @param pageSize number of elements on a page
      * @return An initialized ResponseBuilder
      */
     private Response.ResponseBuilder getResponseBuilderForResourceList(HttpHeaders \
                headers, UriInfo uriInfo,
-                                                                       \
                PageList<Resource> resources, Integer page,
-                                                                       int pageSize) \
{ +                                                                       \
                PageList<Resource> resources) {
         List<ResourceWithType> rwtList = new \
ArrayList<ResourceWithType>(resources.size());  for (Resource r : resources) {
             putToCache(r.getId(), Resource.class, r);
@@ -256,25 +262,8 @@ public class ResourceHandlerBean extends AbstractRestBean {
         MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
         Response.ResponseBuilder builder = Response.ok();
         builder.type(mediaType);
-        UriBuilder uriBuilder;
-        if (page!=null) {
 
-            // TODO look a the page control and check if there is a next page at all
-            if (resources.getTotalSize()> page*pageSize) {
-                int nextPage = page+1;
-                uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
                ?category if needed
-                uriBuilder.replaceQueryParam("page",nextPage);
-
-                builder.header("Link",new \
                Link("next",uriBuilder.build().toString()));
-            }
-
-            if (page>1) {
-                int prevPage = page -1;
-                uriBuilder = uriInfo.getRequestUriBuilder(); // adds ?q, ?ps and \
                ?category if needed
-                uriBuilder.replaceQueryParam("page",prevPage);
-                builder.header("prev",uriBuilder.build().toString());
-            }
-        }
+        createPagingHeader(builder,uriInfo,resources);
 
         if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
             builder.entity(renderTemplate("listResourceWithType", rwtList));
@@ -294,7 +283,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
     @ApiError(code = 404, reason = NO_RESOURCE_FOR_ID)
     public ResourceWithChildren getHierarchy(@ApiParam("Id of the resource to start \
with") @PathParam("id")int baseResourceId) {  // TODO optimize to do less recursion
-        Resource start = obtainResource(baseResourceId);
+        Resource start = fetchResource(baseResourceId);
         return getHierarchy(start);
     }
 
@@ -425,7 +414,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
         if (avail.getResourceId() != resourceId)
             throw new IllegalArgumentException("Resource Ids do not match");
 
-        Resource resource = obtainResource(resourceId);
+        Resource resource = fetchResource(resourceId);
 
         AvailabilityType at;
         at = AvailabilityType.valueOf(avail.getType());
@@ -541,15 +530,6 @@ public class ResourceHandlerBean extends AbstractRestBean {
 
     }
 
-    private Resource obtainResource(int resourceId) {
-        Resource resource = resMgr.getResource(caller, resourceId);
-        if (resource == null) {
-            resource = resMgr.getResource(caller, resourceId);
-            if (resource != null)
-                putToCache(resourceId, Resource.class, resource);
-        }
-        return resource;
-    }
 
     @GZIP
     @AddLinks
@@ -565,7 +545,7 @@ public class ResourceHandlerBean extends AbstractRestBean {
 
         criteria.addFilterResourceIds(resourceId);
 
-        List<Alert> alerts = alertManager.findAlertsByCriteria(caller, criteria);
+        PageList<Alert> alerts = alertManager.findAlertsByCriteria(caller, \
criteria);  List<Link> links = new ArrayList<Link>(alerts.size());
         for (Alert al : alerts) {
             Link link = new Link();
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java \
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 index 3a7e961..7e20630 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
                
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 @@ -703,7 +703,7 @@ public class ConfigurationHelperTest {
 
     }
 
-    @Test(enabled = false)
+    @Test
     public void testConfigToMapComplexMapWithBadSetupLenient() throws Exception {
 
         Configuration config = new Configuration();
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 index fca0f50..e02a723 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 @@ -23,6 +23,7 @@ import com.jayway.restassured.http.ContentType;
 import com.jayway.restassured.path.xml.XmlPath;
 import com.jayway.restassured.response.Response;
 
+import org.hamcrest.Matchers;
 import org.junit.Test;
 
 import org.rhq.modules.integrationTests.restApi.d.AlertCondition;
@@ -34,7 +35,10 @@ import org.rhq.modules.integrationTests.restApi.d.Group;
 import static com.jayway.restassured.RestAssured.delete;
 import static com.jayway.restassured.RestAssured.expect;
 import static com.jayway.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.anyOf;
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.emptyIterable;
 import static org.hamcrest.Matchers.instanceOf;
@@ -54,6 +58,7 @@ public class AlertTest extends AbstractBase {
             .header(acceptJson)
         .expect()
             .statusCode(200)
+            .log().ifError()
         .when()
             .get("/alert");
 
@@ -66,6 +71,7 @@ public class AlertTest extends AbstractBase {
             .header(acceptXml)
         .expect()
             .statusCode(200)
+            .log().ifError()
         .when()
             .get("/alert");
     }
@@ -95,6 +101,23 @@ public class AlertTest extends AbstractBase {
     }
 
     @Test
+    public void testListAlertsWithPaging() throws Exception {
+
+        given()
+            .header(acceptJson)
+            .queryParam("ps", 2)
+            .queryParam("page", 0)
+        .expect()
+            .statusCode(200)
+            .header("Link", anyOf(containsString("current"), \
Matchers.containsString("last"))) +            .header("X-collection-size", \
notNullValue()) +            .log().ifError()
+        .when()
+            .get("/alert");
+    }
+
+
+    @Test
     public void testGetAlertCountJson() throws Exception {
 
         given()
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
 index 2e74181..40ae7b0 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/EventTest.java
 @@ -23,13 +23,17 @@ import java.util.List;
 import java.util.Map;
 
 import com.jayway.restassured.http.ContentType;
+import com.jayway.restassured.response.Headers;
 import com.jayway.restassured.response.Response;
 
+import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 
 import org.rhq.modules.integrationTests.restApi.d.Event;
 import org.rhq.modules.integrationTests.restApi.d.EventSource;
 
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.not;
 import static com.jayway.restassured.RestAssured.given;
 
 /**
@@ -261,6 +265,131 @@ public class EventTest extends AbstractBase {
     }
 
     @Test
+    public void testAddGetEventOnSourceWithPaging() throws Exception {
+
+        EventSource es = new EventSource();
+        es.setResourceId(_platformId);
+        es.setName("Event Log"); // Name of the event definition
+        es.setLocation("-x-test-location");
+
+        Response response =
+        given()
+            .header(acceptJson)
+            .contentType(ContentType.JSON)
+            .pathParam("id",_platformId)
+            .body(es)
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+        .when()
+            .post("/event/{id}/sources");
+
+        EventSource eventSource = response.as(EventSource.class);
+
+        long now = System.currentTimeMillis();
+        try {
+
+            // Add an event
+            Event event = new Event(eventSource.getId(),now,"Li la lu 1:->");
+            Event event1 = new Event(eventSource.getId(),now,"Li la lu 2:->");
+            Event event2 = new Event(eventSource.getId(),now,"Li la lu 3:->");
+            Event event3 = new Event(eventSource.getId(),now,"Li la lu 4:->");
+            List<Event> events = new ArrayList<Event>(4);
+            events.add(event);
+            events.add(event1);
+            events.add(event2);
+            events.add(event3);
+
+            given()
+                .header(acceptJson)
+                .contentType(ContentType.JSON)
+                .pathParam("id",eventSource.getId())
+                .body(events)
+            .expect()
+                .statusCode(204) // no content returned
+                .log().ifError()
+            .when()
+                .post("/event/source/{id}/events");
+
+
+            // and retrieve it again from the event source
+            response =
+            given()
+                .header(acceptJson)
+                .pathParam("id", eventSource.getId())
+                .queryParam("startTime",now - 10)
+                .queryParam("endTime",now + 10)
+            .expect()
+                .statusCode(200)
+                .log().ifError()
+                .header("X-collection-size", CoreMatchers.is("4"))
+            .when()
+                .get("/event/source/{id}/events");
+            List list = response.as(List.class);
+            assert list.size()>0;
+
+            // Get the list of events from the resource
+            response =
+            given()
+                .header(acceptJson)
+                .pathParam("id", _platformId)
+                .queryParam("startTime",now - 10)
+                .queryParam("endTime",now + 10)
+                .queryParam("page",0)
+                .queryParam("ps",2)
+            .expect()
+                .statusCode(200)
+                .log().ifError()
+                .header("X-collection-size", CoreMatchers.is("4"))
+                .header("Link",not(containsString("prev")))
+            .when()
+                .get("/event/{id}/events");
+            list = response.as(List.class);
+            assert list.size()==2;
+
+            response =
+            given()
+                .header(acceptJson)
+                .pathParam("id", _platformId)
+                .queryParam("startTime",now - 10)
+                .queryParam("endTime",now + 10)
+                .queryParam("page",1)
+                .queryParam("ps",2)
+            .expect()
+                .statusCode(200)
+                .log().ifError()
+                .header("X-collection-size", CoreMatchers.is("4"))
+                .header("Link",not(containsString("next")))
+            .when()
+                .get("/event/{id}/events");
+
+            Headers headers = response.getHeaders();
+            int found = 0;
+            for (String link: headers.getValues("Link")) {
+                if (link.contains("rel='last'"))
+                    found++;
+                if (link.contains("rel='prev'"))
+                    found++;
+                if (link.contains("rel='current'"))
+                    found++;
+                assert !link.contains("rel='next");
+            }
+            assert found == 3;
+
+        }
+        finally {
+
+            // Delete the source again
+            given()
+                .pathParam("id", eventSource.getId())
+            .expect()
+                .statusCode(204)
+            .when()
+                .delete("/event/source/{id}");
+        }
+    }
+
+    @Test
     public void testDeleteUnknownSource() throws Exception {
             given()
                 .pathParam("id", 123)
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
 index 05bae96..a4ef048 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/GroupTest.java
 @@ -74,6 +74,17 @@ public class GroupTest extends AbstractBase {
     }
 
     @Test
+    public void testGetGroupsWithPaging() throws Exception {
+        given()
+            .queryParam("page",0)
+            .queryParam("ps",2)
+        .expect()
+            .statusCode(200)
+        .when()
+            .get("/group");
+    }
+
+    @Test
     public void testGetGroupsQuery() throws Exception {
         given()
                 .queryParam("q","lala")
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index 23480a0..b66d9b5 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -44,6 +44,8 @@ import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.Matchers.anyOf;
+import static org.hamcrest.Matchers.not;
 
 /**
  * Test the resources part
@@ -242,7 +244,7 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
-    public void testPaging() throws Exception {
+    public void testGetResourcesWithPaging() throws Exception {
 
         given()
             .header("Accept", "application/json")
@@ -252,12 +254,31 @@ public class ResourcesTest extends AbstractBase {
             .queryParam("category", "service")
         .expect()
             .statusCode(200)
-            .header("Link", containsString("page=2"))
+            .log().everything()
+           // .header("Link", allOf(containsString("page=2"), \
containsString("current"))) +            .header("Link",not(containsString("prev")))
             .body("links.self", notNullValue())
         .when().get("/resource");
     }
 
     @Test
+    public void testGetPlatformsWithPaging() throws Exception {
+
+        given()
+            .header("Accept", "application/json")
+        .with()
+            .queryParam("page", 0)
+            .queryParam("ps", 5)
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+            .body("links.self", notNullValue())
+            .header("Link", not(containsString("prev=")))
+            .header("Link", anyOf(containsString("current"),containsString("last")))
+        .when().get("/resource/platforms");
+    }
+
+    @Test
     public void testGetPlatformXml() {
 
         assert _platformId!=0 : "Setup did not run or was no success";


commit e5d22cac1559f8f2dc699d3ebe3f54d0abf74a1a
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Tue May 21 22:10:26 2013 +0200

    BZ 962853 - make getRresourceId return an int instead of a string.

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
 index 703e897..8273737 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
 @@ -25,19 +25,11 @@ package org.rhq.enterprise.server.rest.domain;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlID;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import com.wordnik.swagger.annotations.ApiClass;
 import com.wordnik.swagger.annotations.ApiProperty;
 
-import org.jboss.resteasy.spi.touri.URITemplate;
-
 /**
  * A (partial) resource with some type information
  * @author Heiko W. Rupp
@@ -69,7 +61,6 @@ public class ResourceWithType {
     }
 
     @ApiProperty("Name of the resource")
-    @XmlElement
     public String getResourceName() {
         return resourceName;
     }
@@ -79,17 +70,15 @@ public class ResourceWithType {
     }
 
     @ApiProperty("ID of the resource")
-    @XmlID
-    public String getResourceId() {
-        return String.valueOf(resourceId);
+    public int getResourceId() {
+        return resourceId;
     }
 
     public void setResourceId(int resourceId) {
         this.resourceId = resourceId;
     }
 
-    @ApiProperty("Name of the resource type of teh resource")
-    @XmlElement
+    @ApiProperty("Name of the resource type of the resource")
     public String getTypeName() {
         return typeName;
     }
@@ -99,7 +88,6 @@ public class ResourceWithType {
     }
 
     @ApiProperty("Id of the resource type of the resource")
-    @XmlElement
     public Integer getTypeId() {
         return typeId;
     }
@@ -109,7 +97,6 @@ public class ResourceWithType {
     }
 
     @ApiProperty("Name of the plugin defining the resource type")
-    @XmlElement
     public String getPluginName() {
         return pluginName;
     }
@@ -136,7 +123,6 @@ public class ResourceWithType {
         this.status = status;
     }
 
-    @XmlElementRef
     public List<Link> getLinks() {
         return links;
     }
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
 index 9f6a02b..ae4e81d 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AbstractBase.java
 @@ -98,8 +98,7 @@ public abstract class AbstractBase {
 
         if (res!=null && res.get(0)!=null) {
 
-            String tmp = ((Map <String,String>)res.get(0)).get("resourceId");
-            int pid =Integer.valueOf(tmp);
+            Integer pid  = ((Map <String,Integer>)res.get(0)).get("resourceId");
 
             given()
                 .pathParam("id", pid)
@@ -125,9 +124,9 @@ public abstract class AbstractBase {
         assert res != null;
         for (Object entry : res) {
             if (entry instanceof Map) {
-                Map<String,String> map = (Map<String, String>) entry;
+                Map<String,Object> map = (Map<String, Object>) entry;
                 if (!map.get("resourceName").equals(REST_TEST_DUMMY)) {
-                    return Integer.valueOf(map.get("resourceId"));
+                    return (Integer)map.get("resourceId");
                 }
             }
         }
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 index 7e3f45a..3515fac 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 @@ -30,6 +30,7 @@ import com.jayway.restassured.response.Response;
 import org.junit.Test;
 
 import org.rhq.modules.integrationTests.restApi.d.CreateCBRRequest;
+import org.rhq.modules.integrationTests.restApi.d.Resource;
 
 import static com.jayway.restassured.RestAssured.given;
 import static org.hamcrest.Matchers.*;
@@ -41,6 +42,8 @@ import static org.hamcrest.Matchers.isOneOf;
  */
 public class ContentTest extends AbstractBase {
 
+    private static final String DEPLOYED_WAR_NAME = "test-simple.war";
+
     @Test
     public void testUpload() throws Exception {
 
@@ -144,6 +147,8 @@ public class ContentTest extends AbstractBase {
     @Test
     public void testCreatePackageBasedResource() throws Exception {
 
+        wipeWarArchiveIfNecessary();
+
         InputStream in =
             getClass().getClassLoader().getResourceAsStream("test-simple.war");
 
@@ -187,7 +192,7 @@ public class ContentTest extends AbstractBase {
 
         assert resources.size()>0;
 
-        int as7Id = Integer.valueOf((String)resources.get(0).get("resourceId"));
+        int as7Id = (Integer)resources.get(0).get("resourceId");
         int createdResourceId=-1;
 
         // create child of eap6 as deployment
@@ -203,7 +208,7 @@ public class ContentTest extends AbstractBase {
 
             // set plugin config (path) and deploy config (runtime-name)
             resource.getPluginConfig().put("path","deployment");
-            resource.getResourceConfig().put("runtimeName","test-simple.war");
+            resource.getResourceConfig().put("runtimeName", DEPLOYED_WAR_NAME);
 
             Response response =
             given()
@@ -285,6 +290,34 @@ public class ContentTest extends AbstractBase {
 
     }
 
+
+    private void wipeWarArchiveIfNecessary() {
+
+        @SuppressWarnings("unchecked")
+        List<Resource> resources =
+        given()
+            .queryParam("q",DEPLOYED_WAR_NAME)
+            .queryParam("category", "SERVICE")
+            .header(acceptJson)
+        .expect()
+            .log().everything()
+        .when()
+            .get("/resource")
+        .as(List.class);
+
+        if (resources!=null && resources.size()>0) {
+            int resourceId = resources.get(0).getResourceId();
+
+            given()
+                .pathParam("id", resourceId)
+                .queryParam("physical", "true") // Also remove target on the EAP \
instance +            .expect()
+                .statusCode(200)
+            .when()
+                .delete("/resource/{id}");
+        }
+    }
+
     @Test
     public void testCreateCBRBadHandle() throws Exception {
 
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index cc9558b..23480a0 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -69,8 +69,11 @@ public class ResourcesTest extends AbstractBase {
         .expect()
             .statusCode(200)
             .contentType(ContentType.JSON)
-            .log().ifError()
+            .log().everything()
             .body("links.self", notNullValue())
+            .body("resourceId",is(_platformId))
+            .body("typeId",is(_platformTypeId))
+            .body("parentId",is(0))
         .when()
             .get("/resource/{id}");
 
@@ -101,9 +104,9 @@ public class ResourcesTest extends AbstractBase {
             .log().everything()
         .expect()
             .statusCode(200)
-            .body("id",is(typeId))
-            .body("name",is("Linux"))
-            .body("pluginName",is("Platforms"))
+            .body("id", is(typeId))
+            .body("name", is("Linux"))
+            .body("pluginName", is("Platforms"))
             .log().everything()
         .when()
             .get("/resource/type/{typeId}");
@@ -187,7 +190,7 @@ public class ResourcesTest extends AbstractBase {
         given()
             .header("Accept", "application/json")
         .with()
-            .queryParam("status","NeW")
+            .queryParam("status", "NeW")
         .expect()
             .statusCode(200)
         .when()
@@ -203,7 +206,7 @@ public class ResourcesTest extends AbstractBase {
             .header("Accept", "application/json")
         .with()
             .queryParam("q", platformName)
-            .queryParam("status","Frobnitz")
+            .queryParam("status", "Frobnitz")
             .queryParam("category", "platform")
         .expect()
             .statusCode(406)
@@ -322,6 +325,26 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testCreatePlatformJson() throws Exception {
+
+        Resource resource = new Resource();
+        resource.setResourceName("dummy-test");
+        resource.setTypeName("Linux");
+
+        given()
+            .header(acceptJson)
+            .contentType(ContentType.JSON)
+            .body(resource)
+        .expect()
+            .statusCode(201)
+            .log().everything()
+            .body("resourceId",instanceOf(Number.class))
+        .when()
+            .post("/resource/platforms");
+
+    }
+
+    @Test
     public void testCreatePlatformWithBadType() throws Exception {
 
         Resource resource = new Resource();
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/UserTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/UserTest.java
 index ea78d09..e7e1b9e 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/UserTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/UserTest.java
 @@ -94,7 +94,7 @@ public class UserTest extends AbstractBase {
             .when()
                 .get("/user/favorites/resource");
             JsonPath jp = r.jsonPath();
-            assert jp.getList("resourceId").contains(String.valueOf(_platformId));
+            assert jp.getList("resourceId").contains(_platformId);
         }
         finally {
             given()
@@ -131,7 +131,7 @@ public class UserTest extends AbstractBase {
             .when()
                 .get("/user/favorites/resource");
             JsonPath jp = r.jsonPath();
-            assert jp.getList("resourceId").contains(String.valueOf(_platformId));
+            assert jp.getList("resourceId").contains(_platformId);
         }
         finally {
             given()


commit ec4f0228529bf490d44fc3be5407080f9360ef6c
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Tue May 21 21:45:23 2013 +0200

    Print the failing class along with the failed field.

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 index d7cc470..867ea16 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 @@ -67,8 +67,8 @@ public final class CriteriaQueryGenerator {
     private static final Log LOG = LogFactory.getLog(CriteriaQueryGenerator.class);
 
     public enum AuthorizationTokenType {
-        RESOURCE, // specifies the resource alias to join on for standard \
                res-group-role-subject authorization checking 
-        GROUP; // specifies the group alias to join on for standard \
group-role-subject authorization checking  +        RESOURCE, // specifies the \
resource alias to join on for standard res-group-role-subject authorization checking \
+        GROUP; // specifies the group alias to join on for standard \
group-role-subject authorization checking  }
 
     private Criteria criteria;
@@ -333,8 +333,8 @@ public final class CriteriaQueryGenerator {
         results.append("FROM ").append(className).append(' \
').append(alias).append(NL);  
         if (countQuery == false) {
-            /* 
-             * don't fetch in the count query to avoid: "query specified join \
fetching,  +            /*
+             * don't fetch in the count query to avoid: "query specified join \
                fetching,
              * but the owner of the fetched association was not present in the \
                select list"
              */
             for (String fetchField : getFetchFields(criteria)) {
@@ -383,7 +383,7 @@ public final class CriteriaQueryGenerator {
 
             /*
              * do not prefix the alias when:
-             * 
+             *
              *    1) if the suffix is numerical, which allows us to sort by column \
                ordinal
              *    2) if the user wants full control and has explicitly chosen to \
                disable alias prepending
              */
@@ -655,7 +655,7 @@ public final class CriteriaQueryGenerator {
         } catch (RuntimeException re) {
             LOG.error("Could not get JPQL translation for '" + searchExpression + \
"': "  + ThrowableUtil.getAllMessages(re, true));
-            throw re; // don't wrap exceptions that are already RuntimeExceptions in \
another RuntimeException  +            throw re; // don't wrap exceptions that are \
already RuntimeExceptions in another RuntimeException  } catch (Exception e) {
             LOG.error("Could not get JPQL translation for '" + searchExpression + \
"': "  + ThrowableUtil.getAllMessages(e, true));
@@ -694,7 +694,7 @@ public final class CriteriaQueryGenerator {
             Field field = criteria.getPersistentClass().getDeclaredField(fieldName);
             persistentBagFields.add(field);
         } catch (NoSuchFieldException e) {
-            LOG.warn("Failed to add persistent bag collection.", e);
+            LOG.warn("Failed to add persistent bag collection on class [" + \
criteria.getPersistentClass().getName() +"]: ", e);  }
     }
 
@@ -703,7 +703,7 @@ public final class CriteriaQueryGenerator {
             Field field = criteria.getPersistentClass().getDeclaredField(fieldName);
             joinFetchFields.add(field);
         } catch (NoSuchFieldException e) {
-            LOG.warn("Failed to add join fetch field.", e);
+            LOG.warn("Failed to add join fetch field on class [" + \
criteria.getPersistentClass().getName() + "]: ", e);  }
     }
 
@@ -741,7 +741,7 @@ public final class CriteriaQueryGenerator {
 
     /**
      * The groupBy clause can be set if and only if the projection is altered.  The \
                passed argument should not be
-     * prefixed with 'group by'; that part of the query will be auto-generated if \
the argument is non-null.  The  +     * prefixed with 'group by'; that part of the \
                query will be auto-generated if the argument is non-null.  The
      * new projection must follow standard rules as they apply to statements with \
                groupBy clauses.
      */
     public void setGroupByClause(String groupByClause) {
@@ -753,7 +753,7 @@ public final class CriteriaQueryGenerator {
 
     /**
      * The having clause can be set if and only if the groupBy clause is set.  The \
                passed argument should not be
-     * prefixed with 'having'; that part of the query will be auto-generated if the \
argument is non-null.  The  +     * prefixed with 'having'; that part of the query \
                will be auto-generated if the argument is non-null.  The
      * having clause must follow standard rules as they apply to statements with \
                groupBy clauses.
      */
     public void setHavingClause(String havingClause) {


commit 18aa1bc699a26717acfa2ba9af2ac072aafc2ce3
Author: John Mazzitelli <mazz@redhat.com>
Date:   Tue May 21 15:06:55 2013 -0400

    add jboss logging to eclipse classpath

diff --git a/.classpath b/.classpath
index 53037dd..2487128 100644
--- a/.classpath
+++ b/.classpath
@@ -230,6 +230,7 @@
 	<classpathentry exported="true" kind="var" \
path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar"/>
  <classpathentry exported="true" kind="var" \
path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/>  <classpathentry \
exported="true" kind="var" \
path="M2_REPO/org/jboss/jboss-common-core/2.2.17.GA/jboss-common-core-2.2.17.GA.jar"/>
 +	<classpathentry exported="true" kind="var" \
path="M2_REPO/org/jboss/logging/jboss-logging/3.1.2.GA/jboss-logging-3.1.2.GA.jar"/>  \
<classpathentry exported="true" kind="var" \
path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar"/>  <classpathentry \
exported="true" kind="var" \
path="M2_REPO/struts-menu/struts-menu/2.3/struts-menu-2.3.jar"/>  <classpathentry \
exported="true" kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar"/>


commit 3ef61c1860a590b16b461b81f85b0011b2ee620d
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Mon May 20 13:36:45 2013 +0200

    [BZ 958169] - Modified alert definition is not saved on confirming the save \
message after clicking on 'Back to List' button - New method for creating an alert \
definitions was added to SLSB, because the UI requires the ids of newly created alert \
conditions.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
 index b90b209..8fe6d4b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionEditor.java
 @@ -140,7 +140,7 @@ public class ConditionEditor extends EnhancedVLayout {
     private AlertCondition existingCondition;
 
     public ConditionEditor(HashSet<AlertCondition> conditions, Map<Integer, \
                AlertCondition> modifiedConditions,
-        SelectItem conditionExpression, ResourceType rtype, Runnable closeFunc, \
AlertCondition existingCondition) { +        SelectItem conditionExpression, \
ResourceType rtype, AlertCondition existingCondition, Runnable closeFunc) {  super();
         this.editMode = existingCondition != null;
         this.existingCondition = existingCondition;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
 index 782e4b5..8f4a36f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
 @@ -196,7 +196,7 @@ public class ConditionsEditor extends EnhancedVLayout {
                 }
             });
 
-            table.addTableAction(MSG.common_button_edit(), null, new \
AbstractTableAction(TableActionEnablement.SINGLE) { +            \
table.addTableAction(MSG.view_alert_definition_editCondition(), null, new \
                AbstractTableAction(TableActionEnablement.SINGLE) {
                 public void executeAction(ListGridRecord[] selection, Object \
                actionValue) {
                     AlertCondition condition = \
getDataSource().copyValues(selection[0]);  showConditionEditor(condition);
@@ -252,7 +252,7 @@ public class ConditionsEditor extends EnhancedVLayout {
                         final int numConditions = conditions.size();
                         final ConditionEditor newConditionEditor = new \
                ConditionEditor(conditions, modifiedConditions,
                             ConditionsEditor.this.conditionExpression, \
                ConditionsEditor.this.resourceType,
-                            new Runnable() {
+                            existingCondition, new Runnable() {
                                 @Override
                                 public void run() {
                                     updated = updated || numConditions != \
conditions.size() @@ -260,7 +260,7 @@ public class ConditionsEditor extends \
EnhancedVLayout {  winModal.markForDestroy();
                                     refresh();
                                 }
-                            }, existingCondition);
+                            });
                         winModal.addItem(newConditionEditor);
                         winModal.show();
                     }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
 index 2cbe8c6..d69f7f4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
 @@ -197,15 +197,14 @@ public class ResourceAlertDefinitionsView extends \
                AbstractAlertDefinitionsView {
     protected void commitAlertDefinition(final AlertDefinition alertDefinition, \
boolean purgeInternals,  final AsyncCallback<AlertDefinition> resultReceiver) {
         if (alertDefinition.getId() == 0) {
-            GWTServiceLookup.getAlertDefinitionService().createAlertDefinition(alertDefinition,
                
-                Integer.valueOf(resource.getId()), new AsyncCallback<Integer>() {
+            GWTServiceLookup.getAlertDefinitionService().createAlertDefinitionAndReturn(alertDefinition,
 +                Integer.valueOf(resource.getId()), new \
AsyncCallback<AlertDefinition>() {  @Override
-                    public void onSuccess(Integer result) {
+                    public void onSuccess(AlertDefinition result) {
                         CoreGUI.getMessageCenter().notify(
                             new Message(MSG.view_alert_definitions_create_success(), \
                Severity.Info));
-                        alertDefinition.setId(result.intValue());
                         ResourceAlertDefinitionsView.this.refresh();
-                        resultReceiver.onSuccess(alertDefinition);
+                        resultReceiver.onSuccess(result);
                     }
 
                     @Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 index c86d0cd..25742f5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 @@ -146,10 +146,7 @@ public class SingleAlertDefinitionView extends EnhancedVLayout \
{  cancelButton.addClickHandler(new ClickHandler() {
             @Override
             public void onClick(ClickEvent event) {
-                if (handlerRegistration != null)
-                    handlerRegistration.removeHandler();
-                // enable the back button
-                ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(false); +                \
                unregisterHandler();
                 setAlertDefinition(getAlertDefinition()); // reverts data back to \
original  makeViewOnly();
             }
@@ -159,6 +156,15 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
         addMember(tabSet);
         addMember(buttons);
     }
+    
+    @Override
+    protected void onDraw() {
+        super.onDraw();
+        if (alertDefinition == null || alertDefinition.getId() == 0) {
+            // disable the back button when creating new definition
+            setBackButtonDisabled(true);
+        }
+    }
 
     public AlertDefinition getAlertDefinition() {
         return alertDefinition;
@@ -197,8 +203,7 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
         recovery.makeEditable();
         dampening.makeEditable();
 
-        if (handlerRegistration != null)
-            handlerRegistration.removeHandler();
+        unregisterHandler();
         handlerRegistration = addVisibilityChangedHandler(new \
                VisibilityChangedHandler() {
             public void onVisibilityChanged(VisibilityChangedEvent event) {
                 if (!event.getIsVisible()) {
@@ -207,15 +212,13 @@ public class SingleAlertDefinitionView extends EnhancedVLayout \
{  if (value) {
                                 save();
                             }
-                            if (handlerRegistration != null)
-                                handlerRegistration.removeHandler();
                         }
                     });
                 }
             }
         });
         // disable the back button
-        ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(true); +        \
setBackButtonDisabled(true);  }
 
     public void makeViewOnly() {
@@ -228,6 +231,7 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
         notifications.makeViewOnly();
         recovery.makeViewOnly();
         dampening.makeViewOnly();
+        setBackButtonDisabled(false);
     }
 
     public void saveAlertDefinition() {
@@ -249,20 +253,13 @@ public class SingleAlertDefinitionView extends EnhancedVLayout \
{  new AsyncCallback<AlertDefinition>() {
                     @Override
                     public void onSuccess(final AlertDefinition alertDef) {
-                        if (handlerRegistration != null)
-                            handlerRegistration.removeHandler();
                         setAlertDefinition(alertDef);
-                        // enable the back button
-                        ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(false); +                     \
unregisterHandler();  }
 
                     @Override
                     public void onFailure(Throwable caught) {
-                        if (handlerRegistration != null)
-                            handlerRegistration.removeHandler();
-                        // enable the back button
-                        ((EnhancedVLayout) \
                getParentElement()).getMember("backButton").setDisabled(false);
-
+                        unregisterHandler();
                         // no error handling, the notification is done in the \
subclasses of AbstractAlertDefinitionsView  }
                 });
@@ -270,4 +267,22 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
             tabSet.selectTab(generalPropertiesTab);
         }
     }
+    
+    private void setBackButtonDisabled(boolean enabled) {
+        Canvas layoutCandidate = getParentElement();
+        if (layoutCandidate instanceof EnhancedVLayout) {
+            EnhancedVLayout parentLayout = (EnhancedVLayout) getParentElement();
+            Canvas backButton = parentLayout.getMember("backButton");
+            if (backButton != null) {
+                backButton.setDisabled(enabled);
+            }
+        }
+    }
+    
+    private void unregisterHandler() {
+        if (handlerRegistration != null) {
+            handlerRegistration.removeHandler();
+            handlerRegistration = null;
+        }
+    }
 }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertDefinitionGWTService.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertDefinitionGWTService.java
 index 0921b2b..794a67f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertDefinitionGWTService.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertDefinitionGWTService.java
 @@ -32,6 +32,9 @@ public interface AlertDefinitionGWTService extends RemoteService {
 
     int createAlertDefinition(AlertDefinition alertDefinition, Integer resourceId) \
throws RuntimeException;  
+    AlertDefinition createAlertDefinitionAndReturn(AlertDefinition alertDefinition, \
Integer resourceId) +        throws RuntimeException;
+
     AlertDefinition updateAlertDefinition(int alertDefinitionId, AlertDefinition \
alertDefinition, boolean purgeInternals)  throws RuntimeException;
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
 index 181eef5..da1d981 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertDefinitionGWTServiceImpl.java
 @@ -66,8 +66,18 @@ public class AlertDefinitionGWTServiceImpl extends \
AbstractGWTServiceImpl implem  @Override
     public int createAlertDefinition(AlertDefinition alertDefinition, Integer \
resourceId) throws RuntimeException {  try {
-            int results = \
alertDefManager.createAlertDefinitionInNewTransaction(getSessionSubject(), \
                alertDefinition, resourceId, true);
-            return results;
+            int result = \
alertDefManager.createAlertDefinitionInNewTransaction(getSessionSubject(), \
alertDefinition, resourceId, true); +            return result;
+        } catch (Throwable t) {
+            throw getExceptionToThrowToClient(t);
+        }
+    }
+    
+    @Override
+    public AlertDefinition createAlertDefinitionAndReturn(AlertDefinition \
alertDefinition, Integer resourceId) throws RuntimeException { +        try {
+            AlertDefinition result = \
alertDefManager.createAlertDefinitionAndRerurnIt(getSessionSubject(), \
alertDefinition, resourceId, true); +            return SerialUtility.prepare(result, \
"createAlertDefinitionAndReturn");  } catch (Throwable t) {
             throw getExceptionToThrowToClient(t);
         }
@@ -77,9 +87,9 @@ public class AlertDefinitionGWTServiceImpl extends \
                AbstractGWTServiceImpl implem
     public AlertDefinition updateAlertDefinition(int alertDefinitionId, \
AlertDefinition alertDefinition,  boolean resetMatching) throws RuntimeException {
         try {
-            AlertDefinition results = \
alertDefManager.updateAlertDefinition(getSessionSubject(), alertDefinitionId, +       \
AlertDefinition result = alertDefManager.updateAlertDefinition(getSessionSubject(), \
alertDefinitionId,  alertDefinition, resetMatching);
-            return SerialUtility.prepare(results, "updateAlertDefinition");
+            return SerialUtility.prepare(result, "updateAlertDefinition");
         } catch (Throwable t) {
             throw getExceptionToThrowToClient(t);
         }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
 index d00a969..8f8fec5 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
 @@ -201,19 +201,30 @@ public class AlertDefinitionManagerBean implements \
AlertDefinitionManagerLocal,  \
                @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
     public int createDependentAlertDefinition(Subject subject, AlertDefinition \
alertDefinition, int resourceId)  throws InvalidAlertDefinitionException {
-
-        return createAlertDefinitionInternal(subject, alertDefinition, resourceId, \
false, false); +        AlertDefinition newAlertDefinition = \
createAlertDefinitionInternal(subject, alertDefinition, resourceId, false, +          \
false); +        return newAlertDefinition.getId();
     }
 
     @Override
     @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
-    public int createAlertDefinitionInNewTransaction(Subject subject, \
AlertDefinition alertDefinition, Integer resourceId, boolean \
                validateNotificationConfiguration)
-        throws InvalidAlertDefinitionException {
-
-        return createAlertDefinitionInternal(subject, alertDefinition, resourceId, \
true, validateNotificationConfiguration); +    public int \
createAlertDefinitionInNewTransaction(Subject subject, AlertDefinition \
alertDefinition, +        Integer resourceId, boolean \
validateNotificationConfiguration) throws InvalidAlertDefinitionException { +        \
AlertDefinition newAlertDefinition = createAlertDefinitionInternal(subject, \
alertDefinition, resourceId, true, +            validateNotificationConfiguration);
+        return newAlertDefinition.getId();
+    }
+    
+    @Override
+    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+    public AlertDefinition createAlertDefinitionAndRerurnIt(Subject subject, \
AlertDefinition alertDefinition, +        Integer resourceId, boolean \
validateNotificationConfiguration) throws InvalidAlertDefinitionException { +        \
AlertDefinition newAlertDefinition = createAlertDefinitionInternal(subject, \
alertDefinition, resourceId, true, +            validateNotificationConfiguration);
+        return newAlertDefinition;
     }
 
-    private int createAlertDefinitionInternal(Subject subject, AlertDefinition \
alertDefinition, Integer resourceId, boolean checkPerms, boolean \
validateNotificationConfiguration) throws InvalidAlertDefinitionException { +    \
private AlertDefinition createAlertDefinitionInternal(Subject subject, \
AlertDefinition alertDefinition, Integer resourceId, boolean checkPerms, boolean \
                validateNotificationConfiguration) throws \
                InvalidAlertDefinitionException {
         checkAlertDefinition(subject, null, alertDefinition, resourceId, \
validateNotificationConfiguration);  
         // if this is an resource alert definition, set up the link to a resource
@@ -279,7 +290,7 @@ public class AlertDefinitionManagerBean implements \
AlertDefinitionManagerLocal,  AlertDefinitionEvent.CREATED);
         }
 
-        return alertDefinition.getId();
+        return alertDefinition;
     }
 
     private void fixRecoveryId(AlertDefinition definition) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java
 index 5afa1f9..ee0e161 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerLocal.java
 @@ -65,6 +65,29 @@ public interface AlertDefinitionManagerLocal {
      */
     int createAlertDefinitionInNewTransaction(Subject subject, AlertDefinition \
alertDefinition, Integer resourceId, boolean finalizeNotificationConfiguration)  \
throws InvalidAlertDefinitionException; +    
+    /**
+     * Creates a new alert definition. Note that the suject is checked to have \
necessary authz, which might not +     * be what you want in all use cases. See \
{@link #createDependentAlertDefinition(Subject, AlertDefinition, int)} +     * for \
further discussion of this. The only difference between  +     * {@link \
GroupAlertDefinitionManagerLocal#createAlertDefinitionInNewTransaction(Subject, \
AlertDefinition, Integer, boolean)} +     *  and this method is the return type.
+     *
+     * @param subject the user creating the alert definition
+     * @param alertDefinition the new alert definition to persist
+     * @param resourceId the resource id for which the def is being created
+     * @param finalizeNotificationConfiguration if true, the configuration of the \
def's notifications is validated. +     * This is NOT what you want if, for example, \
you are merely creating a copy of an existing definition. +     * Some notifications \
might require more input when creating the notification than is then persisted in \
their configs +     * (prominent example being the CLI alert sender).
+     * This would then cause the validation to fail every time you created a copy of \
a definition and tried +     * to persist it. Note that passing false AND having new, \
unpersisted notifications in the alert definition can +     * lead to invalid \
configuration being stored for the notifications. +     * @return the instance of \
newly created alert definition +     * @throws InvalidAlertDefinitionException
+     */
+    AlertDefinition createAlertDefinitionAndRerurnIt(Subject subject, \
AlertDefinition alertDefinition, +        Integer resourceId, boolean \
validateNotificationConfiguration) throws InvalidAlertDefinitionException;  
     /**
      * This is exactly the same as {@link \
#createAlertDefinitionInNewTransaction(Subject, AlertDefinition, Integer, boolean)} \
but


commit b638cc12a5796b7ccb3789bf94768303b0ce0e3c
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Mon May 20 13:29:43 2013 +0200

    [BZ 958169] - Modified alert definition is not saved on confirming the save \
message after clicking on 'Back to List' button - I18n (Instead of "Edit", now the \
button label says "Edit Condition").

diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
 index 00a68ef..b630706 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
 @@ -977,6 +977,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Trait Value  \
view_alert_definition_condition_editor_option_operation = Operation Execution  \
view_alert_definition_condition_editor_option_resource_configuration = Resource \
Configuration Change  \
view_alert_definition_condition_editor_resource_configuration_tooltip = This \
condition is triggered when the resource configuration changes. \
+view_alert_definition_editCondition = Edit Condition  \
view_alert_definition_for_group = View Group Definition  \
view_alert_definition_for_type = View Template  \
                view_alert_definition_notification_cliScript_editor_anotherUser = \
                Another User
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
 index a27fb3c..cab205f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
 @@ -993,6 +993,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Změna hodno  \
view_alert_definition_condition_editor_option_operation = Spuštění operace  \
view_alert_definition_condition_editor_option_resource_configuration = Změna \
konfigurace zdroje  view_alert_definition_condition_editor_resource_configuration_tooltip \
= Podmínka je splněna, když se změní konfigurace zdroje. \
+view_alert_definition_editCondition = Editovat podmínku  \
view_alert_definition_for_group = Zobrazit definici skupiny  \
view_alert_definition_for_type = Zobrazit Å¡ablonu  \
                view_alert_definition_notification_cliScript_editor_anotherUser = \
                Jiný uživatel
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 index 902951d..057785a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 @@ -883,6 +883,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Änderung de  \
view_alert_definition_condition_editor_option_operation = Ausführung der Operation  \
view_alert_definition_condition_editor_option_resource_configuration = Änderung der \
Konfiguration der Ressource  \
##view_alert_definition_condition_editor_resource_configuration_tooltip = This \
condition is triggered when the resource configuration changes. \
+##view_alert_definition_editCondition = Edit Condition  \
view_alert_definition_for_group = Gruppendefinition ansehen  \
view_alert_definition_for_type = Vorlage ansehen  \
                view_alert_definition_notification_cliScript_editor_anotherUser = \
                Anderer Benutzer
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
 index 8f47413..a929966 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
 @@ -969,6 +969,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = トレイト  \
view_alert_definition_condition_editor_option_operation = \
オペレーションã®å®Ÿè¡Œ  \
view_alert_definition_condition_editor_option_resource_configuration = \
リソース構æˆã®å¤‰åŒ–  \
view_alert_definition_condition_editor_resource_configuration_tooltip = \
ã“ã®æ¡ä»¶ã¯ãƒªã‚½ãƒ¼ã‚¹æ§‹æˆãŒå¤‰æ›´ã•ã‚Œã‚‹ã¨å¼•ãèµ·ã“ã•ã‚Œã¾ã™ \
+##view_alert_definition_editCondition = Edit Condition  \
view_alert_definition_for_group = ビューグループ定義  \
view_alert_definition_for_type = ビューテンプレート  \
                view_alert_definition_notification_cliScript_editor_anotherUser = \
                別ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
 index 5d19d06..da0a8a5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
 @@ -846,6 +846,7 @@ view_alert_definition_condition_editor_option_metric_threshold = \
ì¸¡ì • ì ˆëŒ€  view_alert_definition_condition_editor_option_metric_trait_change = \
íŠ¹ì„±ê°’ì˜ ë³€í™”  \
view_alert_definition_condition_editor_option_resource_configuration = ìžì› \
êµ¬ì„±ì˜ ë³€í™”  view_alert_definition_condition_editor_resource_configuration_tooltip \
= ì´ ì¡°ê±´ì€ ìžì› êµ¬ì„±ì´ ë³€ê²½ë˜ë©´ ë°œìƒí•©ë‹ˆë‹¤. \
+##view_alert_definition_editCondition = Edit Condition  \
view_alert_definition_for_group = ë·° 그룹 ì •ì˜  \
view_alert_definition_notification_cliScript_editor_anotherUser = 다른 ì‚¬ìš©ìž  \
view_alert_definition_notification_cliScript_editor_existingScript = ê¸°ì¡´ì˜ \
                스í¬ë¦½íŠ¸
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
 index 743c4b5..9f342d7 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
 @@ -977,6 +977,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Mudan\u00E7a  \
view_alert_definition_condition_editor_option_operation = Execu\u00E7\u00E3o de \
Opera\u00E7\u00E3o  view_alert_definition_condition_editor_option_resource_configuration \
= Mudan\u00E7a na Configura\u00E7\u00E3o do Recurso  \
view_alert_definition_condition_editor_resource_configuration_tooltip = Essa \
condi\u00E7\u00E3o \u00E9 disparada quando a configura\u00E7\u00E3o do recurso for \
alterada. +##view_alert_definition_editCondition = Edit Condition
 view_alert_definition_for_group = Visualizar Defini\u00E7\u00E3o de Grupo
 view_alert_definition_for_type = Visualizar Template
 view_alert_definition_notification_cliScript_editor_anotherUser = Another User
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
 index 772c4e4..c8ee796 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
 @@ -943,6 +943,7 @@
 #view_alert_definition_condition_editor_option_operation = Operation Execution
 #view_alert_definition_condition_editor_option_resource_configuration = Resource \
Configuration Change  \
#view_alert_definition_condition_editor_resource_configuration_tooltip = This \
condition is triggered when the resource configuration changes. \
+##view_alert_definition_editCondition = Edit Condition  \
#view_alert_definition_for_group = View Group Definition  \
#view_alert_definition_for_type = View Template  \
                #view_alert_definition_notification_cliScript_editor_anotherUser = \
                Another User
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
 index 03dfa4e..147b9f8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
 @@ -963,6 +963,7 @@ \
view_alert_definition_condition_editor_option_metric_trait_change = Trait Value  \
view_alert_definition_condition_editor_option_operation = Operation Execution  \
view_alert_definition_condition_editor_option_resource_configuration = \
\u8d44\u6e90\u914d\u7f6e\u6539\u53d8  \
view_alert_definition_condition_editor_resource_configuration_tooltip = This \
condition is triggered when the resource configuration changes. \
+##view_alert_definition_editCondition = Edit Condition  \
view_alert_definition_for_group = \u67e5\u770b\u7ec4\u5b9a\u4e49  \
view_alert_definition_for_type = \u67e5\u770b\u6a21\u677f  \
view_alert_definition_notification_cliScript_editor_anotherUser = \
\u5176\u4ed6\u7528\u6237


commit edaffb818aec221eb0db5338fcf2e669b06e5a70
Author: John Mazzitelli <mazz@redhat.com>
Date:   Fri May 17 17:09:35 2013 -0400

    BZ 963982 - make sure we persist the token when the registration was successful, \
even if the server endpoint was bad

diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java \
                index 6e1a95a..a8d8bdf 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java
@@ -1376,6 +1376,7 @@ public class AgentMain {
                                 try {
                                     AgentRegistrationResults results = \
                remote_pojo.registerAgent(request);
                                     failover_list = results.getFailoverList();
+                                    token = results.getAgentToken(); // make sure \
our finally block gets this - BZ 963982  
                                     // Try to do a simple connect to each server in \
                the failover list
                                     // If only some of the servers are unreachable, \
just keep going; @@ -1407,7 +1408,6 @@ public class AgentMain {
                                     m_registration = results;
                                     got_registered = true;
                                     retry = false;
-                                    token = results.getAgentToken();
                                     \
LOG.info(AgentI18NResourceKeys.AGENT_REGISTRATION_RESULTS, results);  } finally {
                                     // stores the new one if successful; restores \
the old one if we failed for some reason to register


commit 92fd97dd84324980487972bda6f424114e1e712d
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 17 14:11:32 2013 +0200

    BZ 962858 check passed resource id and return 404 if invalid

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 288e9f7..70cc588 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -559,6 +559,10 @@ public class ResourceHandlerBean extends AbstractRestBean {
     @ApiOperation("Get a list of links to the alerts for the passed resource")
     public List<Link> getAlertsForResource(@ApiParam("Id of the resource to query") \
@PathParam("id") int resourceId) {  AlertCriteria criteria = new AlertCriteria();
+
+        // Check for resource existence
+        fetchResource(resourceId);
+
         criteria.addFilterResourceIds(resourceId);
 
         List<Alert> alerts = alertManager.findAlertsByCriteria(caller, criteria);
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index 3efd807..cc9558b 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -593,6 +593,17 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testAlertsForUnknownResource() throws Exception {
+        given()
+            .header("Accept", "application/json")
+            .pathParam("id", 12345)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/resource/{id}/alerts");
+    }
+
+    @Test
     public void testSchedulesForResource() throws Exception {
         given()
             .header("Accept", "application/json")


commit b8207e9ec0efcf679af774e870f1c3b70fafc6fc
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 17 09:26:14 2013 +0200

    Disable for the moment

diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java \
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 index 7e20630..3a7e961 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
                
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 @@ -703,7 +703,7 @@ public class ConfigurationHelperTest {
 
     }
 
-    @Test
+    @Test(enabled = false)
     public void testConfigToMapComplexMapWithBadSetupLenient() throws Exception {
 
         Configuration config = new Configuration();


commit 9a040dd824209eb9e71bb22c7cf7d80a7c468485
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Fri May 17 12:41:31 2013 +0200

    [BZ 958169] - Modified alert definition is not saved on confirming the save \
message after clicking on 'Back to List' button - Making the "Back to List" button \
disabled when editing the alert definition.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/EditAlertDefinitionForm.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/EditAlertDefinitionForm.java
 index 14b6abf..d915cb0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/EditAlertDefinitionForm.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/EditAlertDefinitionForm.java
 @@ -1,8 +1,5 @@
 package org.rhq.enterprise.gui.coregui.client.alert.definitions;
 
-import java.util.Map;
-
-import org.rhq.core.domain.alert.AlertCondition;
 import org.rhq.core.domain.alert.AlertDefinition;
 
 /**
@@ -12,8 +9,6 @@ public interface EditAlertDefinitionForm {
 
     AlertDefinition getAlertDefinition();
     
-//    Map<Integer, AlertCondition> getUpdatedAlertConditions();
-
     boolean isResetMatching();
 
     void setAlertDefinition(AlertDefinition alertDef);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 index b4504c9..c86d0cd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/SingleAlertDefinitionView.java
 @@ -28,6 +28,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.smartgwt.client.util.BooleanCallback;
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Button;
+import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.events.VisibilityChangedEvent;
@@ -145,7 +146,10 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
         cancelButton.addClickHandler(new ClickHandler() {
             @Override
             public void onClick(ClickEvent event) {
-                handlerRegistration.removeHandler();
+                if (handlerRegistration != null)
+                    handlerRegistration.removeHandler();
+                // enable the back button
+                ((EnhancedVLayout) \
                getParentElement()).getMember("backButton").setDisabled(false);
                 setAlertDefinition(getAlertDefinition()); // reverts data back to \
original  makeViewOnly();
             }
@@ -193,6 +197,8 @@ public class SingleAlertDefinitionView extends EnhancedVLayout {
         recovery.makeEditable();
         dampening.makeEditable();
 
+        if (handlerRegistration != null)
+            handlerRegistration.removeHandler();
         handlerRegistration = addVisibilityChangedHandler(new \
                VisibilityChangedHandler() {
             public void onVisibilityChanged(VisibilityChangedEvent event) {
                 if (!event.getIsVisible()) {
@@ -201,12 +207,15 @@ public class SingleAlertDefinitionView extends EnhancedVLayout \
{  if (value) {
                                 save();
                             }
-                            handlerRegistration.removeHandler();
+                            if (handlerRegistration != null)
+                                handlerRegistration.removeHandler();
                         }
                     });
                 }
             }
         });
+        // disable the back button
+        ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(true);  }
 
     public void makeViewOnly() {
@@ -240,13 +249,21 @@ public class SingleAlertDefinitionView extends EnhancedVLayout \
{  new AsyncCallback<AlertDefinition>() {
                     @Override
                     public void onSuccess(final AlertDefinition alertDef) {
-                        handlerRegistration.removeHandler();
+                        if (handlerRegistration != null)
+                            handlerRegistration.removeHandler();
                         setAlertDefinition(alertDef);
+                        // enable the back button
+                        ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(false);  }
 
                     @Override
                     public void onFailure(Throwable caught) {
-                        // nothing, the notification is done in the subclasses of \
AbstractAlertDefinitionsView +                        if (handlerRegistration != \
null) +                            handlerRegistration.removeHandler();
+                        // enable the back button
+                        ((EnhancedVLayout) \
getParentElement()).getMember("backButton").setDisabled(false); +
+                        // no error handling, the notification is done in the \
subclasses of AbstractAlertDefinitionsView  }
                 });
         } else {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/buttons/BackButton.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/buttons/BackButton.java
 index efab26d..41819e1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/buttons/BackButton.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/buttons/BackButton.java
 @@ -41,6 +41,7 @@ public class BackButton extends StretchImgButton {
     public BackButton(String title, final String anchor) {
         this();
         setTitle("<b>" + title + "</b>");
+        setID("backButton");
         addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent clickEvent) {
                 CoreGUI.goToView(anchor);
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_end.png \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_end.png
 new file mode 100644
index 0000000..c323816
Binary files /dev/null and \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_end.png \
                differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_start.png \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_start.png
 new file mode 100644
index 0000000..d6cf484
Binary files /dev/null and \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_start.png \
                differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_stretch.png \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_stretch.png
 new file mode 100644
index 0000000..2addd3a
Binary files /dev/null and \
b/modules/enterprise/gui/coregui/src/main/webapp/images/buttons/back/back_Disabled_stretch.png \
differ


commit d074bd8fa3daf63342bd5426e8599b0cb8f10cef
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 16 21:47:39 2013 +0200

    We don't need standalone-osgi.xml

diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml \
b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml index \
                05619cb..e9f3bbe 100644
--- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -220,6 +220,7 @@
             <fileset dir="${jboss.home}/standalone/configuration">
                 <include name="standalone-ha.xml" />
                 <include name="standalone.xml" />
+                <include name="standalone-osgi.xml" />
                 <include name="standalone-full-ha.xml" />
             </fileset>
         </delete>


commit 4e91d0dc17e549213f61ee6a9251423d65c4ccce
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 16 21:47:23 2013 +0200

    Fix a small typo

diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 index 5415ed0..902951d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 @@ -1235,7 +1235,7 @@ view_core_uncaught = Es ist eine nicht abgefangene Ausnahme \
aufgetreten.  view_dashboardManager_deleteFail = Konnte das Dashboard nicht löschen.
 view_dashboardManager_deleted = Dashboard {0} erfolgreich gelöscht
 view_dashboardManager_error = Konnte das Dashboard nicht auf dem Server sichern
-view_dashboardManager_saved = Das Dashboard {0} wurde auf dem Server geichert
+view_dashboardManager_saved = Das Dashboard {0} wurde auf dem Server gesichert
 view_dashboardManager_success = Dashboard gespeichert
 view_dashboard_favorites_error1 = Konnte die Ressoucen-Lesezeichen nicht laden
 view_dashboardsManager_error1 = Konnte das neue Dashboard nicht hinzufügen


commit ba97ade9666a32cd20e071110c98a45e32d7f9fc
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Thu May 16 21:47:08 2013 +0200

    BZ 961656 - enable LDAP support for the REST-api as well.

diff --git a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java \
b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
 index 5caa45e..99e2f4d 100644
--- a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
                
+++ b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/SecurityDomainJBossASClient.java
 @@ -39,6 +39,7 @@ public class SecurityDomainJBossASClient extends JBossASClient {
     public static final String SECURITY_DOMAIN = "security-domain";
     public static final String CACHE_TYPE = "cache-type";
     public static final String AUTHENTICATION = "authentication";
+    public static final String LOGIN_MODULE  = "login-module";
     public static final String LOGIN_MODULES = "login-modules";
     public static final String CLASSIC = "classic";
     public static final String CODE = "code";
@@ -376,6 +377,36 @@ public class SecurityDomainJBossASClient extends JBossASClient {
         return;
     }
 
+    /**
+     * send a :flush-cache operation to the passed security domain
+     * @param domain simple name of the domain
+     * @throws Exception
+     */
+    public void flushSecurityDomainCache(String domain) throws Exception {
+        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, \
SECURITY_DOMAIN,domain); +        ModelNode request = \
createRequest("flush-cache",addr); +        ModelNode result = execute(request);
+        if (!isSuccess(result)) {
+            log.warn("Flushing " + domain + " failed - principals may be longer \
cached than expected"); +        }
+    }
+
+    /**
+     * Check if a certain login module is present inside the passed security domain
+     * @param domainName Name of the security domain
+     * @param moduleName Name of the Login module - wich usually is it FQCN
+     * @return True if the module is present
+     * @throws Exception
+     */
+    public boolean securityDomainHasLoginModule(String domainName, String \
moduleName) throws Exception { +        Address addr = Address.root().add(SUBSYSTEM, \
SUBSYSTEM_SECURITY, SECURITY_DOMAIN,domainName); +        \
addr.add(AUTHENTICATION,CLASSIC); +        addr.add(LOGIN_MODULE,moduleName);
+        ModelNode request = createRequest("read-resource", addr);
+        ModelNode response = execute(request);
+        return isSuccess(response);
+    }
+
     /** Immutable helper */
     public static class LoginModuleRequest {
         private AppConfigurationEntry entry;
diff --git a/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/jboss-web.xml \
b/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/jboss-web.xml \
                index 319b990..a98b367 100644
--- a/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/jboss-web.xml
+++ b/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/jboss-web.xml
@@ -2,4 +2,6 @@
 
 <jboss-web>
     <security-domain>RHQRESTSecurityDomain</security-domain>
+    <!-- see https://community.jboss.org/wiki/JBossAS7SecurityAuditing for the next \
tag --> +    <!--<disable-audit>false</disable-audit>-->
 </jboss-web>
diff --git a/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/web.xml \
b/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/web.xml index \
                fb75d94..b601346 100644
--- a/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/rest-examples-war/src/main/webapp/WEB-INF/web.xml
@@ -10,7 +10,7 @@
       <url-pattern>/*</url-pattern>
     </web-resource-collection>
     <auth-constraint>
-      <role-name>all</role-name>
+      <role-name>rest-user</role-name>
     </auth-constraint>
   </security-constraint>
 
@@ -21,7 +21,7 @@
 
   <security-role>
     <description>This is valid for all principals, as we do internal \
                checks</description>
-    <role-name>all</role-name>
+    <role-name>rest-user</role-name>
   </security-role>
 
 </web-app>
diff --git a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/jboss-web.xml \
b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/jboss-web.xml index \
                1ef5880..28f365f 100644
--- a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/jboss-web.xml
+++ b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/jboss-web.xml
@@ -3,4 +3,6 @@
 <jboss-web>
     <context-root>rest</context-root>
     <security-domain>RHQRESTSecurityDomain</security-domain>
+    <!-- see https://community.jboss.org/wiki/JBossAS7SecurityAuditing for the next \
tag --> +    <!--<disable-audit>false</disable-audit>-->
 </jboss-web>
diff --git a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml \
b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml index \
                f96839d..f336c60 100644
--- a/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml
@@ -57,7 +57,7 @@
       <url-pattern>/*</url-pattern>
     </web-resource-collection>
     <auth-constraint>
-      <role-name>all</role-name>
+      <role-name>rest-user</role-name>
     </auth-constraint>
   </security-constraint>
 
@@ -68,7 +68,7 @@
 
   <security-role>
     <description>This is valid for all principals, as we do internal \
                checks</description>
-    <role-name>all</role-name>
+    <role-name>rest-user</role-name>
   </security-role>
 
 </web-app>
diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java \
b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
 index 8173e68..0b9c078 100644
--- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
                
+++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/InstallerServiceImpl.java
 @@ -278,6 +278,9 @@ public class InstallerServiceImpl implements InstallerService {
             // Set up the logging subsystem
             ServerInstallUtil.configureLogging(mcc, serverProperties);
 
+            ServerInstallUtil.createUserSecurityDomain(mcc);
+            ServerInstallUtil.createRestSecurityDomain(mcc);
+
             // create a keystore whose cert has a CN of this server's public \
                endpoint address
             File keystoreFile = ServerInstallUtil.createKeystore(serverDetails != \
                null ? serverDetails
                 : getServerDetailsFromPropertiesOnly(serverProperties), \
appServerConfigDir); @@ -601,7 +604,7 @@ public class InstallerServiceImpl implements \
                InstallerService {
      * Save the given properties to the server's .properties file.
      *
      * Note that this is private - it is not exposed to the installer UI. It should \
                have no need to save
-     * this data outside of the normal installation process (see {@link \
#install()}). +     * this data outside of the normal installation process (see \
                {@link #install}).
      *
      * @param serverProperties the server properties to save
      * @throws Exception if failed to save the properties to the .properties file
@@ -1013,9 +1016,6 @@ public class InstallerServiceImpl implements InstallerService {
             // create the security domain needed by the datasources
             ServerInstallUtil.createDatasourceSecurityDomain(mcc, serverProperties);
 
-            // create the security domain needed by REST
-            ServerInstallUtil.createRESTSecurityDomain(mcc, serverProperties);
-
             // set up REST cache
             ServerInstallUtil.createNewCaches(mcc, serverProperties);
 
diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java \
b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java
 index d6e0d10..3a19833 100644
--- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java
                
+++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/ServerInstallUtil.java
 @@ -38,6 +38,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import javax.security.auth.login.AppConfigurationEntry;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tools.ant.Project;
@@ -133,8 +135,6 @@ public class ServerInstallUtil {
             "jboss.management.https.port", 6443));
         defaultSocketBindings.add(new \
SocketBindingInfo(SocketBindingJBossASClient.DEFAULT_BINDING_MGMT_NATIVE,  \
                "jboss.management.native.port", 6999));
-        defaultSocketBindings.add(new \
                SocketBindingInfo(SocketBindingJBossASClient.DEFAULT_BINDING_OSGI_HTTP,
                
-            "rhq.server.socket.binding.port.osgi-http", 7090, false));
         defaultSocketBindings.add(new \
SocketBindingInfo(SocketBindingJBossASClient.DEFAULT_BINDING_REMOTING,  \
                "rhq.server.socket.binding.port.remoting", 3447));
         defaultSocketBindings.add(new \
SocketBindingInfo(SocketBindingJBossASClient.DEFAULT_BINDING_TXN_RECOVERY_ENV, @@ \
-146,7 +146,10 @@ public class ServerInstallUtil {  private static final String \
RHQ_DATASOURCE_NAME_NOTX = "NoTxRHQDS";  private static final String \
                RHQ_DATASOURCE_NAME_XA = "RHQDS";
     private static final String RHQ_DS_SECURITY_DOMAIN = "RHQDSSecurityDomain";
+    private static final String RHQ_USER_SECURITY_DOMAIN = "RHQUserSecurityDomain";
     private static final String RHQ_REST_SECURITY_DOMAIN = "RHQRESTSecurityDomain";
+    private static final String JDBC_LOGIN_MODULE_NAME = \
"org.rhq.enterprise.server.core.jaas.JDBCLoginModule"; +    private static final \
String DELEGATIG_LOGIN_MODULE_NAME = \
"org.rhq.enterprise.server.core.jaas.DelegatingLoginModule";  private static final \
String JDBC_DRIVER_POSTGRES = "postgres";  private static final String \
                JDBC_DRIVER_ORACLE = "oracle";
     private static final String JMS_ALERT_CONDITION_QUEUE = "AlertConditionQueue";
@@ -299,6 +302,48 @@ public class ServerInstallUtil {
     }
 
     /**
+     * Create the standard user security domain with the JDBCLogin module installed
+     *
+     * @param mcc ModelControllerClient to talk to the underlying AS
+     * @throws Exception If anything goes wrong
+     */
+    public static void createUserSecurityDomain(ModelControllerClient mcc) throws \
Exception { +
+        Map<String,String> options = new HashMap<String, String>(2);
+        options.put("hashAlgorithm", "MD5");
+        options.put("hashEncoding", "base64");
+
+        SecurityDomainJBossASClient.LoginModuleRequest loginModuleRequest = new \
SecurityDomainJBossASClient.LoginModuleRequest(JDBC_LOGIN_MODULE_NAME, +            \
AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT, options); +
+
+        SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(mcc);
+        client.createNewSecurityDomain(RHQ_USER_SECURITY_DOMAIN,loginModuleRequest);
+
+    }
+
+    /**
+     * Create a security domain for container managed security used with the \
rhq-rest.war +     * @param mcc ModelControllerClient to talk to the underlying AS.
+     * @throws Exception If anything goes wrong
+     */
+    public static void createRestSecurityDomain(ModelControllerClient mcc) throws \
Exception { +
+        Map<String,String> options = new HashMap<String, String>(2);
+        options.put("delegateTo", RHQ_USER_SECURITY_DOMAIN);
+        options.put("roles", "rest-user");
+
+        SecurityDomainJBossASClient.LoginModuleRequest loginModuleRequest = new \
SecurityDomainJBossASClient.LoginModuleRequest(DELEGATIG_LOGIN_MODULE_NAME, +         \
AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT, options); +
+
+        SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(mcc);
+        client.createNewSecurityDomain(RHQ_REST_SECURITY_DOMAIN,loginModuleRequest);
+    }
+
+
+
+    /**
      * Creates the JMS Queues required for Drift and Alerting.
      *
      * @param mcc the JBossAS management client
@@ -367,28 +412,6 @@ public class ServerInstallUtil {
         return;
     }
 
-    /**
-     * Creates the security domain for REST.
-     *
-     * @param mcc the JBossAS management client
-     * @param serverProperties contains the obfuscated password to store in the \
                security domain
-     * @throws Exception
-     */
-    public static void createRESTSecurityDomain(ModelControllerClient mcc, \
                HashMap<String, String> serverProperties)
-        throws Exception {
-
-        final SecurityDomainJBossASClient client = new \
                SecurityDomainJBossASClient(mcc);
-        final String securityDomain = RHQ_REST_SECURITY_DOMAIN;
-        if (!client.isSecurityDomain(securityDomain)) {
-            String dsJndiName = "java:jboss/datasources/" + RHQ_DATASOURCE_NAME_XA;
-            client.createNewDatabaseServerSecurityDomain72(securityDomain, \
                dsJndiName,
-                "SELECT PASSWORD FROM RHQ_PRINCIPAL WHERE principal=?",
-                "SELECT 'all', 'Roles' FROM RHQ_PRINCIPAL WHERE principal=?", null, \
                null);
-            LOG.info("Security domain [" + securityDomain + "] created");
-        } else {
-            LOG.info("Security domain [" + securityDomain + "] already exists, \
                skipping the creation request");
-        }
-    }
 
     /**
      * Creates the Infinispan caches for RHQ.
@@ -856,7 +879,7 @@ public class ServerInstallUtil {
     /**
      * Returns a database connection with the given set of properties providing the \
                settings that allow for a successful
      * database connection. If <code>props</code> is <code>null</code>, it will use \
                the server properties from
-     * {@link #getServerProperties()}.
+     * {@link #getServerProperties}.
      *
      * @param connectionUrl
      * @param userName
@@ -898,7 +921,7 @@ public class ServerInstallUtil {
      * Use the internal JBossAS mechanism to de-obfuscate a password back to its
      * clear text form. This is not true encryption.
      *
-     * @param obfuscatedPasswordd the obfuscated password
+     * @param obfuscatedPassword the obfuscated password
      * @return the clear-text password
      */
     public static String deobfuscatePassword(String obfuscatedPassword) {
@@ -1003,7 +1026,7 @@ public class ServerInstallUtil {
     /**
      * This will create the database schema in the database. <code>props</code> \
                define the connection to the database -
      *
-     * <p>Note that if the {@link #isDatabaseSchemaExist(Properties) schema already \
exists}, it will be purged of all +     * <p>Note that if the {@link \
                #isDatabaseSchemaExist schema already exists}, it will be purged of \
                all
      * data/tables and recreated.</p>
      *
      * @param props the full set of server properties
@@ -1039,7 +1062,7 @@ public class ServerInstallUtil {
     /**
      * This will update an existing database schema so it can be upgraded to the \
                latest schema version.
      *
-     * <p>Note that if the {@link #isDatabaseSchemaExist(Properties) schema does not \
already exist}, errors will +     * <p>Note that if the {@link #isDatabaseSchemaExist \
                schema does not already exist}, errors will
      * occur.</p>
      *
      * @param props the full set of server properties
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
 index 95dd58f..73eeca5 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
 @@ -57,7 +57,6 @@ import \
org.rhq.enterprise.server.util.security.UntrustedSSLSocketFactory;  public class \
CustomJaasDeploymentService implements CustomJaasDeploymentServiceMBean, \
MBeanRegistration {  
     private Log log = \
                LogFactory.getLog(CustomJaasDeploymentService.class.getName());
-    private MBeanServer mbeanServer = null;
 
     /**
      * Constructor for {@link CustomJaasDeploymentService}.
@@ -70,21 +69,51 @@ public class CustomJaasDeploymentService implements \
                CustomJaasDeploymentServiceM
      */
     public void installJaasModules() {
         try {
-            log.info("Installing RHQ Server's JAAS login modules");
+            log.info("Updating RHQ Server's JAAS login modules");
             Properties systemConfig = \
LookupUtil.getSystemManager().getSystemConfiguration(  \
                LookupUtil.getSubjectManager().getOverlord());
-            registerJaasModules(systemConfig);
+            updateJaasModules(systemConfig);
         } catch (Exception e) {
             log.fatal("Error deploying JAAS login modules", e);
             throw new RuntimeException(e);
         }
     }
 
+    @Override
+    public void upgradeRhqUserSecurityDomainIfNeeded() {
+        try {
+            Properties systemConfig = \
LookupUtil.getSystemManager().getSystemConfiguration( +                \
LookupUtil.getSubjectManager().getOverlord()); +
+            String value = \
systemConfig.getProperty(SystemSetting.LDAP_BASED_JAAS_PROVIDER.getInternalName()); + \
boolean isLdapAuthenticationEnabled = (value != null) ? \
RHQConstants.LDAPJAASProvider.equals(value) : false; +
+            if (isLdapAuthenticationEnabled) {
+
+                ModelControllerClient mcc = null;
+                mcc = ManagementService.getClient();
+                final SecurityDomainJBossASClient client = new \
SecurityDomainJBossASClient(mcc); +
+                boolean ldapModulesPresent = \
client.securityDomainHasLoginModule(RHQ_USER_SECURITY_DOMAIN, +                    \
"org.rhq.enterprise.server.core.jaas.LdapLoginModule"); +
+
+                if (!ldapModulesPresent) {
+                    log.info("Updating RHQ Server's JAAS login modules with LDAP \
support"); +                    updateJaasModules(systemConfig);
+                }
+            }
+        } catch (Exception e) {
+            log.fatal("Error deploying JAAS login modules", e);
+            throw new RuntimeException(e);
+        }
+
+    }
+
     /**
      * @see javax.management.MBeanRegistration#preRegister(javax.management.MBeanServer,javax.management.ObjectName)
                
      */
     public ObjectName preRegister(MBeanServer server, ObjectName name) throws \
                Exception {
-        this.mbeanServer = server;
         return name;
     }
 
@@ -107,13 +136,13 @@ public class CustomJaasDeploymentService implements \
CustomJaasDeploymentServiceM  }
 
     /**
-     * Will register the necessary JAAS login Modules.  The RHQ_USER_SECURITY_DOMAIN \
                will be created, or recreated
-     * if it already exists.  This allows us to add/remove ldap support as it is \
                enabled or disabled. 
-     * 
-     * @param systemConfig
+     * Will update the necessary JAAS login Modules.  The RHQ_USER_SECURITY_DOMAIN \
will be created, or recreated +     * if it already exists.  This allows us to \
add/remove ldap support as it is enabled or disabled. +     *
+     * @param systemConfig System configuration to read the LDAP settings from
      * @throws Exception
      */
-    private void registerJaasModules(Properties systemConfig) throws Exception {
+    private void updateJaasModules(Properties systemConfig) throws Exception {
 
         ModelControllerClient mcc = null;
         try {
@@ -144,7 +173,7 @@ public class CustomJaasDeploymentService implements \
                CustomJaasDeploymentServiceM
                     AppConfigurationEntry.LoginModuleControlFlag.REQUISITE, \
getJdbcOptions(systemConfig));  loginModules.add(jdbcPrincipalCheckLoginModule);
 
-                // this is the LDAP module that checks the LDAP for auth             \
 +                // this is the LDAP module that checks the LDAP for auth
                 Map<String, String> ldapModuleOptionProperties = \
getLdapOptions(systemConfig);  try {
                     validateLdapOptions(ldapModuleOptionProperties);
@@ -170,7 +199,8 @@ public class CustomJaasDeploymentService implements \
CustomJaasDeploymentServiceM  
             client.createNewSecurityDomain(RHQ_USER_SECURITY_DOMAIN,
                 loginModules.toArray(new LoginModuleRequest[loginModules.size()]));
-            log.info("Security domain [" + RHQ_USER_SECURITY_DOMAIN + "] created \
with login modules " + loginModules); +            \
client.flushSecurityDomainCache("RHQRESTSecurityDomain"); +            \
log.info("Security domain [" + RHQ_USER_SECURITY_DOMAIN + "] re-created with login \
modules " + loginModules);  
         } catch (Exception e) {
             throw new Exception("Error registering RHQ JAAS modules", e);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentServiceMBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentServiceMBean.java
 index 8d53e2b..47fcc48 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentServiceMBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentServiceMBean.java
 @@ -41,4 +41,12 @@ public interface CustomJaasDeploymentServiceMBean {
      * Installs the JAAS Modules that JON Server uses to allow users to log in.
      */
     void installJaasModules();
+
+    /**
+     * Called from the startup bean and will upgrade an existing
+     * RHQUserSecurityDomain if needed - that is if the system
+     * settings say that LDAP support is enabled, but the underlying
+     * modules are not present
+     */
+    void upgradeRhqUserSecurityDomainIfNeeded();
 }
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
 index 90ffbaf..7963b26 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/StartupBean.java
 @@ -95,7 +95,7 @@ import \
                org.rhq.enterprise.server.util.concurrent.AvailabilityReportSerializer;
                
  * This startup singleton EJB performs the rest of the RHQ Server startup \
                initialization.
  * In order for it to do its work properly, we must ensure everything has been \
                deployed and started;
  * specifically, all EJBs must have been deployed and available.
- * 
+ *
  * This bean is not meant for client consumption - it is only for startup \
                initialization.
  */
 @Singleton
@@ -195,7 +195,7 @@ public class StartupBean implements StartupLocal {
         initScheduler(); // make sure this is initialized before starting the plugin \
                deployer
         startPluginDeployer(); // make sure this is initialized before starting the \
                server plugin container
         startServerPluginContainer(); // before comm in case an agent wants to talk \
                to it
-        installJaasModules();
+        upgradeRhqUserSecurityDomainIfNeeded();
         startServerCommunicationServices();
         startScheduler();
         scheduleJobs();
@@ -396,8 +396,7 @@ public class StartupBean implements StartupLocal {
      *
      * @throws RuntimeException
      */
-    private void installJaasModules() throws RuntimeException {
-        log.info("Installing JAAS login modules...");
+    private void upgradeRhqUserSecurityDomainIfNeeded() throws RuntimeException {
 
         try {
             CustomJaasDeploymentServiceMBean jaas_mbean;
@@ -406,9 +405,9 @@ public class StartupBean implements StartupLocal {
             Class<?> iface = CustomJaasDeploymentServiceMBean.class;
             jaas_mbean = (CustomJaasDeploymentServiceMBean) \
MBeanServerInvocationHandler.newProxyInstance(mbs, name,  iface, false);
-            jaas_mbean.installJaasModules();
+            jaas_mbean.upgradeRhqUserSecurityDomainIfNeeded();
         } catch (Exception e) {
-            throw new RuntimeException("Cannot install JAAS login modules!", e);
+            throw new RuntimeException("Cannot upgrade JAAS login modules!", e);
         }
     }
 
@@ -632,7 +631,7 @@ public class StartupBean implements StartupLocal {
             log.error("Cannot schedule server plugin jobs.", e);
         }
 
-        // Alerting Availability Duration Job (create only, nothing actually \
scheduled here)  +        // Alerting Availability Duration Job (create only, nothing \
actually scheduled here)  try {
             schedulerBean.scheduleTriggeredJob(AlertAvailabilityDurationJob.class, \
false, null);  } catch (Exception e) {
@@ -647,7 +646,7 @@ public class StartupBean implements StartupLocal {
      * immediately begin to send any persisted guaranteed messages that might \
                already exist. This method must be called
      * at a time when the server is ready to accept messages from agents because any \
                guaranteed messages that are
      * delivered might trigger the agents to send messages back to the server.
-     * 
+     *
      * NOTE: we don't need to do this - so far, none of the messages the server \
                sends to the agent are marked
      * with "guaranteed delivery" (this is on purpose and a good thing) so we don't \
                need to start all the agent clients
      * in case they have persisted messages. Since the number of agents could be \
large this cache could be huge and @@ -673,7 +672,7 @@ public class StartupBean \
                implements StartupLocal {
      * Starts the embedded agent, but only if the embedded agent is installed and it \
                is enabled.
      *
      * @throws RuntimeException if the agent is installed and enabled but failed to \
                start
-     * 
+     *
      * @deprecated we don't have an embedded agent anymore, leaving this in case we \
                resurrect it
      */
     private void startEmbeddedAgent() throws RuntimeException {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java
 new file mode 100644
index 0000000..d89c04b
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/DelegatingLoginModule.java
 @@ -0,0 +1,209 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+package org.rhq.enterprise.server.core.jaas;
+
+import java.io.IOException;
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.jboss.security.SimpleGroup;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.security.auth.spi.UsernamePasswordLoginModule;
+
+import org.rhq.core.util.StringUtil;
+
+/**
+ * A login module that just delegates all work to a different security domain.<p/>
+ * When you use container managed security (CMS), EAP 6.1 requires the security \
domain being + * already present in standalone.xml
+ *
+ * With our setup we (re)-create the security domain of RHQUserSecurityDomain \
dynamically, + * which makes CMS fail on startup and also on re-create.
+ *
+ * The approach of just exchanging login modules does not work correctly either \
(principals + * keep being cached, server goes into need-reload state).
+ *
+ * So we now have a security domain for the CMS for the REST api that just delegates \
to the + * RHQUserSecuritDomain.
+ *
+ * <pre>
+ * &lt;security-domain name="RHQRESTSecurityDomain" cache-type="default">
+ *   &lt;authentication>
+ *       &lt;login-module \
code="org.rhq.enterprise.server.core.jaas.DelegatingLoginModule" flag="required"> + * \
&lt;module-option name="delegateTo" value="RHQUserSecurityDomain"/> + *           \
&lt;module-option name="additionalRoles" value="rest-user"/> + *       \
&lt;/login-module> + *   &lt;/authentication>
+ * &lt;/security-domain>
+ *</pre>
+ *
+ * @author Heiko W. Rupp
+ */
+@SuppressWarnings("unused")
+public class DelegatingLoginModule extends UsernamePasswordLoginModule {
+
+    private static Log LOG = LogFactory.getLog("DelegatingLoginModule");
+
+    LoginContext loginContext;
+    private String[] usernamePassword;
+    private Principal identity;
+    private List<String> rolesList;
+    private boolean debugEnabled;
+
+    @Override
+    public void initialize(Subject subject, CallbackHandler callbackHandler, \
Map<String, ?> sharedState, +                           Map<String, ?> options) {
+
+        debugEnabled = log.isDebugEnabled();
+
+        super.initialize(subject, callbackHandler, sharedState, options);
+
+        /* This is the login context (=security domain) we want to delegate to */
+        String delegateTo = (String) options.get("delegateTo");
+
+        /* Comma separated list of roles that should be set for the principal */
+        String additionalRoles = (String) options.get("roles");
+        rolesList = StringUtil.explode(additionalRoles, ",");
+
+        if (delegateTo ==null || delegateTo.isEmpty()) {
+            delegateTo = "other";
+            LOG.warn("module-option 'delegateTo' was not set. Defaults to \
'other'."); +        }
+
+        if (debugEnabled) {
+            log.debug("Delegating to " + delegateTo + " with roles " + \
additionalRoles); +        }
+
+        // Now create the context for later use
+        try {
+            loginContext = new LoginContext(delegateTo, new \
DelegateCallbackHandler()); +        } catch (LoginException e) {
+            log.warn("Initialize failed : " + e.getMessage());
+        }
+    }
+
+    /**
+     * Do the actual login work - we obtain the user/password passed in and then try \
to +     * log into the delegated context. If this succeeds, we tell the \
super-module, +     * so this can do further processing (especially running the \
#commit() method). +     *
+     * @return True on success
+     * @throws LoginException If anything goes wrong
+     */
+    @Override
+    public boolean login() throws LoginException {
+        try {
+            // Get the username / password the user entred and save if for later use
+            usernamePassword = super.getUsernameAndPassword();
+
+            // Try to log in via the delegate
+            loginContext.login();
+
+            // Nix out the password
+            usernamePassword[1] = null;
+
+            // login was success, so we can continue
+            identity = createIdentity(usernamePassword[0]);
+            useFirstPass=true;
+
+            // This next flag is important. Without it the principal will not be
+            // propagated
+            loginOk = true;
+
+            if (debugEnabled) {
+                log.debug("Login ok for " + usernamePassword[0]);
+            }
+
+            return true;
+        } catch (Exception e) {
+            if (debugEnabled) {
+                LOG.debug("Login failed for : " + usernamePassword[0] + ": " + \
e.getMessage()); +            }
+            loginOk = false;
+            return false;
+        }
+    }
+
+
+    @Override
+    protected String getUsersPassword() throws LoginException {
+
+        // This is not used but abstract in super.
+        return null;
+    }
+
+    @Override
+    protected Principal getIdentity() {
+        return identity;
+    }
+
+
+    @Override
+    protected Group[] getRoleSets() throws LoginException {
+
+        SimpleGroup roles = new SimpleGroup("Roles");
+
+        for (String role : rolesList ) {
+            roles.addMember( new SimplePrincipal(role));
+        }
+        Group[] roleSets = { roles };
+        return roleSets;
+    }
+
+
+    /**
+     * Handle the callbacks from the other security domain that we delegate to
+     */
+    private class DelegateCallbackHandler implements CallbackHandler {
+        @Override
+        public void handle(Callback[] callbacks) throws IOException, \
UnsupportedCallbackException { +
+            if (debugEnabled) {
+                LOG.debug("private handle callbacks");
+            }
+            for (Callback cb : callbacks) {
+                if (cb instanceof NameCallback) {
+                    NameCallback nc = (NameCallback) cb;
+                    nc.setName(usernamePassword[0]);
+                }
+                else if (cb instanceof PasswordCallback) {
+                    PasswordCallback pc = (PasswordCallback) cb;
+                    pc.setPassword(usernamePassword[1].toCharArray());
+                }
+                else {
+                    throw new UnsupportedCallbackException(cb,"Callback " + cb + " \
not supported"); +                }
+            }
+        }
+    }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCLoginModule.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCLoginModule.java
 index 10fef1a..d12336e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCLoginModule.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCLoginModule.java
 @@ -50,7 +50,7 @@ import org.rhq.enterprise.server.RHQConstants;
  *   this value is "SELECT password FROM principals WHERE principal=?"
  *
  * dsJndiName
- *   JNDI name of the datasource to use.  Default value is java:/HypericDS
+ *   JNDI name of the datasource to use.  Default value is \
                java:/jboss/datasources/RHQDS
  * </pre>
  */
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCPrincipalCheckLoginModule.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCPrincipalCheckLoginModule.java
 index 5640f3f..2b761f6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCPrincipalCheckLoginModule.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/JDBCPrincipalCheckLoginModule.java
 @@ -38,6 +38,7 @@ import org.apache.commons.logging.LogFactory;
 
 import org.jboss.crypto.CryptoUtil;
 import org.jboss.security.SimpleGroup;
+import org.jboss.security.SimplePrincipal;
 import org.jboss.security.auth.spi.UsernamePasswordLoginModule;
 
 import org.rhq.enterprise.server.RHQConstants;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java
 index e476eeb..6b7add6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.server.core.jaas;
 
@@ -42,8 +42,8 @@ import org.rhq.enterprise.server.util.LookupUtil;
 import org.rhq.enterprise.server.util.security.UntrustedSSLSocketFactory;
 
 /**
- * A login module for authenticating against an LDAP directory server using JNDI, \
                based on configuration properites LDAP
- * module options:
+ * A login module for authenticating against an LDAP directory server using JNDI, \
based on configuration properties.<br/ + * LDAP module options:
  *
  * <pre>
  * java.naming.factory.initial
@@ -72,7 +72,7 @@ import \
                org.rhq.enterprise.server.util.security.UntrustedSSLSocketFactory;
  * BaseDN
  *   The base of the LDAP tree we are authenticating against.  For example:
  *   o=Covalent Technologies,c=US.  Multiple LDAP bases can be used by
- *   seperating each DN by ';'
+ *   separating each DN by ';'
  *
  * BindDN
  *   The BindDN to use if the LDAP server does not support anonymous searches.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
 index 52cd33d..de3b836 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
 @@ -464,7 +464,7 @@ public class SystemManagerBean implements SystemManagerLocal, \
SystemManagerRemot  }
         } else if (property == SystemSetting.AGENT_MAX_QUIET_TIME_ALLOWED) {
             long time = Long.parseLong(value);
-            // minimum should be 3 * the agent ping interval, any less risks \
unwanted backfilling  +            // minimum should be 3 * the agent ping interval, \
any less risks unwanted backfilling  if (time < 1000L * 60 * 3) {
                 throw new InvalidSystemConfigurationException("Agent Max Quiet Time \
Allowed must be at least 3 minutes");  }


commit b9ce1ee3cc01fd2bf5614f10e164a1f4cebfe42c
Author: John Mazzitelli <mazz@redhat.com>
Date:   Thu May 16 13:11:14 2013 -0400

    BZ 957282 957288 add bundle target of "Base Directory"

diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml \
b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml index \
                4a26d19..ad22370 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -1337,6 +1337,10 @@
         <value-context>pluginConfiguration</value-context>
         <value-name>homeDir</value-name>
       </destination-base-dir>
+      <destination-base-dir name="Base Directory" description="The base directory \
for server content, such as '[install-dir]/standalone' (i.e. the value found in the \
'Base Directory' connection property)"> +        \
<value-context>pluginConfiguration</value-context> +        \
<value-name>baseDir</value-name> +      </destination-base-dir>
       <destination-base-dir name="Deploy Directory" description="The deployment \
directory for a standalone server">  <value-context>measurementTrait</value-context>
         <value-name>deployDir</value-name>


commit f9052819e3da19359081274d62eb6b0f75dd63e2
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu May 16 14:28:01 2013 +0200

    Bug 962787 - GloballyUncaughtException when changing a parameter in Connection \
Settings tab of a compatible group after a plugin update

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/GroupConfigurationEditor.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/GroupConfigurationEditor.java
 index 8b5be2c..b3ccb10 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/GroupConfigurationEditor.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/GroupConfigurationEditor.java
 @@ -1,8 +1,7 @@
 /*
  * RHQ Management Platform
- * Copyright 2010-2011, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  */
 package org.rhq.enterprise.gui.coregui.client.components.configuration;
 
@@ -71,10 +70,10 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
 import org.rhq.enterprise.gui.coregui.client.PopupWindow;
 import org.rhq.enterprise.gui.coregui.client.components.form.SortedSelectItem;
 import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
 import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedToolStrip;
 import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
 
 /**
  * A SmartGWT widget for editing a group of RHQ {@link Configuration}s that conform \
to the same @@ -638,28 +637,20 @@ public class GroupConfigurationEditor extends \
ConfigurationEditor {  }
 
     private Property getProperty(Configuration configuration, Property \
                referenceProperty, Integer index) {
-        LinkedList<Property> propertyHierarchy = new LinkedList<Property>();
-        Property currentProperty = referenceProperty;
-        propertyHierarchy.add(currentProperty);
-        do {
-            if (currentProperty.getParentMap() != null) {
-                currentProperty = currentProperty.getParentMap();
-            } else if (currentProperty.getParentList() != null) {
-                currentProperty = currentProperty.getParentList();
-            } else if (currentProperty.getConfiguration() == null) {
-                throw new IllegalStateException(currentProperty + " has no \
                parent.");
-            }
-            propertyHierarchy.addFirst(currentProperty);
-        } while (currentProperty.getConfiguration() == null);
-
-        Property property = configuration.get(propertyHierarchy.get(0).getName());
-        for (int i = 1, propertyHierarchySize = propertyHierarchy.size(); i < \
                propertyHierarchySize; i++) {
-            String childPropertyName = propertyHierarchy.get(i).getName();
+        List<Property> referenceHierarchy = \
getParentFirstPropertiesHierarchy(referenceProperty); +        // Add \
referenceProperty to the configuration, creating parents if necessary +        \
Property property = configuration.get(referenceHierarchy.get(0).getName()); +        \
if (property == null) { +            property = \
createPropertyByExample(referenceHierarchy.get(0)); +            \
configuration.put(property); +        }
+        for (int i = 1; i < referenceHierarchy.size(); i++) {
+            String childPropertyName = referenceHierarchy.get(i).getName();
             if (property instanceof PropertyMap) {
                 PropertyMap propertyMap = (PropertyMap) property;
                 property = propertyMap.get(childPropertyName);
                 if (property == null) {
-                    property = new PropertySimple(childPropertyName, null);
+                    property = createPropertyByExample(referenceHierarchy.get(i));
                     propertyMap.put(property);
                 }
             } else if (property instanceof PropertyList) {
@@ -667,7 +658,7 @@ public class GroupConfigurationEditor extends ConfigurationEditor \
{  if (index < propertyList.getList().size()) {
                     property = propertyList.getList().get(index);
                 } else {
-                    property = new PropertySimple(childPropertyName, null);
+                    property = createPropertyByExample(referenceHierarchy.get(i));
                     propertyList.add(property);
                 }
             }
@@ -676,6 +667,35 @@ public class GroupConfigurationEditor extends \
ConfigurationEditor {  return property;
     }
 
+    private List<Property> getParentFirstPropertiesHierarchy(Property \
bottomProperty) { +        LinkedList<Property> propertyHierarchy = new \
LinkedList<Property>(); +        for (Property currentProperty = bottomProperty; \
currentProperty != null; ) { +            \
propertyHierarchy.addFirst(currentProperty); +            if \
(currentProperty.getParentMap() != null) { +                currentProperty = \
currentProperty.getParentMap(); +            } else if \
(currentProperty.getParentList() != null) { +                currentProperty = \
currentProperty.getParentList(); +            } else if \
(currentProperty.getConfiguration() == null) { +                throw new \
IllegalStateException(currentProperty + " has no parent."); +            } else {
+                currentProperty = null;
+            }
+        }
+        return new ArrayList<Property>(propertyHierarchy);
+    }
+
+    private <T extends Property> T createPropertyByExample(T example) {
+        T property = null;
+        if (example instanceof PropertyMap) {
+            property = (T) new PropertyMap(example.getName());
+        } else if (example instanceof PropertyList) {
+            property = (T) new PropertyList(example.getName());
+        } else {
+            property = (T) new PropertySimple(example.getName(), null);
+        }
+        return property;
+    }
+
     private boolean isAggregateProperty(PropertySimple propertySimple) {
         return (getConfiguration(propertySimple) == getConfiguration());
     }


commit ac38cd855156fd93958f82b40ca5cf75a3f6593d
Author: John Mazzitelli <mazz@redhat.com>
Date:   Wed May 15 17:13:18 2013 -0400

    BZ 951382 - for upgrades, let's use the agent preferences upgrade feature
    to set the cert store locations explicitly and copy the files
    from data/ to conf/ which is the new default location. Note that if
    customers already explicitly set the locations of their cert stores,
    we leave those intact and continue using what the customer asked to use.
    We only do anything IF those settings weren't set and thus defaults
    were taking effect.

diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationConstants.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationConstants.java
 index 4fe7df9..3f9a89b 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationConstants.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationConstants.java
 @@ -58,7 +58,7 @@ public interface AgentConfigurationConstants {
     /**
      * This is the current schema version that our agent configuration knows about.
      */
-    int CURRENT_CONFIG_SCHEMA_VERSION = 6;
+    int CURRENT_CONFIG_SCHEMA_VERSION = 7;
 
     /**
      * Flag to indicate if the agent's configuration has been setup.
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationUpgrade.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationUpgrade.java
 index 6c0a2ce..27e68f9 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationUpgrade.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfigurationUpgrade.java
 @@ -18,10 +18,17 @@
  */
 package org.rhq.enterprise.agent;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.prefs.Preferences;
 
+import mazz.i18n.Logger;
+
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.enterprise.agent.i18n.AgentI18NFactory;
+import org.rhq.enterprise.agent.i18n.AgentI18NResourceKeys;
+import org.rhq.enterprise.communications.ServiceContainerConfigurationConstants;
 import org.rhq.enterprise.communications.util.prefs.PreferencesUpgrade;
 import org.rhq.enterprise.communications.util.prefs.PreferencesUpgradeStep;
 
@@ -31,6 +38,8 @@ import \
                org.rhq.enterprise.communications.util.prefs.PreferencesUpgradeStep;
  * @author John Mazzitelli
  */
 public class AgentConfigurationUpgrade extends PreferencesUpgrade {
+    private static final Logger LOG = \
AgentI18NFactory.getLogger(AgentConfigurationUpgrade.class); +
     /**
      * This is a convenience method that upgrades the given agent preferences to the \
                latest configuration schema
      * version.
@@ -58,7 +67,8 @@ public class AgentConfigurationUpgrade extends PreferencesUpgrade {
         list.add(new Step2to3()); // goes from v2 to v3
         list.add(new Step3to4()); // goes from v3 to v4
         list.add(new Step4to5()); // goes from v4 to v5
-        list.add(new Step5to6());
+        list.add(new Step5to6()); // goes from v5 to v6
+        list.add(new Step6to7()); // goes from v6 to v7
         return list;
     }
 
@@ -139,4 +149,55 @@ public class AgentConfigurationUpgrade extends \
                PreferencesUpgrade {
             preferences.put(AgentConfigurationConstants.SERVER_ALIAS, "rhqserver");
         }
     }
+
+    static class Step6to7 extends PreferencesUpgradeStep {
+        public int getSupportedConfigurationSchemaVersion() {
+            return 7;
+        }
+
+        public void upgrade(Preferences preferences) {
+            // This new schema version indicates when we changed the default \
locations for our keystore/truststore +            // files. Before if these comm \
settings weren't set, we assumed a default of "data" directory, but now +            \
// we assume a default of "conf" directory (if that directory exists). See BZ 951382. \
+            File confDir = new File("conf"); +            if (!confDir.exists()) {
+                return; // conf/ doesn't exist (perhaps we are running in a test?) - \
do nothing and just fallback to the standard defaults +            }
+
+            String dataDir = \
preferences.get(AgentConfigurationConstants.DATA_DIRECTORY, +                \
AgentConfigurationConstants.DEFAULT_DATA_DIRECTORY); +
+            String prefNamesFileNames[][] = {
+                { ServiceContainerConfigurationConstants.CONNECTOR_SECURITY_KEYSTORE_FILE,
 +                    \
ServiceContainerConfigurationConstants.DEFAULT_CONNECTOR_SECURITY_KEYSTORE_FILE_NAME \
}, +                { \
ServiceContainerConfigurationConstants.CONNECTOR_SECURITY_TRUSTSTORE_FILE, +          \
ServiceContainerConfigurationConstants.DEFAULT_CONNECTOR_SECURITY_TRUSTSTORE_FILE_NAME \
}, +                { \
AgentConfigurationConstants.CLIENT_SENDER_SECURITY_KEYSTORE_FILE, +                   \
AgentConfigurationConstants.DEFAULT_CLIENT_SENDER_SECURITY_KEYSTORE_FILE_NAME }, +    \
{ AgentConfigurationConstants.CLIENT_SENDER_SECURITY_TRUSTSTORE_FILE, +               \
AgentConfigurationConstants.DEFAULT_CLIENT_SENDER_SECURITY_TRUSTSTORE_FILE_NAME } }; \
+ +            for (String[] prefNameFileName : prefNamesFileNames) {
+                String value = preferences.get(prefNameFileName[0], null);
+                if (value == null) {
+                    File newFile = new File(confDir, prefNameFileName[1]);
+                    value = newFile.getAbsolutePath();
+                    preferences.put(prefNameFileName[0], value);
+
+                    File oldFile = new File(dataDir, prefNameFileName[1]);
+                    if (oldFile.exists()) {
+                        try {
+                            FileUtil.copyFile(oldFile, newFile);
+                            oldFile.delete();
+                        } catch (Exception e) {
+                            LOG.error(e, AgentI18NResourceKeys.CERT_FILE_COPY_ERROR, \
oldFile, newFile); +                        }
+                    }
+                    LOG.debug(AgentI18NResourceKeys.CERT_FILE_LOCATION, \
prefNameFileName[0], value); +                }
+            }
+
+            return;
+        }
+    }
 }
\ No newline at end of file
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
 index 21a39a9..16c110a 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
 @@ -28,6 +28,9 @@ import mazz.i18n.annotation.I18NResourceBundle;
  */
 @I18NResourceBundle(baseName = "agent-messages", defaultLocale = "en")
 public interface AgentI18NResourceKeys {
+    @I18NMessage("Failed to move old cert file [{0}] to new default location [{1}] - \
agent communication may fail!") +    String CERT_FILE_COPY_ERROR = \
"AgentConfiguration.cert-file-copy-error"; +
     @I18NMessage("Explicitly setting file location [{0}] to [{1}]")
     String CERT_FILE_LOCATION = "AgentConfiguration.cert-file-location";
 


commit 3034e3c906a352723834aa4adce41355d7310bce
Author: John Mazzitelli <mazz@redhat.com>
Date:   Wed May 15 12:30:18 2013 -0400

    provide another sample plugin that demonstrates using the embedded plugin \
extension model

diff --git a/.classpath b/.classpath
index aa4c157..53037dd 100644
--- a/.classpath
+++ b/.classpath
@@ -189,6 +189,8 @@
 	<classpathentry kind="src" \
path="modules/integration-tests/jndi-access/jndi-access-test/src/test/resources"/>  \
<classpathentry kind="src" \
path="modules/integration-tests/mod_cluster-plugin-test/src/test/java"/>  \
<classpathentry kind="src" path="etc/samples/skeleton-plugin/src/main/java"/> \
+	<classpathentry kind="src" path="etc/samples/embedded-ext-plugin/src/main/java"/> \
+	<classpathentry kind="src" path="etc/samples/skinny-platform/src/main/java"/>  \
<classpathentry kind="src" path="etc/samples/custom-serverplugin/src/main/java"/>  \
<classpathentry kind="src" \
path="etc/samples/simplereport-serverplugin/src/main/java"/>  <classpathentry \
                kind="src" path="etc/agentspawn/src/main/java"/>
diff --git a/etc/samples/embedded-ext-plugin/pom.xml \
b/etc/samples/embedded-ext-plugin/pom.xml new file mode 100644
index 0000000..9427d71
--- /dev/null
+++ b/etc/samples/embedded-ext-plugin/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd"> +
+   <modelVersion>4.0.0</modelVersion>
+
+   <groupId>org.rhq.sample.embeddedextplugin</groupId>
+   <artifactId>embedded-ext-plugin</artifactId>
+   <version>1.0-SNAPSHOT</version>
+   <packaging>jar</packaging>
+
+   <name>Embedded Ext RHQ Plugin</name>
+   <description>A sample plugin showing plugin embedded extention</description>
+
+   <properties>
+      <rhq.version>4.8.0-SNAPSHOT</rhq.version>
+   </properties>
+
+   <dependencies>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-domain</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-plugin-api</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-native-system</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>commons-logging</groupId>
+         <artifactId>commons-logging</artifactId>
+         <version>1.1</version>
+         <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+         <groupId>org.rhq.sample.skeletonplugin</groupId>
+         <artifactId>skeleton-plugin</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <scope>provided</scope>
+      </dependency>
+
+   </dependencies>
+
+   <repositories>
+      <repository>
+          <id>jboss-public-repository-group</id>
+          <name>JBoss Public Maven Repository Group</name>
+          <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+      </repository>
+   </repositories>
+
+</project>
+
diff --git a/etc/samples/embedded-ext-plugin/src/main/java/org/rhq/sample/embeddedextplugin/EmbeddedExtensionDiscoveryComponent.java \
b/etc/samples/embedded-ext-plugin/src/main/java/org/rhq/sample/embeddedextplugin/EmbeddedExtensionDiscoveryComponent.java
 new file mode 100644
index 0000000..6e823c3
--- /dev/null
+++ b/etc/samples/embedded-ext-plugin/src/main/java/org/rhq/sample/embeddedextplugin/EmbeddedExtensionDiscoveryComponent.java
 @@ -0,0 +1,58 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.sample.embeddedextplugin;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.sample.skeletonplugin.SamplePluginDiscoveryComponent;
+
+/**
+ * This is a discovery class for the embedded extension resource type.
+ */
+public class EmbeddedExtensionDiscoveryComponent extends \
SamplePluginDiscoveryComponent { +    private final Log log = \
LogFactory.getLog(EmbeddedExtensionDiscoveryComponent.class); +
+    @Override
+    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext \
context) { +        log.info("Discovering embedded extension resources");
+        Set<DiscoveredResourceDetails> discoveredResources = \
super.discoverResources(context); // call the parent discovery code +        \
Set<DiscoveredResourceDetails> extendedResources = new \
HashSet<DiscoveredResourceDetails>(); +
+        int i = -1;
+        for (DiscoveredResourceDetails discoveredResource : discoveredResources) {
+            String key = "Embedded Extension Resource Key" + (++i > 0 ? \
String.valueOf(i) : ""); +            String name = "Embedded Extension Resource";
+            String description = "This describes the Embedded Extension Resource";
+
+            discoveredResource.setResourceKey(key);
+            discoveredResource.setResourceName(name);
+            discoveredResource.setResourceDescription(description);
+
+            extendedResources.add(discoveredResource);
+        }
+
+        return extendedResources;
+    }
+}
\ No newline at end of file
diff --git a/etc/samples/embedded-ext-plugin/src/main/resources/META-INF/rhq-plugin.xml \
b/etc/samples/embedded-ext-plugin/src/main/resources/META-INF/rhq-plugin.xml new file \
mode 100644 index 0000000..16dbb7b
--- /dev/null
+++ b/etc/samples/embedded-ext-plugin/src/main/resources/META-INF/rhq-plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<plugin name="EmbeddedExtPlugin"
+        displayName="Embedded Extension Plugin"
+        version="1.0"
+        package="org.rhq.sample.embeddedextplugin"
+        description="Defines a resource type that uses the embedded extension \
model." +        xmlns="urn:xmlns:rhq-plugin"
+        xmlns:c="urn:xmlns:rhq-configuration">
+
+   <depends plugin="SkeletonPlugin" useClasses="true" />
+
+   <server name="Embedded Extension Resource"
+           discovery="EmbeddedExtensionDiscoveryComponent"
+           class="org.rhq.sample.skeletonplugin.SamplePluginServerComponent"
+           description="A resource that embeds the skeleton plugin type"
+           sourcePlugin="SkeletonPlugin"
+           sourceType="Sample Plugin Server">
+   </server>
+
+</plugin>


commit 8cbe5ffb7379c26403f9083bc7b0642f490ff9eb
Author: John Mazzitelli <mazz@redhat.com>
Date:   Wed May 15 11:47:55 2013 -0400

    provide some additions to the sample skeleton plugin
    add a new "skinny platform" plugin sample, used mainly for testing - provides a \
minimal plugin you can use to run an agent with

diff --git a/etc/samples/skeleton-plugin/pom.xml \
b/etc/samples/skeleton-plugin/pom.xml index 56c816e..998bb47 100644
--- a/etc/samples/skeleton-plugin/pom.xml
+++ b/etc/samples/skeleton-plugin/pom.xml
@@ -15,7 +15,7 @@
    <description>A template for building a custom RHQ Agent plugin</description>
 
    <properties>
-      <rhq.version>4.3.0</rhq.version>
+      <rhq.version>4.8.0-SNAPSHOT</rhq.version>
    </properties>
 
    <dependencies>
@@ -42,30 +42,6 @@
          <scope>provided</scope> <!-- provided by the agent/plugin-container -->
       </dependency>
 
-      <!-- Fix for the Javac bug requiring annotations to be available when \
                compiling classes. (fixed in JDK 6) -->
-      <dependency>
-         <groupId>javax.persistence</groupId>
-         <artifactId>persistence-api</artifactId>
-         <version>1.0</version>
-         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
-      </dependency>
-
-      <!-- Fix for the Javac bug requiring annotations to be available when \
                compiling classes. (fixed in JDK 6) -->
-      <dependency>
-         <groupId>hibernate-annotations</groupId>
-         <artifactId>hibernate-annotations</artifactId>
-         <version>3.2.1.GA</version>
-         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
-      </dependency>
-
-      <!-- Fix for the Javac bug requiring annotations to be available when \
                compiling classes. (fixed in JDK 6) -->
-      <dependency>
-         <groupId>javax.xml.bind</groupId>
-         <artifactId>jaxb-api</artifactId>
-         <version>2.1</version>
-         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
-      </dependency>
-
       <!--
          Uncomment the one of the three logging systems your plugin uses: log4j, \
                commons-logging or i18nlog
          All three are provided to your plugin by the agent/plugin-container.
@@ -143,79 +119,6 @@
       </plugins>
    </build>
 
-   <profiles>
-      <profile>
-         <id>dev</id>
-         <properties>
-            <!-- define the location of your RHQ root directory - typically \
                rhq.rootDir is overridden in Maven's settings.xml -->
-            <rhq.rootDir>/rhq/trunk</rhq.rootDir>
-            <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
-            <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
                
-            <rhq.deploymentDir>${rhq.containerDir}/${rhq.agentPluginDir}</rhq.deploymentDir>
                
-         </properties>
-         <build>
-            <plugins>
-               <plugin>
-                  <artifactId>maven-antrun-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>deploy</id>
-                        <phase>compile</phase>
-                        <configuration>
-                           <target>
-                              <mkdir dir="${rhq.deploymentDir}" />
-                              <property name="deployment.file" \
                location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
-                              <echo>*** Updating ${deployment.file}...</echo>
-                              <jar destfile="${deployment.file}" \
                basedir="${project.build.outputDirectory}" />
-                           </target>
-                        </configuration>
-                        <goals>
-                           <goal>run</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>deploy-jar-meta-inf</id>
-                        <phase>package</phase>
-                        <configuration>
-                           <target>
-                              <property name="deployment.file" \
                location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
-                              <echo>*** Updating META-INF dir in \
                ${deployment.file}...</echo>
-                              <unjar \
src="${project.build.directory}/${project.build.finalName}.jar" \
                dest="${project.build.outputDirectory}">
-                                 <patternset>
-                                    <include name="META-INF/**" />
-                                 </patternset>
-                              </unjar>
-                              <jar destfile="${deployment.file}"
-                                   \
                manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
-                                   update="true">
-                              </jar>
-                           </target>
-                        </configuration>
-                        <goals>
-                           <goal>run</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>undeploy</id>
-                        <phase>clean</phase>
-                        <configuration>
-                           <target>
-                              <property name="deployment.file" \
                location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
-                              <echo>*** Deleting ${deployment.file}...</echo>
-                              <delete file="${deployment.file}" />
-                           </target>
-                        </configuration>
-                        <goals>
-                           <goal>run</goal>
-                        </goals>
-                     </execution>
-                  </executions>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-
    <repositories>
       <repository>
           <id>jboss-public-repository-group</id>
diff --git a/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildDiscoveryComponent.java \
b/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildDiscoveryComponent.java
 new file mode 100644
index 0000000..b8a81ab
--- /dev/null
+++ b/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildDiscoveryComponent.java
 @@ -0,0 +1,47 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.sample.skeletonplugin;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+public class SamplePluginChildDiscoveryComponent implements \
ResourceDiscoveryComponent { +    private final Log log = \
LogFactory.getLog(SamplePluginChildDiscoveryComponent.class); +
+    @Override
+    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext \
context) { +        log.info("Discovering my custom plugin's child resources");
+        HashSet<DiscoveredResourceDetails> set = new \
HashSet<DiscoveredResourceDetails>(); +        String key = "My Child Resource Key";
+        String name = "My Child Resource";
+        String version = "1.0";
+        String description = "This describes My Child Resource";
+        DiscoveredResourceDetails resource = new \
DiscoveredResourceDetails(context.getResourceType(), key, name, +            version, \
description, null, null); +        set.add(resource);
+        return set;
+    }
+}
\ No newline at end of file
diff --git a/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildServiceComponent.java \
b/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildServiceComponent.java
 new file mode 100644
index 0000000..a3303e7
--- /dev/null
+++ b/etc/samples/skeleton-plugin/src/main/java/org/rhq/sample/skeletonplugin/SamplePluginChildServiceComponent.java
 @@ -0,0 +1,61 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.sample.skeletonplugin;
+
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+
+public class SamplePluginChildServiceComponent implements ResourceComponent, \
MeasurementFacet { +    private final Log log = \
LogFactory.getLog(SamplePluginChildServiceComponent.class); +
+    public void start(ResourceContext context) {
+        log.info("Starting child resource [" + context.getResourceKey() + "]");
+    }
+
+    public void stop() {
+    }
+
+    public AvailabilityType getAvailability() {
+        return AvailabilityType.UP;
+    }
+
+    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> \
requests) { +        for (MeasurementScheduleRequest request : requests) {
+            String name = request.getName();
+            try {
+                Number value = new Integer(2); // dummy measurement value
+                report.addData(new MeasurementDataNumeric(request, \
value.doubleValue())); +            } catch (Exception e) {
+                log.error("Failed to obtain measurement [" + name + "]. Cause: " + \
e); +            }
+        }
+
+        return;
+    }
+}
diff --git a/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml \
b/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml index \
                4f4966d..cde11c5 100644
--- a/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml
+++ b/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml
@@ -15,6 +15,7 @@
 <plugin name="SkeletonPlugin"
         displayName="Skeleton Plugin"
         version="1.0"
+        description="This is a skeleton plugin that can be used to start your own \
custom plugin."  package="org.rhq.sample.skeletonplugin"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="urn:xmlns:rhq-plugin"
@@ -110,5 +111,24 @@
       <resource-configuration>
          <c:simple-property name="port" type="integer" displayName="Port on which to \
listen" />  </resource-configuration>
+      
+      <!--
+         CHANGE: You can optionally define children resource types to represent \
internal services within your +                 server resource type.
+      -->
+      <service name="Sample Plugin Child Service"
+               discovery="SamplePluginChildDiscoveryComponent"
+               class="SamplePluginChildServiceComponent"
+               description="This is a child service found under the main, top-level \
server resource type."> +
+         <plugin-configuration>
+            <c:simple-property name="SamplePluginChildProperty" displayName="Sample \
Plugin Child Property" default="Value" /> +         </plugin-configuration>
+
+         <metric property="ChildMeasurementName"
+                 displayName="The Child Measurement Name"
+                 description="Describes what this child measurement is actually \
telling you" /> +
+      </service>
    </server>
 </plugin>
diff --git a/etc/samples/skinny-platform/pom.xml \
b/etc/samples/skinny-platform/pom.xml new file mode 100644
index 0000000..994462f
--- /dev/null
+++ b/etc/samples/skinny-platform/pom.xml
@@ -0,0 +1,60 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd"> +
+   <modelVersion>4.0.0</modelVersion>
+
+   <groupId>org.rhq.sample.skinnyplugin</groupId>
+   <artifactId>rhq-skinny-platform-plugin</artifactId>
+   <version>1.0-SNAPSHOT</version>
+   <packaging>jar</packaging>
+
+   <name>RHQ Skinny Platform Plugin</name>
+   <description> A very slimmed down platform plugin, used for \
testing.</description> +
+   <properties>
+      <rhq.version>4.8.0-SNAPSHOT</rhq.version>
+   </properties>
+
+   <dependencies>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-domain</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+      </dependency>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-plugin-api</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+      </dependency>
+
+      <dependency>
+         <groupId>org.rhq</groupId>
+         <artifactId>rhq-core-native-system</artifactId>
+         <version>${rhq.version}</version>
+         <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+      </dependency>
+
+      <dependency>
+         <groupId>commons-logging</groupId>
+         <artifactId>commons-logging</artifactId>
+         <version>1.1</version>
+         <scope>provided</scope>
+      </dependency>
+
+   </dependencies>
+
+   <repositories>
+      <repository>
+          <id>jboss-public-repository-group</id>
+          <name>JBoss Public Maven Repository Group</name>
+          <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+      </repository>
+   </repositories>
+
+</project>
diff --git a/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformComponent.java \
b/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformComponent.java
 new file mode 100644
index 0000000..0c123b1
--- /dev/null
+++ b/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformComponent.java
 @@ -0,0 +1,39 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.plugins.skinnyplatform;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+
+public class PlatformComponent implements ResourceComponent<PlatformComponent> {
+    public void start(ResourceContext<PlatformComponent> context) {
+    }
+
+    public void stop() {
+    }
+
+    public AvailabilityType getAvailability() {
+        return AvailabilityType.UP;
+    }
+}
\ No newline at end of file
diff --git a/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformDiscoveryComponent.java \
b/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformDiscoveryComponent.java
 new file mode 100644
index 0000000..b53b1c3
--- /dev/null
+++ b/etc/samples/skinny-platform/src/main/java/org/rhq/plugins/skinnyplatform/PlatformDiscoveryComponent.java
 @@ -0,0 +1,67 @@
+/*
+  * RHQ Management Platform
+  * Copyright (C) 2005-2013 Red Hat, Inc.
+  * All rights reserved.
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License, version 2, as
+  * published by the Free Software Foundation, and/or the GNU Lesser
+  * General Public License, version 2.1, also as published by the Free
+  * Software Foundation.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  * GNU General Public License and the GNU Lesser General Public License
+  * for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * and the GNU Lesser General Public License along with this program;
+  * if not, write to the Free Software Foundation, Inc.,
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  */
+package org.rhq.plugins.skinnyplatform;
+
+import java.net.InetAddress;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+@SuppressWarnings("rawtypes")
+public class PlatformDiscoveryComponent implements ResourceDiscoveryComponent {
+
+    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext \
context) { +        String pcName = context.getPluginContainerName();
+        String hostname = getHostname();
+
+        String name = (pcName != null ? pcName : hostname);
+        String key = "skinny:" + name;
+        String description = context.getResourceType().getDescription();
+        String version = "1.0";
+
+        DiscoveredResourceDetails discoveredResource = new \
DiscoveredResourceDetails(context.getResourceType(), key, +            name, version, \
description, null, null); +
+        HashSet<DiscoveredResourceDetails> results = new \
HashSet<DiscoveredResourceDetails>(); +        results.add(discoveredResource);
+        return results;
+    }
+
+    private String getHostname() {
+        String name;
+        try {
+            name = InetAddress.getLocalHost().getHostAddress();
+        } catch (Exception e) {
+            name = null;
+        }
+
+        // we fought the good fight but we just can't get this machine's hostname, \
give a generic platform name +        if (name == null) {
+            name = "Unnamed Skinny Platform";
+        }
+        return name;
+    }
+}
\ No newline at end of file
diff --git a/etc/samples/skinny-platform/src/main/resources/META-INF/rhq-plugin.xml \
b/etc/samples/skinny-platform/src/main/resources/META-INF/rhq-plugin.xml new file \
mode 100644 index 0000000..fd50a2a
--- /dev/null
+++ b/etc/samples/skinny-platform/src/main/resources/META-INF/rhq-plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<plugin name="Skinny Platform"
+        displayName="Skinny Platform"
+        version="1.0"
+        package="org.rhq.plugins.skinnyplatform"
+        description="Provides a slimmed down, single platform resource type - used \
mainly for testing." +        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="urn:xmlns:rhq-plugin"
+        xmlns:c="urn:xmlns:rhq-configuration">
+
+    <platform name="Generic Platform"
+              class="PlatformComponent"
+              discovery="PlatformDiscoveryComponent"
+              description="A generic platform with very little functionality.">
+    </platform>
+
+</plugin>


commit 98cb0afd7a2bcfcb8f74f3d8182fb9798edd2b49
Author: mtho11 <mikecthompson@gmail.com>
Date:   Tue May 14 10:38:22 2013 -0700

    [BZ 960646] - Trivial: strengthen opacity on new Availability chart.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index 5ef57a8..a301e73 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -243,7 +243,7 @@ public class AvailabilityOverUnderGraphType {
                         .attr("width", function (d) {
                             return timeScale(+d.availEnd) - \
timeScale(+d.availStart);  })
-                        .attr("opacity", ".3")
+                        .attr("opacity", ".75")
                         .attr("fill", function (d) {
                             return calcBarFill(d);
                         });
@@ -265,7 +265,7 @@ public class AvailabilityOverUnderGraphType {
                         .style("font-size", "12px")
                         .style("font-family", "Arial, Verdana, sans-serif;")
                         .style("font-weight", "bold")
-                        .attr("fill", "#003168")
+                        .attr("fill", "#545454")
                         .text(availChartContext.chartTitle);
 
                 svg.append("text")


commit cf37517727392d04d8ab11182fd94474571462d8
Author: mtho11 <mikecthompson@gmail.com>
Date:   Tue May 14 09:20:26 2013 -0700

    [BZ 960646] - UXD updates to new Availability Charts.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index fbce610..5ef57a8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -169,9 +169,9 @@ public class AvailabilityOverUnderGraphType {
                                 .orient("bottom"),
 
                         calcBarY = function (d) {
-                            var ABOVE = -10,
+                            var ABOVE = -6,
                                     BELOW = 0,
-                                    STRADDLE = -5,
+                                    STRADDLE = -3,
                                     offset;
 
                             if (d.availType === 'DOWN') {
@@ -198,19 +198,19 @@ public class AvailabilityOverUnderGraphType {
 
                         calcBarFill = function (d) {
                             if (d.availType === 'DOWN') {
-                                return "#FF1919"; // red
+                                return "#c5888b"; // red
                             }
                             else if (d.availType === 'DISABLED') {
                                 return "url(#diagonalHatchFill)"; // grey diagonal \
hatches  }
                             else if (d.availType === 'UNKNOWN') {
-                                return "#CCC"; // gray
+                                return "#d8d8d8"; // gray
                             }
                             else if (d.availType === 'UP') {
-                                return "#198C19"; // green
+                                return "#8cbe89"; // green
                             }
                             else if (d.availType === 'WARN') {
-                                return "#FFA500"; // orange
+                                return "#e1b36b"; // orange
                             }
                             else if (d.availType === 'EMPTY') {
                                 return "#CCC"; // gray
@@ -238,12 +238,12 @@ public class AvailabilityOverUnderGraphType {
                             return calcBarY(d);
                         })
                         .attr("height", function (d) {
-                            return 10;
+                            return 6;
                         })
                         .attr("width", function (d) {
                             return timeScale(+d.availEnd) - \
timeScale(+d.availStart);  })
-                        .attr("opacity", ".9")
+                        .attr("opacity", ".3")
                         .attr("fill", function (d) {
                             return calcBarFill(d);
                         });
@@ -251,7 +251,7 @@ public class AvailabilityOverUnderGraphType {
                 // create x-axis
                 svg.append("g")
                         .attr("class", "x axis")
-                        .attr("fill", "#50505a")
+                        .attr("fill", "#b0b0b0")
                         .attr("stroke-width", "0.5")
                         .attr("transform", "translate(0," + height + ")")
                         .attr("letter-spacing", "3")
@@ -274,7 +274,7 @@ public class AvailabilityOverUnderGraphType {
                         .attr("y", 28)
                         .style("font-family", "Arial, Verdana, sans-serif;")
                         .style("font-size", "9px")
-                        .attr("fill", "#50505a")
+                        .attr("fill", "#545454")
                         .style("text-anchor", "end")
                         .text(availChartContext.chartUpLabel);
 
@@ -284,7 +284,7 @@ public class AvailabilityOverUnderGraphType {
                         .attr("y", 39)
                         .style("font-family", "Arial, Verdana, sans-serif;")
                         .style("font-size", "9px")
-                        .attr("fill", "#50505a")
+                        .attr("fill", "#545454")
                         .style("text-anchor", "end")
                         .text(availChartContext.chartDownLabel);
 


commit af1fdd5d865ab295969f80949b36c3c38c70ccef
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Tue May 14 13:21:44 2013 +0200

    Fixing a typo in a sample CLI script.

diff --git a/modules/enterprise/remoting/cli/src/main/samples/deploy-to-and-restart-JBAS.js \
b/modules/enterprise/remoting/cli/src/main/samples/deploy-to-and-restart-JBAS.js \
                index 9739cb1..a965edf 100644
--- a/modules/enterprise/remoting/cli/src/main/samples/deploy-to-and-restart-JBAS.js
+++ b/modules/enterprise/remoting/cli/src/main/samples/deploy-to-and-restart-JBAS.js
@@ -146,7 +146,7 @@ function _restartFunction(asResourceType) {
         (asResourceType.name == "JBossAS7 Standalone Server" ||
          asResourceType.name == "Managed Server")) {
         
-    	return _restartAS7);
+    	return _restartAS7;
     } else {
     	throw "The resource group the destination targets doesn't seem to be a JBoss AS \
server group.";  }


commit 9a3b4d105099320c6c6794ff04e12285c5399667
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Thu May 9 15:15:02 2013 +0200

    [BZ 620603] - Re-enabling the limited JOIN FETCH reporting
    with a more informative message, asking the users to co-operate in
    identifying the individual uses of the problematic JOIN FETCH queries that
    we potentially missed.

diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 index f826e41..8eb4b3e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
                
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 @@ -15,8 +15,8 @@ import org.hibernate.event.spi.EventSource;
 import org.hibernate.hql.internal.ast.QueryTranslatorImpl;
 
 /**
- * This class can be used to quickly identify and analyze usages of JOIN FETCH \
                together with limits on JPA queries.
- * It will log the JPA, generated SQL and a filtered stacktrace for each such usage. \
This is to enhance the diagnostics + * This class can be used to quickly identify and \
analyze usages of JOIN FETCH together with limits on JPA queries. It + * will log the \
JPA, generated SQL and a filtered stacktrace for each such usage. This is to enhance \
                the diagnostics
  * that Hibernate itself offers that merely dumps a message about in-memory \
                filtering of results resulting from the use
  * of JOIN FETCH together with limits.
  *
@@ -24,7 +24,7 @@ import org.hibernate.hql.internal.ast.QueryTranslatorImpl;
  */
 public class JoinFetchReportingQueryTranslator extends QueryTranslatorImpl {
 
-    private static Log LOG = LogFactory.getLog("JOIN FETCH Perf");
+    private static Log LOG = LogFactory.getLog("JOIN FETCH Performance");
 
     public JoinFetchReportingQueryTranslator(String queryIdentifier, String query, \
Map enabledFilters,  SessionFactoryImplementor factory) {
@@ -49,11 +49,14 @@ public class JoinFetchReportingQueryTranslator extends \
QueryTranslatorImpl {  }
         }
 
-        public void report() {
+        public void report(String method) {
             if (time != 0) {
                 time = System.currentTimeMillis() - time;
-                LOG.warn("List with first: " + firstRow + ", max: " + maxRows + " \
                took " + time + "ms:\n" +
-                    getQueryString() + "\n\nSQL:\n" + getSQLString() + "\n" + \
extractRHQCalls(new Exception())); +                LOG.warn("Encountered a query \
with potentially bad performance. While this is not a bug and the " + +               \
"system functions as designed, please report this to RHQ community so that we can \
reimplement our" + +                    " code to work better.\n" + method + "() with \
first: " + firstRow + ", max: " + maxRows + " took " +                    + time + \
"ms:\n" + getQueryString() + "\n\nSQL:\n" + getSQLString() + "\n" + +                 \
extractRHQCalls(new Exception()));  }
         }
 
@@ -80,7 +83,7 @@ public class JoinFetchReportingQueryTranslator extends \
QueryTranslatorImpl {  
         List ret = super.list(session, queryParameters);
 
-        usage.report();
+        usage.report("list");
 
         return ret;
     }
@@ -91,7 +94,7 @@ public class JoinFetchReportingQueryTranslator extends \
QueryTranslatorImpl {  
         Iterator ret = super.iterate(queryParameters, session);
 
-        usage.report();
+        usage.report("iterate");
 
         return ret;
     }
@@ -103,7 +106,7 @@ public class JoinFetchReportingQueryTranslator extends \
QueryTranslatorImpl {  
         ScrollableResults ret = super.scroll(queryParameters, session);
 
-        usage.report();
+        usage.report("scroll");
 
         return ret;
     }
diff --git a/modules/core/domain/src/main/resources/META-INF/persistence.xml \
b/modules/core/domain/src/main/resources/META-INF/persistence.xml index \
                a15fd2e..1bbd8c2 100644
--- a/modules/core/domain/src/main/resources/META-INF/persistence.xml
+++ b/modules/core/domain/src/main/resources/META-INF/persistence.xml
@@ -21,9 +21,7 @@
          <!--<property name="com.intellij.javaee.persistence.datasource" \
                value="rhq-oracle" />-->
          <property name="com.intellij.javaee.persistence.datasource" \
value="rhq-postgres" />  
-         <!-- Used only for debugging the usages of JOIN FETCHes
          <property name="hibernate.query.factory_class" \
                value="org.rhq.core.domain.util.JoinFetchReportingQueryTranslatorFactory" \
                />
-         -->
 
          <!-- This value doesn't have any theoretical grounds and is purely based on \
                experiments. Value of 32 gives
               the best compromise between the quick load of queries with low and \
high limits (i.e. page size in tens vs.


commit db62629626fdd9049cf89cfa58dc5b14b2a98ea9
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Thu May 9 13:11:50 2013 +0200

    [BZ 620603] - Don't use JOIN FETCH in criteria queries with limits.
    
    Use the "manual" initialization of lazy fields and collections in
    that case instead.
    
    Together with the "hibernate.default_batch_fetch_size" setting in the
    hibernate configuration, this offers superior performance over the join
    fetch and in memory filtering of results when the number of rows in the
    "primary" tables times the number of rows in the "join-fetched" table
    is non-trivial.

diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 new file mode 100644
index 0000000..f826e41
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 @@ -0,0 +1,110 @@
+package org.rhq.core.domain.util;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.HibernateException;
+import org.hibernate.ScrollableResults;
+import org.hibernate.engine.spi.QueryParameters;
+import org.hibernate.engine.spi.SessionFactoryImplementor;
+import org.hibernate.engine.spi.SessionImplementor;
+import org.hibernate.event.spi.EventSource;
+import org.hibernate.hql.internal.ast.QueryTranslatorImpl;
+
+/**
+ * This class can be used to quickly identify and analyze usages of JOIN FETCH \
together with limits on JPA queries. + * It will log the JPA, generated SQL and a \
filtered stacktrace for each such usage. This is to enhance the diagnostics + * that \
Hibernate itself offers that merely dumps a message about in-memory filtering of \
results resulting from the use + * of JOIN FETCH together with limits.
+ *
+ * @author Lukas Krejci
+ */
+public class JoinFetchReportingQueryTranslator extends QueryTranslatorImpl {
+
+    private static Log LOG = LogFactory.getLog("JOIN FETCH Perf");
+
+    public JoinFetchReportingQueryTranslator(String queryIdentifier, String query, \
Map enabledFilters, +        SessionFactoryImplementor factory) {
+        super(queryIdentifier, query, enabledFilters, factory);
+    }
+
+    private class JoinFetchUsage {
+        private long time;
+        private Integer firstRow;
+        private Integer maxRows;
+
+        public JoinFetchUsage(QueryParameters queryParameters) {
+            boolean collect = containsCollectionFetches();
+            boolean hasLimit =
+                queryParameters.getRowSelection() != null && \
queryParameters.getRowSelection().definesLimits(); +
+            if (collect && hasLimit) {
+                firstRow = queryParameters.getRowSelection().getFirstRow();
+                maxRows = queryParameters.getRowSelection().getMaxRows();
+
+                time = System.currentTimeMillis();
+            }
+        }
+
+        public void report() {
+            if (time != 0) {
+                time = System.currentTimeMillis() - time;
+                LOG.warn("List with first: " + firstRow + ", max: " + maxRows + " \
took " + time + "ms:\n" + +                    getQueryString() + "\n\nSQL:\n" + \
getSQLString() + "\n" + extractRHQCalls(new Exception())); +            }
+        }
+
+        private String extractRHQCalls(Throwable t) {
+            StringBuilder bld = new StringBuilder();
+
+            StackTraceElement[] elements = t.getStackTrace();
+
+            //skip the report() and list() calls, hence 2
+            for (int i = 2; i < elements.length; ++i) {
+                StackTraceElement e = elements[i];
+                if (e.getClassName().startsWith("org.rhq")) {
+                    bld.append("\n").append(e.toString());
+                }
+            }
+
+            return bld.toString();
+        }
+    }
+
+    @Override
+    public List list(SessionImplementor session, QueryParameters queryParameters) \
throws HibernateException { +        JoinFetchUsage usage = new \
JoinFetchUsage(queryParameters); +
+        List ret = super.list(session, queryParameters);
+
+        usage.report();
+
+        return ret;
+    }
+
+    @Override
+    public Iterator iterate(QueryParameters queryParameters, EventSource session) \
throws HibernateException { +        JoinFetchUsage usage = new \
JoinFetchUsage(queryParameters); +
+        Iterator ret = super.iterate(queryParameters, session);
+
+        usage.report();
+
+        return ret;
+    }
+
+    @Override
+    public ScrollableResults scroll(QueryParameters queryParameters, \
SessionImplementor session) +        throws HibernateException {
+        JoinFetchUsage usage = new JoinFetchUsage(queryParameters);
+
+        ScrollableResults ret = super.scroll(queryParameters, session);
+
+        usage.report();
+
+        return ret;
+    }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java
 new file mode 100644
index 0000000..71e1bf2
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java
 @@ -0,0 +1,27 @@
+package org.rhq.core.domain.util;
+
+import java.util.Map;
+
+import org.hibernate.engine.spi.SessionFactoryImplementor;
+import org.hibernate.hql.spi.FilterTranslator;
+import org.hibernate.hql.spi.QueryTranslator;
+import org.hibernate.hql.spi.QueryTranslatorFactory;
+
+/**
+ * A query translator factory to be set in the hibernate configuration to report the \
usage of JOIN FETCH with limit. + *
+ * @author Lukas Krejci
+ */
+public class JoinFetchReportingQueryTranslatorFactory implements \
QueryTranslatorFactory { +    @Override
+    public QueryTranslator createQueryTranslator(String queryIdentifier, String \
queryString, Map filters, +        SessionFactoryImplementor factory) {
+        return new JoinFetchReportingQueryTranslator(queryIdentifier, queryString, \
filters, factory); +    }
+
+    @Override
+    public FilterTranslator createFilterTranslator(String queryIdentifier, String \
queryString, Map filters, +        SessionFactoryImplementor factory) {
+        return new JoinFetchReportingQueryTranslator(queryIdentifier, queryString, \
filters, factory); +    }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java index \
                6963141..f87a814 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/PageControl.java
@@ -276,6 +276,10 @@ public class PageControl implements Serializable, Cloneable {
         orderingFields = new LinkedList<OrderingField>();
     }
 
+    public boolean isUnlimited() {
+        return getPageNumber() == 0 && getPageSize() == SIZE_UNLIMITED;
+    }
+
     // TODO (ips, 10/12/11): Incorporate firstRecord field into equals() and \
hashCode().  
     @Override
@@ -334,4 +338,4 @@ public class PageControl implements Serializable, Cloneable {
         return new PageControl(pageNumber, pageSize, getOrderingFieldsAsArray());
     }
 
-}
\ No newline at end of file
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/util/UnlimitedPageControl.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/util/UnlimitedPageControl.java
 index ce7ab20..af5842a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/util/UnlimitedPageControl.java
                
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/util/UnlimitedPageControl.java
 @@ -30,6 +30,11 @@ public class UnlimitedPageControl extends PageControl {
     }
 
     @Override
+    public boolean isUnlimited() {
+        return true;
+    }
+
+    @Override
     public void reset() {
         getOrderingFields().clear();
     }
diff --git a/modules/core/domain/src/main/resources/META-INF/persistence.xml \
b/modules/core/domain/src/main/resources/META-INF/persistence.xml index \
                8e28c68..a15fd2e 100644
--- a/modules/core/domain/src/main/resources/META-INF/persistence.xml
+++ b/modules/core/domain/src/main/resources/META-INF/persistence.xml
@@ -20,6 +20,16 @@
 
          <!--<property name="com.intellij.javaee.persistence.datasource" \
                value="rhq-oracle" />-->
          <property name="com.intellij.javaee.persistence.datasource" \
value="rhq-postgres" /> +
+         <!-- Used only for debugging the usages of JOIN FETCHes
+         <property name="hibernate.query.factory_class" \
value="org.rhq.core.domain.util.JoinFetchReportingQueryTranslatorFactory" /> +        \
--> +
+         <!-- This value doesn't have any theoretical grounds and is purely based on \
experiments. Value of 32 gives +              the best compromise between the quick \
load of queries with low and high limits (i.e. page size in tens vs. +              \
thousands) in an inventory with 30 agents and >20000 resources. --> +         \
<property name="hibernate.default_batch_fetch_size" value="32"/> +
       </properties>
    </persistence-unit>
 
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml \
                index 9066916..afa622f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml
 @@ -40,10 +40,11 @@
        
        <!-- These classes are overriden for GWT because their original form doesn't \
gwt-compile. -->  <exclude name="**/ObfuscatedPropertySimple.*"/>
+       <exclude name="**/JoinFetchReporting*.*" />
     </source>
     
     <!--<generate-with class="org.rhq.core.rebind.RecordBuilderGenerator">
         <when-type-assignable class="org.rhq.core.domain.util.Recordizable"/>
     </generate-with>-->
 
-</module>
\ No newline at end of file
+</module>
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 new file mode 100644
index 0000000..e92696e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslator.java
 @@ -0,0 +1,9 @@
+package org.rhq.core.domain.util;
+
+/**
+ * GWT friendly impl of this beast.
+ *
+ * @author Lukas Krejci
+ */
+public class JoinFetchReportingQueryTranslator {
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java
 new file mode 100644
index 0000000..9bd8512
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/domain/util/JoinFetchReportingQueryTranslatorFactory.java
 @@ -0,0 +1,7 @@
+package org.rhq.core.domain.util;
+
+/**
+ * @author Lukas Krejci
+ */
+public class JoinFetchReportingQueryTranslatorFactory {
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 index 8f0d2cc..d7cc470 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
 @@ -308,7 +308,11 @@ public final class CriteriaQueryGenerator {
 
     public String getQueryString(boolean countQuery) {
         StringBuilder results = new StringBuilder();
+
+        PageControl pc = getPageControl(criteria);
+
         results.append("SELECT ");
+
         if (countQuery) {
             if (groupByClause == null) { // non-grouped method
                 // use count(*) instead of count(alias) due to \
https://bugzilla.redhat.com/show_bug.cgi?id=699842 @@ -325,7 +329,9 @@ public final \
class CriteriaQueryGenerator {  results.append(projection).append(NL);
             }
         }
+
         results.append("FROM ").append(className).append(' \
').append(alias).append(NL); +
         if (countQuery == false) {
             /* 
              * don't fetch in the count query to avoid: "query specified join \
fetching,  @@ -336,19 +342,28 @@ public final class CriteriaQueryGenerator {
                     addPersistentBag(fetchField);
                 } else {
                     if (this.projection == null) {
-                        /* 
+                        /*
                          * if not altering the projection, join fetching can be \
                using
                          * to retrieve the associated instance in the same SELECT
+                         *
+                         * We further avoid a JOIN FETCH when executing queries with \
limits. +                         * Such execution has performance problems that we \
solve by initializing the fields +                         * "manually" in the \
CriteriaQueryRunner and by defining a default batch fetch size in the +               \
                * persistence.xml.
                          */
-                        results.append("LEFT JOIN FETCH \
").append(alias).append('.').append(fetchField).append(NL); +                        \
if (pc.isUnlimited()) { +                            results.append("LEFT JOIN FETCH \
").append(alias).append('.').append(fetchField).append(NL); +                        \
} else { +                            addJoinFetch(fetchField);
+                        }
                     } else {
-                        /* 
+                        /*
                          * if the projection is altered (perhaps converting it into \
                a constructor query), then all
                          * fields specified in the fetch must be in the explicit \
                return list.  this is not possible
                          * today with constructor queries, so any altered projection \
                will implicitly disable fetching.
                          * instead, we'll record which fields need to be explicitly \
                fetched after the primary query
                          * returns the bulk of the data, and use a similar \
                methodology at the SLSB layer to eagerly
-                         * load those before returning the PageList back to the \
caller.  +                         * load those before returning the PageList back to \
                the caller.
                          */
                         addJoinFetch(fetchField);
                     }
@@ -357,7 +372,6 @@ public final class CriteriaQueryGenerator {
         }
 
         // figure out the 'LEFT JOIN's needed for 'ORDER BY' tokens
-        PageControl pc = getPageControl(criteria);
         List<String> orderingFieldRequiredJoins = new ArrayList<String>();
         List<String> orderingFieldTokens = new ArrayList<String>();
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
 index d2a28d5..a788fb0 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryRunner.java
 @@ -25,6 +25,7 @@ package org.rhq.enterprise.server.util;
 
 import java.lang.reflect.Field;
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 
 import javax.persistence.EntityManager;
@@ -46,7 +47,7 @@ public class CriteriaQueryRunner<T> {
     private Criteria criteria;
     private CriteriaQueryGenerator queryGenerator;
     private EntityManager entityManager;
-    private boolean automaticFetching;;
+    private boolean automaticFetching;
 
     public CriteriaQueryRunner(Criteria criteria, CriteriaQueryGenerator \
queryGenerator, EntityManager entityManager) {  this(criteria, queryGenerator, \
entityManager, true); @@ -61,7 +62,7 @@ public class CriteriaQueryRunner<T> {
     }
 
     public PageList<T> execute() {
-        PageList<T> results = null;
+        PageList<T> results;
         PageControl pageControl = CriteriaQueryGenerator.getPageControl(criteria);
 
         Restriction criteriaRestriction = criteria.getRestriction();
@@ -109,7 +110,7 @@ public class CriteriaQueryRunner<T> {
                     initPersistentBags(entity);
                 }
             }
-            if (queryGenerator.isProjectionAltered() && \
!queryGenerator.getJoinFetchFields().isEmpty()) { +            if \
(!queryGenerator.getJoinFetchFields().isEmpty()) {  for (T entity : results) {
                     initJoinFetchFields(entity);
                 }
@@ -148,7 +149,15 @@ public class CriteriaQueryRunner<T> {
     private void initialize(Object entity, Field field) {
         try {
             field.setAccessible(true);
-            Hibernate.initialize(field.get(entity));
+
+            Object instance = field.get(entity);
+
+            Hibernate.initialize(instance);
+
+            if (instance instanceof Iterable) {
+                Iterator<?> it = ((Iterable<?>)instance).iterator();
+                while(it.hasNext()) it.next();
+            }
         } catch (Exception e) {
             LOG.warn("Could not initialize " + field);
         }
diff --git a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java \
b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
 index c012d90..8259fde 100644
--- a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
                
+++ b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
 @@ -419,7 +419,7 @@ public class HibernateDetachUtility {
                         String assistNameDelimiter = \
assistClassName.contains("javassist") ? "_$$_" : "$$";  
                         assistClassName = assistClassName.substring(0, \
                assistClassName.indexOf(assistNameDelimiter));
-                        if (!replacement.getClass().getName().contains("hibernate")) \
{ +                        if (replacement != null && \
                !replacement.getClass().getName().contains("hibernate")) {
                             nullOutUninitializedFields(replacement, checkedObjects, \
checkedObjectCollisionMap,  depth + 1, serializationType);
 
@@ -607,4 +607,4 @@ public class HibernateDetachUtility {
             // ignore this
         }
     }
-}
\ No newline at end of file
+}


commit 6079e06ac677015c8f87838e7ac8e52cc766d5f6
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Mon May 13 12:36:17 2013 +0200

    Bug 962379 - [as7] Garbage Collector Resource misses 'collection-count' and \
'collection-time' per minute metrics

diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml \
b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml index \
                742c4d5..4a26d19 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -7214,8 +7214,8 @@
           <c:simple-property name="includeRuntime" readOnly="true" default="true"/>
         </plugin-configuration>
 
-        <metric property="collection-count" description="The total number of \
                collections that have occurred."/>
-        <metric property="collection-time" description="The approximate accumulated \
collection elapsed time in milliseconds."/> +        <metric \
property="collection-count" description="The total number of collections that have \
occurred." measurementType="trendsup"/> +        <metric property="collection-time" \
description="The approximate accumulated collection elapsed time in milliseconds." \
                measurementType="trendsup"/>
         <metric property="name" dataType="trait" description="The name representing \
                this garbage collector"/>
         <metric property="valid" dataType="trait" description="Whether this this \
memory manager is valid in the Java virtual machine."/>  


commit 8130e34b50dfc81ae0074ac789d784d159b7b9aa
Author: John Mazzitelli <mazz@redhat.com>
Date:   Fri May 10 17:01:01 2013 -0400

    BZ 699893 911692 - if the user ran EAP 5 with cmd line option \
-Djboss.server.data.dir=/some/data/dir  then the AS5 plugin should look there, too, \
to try to find the jnp-service.url file

diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java \
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
 index 01eb105..670347f 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
                
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java
 @@ -500,32 +500,42 @@ public class ApplicationServerDiscoveryComponent implements \
ResourceDiscoveryCom  }
 
     private String getJnpURL(JBossInstanceInfo cmdLine, File installHome, File \
                configDir) {
-        File jnpServiceUrlFile = new File(configDir, "data/jnp-service.url");
-        if (jnpServiceUrlFile.exists() && jnpServiceUrlFile.canRead()) {
-            BufferedReader br = null;
-            try {
-                br = new BufferedReader(new FileReader(jnpServiceUrlFile));
-                String jnpUrl = br.readLine();
-                if (jnpUrl != null) {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Read JNP URL from jnp-service.url file: " + \
jnpUrl); +        ArrayList<File> possibleJnpServiceUrlFiles = new \
ArrayList<File>(2); +        possibleJnpServiceUrlFiles.add(new File(configDir, \
"data/jnp-service.url")); +        // if the app server was told to go somewhere else \
to store its data files, look in there too (BZ 699893) +        if \
(cmdLine.getSystemProperties() != null) { +            String dataDir = \
cmdLine.getSystemProperties().getProperty("jboss.server.data.dir"); +            if \
(dataDir != null) { +                possibleJnpServiceUrlFiles.add(new File(dataDir, \
"jnp-service.url")); +            }
+        }
+        for (File jnpServiceUrlFile : possibleJnpServiceUrlFiles) {
+            if (jnpServiceUrlFile.exists() && jnpServiceUrlFile.canRead()) {
+                BufferedReader br = null;
+                try {
+                    br = new BufferedReader(new FileReader(jnpServiceUrlFile));
+                    String jnpUrl = br.readLine();
+                    if (jnpUrl != null) {
+                        if (log.isDebugEnabled()) {
+                            log.debug("Read JNP URL from jnp-service.url file: " + \
jnpUrl); +                        }
+                        return jnpUrl;
                     }
-                    return jnpUrl;
-                }
-            } catch (IOException ioe) {
-                // Nothing to do
-            } finally {
-                if (br != null) {
-                    try {
-                        br.close();
-                    } catch (IOException e) {
-                        // nada
+                } catch (IOException ioe) {
+                    // Nothing to do
+                } finally {
+                    if (br != null) {
+                        try {
+                            br.close();
+                        } catch (IOException e) {
+                            // nada
+                        }
                     }
                 }
             }
         }
 
-        log.warn("Failed to read JNP URL from '" + jnpServiceUrlFile + "'.");
+        log.warn("Failed to read JNP URL from: " + possibleJnpServiceUrlFiles);
 
         // Above did not work, so fall back to our previous scheme
         JnpConfig jnpConfig = getJnpConfig(installHome, configDir, \
cmdLine.getSystemProperties());


commit d2523a093115225352825051b5a795a7226a7c23
Author: John Mazzitelli <mazz@redhat.com>
Date:   Fri May 10 15:56:04 2013 -0400

    BZ 903402 - fix code if windows drive is missing but otherwise the path is \
absolute

diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstanceInfo.java \
b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstanceInfo.java
 index 35a2263..e3c4a27 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstanceInfo.java
                
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstanceInfo.java
 @@ -243,7 +243,7 @@ public class JBossInstanceInfo {
         for (String pathElement : this.classPath) {
             if (pathElement.endsWith("run.jar")) {
                 runJar = new File(pathElement);
-                if (!runJar.isAbsolute()) {
+                if (!runJar.isAbsolute() && !runJar.exists()) {
                     runJar = new File(this.processInfo.getExecutable().getCwd(), \
runJar.getPath());  }
                 if (!runJar.exists()) {
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstanceInfo.java \
b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstanceInfo.java
 index 9dadd39..b515af7 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstanceInfo.java
                
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstanceInfo.java
 @@ -237,7 +237,7 @@ public class JBossInstanceInfo {
         for (String pathElement : this.classPath) {
             if (pathElement.endsWith("run.jar")) {
                 runJar = new File(pathElement);
-                if (!runJar.isAbsolute()) {
+                if (!runJar.isAbsolute() && !runJar.exists()) {
                     runJar = new File(this.processInfo.getExecutable().getCwd(), \
runJar.getPath());  }
                 if (!runJar.exists()) {


commit 01d875b284d842df2ac4f099598b5f2a5f320bf2
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 10 16:34:51 2013 +0200

    Provide the old method signature as fallback in case other plugins that inherit \
from this one, still need it.

diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
 index 9eb63f9..48fbf1f 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
 @@ -53,12 +53,23 @@ public enum JBossProductType {
     }
 
     /**
+     * Determine the product type of a JBoss install. This implies an api version of \
1.x which +     * is a JBossAS 7.x
+     * @param homeDir the JBoss product installation directory (e.g. \
/opt/jboss-as-7.1.1.Final) +     * @return the product type
+     * @deprecated "Use the version with the apiVersion"
+     */
+    @Deprecated
+    public static JBossProductType determineJBossProductType(File homeDir) {
+        return determineJBossProductType(homeDir,"1.0");
+    }
+
+    /**
      * Determines the product type of a JBoss product installation.
      *
-     *
      * @param homeDir the JBoss product installation directory (e.g. \
                /opt/jboss-as-7.1.1.Final)
      *
-     * @param apiVersion
+     * @param apiVersion Api version of the domain api.
      * @return the product type
      */
     public static JBossProductType determineJBossProductType(File homeDir, String \
apiVersion) {


commit 3bba88c36f7d4a91ac5ac824c0e5b7fd43c3dd0b
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 10 14:39:21 2013 +0200

    BZ 961787 - try to determine AS/WFLY via domain api version before falling back \
to directory names, as this is more reliable.

diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
 index 9a4d5bd..cc13406 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
 @@ -193,7 +193,8 @@ public abstract class BaseProcessDiscovery implements \
ResourceDiscoveryComponent  serverPluginConfig.setHostname(managementHostPort.host);
         serverPluginConfig.setPort(managementHostPort.port);
         pluginConfig.setSimpleValue("realm", \
                hostConfig.getManagementSecurityRealm());
-        JBossProductType productType = \
JBossProductType.determineJBossProductType(homeDir); +        String apiVersion = \
hostConfig.getDomainApiVersion(); +        JBossProductType productType = \
JBossProductType.determineJBossProductType(homeDir, apiVersion);  \
                serverPluginConfig.setProductType(productType);
         pluginConfig.setSimpleValue("hostXmlFileName", \
getHostXmlFileName(commandLine));  
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
 index 9edfb2f..9eb63f9 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JBossProductType.java
 @@ -37,7 +37,7 @@ public enum JBossProductType {
     JPP("JPP", "JBoss EAP 6", "JBoss Portal Platform 6", "Portal Platform"),
 //    EWP("EWP", "JBoss EWP 6", "JBoss Enterprise Web Platform 6", "EWP"),
     SOA("SOA-P", "JBoss SOA-P 6", "JBoss Enterprise SOA Platform (ESB)", "SOAP"),
-    WILDFLY8("WildFly","WildFly 8" ,"WildFly Appliction Server 8" , "WildFly");
+    WILDFLY8("WildFly","WildFly 8" ,"WildFly Application Server 8" , "WildFly");
 
     public final String SHORT_NAME;
     public final String NAME;
@@ -55,13 +55,28 @@ public enum JBossProductType {
     /**
      * Determines the product type of a JBoss product installation.
      *
+     *
      * @param homeDir the JBoss product installation directory (e.g. \
                /opt/jboss-as-7.1.1.Final)
      *
+     * @param apiVersion
      * @return the product type
      */
-    public static JBossProductType determineJBossProductType(File homeDir) {
+    public static JBossProductType determineJBossProductType(File homeDir, String \
apiVersion) {  try {
-            return determineJBossProductTypeViaProductConfFile(homeDir);
+            JBossProductType jBossProductType = \
determineJBossProductTypeViaProductConfFile(homeDir); +            if \
(jBossProductType==null) { +                // Wildfly and The Server Formerly Known \
AS JBossAS share the same absence of a slot +                // and thus have no \
product type. So we need to check differently +                // AS 7.0/1 use a \
domain api version of 1.x, while WildFly uses version 2.0+ +                // like \
2.0 in "urn:jboss:domain:2.0" from <server xmlns="..." > element in standalone.xml +  \
if (apiVersion.startsWith("1")) { +                    jBossProductType = \
JBossProductType.AS; +                } else {
+                    // We should later check for newer WildFly versions to \
differentiate them +                    jBossProductType = JBossProductType.WILDFLY8;
+                }
+            }
+            return jBossProductType;
         } catch (Exception e) {
             // TODO: Log an error.
             return determineJBossProductTypeViaHomeDirName(homeDir);
@@ -109,9 +124,7 @@ public enum JBossProductType {
                 throw new RuntimeException("Unknown product type: " + slot);
             }
         } else {
-            // Wildfly and The Server Formerly Known AS JBossAS share the same \
                absence of a slot
-            // so we need another way to distinguish them
-            productType = determineJBossProductTypeViaHomeDirName(homeDir);
+            productType = null;
         }
 
         return productType;
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/HostConfiguration.java \
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/HostConfiguration.java
 index a8909ff..329246e 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/HostConfiguration.java
                
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/helper/HostConfiguration.java
 @@ -233,6 +233,14 @@ public class HostConfiguration {
         return securityPropertyFile;
     }
 
+    public String getDomainApiVersion() {
+
+        String version = \
document.getFirstChild().getAttributes().getNamedItem("xmlns").getTextContent(); +
+        version = version.substring(version.lastIndexOf(':')+1);
+        return version;
+    }
+
     /**
      * Run the passed xpathExpression on the prepopulated hostXml document and
      * return the target element or attribute as a String.


commit 8868d16074902e9996f00cce8db697d02fce21ad
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 10 12:18:26 2013 +0200

    BZ 960959 apply inventory status filtering with COMMITTED as default for \
searches.

diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java \
b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java index \
                138ca40..2dde3a4 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
@@ -52,7 +52,7 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
          * Use this to get the global fields for this Criteria field type. Don't use \
                inspection as the field names
          * for this abstract base class do not conform (for legacy reasons) to the \
                prefix convention help by the
          * subclasses.
-         *  
+         *
          * @return The set of global fields for this Criteria field type. Meaning, \
                usable by all subclasses.
          */
         public List<String> getGlobalFields() {
@@ -76,7 +76,7 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
      *    private NonBindingOverrideFilter filterResourceOnly; // requires overrides \
                - finds only those associated with a resource
      *    ...
      *    filterOverrides.put("resourceTypeOnly", "resourceType IS NOT NULL"); // \
                notice no ? parameter
-     * 
+     *
      * Note: Typically a null value is analogous to OFF.
      */
     public enum NonBindingOverrideFilter {
@@ -87,12 +87,12 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
      * Apply a restriction to reduce the cost of the {@link Criteria}-based query \
                generation and execution routines.
      */
     public enum Restriction {
-        /** 
+        /**
          * This returns an empty {@link PageList} result whose {@link \
                PageList#getTotalSize()} method otherwise
          * contains the correct value.
          */
         COUNT_ONLY,
-        /** 
+        /**
          * This will return the {@link PageList} result whose {@link \
                PageList#isUnbounded()} returned true, meaning
          * that the value contained within {@link PageList#getTotalSize()} is \
                invalid / undefined.
          */
@@ -121,10 +121,10 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  
     // All Criteria support sorting on ID
     protected PageOrdering sortId;
-    
+
     // All Criteria support filtering on ID
     protected Integer filterId;
-    
+
     // All Criteria support filtering on IDs
     protected List<Integer> filterIds;
 
@@ -176,7 +176,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  addSortField("id");
         this.sortId = sortId;
     }
-    
+
     public void addFilterId(Integer filterId) {
         this.filterId = filterId;
     }
@@ -189,6 +189,13 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
         orderingFieldNames.add("sort" + Character.toUpperCase(fieldName.charAt(0)) + \
fieldName.substring(1));  }
 
+    /**
+     * Sets the paging constraints to return items [pageNumber * pageSize , \
((pageNumber+1) * pageSize) -1 ]. +     * For this to work correctly, you also need \
to set the sort +     * criteria (do not rely on implicit id-sorting to work \
correctly. +     * @param pageNumber The page to fetch. This is 0-based.
+     * @param pageSize The number of items to return.
+     */
     public void setPaging(int pageNumber, int pageSize) {
         this.pageNumber = pageNumber;
         this.pageSize = pageSize;
@@ -196,7 +203,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  
     /**
      * If the pageControl is set, then this criteria object will completely ignore \
                any
-     * calls made to setPaging(pageNumber, pageSize) as well as \
addSortField(fieldName),  +     * calls made to setPaging(pageNumber, pageSize) as \
                well as addSortField(fieldName),
      * which is useful from a server-side calling context where the PageControl \
                object
      * will already have been created for you by the extensions at the JSF layer.
      */
@@ -248,7 +255,7 @@ public abstract class Criteria implements Serializable, \
BaseCriteria {  
     /**
      * If set to true, string-based filters will use exact string matches;
-     * Default is 'false', which means we'll fuzzy match 
+     * Default is 'false', which means we'll fuzzy match
      */
     public void setStrict(boolean strict) {
         this.strict = strict;
@@ -262,9 +269,9 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
      * By default, two queries will be generated for this Criteria: one which \
                fetches the requested page/subset of
      * entity results, and one which fetches the total cardinality of the result \
                set.  If you wish to only retrieve one
      * of those pieces of data, you can do so by setting a restriction on the query \
                generation and execution routines.
-     * 
+     *
      * The restriction, once set, can be removed by passing NULL to this method.
-     * 
+     *
      * @see Restriction
      */
     public void setRestriction(Restriction restriction) {
@@ -325,7 +332,7 @@ public abstract class Criteria implements Serializable, \
                BaseCriteria {
      * Somewhat analogous to JPA's Query.getSingleResult. Wrap a CriteriaQuery \
                result with this method when
      * expecting a single result from the fetch.  If the result set has only one \
                entry it is returned. Otherwise
      * a RuntimeException is thrown, indicating whether no results, or multiple \
                results were found.
-     *    
+     *
      * @param result
      * @return
      * @throws RuntimeException In not exactly one result is found.  The message \
                will include either the String
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 7a198bd..0038099 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -52,8 +52,6 @@ import org.infinispan.Cache;
 import org.infinispan.manager.CacheContainer;
 
 import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.core.domain.measurement.DataType;
 import org.rhq.core.domain.measurement.MeasurementDefinition;
 import org.rhq.core.domain.measurement.MeasurementSchedule;
@@ -349,6 +347,7 @@ public class AbstractRestBean {
         rwt.setTypeName(resourceType.getName());
         rwt.setTypeId(resourceType.getId());
         rwt.setPluginName(resourceType.getPlugin());
+        rwt.setStatus(res.getInventoryStatus().name());
         Resource parent = res.getParentResource();
         if (parent != null) {
             rwt.setParentId(parent.getId());
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/BadArgumentException.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/BadArgumentException.java
 index cea84c2..3879f73 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/BadArgumentException.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/BadArgumentException.java
 @@ -23,7 +23,10 @@ import javax.ejb.ApplicationException;
 /**
  * Exception if arguments are bad.
  * Don't use java.lang.IllegalArgumentException, as this is no
- * Application Exception and gets wrapped
+ * Application Exception and gets wrapped.
+ *
+ * The ExceptionMapper translates this into a 406 repsonse code
+ *
  * @author Heiko W. Rupp
  */
 @ApplicationException(rollback = false, inherited = true)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 3e1d195..288e9f7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -177,14 +177,28 @@ public class ResourceHandlerBean extends AbstractRestBean {
 
     @GET @GZIP
     @Path("/")
+    @ApiError(code = 406, reason = "The passed inventory status was invalid")
     @ApiOperation(value = "Search for resources by the given search string, possibly \
                limited by category and paged", responseClass = "ResourceWithType")
-    public Response getResourcesByQuery(@ApiParam("String to search in the resource \
name") @QueryParam("q") String q, +    public Response \
getResourcesByQuery(@ApiParam("Limit results to param in the resource name") \
                @QueryParam("q") String q,
                                         @ApiParam("Limit to category (PLATFORM, \
                SERVER, SERVICE") @QueryParam("category") String category,
                                         @ApiParam("Page size for paging") \
                @QueryParam("ps") @DefaultValue("20") int pageSize,
-                                        @ApiParam("Page for paging") \
@QueryParam("page") Integer page, +                                        \
@ApiParam("Page for paging, 0-based") @QueryParam("page") Integer page, +             \
@ApiParam(value = "Limit to Inventory status of the resources", allowableValues = \
"ALL, NEW, IGNORED, COMMITTED, DELETED, UNINVENTORIED") +                             \
@DefaultValue("COMMITTED") @QueryParam("status") String status,  @Context HttpHeaders \
headers,  @Context UriInfo uriInfo) {
+
         ResourceCriteria criteria = new ResourceCriteria();
+        if (!status.toLowerCase().equals("all")) {
+            try {
+                criteria.addFilterInventoryStatus(InventoryStatus.valueOf(status.toUpperCase()));
 +            } catch (IllegalArgumentException iae) {
+                throw new BadArgumentException("status","Value " + status + " is not \
in the list of allowed values: ALL, NEW, IGNORED, COMMITTED, DELETED, UNINVENTORIED" \
); +            }
+        } else {
+            // JavaDoc says to explicitly set to null in order to get all Status
+            criteria.addFilterInventoryStatus(null);
+        }
         if (q!=null) {
             criteria.addFilterName(q);
         }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
 index 6b9aace..703e897 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/ResourceWithType.java
 @@ -52,6 +52,7 @@ public class ResourceWithType {
     Integer typeId;
     String pluginName;
     Integer parentId;
+    String status;
     List<Link> links = new ArrayList<Link>();
     private String ancestry;
 
@@ -126,6 +127,15 @@ public class ResourceWithType {
         this.parentId = parentId;
     }
 
+    @ApiProperty(value = "Inventory status of the resource.",allowableValues = "NEW, \
IGNORED, COMMITTED, DELETED, UNINVENTORIED" ) +    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
     @XmlElementRef
     public List<Link> getLinks() {
         return links;
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index c71bbd8..3efd807 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -113,7 +113,6 @@ public class ResourcesTest extends AbstractBase {
     @Test
     public void testGetPlatformUILink() {
 
-        Response response =
         given()
             .header(acceptJson)
             .pathParam("id", _platformId)
@@ -145,6 +144,74 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testResourceQueryAllStatus() throws Exception {
+        String json = get("/resource/platforms.json").asString();
+        String platformName = JsonPath.with(json).get("[0].resourceName");
+
+        given()
+            .header("Accept", "application/json")
+        .with()
+            .queryParam("q", platformName)
+            .queryParam("status","all")
+            .queryParam("category", "platform")
+        .expect()
+            .statusCode(200)
+            .body("links.self", notNullValue())
+        .when()
+            .get("/resource");
+    }
+
+    @Test
+    public void testResourceQueryCommittedStatus() throws Exception {
+        String json = get("/resource/platforms.json").asString();
+        String platformName = JsonPath.with(json).get("[0].resourceName");
+
+        given()
+            .header("Accept", "application/json")
+        .with()
+            .queryParam("q", platformName)
+            .queryParam("status","committed")
+            .queryParam("category", "platform")
+        .expect()
+            .statusCode(200)
+            .body("links.self", notNullValue())
+        .when()
+            .get("/resource");
+    }
+
+    @Test
+    public void testResourceQueryNewStatus() throws Exception {
+
+        // Unfortunately we can not assume that there are
+        // any resources in other states than COMMITTED
+        given()
+            .header("Accept", "application/json")
+        .with()
+            .queryParam("status","NeW")
+        .expect()
+            .statusCode(200)
+        .when()
+            .get("/resource");
+    }
+
+    @Test
+    public void testResourceQueryBadStatus() throws Exception {
+        String json = get("/resource/platforms.json").asString();
+        String platformName = JsonPath.with(json).get("[0].resourceName");
+
+        given()
+            .header("Accept", "application/json")
+        .with()
+            .queryParam("q", platformName)
+            .queryParam("status","Frobnitz")
+            .queryParam("category", "platform")
+        .expect()
+            .statusCode(406)
+        .when()
+            .get("/resource");
+    }
+
+    @Test
     public void testResourceQueryCategory() throws Exception {
 
         with()
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/Resource.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/Resource.java
 index 6cbcea0..f060101 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/Resource.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/Resource.java
 @@ -33,6 +33,7 @@ public class Resource {
     String typeName;
     String pluginName;
     Integer parentId;
+    String status;
     int typeId;
     List<Map> links;
     String ancestry;
@@ -103,4 +104,12 @@ public class Resource {
     public void setAncestry(String ancestry) {
         this.ancestry = ancestry;
     }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
 }


commit c12f45a0dac01b601ce05fc7046042b83e51b184
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Fri May 10 11:15:25 2013 +0200

    Make this test use the RHQ server, so that no external EAP needs to be set up.

diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 index 5532b13..7e3f45a 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ContentTest.java
 @@ -176,7 +176,7 @@ public class ContentTest extends AbstractBase {
         List<Map<String,Object>> resources =
         given()
             .header(acceptJson)
-            .queryParam("q","EAP (127.0.0.1:9990)")  // TODO fragile -- better \
search for it? +            .queryParam("q","EAP (127.0.0.1:6990)")  // TODO Can we \
                identify the RHQ server itself better?
             .queryParam("category","SERVER")
         .expect()
             .statusCode(200)
@@ -188,6 +188,7 @@ public class ContentTest extends AbstractBase {
         assert resources.size()>0;
 
         int as7Id = Integer.valueOf((String)resources.get(0).get("resourceId"));
+        int createdResourceId=-1;
 
         // create child of eap6 as deployment
         try {
@@ -223,25 +224,33 @@ public class ContentTest extends AbstractBase {
             int status = response.getStatusCode();
             String location = response.getHeader("Location");
 
-            System.out.println("Location " + location + "\n\n");
+            System.out.println("\nLocation " + location + "\n\n");
             assert location!=null;
 
             // We need to check what we got. A 302 means the deploy is still
             // in progress, so we need to wait a little longer
             while (status==302) {
 
-                status =
+                response =
                 given()
                     .header(acceptJson)
                     .log().everything()
                 .expect()
-                    .statusCode(isOneOf(200,201,302))
+                    .statusCode(isOneOf(200, 201, 302))
                     .log().everything()
                 .when()
-                    .get(location)
-                .getStatusCode();
+                    .get(location);
+
+                status = response.getStatusCode();
             }
 
+            createdResourceId = response.jsonPath().getInt("resourceId");
+
+            System.out.println("\n  Deploy is done, resource Id = " + \
createdResourceId + " \n"); +            System.out.flush();
+
+            assert  createdResourceId != -1;
+
         } finally {
 
             // Remove the uploaded content
@@ -254,47 +263,23 @@ public class ContentTest extends AbstractBase {
             .when()
                 .delete("/content/{handle}");
 
+            System.out.println("\n  Content removed \n");
+            System.out.flush();
+
+
+            // We need to wait here a little, as the machinery is not used to
+            // quick create-delete-cycles
+            Thread.sleep(20*1000L);
 
-            // try to remove the created resource
-            Response response =
             given()
-                .queryParam("q", "test-simple.war")
                 .header(acceptJson)
+                .queryParam("physical", "true") // Also remove target on the EAP \
instance +                .pathParam("id",createdResourceId)
+                .log().everything()
             .expect()
                 .log().everything()
             .when()
-                .get("/resource");
-
-            List links = response.body().jsonPath().getList("links");
-
-            System.out.println(links);
-            assert links!=null;
-
-            if (links.size()>0) {
-
-                String link = null;
-                @SuppressWarnings("unchecked")
-                List<Map<String,Map<String,String>>> listOfMaps = (List<Map<String, \
                Map<String, String>>>) links.get(0);
-
-                for (Map<String,Map<String,String>>  map : listOfMaps) {
-                    if (map.containsKey("self")) {
-                        link = map.get("self").get("href");
-                        break;
-                    }
-                }
-
-                assert link != null;
-
-                System.out.println("Link: " + link);
-
-                given()
-                    .header(acceptJson)
-                    .queryParam("physical","true") // Also remove target on the EAP \
                instance
-                .expect()
-                    .log().everything()
-                .when()
-                    .delete(link);
-            }
+                .delete("/resource/{id}");
 
         }
 


commit 80e9f520ab6dfa5fa42357aa7fa5dbfdeb98d631
Author: John Mazzitelli <mazz@redhat.com>
Date:   Thu May 9 21:50:21 2013 -0400

    BZ 951382 - if keystore/truststore is left undefined in agent config, we'll \
explicitly set the pref for the user using the  "conf/" location

diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java \
                index d959552..6e1a95a 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java
@@ -2313,6 +2313,9 @@ public class AgentMain {
      * @throws Exception if any error causes the startup to fail
      */
     private void startCommServices(BootstrapLatchCommandListener listener) throws \
Exception { +        // BZ 951382 - if any locations for keystore/truststore are not \
configured, set our own defaults to the conf/ directory +        \
assignDefaultLocationToKeystoreTruststoreFiles(); +
         // create our client sender so we can send commands to our server
         // do this before we create our auto-discovery listener and start the \
                server-side services
         // since it will be needed by the listener very quickly if the server is \
already online @@ -2348,6 +2351,41 @@ public class AgentMain {
         return;
     }
 
+    private void assignDefaultLocationToKeystoreTruststoreFiles() {
+        File confDir = new File("conf");
+        if (!confDir.exists()) {
+            return; // conf/ doesn't exist (perhaps we are running in a test?) - do \
nothing and just fallback to the standard defaults +        }
+
+        String prefNamesFileNames[][] = {
+            { ServiceContainerConfigurationConstants.CONNECTOR_SECURITY_KEYSTORE_FILE,
 +                ServiceContainerConfigurationConstants.DEFAULT_CONNECTOR_SECURITY_KEYSTORE_FILE_NAME \
}, +            { ServiceContainerConfigurationConstants.CONNECTOR_SECURITY_TRUSTSTORE_FILE,
 +                ServiceContainerConfigurationConstants.DEFAULT_CONNECTOR_SECURITY_TRUSTSTORE_FILE_NAME \
}, +            { AgentConfigurationConstants.CLIENT_SENDER_SECURITY_KEYSTORE_FILE,
+                AgentConfigurationConstants.DEFAULT_CLIENT_SENDER_SECURITY_KEYSTORE_FILE_NAME \
}, +            { AgentConfigurationConstants.CLIENT_SENDER_SECURITY_TRUSTSTORE_FILE,
+                AgentConfigurationConstants.DEFAULT_CLIENT_SENDER_SECURITY_TRUSTSTORE_FILE_NAME \
} }; +
+        Preferences prefs = m_configuration.getPreferences();
+        for (String[] prefNameFileName : prefNamesFileNames) {
+            String value = prefs.get(prefNameFileName[0], null);
+            if (value == null) {
+                value = new File(confDir, prefNameFileName[1]).getAbsolutePath();
+                prefs.put(prefNameFileName[0], value);
+                LOG.debug(AgentI18NResourceKeys.CERT_FILE_LOCATION, \
prefNameFileName[0], value); +            }
+        }
+
+        try {
+            prefs.flush();
+        } catch (Exception e) {
+            LOG.warn(AgentI18NResourceKeys.CANNOT_STORE_PREFERENCES, \
"keystore/truststore files", e); +        }
+
+        return;
+    }
+
     private boolean isAutoDiscoveryEnabled() {
         return m_autoDiscoveryListener != null;
     }
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
 index 10761ff..21a39a9 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
 @@ -28,6 +28,9 @@ import mazz.i18n.annotation.I18NResourceBundle;
  */
 @I18NResourceBundle(baseName = "agent-messages", defaultLocale = "en")
 public interface AgentI18NResourceKeys {
+    @I18NMessage("Explicitly setting file location [{0}] to [{1}]")
+    String CERT_FILE_LOCATION = "AgentConfiguration.cert-file-location";
+
     @I18NMessage("The configured server alias [{0}] cannot be resolved - will use \
                localhost address. Cause: {1}")
     String SERVER_ALIAS_UNKNOWN = "AgentConfiguration.server-alias-unknown";
 


commit 7c4577c895a469b5ddce6aa91eb6935eb5cf6cc9
Author: John Mazzitelli <mazz@redhat.com>
Date:   Wed May 8 22:23:58 2013 -0400

    BZ 535800 - can't use default protocol because it is automatically initialized \
and cached, not allowing us to use a customized one  add a main() for quick testing

diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java
 index 6097ebe..16a4544 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java
 @@ -23,7 +23,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.net.URL;
 import java.security.KeyStore;
-import java.security.NoSuchAlgorithmException;
 import java.security.cert.X509Certificate;
 
 import javax.net.ssl.HostnameVerifier;
@@ -62,29 +61,13 @@ public class SecureConnector {
     private final String truststoreAlgorithm;
 
     /**
-     * The {@link #openSecureConnection(URL) secure connections} built by this \
                object will not
-     * authenticate the server endpoint, but they will use the default secure socket \
                protocol to
-     * encrypt the connection traffic (see \
                <code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>).
-     *
-     * @throws NoSuchAlgorithmException if the default secure connection protocol \
                cannot be determined
-     */
-    public SecureConnector() throws NoSuchAlgorithmException {
-        this(null, null, null, null, null);
-    }
-
-    /**
      * The {@link #openSecureConnection(URL) secure connections} built by this \
                object will
      * not authenticate the server endpoint, but they will use the given secure \
                socket protocol
      * to encrypt the connection traffic.
      * 
-     * @param secureSocketProtocol the secure socket protocol to use; if \
                <code>null</code>, then
-     *                             the JVM's default secure socket protocol will be \
                used
-     *                             (see \
                <code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>)
-     *
-     * @throws NoSuchAlgorithmException if <code>secureSocketProtocol</code> is \
                <code>null</code>, and
-     *                                  the default secure connection protocol \
cannot be determined +     * @param secureSocketProtocol the secure socket protocol \
                to use (e.g. "TLS")
      */
-    public SecureConnector(String secureSocketProtocol) throws \
NoSuchAlgorithmException { +    public SecureConnector(String secureSocketProtocol) {
         this(secureSocketProtocol, null, null, null, null);
     }
 
@@ -97,28 +80,22 @@ public class SecureConnector {
      * truststore parameters are ignored and the secure connections built by this \
                object will
      * not authenticate the server endpoint.
      *
-     * @param secureSocketProtocol the secure socket protocol to use; if \
                <code>null</code>, then
-     *                             the JVM's default secure socket protocol will be \
                used
-     *                             (see \
<code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>) +     * @param \
                secureSocketProtocol the secure socket protocol to use (e.g. "TLS")
      * @param truststoreFile the truststore file containing authorized certificates
-     * @param truststorePassword the password to the truststore file
-     * @param truststoreType the type of the truststore file; if <code>null</code>, \
then the JVM's +     * @param truststorePassword the password to the truststore file \
(if a file is given, this must not be <code>null</code>) +     * @param \
truststoreType the type of the truststore file (e.g. "JKS"); if <code>null</code>, \
                then the JVM's
      *                       default type is used (see \
                <code>java.security.KeyStore.getDefaultType()</code>)
-     * @param truststoreAlgorithm the standard name of the trust management \
                algorithm; if <code>null</code>,
-     *                            then the JVM's default algorithm is used (see
+     * @param truststoreAlgorithm the standard name of the trust management \
algorithm (e.g. "SunX509"); +     *                            if <code>null</code>, \
                then the JVM's default algorithm is used (see
      *                            \
                <code>javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()</code>)
-     *
-     * @throws NoSuchAlgorithmException if <code>secureSocketProtocol</code> is \
                <code>null</code>, and
-     *                                  the default secure connection protocol \
                cannot be determined
      */
     public SecureConnector(String secureSocketProtocol, File truststoreFile, String \
                truststorePassword,
-        String truststoreType, String truststoreAlgorithm) throws \
NoSuchAlgorithmException { +        String truststoreType, String \
truststoreAlgorithm) {  
         if (secureSocketProtocol == null) {
-            this.secureSocketProtocol = SSLContext.getDefault().getProtocol();
-        } else {
-            this.secureSocketProtocol = secureSocketProtocol;
+            throw new IllegalArgumentException("secure socket protocol cannot be \
null");  }
+        this.secureSocketProtocol = secureSocketProtocol;
 
         if (truststoreFile == null) {
             // no truststore file was provided, we don't need to know any truststore \
parameters @@ -129,17 +106,21 @@ public class SecureConnector {
         } else {
             // the truststore file is provided, make sure we have non-null \
truststore parameters, using defaults if need be  this.truststoreFile = \
truststoreFile; +
+            if (truststorePassword == null) {
+                throw new IllegalArgumentException("truststorePassword cannot be \
null"); +            }
             this.truststorePassword = truststorePassword;
 
             if (truststoreType == null) {
                 truststoreType = KeyStore.getDefaultType();
             }
-            this.truststoreType = (truststoreType != null) ? truststoreType : "JKS";
+            this.truststoreType = truststoreType;
 
             if (truststoreAlgorithm == null) {
                 truststoreAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
             }
-            this.truststoreAlgorithm = (truststoreAlgorithm != null) ? \
truststoreAlgorithm : "SunX509"; +            this.truststoreAlgorithm = \
truststoreAlgorithm;  }
 
         return;
@@ -216,4 +197,16 @@ public class SecureConnector {
             return true;
         }
     };
+
+    public static void main(String[] args) throws Exception {
+        HttpsURLConnection conn = new \
SecureConnector("TLS").openSecureConnection(new URL(args[0])); +        \
java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream(); +        \
java.io.InputStream input = new java.io.BufferedInputStream(conn.getInputStream(), \
32768); +        byte[] buffer = new byte[32768];
+        for (int bytesRead = input.read(buffer); bytesRead != -1; bytesRead = \
input.read(buffer)) { +            out.write(buffer, 0, bytesRead);
+        }
+        out.flush();
+        System.out.println(out.toString());
+    }
 }
\ No newline at end of file


commit 2c6438cd554b64aa97f2b83d1d5fe7f005d9f68f
Author: John Mazzitelli <mazz@redhat.com>
Date:   Wed May 8 16:43:36 2013 -0400

    BZ 535800 - allow the agent to download the agent update binary over the \
configured SSL channel

diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateDownload.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateDownload.java
 index 9edad7f..ccd46db 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateDownload.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateDownload.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,8 @@ import java.io.InputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
 
+import javax.net.ssl.HttpsURLConnection;
+
 import mazz.i18n.Logger;
 
 import org.rhq.core.util.MessageDigestGenerator;
@@ -153,7 +155,13 @@ public class AgentUpdateDownload {
                 // we only support http/s
                 url = getDownloadUrl();
                 LOG.info(AgentI18NResourceKeys.UPDATE_DOWNLOAD_RETRIEVAL, info, \
                url);
-                conn = (HttpURLConnection) url.openConnection();
+
+                if (url.getProtocol().equals("https")) {
+                    conn = openSecureConnection(url);
+                } else {
+                    conn = (HttpURLConnection) url.openConnection(); // we only \
support http(s), so this cast is OK +                }
+
                 inStream = conn.getInputStream();
 
                 // put the update content in the local file system
@@ -277,4 +285,24 @@ public class AgentUpdateDownload {
             return false;
         }
     }
+
+    private HttpsURLConnection openSecureConnection(URL url) throws Exception {
+        AgentConfiguration config = this.agent.getConfiguration();
+        String secureSocketProtocol = \
config.getClientSenderSecuritySocketProtocol(); +        SecureConnector \
secureConnector; +        if (config.isClientSenderSecurityServerAuthMode()) {
+            File file = new File(config.getClientSenderSecurityTruststoreFile());
+            if (!file.isAbsolute()) {
+                file = new File(this.agent.getAgentHomeDirectory(), file.getPath());
+            }
+            String password = config.getClientSenderSecurityTruststorePassword();
+            String type = config.getClientSenderSecurityTruststoreType();
+            String algorithm = config.getClientSenderSecurityTruststoreAlgorithm();
+            secureConnector = new SecureConnector(secureSocketProtocol, file, \
password, type, algorithm); +        } else {
+            secureConnector = new SecureConnector(secureSocketProtocol);
+        }
+
+        return secureConnector.openSecureConnection(url);
+    }
 }
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateVersion.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateVersion.java
 index b429fa8..6ef123a 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateVersion.java
                
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentUpdateVersion.java
 @@ -1,6 +1,6 @@
 /*
  * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -18,11 +18,14 @@
  */
 package org.rhq.enterprise.agent;
 
+import java.io.File;
 import java.io.InputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.Properties;
 
+import javax.net.ssl.HttpsURLConnection;
+
 import mazz.i18n.Logger;
 
 import org.rhq.core.util.exception.ThrowableUtil;
@@ -100,7 +103,13 @@ public class AgentUpdateVersion {
                 // we only support http/s
                 url = getVersionUrl();
                 LOG.debug(AgentI18NResourceKeys.UPDATE_VERSION_RETRIEVAL, url);
-                conn = (HttpURLConnection) url.openConnection();
+
+                if (url.getProtocol().equals("https")) {
+                    conn = openSecureConnection(url);
+                } else {
+                    conn = (HttpURLConnection) url.openConnection(); // we only \
support http(s), so this cast is OK +                }
+
                 versionProps = new Properties();
                 inStream = conn.getInputStream();
                 versionProps.load(inStream);
@@ -142,4 +151,24 @@ public class AgentUpdateVersion {
 
         return;
     }
+
+    private HttpsURLConnection openSecureConnection(URL url) throws Exception {
+        AgentConfiguration config = this.agent.getConfiguration();
+        String secureSocketProtocol = \
config.getClientSenderSecuritySocketProtocol(); +        SecureConnector \
secureConnector; +        if (config.isClientSenderSecurityServerAuthMode()) {
+            File file = new File(config.getClientSenderSecurityTruststoreFile());
+            if (!file.isAbsolute()) {
+                file = new File(this.agent.getAgentHomeDirectory(), file.getPath());
+            }
+            String password = config.getClientSenderSecurityTruststorePassword();
+            String type = config.getClientSenderSecurityTruststoreType();
+            String algorithm = config.getClientSenderSecurityTruststoreAlgorithm();
+            secureConnector = new SecureConnector(secureSocketProtocol, file, \
password, type, algorithm); +        } else {
+            secureConnector = new SecureConnector(secureSocketProtocol);
+        }
+
+        return secureConnector.openSecureConnection(url);
+    }
 }
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java \
b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java
 new file mode 100644
index 0000000..6097ebe
--- /dev/null
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/SecureConnector.java
 @@ -0,0 +1,219 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.enterprise.agent;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+
+/**
+ * If you need to make a connection to an external HTTP server using the https \
protocol, + * use this class to build the connection. You can specify which trusted \
certificates can be used + * to verify and authenticate the remote server via \
truststore file parameters passed into the constructor. + * In other words, you don't \
have to rely on the global system properties javax.net.ssl.keyStore and + * \
javax.net.ssl.trustStore to make your connection. + * 
+ * This is useful if some other object running in your JVM requires
+ * javax.net.ssl.keyStore/javax.net.ssl.trustStore set to something other than what \
you want to use. + * Since those system properties can only be set once during the \
lifetime of the JVM, it is not possible + * to change them at runtime and expect the \
change to take effect. Besides, even if you could change them, + * this could then \
effect the other objects that do need those properties set to particular values. + *
+ * This object has the ability to make an encrypted call without requiring a \
truststore to exist (that is, + * you can encrypt the call but you will not have the \
server endpoint verified and authenticated). This + * can be useful if you aren't \
concerned with authenticating the endpoint but do want to encrypt the + * traffic.
+ *
+ * @author John Mazzitelli
+ */
+public class SecureConnector {
+    private final String secureSocketProtocol;
+    private final File truststoreFile;
+    private final String truststorePassword;
+    private final String truststoreType;
+    private final String truststoreAlgorithm;
+
+    /**
+     * The {@link #openSecureConnection(URL) secure connections} built by this \
object will not +     * authenticate the server endpoint, but they will use the \
default secure socket protocol to +     * encrypt the connection traffic (see \
<code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>). +     *
+     * @throws NoSuchAlgorithmException if the default secure connection protocol \
cannot be determined +     */
+    public SecureConnector() throws NoSuchAlgorithmException {
+        this(null, null, null, null, null);
+    }
+
+    /**
+     * The {@link #openSecureConnection(URL) secure connections} built by this \
object will +     * not authenticate the server endpoint, but they will use the given \
secure socket protocol +     * to encrypt the connection traffic.
+     * 
+     * @param secureSocketProtocol the secure socket protocol to use; if \
<code>null</code>, then +     *                             the JVM's default secure \
socket protocol will be used +     *                             (see \
<code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>) +     *
+     * @throws NoSuchAlgorithmException if <code>secureSocketProtocol</code> is \
<code>null</code>, and +     *                                  the default secure \
connection protocol cannot be determined +     */
+    public SecureConnector(String secureSocketProtocol) throws \
NoSuchAlgorithmException { +        this(secureSocketProtocol, null, null, null, \
null); +    }
+
+    /**
+     * The {@link #openSecureConnection(URL) secure connections} built by this \
object will +     * authenticate the server endpoint using the given truststore file \
and its related parameters. +     * The connection will use the given secure socket \
protocol to encrypt the connection traffic. +     *
+     * Note that if the given <code>truststoreFile</code> is <code>null</code>, the \
other +     * truststore parameters are ignored and the secure connections built by \
this object will +     * not authenticate the server endpoint.
+     *
+     * @param secureSocketProtocol the secure socket protocol to use; if \
<code>null</code>, then +     *                             the JVM's default secure \
socket protocol will be used +     *                             (see \
<code>javax.net.ssl.SSLContext.getDefault().getProtocol()</code>) +     * @param \
truststoreFile the truststore file containing authorized certificates +     * @param \
truststorePassword the password to the truststore file +     * @param truststoreType \
the type of the truststore file; if <code>null</code>, then the JVM's +     *         \
default type is used (see <code>java.security.KeyStore.getDefaultType()</code>) +     \
* @param truststoreAlgorithm the standard name of the trust management algorithm; if \
<code>null</code>, +     *                            then the JVM's default \
algorithm is used (see +     *                            \
<code>javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()</code>) +     *
+     * @throws NoSuchAlgorithmException if <code>secureSocketProtocol</code> is \
<code>null</code>, and +     *                                  the default secure \
connection protocol cannot be determined +     */
+    public SecureConnector(String secureSocketProtocol, File truststoreFile, String \
truststorePassword, +        String truststoreType, String truststoreAlgorithm) \
throws NoSuchAlgorithmException { +
+        if (secureSocketProtocol == null) {
+            this.secureSocketProtocol = SSLContext.getDefault().getProtocol();
+        } else {
+            this.secureSocketProtocol = secureSocketProtocol;
+        }
+
+        if (truststoreFile == null) {
+            // no truststore file was provided, we don't need to know any truststore \
parameters +            this.truststoreFile = null;
+            this.truststorePassword = null;
+            this.truststoreType = null;
+            this.truststoreAlgorithm = null;
+        } else {
+            // the truststore file is provided, make sure we have non-null \
truststore parameters, using defaults if need be +            this.truststoreFile = \
truststoreFile; +            this.truststorePassword = truststorePassword;
+
+            if (truststoreType == null) {
+                truststoreType = KeyStore.getDefaultType();
+            }
+            this.truststoreType = (truststoreType != null) ? truststoreType : "JKS";
+
+            if (truststoreAlgorithm == null) {
+                truststoreAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
+            }
+            this.truststoreAlgorithm = (truststoreAlgorithm != null) ? \
truststoreAlgorithm : "SunX509"; +        }
+
+        return;
+    }
+
+    public HttpsURLConnection openSecureConnection(URL url) throws Exception {
+        // we assume the URL is https - if it is not, its an error so just let the \
cast throw exception +        HttpsURLConnection connection = (HttpsURLConnection) \
url.openConnection(); +
+        TrustManager[] trustManagers;
+        SSLContext sslContext = SSLContext.getInstance(getSecureSocketProtocol());
+
+        if (getTruststoreFile() == null) {
+            // we are configured to not care about authenticating the server, just \
encrypt but don't worry about certificates +            trustManagers = new \
TrustManager[] { NO_OP_TRUST_MANAGER }; +            \
connection.setHostnameVerifier(NO_OP_HOSTNAME_VERIFIER); +        } else {
+            // We need to configure our SSL connection with the agent's truststore \
so we can authenticate the server. +            // First, create a KeyStore, but load \
it with our truststore entries. +            KeyStore keyStore = \
KeyStore.getInstance(getTruststoreType()); +            keyStore.load(new \
FileInputStream(getTruststoreFile()), getTruststorePassword().toCharArray()); +       \
// now create a truststore manager instance and initialize it with our KeyStore we \
created with all our truststore entries +            TrustManagerFactory tmf = \
TrustManagerFactory.getInstance(getTruststoreAlgorithm()); +            \
tmf.init(keyStore); +            trustManagers = tmf.getTrustManagers();
+        }
+
+        sslContext.init(null, trustManagers, null);
+        connection.setSSLSocketFactory(sslContext.getSocketFactory());
+
+        return connection;
+    }
+
+    public String getSecureSocketProtocol() {
+        return this.secureSocketProtocol;
+    }
+
+    public File getTruststoreFile() {
+        return this.truststoreFile;
+    }
+
+    public String getTruststorePassword() {
+        return this.truststorePassword;
+    }
+
+    public String getTruststoreType() {
+        return this.truststoreType;
+    }
+
+    public String getTruststoreAlgorithm() {
+        return this.truststoreAlgorithm;
+    }
+
+    private static TrustManager NO_OP_TRUST_MANAGER = new X509TrustManager() {
+        @Override
+        public X509Certificate[] getAcceptedIssuers() {
+            return new X509Certificate[0];
+        }
+
+        @Override
+        public void checkClientTrusted(X509Certificate[] certs, String authType) {
+            return;
+        }
+
+        @Override
+        public void checkServerTrusted(X509Certificate[] certs, String authType) {
+            return;
+        }
+    };
+
+    private static HostnameVerifier NO_OP_HOSTNAME_VERIFIER = new HostnameVerifier() \
{ +        @Override
+        public boolean verify(String s, SSLSession sslSession) {
+            return true;
+        }
+    };
+}
\ No newline at end of file


commit 8091c631ae4cebe9a19825f3c107753590bec922
Author: Mike Thompson <mithomps@redhat.com>
Date:   Wed May 8 10:15:23 2013 -0700

    [BZ 960646] - RFE Redesigned Availability Chart - i18n.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index f0db5a2..fbce610 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -124,11 +124,13 @@ public class AvailabilityOverUnderGraphType {
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartDateLabel()(),
                
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartTimeLabel()(),
                
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverStartLabel()(),
                
-                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverEndLabel()(),
                
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverBarLabel()(),
                
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverAvailabilityLabel()(),
                
                         \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverTimeFormat()(),
                
-                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverDateFormat()()
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverDateFormat()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getAvailChartTitleLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getAvailChartUpLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getAvailChartDownLabel()()
  );
 
 
@@ -264,7 +266,7 @@ public class AvailabilityOverUnderGraphType {
                         .style("font-family", "Arial, Verdana, sans-serif;")
                         .style("font-weight", "bold")
                         .attr("fill", "#003168")
-                        .text("Availability");
+                        .text(availChartContext.chartTitle);
 
                 svg.append("text")
                         .attr("class", "upLabel")
@@ -274,7 +276,7 @@ public class AvailabilityOverUnderGraphType {
                         .style("font-size", "9px")
                         .attr("fill", "#50505a")
                         .style("text-anchor", "end")
-                        .text("UP");
+                        .text(availChartContext.chartUpLabel);
 
                 svg.append("text")
                         .attr("class", "downLabel")
@@ -284,7 +286,7 @@ public class AvailabilityOverUnderGraphType {
                         .style("font-size", "9px")
                         .attr("fill", "#50505a")
                         .style("text-anchor", "end")
-                        .text("DOWN");
+                        .text(availChartContext.chartDownLabel);
 
             }
 
@@ -355,8 +357,16 @@ public class AvailabilityOverUnderGraphType {
         return MSG.chart_hover_start_label();
     }
 
-    public String getChartHoverEndLabel() {
-        return MSG.chart_hover_end_label();
+    public String getAvailChartDownLabel() {
+        return MSG.avail_chart_down_label();
+    }
+
+    public String getAvailChartUpLabel() {
+        return MSG.avail_chart_up_label();
+    }
+
+    public String getAvailChartTitleLabel() {
+        return MSG.avail_chart_title_label();
     }
 
     public String getChartHoverBarLabel() {
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
 index 0c5af20..00a68ef 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
 @@ -6,6 +6,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+avail_chart_down_label = DOWN
+avail_chart_title_label = Availability
+avail_chart_up_label = UP
 chart_date_label = Date
 chart_down_label = Down
 chart_hover_availability_label = Availability
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
 index 42405aa..a27fb3c 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
 @@ -29,6 +29,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 index 8185e7f..5415ed0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
 @@ -9,6 +9,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
 index c15e129..8f47413 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
 @@ -9,6 +9,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
 index 8105460..5d19d06 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
 @@ -7,6 +7,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
 index d50a54e..743c4b5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
 @@ -6,6 +6,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
 index fb45e35..772c4e4 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
 @@ -6,6 +6,9 @@
 ##   http://rhq-project.org/display/RHQ/Working+with+the+Resource+Bundles
 ##
 ####################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties \
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
 index e929386..03dfa4e 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
                
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
 @@ -6,6 +6,9 @@
 #   https://docs.jboss.org/author/display/RHQ/Working+with+the+Resource+Bundles
 #
 ###################################
+##avail_chart_down_label = DOWN
+##avail_chart_title_label = Availability
+##avail_chart_up_label = UP
 ##chart_date_label = Date
 ##chart_down_label = Down
 ##chart_time_label = Start
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js \
b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js index 081a9a2..3b35252 \
                100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
+++ b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
@@ -48,7 +48,7 @@ var ChartContext = function (chartId, chartHeight, metricsData, \
xAxisLabel, char  this.chartSelection = this.chartHandle + " svg";
 
 },
-AvailChartContext = function (chartId, availData, dateLabel, timeLabel, \
hoverStartLabel, hoverEndLabel, hoverBarLabel, availabilityLabel, \
chartHoverTimeFormat, chartHoverDateFormat) { +AvailChartContext = function (chartId, \
availData, dateLabel, timeLabel, hoverStartLabel, hoverBarLabel, availabilityLabel, \
chartHoverTimeFormat, chartHoverDateFormat, chartTitle, chartUpLabel, chartDownLabel) \
{  "use strict";
     if (!(this instanceof AvailChartContext)) {
         throw new Error("AvailChartContext function cannot be called as a \
function.") @@ -60,10 +60,12 @@ AvailChartContext = function (chartId, availData, \
dateLabel, timeLabel, hoverSta  this.dateLabel = dateLabel;
     this.timeLabel = timeLabel;
     this.hoverStartLabel = hoverStartLabel;
-    this.hoverEndLabel = hoverEndLabel;
     this.hoverBarLabel = hoverBarLabel;
     this.hoverBarAvailabilityLabel = availabilityLabel;
     this.chartHoverTimeFormat = chartHoverTimeFormat;
     this.chartHoverDateFormat = chartHoverDateFormat;
+    this.chartTitle = chartTitle;
+    this.chartDownLabel = chartDownLabel;
+    this.chartUpLabel = chartUpLabel;
 
 };


commit 59df0f08367521576187063a6bbafaa6ba0be9c2
Author: Mike Thompson <mithomps@redhat.com>
Date:   Wed May 8 08:45:18 2013 -0700

    Make x-axis more readable on Safari, IE. These browsers even though they are \
using the same SVG fonts, render wider fonts showing up as labels running into one \
another. Reduced the clutter on the x-axis for increased readability.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index e38df39..f0db5a2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -162,7 +162,7 @@ public class AvailabilityOverUnderGraphType {
 
                         xAxis = $wnd.d3.svg.axis()
                                 .scale(timeScale)
-                                .ticks(12)
+                                .ticks(8)
                                 .tickSize(13, 0, 0)
                                 .orient("bottom"),
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 index bf08615..4d71192 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 @@ -129,13 +129,8 @@ public class StackedBarMetricGraphImpl extends AbstractGraph {
                     else {
                         console.log("Using Large Charts Profile");
                         //  we use the width already defined above
-                        if(isIEBrowserGreaterThanOrEqualTo(9)){
-                            xTicks = 8;
-                            xTickSubDivide = 5;
-                        }else {
-                            xTicks = 12;
-                            xTickSubDivide = 5;
-                        }
+                        xTicks = 8;
+                        xTickSubDivide = 5;
                         chartData = chartContext.data;
                     }
 


commit c8bbd8b0c5dcfa51a2d653a95bc83d73d80178be
Author: Mike Thompson <mithomps@redhat.com>
Date:   Wed May 8 08:30:08 2013 -0700

    [BZ 960521]  Globally uncaught exception on clicking on resource name link on \
IE9.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index 4e6a0ce..e38df39 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -215,7 +215,7 @@ public class AvailabilityOverUnderGraphType {
                             }
                             else {
                                 // should not ever happen, but...
-                                console.warn("AvailabilityType not valid.");
+                                console.log("AvailabilityType not valid.");
                                 return "#000"; //black
                             }
                         },
@@ -318,13 +318,11 @@ public class AvailabilityOverUnderGraphType {
 
             return {
                 // Public API
-                draw: function (chartContext) {
+                draw: function (availChartContext) {
                     "use strict";
-                    console.info("AvailabilityChart");
-                    //console.time("availabilityChart");
+                    console.log("AvailabilityChart");
                     drawBars(availChartContext);
                     createHovers();
-                    //console.timeEnd("availabilityChart");
                 }
             }; // end public closure
 
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 index 15f400d..bf08615 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 @@ -38,7 +38,7 @@ public class StackedBarMetricGraphImpl extends AbstractGraph {
      */
     @Override
     public native void drawJsniChart() /*-{
-        //console.log("Draw Stacked Bar jsni chart");
+        console.log("Draw Stacked Bar jsni chart");
         var global = this,
 
         // create a chartContext object (from rhq.js) with the data required to \
render to a chart @@ -120,14 +120,14 @@ public class StackedBarMetricGraphImpl \
extends AbstractGraph {  
                     // if window is too small server up small chart
                     if (useSmallCharts()) {
-                        //console.log("Using Small Charts Profile for width: \
"+getChartWidth()); +                        console.log("Using Small Charts Profile \
for width: "+getChartWidth());  width = 250;
                         xTicks = 3;
                         xTickSubDivide = 2;
                         chartData = chartContext.data.slice(chartContext.data.length \
- numberOfBarsForSmallGraph, chartContext.data.length - 1);  }
                     else {
-                        //console.log("Using Large Charts Profile");
+                        console.log("Using Large Charts Profile");
                         //  we use the width already defined above
                         if(isIEBrowserGreaterThanOrEqualTo(9)){
                             xTicks = 8;
@@ -613,8 +613,7 @@ public class StackedBarMetricGraphImpl extends AbstractGraph {
                     "use strict";
                     // Guard condition that can occur when a portlet has not been \
configured yet  if (chartContext.data.length > 0) {
-                        //console.info("Creating Chart: "+ \
                chartContext.chartSelection + " --> "+ chartContext.chartTitle);
-                        //console.time("chart");
+                        console.log("Creating Chart: "+ chartContext.chartSelection \
+ " --> "+ chartContext.chartTitle);  
                         determineScale();
                         createHeader(chartContext.chartTitle);
@@ -624,11 +623,10 @@ public class StackedBarMetricGraphImpl extends AbstractGraph {
                         createXandYAxes();
                         createAvgLines();
                         if (oobMax > 0) {
-                            //console.info("OOB Data Exists!");
+                            console.log("OOB Data Exists!");
                             createOOBLines();
                         }
                         createHovers(chartContext);
-                        //console.timeEnd("chart");
                     }
                 }
             }; // end public closure
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js \
b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js index 27c4cc0..081a9a2 \
                100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
+++ b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
@@ -2,29 +2,9 @@
  * Charting Javascript Functions.
  */
 
-// Avoid `console` errors in browsers that lack a console.
-(function() {
-        var method;
-        var noop = function () {};
-        var methods = [
-        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
-        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
-        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
-        'timeStamp', 'trace', 'warn'
-        ];
-        var length = methods.length;
-        var console = (window.console = window.console || {});
-
-        while (length--) {
-                method = methods[length];
-
-            // Only stub undefined methods.
-                if (!console[method]) {
-                console[method] = noop;
-                }
-        }
-} ());
-
+// Handle browsers not supporting console object
+if (!window.console) window.console = {};
+if (!window.console.log) window.console.log = function () { };
 
 /**
  * ChartContext Constructor Object


commit db8f9686b96e2e3c44e61162b1a0d2d388fc59e9
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Wed May 8 13:48:42 2013 +0200

    BZ 960529 - check for non-existing resources when obtaining availability

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 4e00625..3e1d195 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -338,6 +338,10 @@ public class ResourceHandlerBean extends AbstractRestBean {
             @ApiParam(value="Start time", defaultValue = "30 days ago") \
                @QueryParam("start") long start,
             @ApiParam(value="End time", defaultValue = "Now") @QueryParam("end") \
long end,  @Context HttpHeaders headers) {
+
+        // Vaildate it the resource exists
+        fetchResource(resourceId);
+
         if (end==0)
             end = System.currentTimeMillis();
 
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 index 1dee0f1..c71bbd8 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/ResourcesTest.java
 @@ -499,6 +499,22 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testCreateChildForUnknownParent() throws Exception {
+
+        given()
+            .body("{\"value\":\"CPU\"}") // Type of new resource
+            .header("Content-Type", "application/json")
+            .header("Accept", "application/json")
+            .pathParam("name", "test")
+            .queryParam("plugin", "Platforms")
+            .queryParam("parentId", 321)
+        .expect()
+            .statusCode(404)
+            .log().ifError()
+        .when().post("/resource/{name}");
+    }
+
+    @Test
     public void testAlertsForResource() throws Exception {
         given()
             .header("Accept", "application/json")
@@ -521,6 +537,17 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testSchedulesForUnknownResource() throws Exception {
+        given()
+            .header("Accept", "application/json")
+            .pathParam("id", 123)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/resource/{id}/schedules");
+    }
+
+    @Test
     public void testAvailabilityForResourceJson() throws Exception {
         given()
             .header(acceptJson)
@@ -532,6 +559,17 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testAvailabilityForUnknownResource() throws Exception {
+        given()
+            .header(acceptJson)
+            .pathParam("id", 532)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/resource/{id}/availability");
+    }
+
+    @Test
     public void testAvailabilityForResourceXml() throws Exception {
         given()
             .header(acceptXml)
@@ -554,6 +592,17 @@ public class ResourcesTest extends AbstractBase {
     }
 
     @Test
+    public void testAvailabilityHistoryForUnknownResource() throws Exception {
+        given()
+            .header(acceptJson)
+            .pathParam("id", -42)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/resource/{id}/availability/history");
+    }
+
+    @Test
     public void testAvailabilityHistoryForResourceXml() throws Exception {
         given()
             .header(acceptXml)


commit 17c3db8f19d0b70a6f0d910450523c245cd6f8b9
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Wed May 8 09:17:48 2013 +0200

    Code cleanup and improvements for the REST-api

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 index 2746823..7a198bd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AbstractRestBean.java
 @@ -81,21 +81,21 @@ import org.rhq.enterprise.server.rest.domain.ResourceWithType;
 @SuppressWarnings("unchecked")
 public class AbstractRestBean {
 
-    Log log = LogFactory.getLog(getClass().getName());
+    protected Log log = LogFactory.getLog(getClass().getName());
 
-    static private final CacheKey META_KEY = new CacheKey("rhq.rest.resourceMeta", \
0); +    private static final CacheKey META_KEY = new \
CacheKey("rhq.rest.resourceMeta", 0);  
     @javax.annotation.Resource( name = "ISPN")
-    protected CacheContainer container;
+    private CacheContainer container;
     protected Cache<CacheKey, Object> cache;
 
     /** Subject of the caller that gets injected via {@link SetCallerInterceptor} */
     protected Subject caller;
 
     @EJB
-    ResourceManagerLocal resMgr;
+    protected ResourceManagerLocal resMgr;
     @EJB
-    ResourceGroupManagerLocal resourceGroupManager;
+    protected ResourceGroupManagerLocal resourceGroupManager;
 
     @PostConstruct
     public void start() {
@@ -116,15 +116,15 @@ public class AbstractRestBean {
             freemarker.template.Configuration config = new \
freemarker.template.Configuration();  
             // XXX fall-over to ClassTL after failure in FTL seems not to work
-            // FileTemplateLoader ftl = new FileTemplateLoader(new \
                File("src/main/resources"));
             ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), \
"/rest_templates/");  TemplateLoader[] loaders = new TemplateLoader[] { ctl };
             MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
 
             config.setTemplateLoader(mtl);
 
-            if (!templateName.endsWith(".ftl"))
+            if (!templateName.endsWith(".ftl")) {
                 templateName = templateName + ".ftl";
+            }
             Template template = config.getTemplate(templateName);
 
             StringWriter out = new StringWriter();
@@ -171,8 +171,9 @@ public class AbstractRestBean {
 
         CacheValue value = (CacheValue) cache.get(key);
 
+        boolean debugEnabled = log.isDebugEnabled();
         if (null != value) {
-            if (log.isDebugEnabled()) {
+            if (debugEnabled) {
                 log.debug("Cache Hit for " + key);
             }
 
@@ -180,12 +181,12 @@ public class AbstractRestBean {
                 o = value.getValue();
 
             } else {
-                if (log.isDebugEnabled()) {
+                if (debugEnabled) {
                     log.debug("Cache Hit ignored, caller " + caller.toString() + " \
not found");  }
             }
         } else {
-            if (log.isDebugEnabled()) {
+            if (debugEnabled) {
                 log.debug("Cache Miss for " + key);
             }
         }
@@ -351,8 +352,9 @@ public class AbstractRestBean {
         Resource parent = res.getParentResource();
         if (parent != null) {
             rwt.setParentId(parent.getId());
-        } else
+        } else {
             rwt.setParentId(0);
+        }
 
         rwt.setAncestry(res.getAncestry());
 
@@ -429,8 +431,9 @@ public class AbstractRestBean {
     protected ResourceGroup fetchGroup(int groupId, boolean requireCompatible) {
         ResourceGroup resourceGroup;
         resourceGroup = resourceGroupManager.getResourceGroup(caller, groupId);
-        if (resourceGroup == null)
+        if (resourceGroup == null) {
             throw new StuffNotFoundException("Group with id " + groupId);
+        }
         if (requireCompatible) {
             if (resourceGroup.getGroupCategory() != GroupCategory.COMPATIBLE) {
                 throw new BadArgumentException("Group with id " + groupId,"it is no \
compatible group"); @@ -445,8 +448,9 @@ public class AbstractRestBean {
         gr.setId(group.getId());
         gr.setCategory(group.getGroupCategory());
         gr.setRecursive(group.isRecursive());
-        if (group.getGroupDefinition()!=null)
+        if (group.getGroupDefinition()!=null) {
             gr.setDynaGroupDefinitionId(group.getGroupDefinition().getId());
+        }
         gr.setExplicitCount(group.getExplicitResources().size());
         gr.setImplicitCount(group.getImplicitResources().size());
         UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
@@ -526,16 +530,6 @@ public class AbstractRestBean {
         return ms;
     }
 
-    Configuration mapToConfiguration(Map<String,Object> in) {
-        Configuration config = new Configuration();
-        for (Map.Entry<String,Object> entry : in.entrySet()) {
-            config.put(new PropertySimple(entry.getKey(),entry.getValue())); // TODO \
                honor more types
-        }
-
-        return config;
-
-    }
-
     /**
      * Set the caching header on the response
      * @param builder Response builder to put the caching header on
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 index 06bc8ae..d203cd3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertDefinitionHandlerBean.java
 @@ -106,22 +106,22 @@ import org.rhq.enterprise.server.rest.domain.Link;
 public class AlertDefinitionHandlerBean extends AbstractRestBean {
 
     @EJB
-    AlertDefinitionManagerLocal alertDefinitionManager;
+    private AlertDefinitionManagerLocal alertDefinitionManager;
 
     @EJB
-    AlertNotificationManagerLocal notificationMgr;
+    private AlertNotificationManagerLocal notificationMgr;
 
     @EJB
-    AlertConditionManagerLocal conditionMgr;
+    private AlertConditionManagerLocal conditionMgr;
 
     @EJB
-    AlertManagerLocal alertManager;
+    private AlertManagerLocal alertManager;
 
     @EJB
-    ResourceGroupManagerLocal resourceGroupMgr;
+    private ResourceGroupManagerLocal resourceGroupMgr;
 
     @EJB
-    ResourceTypeManagerLocal resourceTypeMgr;
+    private ResourceTypeManagerLocal resourceTypeMgr;
 
 
     @PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
@@ -169,8 +169,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
{  @Context Request request, @Context UriInfo uriInfo) {
 
         AlertDefinition def = alertDefinitionManager.getAlertDefinition(caller, \
                definitionId);
-        if (def==null)
+        if (def==null) {
             throw new StuffNotFoundException("AlertDefinition with id " + \
definitionId ); +        }
 
         EntityTag eTag = new EntityTag(Integer.toHexString(def.hashCode()));
         Response.ResponseBuilder builder = request.evaluatePreconditions(eTag);
@@ -285,8 +286,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
{  @Context UriInfo uriInfo) {
 
         AlertDefinition definition = \
                alertDefinitionManager.getAlertDefinition(caller,definitionId);
-        if (definition==null)
+        if (definition==null) {
             throw new StuffNotFoundException("AlertDefinition with id " + \
definitionId); +        }
 
         definition = new AlertDefinition(definition); // detach
 
@@ -302,10 +304,12 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  // Set the recovery id if such a definition exists at all
         if (definitionRest.getRecoveryId()>0) {
             AlertDefinition recoveryDef = \
                alertDefinitionManager.getAlertDefinition(caller,definitionRest.getRecoveryId());
                
-            if (recoveryDef!=null)
+            if (recoveryDef!=null) {
                 definition.setRecoveryId(definitionRest.getRecoveryId());
-            else
+            }
+            else {
                 throw new StuffNotFoundException("Alert to recover with id " + \
definitionRest.getRecoveryId()); +            }
         }
 
 
@@ -348,34 +352,24 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  StringBuilder builder = new StringBuilder();
             for (int i = 0; i < vals.length ; i++) {
                 builder.append(vals[i].name());
-                if (i < vals.length-1)
+                if (i < vals.length-1) {
                     builder.append(", ");
+                }
             }
             throw new BadArgumentException("dampening category","Allowed values are: \
" + builder.toString());  }
         AlertDampening dampening = new AlertDampening(dampeningCategory);
-        if (adr.getDampeningCount()!=null) {
-            if (adr.getDampeningCount().contains(" ")) {
-                String tmp = adr.getDampeningCount().trim();
-                int num = Integer.parseInt(tmp.substring(0,tmp.indexOf(' ')));
-                tmp = tmp.substring(tmp.lastIndexOf(' ')).trim();
-                dampening.setValue(num);
-                dampening.setValueUnits(AlertDampening.TimeUnits.valueOf(tmp.toUpperCase()));
                
-            }
-            else {
-                dampening.setValue(Integer.parseInt(adr.getDampeningCount()));
-            }
-        }
-        if (adr.getDampeningPeriod()!=null) {
-            if (adr.getDampeningPeriod().contains(" ")) {
-                String tmp = adr.getDampeningPeriod().trim();
-                int num = Integer.parseInt(tmp.substring(0,tmp.indexOf(' ')));
-                tmp = tmp.substring(tmp.lastIndexOf(' ')).trim();
-                dampening.setPeriod(num);
-                dampening.setPeriodUnits(AlertDampening.TimeUnits.valueOf(tmp.toUpperCase()));
                
-            }
-            else {
-                dampening.setPeriod(Integer.parseInt(adr.getDampeningPeriod()));
+        if (adr.getDampeningCount()>-1) {
+            dampening.setValue(adr.getDampeningCount());
+        }
+        if (adr.getDampeningPeriod()>0) {
+            dampening.setPeriod(adr.getDampeningPeriod());
+            try {
+                if (adr.getDampeningUnit()!=null) {
+                    \
dampening.setPeriodUnits(AlertDampening.TimeUnits.valueOf(adr.getDampeningUnit().toUpperCase()));
 +                }
+            } catch (Exception e) {
+                throw new BadArgumentException("dampenign unit", "Allowed values are \
MINUTES,HOURS,DAYS, WEEKS");  }
         }
 
@@ -439,8 +433,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         definition2 = entityManager.find(AlertDefinition.class,definitionId);
         AlertCondition condition=null;
         for (AlertCondition c: definition2.getConditions()) {
-            if (c.getId() == conditionId)
+            if (c.getId() == conditionId) {
                 condition=c;
+            }
         }
 
         definition2.getConditions().remove(condition);
@@ -522,8 +517,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         @ApiParam("The id of the condition to retrieve") @PathParam("cid") int \
conditionId) {  
         AlertCondition condition = conditionMgr.getAlertConditionById(conditionId);
-        if (condition==null)
+        if (condition==null) {
             throw new StuffNotFoundException("No condition with id " + conditionId);
+        }
         AlertConditionRest acr = conditionToConditionRest(condition);
 
         return Response.ok(acr).build();
@@ -565,8 +561,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         AlertConditionRest result = conditionToConditionRest(createdCondition);
 
         Response.ResponseBuilder builder;
-        if (isCreate)
+        if (isCreate) {
             builder = Response.created(uri);
+        }
         else  {
             builder = Response.ok();
             builder.location(uri);
@@ -583,8 +580,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         @ApiParam("The id of the notification definition to retrieve") \
@PathParam("nid") int notificationId) {  
         AlertNotification notification = \
                notificationMgr.getAlertNotification(caller,notificationId);
-        if (notification==null)
+        if (notification==null) {
             throw new StuffNotFoundException("No notification with id " + \
notificationId); +        }
         AlertNotificationRest anr = notificationToNotificationRest(notification);
 
         return Response.ok(anr).build();
@@ -618,8 +616,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         @ApiParam("The updated notification definition to use") \
AlertNotificationRest notificationRest) {  
         AlertNotification notification = \
                notificationMgr.getAlertNotification(caller,notificationId);
-        if (notification==null)
+        if (notification==null) {
             throw new StuffNotFoundException("No notification with id " + \
notificationId); +        }
 
         AlertDefinition definition = \
alertDefinitionManager.getAlertDefinition(caller,notification.getAlertDefinition().getId());
  
@@ -634,8 +633,9 @@ public class AlertDefinitionHandlerBean extends AbstractRestBean \
                {
         List<AlertNotification> notifications = definition.getAlertNotifications();
         int newNotifId = 0;
         for (AlertNotification n : notifications) {
-            if (n.getSenderName().equals(notification.getSenderName()))
+            if (n.getSenderName().equals(notification.getSenderName())) {
                 newNotifId = n.getId();
+            }
         }
 
         AlertNotification result = \
notificationMgr.getAlertNotification(caller,newNotifId); @@ -667,8 +667,9 @@ public \
class AlertDefinitionHandlerBean extends AbstractRestBean {  
         // Now check if the definition exists as well
         AlertDefinition definition = \
                alertDefinitionManager.getAlertDefinition(caller,definitionId);
-        if (definition==null)
+        if (definition==null) {
             throw new StuffNotFoundException("AlertDefinition with id " + \
definitionId); +        }
 
         // definition and sender are valid, continue
         int existingNotificationCount = definition.getAlertNotifications().size();
@@ -816,10 +817,13 @@ public class AlertDefinitionHandlerBean extends \
AbstractRestBean {  adr.setDampeningCategory(dampening.getCategory().name());
         AlertDampening.TimeUnits units = dampening.getValueUnits();
         String s = units != null ? " " + units.name() : "";
-        adr.setDampeningCount(dampening.getValue()  + s);
+        adr.setDampeningCount(dampening.getValue());
         units = dampening.getPeriodUnits();
         s = units != null ? " " + units.name() : "";
-        adr.setDampeningPeriod(dampening.getPeriod() + s);
+        adr.setDampeningPeriod(dampening.getPeriod());
+        if (dampening.getPeriodUnits()!=null) {
+            adr.setDampeningUnit(dampening.getPeriodUnits().name());
+        }
 
         if (def.getResource()!=null) {
             adr.getLinks().add(createUILink(uriInfo,UILinkTemplate.RESOURCE_ALERT_DEF,def.getResource().getId(),adr.getId()));
                
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 index 0a37a9d..4c80bd1 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/AlertHandlerBean.java
 @@ -79,10 +79,8 @@ import org.rhq.enterprise.server.rest.domain.*;
 @Interceptors(SetCallerInterceptor.class)
 public class AlertHandlerBean extends AbstractRestBean {
 
-//    private final Log log = LogFactory.getLog(AlertHandlerBean.class);
-
     @EJB
-    AlertManagerLocal alertManager;
+    private AlertManagerLocal alertManager;
 
 
     @GZIP
@@ -107,10 +105,12 @@ public class AlertHandlerBean extends AbstractRestBean {
         if (resourceId!=null && definitionId!=null) {
             throw new BadArgumentException("At most one of 'resourceId' and \
'definitionId' may be given");  }
-        if (size==0)
+        if (size==0) {
             throw new BadArgumentException("size","Must not be 0");
-        if (page<1)
+        }
+        if (page<1) {
             throw new BadArgumentException("page","Must be >=1");
+        }
 
         AlertCriteria criteria = new AlertCriteria();
 
@@ -119,8 +119,9 @@ public class AlertHandlerBean extends AbstractRestBean {
             pageControl.setPageNumber(page);
             criteria.setPageControl(pageControl);
         }
-        else
+        else {
             criteria.setPaging(page-1, size); // TODO implement linking to next page
+        }
 
         if (since!=null) {
             criteria.addFilterStartTime(since);
@@ -335,8 +336,9 @@ public class AlertHandlerBean extends AbstractRestBean {
         AlertCriteria criteria = new AlertCriteria();
         criteria.addFilterId(id);
         List<Alert> alerts = alertManager.findAlertsByCriteria(caller,criteria);
-        if (alerts.isEmpty())
+        if (alerts.isEmpty()) {
             throw new StuffNotFoundException("Alert with id " + id);
+        }
 
         return alerts.get(0);
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
 index 07b2a1c..1099679 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
 @@ -43,9 +43,9 @@ import org.rhq.enterprise.server.rest.domain.RHQErrorWrapper;
 public class CustomExceptionMapper implements ExceptionMapper<Exception> {
 
     @Context
-    HttpHeaders httpHeaders;
+    private HttpHeaders httpHeaders;
 
-    Log log = LogFactory.getLog(getClass().getName());
+    private Log log = LogFactory.getLog(getClass().getName());
 
     @Override
     public Response toResponse(Exception e) {
@@ -53,24 +53,25 @@ public class CustomExceptionMapper implements \
ExceptionMapper<Exception> {  Response.ResponseBuilder builder;
         Response.Status status;
 
-        if (e instanceof StuffNotFoundException)
+        if (e instanceof StuffNotFoundException) {
             status =Response.Status.NOT_FOUND;
-        else if (e instanceof ResourceNotFoundException)
+        } else if (e instanceof ResourceNotFoundException) {
             status = Response.Status.NOT_FOUND;
-        else if (e instanceof ResourceGroupNotFoundException)
+        } else if (e instanceof ResourceGroupNotFoundException) {
             status = Response.Status.NOT_FOUND;
-        else if (e instanceof ResourceTypeNotFoundException)
+        } else if (e instanceof ResourceTypeNotFoundException) {
             status = Response.Status.NOT_FOUND;
-        else if (e instanceof ParameterMissingException)
+        } else if (e instanceof ParameterMissingException) {
             status = Response.Status.NOT_ACCEPTABLE;
-        else if (e instanceof BadArgumentException)
+        } else if (e instanceof BadArgumentException) {
             status = Response.Status.NOT_ACCEPTABLE;
-        else if (e instanceof PermissionException)
+        } else if (e instanceof PermissionException) {
             status = Response.Status.FORBIDDEN;
-        else if (e instanceof EJBException && e.getCause()!=null && e.getCause() \
instanceof IllegalArgumentException) +        } else if (e instanceof EJBException && \
e.getCause()!=null && e.getCause() instanceof IllegalArgumentException) {  status = \
                Response.Status.NOT_ACCEPTABLE;
-        else
+        } else {
             status = Response.Status.SERVICE_UNAVAILABLE;
+        }
 
         builder = Response.status(status);
         String message = e.getMessage();
@@ -93,8 +94,9 @@ public class CustomExceptionMapper implements \
ExceptionMapper<Exception> {  log.debug(e.getMessage());
             mediaType = MediaType.TEXT_PLAIN_TYPE;
         }
-        if (mediaType.getType().equals("text") && \
mediaType.getSubtype().equals("csv")) +        if (mediaType.getType().equals("text") \
&& mediaType.getSubtype().equals("csv")) {  mediaType = MediaType.TEXT_PLAIN_TYPE;
+        }
 
 
         if (mediaType.equals(MediaType.TEXT_PLAIN_TYPE)) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 index ccfed9f..8bc2cb9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/OperationsHandlerBean.java
 @@ -47,6 +47,8 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 
+import com.wordnik.swagger.annotations.ApiError;
+import com.wordnik.swagger.annotations.ApiErrors;
 import com.wordnik.swagger.annotations.ApiOperation;
 import com.wordnik.swagger.annotations.ApiParam;
 
@@ -69,13 +71,17 @@ import org.rhq.core.domain.resource.Resource;
 import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.domain.util.PageList;
 import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.core.domain.util.StringUtils;
+import org.rhq.enterprise.server.operation.OperationDefinitionNotFoundException;
 import org.rhq.enterprise.server.operation.OperationManagerLocal;
 import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceNotFoundException;
 import org.rhq.enterprise.server.rest.domain.Link;
 import org.rhq.enterprise.server.rest.domain.OperationDefinitionRest;
 import org.rhq.enterprise.server.rest.domain.OperationHistoryRest;
 import org.rhq.enterprise.server.rest.domain.OperationRest;
 import org.rhq.enterprise.server.rest.domain.SimplePropDef;
+import org.rhq.enterprise.server.rest.helper.ConfigurationHelper;
 
 /**
  * Deal with operations
@@ -88,32 +94,31 @@ import org.rhq.enterprise.server.rest.domain.SimplePropDef;
 public class OperationsHandlerBean extends AbstractRestBean  {
 
     @EJB
-    OperationManagerLocal opsManager;
+    private OperationManagerLocal opsManager;
 
     @EJB
-    ResourceManagerLocal resourceManager;
+    private ResourceManagerLocal resourceManager;
 
     @GET
     @Path("definition/{id}")
     @Cache(maxAge = 1200)
     @ApiOperation("Retrieve a single operation definition by its id")
     public Response getOperationDefinition(
-            @ApiParam("Id of the definition to retrieve") @PathParam("id") int \
                definitionId,
-            @ApiParam("Id of a resource that supports this operation") \
                @QueryParam("resourceId") Integer resourceId,
-               @Context UriInfo uriInfo,
-               @Context Request request,
-               @Context HttpHeaders httpHeaders) {
-
-
+        @ApiParam("Id of the definition to retrieve") @PathParam("id") int \
definitionId, +        @ApiParam("Id of a resource that supports this operation") \
@QueryParam("resourceId") Integer resourceId, +        @Context UriInfo uriInfo,
+        @Context Request request) {
 
         OperationDefinition def;
         def = getFromCache(definitionId, OperationDefinition.class);
         if (def==null) {
-            def = opsManager.getOperationDefinition(caller,definitionId);
-            if (def==null)
-                throw new StuffNotFoundException("OperationDefinition with id " + \
                definitionId);
-            else
+            try {
+                def = opsManager.getOperationDefinition(caller,definitionId);
                 putToCache(definitionId,OperationDefinition.class,def);
+            }
+            catch (OperationDefinitionNotFoundException ode) {
+                throw new StuffNotFoundException("Operation definition with id " + \
definitionId); +            }
         }
 
         EntityTag eTag = new EntityTag(Integer.toHexString(def.hashCode()));
@@ -145,43 +150,27 @@ public class OperationsHandlerBean extends AbstractRestBean  {
 
     }
 
-    private void copyParamsForDefinition(OperationDefinition def, \
                OperationDefinitionRest odr) {
-        ConfigurationDefinition cd = def.getParametersConfigurationDefinition();
-        if (cd==null)
-            return;
-
-        for (Map.Entry<String,PropertyDefinition> entry : \
                cd.getPropertyDefinitions().entrySet()) {
-            PropertyDefinition pd = entry.getValue();
-            if (pd instanceof PropertyDefinitionSimple) {
-                PropertyDefinitionSimple pds = (PropertyDefinitionSimple) pd;
-                SimplePropDef prop = new SimplePropDef();
-                prop.setName(pds.getName());
-                prop.setRequired(pds.isRequired());
-                prop.setType(pds.getType());
-                prop.setDefaultValue(pds.getDefaultValue());
-                odr.addParam(prop);
-            }
-            log.debug("copyParams: " + pd.getName() + " not yet supported");
-        }
-    }
-
     @GZIP
     @GET
     @Path("definitions")
     @Cache(maxAge = 1200)
     @ApiOperation("List all operation definitions for a resource")
     public Response getOperationDefinitions(
-            @ApiParam(value = "Id of the resource",required = true) \
                @QueryParam("resourceId") Integer resourceId,
-                                            @Context UriInfo uriInfo,
-                                            @Context Request request,
-                                            @Context HttpHeaders httpHeaders) {
+        @ApiParam(value = "Id of the resource", required = true) \
@QueryParam("resourceId") Integer resourceId, +        @Context UriInfo uriInfo,
+        @Context Request request) {
 
-        if (resourceId == null)
+        if (resourceId == null) {
             throw new ParameterMissingException("resourceId");
+        }
 
-        Resource res =resourceManager.getResource(caller,resourceId);
-        if(res==null)
+        Resource res;
+        try {
+            res = resourceManager.getResource(caller,resourceId);
+        }
+        catch (ResourceNotFoundException rnfe) {
             throw new StuffNotFoundException("resource with id " + resourceId);
+        }
 
         ResourceType resourceType = res.getResourceType();
 
@@ -226,16 +215,24 @@ public class OperationsHandlerBean extends AbstractRestBean  {
             @ApiParam(value = "Id of the resource", required = true) \
@QueryParam("resourceId") Integer resourceId,  @Context UriInfo uriInfo) {
 
-        if (resourceId == null)
+        if (resourceId == null) {
             throw new ParameterMissingException("resourceId");
+        }
 
-        Resource res =resourceManager.getResource(caller,resourceId);
-        if(res==null)
+        try {
+            // Check if the resource exists at all
+            resourceManager.getResource(caller,resourceId);
+        }
+        catch (ResourceNotFoundException rnfe) {
             throw new StuffNotFoundException("resource with id " + resourceId);
+        }
 
 
-        OperationDefinition opDef = \
                opsManager.getOperationDefinition(caller,definitionId);
-        if (opDef==null) {
+        OperationDefinition opDef;
+        try {
+            opDef = opsManager.getOperationDefinition(caller,definitionId);
+        }
+        catch (OperationDefinitionNotFoundException odnfe) {
             throw new StuffNotFoundException("Operation definition with id " + \
definitionId);  }
         OperationRest operationRest = new OperationRest(resourceId,definitionId);
@@ -266,9 +263,11 @@ public class OperationsHandlerBean extends AbstractRestBean  {
     @Path("{id}")
     @ApiOperation("Return a (draft) operation")
     public Response getOperation(@ApiParam("Id of the operation to retrieve") \
@PathParam("id") int operationId) { +
         OperationRest op = getFromCache(operationId,OperationRest.class);
-        if (op==null)
+        if (op==null) {
             throw new StuffNotFoundException("Operation with id " + operationId);
+        }
 
         return Response.ok(op).build();
     }
@@ -277,20 +276,40 @@ public class OperationsHandlerBean extends AbstractRestBean  {
     @Path("{id}")
     @Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
     @ApiOperation("Update a (draft) operation. If the state is set to 'ready', the \
operation will be scheduled") +    @ApiErrors({
+        @ApiError(code = 404, reason = "No draft operation with the passed id \
exists"), +        @ApiError(code = 406, reason = "Draft was set for scheduling, but \
parameters failed validation"), +        @ApiError(code = 200, reason = "Update was \
successful, operation was scheduled if requested" ) +        }
+    )
     public Response updateOperation(@ApiParam("Id of the operation to update") \
@PathParam("id") int operationId,  OperationRest operation, @Context UriInfo uriInfo) \
{  
-        if (!operation.isReadyToSubmit() && operation.getDefinitionId()>0 && \
                !operation.getName().isEmpty()) {
-            // TODO check all the required parameters for presence before allowing \
                to submit
-            operation.setReadyToSubmit(true);
+        OperationRest op = getFromCache(operationId,OperationRest.class);
+        if (op==null) {
+            throw new StuffNotFoundException("Operation with id " + operationId);
         }
+
+        Configuration parameters = \
ConfigurationHelper.mapToConfiguration(operation.getParams()); +
         if (operation.isReadyToSubmit()) {
-            // todo check params
 
-            // submit
+            OperationDefinition opDef = \
opsManager.getOperationDefinition(caller,operation.getDefinitionId());  
-            Configuration parameters = mapToConfiguration(operation.getParams());
+            // Validate parameters
+            ConfigurationDefinition parameterDefinition = \
opDef.getParametersConfigurationDefinition(); +            List<String> errorMessages \
= ConfigurationHelper.checkConfigurationWrtDefinition(parameters, \
parameterDefinition);  
+            if (errorMessages.size()>0) {
+                // Configuration is not ok
+                operation.setReadyToSubmit(false);
+                throw new BadArgumentException("Validation of parameters failed", \
StringUtils.getListAsString(errorMessages,", ")); +            }
+        }
+
+        if (operation.isReadyToSubmit()) {
+
+            // submit
             ResourceOperationSchedule sched = \
opsManager.scheduleResourceOperation(caller,operation.getResourceId(),operation.getName(),0,0,0,-1,
  parameters,"Test");
             JobId jobId = new JobId(sched.getJobName(),sched.getJobGroup());
@@ -304,12 +323,12 @@ public class OperationsHandlerBean extends AbstractRestBean  {
         else {
             UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
             uriBuilder.path("/operation/{id}");
-            URI uri = uriBuilder.build(operation.getId());
+            URI uri = uriBuilder.build(operationId);
             Link editLink = new Link("edit",uri.toString());
             operation.addLink(editLink);
         }
         // Update item in cache
-        putToCache(operation.getId(),OperationRest.class,operation);
+        putToCache(operationId,OperationRest.class,operation);
         Response.ResponseBuilder builder = Response.ok(operation);
         return builder.build();
     }
@@ -381,8 +400,9 @@ public class OperationsHandlerBean extends AbstractRestBean  {
             @Context HttpHeaders httpHeaders) {
 
         ResourceOperationHistoryCriteria criteria = new \
                ResourceOperationHistoryCriteria();
-        if (resourceId>0)
+        if (resourceId>0) {
             criteria.addFilterResourceIds(resourceId);
+        }
 
         criteria.addSortEndTime(PageOrdering.DESC);
 
@@ -424,30 +444,41 @@ public class OperationsHandlerBean extends AbstractRestBean  {
 
     }
 
-
+    /**
+     * Create a REST-object from the passed operation history
+     * @param history History object to convert
+     * @param uriInfo URI info of the incoming request, used to create links
+     * @return a populated OperationHistoryRest object
+     */
     private OperationHistoryRest historyToHistoryRest(ResourceOperationHistory \
history, UriInfo uriInfo) {  String status;
-        if (history.getStatus()==null)
+        if (history.getStatus()==null) {
             status = " - no information yet -";
-        else
+        }
+        else {
             status = history.getStatus().getDisplayName();
+        }
 
         OperationHistoryRest hist = new OperationHistoryRest();
         hist.setStatus(status);
-        if (history.getResource()!=null)
+        if (history.getResource()!=null) {
             hist.setResourceName(history.getResource().getName());
+        }
         hist.setOperationName(history.getOperationDefinition().getName());
         hist.lastModified(history.getModifiedTime());
-        if (history.getErrorMessage()!=null)
+        if (history.getErrorMessage()!=null) {
             hist.setErrorMessage(history.getErrorMessage());
+        }
         if (history.getResults()!=null) {
             Configuration results = history.getResults();
             for (Property p : results.getProperties()) {
                 String val;
-                if (p instanceof PropertySimple)
+                if (p instanceof PropertySimple) {
                     val = ((PropertySimple)p).getStringValue();
-                else
+                }
+                else {
                     val = p.toString();
+                }
                 hist.getResult().put(p.getName(),val);
             }
         }
@@ -465,4 +496,34 @@ public class OperationsHandlerBean extends AbstractRestBean  {
         return hist;
     }
 
+    /**
+     * Copies the parameters of an OperationDefinition into to an object that can be
+     * returned to a REST-client, so that this knows which fields are to be filled \
in, +     * of which type they are and which ones are required
+     * @param def OperationsDefinition to "copy"
+     * @param definitionRest The definition to fill in
+     */
+    private void copyParamsForDefinition(OperationDefinition def, \
OperationDefinitionRest definitionRest) { +        ConfigurationDefinition cd = \
def.getParametersConfigurationDefinition(); +        if (cd==null) {
+            return;
+        }
+
+        for (Map.Entry<String,PropertyDefinition> entry : \
cd.getPropertyDefinitions().entrySet()) { +            PropertyDefinition pd = \
entry.getValue(); +            if (pd instanceof PropertyDefinitionSimple) {
+                PropertyDefinitionSimple pds = (PropertyDefinitionSimple) pd;
+                SimplePropDef prop = new SimplePropDef();
+                prop.setName(pds.getName());
+                prop.setRequired(pds.isRequired());
+                prop.setType(pds.getType());
+                prop.setDefaultValue(pds.getDefaultValue());
+                definitionRest.addParam(prop);
+            }
+            log.debug("copyParams: " + pd.getName() + " not yet supported");
+        }
+    }
+
+
+
 }
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ParameterMissingException.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ParameterMissingException.java
 index 16fd62f..d3f3f50 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ParameterMissingException.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ParameterMissingException.java
 @@ -1,9 +1,12 @@
 package org.rhq.enterprise.server.rest;
 
+import javax.ejb.ApplicationException;
+
 /**
  * Exception thrown if (Query) Parameters are missing
  * @author Heiko W. Rupp
  */
+@ApplicationException(rollback = false, inherited = true)
 public class ParameterMissingException extends RuntimeException {
 
     public ParameterMissingException(String what) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ReportsHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ReportsHandlerBean.java
 index 1377be4..1b563da 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ReportsHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ReportsHandlerBean.java
 @@ -76,25 +76,25 @@ import \
org.rhq.enterprise.server.rest.reporting.SuspectMetricLocal;  public class \
ReportsHandlerBean extends AbstractRestBean {  
     @EJB
-    AlertDefinitionLocal alertDefinitionLocal;
+    private AlertDefinitionLocal alertDefinitionLocal;
     @EJB
-    ConfigurationHistoryLocal configurationHistoryLocal;
+    private ConfigurationHistoryLocal configurationHistoryLocal;
     @EJB
-    DriftComplianceLocal driftComplianceLocal;
+    private DriftComplianceLocal driftComplianceLocal;
     @EJB
-    InventorySummaryLocal inventorySummaryLocal;
+    private InventorySummaryLocal inventorySummaryLocal;
     @EJB
-    PlatformUtilizationLocal platformUtilizationLocal;
+    private PlatformUtilizationLocal platformUtilizationLocal;
     @EJB
-    RecentAlertLocal recentAlertLocal;
+    private RecentAlertLocal recentAlertLocal;
     @EJB
-    RecentDriftLocal recentDriftLocal;
+    private RecentDriftLocal recentDriftLocal;
     @EJB
-    RecentOperationsLocal recentOperationsLocal;
+    private RecentOperationsLocal recentOperationsLocal;
     @EJB
-    SuspectMetricLocal suspectMetricLocal;
+    private SuspectMetricLocal suspectMetricLocal;
 
-    String[] reports = {
+    private String[] reports = {
         "alertDefinitions",
         "configurationHistory",
         "driftCompliance",
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 index 1c2b516..4e00625 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/ResourceHandlerBean.java
 @@ -108,6 +108,7 @@ import org.rhq.enterprise.server.rest.domain.MetricSchedule;
 import org.rhq.enterprise.server.rest.domain.ResourceWithChildren;
 import org.rhq.enterprise.server.rest.domain.ResourceWithType;
 import org.rhq.enterprise.server.rest.domain.StringValue;
+import org.rhq.enterprise.server.rest.helper.ConfigurationHelper;
 
 /**
  * Class that deals with getting data about resources
@@ -755,8 +756,8 @@ public class ResourceHandlerBean extends AbstractRestBean {
         if (resType==null)
             throw new StuffNotFoundException("ResourceType with name [" + typeName + \
"] and plugin [" + plugin + "]");  
-        Configuration pluginConfig = mapToConfiguration(request.getPluginConfig());
-        Configuration deployConfig = \
mapToConfiguration(request.getResourceConfig()); +        Configuration pluginConfig \
= ConfigurationHelper.mapToConfiguration(request.getPluginConfig()); +        \
Configuration deployConfig = \
ConfigurationHelper.mapToConfiguration(request.getResourceConfig());  
         String packageName = DEFAULT_PACKAGE;
 
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RootHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RootHandlerBean.java
 index 3aded78..612b3f7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RootHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/RootHandlerBean.java
 @@ -51,7 +51,7 @@ import org.rhq.enterprise.server.rest.domain.Link;
 @Stateless
 public class RootHandlerBean extends AbstractRestBean  {
 
-    String[] roots = { // rel, target
+    private String[] roots = { // rel, target
             "platforms","resource/platforms",
             "groups","group",
             "dynaGroups","group/definitions",
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/SetCallerInterceptor.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/SetCallerInterceptor.java
 index 3db8dc5..1da5411 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/SetCallerInterceptor.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/SetCallerInterceptor.java
 @@ -52,10 +52,10 @@ import org.rhq.enterprise.server.auth.SubjectManagerLocal;
 public class SetCallerInterceptor {
 
     @Resource
-    EJBContext ejbContext;
+    private EJBContext ejbContext;
 
     @EJB
-    SubjectManagerLocal subjectManager;
+    private SubjectManagerLocal subjectManager;
 
     private SessionManager sessionManager = SessionManager.getInstance();
 
@@ -76,8 +76,9 @@ public class SetCallerInterceptor {
             caller = subjectManager.getSubjectByName(p.getName());
         }
 
-        if (caller==null)
+        if (caller==null) {
             throw new IllegalAccessException("No calling principal provided");
+        }
 
         // Get Subject with a session
         caller = sessionManager.put(caller);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/StatusHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/StatusHandlerBean.java
 index 23bbd4b..a6c81b3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/StatusHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/StatusHandlerBean.java
 @@ -55,9 +55,9 @@ public class StatusHandlerBean extends AbstractRestBean {
 
 
     @EJB
-    SystemInfoManagerLocal infoMgr;
+    private SystemInfoManagerLocal infoMgr;
     @EJB
-    ServerManagerLocal serverManager;
+    private ServerManagerLocal serverManager;
 
     @GZIP
     @ApiOperation(value="Retrieve the current configured state of the server along \
                with some runtime information." +
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/UserHandlerBean.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/UserHandlerBean.java
 index 9851425..cd57b67 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/UserHandlerBean.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/UserHandlerBean.java
 @@ -74,8 +74,6 @@ import org.rhq.enterprise.server.rest.domain.UserRest;
 @Stateless
 public class UserHandlerBean extends AbstractRestBean {
 
-    //    private final Log log = LogFactory.getLog(UserHandlerBean.class);
-
     /**
      * List of favorite {@link org.rhq.core.domain.resource.Resource} id's, \
                delimited by '|' characters. Default is "".
      */
@@ -88,10 +86,10 @@ public class UserHandlerBean extends AbstractRestBean {
     public static final String GROUP_HEALTH_GROUPS = \
".dashContent.grouphealth.groups";  
     @EJB
-    SubjectManagerLocal subjectManager;
+    private SubjectManagerLocal subjectManager;
 
     @EJB
-    ResourceManagerLocal resourceManager;
+    private ResourceManagerLocal resourceManager;
 
     @GZIP
     @GET
@@ -112,10 +110,12 @@ public class UserHandlerBean extends AbstractRestBean {
                 ResourceWithType rwt = fillRWT(res, uriInfo);
                 ret.add(rwt);
             } catch (Exception e) {
-                if (e instanceof ResourceNotFoundException)
+                if (e instanceof ResourceNotFoundException) {
                     log.debug("Favorite resource with id " + id + " not found - not \
                returning to the user");
-                else
+                }
+                else {
                     log.warn("Retrieving resource with id " + id + " failed: " + \
e.getLocalizedMessage()); +                }
             }
         }
         Response.ResponseBuilder builder;
@@ -151,11 +151,12 @@ public class UserHandlerBean extends AbstractRestBean {
                 ResourceGroup res = resourceGroupManager.getResourceGroup(caller, \
id);  GroupRest rwt = fillGroup(res, uriInfo);
                 ret.add(rwt);
-            } catch (Exception e) {
-                if (e instanceof ResourceGroupNotFoundException)
-                    log.debug("Favorite group with id " + id + " not found - not \
                returning to the user");
-                else
-                    log.warn("Retrieving group with id " + id + " failed: " + \
e.getLocalizedMessage()); +            }
+            catch (ResourceGroupNotFoundException e) {
+                log.debug("Favorite group with id " + id + " not found - not \
returning to the user"); +            }
+            catch (Exception e) {
+                log.warn("Retrieving group with id " + id + " failed: " + \
e.getLocalizedMessage());  }
         }
         Response.ResponseBuilder builder;
@@ -222,8 +223,8 @@ public class UserHandlerBean extends AbstractRestBean {
     @Path("favorites/group/{id}")
     @ApiOperation(value = "Remove a group from favorites")
     public void removeResourceGroupFromFavorites(@ApiParam(name = "id", value = "Id \
                of the group")
-    @PathParam("id")
-    int id) {
+            @PathParam("id") int id) {
+
         Set<Integer> favIds = getGroupIdsForFavorites();
         if (favIds.contains(id)) {
             favIds.remove(id);
@@ -242,8 +243,9 @@ public class UserHandlerBean extends AbstractRestBean {
     HttpHeaders headers) {
 
         Subject subject = subjectManager.getSubjectByName(loginName);
-        if (subject == null)
+        if (subject == null) {
             throw new StuffNotFoundException("User with login " + loginName);
+        }
 
         EntityTag eTag = new EntityTag(Long.toOctalString(subject.hashCode()));
         Response.ResponseBuilder builder = request.evaluatePreconditions(eTag);
@@ -273,7 +275,8 @@ public class UserHandlerBean extends AbstractRestBean {
         PropertySimple prop = conf.getSimple(RESOURCE_HEALTH_RESOURCES);
         if (prop == null) {
             conf.put(new PropertySimple(RESOURCE_HEALTH_RESOURCES, \
                builder.toString()));
-        } else {
+        }
+        else {
             prop.setStringValue(builder.toString());
         }
         caller.setUserConfiguration(conf);
@@ -290,7 +293,8 @@ public class UserHandlerBean extends AbstractRestBean {
         PropertySimple prop = conf.getSimple(GROUP_HEALTH_GROUPS);
         if (prop == null) {
             conf.put(new PropertySimple(GROUP_HEALTH_GROUPS, builder.toString()));
-        } else {
+        }
+        else {
             prop.setStringValue(builder.toString());
         }
         caller.setUserConfiguration(conf);
@@ -308,13 +312,22 @@ public class UserHandlerBean extends AbstractRestBean {
 
     private Set<Integer> getGroupIdsForFavorites() {
         Configuration conf = caller.getUserConfiguration();
-        if (conf==null)
+        if (conf==null) {
             return  new HashSet<Integer>();
+        }
         String favsString = conf.getSimpleValue(GROUP_HEALTH_GROUPS, "");
         Set<Integer> favIds = getIdsFromFavString(favsString);
         return favIds;
     }
 
+    /**
+     * Parse the String with favorites.
+     * The list of favorites is stored in the server as a list
+     * of ids separated by a pipe '|' character.
+     *
+     * @param favsString String as stored in for the user
+     * @return Set of ids of the favorites
+     */
     private Set<Integer> getIdsFromFavString(String favsString) {
         Set<Integer> favIds = new TreeSet<Integer>();
         if (!favsString.isEmpty()) {
@@ -326,13 +339,21 @@ public class UserHandlerBean extends AbstractRestBean {
         return favIds;
     }
 
+    /**
+     * Create the String with favorites to store for the user
+     * The list of favorites is stored in the server as a list
+     * of ids separated by a pipe '|' character
+     * @param favIds Set of favorite ids
+     * @return String representation
+     */
     private StringBuilder buildFavStringFromSet(Set<Integer> favIds) {
         StringBuilder builder = new StringBuilder();
         Iterator<Integer> iter = favIds.iterator();
         while (iter.hasNext()) {
             builder.append(iter.next());
-            if (iter.hasNext())
+            if (iter.hasNext()) {
                 builder.append('|');
+            }
         }
         return builder;
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AlertDefinitionRest.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AlertDefinitionRest.java
 index 2224732..f40d92c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AlertDefinitionRest.java
                
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/AlertDefinitionRest.java
 @@ -43,8 +43,9 @@ public class AlertDefinitionRest {
     List<AlertConditionRest> conditions = new ArrayList<AlertConditionRest>();
     List<AlertNotificationRest> notifications = new \
ArrayList<AlertNotificationRest>();  String dampeningCategory;
-    String dampeningCount;
-    String dampeningPeriod;
+    int dampeningCount;
+    int dampeningPeriod;
+    String dampeningUnit;
     List<Link> links = new ArrayList<Link>();
 
     @SuppressWarnings("unused")
@@ -138,24 +139,33 @@ public class AlertDefinitionRest {
         this.dampeningCategory = dampeningCategory;
     }
 
-    @ApiProperty(value = "Number of occurrences of an alert (in a given period)")
-    public String getDampeningCount() {
+    @ApiProperty(value = "Number of occurrences of an alert (in a given period). \
Valid values are > -1") +    public int getDampeningCount() {
         return dampeningCount;
     }
 
-    public void setDampeningCount(String dampeningCount) {
+    public void setDampeningCount(int dampeningCount) {
         this.dampeningCount = dampeningCount;
     }
 
     @ApiProperty( value = "Period to check events. Only applicable for \
                PARTIAL_COUNT, DURATION_COUNT, INVERSE_COUNT")
-    public String getDampeningPeriod() {
+    public int getDampeningPeriod() {
         return dampeningPeriod;
     }
 
-    public void setDampeningPeriod(String dampeningPeriod) {
+    public void setDampeningPeriod(int dampeningPeriod) {
         this.dampeningPeriod = dampeningPeriod;
     }
 
+    @ApiProperty( value = "Unit of the dampening period.",allowableValues = \
"MINUTES, HOURS, DAYS, WEEKS" ) +    public String getDampeningUnit() {
+        return dampeningUnit;
+    }
+
+    public void setDampeningUnit(String dampeningUnit) {
+        this.dampeningUnit = dampeningUnit;
+    }
+
     public List<Link> getLinks() {
         return links;
     }
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/ConfigurationHelper.java \
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/ConfigurationHelper.java
 new file mode 100644
index 0000000..073966d
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/helper/ConfigurationHelper.java
 @@ -0,0 +1,432 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.enterprise.server.rest.helper;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
+import org.rhq.core.domain.configuration.definition.PropertySimpleType;
+
+/**
+ * Helper class to deal with configuration objects
+ * @author Heiko W. Rupp
+ */
+public class ConfigurationHelper {
+
+    /**
+     * Convert the passed map into a RHQ configuration object
+     * @param in Map with items to convert. Map.Entry.Key is the name of the \
property and Map.Entry.Value the value +     * @return a new Configuration object
+     */
+    public static Configuration mapToConfiguration(Map<String, Object> in) {
+        Configuration config = new Configuration();
+        Set<String> mapKeys = in.keySet();
+        for (String mapKey : mapKeys) {
+            Object mapValue = in.get(mapKey);
+
+            if (mapValue instanceof Map) {
+                Map<String,Object> map = (Map<String, Object>) mapValue;
+                PropertyMap propertyMap = getPropertyMap(mapKey, map);
+                config.put(propertyMap);
+            }
+            else if (mapValue instanceof List) {
+                List<Object> objects = (List<Object>) mapValue;
+                PropertyList propertyList = getPropertyList(mapKey, objects);
+                config.put(propertyList);
+            }
+            else {
+                config.put(new PropertySimple(mapKey,mapValue));
+            }
+        }
+
+        return config;
+
+    }
+
+    public static Map<String,Object> configurationToMap(Configuration configuration, \
ConfigurationDefinition definition, +                                                 \
boolean strict) { +
+        Map<String,Object> result = new HashMap<String, Object>();
+
+        if (configuration==null) {
+            return result;
+        }
+
+        if (configuration.getProperties().isEmpty()) {
+            return result;
+        }
+
+        for (Property property : configuration.getProperties()) {
+
+            String propertyName = property.getName();
+            PropertyDefinition propertyDefinition = definition.get(propertyName);
+            if (propertyDefinition==null) {
+                if (strict) {
+                    throw new IllegalArgumentException("No definition for property " \
+ propertyName + "found"); +                } else {
+                    // no definition found and not strict, so skip the property
+                    continue;
+                }
+            }
+
+            Object target = convertProperty(property, propertyDefinition, strict);
+            result.put(propertyName,target);
+        }
+
+        return result;
+    }
+
+    private static Object convertProperty(Property property, PropertyDefinition \
propertyDefinition, boolean strict) { +        Object target;
+
+        if (property instanceof PropertyMap) {
+            PropertyMap propertyMap = (PropertyMap) property;
+            target = getInnerMap(propertyMap,(PropertyDefinitionMap) \
propertyDefinition, strict); +        } else if (property instanceof PropertyList) {
+            PropertyList propertyList = (PropertyList) property;
+            target = getInnerList(propertyList, \
(PropertyDefinitionList)propertyDefinition, strict); +        } else {
+            target= convertSimplePropertyValue((PropertySimple) property,
+                ((PropertyDefinitionSimple)propertyDefinition));
+        }
+        return target;
+    }
+
+    private static Map<String, Object> getInnerMap(PropertyMap propertyMap, \
PropertyDefinitionMap propertyDefinition, +                                           \
boolean strict) { +
+        Map<String, Property> map = propertyMap.getMap();
+        Map<String,Object> result = new HashMap<String, Object>(map.size());
+
+        Set<String> names = map.keySet();
+        for (String name : names ) {
+            Property property = map.get(name);
+            PropertyDefinition definition = propertyDefinition.get(name);
+
+            Object target = convertProperty(property,definition, strict);
+            result.put(name,target);
+        }
+
+        return result;
+    }
+
+    private static List<Object> getInnerList(PropertyList propertyList, \
PropertyDefinitionList definition, +                                             \
boolean strict) { +
+        List<Object> result = new ArrayList<Object>(propertyList.getList().size());
+
+        if (definition==null) {
+            if (strict) {
+                throw new IllegalArgumentException("No Definition exists for " + \
propertyList.getName()); +            } else {
+                return result;
+            }
+        }
+
+
+        PropertyDefinition memberDefinition = definition.getMemberDefinition();
+        for (Property property : propertyList.getList()) {
+            Object target = convertProperty(property,memberDefinition, strict);
+            result.add(target);
+        }
+
+        return result;
+    }
+
+    private static PropertyList getPropertyList(String propertyName, List<Object> \
objects) { +        PropertyList propertyList = new PropertyList(propertyName);
+
+        Property target;
+        for (Object o : objects) {
+            if (o instanceof List) {
+                // Not sure if we actually support that at all inside RHQ
+                List list = (List) o;
+                target = getPropertyList(propertyName,list); // TODO propertyName?
+            } else if (o instanceof Map) {
+                Map map = (Map) o;
+                target = getPropertyMap(propertyName,map); // TODO propertyName?
+            } else {
+                target = new PropertySimple(propertyName,o);
+            }
+            propertyList.add(target);
+        }
+        return propertyList;
+    }
+
+    private static PropertyMap getPropertyMap(String propertyName, Map<String, \
Object> map) { +        PropertyMap propertyMap = new PropertyMap(propertyName);
+        Set<String> keys = map.keySet();
+        for (String key : keys) {
+            Object value = map.get(key);
+            Property target;
+            if (value instanceof Map) {
+                target = getPropertyMap(key, (Map)value);
+            } else if (value instanceof List) {
+                target = getPropertyList(key, (List)value);
+            } else {
+                target = new PropertySimple(key,value);
+            }
+            propertyMap.put(target);
+        }
+        return propertyMap;
+    }
+
+    /**
+     * Convert the passed simple property into an object of a matching type. The
+     * type is determined with the help of the passed definition
+     * @param property Property to convert
+     * @param definition Definition of the Property
+     * @return Object with the correct type
+     */
+    public static Object convertSimplePropertyValue(PropertySimple property, \
PropertyDefinitionSimple definition) { +
+        if (definition==null) {
+            throw new IllegalArgumentException("No definition provided");
+        }
+
+        if (property==null) {
+            return null;
+        }
+
+        PropertySimpleType type = definition.getType();
+        String val = property.getStringValue();
+
+        Object ret;
+
+        switch (type) {
+            case STRING:
+                ret= val;
+                break;
+            case INTEGER:
+                ret= Integer.valueOf(val);
+                break;
+            case BOOLEAN:
+                ret= Boolean.valueOf(val);
+                break;
+            case LONG:
+                ret= Long.valueOf(val);
+                break;
+            case FLOAT:
+                ret= Float.valueOf(val);
+                break;
+            case DOUBLE:
+                ret= Double.valueOf(val);
+                break;
+            default:
+                ret= val;
+        }
+        return ret;
+    }
+
+
+    /**
+     * Check that the passed configuration is valid wrt the passed definition
+     * @param configuration A Configuration to check
+     * @param definition A Definition to check the Configuration against
+     * @return List of validation failure messages. List is empty if no errors were \
found. +     */
+    public static List<String> checkConfigurationWrtDefinition(Configuration \
configuration, +            ConfigurationDefinition definition) {
+
+        List<String> messages = new ArrayList<String>();
+
+        if (configuration==null) {
+            messages.add("Configuration is null");
+
+        }
+
+        if (definition==null) {
+            messages.add("Definition is null");
+        }
+
+        if (configuration==null || definition==null) {
+            return messages;
+        }
+
+        // Basic validation is done, now have a look at the properties
+
+        for (PropertyDefinition propDef : \
definition.getPropertyDefinitions().values()) { +            String name = \
propDef.getName(); +            Property property = configuration.get(name);
+
+            checkProperty(messages, propDef, property);
+        }
+
+
+        return messages;
+    }
+
+    /**
+     * Recursively check the passed property against the passed property definition
+     * @param messages Validation error messages are added here
+     * @param propertyDefinition The definition to check against
+     * @param property The property to check
+     */
+    private static void checkProperty(List<String> messages, PropertyDefinition \
propertyDefinition, +                                      Property property) {
+
+        String name = propertyDefinition.getName();
+
+        // If a property is required and not present we can bail out early
+        if (propertyDefinition.isRequired() && property ==null) {
+            messages.add("Required property [" + name + "] not found");
+            return;
+        }
+
+        // If a property is not required and is null, it is fine either
+        if (!propertyDefinition.isRequired() && property==null) {
+            return;
+        }
+
+        // Check if the property and definition are of the same kind (simple, map, \
list) +        boolean good = checkIfCompatible(propertyDefinition, \
property,messages); +        // We only need to do this dance if the kinds are \
matching +        if (good) {
+            if (property instanceof PropertySimple) {
+                checkDataTypeOfSimpleProperty((PropertyDefinitionSimple) \
propertyDefinition, (PropertySimple) property, +                    messages);
+            } else if (property instanceof PropertyList) {
+                PropertyList propertyList = (PropertyList) property;
+                PropertyDefinitionList propertyDefinitionList = \
(PropertyDefinitionList) propertyDefinition; +                for (Property prop : \
propertyList.getList()) { +                    checkProperty(messages, \
propertyDefinitionList.getMemberDefinition(), prop); +                }
+            } else if (property instanceof PropertyMap) {
+                PropertyMap propertyMap = (PropertyMap) property;
+                PropertyDefinitionMap propertyDefinitionMap = \
(PropertyDefinitionMap) propertyDefinition; +                for \
(Map.Entry<String,Property> entry : propertyMap.getMap().entrySet()) { +              \
Property prop = entry.getValue(); +                    PropertyDefinition definition \
= propertyDefinitionMap.get(name); +                    \
checkProperty(messages,definition,prop); +                }
+            }
+        }
+    }
+
+    /**
+     * Check that for a Property that is defined with one of the non-string data \
types, the +     * stored value is actually valid according to this data type.
+     * This also checks if a property is required, but its value is actually null.
+     *
+     * @param propDef Definition of the property, that contains the data type
+     * @param property The property to check
+     * @param messages Validation issues are added to this list.
+     */
+    private static void checkDataTypeOfSimpleProperty(PropertyDefinitionSimple \
propDef, PropertySimple property, +                                                   \
List<String> messages) { +
+        String prefix = "Property [" + property.getName() + "] is ";
+        String val = property.getStringValue();
+
+        // If a property is not required and its value is null, we can just return
+        if (!propDef.isRequired() && property.getStringValue()==null) {
+            return;
+        }
+
+        // If a property is required and its value is null, we can just return
+        if (propDef.isRequired() && property.getStringValue()==null) {
+            messages.add(prefix + "required but was 'null'");
+            return;
+        }
+
+
+        switch (propDef.getType()) {
+            case DOUBLE:
+                try {
+                    Double.parseDouble(property.getStringValue());
+                } catch (NumberFormatException nfe ) {
+                    messages.add(prefix + "no double : " + val);
+                }
+                break;
+            case FLOAT:
+                float f;
+                try {
+                    f = Float.parseFloat(property.getStringValue());
+                } catch (NumberFormatException nfe ) {
+                    messages.add(prefix + "no float : " + val);
+                    break;
+                }
+                if (f < Float.MIN_VALUE || f > Float.MAX_VALUE) {
+                    messages.add(prefix + "no valid float : " + val);
+                }
+                break;
+            case INTEGER:
+                try {
+                    Integer.parseInt(property.getStringValue());
+                } catch (NumberFormatException nfe ) {
+                    messages.add(prefix + "no integer : " + val);
+                }
+                break;
+            case LONG:
+                try {
+                    Long.parseLong(property.getStringValue());
+                } catch (NumberFormatException nfe ) {
+                    messages.add(prefix + "no long : " + val);
+                }
+                break;
+            case BOOLEAN:
+                String s = val.toLowerCase();
+                if (!(s.equals("true") || s.equals("false"))) {
+                    messages.add(prefix + "no boolean : " + val);
+                }
+                break;
+            default:
+                // Strings and long strings and directories and files
+        }
+    }
+
+    /**
+     * Check if the Kind of Definition and Property match. I.e. if a PropertyMap \
corresponds to a PropertyDefinitionMap +     * @param propDef PropertyDefinition to \
match +     * @param property Property to match with the definition
+     * @param messages List of messages to add validation errors to.
+     * @return true if the kinds are matching
+     */
+    private static boolean checkIfCompatible(final PropertyDefinition propDef, final \
Property property, +                                          final List<String> \
messages) { +
+        boolean good = false ;
+        if (propDef instanceof PropertyDefinitionSimple && property instanceof \
PropertySimple) { +            good = true;
+        } else if (propDef instanceof PropertyDefinitionMap && property instanceof \
PropertyMap) { +            good = true;
+        } else if (propDef instanceof PropertyDefinitionList && property instanceof \
PropertyList) { +            good = true;
+        }
+        if (!good) {
+            String name = propDef.getName();
+            messages.add("The type of property for [" + name + "] does not match the \
definition"); +        }
+        return good;
+    }
+}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java \
b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 new file mode 100644
index 0000000..7e20630
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/configuration/ConfigurationHelperTest.java
 @@ -0,0 +1,756 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+package org.rhq.enterprise.server.configuration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionMap;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
+import org.rhq.core.domain.configuration.definition.PropertySimpleType;
+import org.rhq.core.domain.util.StringUtils;
+import org.rhq.enterprise.server.rest.helper.ConfigurationHelper;
+
+/**
+ * Test the ConfigurationHelper class
+ * @author Heiko W. Rupp
+ */
+public class ConfigurationHelperTest {
+
+    @Test
+    public void testConvertSimpleMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        map.put("Answer",42);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2;
+
+        PropertySimple hello = config.getSimple("Hello");
+        assert hello !=null;
+        assert hello.getStringValue().equals("World");
+
+        PropertySimple qu = config.getSimple("Answer");
+        assert qu!=null;
+        Integer value = qu.getIntegerValue();
+        assert value !=null;
+        assert value ==42;
+    }
+
+    @Test
+    public void testConvertWithNestedMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(3);
+        map.put("Hello","World");
+        map.put("Answer",42);
+        Map<String,Object> inner = new HashMap<String, Object>(1);
+        inner.put("Foo","Bar");
+        map.put("Inner",inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==3 : "Expected 3 props, got " + properties.size();
+
+        Property prop = config.get("Inner");
+        assert prop!=null;
+        assert prop instanceof PropertyMap : "Inner is no map";
+
+        PropertyMap pm = (PropertyMap) prop;
+        Map<String, Property> innerMap = pm.getMap();
+        assert innerMap.size()==1;
+
+        assert inner.containsKey("Foo");
+
+    }
+
+    @Test
+    public void testConvertListOfMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        List<Map<String,Object>> list = new ArrayList<Map<String, Object>>();
+        map.put("list",list);
+
+        Map<String,Object> inner = new HashMap<String, Object>(1);
+        inner.put("Foo","Bar");
+        list.add(inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2 : "Expected 2 props, got " + properties.size();
+
+        Property prop = config.get("Inner");
+        assert prop==null;
+
+        prop = config.get("list");
+        assert prop instanceof PropertyList : "list is no list";
+
+        PropertyList pl = (PropertyList) prop;
+        List<Property> propertyList = pl.getList();
+        assert propertyList.size()==1;
+        PropertyMap innerMapProperty = (PropertyMap) propertyList.get(0);
+
+        Map<String, Property> propertyMap = innerMapProperty.getMap();
+        assert propertyMap.size()==1;
+        Map<String,Property> innerMap = propertyMap;
+
+        assert innerMap.containsKey("Foo");
+        Property property = innerMapProperty.get("Foo");
+        assert property != null;
+        assert property instanceof PropertySimple;
+        PropertySimple ps = (PropertySimple) property;
+        assert ps.getStringValue().equals("Bar");
+
+    }
+
+    @Test
+    public void testConvertWithListOfSimple() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        map.put("Answer",42);
+        List<String> inner = new ArrayList<String>(2);
+        inner.add("Foo");
+        inner.add("Bar");
+        map.put("Inner", inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==3 : "Expected 3 props, got " + properties.size();
+
+        Property prop = config.get("Inner");
+        assert prop!=null;
+        assert prop instanceof PropertyList : "Inner is no list";
+
+        PropertyList plist = (PropertyList) prop;
+        List<Property> propertyList = plist.getList();
+        assert propertyList.size()==2;
+        for (Property innerProp : propertyList) {
+            assert innerProp instanceof PropertySimple;
+            PropertySimple ps = (PropertySimple) innerProp;
+            assert ps.getName().equals("Inner");
+            assert ps.getStringValue().equals("Foo") || \
ps.getStringValue().equals("Bar"); +        }
+
+    }
+
+    @Test
+    public void testConvertAndValidateBoolean() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>();
+        map.put("bool1","true");
+        map.put("bool2","TruE");
+        map.put("bool3","fAlSe");
+        map.put("bool4", "false");
+        map.put("bool5", 42);
+        map.put("bool6", "Hugo");
+        map.put("bool7",null);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==7 : "Expected 7 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("bool1","A \
boolean",true, PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("bool2","A boolean",true, PropertySimpleType.BOOLEAN)); +    \
definition.put(new PropertyDefinitionSimple("bool3","A boolean",true, \
PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("bool4","A boolean",true, PropertySimpleType.BOOLEAN)); +    \
definition.put(new PropertyDefinitionSimple("bool5","A boolean",true, \
PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("bool6","A boolean",true, PropertySimpleType.BOOLEAN)); +    \
definition.put(new PropertyDefinitionSimple("bool7","A boolean",true, \
PropertySimpleType.BOOLEAN)); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==3 : "Expected 3 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n "); +
+    }
+
+    @Test
+    public void testConvertAndValidateMissingRequired() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(1);
+        map.put("bool1","true");
+        // required 2nd entry is missing
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==1 : "Expected 1 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("bool1","A \
boolean",true, PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("bool2","A boolean",true, PropertySimpleType.BOOLEAN)); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==1 : "Expected 1 error, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n "); +
+    }
+
+    @Test
+    public void testConvertAndValidateNotRequiredButNull() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(1);
+        map.put("bool1","true");
+        map.put("optional",null);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2 : "Expected 2 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("bool1","A \
boolean",true, PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("optional","null string",false, PropertySimpleType.STRING)); \
+ +        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==0 : "Expected 0 error, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n "); +
+    }
+
+    @Test
+    public void testConvertAndValidateMismatchingKind() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(1);
+        map.put("bool1","true");
+        map.put("optional",null);
+        Map<String,Object> inner = new HashMap<String, Object>(1);
+        inner.put("Foo","Bar");
+        map.put("Inner",inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==3 : "Expected 3 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("bool1","A \
boolean",true, PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("optional","null string",false, PropertySimpleType.STRING)); \
+        // We define Inner as a simple property, but the user supplied a map +       \
definition.put(new PropertyDefinitionSimple("Inner","null string",false, \
PropertySimpleType.STRING)); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==1 : "Expected 1 error, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n "); +
+    }
+
+    @Test
+    public void testConvertAndValidateMismatchingKind2() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(1);
+        map.put("bool1","true");
+        map.put("optional",null);
+        map.put("Inner","Frobnitz");
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==3 : "Expected 3 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("bool1","A \
boolean",true, PropertySimpleType.BOOLEAN)); +        definition.put(new \
PropertyDefinitionSimple("optional","null string",false, PropertySimpleType.STRING)); \
+        // We define Inner as a list property, but the user supplied a simple one +  \
definition.put(new PropertyDefinitionList("Inner","Bla",true, +            new \
PropertyDefinitionSimple("Inner","fasel",true,PropertySimpleType.STRING))); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==1 : "Expected 1 error, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n "); +
+    }
+
+    @Test
+    public void testConvertAndValidateNumeric() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("float1",1.1f);
+        map.put("float2",Double.MAX_VALUE);
+        map.put("float3",null);
+        map.put("float4","abc");
+
+        map.put("double1",1.1d);
+        map.put("double2",null);
+        map.put("double3","hugo");
+
+        map.put("int1",42);
+        map.put("int2",Long.MAX_VALUE);
+        map.put("int3",null);
+        map.put("int4","abc");
+
+        map.put("long1",-5);
+        map.put("long2",null);
+        map.put("long3","Frobnitz");
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==14 : "Expected 14 props but got " + \
properties.size(); +
+        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For \
testing"); +        definition.put(new PropertyDefinitionSimple("float1","A \
float",true, PropertySimpleType.FLOAT)); +        definition.put(new \
PropertyDefinitionSimple("float2","A float",true, PropertySimpleType.FLOAT)); +       \
definition.put(new PropertyDefinitionSimple("float3","A float",true, \
PropertySimpleType.FLOAT)); +        definition.put(new \
PropertyDefinitionSimple("float4","A float",true, PropertySimpleType.FLOAT)); +
+        definition.put(new PropertyDefinitionSimple("double1","A double",true, \
PropertySimpleType.DOUBLE)); +        definition.put(new \
PropertyDefinitionSimple("double2","A double",true, PropertySimpleType.DOUBLE)); +    \
definition.put(new PropertyDefinitionSimple("double3","A double",true, \
PropertySimpleType.DOUBLE)); +
+        definition.put(new PropertyDefinitionSimple("int1","An int",true, \
PropertySimpleType.INTEGER)); +        definition.put(new \
PropertyDefinitionSimple("int2","An int",true, PropertySimpleType.INTEGER)); +        \
definition.put(new PropertyDefinitionSimple("int3","An int",true, \
PropertySimpleType.INTEGER)); +        definition.put(new \
PropertyDefinitionSimple("int4","An int",true, PropertySimpleType.INTEGER)); +
+        definition.put(new PropertyDefinitionSimple("long1","A long",true, \
PropertySimpleType.LONG)); +        definition.put(new \
PropertyDefinitionSimple("long2","A long",true, PropertySimpleType.LONG)); +        \
definition.put(new PropertyDefinitionSimple("long3","A long",true, \
PropertySimpleType.LONG)); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==10 : "Expected 10 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n"); +
+    }
+
+    @Test
+    public void testValidateNullConfiguration() throws Exception {
+
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(null,new \
ConfigurationDefinition("bla",null)); +        assert errors != null;
+        assert errors.size()==1;
+
+    }
+
+    @Test
+    public void testValidateNullDefinition() throws Exception {
+
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(new Configuration(),null); +      \
assert errors != null; +        assert errors.size()==1;
+
+    }
+
+    @Test
+    public void testConvertAndValidateSimpleMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        map.put("Answer",42);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING)); +        \
definition.put(new PropertyDefinitionSimple("Answer",null,true,PropertySimpleType.INTEGER));
 +        definition.put(new \
PropertyDefinitionSimple("Optional",null,false,PropertySimpleType.INTEGER)); +
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2;
+
+        PropertySimple hello = config.getSimple("Hello");
+        assert hello !=null;
+        assert hello.getStringValue().equals("World");
+
+        PropertySimple qu = config.getSimple("Answer");
+        assert qu!=null;
+        Integer integerValue = qu.getIntegerValue();
+        assert integerValue !=null;
+        assert integerValue ==42;
+    }
+
+    @Test
+    public void testConvertValidateNonRequiredNotPresent() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==0 : "Expected 0 props, got " + properties.size();
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("Answer",null,false,PropertySimpleType.INTEGER)); +
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==0 : "Expected 0 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n"); +
+    }
+
+    @Test
+    public void testConvertAndValidateListOfMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        List<Map<String,Object>> list = new ArrayList<Map<String, Object>>();
+        map.put("list",list);
+
+        Map<String,Object> inner = new HashMap<String, Object>(1);
+        inner.put("Foo","Bar");
+        list.add(inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2 : "Expected 2 props, got " + properties.size();
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING)); +        \
definition.put(new PropertyDefinitionSimple("Answer",null,false,PropertySimpleType.INTEGER));
 +        definition.put(new PropertyDefinitionList("list",null,true,
+                new PropertyDefinitionMap("list",null,true,
+                    new \
PropertyDefinitionSimple("list",null,true,PropertySimpleType.STRING)))); +        \
definition.put(new PropertyDefinitionSimple("aString",null,false,PropertySimpleType.INTEGER));
 +
+
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==0 : "Expected 0 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n"); +
+    }
+
+    @Test
+    public void testConvertAndValidateMapOfMap() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+        Map<String,Map<String,Object>> list = new HashMap<String, Map<String, \
Object>>(); +        map.put("list",list);
+
+        Map<String,Object> inner = new HashMap<String, Object>(1);
+        inner.put("Foo","Bar");
+        list.put("outer", inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2 : "Expected 2 props, got " + properties.size();
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING)); +        \
definition.put(new PropertyDefinitionMap("list",null,true, +                new \
PropertyDefinitionMap("list",null,true, +                    new \
PropertyDefinitionSimple("list",null,true,PropertySimpleType.STRING)))); +
+
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==0 : "Expected 0 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n"); +
+    }
+
+    @Test
+    public void testConvertAndValidateMapWithListOfSimple() throws Exception {
+
+        Map<String,Object> map = new HashMap<String, Object>(2);
+        map.put("Hello","World");
+
+        Map<String,List<String>> list = new HashMap<String, List<String>>();
+        map.put("list",list);
+
+        List<String> inner = new ArrayList<String>();
+        inner.add("Foo");
+        inner.add("Bar");
+        list.put("outer", inner);
+
+        Configuration config = ConfigurationHelper.mapToConfiguration(map);
+
+        assert config!=null;
+        Collection<Property> properties = config.getProperties();
+        assert properties.size()==2 : "Expected 2 props, got " + properties.size();
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING)); +        \
definition.put(new PropertyDefinitionMap("list",null,true, +                new \
PropertyDefinitionList("list",null,true, +                    new \
PropertyDefinitionSimple("list",null,true,PropertySimpleType.STRING)))); +
+
+        List<String> errors = \
ConfigurationHelper.checkConfigurationWrtDefinition(config,definition); +
+        assert errors!=null;
+        assert errors.size()==0 : "Expected 0 errors, but got " + errors.size() + \
"\n" + StringUtils.getListAsString(errors,",\n"); +
+    }
+
+    @Test
+    public void testConfigToMapSimple() throws Exception {
+
+        Configuration config = new Configuration();
+        config.put(new PropertySimple("number",42));
+        config.put(new PropertySimple("string","Hello"));
+        config.put(new PropertySimple("bool",true));
+        config.put(new PropertySimple("float",1.1f));
+        config.put(new PropertySimple("double",2.3d));
+        config.put(new PropertySimple("long",Long.MAX_VALUE));
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("number",null,false,PropertySimpleType.INTEGER)); +        \
definition.put(new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING));
 +        definition.put(new \
PropertyDefinitionSimple("bool",null,false,PropertySimpleType.BOOLEAN)); +        \
definition.put(new PropertyDefinitionSimple("float",null,false,PropertySimpleType.FLOAT));
 +        definition.put(new \
PropertyDefinitionSimple("double",null,false,PropertySimpleType.DOUBLE)); +        \
definition.put(new PropertyDefinitionSimple("long",null,false,PropertySimpleType.LONG));
 +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, true); +
+        assert map != null;
+        assert map.entrySet().size()==6;
+
+        assert map.containsKey("number");
+        assert map.containsKey("string");
+
+        assert map.get("number") != null;
+        assert (Integer)map.get("number") == 42;
+
+        assert map.get("string") != null;
+        assert map.get("string").equals("Hello");
+
+        assert (Boolean)map.get("bool") == true;
+
+        assert map.get("float") != null;
+        assert (Float)map.get("float") ==1.1f;
+
+        assert map.get("double") != null;
+        assert (Double) map.get("double") ==2.3d;
+
+        assert map.get("long") != null;
+        assert (Long)map.get("long") == Long.MAX_VALUE;
+
+    }
+
+    @Test
+    public void testEmptyConfigToMap() throws Exception {
+
+        Configuration config = new Configuration();
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("number",null,false,PropertySimpleType.INTEGER)); +        \
definition.put(new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING));
 +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, true); +
+        assert map != null;
+        assert map.entrySet().size()==0;
+
+
+    }
+
+    @Test
+    public void testNullConfigToMap() throws Exception {
+
+        Configuration config = null;
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionSimple("number",null,false,PropertySimpleType.INTEGER)); +        \
definition.put(new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING));
 +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, true); +
+        assert map != null;
+        assert map.entrySet().size()==0;
+
+    }
+
+    @Test
+    public void testConfigToMapComplexList() throws Exception {
+
+        Configuration config = new Configuration();
+        PropertyList propertyList = new PropertyList("aList");
+        propertyList.add(new PropertySimple("string", "Hello"));
+        propertyList.add(new PropertySimple("string", "World"));
+        config.put(propertyList);
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionList("aList",null,false, +            new \
PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING))); +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, true); +
+        assert map != null;
+        assert map.entrySet().size()==1;
+
+        assert map.containsKey("aList");
+
+    }
+
+    @Test
+    public void testConfigToMapComplexMap() throws Exception {
+
+        Configuration config = new Configuration();
+        PropertyMap propertyMap = new PropertyMap("aMap");
+        config.put(propertyMap);
+        PropertyList propertyList = new PropertyList("aList");
+        propertyList.add(new PropertySimple("string", "Hello"));
+        propertyList.add(new PropertySimple("string", "World"));
+        propertyMap.put(propertyList);
+
+        propertyMap.put(new PropertySimple("aString","Frobnitz"));
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionMap("aMap",null,false, +            new \
PropertyDefinitionList("aList",null,false, +                new \
PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)), +           \
new PropertyDefinitionSimple("aString",null,false,PropertySimpleType.STRING))); +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, true); +
+        assert map != null;
+        assert map.entrySet().size()==1;
+
+        assert map.containsKey("aMap");
+        assert map.get("aMap") instanceof Map;
+        Map<String,Object> innerMap = (Map<String, Object>) map.get("aMap");
+
+        assert innerMap.containsKey("aString");
+        assert innerMap.containsKey("aList");
+
+    }
+
+    @Test
+    public void testConfigToMapComplexMapWithBadSetupStrict() throws Exception {
+
+        Configuration config = new Configuration();
+        PropertyMap propertyMap = new PropertyMap("aMap");
+        config.put(propertyMap);
+        PropertyList propertyList = new PropertyList("aList");
+        propertyList.add(new PropertySimple("string", "Hello"));
+        propertyList.add(new PropertySimple("string", "World"));
+        propertyMap.put(propertyList);
+
+        propertyMap.put(new PropertySimple("aString","Frobnitz"));
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionMap("aMap",null,false, +            new \
PropertyDefinitionList("aBla",null,false, +                new \
PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)), +           \
new PropertyDefinitionSimple("aFoo",null,false,PropertySimpleType.STRING))); +
+        try {
+            ConfigurationHelper.configurationToMap(config,definition, true);
+            assert false;
+        } catch (IllegalArgumentException iae ) {
+            System.out.println("Yep, caught the error");
+        }
+
+
+    }
+
+    @Test
+    public void testConfigToMapComplexMapWithBadSetupLenient() throws Exception {
+
+        Configuration config = new Configuration();
+        PropertyMap propertyMap = new PropertyMap("aMap");
+        config.put(propertyMap);
+        PropertyList propertyList = new PropertyList("aList");
+        propertyList.add(new PropertySimple("string", "Hello"));
+        propertyList.add(new PropertySimple("string", "World"));
+        propertyMap.put(propertyList);
+
+        propertyMap.put(new PropertySimple("aString","Frobnitz"));
+
+
+        ConfigurationDefinition definition = new \
ConfigurationDefinition("bla",null); +        definition.put(new \
PropertyDefinitionMap("aMap",null,false, +            new \
PropertyDefinitionList("aBla",null,false, +                new \
PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)), +           \
new PropertyDefinitionSimple("aFoo",null,false,PropertySimpleType.STRING))); +
+        Map<String,Object> map = \
ConfigurationHelper.configurationToMap(config,definition, false); +
+        assert map != null;
+        assert map.entrySet().size()==1;
+
+        assert map.containsKey("aMap");
+
+    }
+
+    @Test
+    public void testConvertSingleValueNoProperty() throws Exception {
+
+        Object o = ConfigurationHelper.convertSimplePropertyValue(null,new \
PropertyDefinitionSimple("dummy",null,false,PropertySimpleType.STRING)); +
+        assert o == null;
+
+    }
+
+    @Test
+    public void testConvertSingleValueNoDefinition() throws Exception {
+
+        try {
+            ConfigurationHelper.convertSimplePropertyValue(new \
PropertySimple("foo","bar"),null); +            assert false;
+        }
+        catch (IllegalArgumentException iae) {
+            System.out.println("Yep, good");
+        }
+
+    }
+}
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 index 3d9f735..fca0f50 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/AlertTest.java
 @@ -266,8 +266,8 @@ public class AlertTest extends AbstractBase {
             .expect()
                 .statusCode(201)
                 .body("dampeningCategory",is("NONE"))
-                .body("dampeningCount",is("0"))
-                .body("dampeningPeriod",is("0"))
+                .body("dampeningCount",is(0))
+                .body("dampeningPeriod",is(0))
             .when()
                 .post("/alert/definitions")
             .as(AlertDefinition.class);
@@ -369,8 +369,8 @@ public class AlertTest extends AbstractBase {
             alertDefinition.setEnabled(false);
             alertDefinition.setPriority("LOW");
             alertDefinition.setDampeningCategory("PARTIAL_COUNT");
-            alertDefinition.setDampeningCount("3");
-            alertDefinition.setDampeningPeriod("5");
+            alertDefinition.setDampeningCount(3);
+            alertDefinition.setDampeningPeriod(5);
 
             AlertDefinition result =
             given()
@@ -381,8 +381,8 @@ public class AlertTest extends AbstractBase {
             .expect()
                 .statusCode(201)
                 .body("dampeningCategory",is("PARTIAL_COUNT"))
-                .body("dampeningCount",is("3"))
-                .body("dampeningPeriod",is("5"))
+                .body("dampeningCount",is(3))
+                .body("dampeningPeriod",is(5))
             .when()
                 .post("/alert/definitions")
             .as(AlertDefinition.class);
@@ -404,8 +404,9 @@ public class AlertTest extends AbstractBase {
             alertDefinition.setEnabled(false);
             alertDefinition.setPriority("LOW");
             alertDefinition.setDampeningCategory("DURATION_COUNT");
-            alertDefinition.setDampeningCount("1");
-            alertDefinition.setDampeningPeriod("3 minutes");
+            alertDefinition.setDampeningCount(1);
+            alertDefinition.setDampeningPeriod(3);
+            alertDefinition.setDampeningUnit("minutes");
 
             AlertDefinition result =
             given()
@@ -416,8 +417,9 @@ public class AlertTest extends AbstractBase {
             .expect()
                 .statusCode(201)
                 .body("dampeningCategory",is("DURATION_COUNT"))
-                .body("dampeningCount", is("1"))
-                .body("dampeningPeriod", is("3 MINUTES"))
+                .body("dampeningCount", is(1))
+                .body("dampeningPeriod", is(3))
+                .body("dampeningUnit", is("MINUTES"))
             .when()
                 .post("/alert/definitions")
             .as(AlertDefinition.class);
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/OperationsTest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/OperationsTest.java
 index 713a755..e6aea1f 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/OperationsTest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/OperationsTest.java
 @@ -61,8 +61,9 @@ public class OperationsTest extends AbstractBase {
         definitionId = -1;
         List<Map<String,Object>> list = r.as(List.class);
         for (Map<String,Object> map : list) {
-            if (map.get("name").equals("discovery"))
+            if (map.get("name").equals("discovery")) {
                 definitionId = (Integer) map.get("id");
+            }
         }
 
         assert definitionId !=-1 : "No discovery operation found";
@@ -85,6 +86,92 @@ public class OperationsTest extends AbstractBase {
      }
 
     @Test
+    public void testGetDefinitionByUnknownId() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+            .pathParam("did",-42)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/operation/definition/{did}");
+
+     }
+
+    @Test
+    public void testGetDefinitionsForUnknownResource() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+            .queryParam("resourceId",42)
+        .expect()
+            .statusCode(404)
+        .when()
+            .get("/operation/definitions");
+     }
+
+    @Test
+    public void testGetDefinitionsForMissingResourceId() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+        .expect()
+            .statusCode(406)
+        .when()
+            .get("/operation/definitions");
+     }
+
+    @Test
+    public void testCreateScheduleByUnknownDefinitionId() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+            .pathParam("did",-42)
+        .expect()
+            .statusCode(406)
+        .when()
+            .post("/operation/definition/{did}");
+
+     }
+
+    @Test
+    public void testCreateScheduleForUnknownResource() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+            .queryParam("resourceId", 42)
+            .pathParam("definitionId", definitionId)
+        .expect()
+            .statusCode(404)
+        .when()
+            .post("/operation/definition/{definitionId}");
+     }
+
+    @Test
+    public void testCreateScheduleForMissingResourceId() throws Exception {
+
+        // Now retrieve that definition by id
+
+        given()
+            .header(acceptJson)
+            .pathParam("definitionId", definitionId)
+        .expect()
+            .statusCode(406)
+        .when()
+            .post("/operation/definition/{definitionId}");
+     }
+
+    @Test
     public void testCreateDraftOperation() throws Exception {
 
         Operation draft =
@@ -196,8 +283,9 @@ public class OperationsTest extends AbstractBase {
         String history = null;
         List<Link> links = scheduled.getLinks();
         for (Link link : links) {
-            if (link.getRel().equals("history"))
-                history = (String) link.getHref();
+            if (link.getRel().equals("history")) {
+                history = link.getHref();
+            }
         }
         assert history != null;
 
@@ -272,4 +360,98 @@ public class OperationsTest extends AbstractBase {
         }
     }
 
+    @Test
+    public void testOpsScheduleMissingRequiredParam() throws Exception {
+
+        int platformId = findIdOfARealPlatform();
+
+        Operation draft =
+        given()
+            .header(acceptJson)
+            .pathParam("definitionId",definitionId)
+            .queryParam("resourceId",platformId)
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+        .when()
+            .post("/operation/definition/{definitionId}")
+        .as(Operation.class);
+
+        assert draft != null;
+        assert draft.getDefinitionId() == definitionId;
+
+        int draftId = draft.getId();
+
+        // explicitly remove the param from the draft for
+        // the test
+        Map<String, Object> params = draft.getParams();
+        if (params.containsKey("detailedDiscovery")) {
+            params.remove("detailedDiscovery");
+        }
+
+        // Update to put the new version in the server
+        // We don't want to submit, so the server does not
+        // validate and we should get a 200 back
+        draft.setReadyToSubmit(false);
+        given()
+            .contentType(ContentType.JSON)
+            .pathParam("id",draftId)
+            .body(draft)
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+        .when()
+            .put("/operation/{id}");
+
+
+        // update to schedule, lacking the required param
+        draft.setReadyToSubmit(true);
+
+        given()
+            .contentType(ContentType.JSON)
+            .pathParam("id",draftId)
+            .body(draft)
+        .expect()
+            .statusCode(406)
+            .log().ifError()
+        .when()
+            .put("/operation/{id}");
+    }
+
+    @Test
+    public void testOpsScheduleRequiredParamWrongDataType() throws Exception {
+
+        int platformId = findIdOfARealPlatform();
+
+        Operation draft =
+        given()
+            .header(acceptJson)
+            .pathParam("definitionId",definitionId)
+            .queryParam("resourceId",platformId)
+        .expect()
+            .statusCode(200)
+            .log().ifError()
+        .when()
+            .post("/operation/definition/{definitionId}")
+        .as(Operation.class);
+
+        assert draft != null;
+        assert draft.getDefinitionId() == definitionId;
+
+        int draftId = draft.getId();
+
+        draft.getParams().put("detailedDiscovery", 42);
+        draft.setReadyToSubmit(true);
+
+        // update to schedule
+        given()
+            .contentType(ContentType.JSON)
+            .pathParam("id",draftId)
+            .body(draft)
+        .expect()
+            .statusCode(406)
+            .log().ifError()
+        .when()
+            .put("/operation/{id}");
+    }
 }
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/RootURITest.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/RootURITest.java
 index 5922770..d6da534 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/RootURITest.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/RootURITest.java
 @@ -50,7 +50,7 @@ public class RootURITest extends AbstractBase {
                 .expect().statusCode(200)
                 .when().get("/");
 
-        given().header("Accept","application/json")
+        given().header("Accept","application/xml")
                 .expect().statusCode(200)
                 .when().get("/index");
 
diff --git a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/AlertDefinition.java \
b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/AlertDefinition.java
 index 5049a98..b870443 100644
--- a/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/AlertDefinition.java
                
+++ b/modules/integration-tests/rest-api/src/test/java/org/rhq/modules/integrationTests/restApi/d/AlertDefinition.java
 @@ -41,8 +41,9 @@ public class AlertDefinition {
     List<AlertCondition> conditions = new ArrayList<AlertCondition>();
     List<AlertNotification> notifications = new ArrayList<AlertNotification>();
     String dampeningCategory = "NONE";
-    String dampeningCount;
-    String dampeningPeriod;
+    int dampeningCount;
+    int dampeningPeriod;
+    String dampeningUnit;
     List<Link> links;
 
 
@@ -121,22 +122,30 @@ public class AlertDefinition {
         this.dampeningCategory = dampeningCategory;
     }
 
-    public String getDampeningCount() {
+    public int getDampeningCount() {
         return dampeningCount;
     }
 
-    public void setDampeningCount(String dampeningCount) {
+    public void setDampeningCount(int dampeningCount) {
         this.dampeningCount = dampeningCount;
     }
 
-    public String getDampeningPeriod() {
+    public int getDampeningPeriod() {
         return dampeningPeriod;
     }
 
-    public void setDampeningPeriod(String dampeningPeriod) {
+    public void setDampeningPeriod(int dampeningPeriod) {
         this.dampeningPeriod = dampeningPeriod;
     }
 
+    public String getDampeningUnit() {
+        return dampeningUnit;
+    }
+
+    public void setDampeningUnit(String dampeningUnit) {
+        this.dampeningUnit = dampeningUnit;
+    }
+
     public List<Link> getLinks() {
         return links;
     }


commit d72ac1e6bba8cbeb054a7cbfc8d7df026a09a5fc
Author: Heiko W. Rupp <hwr@redhat.com>
Date:   Wed May 8 09:17:22 2013 +0200

    Add another email for Thomas

diff --git a/.mailmap b/.mailmap
index 384ec04..ac0fdc9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -75,5 +75,6 @@ Test JON User <test_jon@jon01.qa.atl2.redhat.com>
 Todd B Sanders <tsanders@dhcp231-67.rdu.redhat.com>
 Torben Jäger <torben@jit-central.com>
 Thomas Segismont <tsegismo@redhat.com> Thomas SEGISMONT <tsegismo@redhat.com>
+Thomas Segismont <tsegismo@redhat.com> Thomas Segismont <tsegismont@gmail.com>
 Thomas Segismont <tsegismo@redhat.com> 
 hudson auto <wnstb@yahoo.com>


commit bbe5654f0755eac835b78351a8ef71a7e3398037
Author: Mike Thompson <mithomps@redhat.com>
Date:   Tue May 7 16:58:43 2013 -0700

    [BZ 960646] - RFE Redesigned Availability Chart - Add disabled state cross hatch \
SVG pattern. Pixel tweeks.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 index 76c8f69..4e6a0ce 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -18,6 +18,9 @@
  */
 package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
 
+import java.util.Date;
+import java.util.List;
+
 import org.rhq.core.domain.measurement.Availability;
 import org.rhq.core.domain.measurement.MeasurementUnits;
 import org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability;
@@ -27,9 +30,6 @@ import org.rhq.enterprise.gui.coregui.client.Messages;
 import org.rhq.enterprise.gui.coregui.client.util.Log;
 import org.rhq.enterprise.gui.coregui.client.util.MeasurementConverterClient;
 
-import java.util.Date;
-import java.util.List;
-
 /**
  * Contains the javascript chart definition for an implementation of the d3 \
                availability chart. This implementation is
  * just a line that changes color based on availability type: up=green, down=red, \
orange=disabled, unknown=grey, @@ -66,7 +66,7 @@ public class \
AvailabilityOverUnderGraphType {  // loop through the avail intervals
             for (Availability availability : availabilityList) {
                 sb.append("{ \"availType\":\"" + availability.getAvailabilityType() \
                + "\", ");
-                sb.append(" \"availTypeMessage\":\"" + \
availability.getAvailabilityType()+ "\", "); +                sb.append(" \
                \"availTypeMessage\":\"" + availability.getAvailabilityType() + "\", \
                ");
                 sb.append(" \"availStart\":" + availability.getStartTime() + ", ");
                 // last record will be null
                 long endTime = availability.getEndTime() != null ? \
availability.getEndTime() : (new Date()).getTime(); @@ -84,8 +84,9 @@ public class \
AvailabilityOverUnderGraphType {  // loop through the group avail down intervals
             for (ResourceGroupAvailability groupAvailability : \
                groupAvailabilityList) {
                 // allows substitution for situations like WARN=MIXED for easier \
                terminology
-                String availabilityTypeMessage = \
(groupAvailability.getGroupAvailabilityType().equals(ResourceGroupComposite.GroupAvailabilityType.WARN))
                
-                        ? MSG.chart_hover_availability_type_warn() : \
groupAvailability.getGroupAvailabilityType().name(); +                String \
availabilityTypeMessage = (groupAvailability.getGroupAvailabilityType() +             \
.equals(ResourceGroupComposite.GroupAvailabilityType.WARN)) ? MSG +                   \
.chart_hover_availability_type_warn() : \
groupAvailability.getGroupAvailabilityType().name();  
                 sb.append("{ \"availType\":\"" + \
                groupAvailability.getGroupAvailabilityType() + "\", ");
                 sb.append(" \"availTypeMessage\":\"" + availabilityTypeMessage + \
"\", "); @@ -139,7 +140,6 @@ public class AvailabilityOverUnderGraphType {
                     barOffset = 10,
                     width = 750 - margin.left - margin.right + barOffset,
                     height = 40 - margin.top - margin.bottom,
-                    pixelsOffHeight = 0,
                     svg;
 
 
@@ -161,65 +161,65 @@ public class AvailabilityOverUnderGraphType {
                                 .domain([0, 4]),
 
                         xAxis = $wnd.d3.svg.axis()
-                            .scale(timeScale)
-                            .ticks(12)
-                            .tickSize(10, 0, 0)
-                            .orient("bottom"),
-
-                       calcBarY = function(d) {
-                           var ABOVE = -10,
-                               BELOW = 0,
-                               STRADDLE = -5,
-                               offset;
-
-                           if (d.availType === 'DOWN') {
-                               offset =  BELOW;
-                           }
-                           else if (d.availType === 'DISABLED') {
-                               offset =  STRADDLE;
-                           }
-                           else if (d.availType === 'UNKNOWN') {
-                               offset =  STRADDLE;
-                           }
-                           else if (d.availType === 'UP') {
-                               offset =  ABOVE;
-                           }
-                           else if (d.availType === 'WARN') {
-                               offset =  STRADDLE;
-                           }
-                           else if (d.availType === 'EMPTY') {
-                               offset =  STRADDLE;
-                           }
-                           return yScale(0) + offset;
-
-                       },
-
-                    calcBarFill = function(d) {
-                        if (d.availType === 'DOWN') {
-                            return "#FF1919"; // red
-                        }
-                        else if (d.availType === 'DISABLED') {
-                            return "#FF9933"; // orange
-                        }
-                        else if (d.availType === 'UNKNOWN') {
-                            return "#CCC"; // gray
-                        }
-                        else if (d.availType === 'UP') {
-                            return "#198C19"; // green
-                        }
-                        else if (d.availType === 'WARN') {
-                            return "#FFA500"; // yellow
-                        }
-                        else if (d.availType === 'EMPTY') {
-                            return "#CCC"; // gray
-                        }
-                        else {
-                            // should not ever happen, but...
-                            console.warn("AvailabilityType not valid.");
-                            return "#000"; //black
-                        }
-                    },
-                     svg = \
$wnd.d3.select(availChartContext.chartSelection).append("g") +                        \
.scale(timeScale) +                                .ticks(12)
+                                .tickSize(13, 0, 0)
+                                .orient("bottom"),
+
+                        calcBarY = function (d) {
+                            var ABOVE = -10,
+                                    BELOW = 0,
+                                    STRADDLE = -5,
+                                    offset;
+
+                            if (d.availType === 'DOWN') {
+                                offset = BELOW;
+                            }
+                            else if (d.availType === 'DISABLED') {
+                                offset = STRADDLE;
+                            }
+                            else if (d.availType === 'UNKNOWN') {
+                                offset = STRADDLE;
+                            }
+                            else if (d.availType === 'UP') {
+                                offset = ABOVE;
+                            }
+                            else if (d.availType === 'WARN') {
+                                offset = STRADDLE;
+                            }
+                            else if (d.availType === 'EMPTY') {
+                                offset = STRADDLE;
+                            }
+                            return yScale(0) + offset;
+
+                        },
+
+                        calcBarFill = function (d) {
+                            if (d.availType === 'DOWN') {
+                                return "#FF1919"; // red
+                            }
+                            else if (d.availType === 'DISABLED') {
+                                return "url(#diagonalHatchFill)"; // grey diagonal \
hatches +                            }
+                            else if (d.availType === 'UNKNOWN') {
+                                return "#CCC"; // gray
+                            }
+                            else if (d.availType === 'UP') {
+                                return "#198C19"; // green
+                            }
+                            else if (d.availType === 'WARN') {
+                                return "#FFA500"; // orange
+                            }
+                            else if (d.availType === 'EMPTY') {
+                                return "#CCC"; // gray
+                            }
+                            else {
+                                // should not ever happen, but...
+                                console.warn("AvailabilityType not valid.");
+                                return "#000"; //black
+                            }
+                        },
+                        svg = \
                $wnd.d3.select(availChartContext.chartSelection).append("g")
                                 .attr("width", width + margin.left + margin.right)
                                 .attr("height", height + margin.top + margin.bottom)
                                 .attr("transform", "translate(" + margin.left + "," \
+ margin.top + ")"); @@ -234,11 +234,9 @@ public class AvailabilityOverUnderGraphType \
{  })
                         .attr("y", function (d) {
                             return calcBarY(d);
-
                         })
                         .attr("height", function (d) {
                             return 10;
-
                         })
                         .attr("width", function (d) {
                             return timeScale(+d.availEnd) - \
timeScale(+d.availStart); @@ -250,43 +248,43 @@ public class \
AvailabilityOverUnderGraphType {  
                 // create x-axis
                 svg.append("g")
-                    .attr("class", "x axis")
-                    .attr("stroke", "#50505a")
-                    .attr("stroke-width", "0.5")
-                    .attr("transform", "translate(0," + height  + ")")
-                    .attr("letter-spacing", "3")
-                    .style("text-anchor", "end")
-                    .call(xAxis);
+                        .attr("class", "x axis")
+                        .attr("fill", "#50505a")
+                        .attr("stroke-width", "0.5")
+                        .attr("transform", "translate(0," + height + ")")
+                        .attr("letter-spacing", "3")
+                        .style("text-anchor", "end")
+                        .call(xAxis);
 
                 svg.append("text")
-                    .attr("class", "availabilityLabel")
-                    .attr("x", -40)
-                    .attr("y", 10)
-                    .style("font-size", "12px")
-                    .style("font-family", "Arial, Verdana, sans-serif;")
-                    .style("font-weight", "bold")
-                    .attr("fill", "#003168")
-                    .text("Availability");
+                        .attr("class", "availabilityLabel")
+                        .attr("x", -40)
+                        .attr("y", 10)
+                        .style("font-size", "12px")
+                        .style("font-family", "Arial, Verdana, sans-serif;")
+                        .style("font-weight", "bold")
+                        .attr("fill", "#003168")
+                        .text("Availability");
 
                 svg.append("text")
-                    .attr("class", "upLabel")
-                    .attr("x", -5)
-                    .attr("y", 28)
-                    .style("font-family", "Arial, Verdana, sans-serif;")
-                    .style("font-size", "9px")
-                    .attr("fill", "#50505a")
-                    .style("text-anchor", "end")
-                    .text("UP");
+                        .attr("class", "upLabel")
+                        .attr("x", -5)
+                        .attr("y", 28)
+                        .style("font-family", "Arial, Verdana, sans-serif;")
+                        .style("font-size", "9px")
+                        .attr("fill", "#50505a")
+                        .style("text-anchor", "end")
+                        .text("UP");
 
                 svg.append("text")
-                    .attr("class", "downLabel")
-                    .attr("x", -5)
-                    .attr("y", 39)
-                    .style("font-family", "Arial, Verdana, sans-serif;")
-                    .style("font-size", "9px")
-                    .attr("fill", "#50505a")
-                    .style("text-anchor", "end")
-                    .text("DOWN");
+                        .attr("class", "downLabel")
+                        .attr("x", -5)
+                        .attr("y", 39)
+                        .style("font-family", "Arial, Verdana, sans-serif;")
+                        .style("font-size", "9px")
+                        .attr("fill", "#50505a")
+                        .style("text-anchor", "end")
+                        .text("DOWN");
 
             }
 
@@ -306,19 +304,15 @@ public class AvailabilityOverUnderGraphType {
             }
 
             function formatHovers(d) {
-                var hoverString,
-                        timeFormatter = \
$wnd.d3.time.format(availChartContext.chartHoverTimeFormat), +                var  \
                timeFormatter = \
                $wnd.d3.time.format(availChartContext.chartHoverTimeFormat),
                         dateFormatter = \
                $wnd.d3.time.format(availChartContext.chartHoverDateFormat),
-                        availStart = new Date(+d.availStart),
-                        availEnd = new Date(+d.availEnd);
+                        availStart = new Date(+d.availStart);
 
-                hoverString =
-                        '<div class="chartHoverEnclosingDiv">' +
+                return '<div class="chartHoverEnclosingDiv">' +
                                 '<div class="chartHoverAlignLeft"><span >' + \
availChartContext.hoverBarAvailabilityLabel + ': </span><span style="width:50px;">' + \
                d.availTypeMessage + '</span></div>' +
-                                '<div class="chartHoverAlignLeft"><span>'+  \
dateFormatter(availStart) + ' ' + timeFormatter(availStart) + '</span></div>' + +     \
'<div class="chartHoverAlignLeft"><span>' + dateFormatter(availStart) + ' ' + \
timeFormatter(availStart) + '</span></div>' +  '<div \
class="chartHoverAlignLeft"><span >' + availChartContext.hoverBarLabel + ': \
</span><span style="width:50px;">' + d.availDuration + '</span></div>' +  '</div>';
-                return hoverString;
 
             }
 
@@ -341,7 +335,7 @@ public class AvailabilityOverUnderGraphType {
             availabilityGraph.draw(availChartContext);
         }
 
-    }-*/;
+                                       }-*/;
 
     public String getChartId() {
         return String.valueOf(entityId);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
 index 7df45d1..b876c74 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/summary/AbstractActivityView.java
 @@ -634,7 +634,7 @@ public abstract class AbstractActivityView extends \
EnhancedVLayout implements Re  setIsModal(true);
             setShowModalMask(true);
             setWidth(950);
-            setHeight(350);
+            setHeight(370);
             setShowResizer(true);
             setCanDragResize(true);
             centerInPage();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3GraphView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3GraphView.java
 index b590e86..f8887bf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3GraphView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3GraphView.java
 @@ -67,6 +67,31 @@ public class MetricD3GraphView extends EnhancedVLayout {
             + "                        width=\"6\" height=\"3\">"
             + "                   <path d=\"M 0 0 6 0\" style=\"stroke:#2E9EC2; \
fill:none;\"/>"  + "               </pattern>"
+            + "<pattern id=\"diagonalHatchFill\" patternUnits=\"userSpaceOnUse\" \
x=\"0\" y=\"0\" width=\"105\" height=\"105\">" +            + "<g style=\"fill:none; \
stroke:black; stroke-width:1\">" +            + "<circle cx=\"0\" cy=\"0\" r=\"1000\" \
fill=\"grey\"/>" +            + "<path d=\"M0 90 l15,15\"/>"
+            + "<path d=\"M0 75 l30,30\"/>"
+            + "<path d=\"M0 60 l45,45\"/>"
+            + "<path d=\"M0 45 l60,60\"/>"
+            + "<path d=\"M0 30 l75,75\"/>"
+            + "<path d=\"M0 15 l90,90\"/>"
+            + "<path d=\"M0 0 l105,105\"/>"
+            + "<path d=\"M15 0 l90,90\"/>"
+            + "<path d=\"M30 0 l75,75\"/>"
+            + "<path d=\"M45 0 l60,60\"/>"
+            + "<path d=\"M60 0 l45,45\"/>"
+            + "<path d=\"M75 0 l30,30\"/>"
+            + "<path d=\"M90 0 l15,15\"/>"
+            + "</g>"
+            + "</pattern>"
+            + "<pattern id=\"diagonalHatch\" patternUnits=\"userSpaceOnUse\" x=\"0\" \
y=\"0\" width=\"105\" height=\"105\">" +            + "<g style=\"fill:none; \
stroke:black; stroke-width:1\">" + "<path d=\"M0 90 l15,15\"/>" +            + "<path \
d=\"M0 75 l30,30\"/>" + "<path d=\"M0 60 l45,45\"/>" + "<path d=\"M0 45 l60,60\"/>" + \
+ "<path d=\"M0 30 l75,75\"/>" + "<path d=\"M0 15 l90,90\"/>" + "<path d=\"M0 0 \
l105,105\"/>" +            + "<path d=\"M15 0 l90,90\"/>" + "<path d=\"M30 0 \
l75,75\"/>" + "<path d=\"M45 0 l60,60\"/>" +            + "<path d=\"M60 0 \
l45,45\"/>" + "<path d=\"M75 0 l30,30\"/>" + "<path d=\"M90 0 l15,15\"/>" + "</g>" +  \
                + "</pattern>"
             + "               <pattern id=\"downStripes\" \
patternUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\""  + "                        \
                width=\"6\" height=\"3\">"
             + "                   <path d=\"M 0 0 6 0\" style=\"stroke:#ff8a9a; \
fill:none;\"/>" @@ -101,9 +126,9 @@ public class MetricD3GraphView extends \
EnhancedVLayout {  StringBuilder divAndSvgDefs = new StringBuilder();
         divAndSvgDefs
             .append("<div id=\""
-                    + getFullChartId()
-                    + "\" ><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" \
                xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"height:"
-                    + getChartHeight() + "px;\">");
+                + getFullChartId()
+                + "\" ><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" \
xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"height:" +                + \
getChartHeight() + "px;\">");  divAndSvgDefs.append(getSvgDefs());
         divAndSvgDefs.append("</svg></div>");
 
@@ -133,14 +158,11 @@ public class MetricD3GraphView extends EnhancedVLayout {
         graph.drawJsniChart();
     }
 
-
     public String getFullChartId() {
         return "rChart-" + graph.getMetricGraphData().getChartId();
 
     }
 
-
-
     public Integer getChartHeight() {
         return graph.getMetricGraphData().getChartHeight();
     }
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
 index d06bab2..ca8b117 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
 @@ -25,7 +25,6 @@ import com.smartgwt.client.widgets.HTMLFlow;
 import org.rhq.core.domain.measurement.Availability;
 import org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability;
 import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityGraph;
                
-import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityLineGraphType;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType;
  import org.rhq.enterprise.gui.coregui.client.util.Log;
 import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
@@ -43,7 +42,7 @@ public class AvailabilityD3Graph extends EnhancedVLayout implements \
                Availability
     public AvailabilityD3Graph(AvailabilityOverUnderGraphType graphType) {
         super();
         this.availabilityGraphType = graphType;
-        setHeight(70);
+        setHeight(65);
         setWidth100();
     }
 
@@ -83,15 +82,26 @@ public class AvailabilityD3Graph extends EnhancedVLayout \
implements Availability  
         StringBuilder divAndSvgDefs = new StringBuilder();
         divAndSvgDefs.append("<div id=\"availChart-" + \
                availabilityGraphType.getChartId()
-            + "\" ><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" \
style=\"height:110px;\">"); +            + "\" ><svg \
xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" style=\"height:65px;\">"); +     \
divAndSvgDefs.append(getSvgDefs());  divAndSvgDefs.append("</svg></div>");
         HTMLFlow graph = new HTMLFlow(divAndSvgDefs.toString());
         graph.setWidth100();
-        graph.setHeight(25);
+        graph.setHeight(65);
         addMember(graph);
 
     }
 
+    /**
+     * Svg definitions for patterns and gradients to use on SVG shapes.
+     * @return xml String
+     */
+    private static String getSvgDefs() {
+        return " <defs>"+
+                "<pattern id=\"diagonalHatch\" patternUnits=\"userSpaceOnUse\" \
width=\"4\" height=\"4\">  <path d=\"M-1,1 l2,-2           M0,4 l4,-4           M3,5 \
l2,-2\" /> </pattern>" +                + "</defs>";
+    }
+
     @Override
     public void destroy() {
         super.destroy();


commit ee5255b684d733fa01989930676f5d0e7e17d51e
Author: mtho11 <mikecthompson@gmail.com>
Date:   Mon May 6 14:23:28 2013 -0700

    [BZ 960646] - RFE Redesigned Availability Charts.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 new file mode 100644
index 0000000..76c8f69
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/AvailabilityOverUnderGraphType.java
 @@ -0,0 +1,381 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
+
+import org.rhq.core.domain.measurement.Availability;
+import org.rhq.core.domain.measurement.MeasurementUnits;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
+import org.rhq.enterprise.gui.coregui.client.util.Log;
+import org.rhq.enterprise.gui.coregui.client.util.MeasurementConverterClient;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Contains the javascript chart definition for an implementation of the d3 \
availability chart. This implementation is + * just a line that changes color based \
on availability type: up=green, down=red, orange=disabled, unknown=grey, + * \
empty=grey, warn=yellow.  This version of the availability graph shows continuous \
intervals. + *
+ * @author Mike Thompson
+ */
+public class AvailabilityOverUnderGraphType {
+
+    private static Messages MSG = CoreGUI.getMessages();
+    private List<Availability> availabilityList;
+    private List<ResourceGroupAvailability> groupAvailabilityList;
+    private Integer entityId;
+
+    /**
+     * General constructor for stacked bar graph when you have all the data needed \
to produce the graph. (This is true +     * for all cases but the dashboard portlet).
+     */
+    public AvailabilityOverUnderGraphType(Integer entityId) {
+        this.entityId = entityId;
+    }
+
+    public void setAvailabilityList(List<Availability> availabilityList) {
+        this.availabilityList = availabilityList;
+    }
+
+    public void setGroupAvailabilityList(List<ResourceGroupAvailability> \
groupAvailabilityList) { +        this.groupAvailabilityList = groupAvailabilityList;
+    }
+
+    public String getAvailabilityJson() {
+        StringBuilder sb = new StringBuilder("[");
+        if (null != availabilityList) {
+            // loop through the avail intervals
+            for (Availability availability : availabilityList) {
+                sb.append("{ \"availType\":\"" + availability.getAvailabilityType() \
+ "\", "); +                sb.append(" \"availTypeMessage\":\"" + \
availability.getAvailabilityType()+ "\", "); +                sb.append(" \
\"availStart\":" + availability.getStartTime() + ", "); +                // last \
record will be null +                long endTime = availability.getEndTime() != null \
? availability.getEndTime() : (new Date()).getTime(); +                sb.append(" \
\"availEnd\":" + endTime + ", "); +
+                long availDuration = endTime - availability.getStartTime();
+                String availDurationString = \
MeasurementConverterClient.format((double) availDuration, +                    \
MeasurementUnits.MILLISECONDS, true); +                sb.append(" \"availDuration\": \
\"" + availDurationString + "\" },"); +
+            }
+            sb.setLength(sb.length() - 1);
+
+        } else if (null != groupAvailabilityList) {
+            // loop through the group avail down intervals
+            for (ResourceGroupAvailability groupAvailability : \
groupAvailabilityList) { +                // allows substitution for situations like \
WARN=MIXED for easier terminology +                String availabilityTypeMessage = \
(groupAvailability.getGroupAvailabilityType().equals(ResourceGroupComposite.GroupAvailabilityType.WARN))
 +                        ? MSG.chart_hover_availability_type_warn() : \
groupAvailability.getGroupAvailabilityType().name(); +
+                sb.append("{ \"availType\":\"" + \
groupAvailability.getGroupAvailabilityType() + "\", "); +                sb.append(" \
\"availTypeMessage\":\"" + availabilityTypeMessage + "\", "); +                \
sb.append(" \"availStart\":" + groupAvailability.getStartTime() + ", "); +            \
// last record will be null +                long endTime = \
groupAvailability.getEndTime() != null ? groupAvailability.getEndTime() : (new \
Date()) +                    .getTime();
+                sb.append(" \"availEnd\":" + endTime + ", ");
+
+                long availDuration = endTime - groupAvailability.getStartTime();
+                String availDurationString = \
MeasurementConverterClient.format((double) availDuration, +                    \
MeasurementUnits.MILLISECONDS, true); +                sb.append(" \"availDuration\": \
\"" + availDurationString + "\" },"); +
+            }
+            sb.setLength(sb.length() - 1);
+        }
+
+        sb.append("]");
+        Log.debug(sb.toString());
+        return sb.toString();
+    }
+
+    /**
+     * The magic JSNI to draw the charts with d3.
+     */
+    public native void drawJsniChart() /*-{
+        console.log("Draw Enhanced Availability chart");
+
+        var global = this,
+        // tidy up all of our interactions with java (via JSNI) thru \
AvailChartContext class +        // NOTE: rhq.js has the javascript object \
constructors in it. +                availChartContext = new \
$wnd.AvailChartContext(global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartId()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getAvailabilityJson()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartDateLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartTimeLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverStartLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverEndLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverBarLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverAvailabilityLabel()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverTimeFormat()(),
 +                        \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType::getChartHoverDateFormat()()
 +                );
+
+
+        var availabilityGraph = function () {
+            "use strict";
+            // privates
+
+            var margin = {top: 5, right: 5, bottom: 5, left: 40},
+                    barOffset = 10,
+                    width = 750 - margin.left - margin.right + barOffset,
+                    height = 40 - margin.top - margin.bottom,
+                    pixelsOffHeight = 0,
+                    svg;
+
+
+            function drawBars(availChartContext) {
+                var xAxisMin = $wnd.d3.min(availChartContext.data, function (d) {
+                            return +d.availStart;
+                        }),
+                        xAxisMax = $wnd.d3.max(availChartContext.data, function (d) \
{ +                            return +d.availEnd;
+                        }),
+
+                        timeScale = $wnd.d3.time.scale()
+                                .range([0, width])
+                                .domain([xAxisMin, xAxisMax]),
+
+                        yScale = $wnd.d3.scale.linear()
+                                .clamp(true)
+                                .rangeRound([height, 0])
+                                .domain([0, 4]),
+
+                        xAxis = $wnd.d3.svg.axis()
+                            .scale(timeScale)
+                            .ticks(12)
+                            .tickSize(10, 0, 0)
+                            .orient("bottom"),
+
+                       calcBarY = function(d) {
+                           var ABOVE = -10,
+                               BELOW = 0,
+                               STRADDLE = -5,
+                               offset;
+
+                           if (d.availType === 'DOWN') {
+                               offset =  BELOW;
+                           }
+                           else if (d.availType === 'DISABLED') {
+                               offset =  STRADDLE;
+                           }
+                           else if (d.availType === 'UNKNOWN') {
+                               offset =  STRADDLE;
+                           }
+                           else if (d.availType === 'UP') {
+                               offset =  ABOVE;
+                           }
+                           else if (d.availType === 'WARN') {
+                               offset =  STRADDLE;
+                           }
+                           else if (d.availType === 'EMPTY') {
+                               offset =  STRADDLE;
+                           }
+                           return yScale(0) + offset;
+
+                       },
+
+                    calcBarFill = function(d) {
+                        if (d.availType === 'DOWN') {
+                            return "#FF1919"; // red
+                        }
+                        else if (d.availType === 'DISABLED') {
+                            return "#FF9933"; // orange
+                        }
+                        else if (d.availType === 'UNKNOWN') {
+                            return "#CCC"; // gray
+                        }
+                        else if (d.availType === 'UP') {
+                            return "#198C19"; // green
+                        }
+                        else if (d.availType === 'WARN') {
+                            return "#FFA500"; // yellow
+                        }
+                        else if (d.availType === 'EMPTY') {
+                            return "#CCC"; // gray
+                        }
+                        else {
+                            // should not ever happen, but...
+                            console.warn("AvailabilityType not valid.");
+                            return "#000"; //black
+                        }
+                    },
+                     svg = \
$wnd.d3.select(availChartContext.chartSelection).append("g") +                        \
.attr("width", width + margin.left + margin.right) +                                \
.attr("height", height + margin.top + margin.bottom) +                                \
.attr("transform", "translate(" + margin.left + "," + margin.top + ")"); +
+
+                svg.selectAll("rect.availBars")
+                        .data(availChartContext.data)
+                        .enter().append("rect")
+                        .attr("class", "availBars")
+                        .attr("x", function (d) {
+                            return timeScale(+d.availStart);
+                        })
+                        .attr("y", function (d) {
+                            return calcBarY(d);
+
+                        })
+                        .attr("height", function (d) {
+                            return 10;
+
+                        })
+                        .attr("width", function (d) {
+                            return timeScale(+d.availEnd) - \
timeScale(+d.availStart); +                        })
+                        .attr("opacity", ".9")
+                        .attr("fill", function (d) {
+                            return calcBarFill(d);
+                        });
+
+                // create x-axis
+                svg.append("g")
+                    .attr("class", "x axis")
+                    .attr("stroke", "#50505a")
+                    .attr("stroke-width", "0.5")
+                    .attr("transform", "translate(0," + height  + ")")
+                    .attr("letter-spacing", "3")
+                    .style("text-anchor", "end")
+                    .call(xAxis);
+
+                svg.append("text")
+                    .attr("class", "availabilityLabel")
+                    .attr("x", -40)
+                    .attr("y", 10)
+                    .style("font-size", "12px")
+                    .style("font-family", "Arial, Verdana, sans-serif;")
+                    .style("font-weight", "bold")
+                    .attr("fill", "#003168")
+                    .text("Availability");
+
+                svg.append("text")
+                    .attr("class", "upLabel")
+                    .attr("x", -5)
+                    .attr("y", 28)
+                    .style("font-family", "Arial, Verdana, sans-serif;")
+                    .style("font-size", "9px")
+                    .attr("fill", "#50505a")
+                    .style("text-anchor", "end")
+                    .text("UP");
+
+                svg.append("text")
+                    .attr("class", "downLabel")
+                    .attr("x", -5)
+                    .attr("y", 39)
+                    .style("font-family", "Arial, Verdana, sans-serif;")
+                    .style("font-size", "9px")
+                    .attr("fill", "#50505a")
+                    .style("text-anchor", "end")
+                    .text("DOWN");
+
+            }
+
+            function createHovers() {
+                $wnd.jQuery('svg rect.availBars').tipsy({
+                    gravity: 's',
+                    html: true,
+                    trigger: 'hover',
+                    title: function () {
+                        var d = this.__data__;
+                        return formatHovers(d);
+                    },
+                    show: function (e, el) {
+                        el.css({ 'z-index': '990000'})
+                    }
+                });
+            }
+
+            function formatHovers(d) {
+                var hoverString,
+                        timeFormatter = \
$wnd.d3.time.format(availChartContext.chartHoverTimeFormat), +                        \
dateFormatter = $wnd.d3.time.format(availChartContext.chartHoverDateFormat), +        \
availStart = new Date(+d.availStart), +                        availEnd = new \
Date(+d.availEnd); +
+                hoverString =
+                        '<div class="chartHoverEnclosingDiv">' +
+                                '<div class="chartHoverAlignLeft"><span >' + \
availChartContext.hoverBarAvailabilityLabel + ': </span><span style="width:50px;">' + \
d.availTypeMessage + '</span></div>' + +                                '<div \
class="chartHoverAlignLeft"><span>'+  dateFormatter(availStart) + ' ' + \
timeFormatter(availStart) + '</span></div>' + +                                '<div \
class="chartHoverAlignLeft"><span >' + availChartContext.hoverBarLabel + ': \
</span><span style="width:50px;">' + d.availDuration + '</span></div>' + +            \
'</div>'; +                return hoverString;
+
+            }
+
+            return {
+                // Public API
+                draw: function (chartContext) {
+                    "use strict";
+                    console.info("AvailabilityChart");
+                    //console.time("availabilityChart");
+                    drawBars(availChartContext);
+                    createHovers();
+                    //console.timeEnd("availabilityChart");
+                }
+            }; // end public closure
+
+
+        }();
+
+        if (availChartContext.data !== undefined && availChartContext.data.length > \
0) { +            availabilityGraph.draw(availChartContext);
+        }
+
+    }-*/;
+
+    public String getChartId() {
+        return String.valueOf(entityId);
+    }
+
+    public String getChartTimeLabel() {
+        return MSG.chart_time_label();
+    }
+
+    public String getChartDateLabel() {
+        return MSG.chart_date_label();
+    }
+
+    public String getChartHoverAvailabilityLabel() {
+        return MSG.chart_hover_availability_label();
+    }
+
+    public String getChartHoverStartLabel() {
+        return MSG.chart_hover_start_label();
+    }
+
+    public String getChartHoverEndLabel() {
+        return MSG.chart_hover_end_label();
+    }
+
+    public String getChartHoverBarLabel() {
+        return MSG.chart_hover_bar_label();
+    }
+
+    public String getChartHoverTimeFormat() {
+        return MSG.chart_hover_time_format();
+    }
+
+    public String getChartHoverDateFormat() {
+        return MSG.chart_hover_date_format();
+    }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 index d9a4205..15f400d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/StackedBarMetricGraphImpl.java
 @@ -234,8 +234,10 @@ public class StackedBarMetricGraphImpl extends AbstractGraph {
                 chart.append("g").append("rect")
                         .attr("class", "rightSidePanel")
                         .attr("x", xLabel - 10)
-                        .attr("y", margin.top + 60)
-                        .attr("height", 100)
+                        .attr("y", margin.top + 70)
+                        .attr("rx", 10)
+                        .attr("ry", 10)
+                        .attr("height", 80)
                         .attr("width", 135)
                         .attr("opacity", "0.3")
                         .attr("fill", "#E8E8E8");
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
 index 786701b..7691c5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/D3GroupGraphListView.java
 @@ -42,6 +42,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
 import org.rhq.enterprise.gui.coregui.client.inventory.AutoRefresh;
 import org.rhq.enterprise.gui.coregui.client.inventory.common.AbstractD3GraphListView;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityLineGraphType;
 +import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.StackedBarMetricGraphImpl;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.MetricD3GraphView;
 @@ -74,7 +75,7 @@ public final class D3GroupGraphListView extends \
AbstractD3GraphListView implemen  
         addMember(measurementRangeEditor);
         if (showAvailabilityGraph) {
-            availabilityGraph = new AvailabilityD3Graph(new \
AvailabilityLineGraphType(resourceGroup.getId())); +            availabilityGraph = \
new AvailabilityD3Graph(new AvailabilityOverUnderGraphType(resourceGroup.getId()));  \
// first step in 2 step to create d3 chart  // create a placeholder for avail graph
             availabilityGraph.createGraphMarker();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
 index 26f3626..58d3050 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/D3GraphListView.java
 @@ -47,6 +47,7 @@ import \
org.rhq.enterprise.gui.coregui.client.components.measurement.UserPreferen  import \
org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;  import \
org.rhq.enterprise.gui.coregui.client.inventory.common.AbstractD3GraphListView;  \
import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityLineGraphType;
 +import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.StackedBarMetricGraphImpl;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.avail.AvailabilityD3Graph;
 @@ -130,7 +131,7 @@ public class D3GraphListView extends AbstractD3GraphListView {
         addMember(measurementRangeEditor);
 
         if (showAvailabilityGraph) {
-            availabilityGraph = new AvailabilityD3Graph(new \
AvailabilityLineGraphType(resource.getId())); +            availabilityGraph = new \
AvailabilityD3Graph(new AvailabilityOverUnderGraphType(resource.getId()));  // first \
step in 2 step to create d3 chart  // create a placeholder for avail graph
             availabilityGraph.createGraphMarker();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
 index d03fefe..d06bab2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3Graph.java
 @@ -26,6 +26,7 @@ import org.rhq.core.domain.measurement.Availability;
 import org.rhq.core.domain.resource.group.composite.ResourceGroupAvailability;
 import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityGraph;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityLineGraphType;
 +import org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.AvailabilityOverUnderGraphType;
  import org.rhq.enterprise.gui.coregui.client.util.Log;
 import org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
 
@@ -37,12 +38,12 @@ import \
                org.rhq.enterprise.gui.coregui.client.util.enhanced.EnhancedVLayout;
  */
 public class AvailabilityD3Graph extends EnhancedVLayout implements \
AvailabilityGraph {  
-    protected AvailabilityLineGraphType availabilityGraphType;
+    protected AvailabilityOverUnderGraphType availabilityGraphType;
 
-    public AvailabilityD3Graph(AvailabilityLineGraphType graphType) {
+    public AvailabilityD3Graph(AvailabilityOverUnderGraphType graphType) {
         super();
         this.availabilityGraphType = graphType;
-        setHeight(25);
+        setHeight(70);
         setWidth100();
     }
 
@@ -82,7 +83,7 @@ public class AvailabilityD3Graph extends EnhancedVLayout implements \
Availability  
         StringBuilder divAndSvgDefs = new StringBuilder();
         divAndSvgDefs.append("<div id=\"availChart-" + \
                availabilityGraphType.getChartId()
-            + "\" ><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" \
style=\"height:20px;\">"); +            + "\" ><svg \
xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" style=\"height:110px;\">");  \
divAndSvgDefs.append("</svg></div>");  HTMLFlow graph = new \
HTMLFlow(divAndSvgDefs.toString());  graph.setWidth100();


commit 85215f76e7ec578a7cad3a13e983c6cbffa0650f
Author: mtho11 <mikecthompson@gmail.com>
Date:   Wed Apr 24 16:16:15 2013 -0700

    Trivial: add *.DS_Store files to .gitignore

diff --git a/.gitignore b/.gitignore
index 92b2176..3bd9232 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,6 @@ modules/enterprise/gui/coregui/build/classes/
 modules/enterprise/gui/content_http-war/build/classes/
 #created by rhq-enterprise-server's unit tests
 modules/enterprise/server/jar/transaction.log
-
 .idea/
 .metadata/
 *cache.html
@@ -27,6 +26,7 @@ modules/enterprise/server/jar/transaction.log
 .*.jsfdia
 .wtpmodules
 *~
+*.DS_Store
 
 #these are created by the python script engine during the tests
 cachedir/


commit f875212be4a8cfaf0905e2fd376a579197b83148
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Tue May 7 14:25:34 2013 +0200

    Bug 865629 - (PRODMGT-245) Add more metrics to AS7 plugin
    
    Added missing metrics
    Added integration test

diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index cfe756d..5f538b7 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -615,6 +615,7 @@
                 <include>org/rhq/modules/plugins/jbossas7/itest/**/*Test.java</include>
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java</include>-->
 +                <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/nonpc/ManagementConnectionPersistenceTest.java</include>-->
                
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml \
b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml index \
                45f4e05..742c4d5 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -8864,6 +8864,22 @@
     <metric property="responseTime"
             dataType="calltime" defaultOn="false" units="milliseconds" \
                destinationType="URL"
             description="the minimum, maximum, and average response times for \
requests serviced by this webapp"/> +    <metric property="active-sessions" \
displayName="Currently Active Sessions" +            description="The number of \
sessions that are currently active"/> +    <metric property="duplicated-session-ids" \
displayName="Duplicated Session Ids" +            description="The number of \
duplicated session identifiers"/> +    <metric property="expired-sessions" \
measurementType="trendsup" displayName="Expired Sessions" +            \
description="The number of expired sessions"/> +    <metric \
property="max-active-sessions" displayName="Maximum Active Sessions" +            \
description="The maximum number of sessions that have been active"/> +    <metric \
property="rejected-sessions" measurementType="trendsup" displayName="Rejected \
Sessions" +            description="The number of sessions rejected"/>
+    <metric property="session-avg-alive-time" units="milliseconds" \
displayName="Average Session Alive Time" +            description="The average alive \
time of sessions"/> +    <metric property="session-max-alive-time" \
units="milliseconds" displayName="Max Session Alive Time" +            \
description="The maximum alive time of sessions"/> +    <metric \
property="sessions-created" measurementType="trendsup" displayName="Created Sessions" \
+            description="The number of sessions created"/>  
   </service>
 
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java
 index 6f84e34..5b552bc 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java
                
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/DeploymentTest.java
 @@ -19,6 +19,11 @@
 
 package org.rhq.modules.plugins.jbossas7.itest.standalone;
 
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.rhq.core.domain.util.ResourceTypeUtility.getMeasurementDefinitions;
 +import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,6 +32,8 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashSet;
 import java.util.Set;
 
 import org.mockito.Mockito;
@@ -47,8 +54,18 @@ import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.core.domain.content.PackageDetailsKey;
 import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
 import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
 import org.rhq.core.domain.resource.CreateResourceStatus;
 import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.util.MeasurementDefinitionFilter;
+import org.rhq.core.pc.inventory.ResourceContainer;
+import org.rhq.core.pc.util.FacetLockType;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
 import org.rhq.modules.plugins.jbossas7.StandaloneASComponent;
 import org.rhq.modules.plugins.jbossas7.itest.AbstractJBossAS7PluginTest;
 import org.rhq.test.arquillian.DiscoveredResources;
@@ -101,6 +118,9 @@ public class DeploymentTest extends AbstractJBossAS7PluginTest {
     @DiscoveredResources(plugin = PLUGIN_NAME, resourceType = "Deployment")
     private Set<Resource> deploymentResources;
 
+    @DiscoveredResources(plugin = PLUGIN_NAME, resourceType = "Web Runtime")
+    private Set<Resource> webRuntimeResources;
+
     private static TestDeployments DEPLOYMENT_TO_SERVE = \
TestDeployments.DEPLOYMENT_1;  
     private static long copyStreamAndReturnCount(InputStream in, OutputStream out) \
throws IOException { @@ -242,6 +262,60 @@ public class DeploymentTest extends \
AbstractJBossAS7PluginTest {  }
 
     @Test(priority = 15)
+    @RunDiscovery
+    public void testWebRuntimeMetricsHaveNonNullValues() throws Exception {
+        assertTrue(webRuntimeResources != null && !webRuntimeResources.isEmpty(),
+            "Web Runtime resource should have been discovered");
+        assertEquals(webRuntimeResources.size(), 1, "Found more than one Web Runtime \
resource: " + webRuntimeResources); +
+        Resource webRuntimeResource = webRuntimeResources.iterator().next();
+        ResourceContainer webRuntimeResourceContainer = \
pluginContainer.getInventoryManager().getResourceContainer( +            \
webRuntimeResource); +        MeasurementFacet measurementFacet = \
webRuntimeResourceContainer.createResourceComponentProxy( +            \
MeasurementFacet.class, FacetLockType.READ, SECONDS.toMillis(5), false, false); +     \
MeasurementReport report = new MeasurementReport(); +        \
Set<MeasurementScheduleRequest> measurementScheduleRequests = \
getMeasurementScheduleRequests(webRuntimeResource); +        \
measurementFacet.getValues(report, measurementScheduleRequests); +        \
assertEquals(report.getCallTimeData().size(), 0, "No calltime data was requested"); + \
assertTrue( +            report.getNumericData().size() + \
report.getTraitData().size() == measurementScheduleRequests.size(), +            \
"Some requested measurements are missing: " +                + \
getMissingMeasurements(measurementScheduleRequests, report.getNumericData(), \
report.getTraitData())); +    }
+
+    private Set<String> getMissingMeasurements(Set<MeasurementScheduleRequest> \
measurementScheduleRequests, +        Set<MeasurementDataNumeric> numericData, \
Set<MeasurementDataTrait> traitData) { +        Set<String> missingMeasurements = new \
HashSet<String>(); +        for (MeasurementScheduleRequest \
measurementScheduleRequest : measurementScheduleRequests) { +            \
missingMeasurements.add(measurementScheduleRequest.getName()); +        }
+        for (MeasurementDataNumeric measurementDataNumeric : numericData) {
+            missingMeasurements.remove(measurementDataNumeric.getName());
+        }
+        for (MeasurementDataTrait measurementDataTrait : traitData) {
+            missingMeasurements.remove(measurementDataTrait.getName());
+        }
+        return missingMeasurements;
+    }
+
+    private Set<MeasurementScheduleRequest> getMeasurementScheduleRequests(Resource \
webRuntimeResource) { +        Set<MeasurementDefinition> measurementDefinitions = \
getMeasurementDefinitions( +            webRuntimeResource.getResourceType(), new \
MeasurementDefinitionFilter() { +                private final Set<DataType> \
acceptableDataTypes = EnumSet.of(DataType.MEASUREMENT, DataType.TRAIT); +
+                public boolean accept(MeasurementDefinition measurementDefinition) {
+                    return \
acceptableDataTypes.contains(measurementDefinition.getDataType()); +                }
+            });
+        Set<MeasurementScheduleRequest> measurementScheduleRequests = new \
HashSet<MeasurementScheduleRequest>(); +        for (MeasurementDefinition \
measurementDefinition : measurementDefinitions) { +            \
measurementScheduleRequests.add(new MeasurementScheduleRequest(-1, \
measurementDefinition.getName(), -1, +                true, \
measurementDefinition.getDataType(), measurementDefinition.getRawNumericType())); +   \
} +        return measurementScheduleRequests;
+    }
+
+    @Test(priority = 16)
     public void testUndeploy() throws Exception {
         Resource deployment = deploymentResources.iterator().next();
         DeleteResourceRequest request = new DeleteResourceRequest(0, \
deployment.getId());


commit e589245b50710f5487ce3efcd527f73c02df8ea3
Author: John Mazzitelli <mazz@redhat.com>
Date:   Mon May 6 19:02:55 2013 -0400

    BZ 817825 don't show "Loading..." for leaf nodes in resource type drop down menus
    this still doesn't fix the Platform plugin's platform type submenus.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
 index e2650e4..90511d7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
 @@ -77,8 +77,6 @@ public class ResourceSelector extends AbstractSelector<Resource, \
ResourceCriteri  typeSelectItem.setValueField("id");
             typeSelectItem.setCanSelectParentItems(true);
             typeSelectItem.setLoadDataOnDemand(false);
-            typeSelectItem.setEmptyMenuMessage(MSG.common_msg_loading());
-            typeSelectItem.setShowIcons(false);
 
             if (this.forceResourceTypeFilter) {
                 typeSelectItem.setDisabled(true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
 index 136db95..c1c9e66 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
 @@ -19,8 +19,6 @@
 package org.rhq.enterprise.gui.coregui.client.inventory.resource.type;
 
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -144,12 +142,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource \
{  }
         }
 
-        Collections.sort(nodes, new Comparator<TreeNode>() {
-            public int compare(TreeNode o1, TreeNode o2) {
-                return o1.getName().compareTo(o2.getName());
-            }
-        });
-
         TreeNode[] treeNodes = nodes.toArray(new TreeNode[nodes.size()]);
         return treeNodes;
     }
@@ -198,9 +190,8 @@ public class ResourceTypePluginTreeDataSource extends DataSource \
{  setParentID(null);
 
             setAttribute("name", pluginName + " " + pluginStr);
-            //            setAttribute("plugin",pluginName);
-            setIcon("types/plugin_16.png"); // todo doesn't work
             setEnabled(true);
+            // setIcon(IconEnum.PLUGIN.getIcon16x16Path()); // IPickTreeItem doesn't \
appear to want to use this  }
 
         @Override
@@ -245,10 +236,7 @@ public class ResourceTypePluginTreeDataSource extends DataSource \
{  setAttribute("name", resourceType.getName());
             setAttribute("plugin", resourceType.getPlugin());
             setAttribute("category", resourceType.getCategory().getDisplayName());
-
-            setIcon("types/" + resourceType.getCategory().getDisplayName() + \
                "_up_16.png");
-
-            setIsFolder(true);
+            // setIcon(ImageManager.getResourceIcon(resourceType.getCategory())); // \
IPickTreeItem doesn't appear to want to use this  }
 
         public ResourceType getResourceType() {


commit 82a86c90fcc05ec19b1b9b63771fe12905cb2f09
Author: John Mazzitelli <mazz@redhat.com>
Date:   Mon May 6 16:03:20 2013 -0400

    BZ 960265 bring back the GWT calltime page

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
 index a68170a..91db630 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
 @@ -28,6 +28,7 @@ import com.smartgwt.client.widgets.Canvas;
 
 import org.rhq.core.domain.auth.Subject;
 import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.common.EntityContext;
 import org.rhq.core.domain.criteria.ResourceCriteria;
 import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.domain.measurement.DataType;
@@ -55,7 +56,6 @@ import \
org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftDefinitionsView;  import \
org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;  import \
org.rhq.enterprise.gui.coregui.client.inventory.InventoryView;  import \
org.rhq.enterprise.gui.coregui.client.inventory.common.detail.AbstractTwoLevelTabSetView;
                
-import org.rhq.enterprise.gui.coregui.client.inventory.common.detail.monitoring.IFrameWithMeasurementRangeEditorView;
  import org.rhq.enterprise.gui.coregui.client.inventory.common.event.EventCompositeHistoryView;
  import org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupListView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceCompositeSearchView;
 @@ -64,6 +64,7 @@ import \
org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configura  import \
org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.PluginConfigurationEditView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.PluginConfigurationHistoryListView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.ResourceAgentView;
 +import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.CalltimeView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.D3GraphListView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.avail.ResourceAvailabilityView;
  import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.schedules.ResourceSchedulesView;
 @@ -437,8 +438,7 @@ public class ResourceDetailView extends
         viewFactory = (!visible) ? null : new ViewFactory() {
             @Override
             public Canvas createView() {
-                return new \
                IFrameWithMeasurementRangeEditorView("/rhq/resource/monitor/response-plain.xhtml?id="
                
-                    + resource.getId());
+                return new \
CalltimeView(EntityContext.forResource(resource.getId()));  }
         };
         updateSubTab(this.monitoringTab, this.monitorCallTime, visible, true, \
viewFactory);


commit 98f5814fe4acb2dd5a9305170460638e3cd984e1
Author: Stefan Negrea <snegrea@redhat.com>
Date:   Mon May 6 11:05:04 2013 -0500

    Update development version to 4.8.0-SNAPSHOT.

diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml
index f1f8cec..dbb487d 100644
--- a/code-coverage/pom.xml
+++ b/code-coverage/pom.xml
@@ -3,7 +3,7 @@
    <parent>
       <artifactId>rhq-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-code-coverage</artifactId>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index c4dadc9..efe6d1f 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -8,7 +8,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 4cf6703..138e9ca 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 9d7a132..5afdead 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-common-drift</artifactId>
diff --git a/modules/common/filetemplate-bundle/pom.xml \
b/modules/common/filetemplate-bundle/pom.xml index 32692b5..0beb20b 100644
--- a/modules/common/filetemplate-bundle/pom.xml
+++ b/modules/common/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-common-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>rhq-filetemplate-bundle-common</artifactId>
diff --git a/modules/common/jboss-as-dmr-client/pom.xml \
b/modules/common/jboss-as-dmr-client/pom.xml index 4f43692..b8c1682 100644
--- a/modules/common/jboss-as-dmr-client/pom.xml
+++ b/modules/common/jboss-as-dmr-client/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-common-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>rhq-jboss-as-dmr-client</artifactId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index b9ee5be..6dac77b 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-common-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-jboss-as-common</artifactId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index 4ed6d92..088e268 100644
--- a/modules/common/pom.xml
+++ b/modules/common/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/arquillian-integration/archive/pom.xml \
b/modules/core/arquillian-integration/archive/pom.xml index 7c7e949..fe5f377 100644
--- a/modules/core/arquillian-integration/archive/pom.xml
+++ b/modules/core/arquillian-integration/archive/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-arquillian-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/container/pom.xml \
b/modules/core/arquillian-integration/container/pom.xml index 75a7a05..258d050 100644
--- a/modules/core/arquillian-integration/container/pom.xml
+++ b/modules/core/arquillian-integration/container/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-arquillian-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/pom.xml \
b/modules/core/arquillian-integration/pom.xml index 9637dfc..67b02a8 100644
--- a/modules/core/arquillian-integration/pom.xml
+++ b/modules/core/arquillian-integration/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/arquillian-integration/suite-extension/pom.xml \
b/modules/core/arquillian-integration/suite-extension/pom.xml index 5d80c3f..231ab67 \
                100644
--- a/modules/core/arquillian-integration/suite-extension/pom.xml
+++ b/modules/core/arquillian-integration/suite-extension/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <!-- Model Version -->
diff --git a/modules/core/arquillian-integration/test-agent-plugin/pom.xml \
b/modules/core/arquillian-integration/test-agent-plugin/pom.xml index \
                f086ca3..4ed7bca 100644
--- a/modules/core/arquillian-integration/test-agent-plugin/pom.xml
+++ b/modules/core/arquillian-integration/test-agent-plugin/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-arquillian-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index acd19c9..7adcd3b 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 9fd9f98..1fb2161 100644
--- a/modules/core/comm-api/pom.xml
+++ b/modules/core/comm-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index d77ee51..cc040f8 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index d572d9d..776459d 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-domain</artifactId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index b3b7706..dc21aad 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 04be12b..46fe305 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index a24c330..8060a89 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container-itest/pom.xml \
b/modules/core/plugin-container-itest/pom.xml index 900eb72..9c801de 100644
--- a/modules/core/plugin-container-itest/pom.xml
+++ b/modules/core/plugin-container-itest/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container-itest</artifactId>
diff --git a/modules/core/plugin-container/pom.xml \
b/modules/core/plugin-container/pom.xml index 06395a2..3c070a9 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-container</artifactId>
diff --git a/modules/core/plugin-test-api/pom.xml \
b/modules/core/plugin-test-api/pom.xml index fc49cf3..18fa318 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <artifactId>rhq-core-plugin-test-api</artifactId>
diff --git a/modules/core/plugin-test-util/pom.xml \
b/modules/core/plugin-test-util/pom.xml index c75dcbc..0374729 100644
--- a/modules/core/plugin-test-util/pom.xml
+++ b/modules/core/plugin-test-util/pom.xml
@@ -9,7 +9,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml \
b/modules/core/plugin-validator/pom.xml index d05b721..99c875d 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index c3c7175..426d298 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-core-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index c4992af..c41a8f4 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index b799891..cdc3b9b 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-core-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>rhq-core-util</artifactId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index cb1fad0..2d7093d 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/agentupdate/pom.xml \
b/modules/enterprise/agentupdate/pom.xml index 3b66b92..67ed9a8 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index a41fb6c..d5b7643 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-enterprise-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-script-bindings</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Script Bindings</name>
     <description>Abstraction of different facilities and default configurations for \
script bindings</description>  
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index c312dc1..8148262 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/content_http-war/pom.xml \
b/modules/enterprise/gui/content_http-war/pom.xml index 333aa5d..a140a9c 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-gui-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml \
b/modules/enterprise/gui/coregui/pom.xml index 035ade8..cb7dd3a 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 1fa9ec1..018a802 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -8,7 +8,7 @@
     <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/gui/portal-war/pom.xml \
b/modules/enterprise/gui/portal-war/pom.xml index a827c3c..d2998cc 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -4,7 +4,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/gui/remoting-war/pom.xml \
b/modules/enterprise/gui/remoting-war/pom.xml index 70ece03..638bccd 100644
--- a/modules/enterprise/gui/remoting-war/pom.xml
+++ b/modules/enterprise/gui/remoting-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-examples-war/pom.xml \
b/modules/enterprise/gui/rest-examples-war/pom.xml index 2a5091c..c9aa075 100644
--- a/modules/enterprise/gui/rest-examples-war/pom.xml
+++ b/modules/enterprise/gui/rest-examples-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/gui/rest-war/pom.xml \
b/modules/enterprise/gui/rest-war/pom.xml index 5d3dbfc..33e330e 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 489d603..3fad441 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/cli/pom.xml \
b/modules/enterprise/remoting/cli/pom.xml index e371826..dec19d0 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-api/pom.xml \
b/modules/enterprise/remoting/client-api/pom.xml index 2c7b6f9..cba50db 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/client-deps/pom.xml \
b/modules/enterprise/remoting/client-deps/pom.xml index b411a87..6db40f2 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/remoting/pom.xml \
b/modules/enterprise/remoting/pom.xml index 3ab9e66..7bf574e 100644
--- a/modules/enterprise/remoting/pom.xml
+++ b/modules/enterprise/remoting/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/scripting/api/pom.xml \
b/modules/enterprise/scripting/api/pom.xml index 07768cd..268af3a 100644
--- a/modules/enterprise/scripting/api/pom.xml
+++ b/modules/enterprise/scripting/api/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-scripting-api</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Scripting API</name>
     <description>Provides API for adding scripting support to RHQ using different \
javax.scripting - based interpreters</description>  
diff --git a/modules/enterprise/scripting/javascript/pom.xml \
b/modules/enterprise/scripting/javascript/pom.xml index 32eb12d..acc09aa 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -4,10 +4,10 @@
    <parent>
       <artifactId>rhq-scripting-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
    <artifactId>rhq-scripting-javascript</artifactId>
-   <version>4.7.0-SNAPSHOT</version>
+   <version>4.8.0-SNAPSHOT</version>
    <name>RHQ Javascript support</name>
    <description>Provides RHQ scripting in Javascript using Rhino</description>
 
diff --git a/modules/enterprise/scripting/pom.xml \
b/modules/enterprise/scripting/pom.xml index 5c82958..a58f1ca 100644
--- a/modules/enterprise/scripting/pom.xml
+++ b/modules/enterprise/scripting/pom.xml
@@ -3,12 +3,12 @@
    <parent>
       <artifactId>rhq-enterprise-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
    <artifactId>rhq-scripting-parent</artifactId>
    <packaging>pom</packaging>
    
-   <version>4.7.0-SNAPSHOT</version>
+   <version>4.8.0-SNAPSHOT</version>
    <name>RHQ Scripting Parent Module</name>
 
    <modules>
diff --git a/modules/enterprise/scripting/python/pom.xml \
b/modules/enterprise/scripting/python/pom.xml index f6a1149c..dc69d9e 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -3,10 +3,10 @@
     <parent>
         <artifactId>rhq-scripting-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <artifactId>rhq-scripting-python</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Python support</name>
     <description>Provides RHQ scripting in Python using Jython</description>
 
diff --git a/modules/enterprise/server/appserver/pom.xml \
b/modules/enterprise/server/appserver/pom.xml index 0e46986..f186d70 100644
--- a/modules/enterprise/server/appserver/pom.xml
+++ b/modules/enterprise/server/appserver/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/client-api/pom.xml \
b/modules/enterprise/server/client-api/pom.xml index 6bb6ea2..3e69ded 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -5,13 +5,13 @@
     <parent>
         <artifactId>rhq-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-server-client-api</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Enterprise Server Client API</name>
     <description>The implementation of the client API when accessing the server \
locally</description>  
diff --git a/modules/enterprise/server/ear/pom.xml \
b/modules/enterprise/server/ear/pom.xml index 939f107..867ebe1 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/installer/pom.xml \
b/modules/enterprise/server/installer/pom.xml index 150daf2..23d8e94 100644
--- a/modules/enterprise/server/installer/pom.xml
+++ b/modules/enterprise/server/installer/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/itests-2/pom.xml \
b/modules/enterprise/server/itests-2/pom.xml index 9f9ba81..5e4e076 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/jar/pom.xml \
b/modules/enterprise/server/jar/pom.xml index acb8931..84e34c4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml \
b/modules/enterprise/server/plugins/alert-cli/pom.xml index 68ea87a..ea9bd42 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <groupId>org.rhq</groupId>
     <artifactId>alert-cli</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>RHQ Enterprise Server CLI Script Alert Plugin</name>
     <description>An alert sender able to execute an arbitrary CLI script as a \
response to an alert</description>  
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml \
b/modules/enterprise/server/plugins/alert-email/pom.xml index ec91baf..a2102a3 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.server</groupId>
     <artifactId>alert-email</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Email Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml \
b/modules/enterprise/server/plugins/alert-irc/pom.xml index ea7bd90..bd5f656 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-irc</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server IRC Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml \
b/modules/enterprise/server/plugins/alert-log4j/pom.xml index c50b5cb..934cb7e 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-log4j</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Log4J Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml \
b/modules/enterprise/server/plugins/alert-microblog/pom.xml index c576b41..28d1d56 \
                100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-microblog</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Microblog Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml \
b/modules/enterprise/server/plugins/alert-mobicents/pom.xml index 5d9fb43..4338526 \
                100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-mobicents</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Mobicents Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml \
b/modules/enterprise/server/plugins/alert-operations/pom.xml index 24813ad..21ec5f7 \
                100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -2,14 +2,14 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-operations</artifactId>
     <packaging>jar</packaging>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Opertions Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml \
b/modules/enterprise/server/plugins/alert-roles/pom.xml index 31acb49..a6c054a 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-roles</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Roles Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml \
b/modules/enterprise/server/plugins/alert-snmp/pom.xml index b09ed2a..f84398b 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-snmp</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server SNMP Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml \
b/modules/enterprise/server/plugins/alert-subject/pom.xml index cd0263b..d4d2564 \
                100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>alert-subject</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Subject Alert Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml \
b/modules/enterprise/server/plugins/ant-bundle/pom.xml index 489b37b..648b451 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml \
b/modules/enterprise/server/plugins/cobbler/pom.xml index 94cbe7d..6f56e82 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -4,14 +4,14 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>rhq-serverplugin-cobbler</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server Cobbler Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/disk/pom.xml \
b/modules/enterprise/server/plugins/disk/pom.xml index c111bcc..21bb689 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml \
b/modules/enterprise/server/plugins/drift-rhq/pom.xml index 52b3a7c..7111543 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml \
b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml index \
                b43da47..6ab0964 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml \
b/modules/enterprise/server/plugins/jboss-software/pom.xml index 33a11a1..32ffc76 \
                100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml \
b/modules/enterprise/server/plugins/packagetype-cli/pom.xml index 80799ab..2a75e07 \
                100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq</groupId>
     <artifactId>packagetype-cli</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <name>RHQ Enterprise Server CLI Package Type Plugin</name>
 
diff --git a/modules/enterprise/server/plugins/pom.xml \
b/modules/enterprise/server/plugins/pom.xml index 827bc41..dc862db 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/plugins/url/pom.xml \
b/modules/enterprise/server/plugins/url/pom.xml index 5660473..bb1740d 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml \
b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml index \
                0d80df3..06da613 100644
--- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
+++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml \
b/modules/enterprise/server/plugins/yum/pom.xml index 75b3cdc..6f8ac10 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml
index 494e98e..9c60e30 100644
--- a/modules/enterprise/server/pom.xml
+++ b/modules/enterprise/server/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/safe-invoker/pom.xml \
b/modules/enterprise/server/safe-invoker/pom.xml index 8c509f4..b2b741e 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/enterprise/server/sars/pom.xml \
b/modules/enterprise/server/sars/pom.xml index 2b00e67..d4f7715 100644
--- a/modules/enterprise/server/sars/pom.xml
+++ b/modules/enterprise/server/sars/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/enterprise/server/sars/services-sar/pom.xml \
b/modules/enterprise/server/sars/services-sar/pom.xml index 4586a8b..014420b 100644
--- a/modules/enterprise/server/sars/services-sar/pom.xml
+++ b/modules/enterprise/server/sars/services-sar/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-enterprise-server-sars-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/startup-subsystem/pom.xml \
b/modules/enterprise/server/startup-subsystem/pom.xml index 3359f33..7152fc3 100644
--- a/modules/enterprise/server/startup-subsystem/pom.xml
+++ b/modules/enterprise/server/startup-subsystem/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/enterprise/server/xml-schemas/pom.xml \
b/modules/enterprise/server/xml-schemas/pom.xml index 98783f1..00e558b 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 82fabfc..f2f2455 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -3,13 +3,13 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.rhq.helpers</groupId>
     <artifactId>bundleGen</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
 
     <build>
      <plugins>
diff --git a/modules/helpers/jeeGen/pom.xml b/modules/helpers/jeeGen/pom.xml
index 348b780..6f36514 100644
--- a/modules/helpers/jeeGen/pom.xml
+++ b/modules/helpers/jeeGen/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/perftest-support/pom.xml \
b/modules/helpers/perftest-support/pom.xml index ed71426..8772058 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -3,11 +3,11 @@
     <parent>
         <artifactId>rhq-helpers</artifactId>
         <groupId>org.rhq.helpers</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>perftest-support</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <name>Performance Testing Support</name>
     <description>To support performance testing, this is a basic tool to support \
extracting and later reimporting of  data from/to a database.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index bd47d23..ecebf6c 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
diff --git a/modules/helpers/rest-docs-generator/pom.xml \
b/modules/helpers/rest-docs-generator/pom.xml index e72aab4..c5a4a41 100644
--- a/modules/helpers/rest-docs-generator/pom.xml
+++ b/modules/helpers/rest-docs-generator/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <artifactId>rhq-helpers</artifactId>
     <groupId>org.rhq.helpers</groupId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/modules/helpers/rtfilter-subsystem/pom.xml \
b/modules/helpers/rtfilter-subsystem/pom.xml index f3cbb2e..baf0801 100644
--- a/modules/helpers/rtfilter-subsystem/pom.xml
+++ b/modules/helpers/rtfilter-subsystem/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index da9cf66..bf4ca3d 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq.helpers</groupId>
     <artifactId>rhq-helpers</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq.helpers</groupId>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml \
b/modules/integration-tests/apache-plugin-test/pom.xml index ce66fd5..a9d7296 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml \
b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml index \
                f83573d..48808ac 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>jndi-access-test</artifactId>
diff --git a/modules/integration-tests/jndi-access/pom.xml \
b/modules/integration-tests/jndi-access/pom.xml index caef075..6ded494 100644
--- a/modules/integration-tests/jndi-access/pom.xml
+++ b/modules/integration-tests/jndi-access/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>rhq-integration-tests</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml \
b/modules/integration-tests/jndi-access/remote-server/pom.xml index b28b9bf..d11992a \
                100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>jndi-access-test-parent</artifactId>
         <groupId>org.rhq</groupId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>jndi-access-remote-server</artifactId>
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index f110387..7e5f521 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/modules/integration-tests/rest-api/pom.xml \
b/modules/integration-tests/rest-api/pom.xml index 6061752..bca2fe4 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-integration-tests</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 14874eb..2809e95 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 9c3e48d..75a98a4 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 3f6bca5..380f6e6 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 4e663e6..ada89b3 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 6a85842..37ffe0e 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index d576083..a17a3d8 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index c01634b..9424397 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 27f290b..3aa5463 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 7959a32..03349f8 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml \
b/modules/plugins/filetemplate-bundle/pom.xml index c67fc10..8a5f0e6 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 4a3ad1d..a1c3353 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index dd99a37..d8325e4 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index 0303046..adee980 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -6,7 +6,7 @@
       <groupId>org.rhq</groupId>
       <!--  Bypass the jopr-plugins-parent which can not have children. It must \
build after the plugins in order to execute integration tests on them. -->  \
                <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 9ca39d3..f587112 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -7,7 +7,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 1a8d193..d1f3e43 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -6,12 +6,12 @@
   <parent>
       <artifactId>rhq-plugins-parent</artifactId>
       <groupId>org.rhq</groupId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-hudson-plugin</artifactId>
-  <version>4.7.0-SNAPSHOT</version>
+  <version>4.8.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 69f1dbb..93a915f 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index 875e82f..b043e7b 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -5,7 +5,7 @@
     <parent>
          <artifactId>rhq-plugins-parent</artifactId>
          <groupId>org.rhq</groupId>
-         <version>4.7.0-SNAPSHOT</version>
+         <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index 221d4cc..f2e6f8a 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 81b2322..cfe756d 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index bd58a06..b792d26 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml \
b/modules/plugins/jboss-cache-v3/pom.xml index c83611c..837852d 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -5,7 +5,7 @@
     <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
     </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml \
b/modules/plugins/jboss-cache/pom.xml index 421f24d..3828a6a 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 48e3f93..864f675 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 9255d09..094f451 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml \
b/modules/plugins/mod-cluster/pom.xml index 62ffc81..54b9f53 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 14e39a3..572851e 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml \
b/modules/plugins/netservices/pom.xml index 22db736..6b663ff 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/noop/pom.xml b/modules/plugins/noop/pom.xml
index 1f43ea4..68af26a 100644
--- a/modules/plugins/noop/pom.xml
+++ b/modules/plugins/noop/pom.xml
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index dc4f4aa..ed93d10 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml \
b/modules/plugins/pattern-generator/pom.xml index 1d40834..5653d69 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 593a70b..f852e8a 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.rhq</groupId>
     <artifactId>rhq-plugins-parent</artifactId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index ef210b6..e28148c 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 9d6a147..0e27179 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
    </parent>
 
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 6ee7474..12ae83c 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 1e323fb..26d37b3 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index e187c17..6bf549f 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 5327977..968a154 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 23dadb6..20e41c4 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 3772829..d31500b 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 3bec031..36ab8be 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index ae92638..74d740b 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>rhq-plugins-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 93856c9..e0a216e 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index d10ef73..3891b84 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 8cdd836..eb97008 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 52e155c..45c2544 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-plugins-parent</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.rhq</groupId>
diff --git a/modules/plugins/validate-all-plugins/pom.xml \
b/modules/plugins/validate-all-plugins/pom.xml index 1e8c6fc..63eb6ae 100644
--- a/modules/plugins/validate-all-plugins/pom.xml
+++ b/modules/plugins/validate-all-plugins/pom.xml
@@ -5,7 +5,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-plugins-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 1c2bbca..de510c5 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -4,7 +4,7 @@
       <parent>
          <groupId>org.rhq</groupId>
          <artifactId>rhq-plugins-parent</artifactId>
-         <version>4.7.0-SNAPSHOT</version>
+         <version>4.8.0-SNAPSHOT</version>
       </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index 82d911d..8f4cf31 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
    <parent>
       <groupId>org.rhq</groupId>
       <artifactId>rhq-parent</artifactId>
-      <version>4.7.0-SNAPSHOT</version>
+      <version>4.8.0-SNAPSHOT</version>
    </parent>
 
    <groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index f536119..c343deb 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <artifactId>rhq-modules-parent</artifactId>
     <groupId>org.rhq</groupId>
-    <version>4.7.0-SNAPSHOT</version>
+    <version>4.8.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index da1506f..b46ee9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
   <groupId>org.rhq</groupId>
   <artifactId>rhq-parent</artifactId>
-  <version>4.7.0-SNAPSHOT</version>
+  <version>4.8.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>RHQ</name>


commit 0989c0c6cad40b787e4148d40b95418d1dd7a4cf
Author: Stefan Negrea <snegrea@redhat.com>
Date:   Mon May 6 11:02:05 2013 -0500

    Disable all the arquillian-integration submodules from building when \
maven.test.skip is true. Also, fix modules that depended on these modules to include \
them only if they are built.  (cherry picked from commit \
7e9678418a8ee2683aafb395c1cc25415ab375e3)

diff --git a/modules/core/arquillian-integration/pom.xml \
b/modules/core/arquillian-integration/pom.xml index 7e215a3..9637dfc 100644
--- a/modules/core/arquillian-integration/pom.xml
+++ b/modules/core/arquillian-integration/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd">  
    <modelVersion>4.0.0</modelVersion>
@@ -19,11 +19,30 @@
    <name>RHQ Arquillian Integration Modules</name>
    <description>parent POM for integration modules with Arquillian</description>
 
-   <modules>
-      <module>test-agent-plugin</module>
-      <module>container</module>
-      <module>archive</module>
-      <module>suite-extension</module>
-   </modules>
+
+   <profiles>
+      <profile>
+	      <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	       -->
+	      <id>test.dependencies</id>
+	      <activation>
+	        <property>
+	          <name>maven.test.skip</name>
+	          <value>!true</value>
+	        </property>
+	      </activation>
+
+		  <modules>
+		     <module>test-agent-plugin</module>
+		     <module>container</module>
+		     <module>archive</module>
+		     <module>suite-extension</module>
+		  </modules>
+      </profile>
+   </profiles>
 
 </project>
diff --git a/modules/core/plugin-test-api/pom.xml \
b/modules/core/plugin-test-api/pom.xml index 9c91bc0..fc49cf3 100644
--- a/modules/core/plugin-test-api/pom.xml
+++ b/modules/core/plugin-test-api/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd">  
    <modelVersion>4.0.0</modelVersion>
@@ -24,59 +24,80 @@
          <version>${project.version}</version>
       </dependency>
 
-      <dependency>
-         <groupId>${project.groupId}</groupId>
-         <artifactId>test-utils</artifactId>
-         <version>${project.version}</version>
-      </dependency>
+   </dependencies>
 
-       <dependency>
-           <groupId>org.rhq</groupId>
-           <artifactId>rhq-arquillian-agent-plugin-container-embedded</artifactId>
-           <version>${project.version}</version>
-       </dependency>
-
-       <dependency>
-           <groupId>org.powermock</groupId>
-           <artifactId>powermock-module-testng</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.powermock</groupId>
-           <artifactId>powermock-api-mockito</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.arquillian.container</groupId>
-           <artifactId>arquillian-container-spi</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.arquillian.core</groupId>
-           <artifactId>arquillian-core-spi</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.arquillian.container</groupId>
-           <artifactId>arquillian-container-test-api</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.arquillian.test</groupId>
-           <artifactId>arquillian-test-spi</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.arquillian.testng</groupId>
-           <artifactId>arquillian-testng-container</artifactId>
-       </dependency>
-
-       <dependency>
-           <groupId>org.jboss.shrinkwrap.resolver</groupId>
-           <artifactId>shrinkwrap-resolver-depchain</artifactId>
-           <type>pom</type>
-       </dependency>
 
-   </dependencies>
+   <profiles>
+      <profile>
+	     <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	       -->
+	     <id>test.dependencies</id>
+	     <activation>
+	        <property>
+	           <name>maven.test.skip</name>
+	           <value>!true</value>
+	        </property>
+	     </activation>
+
+	     <dependencies>
+	          <dependency>
+		         <groupId>${project.groupId}</groupId>
+		         <artifactId>test-utils</artifactId>
+		         <version>${project.version}</version>
+		      </dependency>
+
+		       <dependency>
+		           <groupId>org.rhq</groupId>
+		           <artifactId>rhq-arquillian-agent-plugin-container-embedded</artifactId>
+		           <version>${project.version}</version>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.powermock</groupId>
+		           <artifactId>powermock-module-testng</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.powermock</groupId>
+		           <artifactId>powermock-api-mockito</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.arquillian.container</groupId>
+		           <artifactId>arquillian-container-spi</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.arquillian.core</groupId>
+		           <artifactId>arquillian-core-spi</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.arquillian.container</groupId>
+		           <artifactId>arquillian-container-test-api</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.arquillian.test</groupId>
+		           <artifactId>arquillian-test-spi</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.arquillian.testng</groupId>
+		           <artifactId>arquillian-testng-container</artifactId>
+		       </dependency>
+
+		       <dependency>
+		           <groupId>org.jboss.shrinkwrap.resolver</groupId>
+		           <artifactId>shrinkwrap-resolver-depchain</artifactId>
+		           <type>pom</type>
+		       </dependency>
+	     </dependencies>
+      </profile>
+   </profiles>
 
 </project>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index c51fb51..c4992af 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd">  
    <modelVersion>4.0.0</modelVersion>
@@ -23,9 +23,7 @@
       <profile>
          <id>default</id>
          <activation>
-            <property>
-               <name>java.home</name>
-            </property>
+            <activeByDefault>true</activeByDefault>
          </activation>
          <modules>
             <module>util</module>
@@ -47,6 +45,38 @@
          </modules>
       </profile>
 
+      <profile>
+         <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	     -->
+         <id>avoid.test.dependencies</id>
+	     <activation>
+	        <property>
+	           <name>maven.test.skip</name>
+	           <value>true</value>
+	        </property>
+	     </activation>
+         <modules>
+            <module>util</module>
+            <module>native-system</module>
+            <module>comm-api</module>
+            <module>dbutils</module>
+            <module>domain</module>
+            <module>plugin-api</module>
+            <module>client-api</module>
+            <module>plugin-container</module>
+            <module>gui</module>
+            <module>plugin-validator</module>
+            <module>arquillian-integration</module>
+            <module>plugin-test-api</module>
+            <module>plugin-container-itest</module>
+         </modules>
+      </profile>
+
+
      <profile>
         <id>plugindoc</id>
         <modules>
diff --git a/modules/plugins/cassandra/pom.xml b/modules/plugins/cassandra/pom.xml
index 9888aa0..d576083 100644
--- a/modules/plugins/cassandra/pom.xml
+++ b/modules/plugins/cassandra/pom.xml
@@ -63,20 +63,6 @@
       <artifactId>snakeyaml</artifactId>
       <version>1.10</version>
     </dependency>
-    <dependency>
-      <groupId>${rhq.groupId}</groupId>
-      <artifactId>rhq-core-plugin-test-api</artifactId>
-      <version>${project.version}</version>
-      <type>pom</type>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>${rhq.groupId}</groupId>
-      <artifactId>rhq-core-plugin-test-util</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>
@@ -231,6 +217,39 @@
   </build>
 
   <profiles>
+     <profile>
+	     <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	       -->
+	     <id>test.dependencies</id>
+	     <activation>
+	        <property>
+	           <name>maven.test.skip</name>
+	           <value>!true</value>
+	        </property>
+	     </activation>
+
+	     <dependencies>
+	       <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-api</artifactId>
+		       <version>${project.version}</version>
+		       <type>pom</type>
+		       <scope>test</scope>
+		    </dependency>
+
+		    <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-util</artifactId>
+		       <version>${project.version}</version>
+		       <scope>test</scope>
+		    </dependency>
+	     </dependencies>
+    </profile>
+
     <profile>
       <id>dev</id>
 
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index d9838cf..221d4cc 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -119,21 +119,6 @@
     <!-- Test Deps -->
 
     <dependency>
-       <groupId>${rhq.groupId}</groupId>
-       <artifactId>rhq-core-plugin-test-api</artifactId>
-       <version>${project.version}</version>
-       <type>pom</type>
-       <scope>test</scope>
-    </dependency>
-
-    <dependency>
-       <groupId>${rhq.groupId}</groupId>
-       <artifactId>rhq-core-plugin-test-util</artifactId>
-       <version>${project.version}</version>
-       <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>org.jboss.spec.javax.jms</groupId>
       <artifactId>jboss-jms-api_1.1_spec</artifactId>
       <version>1.0.0.Final</version>
@@ -218,6 +203,39 @@
 
   <profiles>
 
+     <profile>
+	     <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	       -->
+	     <id>test.dependencies</id>
+	     <activation>
+	        <property>
+	           <name>maven.test.skip</name>
+	           <value>!true</value>
+	        </property>
+	     </activation>
+
+	     <dependencies>
+	       <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-api</artifactId>
+		       <version>${project.version}</version>
+		       <type>pom</type>
+		       <scope>test</scope>
+		    </dependency>
+
+		    <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-util</artifactId>
+		       <version>${project.version}</version>
+		       <scope>test</scope>
+		    </dependency>
+	     </dependencies>
+    </profile>
+
     <profile>
       <id>integration-tests</id>
       <!--
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 33b2bd7..81b2322 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -99,21 +99,6 @@
     <!-- === Test Deps === -->
 
     <dependency>
-      <groupId>${rhq.groupId}</groupId>
-      <artifactId>rhq-core-plugin-test-api</artifactId>
-      <version>${project.version}</version>
-      <type>pom</type>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>${rhq.groupId}</groupId>
-      <artifactId>rhq-core-plugin-test-util</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>postgresql</groupId>
       <artifactId>postgresql</artifactId>
       <scope>test</scope>
@@ -250,6 +235,39 @@
 
   <profiles>
 
+     <profile>
+	     <!--
+	        This profile has been created to avoid unnecessary resolution of test \
dependencies during a build that +	        does not run, compile or need tests.
+	        More test dependencies are to be moved here if the set of sub-dependencies \
is complex, references project +	        test jars, or conflicts with changing the \
container version. +	       -->
+	     <id>test.dependencies</id>
+	     <activation>
+	        <property>
+	           <name>maven.test.skip</name>
+	           <value>!true</value>
+	        </property>
+	     </activation>
+
+	     <dependencies>
+	       <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-api</artifactId>
+		       <version>${project.version}</version>
+		       <type>pom</type>
+		       <scope>test</scope>
+		    </dependency>
+
+		    <dependency>
+		       <groupId>${rhq.groupId}</groupId>
+		       <artifactId>rhq-core-plugin-test-util</artifactId>
+		       <version>${project.version}</version>
+		       <scope>test</scope>
+		    </dependency>
+	     </dependencies>
+    </profile>
+
     <profile>
       <id>java7</id>
       <activation>


commit cad0a43803d781bf2ba28eab71b80f822bf2d07d
Author: Stefan Negrea <snegrea@redhat.com>
Date:   Mon May 6 11:01:37 2013 -0500

    Update test to avoid disabled managers. This is especially important for the \
TagManager that can be disabled via build properties.  (cherry picked from commit \
c9ccdbf61842dd115ce0d3067752e85dbb1db730)

diff --git a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/client/security/test/ScriptingAPIServerTest.java \
b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/client/security/test/ScriptingAPIServerTest.java
 index aa0ebd4..024e4f6 100644
--- a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/client/security/test/ScriptingAPIServerTest.java
                
+++ b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/client/security/test/ScriptingAPIServerTest.java
 @@ -87,6 +87,10 @@ public class ScriptingAPIServerTest extends \
ScriptableAbstractEJB3Test {  //Simplification itself is unit tested separately.
 
         for (RhqManager m : RhqManager.values()) {
+            if (!m.enabled()) {
+                continue;
+            }
+
             String name = m.name();
             // Only check for the TagManager if it is enabled at all
             if (name.contains("TagManager") && !RhqManager.TagManager.enabled()) {


commit 5fecc675d08aa9220a163f0e35530dc6c07447b6
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Mon May 6 16:20:24 2013 +0200

    Add test case for Bug 911321 - [EAP 6.1] Reload operation fails in standalone \
mode

diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 23a02c4..33b2bd7 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -30,6 +30,7 @@
     <java.tieredCompilation>-Dxxx</java.tieredCompilation>
     <java.useCompressedOOPS>-Dxxx</java.useCompressedOOPS>
     <rhq.internal>false</rhq.internal>
+    <as7.itest.mock.http.management.server.port>32259</as7.itest.mock.http.management.server.port>
  </properties>
 
 
@@ -118,6 +119,13 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.eclipse.jetty.aggregate</groupId>
+      <artifactId>jetty-all</artifactId>
+      <version>8.1.8.v20121106</version>
+      <scope>test</scope>
+    </dependency>
+
     <!-- For native subsystem -->
     <dependency>
         <groupId>org.hyperic</groupId>
@@ -588,6 +596,7 @@
                 <!-- only include integration tests; normal unit tests are handled \
                above by surefire plugin -->
                 <include>org/rhq/modules/plugins/jbossas7/itest/**/*Test.java</include>
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/StandaloneServerComponentTest.java</include>-->
 +                <!--<include>org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/DomainServerComponentTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java</include>-->
                
                 <!--<include>org/rhq/modules/plugins/jbossas7/itest/nonpc/ManagementConnectionPersistenceTest.java</include>-->
 @@ -609,6 +618,7 @@
                 <jboss.domain.portOffset>${jboss.domain.portOffset}</jboss.domain.portOffset>
                
                 <jboss.domain.httpManagementPort>${jboss.domain.httpManagementPort}</jboss.domain.httpManagementPort>
                
                 <settings.localRepository>${settings.localRepository}</settings.localRepository>
 +                <as7.itest.mock.http.management.server.port>${as7.itest.mock.http.management.server.port}</as7.itest.mock.http.management.server.port>
  </systemPropertyVariables>
             </configuration>
             <executions>
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java \
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java
 new file mode 100644
index 0000000..9597d47
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/InterruptibleOperationsTest.java
 @@ -0,0 +1,239 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2013 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+package org.rhq.modules.plugins.jbossas7.itest.standalone;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.mockito.Mockito.when;
+import static org.rhq.core.pluginapi.event.log.LogFileEventResourceComponentHelper.LOG_EVENT_SOURCES_CONFIG_PROP;
 +import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.HOSTNAME;
 +import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.MANAGEMENT_CONNECTION_TIMEOUT;
 +import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.PASSWORD;
 +import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.PORT;
 +import static org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.Property.USER;
 +import static org.testng.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.availability.AvailabilityContext;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.core.system.SystemInfoFactory;
+import org.rhq.core.util.StringUtil;
+import org.rhq.modules.plugins.jbossas7.StandaloneASComponent;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Check that management operations that might be interrupted by AS server \
(connection closed before the http response + * is sent) don't make RHQ operations \
fail. + *
+ * See https://bugzilla.redhat.com/show_bug.cgi?id=911321
+ *
+ * @author Thomas Segismont
+ */
+public class InterruptibleOperationsTest {
+
+    private static final Log LOG = \
LogFactory.getLog(InterruptibleOperationsTest.class); +
+    private static final String HTTP_HOST = "localhost";
+
+    private static final int HTTP_PORT = 31159;
+
+    private static final String HTTP_PORT_VARIABLE = \
"as7.itest.mock.http.management.server.port"; +
+    @Mock
+    private ResourceContext resourceContext;
+
+    private StandaloneASComponent serverComponent;
+
+    private Server jettyServer;
+
+    private ExecutorService executorService;
+
+    @BeforeMethod
+    private void setup() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        serverComponent = new TestStandaloneASComponent();
+        int httpPort = getJettyPort();
+        setupResourceContext(httpPort);
+        setupJettyServer(httpPort);
+        jettyServer.start();
+        executorService = Executors.newSingleThreadExecutor();
+        serverComponent.start(resourceContext);
+    }
+
+    private void setupJettyServer(int httpPort) {
+        jettyServer = new Server(new InetSocketAddress(HTTP_HOST, httpPort));
+        ServletContextHandler context = new \
ServletContextHandler(ServletContextHandler.SESSIONS); +        \
context.setContextPath("/"); +        jettyServer.setHandler(context);
+        HttpServlet testServlet = new TestServlet();
+        context.addServlet(new ServletHolder(testServlet), "/*");
+    }
+
+    private static int getJettyPort() {
+        String httpPortVariable = System.getProperty(HTTP_PORT_VARIABLE);
+        if (StringUtil.isNotBlank(httpPortVariable)) {
+            try {
+                int port = Integer.parseInt(httpPortVariable);
+                LOG.info("Using port " + httpPortVariable + " for http server");
+                return port;
+            } catch (NumberFormatException e) {
+                LOG.warn("Invalid port variable: " + httpPortVariable);
+            }
+        }
+        LOG.info("Using default port " + String.valueOf(HTTP_PORT) + " for http \
server"); +        return HTTP_PORT;
+    }
+
+    private void setupResourceContext(int httpPort) {
+        when(resourceContext.getPluginConfiguration()).thenReturn(pluginConfig(httpPort));
 +        when(resourceContext.getResourceKey()).thenReturn("/TestServer");
+        when(resourceContext.getSystemInformation()).thenReturn(SystemInfoFactory.createJavaSystemInfo());
 +        when(resourceContext.getAvailabilityContext()).thenReturn(Mockito.mock(AvailabilityContext.class));
 +    }
+
+    private Configuration pluginConfig(int httpPort) {
+        Configuration pluginConfig = new Configuration();
+        pluginConfig.setSimpleValue(HOSTNAME, "localhost");
+        pluginConfig.setSimpleValue(PORT, String.valueOf(httpPort));
+        pluginConfig.setSimpleValue(USER, "pipo");
+        pluginConfig.setSimpleValue(PASSWORD, "molo");
+        pluginConfig.setSimpleValue(MANAGEMENT_CONNECTION_TIMEOUT, "-1");
+        pluginConfig.getMap().put(LOG_EVENT_SOURCES_CONFIG_PROP, new \
PropertyList()); +        return pluginConfig;
+    }
+
+    @AfterMethod
+    private void tearDown() throws Exception {
+        LOG.info("Shutting down Jetty test server");
+        try {
+            if (jettyServer != null) {
+                jettyServer.stop();
+            }
+        } catch (Exception ignore) {
+        }
+        if (executorService != null) {
+            executorService.shutdownNow();
+        }
+    }
+
+    @Test(timeOut = 60 * 1000)
+    public void testReloadOperation() throws Exception {
+        OperationResult operationResult = serverComponent.invokeOperation("reload", \
new Configuration()); +        assertEquals(operationResult.getSimpleResult(), \
"Success"); +    }
+
+    @Test(timeOut = 60 * 1000)
+    public void testShutdown() throws Exception {
+        OperationResult operationResult = \
serverComponent.invokeOperation("shutdown", new Configuration()); +        \
assertEquals(operationResult.getSimpleResult(), "Success"); +    }
+
+    private class RestartJetty implements Runnable {
+        @Override
+        public void run() {
+            try {
+                jettyServer.stop();
+            } catch (Exception ignore) {
+            }
+            try {
+                Thread.sleep(SECONDS.toMillis(2));
+            } catch (Exception ignore) {
+            }
+            try {
+                jettyServer.start();
+            } catch (Exception ignore) {
+            }
+        }
+    }
+
+    private class TestServlet extends HttpServlet {
+
+        private ObjectMapper objectMapper = new ObjectMapper();
+
+        @Override
+        protected void doPost(HttpServletRequest req, HttpServletResponse resp) \
throws ServletException, IOException { +            Operation operation = \
objectMapper.readValue(req.getInputStream(), Operation.class); +            // Check \
if we recevied an operation which a real http management interface might interrupt  + \
if (operation.getOperation().equals("reload") || \
operation.getOperation().equals("shutdown")) { +                // Schedule a Jetty \
restart  +                executorService.submit(new RestartJetty());
+                // Then wait until Jetty is shutdown
+                try {
+                    Thread.sleep(Long.MAX_VALUE);
+                } catch (InterruptedException ignore) {
+                }
+                return;
+            }
+            // Standard operation. Return simple success
+            Result result = new Result();
+            result.setOutcome("success");
+            objectMapper.writeValue(resp.getOutputStream(), result);
+        }
+
+        @Override
+        protected void doGet(HttpServletRequest req, HttpServletResponse resp) \
throws ServletException, IOException { +            doPost(req, resp);
+        }
+
+    }
+
+    // Tweak StandaloneASComponent implementation for this test case
+    private class TestStandaloneASComponent extends StandaloneASComponent {
+
+        @Override
+        public AvailabilityType getAvailability() {
+            // Avoid various management requests when component is started  
+            return AvailabilityType.DOWN;
+        }
+
+        @Override
+        protected boolean waitUntilDown() throws InterruptedException {
+            // Standard implementation relies on discovery of some resource \
properties +            return true;
+        }
+    }
+
+}


commit 1dba477c3fc0034a5a21960db8447fa9b43f5a56
Author: Stefan Negrea <snegrea@redhat.com>
Date:   Fri May 3 17:10:53 2013 -0500

    [BZ 959591] Add back specific ant version based on local pom variables to force \
the download of the dependency even if not directly used in the pom. Without this, \
the pom would assume that the version referred here is the version from parent poms. \
This can cause the submodule artifact to miss ant binaries if not already in the \
local maven repository.  (cherry picked from commit \
2bb45d3c4c9d5edc71acf4380ce7a10a93937aae)

diff --git a/modules/enterprise/agentupdate/pom.xml \
b/modules/enterprise/agentupdate/pom.xml index ddec938..3b66b92 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -37,12 +37,14 @@
     <dependency>
       <groupId>org.apache.ant</groupId>
       <artifactId>ant</artifactId>
+      <version>${ant.version}</version>
       <scope>provided</scope>
     </dependency>
 
     <dependency>
       <groupId>org.apache.ant</groupId>
       <artifactId>ant-launcher</artifactId>
+      <version>${ant.version}</version>
       <scope>provided</scope>
     </dependency>
 


commit 17865107e38aa503c35f5a608cc1972c09bf5a73
Author: Mike Thompson <mithomps@redhat.com>
Date:   Fri May 3 15:01:26 2013 -0700

    [BZ 958754] -  d3 multi-line chart: time units should have minutes when \
appropriate. Added the appropriate d3 time format string and updated the nvd3 chart \
library neither of which fixed the issue. It appears to be an error in nvd3 chart \
library.

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricNvd3BarChartGraph.java \
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricNvd3BarChartGraph.java
 index 1fec750..a2de9c6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricNvd3BarChartGraph.java
                
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricNvd3BarChartGraph.java
 @@ -19,7 +19,7 @@
 package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
 
 /**
- * Contains the chart definition for a Bar Chart Graph.
+ * Contains the chart definition for a MultiLine Graph.
  *
  * @author Mike Thompson
  */
@@ -39,7 +39,7 @@ public final class MetricNvd3BarChartGraph extends AbstractGraph
      */
     public native void drawJsniChart() /*-{
         console.log("Draw NVD3 Bar jsni chart");
-        console.time("multiChart")
+        console.time("multiChart");
         var global = this,
             chartId =  \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartId()(),
  chartHandle = "#rChart-"+chartId,
@@ -49,7 +49,7 @@ public final class MetricNvd3BarChartGraph extends AbstractGraph
             yAxisUnits = \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getYAxisUnits()(),
                
             xAxisLabel = \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getXAxisTitle()(),
                
             displayDayOfWeek = \
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::shouldDisplayDayOfWeekInXAxisLabel()(),
                
-            xAxisTimeFormat = (displayDayOfWeek) ? "%a %I %p" : "%I %p",
+            xAxisTimeFormat = (displayDayOfWeek) ? "%a %I %p" : "%I : %M %p",
 
         // nvd3 defines their json models a standard way (same model for other \
graphs)  data = function() {
@@ -63,7 +63,7 @@ public final class MetricNvd3BarChartGraph extends AbstractGraph
         };
         $wnd.nv.addGraph(function() {
             var chart = $wnd.nv.models.multiBarChart()
-                    .showControls(false)
+                    .showControls(true)
                     .tooltips(true);
 
             chart.xAxis.axisLabel(xAxisLabel)
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css \
b/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css index cc40dfb..163b9a8 \
                100755
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
@@ -18,8 +18,8 @@
 .nvtooltip {
   position: absolute;
   background-color: rgba(255,255,255,1);
-  padding: 10px;
-  border: 1px solid #ddd;
+  padding: 1px;
+  border: 1px solid rgba(0,0,0,.2);
   z-index: 10000;
 
   font-family: Arial;
@@ -33,12 +33,13 @@
   -moz-transition-delay: 500ms;
   -webkit-transition-delay: 500ms;
 
-  -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-  -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-  box-shadow: 4px 4px 8px rgba(0,0,0,.5);
+  -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
+  -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
+  box-shadow: 0 5px 10px rgba(0,0,0,.2);
 
-  -moz-border-radius: 10px;
-  border-radius: 10px;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
 
   pointer-events: none;
 
@@ -50,15 +51,29 @@
   user-select: none;
 }
 
+.nvtooltip.x-nvtooltip,
+.nvtooltip.y-nvtooltip {
+  padding: 8px;
+}
+
 .nvtooltip h3 {
   margin: 0;
-  padding: 0;
+  padding: 4px 14px;
+  line-height: 18px;
+  font-weight: normal;
+  background-color: #f7f7f7;
   text-align: center;
+
+  border-bottom: 1px solid #ebebeb;
+
+  -webkit-border-radius: 5px 5px 0 0;
+  -moz-border-radius: 5px 5px 0 0;
+  border-radius: 5px 5px 0 0;
 }
 
 .nvtooltip p {
   margin: 0;
-  padding: 0;
+  padding: 5px 14px;
   text-align: center;
 }
 
@@ -93,7 +108,7 @@ svg {
 
 
 svg text {
-  font: normal 12px sans-serif;
+  font: normal 12px Arial;
 }
 
 svg .title {
@@ -101,7 +116,8 @@ svg .title {
 }
 
 .nvd3 .nv-background {
-  fill: none;
+  fill: white;
+  fill-opacity: 0;
   /*
   pointer-events: none;
   */
@@ -109,7 +125,7 @@ svg .title {
 
 .nvd3.nv-noData {
   font-size: 18px;
-  font-weight: bolf;
+  font-weight: bold;
 }
 
 
@@ -197,12 +213,10 @@ svg .title {
 
 .nvd3 .nv-bars .negative rect {
     zfill: brown;
-    cursor: pointer;
 }
 
 .nvd3 .nv-bars rect {
   zfill: steelblue;
-  cursor: pointer;
   fill-opacity: .75;
 
   transition: fill-opacity 250ms linear;
@@ -226,10 +240,6 @@ svg .title {
   fill: rgba(0,0,0,1);
 }
 
-.nvd3 .nv-x.nv-axis text {
-  transform: rotate(90);
-}
-
 
 /**********
 *  Bars
@@ -302,10 +312,10 @@ svg .title {
 .nvd3 .nv-groups path.nv-line {
   fill: none;
   stroke-width: 2.5px;
+  /*
   stroke-linecap: round;
   shape-rendering: geometricPrecision;
 
-  /*
   transition: stroke-width 250ms linear;
   -moz-transition: stroke-width 250ms linear;
   -webkit-transition: stroke-width 250ms linear;
@@ -318,10 +328,10 @@ svg .title {
 
 .nvd3 .nv-groups path.nv-area {
   stroke: none;
+  /*
   stroke-linecap: round;
   shape-rendering: geometricPrecision;
 
-  /*
   stroke-width: 2.5px;
   transition: stroke-width 250ms linear;
   -moz-transition: stroke-width 250ms linear;
@@ -350,8 +360,8 @@ svg .title {
 }
 
 .nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
-  fill-opacity: .5;
-  stroke-opacity: .5;
+  fill-opacity: .5 !important;
+  stroke-opacity: .5 !important;
 }
 
 
@@ -397,9 +407,11 @@ svg .title {
 *  Scatter
 */
 
+/* **Attempting to remove this for useVoronoi(false), need to see if it's required \
                anywhere
 .nvd3 .nv-groups .nv-point {
   pointer-events: none;
 }
+*/
 
 .nvd3 .nv-groups .nv-point.hover {
   stroke-width: 20px;
@@ -485,21 +497,27 @@ svg .title {
 *  Bullet
 */
 
-.nvd3.nv-bullet { font: 10px sans-serif; cursor: pointer; }
-.nvd3.nv-bullet rect { fill-opacity: .6; }
-.nvd3.nv-bullet rect:hover { fill-opacity: 1; }
+.nvd3.nv-bullet { font: 10px sans-serif; }
+.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
+.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
 .nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
 .nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; \
                }
 .nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
 .nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
 .nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
 .nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-measure.nv-s0 { fill: steelblue; }
-.nvd3.nv-bullet .nv-measure.nv-s1 { fill: darkblue; }
 .nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
 .nvd3.nv-bullet .nv-subtitle { fill: #999; }
 
 
+.nvd3.nv-bullet .nv-range {
+  fill: #999;
+  fill-opacity: .4;
+}
+.nvd3.nv-bullet .nv-range:hover {
+  fill-opacity: .7;
+}
+
 
 
 /**********
@@ -515,7 +533,7 @@ svg .title {
 }
 
 .nvd3.nv-sparklineplus .nv-hoverValue line {
-  stroke: #f44;
+  stroke: #333;
   stroke-width: 1.5px;
  }
 
@@ -531,8 +549,11 @@ svg .title {
 
 .nvd3.nv-sparklineplus .nv-xValue,
 .nvd3.nv-sparklineplus .nv-yValue {
+  /*
   stroke: #666;
-  font-size: .5em;
+  */
+  stroke-width: 0;
+  font-size: .9em;
   font-weight: normal;
 }
 
@@ -540,6 +561,24 @@ svg .title {
   stroke: #f66;
 }
 
+.nvd3.nv-sparklineplus .nv-maxValue {
+  stroke: #2ca02c;
+  fill: #2ca02c;
+}
+
+.nvd3.nv-sparklineplus .nv-minValue {
+  stroke: #d62728;
+  fill: #d62728;
+}
+
+.nvd3.nv-sparklineplus .nv-currentValue {
+  /*
+  stroke: #444;
+  fill: #000;
+  */
+  font-weight: bold;
+  font-size: 1.1em;
+}
 
 /**********
 * historical stock
@@ -629,4 +668,35 @@ svg .title {
   */
 }
 
+/**********
+* Parallel Coordinates
+*/
+
+.nvd3 .background path {
+  fill: none;
+  stroke: #ccc;
+  stroke-opacity: .4;
+  shape-rendering: crispEdges;
+}
+
+.nvd3 .foreground path {
+  fill: none;
+  stroke: steelblue;
+  stroke-opacity: .7;
+}
+
+.nvd3 .brush .extent {
+  fill-opacity: .3;
+  stroke: #fff;
+  shape-rendering: crispEdges;
+}
+
+.nvd3 .axis line, .axis path {
+  fill: none;
+  stroke: #000;
+  shape-rendering: crispEdges;
+}
 
+.nvd3 .axis text {
+  text-shadow: 0 1px 0 #fff;
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/nv.d3.js \
b/modules/enterprise/gui/coregui/src/main/webapp/js/nv.d3.js index 2fe2c64..e405d2e \
                100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/nv.d3.js
+++ b/modules/enterprise/gui/coregui/src/main/webapp/js/nv.d3.js
@@ -36,29 +36,34 @@ if (nv.dev) {
 
 // Logs all arguments, and returns the last so you can test things in place
 nv.log = function() {
-  if (nv.dev && console.log && console.log.apply) console.log.apply(console, \
arguments); +  if (nv.dev && console.log && console.log.apply)
+    console.log.apply(console, arguments)
+  else if (nv.dev && console.log && Function.prototype.bind) {
+    var log = Function.prototype.bind.call(console.log, console);
+    log.apply(console, arguments);
+  }
   return arguments[arguments.length - 1];
 };
 
 
 nv.render = function render(step) {
-  step = step || 1; // number of graphs to generate in each timout loop
+  step = step || 1; // number of graphs to generate in each timeout loop
 
-  render.active = true;
+  nv.render.active = true;
   nv.dispatch.render_start();
 
   setTimeout(function() {
-    var chart;
+    var chart, graph;
 
-    for (var i = 0; i < step && (graph = render.queue[i]); i++) {
+    for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
       chart = graph.generate();
       if (typeof graph.callback == typeof(Function)) graph.callback(chart);
       nv.graphs.push(chart);
     }
 
-    render.queue.splice(0, i);
+    nv.render.queue.splice(0, i);
 
-    if (render.queue.length) setTimeout(arguments.callee, 0);
+    if (nv.render.queue.length) setTimeout(arguments.callee, 0);
     else { nv.render.active = false; nv.dispatch.render_end(); }
   }, 0);
 };
@@ -114,7 +119,7 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, \
function(date) {  
 
 /*****
- * A no frills tooltip implementation.
+ * A no-frills tooltip implementation.
  *****/
 
 
@@ -143,39 +148,67 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, \
function(date) {  width = parseInt(container.offsetWidth),
         windowWidth = nv.utils.windowSize().width,
         windowHeight = nv.utils.windowSize().height,
-        scrollTop = body.scrollTop,
-        scrollLeft = body.scrollLeft,
+        scrollTop = window.scrollY,
+        scrollLeft = window.scrollX,
         left, top;
 
+    windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : \
windowHeight - 16; +    windowWidth = window.innerHeight >= \
document.body.scrollHeight ? windowWidth : windowWidth - 16; +
+    var tooltipTop = function ( Elem ) {
+        var offsetTop = top;
+        do {
+            if( !isNaN( Elem.offsetTop ) ) {
+                offsetTop += (Elem.offsetTop);
+            }
+        } while( Elem = Elem.offsetParent );
+        return offsetTop;
+    }
+
+    var tooltipLeft = function ( Elem ) {
+        var offsetLeft = left;
+        do {
+            if( !isNaN( Elem.offsetLeft ) ) {
+                offsetLeft += (Elem.offsetLeft);
+            }
+        } while( Elem = Elem.offsetParent );
+        return offsetLeft;
+    }
 
     switch (gravity) {
       case 'e':
         left = pos[0] - width - dist;
         top = pos[1] - (height / 2);
-        if (left < scrollLeft) left = pos[0] + dist;
-        if (top < scrollTop) top = scrollTop + 5;
-        if (top + height > scrollTop + windowHeight) top = scrollTop - height - 5;
+        var tLeft = tooltipLeft(container);
+        var tTop = tooltipTop(container);
+        if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : \
scrollLeft - tLeft + left; +        if (tTop < scrollTop) top = scrollTop - tTop + \
top; +        if (tTop + height > scrollTop + windowHeight) top = scrollTop + \
windowHeight - tTop + top - height;  break;
       case 'w':
         left = pos[0] + dist;
         top = pos[1] - (height / 2);
-        if (left + width > windowWidth) left = pos[0] - width - dist;
-        if (top < scrollTop) top = scrollTop + 5;
-        if (top + height > scrollTop + windowHeight) top = scrollTop - height - 5;
+        if (tLeft + width > windowWidth) left = pos[0] - width - dist;
+        if (tTop < scrollTop) top = scrollTop + 5;
+        if (tTop + height > scrollTop + windowHeight) top = scrollTop - height - 5;
         break;
       case 'n':
-        left = pos[0] - (width / 2);
+        left = pos[0] - (width / 2) - 5;
         top = pos[1] + dist;
-        if (left < scrollLeft) left = scrollLeft + 5;
-        if (left + width > windowWidth) left = windowWidth - width - 5;
-        if (top + height > scrollTop + windowHeight) top = pos[1] - height - dist;
+        var tLeft = tooltipLeft(container);
+        var tTop = tooltipTop(container);
+        if (tLeft < scrollLeft) left = scrollLeft + 5;
+        if (tLeft + width > windowWidth) left = left - width/2 + 5;
+        if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight \
- tTop + top - height;  break;
       case 's':
         left = pos[0] - (width / 2);
         top = pos[1] - height - dist;
-        if (left < scrollLeft) left = scrollLeft + 5;
-        if (left + width > windowWidth) left = windowWidth - width - 5;
-        if (scrollTop > top) top = pos[1] + 20;
+        var tLeft = tooltipLeft(container);
+        var tTop = tooltipTop(container);
+        if (tLeft < scrollLeft) left = scrollLeft + 5;
+        if (tLeft + width > windowWidth) left = left - width/2 + 5;
+        if (scrollTop > tTop) top = scrollTop;
         break;
     }
 
@@ -243,7 +276,7 @@ nv.utils.windowSize = function() {
 
 
 // Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing alkl \
of them +// TODO: give a way to remove a function after its bound, other than \
removing all of them  nv.utils.windowResize = function(fun){
   var oldresize = window.onresize;
 
@@ -255,7 +288,7 @@ nv.utils.windowResize = function(fun){
 
 // Backwards compatible way to implement more d3-like coloring of graphs.
 // If passed an array, wrap it in a function which implements the old default
-// behaviour
+// behavior
 nv.utils.getColor = function(color) {
     if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, \
get default colors back  
@@ -263,7 +296,7 @@ nv.utils.getColor = function(color) {
         return function(d, i) { return d.color || color[i % color.length]; };
     else
         return color;
-        //can't really help it if someone passes rubish as color
+        //can't really help it if someone passes rubbish as color
 }
 
 // Default color chooser uses the index of an object as before.
@@ -328,7 +361,7 @@ nv.models.axis = function() {
     ;
 
   var margin = {top: 0, right: 0, bottom: 0, left: 0}
-    , width = 60 //only used for tickLabel currently
+    , width = 75 //only used for tickLabel currently
     , height = 60 //only used for tickLabel currently
     , scale = d3.scale.linear()
     , axisLabelText = null
@@ -337,6 +370,7 @@ nv.models.axis = function() {
     , rotateLabels = 0
     , rotateYLabel = true
     , staggerLabels = false
+    , isOrdinal = false
     , ticks = null
     ;
 
@@ -398,11 +432,11 @@ nv.models.axis = function() {
       axisLabel.exit().remove();
       switch (axis.orient()) {
         case 'top':
-          axisLabel.enter().append('text').attr('class', 'nv-axislabel')
-              .attr('text-anchor', 'middle')
-              .attr('y', 0);
+          axisLabel.enter().append('text').attr('class', 'nv-axislabel');
           var w = (scale.range().length==2) ? scale.range()[1] : \
(scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));  \
axisLabel +              .attr('text-anchor', 'middle')
+              .attr('y', 0)
               .attr('x', w/2);
           if (showMaxMin) {
             var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
@@ -428,7 +462,7 @@ nv.models.axis = function() {
           }
           break;
         case 'bottom':
-          var xLabelMargin = 30;
+          var xLabelMargin = 36;
           var maxTextWidth = 30;
           var xTicks = g.selectAll('g').select("text");
           if (rotateLabels%360) {
@@ -445,20 +479,22 @@ nv.models.axis = function() {
               .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + \
                ' 0,0)' })
               .attr('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
           }
-          axisLabel.enter().append('text').attr('class', 'nv-axislabel')
-            .attr('text-anchor', 'middle')
-            .attr('y', xLabelMargin);
+          axisLabel.enter().append('text').attr('class', 'nv-axislabel');
           var w = (scale.range().length==2) ? scale.range()[1] : \
(scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));  \
axisLabel +              .attr('text-anchor', 'middle')
+              .attr('y', xLabelMargin)
               .attr('x', w/2);
           if (showMaxMin) {
+          //if (showMaxMin && !isOrdinal) {
             var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
-                           .data(scale.domain());
+                           //.data(scale.domain())
+                           .data([scale.domain()[0], \
                scale.domain()[scale.domain().length - 1]]);
             axisMaxMin.enter().append('g').attr('class', \
'nv-axisMaxMin').append('text');  axisMaxMin.exit().remove();
             axisMaxMin
                 .attr('transform', function(d,i) {
-                  return 'translate(' + scale(d) + ',0)'
+                  return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / \
2 : 0)) + ',0)'  })
               .select('text')
                 .attr('dy', '.71em')
@@ -471,7 +507,9 @@ nv.models.axis = function() {
                 });
             d3.transition(axisMaxMin)
                 .attr('transform', function(d,i) {
-                  return 'translate(' + scale.range()[i] + ',0)'
+                  //return 'translate(' + scale.range()[i] + ',0)'
+                  //return 'translate(' + scale(d) + ',0)'
+                  return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / \
2 : 0)) + ',0)'  });
           }
           if (staggerLabels)
@@ -480,11 +518,11 @@ nv.models.axis = function() {
 
           break;
         case 'right':
-          axisLabel.enter().append('text').attr('class', 'nv-axislabel')
+          axisLabel.enter().append('text').attr('class', 'nv-axislabel');
+          axisLabel
               .attr('text-anchor', rotateYLabel ? 'middle' : 'begin')
               .attr('transform', rotateYLabel ? 'rotate(90)' : '')
-              .attr('y', rotateYLabel ? (-Math.max(margin.right,width) - 12) : -10); \
//TODO: consider calculating this based on largest tick width... OR at least expose \
                this on chart
-          axisLabel
+              .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) \
//TODO: consider calculating this based on largest tick width... OR at least expose \
                this on chart
               .attr('x', rotateYLabel ? (scale.range()[0] / 2) : \
axis.tickPadding());  if (showMaxMin) {
             var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
@@ -514,11 +552,19 @@ nv.models.axis = function() {
           }
           break;
         case 'left':
-          axisLabel.enter().append('text').attr('class', 'nv-axislabel')
+          /*
+          //For dynamically placing the label. Can be used with dynamically-sized \
chart axis margins +          var yTicks = g.selectAll('g').select("text");
+          yTicks.each(function(d,i){
+            var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
+            if(labelPadding > width) width = labelPadding;
+          });
+          */
+          axisLabel.enter().append('text').attr('class', 'nv-axislabel');
+          axisLabel
               .attr('text-anchor', rotateYLabel ? 'middle' : 'end')
               .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
-              .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + 12) : -10); \
//TODO: consider calculating this based on largest tick width... OR at least expose \
                this on chart
-          axisLabel
+              .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + 12) : -10) \
//TODO: consider calculating this based on largest tick width... OR at least expose \
                this on chart
               .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : \
-axis.tickPadding());  if (showMaxMin) {
             var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
@@ -552,27 +598,41 @@ nv.models.axis = function() {
           .text(function(d) { return d });
 
 
-      //check if max and min overlap other values, if so, hide the values that \
                overlap
       if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
+        //check if max and min overlap other values, if so, hide the values that \
overlap  g.selectAll('g') // the g's wrapping each tick
             .each(function(d,i) {
+              d3.select(this).select('text').attr('opacity', 1);
               if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - \
                10) { // 10 is assuming text height is 16... if d is 0, leave it!
                 if (d > 1e-10 || d < -1e-10) // accounts for minor floating point \
                errors... though could be problematic if the scale is EXTREMELY SMALL
-                  d3.select(this).remove();
-                else
-                  d3.select(this).select('text').remove(); // Don't remove the ZERO \
line!! +                  d3.select(this).attr('opacity', 0);
+                
+                d3.select(this).select('text').attr('opacity', 0); // Don't remove \
the ZERO line!!  }
             });
+
+        //if Max and Min = 0 only show min, Issue #281
+        if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
+          wrap.selectAll('g.nv-axisMaxMin')
+            .style('opacity', function(d,i) { return !i ? 1 : 0 });
+
       }
 
       if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
         var maxMinRange = [];
         wrap.selectAll('g.nv-axisMaxMin')
             .each(function(d,i) {
-              if (i) // i== 1, max position
-                maxMinRange.push(scale(d) - this.getBBox().width - 4)  //assuming \
the max and min labels are as wide as the next tick (with an extra 4 pixels just in \
                case)
-              else // i==0, min position
-                maxMinRange.push(scale(d) + this.getBBox().width + 4)
+              try {
+                  if (i) // i== 1, max position
+                      maxMinRange.push(scale(d) - this.getBBox().width - 4)  \
//assuming the max and min labels are as wide as the next tick (with an extra 4 \
pixels just in case) +                  else // i==0, min position
+                      maxMinRange.push(scale(d) + this.getBBox().width + 4)
+              }catch (err) {
+                


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic