.mailmap | 74 etc/scripts/createRelasenotes.pl | 38 modules/cli-tests/pom.xml | 2 modules/common/ant-bundle/pom.xml | 2 modules/common/drift/pom.xml | 2 modules/common/filetemplate-bundle/pom.xml | 2 modules/common/jboss-as-dmr-client/pom.xml | 2 modules/common/jboss-as/pom.xml | 2 modules/common/pom.xml | 2 modules/core/arquillian-integration/archive/pom.xml | 2 modules/core/arquillian-integration/container/pom.xml | 2 modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java | 2 modules/core/arquillian-integration/pom.xml | 2 modules/core/client-api/pom.xml | 2 modules/core/comm-api/pom.xml | 2 modules/core/dbutils/pom.xml | 2 modules/core/domain/intentional-api-changes-since-4.4.0.xml | 22 modules/core/domain/pom.xml | 2 modules/core/domain/src/main/java/org/rhq/core/domain/criteria/EventCriteria.java | 6 modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java | 11 modules/core/gui/pom.xml | 2 modules/core/native-system/ant-run.xml | 2 modules/core/native-system/pom.xml | 2 modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Attribute.java | 2 modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Conditional.java | 21 modules/core/native-system/src/main/java/org/rhq/core/system/pquery/ProcessInfoQuery.java | 28 modules/core/native-system/src/test/java/org/rhq/core/system/pquery/ProcessInfoQueryTest.java | 38 modules/core/plugin-api/intentional-api-changes-since-4.4.0.xml | 15 modules/core/plugin-api/pom.xml | 2 modules/core/plugin-container-itest/pom.xml | 2 modules/core/plugin-container/pom.xml | 2 modules/core/plugin-test-api/pom.xml | 2 modules/core/plugin-test-util/pom.xml | 2 modules/core/plugin-validator/pom.xml | 2 modules/core/plugindoc/pom.xml | 2 modules/core/pom.xml | 2 modules/core/util/intentional-api-changes-since-4.4.0.xml | 15 modules/core/util/pom.xml | 2 modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java | 93 - modules/core/util/src/test/java/org/rhq/core/util/exec/ProcessExecTest.java | 18 modules/enterprise/agent/ant-run.xml | 2 modules/enterprise/agent/pom.xml | 2 modules/enterprise/agentupdate/pom.xml | 2 modules/enterprise/binding/pom.xml | 4 modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ConfigurationClassBuilder.java | 7 modules/enterprise/comm/pom.xml | 2 modules/enterprise/gui/content_http-war/pom.xml | 2 modules/enterprise/gui/coregui/pom.xml | 2 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java | 8 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java | 272 +-- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java | 290 ++- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/MeasurementDataGWTService.java | 6 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java | 5 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java | 3 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java | 8 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java | 5 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java | 11 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java | 7 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/AbstractSearchBar.java | 36 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java | 550 ------- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java | 196 -- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 762 ---------- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/filter/CacheControlFilter.java | 2 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java | 17 modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css | 54 modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 3 modules/enterprise/gui/coregui/src/main/webapp/css/search.css | 245 --- modules/enterprise/gui/coregui/src/main/webapp/js/search.js | 61 modules/enterprise/gui/installer-war/pom.xml | 2 modules/enterprise/gui/pom.xml | 2 modules/enterprise/gui/portal-war/pom.xml | 2 modules/enterprise/gui/rest-war/pom.xml | 2 modules/enterprise/gui/rest-war/src/main/webapp/WEB-INF/web.xml | 2 modules/enterprise/pom.xml | 2 modules/enterprise/remoting/cli/pom.xml | 2 modules/enterprise/remoting/client-api/pom.xml | 2 modules/enterprise/remoting/client-deps/pom.xml | 2 modules/enterprise/remoting/pom.xml | 2 modules/enterprise/scripting/api/pom.xml | 4 modules/enterprise/scripting/javascript/pom.xml | 4 modules/enterprise/scripting/pom.xml | 4 modules/enterprise/scripting/python/pom.xml | 4 modules/enterprise/server/client-api/pom.xml | 4 modules/enterprise/server/container-lib/pom.xml | 2 modules/enterprise/server/container/pom.xml | 2 modules/enterprise/server/ear/pom.xml | 2 modules/enterprise/server/itests/pom.xml | 2 modules/enterprise/server/jar/intentional-api-changes-since-4.4.0.xml | 14 modules/enterprise/server/jar/pom.xml | 2 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java | 269 +++ modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerLocal.java | 121 + modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventRest.java | 89 + modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventSourceRest.java | 98 + modules/enterprise/server/jar/src/main/xsl/apiout2docbook.xsl | 42 modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementDataManagerTest.java | 243 +++ modules/enterprise/server/plugins/alert-cli/pom.xml | 4 modules/enterprise/server/plugins/alert-email/pom.xml | 4 modules/enterprise/server/plugins/alert-irc/pom.xml | 4 modules/enterprise/server/plugins/alert-log4j/pom.xml | 4 modules/enterprise/server/plugins/alert-microblog/pom.xml | 4 modules/enterprise/server/plugins/alert-mobicents/pom.xml | 4 modules/enterprise/server/plugins/alert-operations/pom.xml | 4 modules/enterprise/server/plugins/alert-roles/pom.xml | 4 modules/enterprise/server/plugins/alert-snmp/pom.xml | 4 modules/enterprise/server/plugins/alert-subject/pom.xml | 4 modules/enterprise/server/plugins/ant-bundle/pom.xml | 2 modules/enterprise/server/plugins/cobbler/pom.xml | 4 modules/enterprise/server/plugins/disk/pom.xml | 2 modules/enterprise/server/plugins/drift-mongodb/pom.xml | 2 modules/enterprise/server/plugins/drift-rhq/pom.xml | 2 modules/enterprise/server/plugins/filetemplate-bundle/pom.xml | 2 modules/enterprise/server/plugins/jboss-software/pom.xml | 2 modules/enterprise/server/plugins/packagetype-cli/pom.xml | 4 modules/enterprise/server/plugins/pom.xml | 2 modules/enterprise/server/plugins/url/pom.xml | 2 modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml | 2 modules/enterprise/server/plugins/yum/pom.xml | 2 modules/enterprise/server/pom.xml | 2 modules/enterprise/server/safe-invoker/pom.xml | 2 modules/enterprise/server/sars/agent-sar/pom.xml | 2 modules/enterprise/server/sars/pom.xml | 2 modules/enterprise/server/sars/services-sar/pom.xml | 2 modules/enterprise/server/xml-schemas/pom.xml | 2 modules/helpers/bundleGen/pom.xml | 4 modules/helpers/jeeGen/pom.xml | 2 modules/helpers/perftest-support/pom.xml | 4 modules/helpers/pom.xml | 2 modules/helpers/rest-docs-generator/pom.xml | 2 modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java | 79 + modules/helpers/rtfilter-subsystem/pom.xml | 2 modules/helpers/rtfilter/pom.xml | 2 modules/integration-tests/apache-plugin-test/pom.xml | 2 modules/integration-tests/jndi-access/jndi-access-test/pom.xml | 2 modules/integration-tests/jndi-access/pom.xml | 2 modules/integration-tests/jndi-access/remote-server/pom.xml | 2 modules/integration-tests/pom.xml | 2 modules/plugins/aliases/pom.xml | 2 modules/plugins/ant-bundle/pom.xml | 2 modules/plugins/apache/pom.xml | 2 modules/plugins/augeas/pom.xml | 2 modules/plugins/byteman/pom.xml | 2 modules/plugins/cobbler/pom.xml | 2 modules/plugins/cron/pom.xml | 2 modules/plugins/database/intentional-api-changes-since-4.4.0.xml | 14 modules/plugins/database/pom.xml | 2 modules/plugins/filetemplate-bundle/pom.xml | 2 modules/plugins/grub/pom.xml | 2 modules/plugins/hadoop/pom.xml | 2 modules/plugins/hibernate/pom.xml | 2 modules/plugins/hosts/pom.xml | 2 modules/plugins/hudson/pom.xml | 4 modules/plugins/iis/pom.xml | 2 modules/plugins/irc/pom.xml | 2 modules/plugins/jboss-as-5/intentional-api-changes-since-4.4.0.xml | 16 modules/plugins/jboss-as-5/pom.xml | 2 modules/plugins/jboss-as-7/pom.xml | 2 modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java | 10 modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java | 2 modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java | 10 modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ResourcesDomainServerTest.java | 139 + modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java | 46 modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/ResourcesStandaloneServerTest.java | 2 modules/plugins/jboss-as/pom.xml | 2 modules/plugins/jboss-cache-v3/pom.xml | 2 modules/plugins/jboss-cache/pom.xml | 2 modules/plugins/jmx/pom.xml | 2 modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/JMXDiscoveryComponent.java | 95 - modules/plugins/kickstart/pom.xml | 2 modules/plugins/mod-cluster/pom.xml | 2 modules/plugins/mysql/pom.xml | 2 modules/plugins/netservices/pom.xml | 2 modules/plugins/noop/pom.xml | 2 modules/plugins/oracle/pom.xml | 2 modules/plugins/pattern-generator/pom.xml | 2 modules/plugins/perftest/pom.xml | 2 modules/plugins/platform/pom.xml | 2 modules/plugins/pom.xml | 2 modules/plugins/postfix/pom.xml | 2 modules/plugins/postgres/pom.xml | 2 modules/plugins/rhq-agent/pom.xml | 2 modules/plugins/rhq-server/pom.xml | 2 modules/plugins/samba/pom.xml | 2 modules/plugins/script/pom.xml | 2 modules/plugins/script2/pom.xml | 2 modules/plugins/snmptrapd/pom.xml | 2 modules/plugins/sshd/pom.xml | 2 modules/plugins/sudoers/pom.xml | 2 modules/plugins/tomcat/pom.xml | 2 modules/plugins/twitter/pom.xml | 2 modules/plugins/validate-all-plugins/pom.xml | 2 modules/plugins/virt/pom.xml | 2 modules/pom.xml | 2 modules/test-utils/pom.xml | 2 pom.xml | 14 194 files changed, 2052 insertions(+), 2506 deletions(-)
New commits: commit cf51e4767c4b7cf79e24b8b3a455018f1a703905 Author: Jay Shaughnessy jshaughn@jshaughn.csb Date: Tue Sep 25 17:27:31 2012 -0400
Bump up the version on our new common module, it didn't get done by the merge since it doesn't exist in master.
diff --git a/modules/common/jboss-as-dmr-client/pom.xml b/modules/common/jboss-as-dmr-client/pom.xml index 9029a22..ce49b96 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>rhq-jboss-as-dmr-client</artifactId>
commit 2dd0e973490160b481a4e1598836df266f63f88d Merge: b486b55 820f0bb Author: Jay Shaughnessy jshaughn@jshaughn.csb Date: Tue Sep 25 17:11:15 2012 -0400
Merge branch 'rhq-on-as7' of ssh://git.fedorahosted.org/git/rhq/rhq into rhq-on-as7
commit b486b55969ec302b5b0be7716133c704c5c30772 Merge: 1252ba6 d41955c Author: Jay Shaughnessy jshaughn@jshaughn.csb Date: Tue Sep 25 17:05:41 2012 -0400
Merge branch 'master' into rhq-on-as7
Conflicts: .classpath modules/enterprise/gui/base-perspective-jar/pom.xml modules/enterprise/gui/base-perspective-war/pom.xml modules/enterprise/gui/pom.xml modules/enterprise/remoting/pom.xml modules/enterprise/remoting/webservices/pom.xml modules/enterprise/server/ear/pom.xml modules/enterprise/server/jar/pom.xml modules/enterprise/server/plugins/perspectives/core/pom.xml modules/enterprise/server/sars/services-sar/pom.xml
diff --cc modules/enterprise/server/ear/pom.xml index 6acb260,dc5f82a..7dce398 --- a/modules/enterprise/server/ear/pom.xml +++ b/modules/enterprise/server/ear/pom.xml @@@ -1,363 -1,592 +1,363 @@@ <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> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.6.0-SNAPSHOT</version> - <relativePath>../../../../pom.xml</relativePath> - </parent> - - <artifactId>rhq-enterprise-server-ear</artifactId> - <packaging>ear</packaging> - - <name>RHQ Enterprise Server EAR</name> - <description>RHQ enterprise server EAR</description> - - <properties> - <earDirectory>${project.build.directory}/${project.build.finalName}</earDirectory> - - <!-- dependency versions --> - <seam.version>1.2.1.GA</seam.version> - </properties> - - <dependencies> - - <!-- Internal Deps --> - - <!-- ** EJB-JARs --> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server</artifactId> - <version>${project.version}</version> - <type>ejb</type> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-domain</artifactId> - <version>${project.version}</version> - <type>ejb</type> - </dependency> - - <!-- ** WARs --> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-portal</artifactId> - <version>${project.version}</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-coregui</artifactId> - <version>${project.version}</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-content_http</artifactId> - <version>${project.version}</version> - <type>war</type> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-rest</artifactId> - <version>${project.version}</version> - <type>war</type> - </dependency> - - <!-- ** SARs --> - <!-- - <dependency> <groupId>org.rhq</groupId> <artifactId>rhq-enterprise-server-agent-sar</artifactId> - <version>${project.version}</version> <type>sar</type> </dependency> - --> - - <!-- ** JARs --> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-script-bindings</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-domain</artifactId> - </exclusion> - <exclusion> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-scripting-javascript</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-server-client-api</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>org.rhq</groupId> - <artifactId>rhq-container-lib</artifactId> - </exclusion> - <exclusion> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server</artifactId> - </exclusion> - </exclusions> - </dependency> - - <!-- 3rd Party Deps --> - - <!-- ** WARs --> - - <dependency> - <groupId>jboss</groupId> - <artifactId>jboss-remoting-servlet-invoker</artifactId> - <version>2x.r3040.jon</version> - <type>war</type> - </dependency> - - <!-- ** JARs --> - - <dependency> - <groupId>postgresql</groupId> - <artifactId>postgresql</artifactId> - <version>${postgresql.version}</version> - <scope>provided</scope> - </dependency> - <!-- - <dependency> <groupId>jboss</groupId> <artifactId>jboss-seam</artifactId> <version>${seam.version}</version> - </dependency> - --> - - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jaxrs</artifactId> - <version>${resteasy.version}</version> - <scope>jar</scope> - <exclusions> - <exclusion> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </exclusion> - <exclusion> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jackson-provider</artifactId> - <version>${resteasy.version}</version> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-links</artifactId> - <version>${resteasy.version}</version> - </dependency> - <dependency> - <groupId>org.freemarker</groupId> - <artifactId>freemarker</artifactId> - <version>${freemarker.version}</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-yaml-provider</artifactId> - <version>${resteasy.version}</version> - </dependency> - <dependency> - <groupId>org.yaml</groupId> - <artifactId>snakeyaml</artifactId> - <version>1.8</version> - </dependency> - <dependency> - <groupId>org.jboss.resteasy</groupId> - <artifactId>resteasy-jaxb-provider</artifactId> - <version>${resteasy.version}</version> - <exclusions> - <exclusion> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.xml.stream</groupId> - <artifactId>sjsxp</artifactId> - </exclusion> - </exclusions> - </dependency> - - - </dependencies> - - <build> - - <finalName>rhq</finalName> - - <resources> - - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - - </resources> - - <plugins> - - <plugin> - <artifactId>maven-ear-plugin</artifactId> - <configuration> - <displayName>RHQ</displayName> - <workDirectory>${earDirectory}</workDirectory> - <resourcesDir>${basedir}/target/classes</resourcesDir> - <defaultJavaBundleDir>lib</defaultJavaBundleDir> - <unpackTypes>war,ejb,sar</unpackTypes> - - <modules> - - <!-- ** WARs --> - - <webModule> - <groupId>org.rhq</groupId> - <artifactId>rhq-coregui</artifactId> - <bundleFileName>coregui.war</bundleFileName> - <contextRoot>/coregui</contextRoot> - </webModule> - - <webModule> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-portal</artifactId> - <bundleFileName>rhq-portal.war</bundleFileName> - <contextRoot>/</contextRoot> - </webModule> - - <!-- used to expose content through http --> - <webModule> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-content_http</artifactId> - <excluded>${exclude-content_http}</excluded> - <bundleFileName>rhq-content_http.war</bundleFileName> - <contextRoot>/content</contextRoot> - </webModule> - - <webModule> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-rest</artifactId> - <bundleFileName>rhq-rest.war</bundleFileName> - <contextRoot>/rest</contextRoot> - </webModule> - <!-- ** EJB-JARs --> - - <ejbModule> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-enterprise-server</artifactId> - <bundleFileName>rhq-enterprise-server-ejb3.jar</bundleFileName> - </ejbModule> - - <ejbModule> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-core-domain</artifactId> - <bundleFileName>rhq-core-domain-ejb3.jar</bundleFileName> - </ejbModule> - - <!-- ** SARs --> - <!-- - <sarModule> <groupId>${project.groupId}</groupId> - <artifactId>rhq-enterprise-server-agent-sar</artifactId> - <bundleFileName>rhq-agent.sar</bundleFileName> </sarModule> - --> - - <!-- ** JARs --> - - <!-- - <jarModule> <groupId>jboss</groupId> <artifactId>jboss-seam</artifactId> <bundleDir>lib</bundleDir> - <includeInApplicationXml>true</includeInApplicationXml> </jarModule> - --> - </modules> - </configuration> - </plugin> - - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - - <execution> - <id>copy-core-agent-plugins</id> - <phase>process-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-platform-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-agent-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-jmx-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> - </artifactItems> - <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory> - </configuration> - </execution> - - <execution> - <id>copy-core-server-plugins</id> - <phase>process-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-disk</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-url</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-yum</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-perspective</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq.server</groupId> - <artifactId>alert-email</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-irc</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-mobicents</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-microblog</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-operations</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-roles</artifactId> - <version>${project.version}</version> - </artifactItem> - -<!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-scriptlang</artifactId> - <version>${project.version}</version> - </artifactItem> ---> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-snmp</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-subject</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>alert-cli</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>packagetype-cli</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-drift</artifactId> - <version>${project.version}</version> - </artifactItem> - - </artifactItems> - <outputDirectory>${earDirectory}/rhq-serverplugins</outputDirectory> - </configuration> - </execution> - - </executions> - </plugin> - </plugins> - </build> - - <profiles> - - <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ --> - <profile> - <id>bundle-additional-script-languages</id> - <activation> - <property> - <!-- we want this always active but activeByDefault doesn't work --> - <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html --> - <name>java.home</name> - </property> - </activation> - - <dependencies> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-scripting-python</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </profile> - - <profile> - <id>bundle-plugins</id> - <activation> - <property> - <name>java.home</name> - </property> - </activation> - - <build> - <plugins> - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - - <execution> - <id>copy-bundle-agent-plugins</id> - <phase>process-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-ant-bundle-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-filetemplate-bundle-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> - </artifactItems> - - <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory> - </configuration> - </execution> - - <execution> - <id>copy-bundle-server-plugins</id> - <phase>process-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-ant-bundle</artifactId> - <version>${project.version}</version> - </artifactItem> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-serverplugin-filetemplate-bundle</artifactId> - <version>${project.version}</version> - </artifactItem> - </artifactItems> - - <outputDirectory>${earDirectory}/rhq-serverplugins</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - - <profile> - <id>jboss-plugins</id> - <activation> - <property> - <name>java.home</name> - </property> - </activation> - - <build> - <plugins> - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - - <execution> - <id>copy-jboss-plugins</id> - <phase>process-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - - <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-augeas-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> + <modelVersion>4.0.0</modelVersion>
+ <parent> + <groupId>org.rhq</groupId> + <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> ++ <version>4.6.0-SNAPSHOT</version> + <relativePath>../../../../pom.xml</relativePath> + </parent> + + <artifactId>rhq-enterprise-server-ear</artifactId> + <packaging>ear</packaging> + + <name>RHQ Enterprise Server EAR</name> + <description>RHQ enterprise server EAR</description> + + <properties> + <earDirectory>${project.build.directory}/${project.build.finalName}</earDirectory> + </properties> + + <dependencies> + + <!-- Internal Deps --> + + <!-- ** EJB-JARs --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server</artifactId> + <version>${project.version}</version> + <type>ejb</type> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-core-domain</artifactId> + <version>${project.version}</version> + <type>ejb</type> + </dependency> + + <!-- ** WARs --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-portal</artifactId> + <version>${project.version}</version> + <type>war</type> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-coregui</artifactId> + <version>${project.version}</version> + <type>war</type> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-rest</artifactId> + <version>${project.version}</version> + <type>war</type> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-content_http</artifactId> + <version>${project.version}</version> + <type>war</type> + </dependency> + + <!-- ** SARs --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-services-sar</artifactId> + <version>${project.version}</version> + <type>sar</type> + </dependency> + + <!-- + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-agent-sar</artifactId> + <version>${project.version}</version> + <type>sar</type> + </dependency> + --> + + <!-- ** JARs --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-script-bindings</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-core-domain</artifactId> + </exclusion> + <exclusion> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + </exclusion> + <exclusion> + <groupId>org.javassist</groupId> + <artifactId>javassist</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-scripting-javascript</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-server-client-api</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-container-lib</artifactId> + </exclusion> + <exclusion> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-comm</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.jboss</groupId> + <artifactId>jboss-common-core</artifactId> + </exclusion> + </exclusions> + </dependency> + + <!-- 3rd Party Deps --> + + <!-- ** WARs --> + <dependency> + <groupId>jboss</groupId> + <artifactId>jboss-remoting-servlet-invoker</artifactId> + <version>2x.r3040.jon</version> + <type>war</type> + </dependency> + + <!-- ** JARs --> + <dependency> + <groupId>org.opensymphony.quartz</groupId> + <artifactId>quartz</artifactId> + <version>${quartz.version}</version> + </dependency> + + <dependency> + <groupId>org.opensymphony.quartz</groupId> + <artifactId>quartz-oracle</artifactId> + <version>${quartz.version}</version> + </dependency> + + <dependency> + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>${postgresql.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-jaxrs</artifactId> + <version>${resteasy.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-jackson-provider</artifactId> + <version>${resteasy.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-links</artifactId> + <version>${resteasy.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.freemarker</groupId> + <artifactId>freemarker</artifactId> + <version>${freemarker.version}</version> + </dependency> + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-yaml-provider</artifactId> + <version>${resteasy.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + <version>1.8</version> + <scope>provided</scope> + + </dependency> + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-jaxb-provider</artifactId> + <version>${resteasy.version}</version> + <scope>provided</scope> + </dependency> + + </dependencies> + + <build> + <finalName>rhq</finalName> + + <plugins> + + <plugin> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + <version>6</version> <!-- version of the generated application.xml --> + <displayName>RHQ</displayName> + <workDirectory>${earDirectory}</workDirectory> + <filtering>true</filtering> + <defaultJavaBundleDir>lib</defaultJavaBundleDir> + <unpackTypes>war,ejb</unpackTypes> + <modules> + <!-- ** WARs --> + <webModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-coregui</artifactId> + <bundleFileName>coregui.war</bundleFileName> + <contextRoot>/coregui</contextRoot> + </webModule> + + <webModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-portal</artifactId> + <bundleFileName>rhq-portal.war</bundleFileName> + <contextRoot>/</contextRoot> + </webModule> + + <!-- used to expose content through http --> + <webModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-content_http</artifactId> + <excluded>${exclude-content_http}</excluded> + <bundleFileName>rhq-content_http.war</bundleFileName> + <contextRoot>/content</contextRoot> + </webModule> + + <webModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-rest</artifactId> + <bundleFileName>rhq-rest.war</bundleFileName> + <contextRoot>/rest</contextRoot> + </webModule> + + <!-- ** EJB-JARs --> + <ejbModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server</artifactId> + <bundleFileName>rhq-enterprise-server-ejb3.jar</bundleFileName> + </ejbModule> + + <ejbClientModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server</artifactId> + <excluded>true</excluded> + </ejbClientModule> + + <ejbModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-core-domain</artifactId> + <bundleFileName>rhq-core-domain-ejb3.jar</bundleFileName> + </ejbModule> + + <!-- ** SARs --> + + <!-- AS7 allows for SARs embedded in an EAR without anything in application.xml --> + <!-- see https://issues.jboss.org/browse/AS7-1248 --> + <!-- The Maven ear plugin has a bug that causes SARs to be marked as <connector> modules --> + <!-- and there is no way to tell it not to put the SAR in the application.xml so we have --> + <!-- to do things with SARs separately using another maven plugin below --> + <sarModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-services-sar</artifactId> + <bundleFileName>rhq-services.sar</bundleFileName> + <excluded>true</excluded> + </sarModule> + + <!-- + <sarModule> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-agent-sar</artifactId> + <bundleFileName>rhq-agent.sar</bundleFileName> + <excluded>true</excluded> + </sarModule> + --> + + <!-- ** JARs --> + + </modules> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + + <execution> + <id>copy-sars</id> + <phase>process-resources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> <artifactItem> - <groupId>org.rhq</groupId> - <artifactId>rhq-apache-plugin</artifactId> - <version>${project.version}</version> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-services-sar</artifactId> + <version>${project.version}</version> + <type>sar</type> </artifactItem>
+ <!-- <artifactItem> - <groupId>org.jboss.on</groupId> - <artifactId>jopr-tomcat-plugin</artifactId> - <version>${project.version}</version> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-enterprise-server-agent-sar</artifactId> + <version>${project.version}</version> + <type>sar</type> </artifactItem> + -->
- <artifactItem> - <groupId>org.jboss.on</groupId> - <artifactId>jopr-jboss-as-plugin</artifactId> - <version>${project.version}</version> - </artifactItem> + </artifactItems> + <outputDirectory>${earDirectory}</outputDirectory> + <stripVersion>true</stripVersion> + </configuration> + </execution>
+ <execution> + <id>copy-core-agent-plugins</id> + <phase>process-resources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> <artifactItem> - <groupId>org.jboss.on</groupId> - <artifactId>jopr-hibernate-plugin</artifactId> - <version>${project.version}</version> + <groupId>${project.groupId}</groupId> + <artifactId>rhq-platform-plugin</artifactId> + <version>${project.version}</version> </artifactItem>
<artifactItem> diff --cc modules/enterprise/server/sars/services-sar/pom.xml index a66aa8a,0000000..2bed88f mode 100644,000000..100644 --- a/modules/enterprise/server/sars/services-sar/pom.xml +++ b/modules/enterprise/server/sars/services-sar/pom.xml @@@ -1,116 -1,0 +1,116 @@@ +<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> + + <parent> + <groupId>org.rhq</groupId> + <artifactId>rhq-enterprise-server-sars-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> ++ <version>4.6.0-SNAPSHOT</version> + </parent> + + <groupId>org.rhq</groupId> + <artifactId>rhq-enterprise-server-services-sar</artifactId> + <packaging>jboss-sar</packaging> + + <name>RHQ Enterprise Server Internal Services SAR</name> + <description>The SAR that provides the server with some necessary internal RHQ services.</description> + + <properties> + <sarDirectory>${project.build.directory}/${project.build.finalName}</sarDirectory> + </properties> + + <build> + <finalName>rhq-enterprise-server-services-sar</finalName> + + <!-- we don't need this right now - only if we need deps stored in the sar META-INF/lib/ will we need this --> + <!-- NOTE: extensions=true below allows Maven to grok the jboss-sar packaging type --> + <!-- + <plugins> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jboss-packaging-maven-plugin</artifactId> + <version>1.9.99</version> + <extensions>true</extensions> + <configuration> + <libDirectory>${sarDirectory}/META-INF/lib</libDirectory> + </configuration> + </plugin> + + </plugins> + --> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + </build> + + <profiles> + + <profile> + <id>dev</id> + + <properties> + <rhq.rootDir>../../../../..</rhq.rootDir> + <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir> + <rhq.deploymentName>${project.build.finalName}.sar</rhq.deploymentName> + <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir> + </properties> + + <build> + <plugins> + + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + + <execution> + <id>deploy</id> + <phase>package</phase> + <configuration> + <target> + <property name="deployment.dir" location="${rhq.deploymentDir}" /> + <echo>*** Copying updated files + from + target${file.separator}classes${file.separator} + to + ${deployment.dir}${file.separator}...</echo> + <jar destfile="${deployment.dir}"> + <fileset dir="target/${project.build.finalName}" /> + </jar> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + + <execution> + <id>undeploy</id> + <phase>clean</phase> + <configuration> + <target> + <property name="deployment.dir" location="${rhq.deploymentDir}" /> + <echo>*** Deleting ${deployment.dir}${file.separator}...</echo> + <delete file="${deployment.dir}" /> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + + </executions> + </plugin> + + </plugins> + </build> + + </profile> + + </profiles> + +</project>
commit d41955c0175c795668d8e51ea7b742453a30b5ee Author: Lukas Krejci lkrejci@redhat.com Date: Mon Sep 24 16:44:28 2012 +0200
[BZ 859982] - Resetting the custom blur event handling before and after a popup dialog is shown in the configuration editor. This prevents unhandled errors when for example entering an entry into the list of maps multiple times.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java index 5687ded..bfddfcc 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java @@ -1727,6 +1727,10 @@ public class ConfigurationEditor extends LocatableVLayout { summaryTable.redraw(); }
+ //reset the custom blur event handling - we're destroying the new form here + blurUnsetItem = null; + blurValueItem = null; + layout.destroy(); popup.destroy(); } @@ -1755,6 +1759,10 @@ public class ConfigurationEditor extends LocatableVLayout { buttonBar.addMember(cancelButton); }
+ //reset the custom blur event handling - we're creating a new form here + blurUnsetItem = null; + blurValueItem = null; + layout.addMember(buttonBar); popup.addItem(layout); popup.show();
commit 9e966129a566562bba0e6e0db8b5c0f7e029c29b Author: Heiko W. Rupp hwr@redhat.com Date: Tue Sep 25 10:31:58 2012 +0200
Remove to-be-removed webservices from the build.
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml index 6de50d0..9c2f61d 100644 --- a/modules/enterprise/remoting/pom.xml +++ b/modules/enterprise/remoting/pom.xml @@ -29,11 +29,12 @@ <jdk>1.6</jdk> </activation>
- <modules> + <modules> <module>cli</module> </modules> </profile>
+<!-- <profile> <id>enterprise</id>
@@ -47,6 +48,7 @@ <module>webservices</module> </modules> </profile> +-->
</profiles>
commit 0b3703348583e70aa53cbaea9a4661a2fde49e1f Author: Heiko W. Rupp hwr@redhat.com Date: Tue Sep 25 10:30:03 2012 +0200
Add a script that creates a confluence-version of the git shortlog between two tags. Includes a mapping file for committers and their multiple accounts they commit from.
diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..67f51f8 --- /dev/null +++ b/.mailmap @@ -0,0 +1,74 @@ +Adam Young ayoung@redhat.com +Asaf Shakarchi ashakarc@redhat.com +Bryan Kearney bkearney@redhat.com bkearney@localhost.localdomain +Charles Crouch ccrouch@redhat.com +Denis Krusko kruskod@gmail.com +Devan Goodwin dgoodwin@redhat.com +Elias Ross elias_ross@apple.com +Elias Ross elias_ross@apple.com genman@noderunner.net +Fady Matar fmatar@redhat.com +Filip Drabek fdrabek@redhat.com fdrabek@dhcp-lab-136.englab.brq.redhat.com +Fusayuki Minamoto fminamot@redhat.com +Galder Zamarreno rnd@zamarreno.com +Greg Hinkle ghinkle@redhat.com +Heiko W. Rupp hwr@redhat.com <hrupp@snert.(none)> +Heiko W. Rupp hwr@redhat.com hwr@pilhuhn.de +Heiko W. Rupp hwr@redhat.com hrupp@pintsize.home.pilhuhn.de +Heiko W. Rupp hwr@redhat.com pilhuhn@fedorapeople.org +Heiko W. Rupp hwr@redhat.com pilhuhn@fedoraproject.org +Heiko W. Rupp hwr@redhat.com hrupp@redhat.com +Heiko W. Rupp hwr@redhat.com +Hudson jboss-qa-internal@redhat.com +Ian P. Springer ian.springer@redhat.com <ips@jetengine.(none)> +Ian P. Springer ian.springer@redhat.com ips@jetengine.springer.net +Ian P. Springer ian.springer@redhat.com ispringe@redhat.com +Ian P. Springer ian.springer@redhat.com <ips@.(none)> +Ian P. Springer ian.springer@redhat.com ips@fedoraproject.org +James Livingston jlivings@redhat.com +Jan Martiška jmartisk@redhat.com +Jason Dobies jason.dobies@redhat.com jdobies@redhat.com +Jay Shaughnessy jshaughn@redhat.com +Jay Shaughnessy jshaughn@redhat.com jshaughnessy@jshaughnessy-PC +Jay Shaughnessy jshaughn@redhat.com <jshaughnessy@.(none)> +Jeff Ortel jortel@redhat.com +Jessica Sant jsant@redhat.com +Jijun Liu lxjijun@gmail.com +Jirka Kremser jkremser@redhat.com <jkremser@jkremser-tp520.(none)> +Jirka Kremser jkremser@redhat.com +John Matthews jmatthews@redhat.com +John Mazzitelli mazz@redhat.com +John Sanda jsanda@redhat.com john@John-Sandas-iMac.local +John Sanda jsanda@redhat.com jsanda@localhost.localdomain +John Sanda jsanda@redhat.com jsanda@Johns-MacBook-Pro.local +John Sanda jsanda@redhat.com john@localhost.localdomain +John Sanda jsanda@redhat.com +Joseph Marques jmarques@redhat.com joseph@redhat.com +Justin Harris jharris@redhat.com +Larry O'Leary loleary@redhat.com +Lukas Krejci lkrejci@redhat.com +Mark Spritzler mspritzl@redhat.com +Mattias Nilsson Grip matn@redpill-linpro.com +Mike McCune mmccune@gibson.pdx.redhat.com +Mike Thompson mithomps@redhat.com +Mike Thompson mithomps@redhat.com mikecthompson@gmail.com +Mohamed Hamza Ben Mansour <> +Noam Malki nmalki@redhat.com +Partha Aji paji@redhat.com +Pradeep Kilambi pkilambi@redhat.com +Rafael Soares rafaelcba@gmail.com rsoares@redhat.com +Richard Hensman richard@onevisionconsulting.co.uk +Robert Buck buck.robert.j@gmail.com rbuck@redhat.com +Sayli Karmarkar skarmark@redhat.com +Shannon Hughes shughes@redhat.com shughes@scooby.rdu.redhat.com +Shannon Hughes shughes@redhat.com shughes@fred.hughes.lan +Simeon Pinder spinder@redhat.com simeonpinder@gmail.com +Simeon Pinder spinder@redhat.com spinder@cacaphonix.conchfritter.com +Simeon Pinder spinder@redhat.com spinder@fulliautomatix.conchfritter.com +Simeon Pinder spinder@redhat.com +Stefan Negrea snegrea@redhat.com +Steve Millidge smillidge@c2b2.co.uk +Ted Won 원종석 tedd824@gmail.com +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 +hudson auto wnstb@yahoo.com diff --git a/etc/scripts/createRelasenotes.pl b/etc/scripts/createRelasenotes.pl new file mode 100644 index 0000000..7984d8f --- /dev/null +++ b/etc/scripts/createRelasenotes.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +# +# Small script to create release notes from the git short log. +# Parameters are old and new tag. If the new tag is omitted, +# HEAD is used +# +# Output of the script can be pasted into the markup +# release notes of confluence +# +# Sample command line: +# $ perl etc/scripts/createRelasenotes.pl RHQ_4_4_0 RHQ_4_5_0 +# +# Author: Heiko W. Rupp +# + + +die "Usage createReleasenotes FROM_TAG [TO_TAG]" unless $#ARGV>-1; +$OLD_TAG=$ARGV[0]; +$TO_TAG=$ARGV[1]; + +$COMMAND="git shortlog -e $OLD_TAG..$TO_TAG |"; + +open(GIT,$COMMAND); + +while(<GIT>) { + +# print "IN: ", $_; + next if /^$/; + s/^[\s[]*BZ\s([0-9]{5,7})(]? .*)$/ [BZ $1|https://bugzilla.redhat.com/show_bug.cgi?id=$1] $2/; + s/^[\s[]*Bug\s([0-9]{5,7})(]? .*)$/ [BZ $1|https://bugzilla.redhat.com/show_bug.cgi?id=$1] $2/; + if (/ .*/) { + s/^ (.*)/** $1/; + } else { + s/(.*)/* $1/; + } + print $_; +}
commit a12de7e6234039a99b68497505fe350bceda7eed Author: Heiko W. Rupp hwr@redhat.com Date: Tue Sep 25 10:26:16 2012 +0200
Remove unused webdav source code.
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml index ba83687..985ae9d 100644 --- a/modules/enterprise/gui/pom.xml +++ b/modules/enterprise/gui/pom.xml @@ -31,7 +31,6 @@ <module>installer-war</module> <module>base-perspective-jar</module> <module>base-perspective-war</module> - <!--<module>webdav-war</module>--> <module>content_http-war</module> <module>coregui</module> <module>rest-war</module> diff --git a/modules/enterprise/gui/webdav-war/pom.xml b/modules/enterprise/gui/webdav-war/pom.xml deleted file mode 100644 index 3ab00df..0000000 --- a/modules/enterprise/gui/webdav-war/pom.xml +++ /dev/null @@ -1,286 +0,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> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - <relativePath>../../../../pom.xml</relativePath> - </parent> - - <artifactId>rhq-webdav</artifactId> - <packaging>war</packaging> - - <name>RHQ Enterprise WebDav</name> - <description>The RHQ WebDav inventory access</description> - - <dependencies> - - <!-- Internal Deps --> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-domain</artifactId> - <version>${project.version}</version> - <scope>provided</scope> <!-- by rhq.ear (as ejb-jar) --> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-gui</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server</artifactId> - <version>${project.version}</version> - <scope>provided</scope> <!-- by rhq.ear (as ejb-jar) --> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-util</artifactId> - <version>${project.version}</version> - <scope>provided</scope> <!-- by rhq.ear --> - </dependency> - - <!-- 3rd Party Deps --> - <dependency> - <groupId>com.ettrema</groupId> - <artifactId>milton-api</artifactId> - <version>1.4.1</version> - </dependency> - - <dependency> - <groupId>com.ettrema</groupId> - <artifactId>milton-servlet</artifactId> - <version>1.4.1</version> - </dependency> - - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-jdk14</artifactId> - <version>1.4.3</version> - </dependency> - - - <dependency> - <groupId>hibernate</groupId> - <artifactId>hibernate3</artifactId> - <!-- NOTE: The version is defined in the root POM's dependencyManagement section. --> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <!-- used by a test JSP --> - <dependency> - <groupId>hibernate-entitymanager</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <!-- NOTE: The version is defined in the root POM's dependencyManagement section. --> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <!-- needed for referenced domain entities that use Hibernate annotations (due to JDK5 bug) --> - <dependency> - <groupId>hibernate-annotations</groupId> - <artifactId>hibernate-annotations</artifactId> - <!-- NOTE: The version is defined in the root POM's dependencyManagement section. --> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - - <!-- needed for referenced domain entities that use JPA annotations (due to JDK5 bug) --> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0</version> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jstl</artifactId> - <version>1.1.2</version> - </dependency> - - <!-- needed for EJB3 annotations (e.g. ApplicationException) --> - <dependency> - <groupId>jboss</groupId> - <artifactId>jboss-ejb3x</artifactId> - <!-- NOTE: The version is defined in the root POM's dependencyManagement section. --> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <dependency> - <groupId>jboss</groupId> - <artifactId>jboss-j2ee</artifactId> - <!-- NOTE: The version is defined in the root POM's dependencyManagement section. --> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - - - - - - - <dependency> - <groupId>commons-fileupload</groupId> - <artifactId>commons-fileupload</artifactId> - <version>1.2</version> - </dependency> - - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>3.0.1</version> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.3.1</version> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.0.4</version> - <scope>provided</scope> <!-- by JBossAS --> - </dependency> - - <dependency> - <groupId>commons-validator</groupId> - <artifactId>commons-validator</artifactId> - <version>1.1.4</version> - </dependency> - - </dependencies> - - <build> - <finalName>rhq-webdav</finalName> - <plugins> - - <plugin> - <artifactId>maven-war-plugin</artifactId> - <version>2.1-alpha-1</version> - <configuration> - <archive> - <manifest> - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - </manifest> - <manifestEntries> - <Build-Number>${buildNumber}</Build-Number> - </manifestEntries> - </archive> - <webResources> - <resource> - <filtering>false</filtering> - <directory>${basedir}/src/main/webapp</directory> - </resource> - </webResources> - </configuration> - </plugin> - - </plugins> - - </build> - - <profiles> - - <profile> - <id>dev</id> - - <properties> - <rhq.rootDir>../../../..</rhq.rootDir> - <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir> - <rhq.deploymentName>${project.build.finalName}.war</rhq.deploymentName> - <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/${rhq.deploymentName}</rhq.deploymentDir> - </properties> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>deploy-classes</id> - <phase>compile</phase> - <configuration> - <target> - <property name="classes.dir" location="${rhq.deploymentDir}/WEB-INF/classes" /> - <echo>*** Copying updated files from target/classes to ${classes.dir}...</echo> - <copy todir="${classes.dir}" verbose="${rhq.verbose}"> - <fileset dir="target/classes" /> - </copy> - <property name="deployment.dir" location="${rhq.deploymentDir}" /> - <echo>*** Copying updated files from src${file.separator}main${file.separator}webapp${file.separator} to ${deployment.dir}${file.separator}...</echo> - <copy todir="${deployment.dir}" verbose="${rhq.verbose}"> - <fileset dir="${basedir}/src/main/webapp" /> - </copy> - <!-- TODO: Also copy the files from src/main/webapp-filtered/, and then filter them ourselves. --> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>deploy</id> - <phase>package</phase> - <configuration> - <target> - <property name="deployment.dir" location="${rhq.deploymentDir}" /> - <echo>*** Copying updated files from target${file.separator}${project.build.finalName}${file.separator} to ${deployment.dir}${file.separator}...</echo> - <copy todir="${deployment.dir}" verbose="${rhq.verbose}"> - <fileset dir="${basedir}/target/${project.build.finalName}" /> - </copy> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>undeploy</id> - <phase>clean</phase> - <configuration> - <target> - <property name="deployment.dir" location="${rhq.deploymentDir}" /> - <echo>*** Deleting ${deployment.dir}${file.separator}...</echo> - <delete dir="${deployment.dir}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - </executions> - </plugin> - - </plugins> - </build> - </profile> - - </profiles> - - <repositories> - <repository> - <id>ettrema</id> - <url>http://www.ettrema.com/maven2</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - -</project> diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java deleted file mode 100644 index 5a86620..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AuthenticatedCollectionResource.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.List; - -import com.bradmcevoy.http.CollectionResource; -import com.bradmcevoy.http.Resource; - -import org.rhq.core.domain.auth.Subject; - -/** - * This is the {@link CollectionResource} interface with an additional ability - * to obtain the collection given a specific subject. - * - * @author John Mazzitelli - */ -public interface AuthenticatedCollectionResource extends CollectionResource { - List<? extends Resource> getChildren(Subject subject); -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java deleted file mode 100644 index cb61cc42..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/Authenticator.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import javax.security.auth.login.LoginException; - -import com.bradmcevoy.http.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * Provides a utility object to perform user authentication. - * - * @author John Mazzitelli - */ -public class Authenticator { - private static final Log LOG = LogFactory.getLog(Authenticator.class); - - private Subject subject = null; - - public Authenticator(Subject subject) { - this.subject = subject; - } - - /** - * If the user has successfully authenticated himself, this will return the Subject for that login. - * If the user never logged in or failed to authenticate successfully, this will be <code>null</code>. - * - * @return the authenticated subject, or <code>null</code> if user is not authenticated - */ - public Subject getSubject() { - return this.subject; - } - - /** - * For those times when a user does not need to be authenticated to obtain data, use - * the overlord user, which provides full superuser authentication. - * - * @return the overlord user - */ - public Subject getOverlord() { - return LookupUtil.getSubjectManager().getOverlord(); - } - - /** - * Logs the user in with the given credentials. - * - * <i>This signature must match that of {@link Resource#authenticate(String, String)}</i> - * - * @param username - * @param password - * - * @return the {@link Subject} of the authenticated user - */ - public Object authenticate(String username, String password) { - try { - this.subject = LookupUtil.getSubjectManager().login(username, password); - LOG.debug("User [" + username + "] logged into the webdav server"); - } catch (LoginException e) { - LOG.warn("User [" + username + "] failed to log into the webdav server"); - this.subject = null; - } - return this.subject; - } - - /** - * Returns the security realm that the user must authenticate with. - * - * <i>This signature must match that of {@link Resource#getRealm()}</i> - * - * @return security realm name - */ - public String getRealm() { - return "Jopr Management Environment"; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java deleted file mode 100644 index 31eaf11..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/AvailabilityResource.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.Date; - -import com.bradmcevoy.http.PropFindableResource; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.measurement.Availability; -import org.rhq.core.domain.resource.Resource; -import org.rhq.enterprise.server.measurement.AvailabilityManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * The property to indicate if the resource is up or down. - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public class AvailabilityResource extends BasicResource implements PropFindableResource { - private Availability availability; - - public AvailabilityResource(Subject subject, Resource managedResource) { - super(subject, managedResource); - } - - public String getUniqueId() { - return "avail_" + getAvailability().getId(); - } - - public String getName() { - return "availability_is_" + getAvailability().getAvailabilityType().getName(); - } - - /** - * The modified date is that when the current availability took effect. - * This is the same as {@link #getCreateDate()}. - */ - public Date getModifiedDate() { - return getAvailability().getStartTime(); - } - - /** - * The created date is that when the current availability took effect. - * This is the same as {@link #getModifiedDate()}. - */ - public Date getCreateDate() { - return getModifiedDate(); - } - - private Availability getAvailability() { - if (this.availability == null) { - AvailabilityManagerLocal am = LookupUtil.getAvailabilityManager(); - this.availability = am.getCurrentAvailabilityForResource(getSubject(), getManagedResource().getId()); - } - return this.availability; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java deleted file mode 100644 index e21f026..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/BasicResource.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import com.bradmcevoy.http.Auth; -import com.bradmcevoy.http.PropFindableResource; -import com.bradmcevoy.http.Request; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.resource.Resource; -import org.rhq.enterprise.server.authz.AuthorizationManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * Represents a basic managed resource. Provides some hooks to the authentication subsystem to - * ensure the user is allowed to see the resource. - * - * @see ResourceFolder - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public abstract class BasicResource extends Authenticator implements PropFindableResource { - - private static final Log LOG = LogFactory.getLog(BasicResource.class); - - private final Resource managedResource; - - public BasicResource(Subject subject, Resource managedResource) { - super(subject); - - if (managedResource == null) { - throw new NullPointerException("managedResource == null"); - } - this.managedResource = managedResource; - } - - protected Resource getManagedResource() { - return this.managedResource; - } - - /** - * This implementation of authorise simply assures that the user has authenticated himself - * and the user is allowed to view the managed resource. Subclasses may wish to further - * restrict the authorization (e.g. deny access if the configuration of the resource - * is to be edited but the user is not allowed to change the configuration). - */ - public boolean authorise(Request request, Request.Method method, Auth auth) { - boolean authorized = false; - - if (auth != null) { - Subject subject = (Subject) auth.getTag(); - if (subject != null) { - AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager(); - authorized = authorizationManager.canViewResource(subject, getManagedResource().getId()); - } - - if (LOG.isDebugEnabled()) { - LOG.debug("BasicResource [" + getManagedResource() + "], auth=[" + auth.getTag() + "], isAuthorized=" - + authorized); - } - } - - return authorized; - } - - public String checkRedirect(Request request) { - return null; // no-op - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java deleted file mode 100644 index 1fc7ad5..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ConfigResource.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.io.ByteArrayOutputStream; -import java.util.Date; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.configuration.Configuration; -import org.rhq.core.domain.configuration.Property; -import org.rhq.core.domain.resource.Resource; -import org.rhq.enterprise.server.configuration.ConfigurationManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * Provides the resource configuration XML for a given resource. - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public class ConfigResource extends GetableBasicResource { - - private Configuration configuration; - private String content; - - public ConfigResource(Subject subject, Resource managedResource) { - super(subject, managedResource); - } - - public String getUniqueId() { - return "config_" + getConfiguration().getId(); - } - - public String getName() { - return "resource_configuration.xml"; - } - - /** - * The modified date is that of the last time the configuration changed. - */ - public Date getModifiedDate() { - return new Date(getConfiguration().getModifiedTime()); - } - - /** - * The creation date is that of the configuration itself, not of the managed resource. - */ - public Date getCreateDate() { - return new Date(getConfiguration().getCreatedTime()); - } - - protected String loadContent() { - if (this.content == null) { - try { - JAXBContext context = JAXBContext.newInstance(Configuration.class, Property.class); - Marshaller marshaller = context.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - marshaller.marshal(getConfiguration(), baos); - this.content = baos.toString(); - } catch (JAXBException e) { - throw new RuntimeException("Failed to translate configuration to XML", e); - } - } - return this.content; - } - - private Configuration getConfiguration() { - if (this.configuration == null) { - ConfigurationManagerLocal cm = LookupUtil.getConfigurationManager(); - this.configuration = cm.getResourceConfiguration(getManagedResource().getId()); - } - return this.configuration; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java deleted file mode 100644 index 870f52f..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/GetableBasicResource.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Map; - -import com.bradmcevoy.http.Auth; -import com.bradmcevoy.http.GetableResource; -import com.bradmcevoy.http.Range; -import com.bradmcevoy.http.exceptions.NotAuthorizedException; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.util.stream.StreamUtil; - -/** - * Extends the {@link BasicResource} by providing hooks to stream file content to the user. - * - * @author John Mazzitelli - */ -public abstract class GetableBasicResource extends BasicResource implements GetableResource { - - public GetableBasicResource(Subject subject, Resource managedResource) { - super(subject, managedResource); - } - - /** - * This implementation assumes the content will be of type "text/xml". - * Subclasses are free to override this behavior if they are returning content - * other than XML data. - */ - public String getContentType(String accepts) { - return "text/xml"; - } - - public Long getContentLength() { - return Long.valueOf(loadContent().length()); - } - - public void sendContent(OutputStream out, Range range, Map<String, String> params, String str) throws IOException, - NotAuthorizedException { - - byte[] bytes = loadContent().getBytes(); - long start = (range != null) ? range.getStart() : 0L; - long length = (range != null) ? ((range.getFinish() - start) + 1) : bytes.length; - - InputStream in = new ByteArrayInputStream(bytes); - StreamUtil.copy(in, out, start, length); - } - - /** - * This implementation assumes the user client should not cache the content. - * Subclasses are free to override this if they allow the content to be cached - * on the client side. - */ - public Long getMaxAgeSeconds(Auth auth) { - return Long.valueOf(0L); - } - - /** - * Subclasses must implement this to return the content as a String. Note that this really - * only supports small content since you don't want to load large files in memory. If you need - * content that is large, implement {@link GetableResource} directly; do not use this abstract class. - * - * @return the content as a string, must never be <code>null</code> - */ - protected abstract String loadContent(); -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java deleted file mode 100644 index 8f095b8..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/MeasurementDataResource.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.Date; -import java.util.List; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.measurement.DataType; -import org.rhq.core.domain.measurement.MeasurementSchedule; -import org.rhq.core.domain.measurement.ui.MetricDisplaySummary; -import org.rhq.core.domain.resource.Resource; -import org.rhq.enterprise.server.measurement.MeasurementChartsManagerLocal; -import org.rhq.enterprise.server.measurement.MeasurementPreferences; -import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal; -import org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricRangePreferences; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * The measurement data WebDAV resource that provides information on metrics of a managed resource. - * - * @author John Mazzitelli - */ -public class MeasurementDataResource extends GetableBasicResource { - - private String content; - private List<MetricDisplaySummary> measurements; - - public MeasurementDataResource(Subject subject, Resource managedResource) { - super(subject, managedResource); - } - - public String getUniqueId() { - return "metrics_" + getManagedResource().getId(); - } - - public String getName() { - return "measurement_data.xml"; - } - - /** - * We do not reply with any relevent date. The only way for a relevent date to - * be calculated is for us to actually query the database for the measurement data. - * To avoid querying the DB t(which is expensive), we simply return the current - * date, since the majority of the time, a new measurement collection interval - * will have triggered in the time the user took between getting the measurement data. - */ - public Date getModifiedDate() { - return new Date(); - } - - /** - * The created date is the date of the resource itself was created. - */ - public Date getCreateDate() { - return new Date(getManagedResource().getCtime()); - } - - protected String loadContent() { - if (this.content == null) { - StringBuilder str = new StringBuilder(); - str.append("<?xml version=\"1.0\"?>\n"); - str.append("<measurements>\n"); - for (MetricDisplaySummary meas : getMeasurements()) { - str.append(" <measurement>\n"); - str.append(" <name>").append(meas.getLabel()).append("</name>\n"); - str.append(" <description>").append(meas.getDescription()).append("</description>\n"); - str.append(" <alert-count>").append(meas.getAlertCount()).append("</alert-count>\n"); - str.append(" <min-value>").append(meas.getMinMetric().getValue()).append("</min-value>\n"); - str.append(" <max-value>").append(meas.getMaxMetric().getValue()).append("</max-value>\n"); - str.append(" <avg-value>").append(meas.getAvgMetric().getValue()).append("</avg-value>\n"); - str.append(" <last-value>").append(meas.getLastMetric().getValue()).append("</last-value>\n"); - str.append(" <units>").append(meas.getUnits()).append("</units>\n"); - str.append(" <begin-time>").append(new Date(meas.getBeginTimeFrame())).append("</begin-time>\n"); - str.append(" <end-time>").append(new Date(meas.getEndTimeFrame())).append("</end-time>\n"); - str.append(" <schedule-id>").append(meas.getScheduleId()).append("</schedule-id>\n"); - str.append(" </measurement>\n"); - } - str.append("</measurements>\n"); - this.content = str.toString(); - } - return this.content; - } - - private List<MetricDisplaySummary> getMeasurements() { - if (this.measurements == null) { - - int resourceId = getManagedResource().getId(); - - // determine the user's preferences so we know how far back to get the measurement data - MeasurementPreferences measurementPrefs = new MeasurementPreferences(getSubject()); - MetricRangePreferences range = measurementPrefs.getMetricRangePreferences(); - - // get all the enabled measurement schedules - MeasurementScheduleManagerLocal sm = LookupUtil.getMeasurementScheduleManager(); - List<MeasurementSchedule> measurementSchedules = sm.findSchedulesForResourceAndType(getSubject(), - resourceId, DataType.MEASUREMENT, null, true); - int[] scheduleIds = new int[measurementSchedules.size()]; - int i = 0; - for (MeasurementSchedule sched : measurementSchedules) { - scheduleIds[i++] = sched.getId(); - } - - // now get the measurement data for all the scheduled as far back as the user's range preferences says so - MeasurementChartsManagerLocal chartManager = LookupUtil.getMeasurementChartsManager(); - this.measurements = chartManager.getMetricDisplaySummariesForResource(getSubject(), resourceId, - scheduleIds, range.begin, range.end); - } - - return this.measurements; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java deleted file mode 100644 index 73f55f1..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/ResourceFolder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import com.bradmcevoy.http.Resource; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.resource.InventoryStatus; -import org.rhq.core.domain.resource.composite.ResourceFacets; -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.ResourceTypeManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * Represents a managed resource along with its children resources. - * - * @see BasicResource - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public class ResourceFolder extends BasicResource implements AuthenticatedCollectionResource { - - private List<Resource> children; - - public ResourceFolder(Subject subject, org.rhq.core.domain.resource.Resource managedResource) { - super(subject, managedResource); - } - - public String getUniqueId() { - return String.valueOf(getManagedResource().getId()); - } - - public String getName() { - String name = getManagedResource().getName(); - return SafeEncoder.encode(name); - } - - public Date getModifiedDate() { - return new Date(getManagedResource().getMtime()); - } - - public Date getCreateDate() { - return new Date(getManagedResource().getCtime()); - } - - public Resource child(String childName) { - List<? extends Resource> children = getChildren(); - for (Resource child : children) { - if (childName.equals(child.getName())) { - return child; - } - } - return null; - } - - public List<? extends Resource> getChildren() { - return getChildren(getSubject()); - } - - public List<? extends Resource> getChildren(Subject subject) { - if (this.children == null) { - PageList<org.rhq.core.domain.resource.Resource> childs; - ResourceManagerLocal rm = LookupUtil.getResourceManager(); - childs = rm.findChildResources(subject, getManagedResource().getId(), PageControl.getUnlimitedInstance()); - - // inventory - this.children = new ArrayList<Resource>(childs.size()); - for (org.rhq.core.domain.resource.Resource child : childs) { - if (child.getInventoryStatus() == InventoryStatus.COMMITTED) { - this.children.add(new ResourceFolder(subject, child)); - } - } - - ResourceTypeManagerLocal rtm = LookupUtil.getResourceTypeManager(); - ResourceFacets facets = rtm.getResourceFacets(getManagedResource().getResourceType().getId()); - - // availability - this.children.add(new AvailabilityResource(subject, getManagedResource())); - - // resource configuration - if (facets.isConfiguration()) { - this.children.add(new ConfigResource(subject, getManagedResource())); - } - - // traits - if (facets.isMeasurement()) { - this.children.add(new TraitsResource(subject, getManagedResource())); - } - - // measurement data - if (facets.isMeasurement()) { - this.children.add(new MeasurementDataResource(subject, getManagedResource())); - } - } - return this.children; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java deleted file mode 100644 index 89c78fd..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import com.bradmcevoy.http.Auth; -import com.bradmcevoy.http.PropFindableResource; -import com.bradmcevoy.http.Request; -import com.bradmcevoy.http.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.resource.ResourceCategory; -import org.rhq.core.domain.resource.composite.ResourceComposite; -import org.rhq.core.domain.util.PageControl; -import org.rhq.enterprise.server.resource.ResourceManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * This represents the top of the managed environment (i.e. all of the top-level platforms being managed). - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public class RootFolder extends Authenticator implements AuthenticatedCollectionResource, PropFindableResource { - - private static final Log LOG = LogFactory.getLog(RootFolder.class); - - private List<ResourceFolder> roots; - - public RootFolder() { - super(null); - } - - public String getUniqueId() { - return "/"; - } - - public String getName() { - return "/"; - } - - public Date getModifiedDate() { - return new Date(); - } - - public Date getCreateDate() { - return new Date(); - } - - /** - * This implementation of authorise simply assures that the user has authenticated himself. - * If the user is logged in, <code>true</code> is returned; otherwise, <code>false</code> is returned. - */ - public boolean authorise(Request request, Request.Method method, Auth auth) { - boolean authorized = (auth != null) && (auth.getTag() != null); - if (LOG.isDebugEnabled()) { - LOG.debug("RootFolder auth=[" + ((auth != null) ? auth.getTag() : auth) + "], isAuthorized=" + authorized); - } - return authorized; - } - - public String checkRedirect(Request request) { - return null; // no-op - } - - public Resource child(String childName) { - List<? extends Resource> children = getChildren(); - for (Resource child : children) { - if (childName.equals(child.getName())) { - return child; - } - } - return null; - } - - public List<? extends Resource> getChildren() { - return getChildren(getSubject()); - } - - public List<? extends Resource> getChildren(Subject subject) { - if (this.roots == null) { - ResourceManagerLocal rm = LookupUtil.getResourceManager(); - - List<ResourceComposite> foundRoots = rm.findResourceComposites(subject, ResourceCategory.PLATFORM, null, - null, null, null, true, PageControl.getUnlimitedInstance()); - - if (foundRoots != null) { - this.roots = new ArrayList<ResourceFolder>(foundRoots.size()); - for (ResourceComposite comp : foundRoots) { - this.roots.add(new ResourceFolder(subject, comp.getResource())); - } - } else { - this.roots = new ArrayList<ResourceFolder>(); - } - } - return this.roots; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java deleted file mode 100644 index 8805335..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/SafeEncoder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -/** - * Seems like some of our resource names aren't able to safely become URLs that contain characters - * like \ or /. This utility will attempt to change names so they can safely be handled. - * - * @author John Mazzitelli - */ -public abstract class SafeEncoder { - // pick things that are at least half-sane, even if they doesn't look perfect - private static final String[][] REPLACEMENTS = new String[][] { { "\\", "||" }, { "/", "|" } }; - - public static String encode(String name) { - for (String[] replacement : REPLACEMENTS) { - name = name.replace(replacement[0], replacement[1]); - } - return name; - } - - public static String decode(String name) { - for (String[] replacement : REPLACEMENTS) { - name = name.replace(replacement[1], replacement[0]); - } - return name; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java deleted file mode 100644 index 9293127..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/TraitsResource.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.measurement.MeasurementDataTrait; -import org.rhq.core.domain.resource.Resource; -import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * The measurement traits resource that provides information on all traits of a managed resource. - * - * @author John Mazzitelli - */ -public class TraitsResource extends GetableBasicResource { - - private List<MeasurementDataTrait> traits; - private String content; - - public TraitsResource(Subject subject, Resource managedResource) { - super(subject, managedResource); - } - - public String getUniqueId() { - return "traits_" + getManagedResource().getId(); - } - - public String getName() { - return "measurement_traits.xml"; - } - - /** - * The modified date is that of the last time a trait changed. - */ - public Date getModifiedDate() { - long latestTimestamp = 0L; - for (MeasurementDataTrait trait : getTraits()) { - if (latestTimestamp < trait.getTimestamp()) { - latestTimestamp = trait.getTimestamp(); - } - } - return new Date(latestTimestamp); - } - - /** - * The created date is the date of the resource itself was created. - */ - public Date getCreateDate() { - return new Date(getManagedResource().getCtime()); - } - - protected String loadContent() { - if (this.content == null) { - StringBuilder str = new StringBuilder(); - str.append("<?xml version=\"1.0\"?>\n"); - str.append("<traits>\n"); - for (MeasurementDataTrait trait : getTraits()) { - str.append(" <trait>\n"); - str.append(" <name>").append(trait.getName()).append("</name>\n"); - str.append(" <value>").append(trait.getValue()).append("</value>\n"); - str.append(" <last-changed>").append(new Date(trait.getTimestamp())).append("</last-changed>\n"); - str.append(" <schedule-id>").append(trait.getScheduleId()).append("</schedule-id>\n"); - str.append(" </trait>\n"); - } - str.append("</traits>\n"); - this.content = str.toString(); - } - return this.content; - } - - private List<MeasurementDataTrait> getTraits() { - if (this.traits == null) { - MeasurementDataManagerLocal mdm = LookupUtil.getMeasurementDataManager(); - List<MeasurementDataTrait> traits = mdm.findCurrentTraitsForResource(getSubject(), getManagedResource() - .getId(), null); - if (traits != null) { - this.traits = traits; - } else { - this.traits = new ArrayList<MeasurementDataTrait>(); - } - } - return this.traits; - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java b/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java deleted file mode 100644 index bf1a584..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/WebDAVResourceFactory.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2008 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.gui.webdav; - -import java.util.List; - -import com.bradmcevoy.http.Resource; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.util.collection.ArrayUtils; -import org.rhq.enterprise.server.util.LookupUtil; - -/** - * The main entry point when a WebDAV request comes in. This will examine - * the URL being requested and convert that URL into a series of WebDAV - * resources for the user to see. - * - * @author Greg Hinkle - * @author John Mazzitelli - */ -public class WebDAVResourceFactory implements com.bradmcevoy.http.ResourceFactory { - - private static final Log LOG = LogFactory.getLog(WebDAVResourceFactory.class); - - public Resource getResource(String host, String url) { - Resource foundResource = null; - - // URL == /webdav/resource/<parent-resource-name>/<child-resource-name>/... - // paths[] = [, webdav, resource, <parent-resource-name>, <child-resource-name>, ...] - String[] paths = url.split("/"); - - if (paths.length >= 3) { - String webdavResourceType = paths[2]; - if ("resource".equals(webdavResourceType)) { - foundResource = getResourceResource(getSubarray(paths, 3)); - } - // TODO: some ideas for addition resource types - // else if "group".equals(webdavResourceType) - // else if "user".equals(webdavResourceType) - // else if "role".equals(webdavResourceType) - // else if "plugin".equals(webdavResourceType) - // else if "systemconfig".equals(webdavResourceType) - // else if "agentupdate/download".equals(webdavResourceType) - // else if "agentupdate/version".equals(webdavResourceType) - } - - if (foundResource == null) { - LOG.warn("Couldn't find resource associated with webdav url [" + url + "]"); - } - - return foundResource; - } - - public String getSupportedLevels() { - return "1"; - } - - private String[] getSubarray(String[] full, int index) { - return ArrayUtils.copyOfRange(full, index, full.length); - } - - public Subject getOverlord() { - return LookupUtil.getSubjectManager().getOverlord(); - } - - private Resource getResourceResource(String[] paths) { - if (paths.length == 0 || paths[0] == null || paths[0].length() == 0) { - return new RootFolder(); - } else { - Resource resourceFolder = new RootFolder(); - for (int i = 0; i < paths.length; i++) { - boolean found = false; - if (resourceFolder instanceof AuthenticatedCollectionResource) { - List<? extends Resource> children; - children = ((AuthenticatedCollectionResource) resourceFolder).getChildren(getOverlord()); - for (Resource child : children) { - String childName = child.getName(); - if (childName.equals(paths[i])) { - resourceFolder = child; - found = true; - } - } - } - if (!found) { - return null; - } - } - return resourceFolder; - } - } -} diff --git a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml b/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml deleted file mode 100644 index 0e4fa0f..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/jboss-web.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0"?> - -<jboss-web> - <context-root>webdav</context-root> -</jboss-web> diff --git a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 2a445aa..0000000 --- a/modules/enterprise/gui/webdav-war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> - -<web-app xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" - version="2.5"> - - <display-name>RHQ WebDav</display-name> - - - <!-- WebDAV support --> - <servlet> - <servlet-name>WebDAV</servlet-name> - <servlet-class>com.bradmcevoy.http.MiltonServlet</servlet-class> - <init-param> - <param-name>resource.factory.class</param-name> - <param-value>org.rhq.gui.webdav.WebDAVResourceFactory</param-value> - </init-param> - </servlet> - - <servlet-mapping> - <servlet-name>WebDAV</servlet-name> - <url-pattern>/</url-pattern> - </servlet-mapping> - -</web-app> -
commit cfa24e72aa2c403985e6f32eeee913dfa93a9e41 Author: Hudson jboss-qa-internal@redhat.com Date: Mon Sep 24 11:49:32 2012 -0400
development RHQ_4.6.0-SNAPSHOT
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml index e1b5521..1de27c1 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.5.0-SNAPSHOT</version> + <version>4.6.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 4da4ece..e7416c4 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml index cd0c979..92a62cb 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.5.0-SNAPSHOT</version> + <version>4.6.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 74480d7..930b7e1 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>rhq-filetemplate-bundle-common</artifactId> diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml index 6600791..10b3663 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>rhq-jboss-as-common</artifactId> diff --git a/modules/common/pom.xml b/modules/common/pom.xml index f364ae9..0831c51 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.5.0-SNAPSHOT</version> + <version>4.6.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 edf6add..2e9dc48 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.5.0-SNAPSHOT</version> + <version>4.6.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 16b7bdb..590a475 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<!-- Model Version --> diff --git a/modules/core/arquillian-integration/pom.xml b/modules/core/arquillian-integration/pom.xml index 36d5fd5..a6a9cab 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.5.0-SNAPSHOT</version> + <version>4.6.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 6f6a937..a988ab6 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.5.0-SNAPSHOT</version> + <version>4.6.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 bf501fc..e732fb8 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml index eee04da..c971f80 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml index 8061224..e9db3de 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>rhq-core-domain</artifactId> diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml index 51781ce..2490d00 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.5.0-SNAPSHOT</version> + <version>4.6.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 934b13f..336e33c 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.5.0-SNAPSHOT</version> + <version>4.6.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 556a182..922855c 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.5.0-SNAPSHOT</version> + <version>4.6.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 fe4e9cf..f439dab 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.5.0-SNAPSHOT</version> + <version>4.6.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 b9c19a4..c6ce32d 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.5.0-SNAPSHOT</version> + <version>4.6.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 f693831..0307c46 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.5.0-SNAPSHOT</version> + <version>4.6.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 784f68b..40d29ec 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.5.0-SNAPSHOT</version> + <version>4.6.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 2ecee24..aff829f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml index c35c001..f5f4b45 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/core/pom.xml b/modules/core/pom.xml index 7fc1288..a154988 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml index 9045533..145bf2b 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>rhq-core-util</artifactId> diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml index 892a1c0..53c13c7 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml index 6069aaf..f060517 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml index 37959d2..f3587e0 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <artifactId>rhq-script-bindings</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 f784d42..47be0b5 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/gui/base-perspective-jar/pom.xml b/modules/enterprise/gui/base-perspective-jar/pom.xml index 576b18e..73b6795 100644 --- a/modules/enterprise/gui/base-perspective-jar/pom.xml +++ b/modules/enterprise/gui/base-perspective-jar/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/gui/base-perspective-war/pom.xml b/modules/enterprise/gui/base-perspective-war/pom.xml index e4acd89..e5ea8e6 100644 --- a/modules/enterprise/gui/base-perspective-war/pom.xml +++ b/modules/enterprise/gui/base-perspective-war/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 78f8982..0e25194 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.5.0-SNAPSHOT</version> + <version>4.6.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 82292eb..08fb745 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml index e26a864..48127b8 100644 --- a/modules/enterprise/gui/installer-war/pom.xml +++ b/modules/enterprise/gui/installer-war/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml index ae67384..ba83687 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.5.0-SNAPSHOT</version> + <version>4.6.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 5e034ef..f075f43 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.5.0-SNAPSHOT</version> + <version>4.6.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 4c18901..93c2544 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml index e572daf..f2356ec 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.5.0-SNAPSHOT</version> + <version>4.6.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 e0e4243..b263f29 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.5.0-SNAPSHOT</version> + <version>4.6.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 eed1ac4..aea4f04 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.5.0-SNAPSHOT</version> + <version>4.6.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 b8863d3..88bcb81 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml index 8da6180..6de50d0 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml index fe1c3e7..e2a48c4 100644 --- a/modules/enterprise/remoting/webservices/pom.xml +++ b/modules/enterprise/remoting/webservices/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 0bdc28b..e14a164 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <artifactId>rhq-scripting-api</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 adbe85a..a76e987 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <artifactId>rhq-scripting-javascript</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 f439f11..d6faff8 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <artifactId>rhq-scripting-parent</artifactId> <packaging>pom</packaging>
- <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 4b34699..66a7814 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <artifactId>rhq-scripting-python</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <name>RHQ Python support</name> <description>Provides RHQ scripting in Python using Jython</description>
diff --git a/modules/enterprise/server/client-api/pom.xml b/modules/enterprise/server/client-api/pom.xml index 1810ecb..0fcbdae 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
<groupId>org.rhq</groupId> <artifactId>rhq-server-client-api</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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/container-lib/pom.xml b/modules/enterprise/server/container-lib/pom.xml index 8a5f9dd..243bda8 100644 --- a/modules/enterprise/server/container-lib/pom.xml +++ b/modules/enterprise/server/container-lib/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml index 2f0dcbd..c956183 100644 --- a/modules/enterprise/server/container/pom.xml +++ b/modules/enterprise/server/container/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml index 0bed079..dc5f82a 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/itests/pom.xml b/modules/enterprise/server/itests/pom.xml index d16253a..337f003 100644 --- a/modules/enterprise/server/itests/pom.xml +++ b/modules/enterprise/server/itests/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 0a067fe..dbcaac4 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.5.0-SNAPSHOT</version> + <version>4.6.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 0977465..06da1ea 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <groupId>org.rhq</groupId> <artifactId>alert-cli</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 a7db8c7..3998439 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId> <artifactId>alert-email</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 53b67dd..da035f6 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-irc</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 5f01f19..2baa5b5 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-log4j</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 ceb88ad..768f3f1 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-microblog</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 01e8ed2..784f469 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-mobicents</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 032030c..5e369b5 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-operations</artifactId> <packaging>jar</packaging> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 e1b2b68..10d99df 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-roles</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 5e272f6..1339180 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-snmp</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 1e168a0..c4dae00 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>alert-subject</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 5cb7d9d..8bd965d 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.5.0-SNAPSHOT</version> + <version>4.6.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 db45a30..da27dd9 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>rhq-serverplugin-cobbler</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 f695434..0f9eb80 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml index 985cd67..33af23c 100644 --- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml +++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-enterprise-server-plugins-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 141b792..419ab6f 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.5.0-SNAPSHOT</version> + <version>4.6.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 1d3afe9..db8855d 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.5.0-SNAPSHOT</version> + <version>4.6.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 ba40c46..47f4d12 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.5.0-SNAPSHOT</version> + <version>4.6.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 523a7b8..7171409 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId> <artifactId>packagetype-cli</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version>
<name>RHQ Enterprise Server CLI Package Type Plugin</name>
diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml index 601d777..3449ffd 100644 --- a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml +++ b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/plugins/perspectives/core/pom.xml b/modules/enterprise/server/plugins/perspectives/core/pom.xml index ceb56d7..fdf9a5f 100644 --- a/modules/enterprise/server/plugins/perspectives/core/pom.xml +++ b/modules/enterprise/server/plugins/perspectives/core/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml index 11f3b5c..d6ac758 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.5.0-SNAPSHOT</version> + <version>4.6.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 56877dd..cbe8f64 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.5.0-SNAPSHOT</version> + <version>4.6.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 1f996f5..9e4c296 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.5.0-SNAPSHOT</version> + <version>4.6.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 4d91ffd..c95e71e 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml index 84d4348..bd3e77b 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.5.0-SNAPSHOT</version> + <version>4.6.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 1a515f3..7b66f19 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml index e2ae626..b412a88 100644 --- a/modules/enterprise/server/sars/agent-sar/pom.xml +++ b/modules/enterprise/server/sars/agent-sar/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-enterprise-server-sars-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml index b52363c..57da4c1 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.5.0-SNAPSHOT</version> + <version>4.6.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 8e4bc21..f4dd08c 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../../../pom.xml</relativePath> </parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml index 6476dc0..7be4429 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId> <artifactId>bundleGen</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version>
<build> <plugins> diff --git a/modules/helpers/jeeGen/pom.xml b/modules/helpers/jeeGen/pom.xml index 9891667..14530ff 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.5.0-SNAPSHOT</version> + <version>4.6.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 55e7c37..37ae750 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent> <groupId>org.rhq.helpers</groupId> <artifactId>perftest-support</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 7e30969..e036910 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.5.0-SNAPSHOT</version> + <version>4.6.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 b6be916..6bf8167 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.5.0-SNAPSHOT</version> + <version>4.6.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 b2c43d1..b037aed 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq.helpers</groupId> diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml index 821df29..7e619d8 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.5.0-SNAPSHOT</version> + <version>4.6.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 7219146..4f57361 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.5.0-SNAPSHOT</version> + <version>4.6.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 4351b11..f3c5eea 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/integration-tests/jndi-access/pom.xml b/modules/integration-tests/jndi-access/pom.xml index 0e45a4b..8dfe58e 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.5.0-SNAPSHOT</version> + <version>4.6.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 f93fa6f..453687f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml index 82f32cd..982dfca 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml index 17cd506..9bb0064 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.5.0-SNAPSHOT</version> + <version>4.6.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 35bad6b..5aaf36b 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml index 92b0521..46ed194 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml index ce670b8..117ae7f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml index c6fbfed..3a96cb4 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml index 840b4b6..30cf1f7 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml index fa4f7d3..c7bcc0e 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml index 7305db5..5c98a63 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.5.0-SNAPSHOT</version> + <version>4.6.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 8c0a155..dee59ab 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml index 5c56712..50f902c 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml index 7aae62d..1e46384 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml index e7a1349..f60b3c0 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.jboss.on</groupId> diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml index 4794d78..364d33f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml index e50de4e..9ecab0b 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> <artifactId>rhq-hudson-plugin</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.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 60c3f2c..34e14a0 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml index 0750d4b..c7dd0eb 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.5.0-SNAPSHOT</version> + <version>4.6.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 5cc08b5..60601e7 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.5.0-SNAPSHOT</version> + <version>4.6.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 a02c9f3..10b0ad2 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.5.0-SNAPSHOT</version> + <version>4.6.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 13ea4ad..b7e854b 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.5.0-SNAPSHOT</version> + <version>4.6.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 1519908..ad60365 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.5.0-SNAPSHOT</version> + <version>4.6.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 1079417..26ffe85 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.jboss.on</groupId> diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml index eba28da..2548445 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml index 8ee8062..2985077 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.5.0-SNAPSHOT</version> + <version>4.6.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 11ef595..4a3493f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml index fb018ca..1d34979 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml index 748cc07..895bdbb 100644 --- a/modules/plugins/netservices/pom.xml +++ b/modules/plugins/netservices/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-plugins-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/noop/pom.xml b/modules/plugins/noop/pom.xml index cc31433..b274860 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml index 60fdb03..c8bdc71 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.5.0-SNAPSHOT</version> + <version>4.6.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 28d63d4..63e684d 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml index 9f93a29..725c803 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml index b098b14..28744ea 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml index 350c11e..036d610 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml index a40b63d..1f5c297 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml index 46c873e..d76f60c 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.5.0-SNAPSHOT</version> + <version>4.6.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 46b0171..134d18d 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.5.0-SNAPSHOT</version> + <version>4.6.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 c3af4c6..0f44105 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.jboss.on</groupId> diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml index 0f7bd3d..0762aa5 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml index 9a1370b..584604f 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml index 0c0bee5..05e604a 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml index 4f60a52..99babba 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<modelVersion>4.0.0</modelVersion> diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml index c3db44f..d947395 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml index 4aed11b..afb9cd2 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml index ca0576f..0a64aed 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.jboss.on</groupId> diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml index daf4755..54a7c4d 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.5.0-SNAPSHOT</version> + <version>4.6.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 df2b0e8..d5bf6fc 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml index e9fbb43..ba660e3 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/pom.xml b/modules/pom.xml index fc72aa6..bf9c606 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<groupId>org.rhq</groupId> diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml index ba3e023..55add04 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.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> </parent>
<artifactId>test-utils</artifactId> diff --git a/pom.xml b/pom.xml index b1a59d4..a66acb6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@
<groupId>org.rhq</groupId> <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> + <version>4.6.0-SNAPSHOT</version> <packaging>pom</packaging>
<name>RHQ</name>
commit 7f0fd6111408fbe4fb6643e7646cb86d679d37ec Author: Stefan Negrea snegrea@redhat.com Date: Fri Sep 21 12:53:46 2012 -0500
[BZ 859512] Execute :read-resource if whoami fails to correctly detect the server state. :whoami exists for the majority of the resources, the only exceptions are resources that do not have the security context established by AS7.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java index a4e99b4..080c60f 100644 --- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java +++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java @@ -280,6 +280,14 @@ public class BaseComponent<T extends ResourceComponent<?>> implements AS7Compone // Read server state Operation op = new Operation("whoami", getAddress()); Result res = getASConnection().execute(op); + + //:whoami might fail host controller resources, in that case use :read-resource operation + //which is slower due to larger content returned but more reliable since every resource has it. + if (!res.isSuccess()) { + op = new Operation("read-resource", getAddress()); + res = getASConnection().execute(op); + } + if (res.isReloadRequired()) { PropertySimple oobMessage = new PropertySimple("__OOB","The server needs a reload for the latest changes to come effective."); configuration.put(oobMessage);
commit 965b08b1e2f8a16f33206001d8f8ac19d0bec51b Author: Stefan Negrea snegrea@redhat.com Date: Fri Sep 21 12:20:25 2012 -0500
Update test priority to match other integration tests for host controllers.
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java index 7be0689..99f6fa6 100644 --- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java +++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/SecurityModuleOptionsTest.java @@ -64,8 +64,8 @@ import org.rhq.modules.plugins.jbossas7.json.Result; import org.rhq.test.arquillian.RunDiscovery;
/** - * Test exercising the subsystem=security/SecurityDomain/[Authentication(Classic|Jaspi), - * Authorization, Mapping, Audit, Acl, + * Test exercising the subsystem=security/SecurityDomain/[Authentication(Classic|Jaspi), + * Authorization, Mapping, Audit, Acl, * Identity-Trust] * @author Simeon Pinder */ @@ -130,7 +130,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { /* This first discovery is only so that we can leverage existing code to install the management user needed * in next test. */ - @Test(priority = 10, groups = "discovery") + @Test(priority = 1040, groups = "discovery") @RunDiscovery(discoverServices = true, discoverServers = true) public void firstDiscovery() throws Exception { Resource platform = this.pluginContainer.getInventoryManager().getPlatform(); @@ -142,16 +142,16 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { installManagementUsers(); }
- /** This method mass loads all the supported Module Option Types(Excluding authentication=jaspi, cannot co-exist with + /** This method mass loads all the supported Module Option Types(Excluding authentication=jaspi, cannot co-exist with * authentication=classic) into a single SecurityDomain. This is done as - * -i)creating all of the related hierarchy of types needed to exercise N Module Options Types and their associated + * -i)creating all of the related hierarchy of types needed to exercise N Module Options Types and their associated * Module Options instances would take too long to setup(N creates would signal N discovery runs before test could complete). - * -ii)setting the priority of this method lower than the discovery method means that we'll get all the same types in much + * -ii)setting the priority of this method lower than the discovery method means that we'll get all the same types in much * less time. - * + * * @throws Exception */ - @Test(priority = 11) + @Test(priority = 1041) public void loadStandardModuleOptionTypes() throws Exception { mapper = new ObjectMapper(); mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -226,10 +226,10 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { }
/** Runs the second discovery run to load all the new types added. - * + * * @throws Exception */ - @Test(priority = 12, groups = "discovery") + @Test(priority = 1042, groups = "discovery") @RunDiscovery(discoverServices = true, discoverServers = true) public void secondDiscovery() throws Exception { Resource platform = this.pluginContainer.getInventoryManager().getPlatform(); @@ -243,14 +243,14 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest {
/** This test method exercises a number of things: * - that the security-domain children loaded have been created successfully - * - that all of the supported Module Option Type children(excluding 'authentication=jaspi') have been + * - that all of the supported Module Option Type children(excluding 'authentication=jaspi') have been * discovered as AS7 types successfully. * - that the correct child attribute was specified for each type //Ex. acl=classic -> acl-modules - * - - * + * - + * * @throws Exception */ - @Test(priority = 13) + @Test(priority = 1043) public void testDiscoveredSecurityNodes() throws Exception { //lazy-load configurationManager if (testConfigurationManager == null) { @@ -338,7 +338,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { Configuration loadedOptionsConfiguration = testConfigurationManager .loadResourceConfiguration(moduleOptionsResource.getId()); for (String key : loadedOptionsConfiguration.getAllProperties().keySet()) { - //retrieve the open map of Module Options + //retrieve the open map of Module Options PropertyMap map = ((PropertyMap) loadedOptionsConfiguration.getAllProperties().get(key)); LinkedHashMap<String, Object> options = moduleOptionType.getOptions(); for (String optionKey : map.getMap().keySet()) { @@ -359,7 +359,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { } }
- @Test(priority = 14) + @Test(priority = 1044) public void testCreateSecurityDomain() throws Exception { //get the root security resource securityResource = getResource(); @@ -387,7 +387,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { + response.getErrorMessage(); }
- @Test(priority = 15) + @Test(priority = 1045) public void testAuthenticationClassic() throws Exception { //get the root security resource securityResource = getResource(); @@ -426,7 +426,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { + response.getErrorMessage(); }
- @Test(priority = 16) + @Test(priority = 1046) public void testDeleteSecurityDomain() throws Exception { //get the root security resource securityResource = getResource(); @@ -477,7 +477,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { }
/** Automates hierarchy creation for Module Option type resources and their parents - * + * * @param optionAttributeType * @return */ @@ -553,7 +553,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { }
/** Automates hierarchy creation for Module Option type resources and their parents - * + * * @param optionAttributeType * @return */ @@ -624,10 +624,10 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { return created; }
- /** For each operation + /** For each operation * - will write verbose json and operation details to system.out if verboseOutput = true; * - will execute the operation against running server if execute = true. - * + * * @param op * @param execute * @param verboseOutput @@ -664,7 +664,7 @@ public class SecurityModuleOptionsTest extends AbstractJBossAS7PluginTest { } } if (verboseOutput) { - //result wrapper details + //result wrapper details System.out.println("\tResult:" + result); //detailed results System.out.println("\tValue:" + result.getResult());
commit 313c627fe8e0015faf4c978c71801584bb2b3afa Author: Stefan Negrea snegrea@redhat.com Date: Fri Sep 21 12:19:52 2012 -0500
Add generic unit tests for loading and updating resource configuration and executing noarg operations for AS7 host controllers.
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ResourcesDomainServerTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ResourcesDomainServerTest.java new file mode 100644 index 0000000..1714b64 --- /dev/null +++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/domain/ResourcesDomainServerTest.java @@ -0,0 +1,139 @@ +/* + * RHQ Management Platform + * Copyright 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. + * + * 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.modules.plugins.jbossas7.itest.domain; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.testng.Assert; +import org.testng.annotations.Test; + +import org.rhq.core.domain.resource.InventoryStatus; +import org.rhq.core.domain.resource.Resource; +import org.rhq.core.pc.inventory.InventoryManager; +import org.rhq.core.pc.inventory.ResourceContainer; +import org.rhq.modules.plugins.jbossas7.itest.AbstractJBossAS7PluginTest; +import org.rhq.test.arquillian.RunDiscovery; + +/** + * @author Stefan Negrea + * + */ +@Test(groups = { "integration", "pc", "domain" }, singleThreaded = true) +public class ResourcesDomainServerTest extends AbstractJBossAS7PluginTest { + private Log log = LogFactory.getLog(this.getClass()); + + @Test(priority = 1030, groups = "discovery") + @RunDiscovery(discoverServices = true, discoverServers = true) + public void discoverPlatform() throws Exception { + InventoryManager inventoryManager = this.pluginContainer.getInventoryManager(); + + Resource platform = inventoryManager.getPlatform(); + assertNotNull(platform); + assertEquals(platform.getInventoryStatus(), InventoryStatus.COMMITTED); + + Thread.sleep(20 * 1000L); + + ResourceContainer platformContainer = inventoryManager.getResourceContainer(platform); + Resource server = getResourceByTypeAndKey(platform, DomainServerComponentTest.RESOURCE_TYPE, + DomainServerComponentTest.RESOURCE_KEY); + inventoryManager.activateResource(server, platformContainer, false); + + Thread.sleep(80 * 1000L); + } + + + @Test(priority = 1031) + public void loadUpdateResourceConfiguration() throws Exception { + List<String> ignoredResources = new ArrayList<String>(); + + //ignored because of differences between test plugin container and real application + //works well with real agent + ignoredResources.add("VHost (Profile)"); + ignoredResources.add("VHost (Managed Server)"); + + //created JIRA AS7-5011 + //server is started with the configuration but unable to write it back as is + //due to marshaling error + ignoredResources.add("Network Interface"); + + //created JIRA AS7-5012 + //default value for is float but the resource only accepts integers + ignoredResources.add("Domain Load Metric"); + + //will revisit after BZ 826542 is resolved + //ignoredResources.add("Authentication (Classic)"); + + //tested separately + ignoredResources.add("SocketBindingGroup"); + + //Update requirements validate separately + ignoredResources.add("Pooled Connection Factory (Profile)"); + ignoredResources.add("Connection Factory (Profile)"); + ignoredResources.add("Pooled Connection Factory (Managed Server)"); + ignoredResources.add("Connection Factory (Managed Server)"); + + ignoredResources.add("Memory Pool"); + ignoredResources.add("Periodic Rotating File Handler"); + ignoredResources.add("Console Handler"); + + Resource platform = this.pluginContainer.getInventoryManager().getPlatform(); + Resource server = getResourceByTypeAndKey(platform, DomainServerComponentTest.RESOURCE_TYPE, + DomainServerComponentTest.RESOURCE_KEY); + + int errorCount = loadUpdateConfigChildResources(server, ignoredResources); + Assert.assertEquals(errorCount, 0); + } + + @Test(priority = 1032) + public void executeNoArgOperations() throws Exception { + List<String> ignoredSubsystems = new ArrayList<String>(); + + List<String> ignoredOperations = new ArrayList<String>(); + //ignored because there is no other server to fail-over to + ignoredOperations.add("subsystem:force-failover"); + //ignored because this is not a true operation, it is handled + //internally by a configuration property change + ignoredOperations.add("enable"); + //ignored because the Osgi subsystem not configured out of box + ignoredOperations.add("subsystem:activate"); + + //ignored operations because they will stop the managed server and + //the domain controller itself + ignoredOperations.add("stop"); + ignoredOperations.add("restart"); + ignoredOperations.add("shutdown"); + ignoredOperations.add("stop-servers"); + ignoredOperations.add("restart-servers"); + + Resource platform = this.pluginContainer.getInventoryManager().getPlatform(); + Resource server = getResourceByTypeAndKey(platform, DomainServerComponentTest.RESOURCE_TYPE, + DomainServerComponentTest.RESOURCE_KEY); + + executeNoArgOperations(server, ignoredSubsystems, ignoredOperations); + } + +} diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/ResourcesStandaloneServerTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/ResourcesStandaloneServerTest.java index 824162a..8d391a1 100644 --- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/ResourcesStandaloneServerTest.java +++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/standalone/ResourcesStandaloneServerTest.java @@ -67,7 +67,7 @@ public class ResourcesStandaloneServerTest extends AbstractJBossAS7PluginTest {
@Test(priority = 12) - public void loadUpdateTemplatedResourceConfiguration() throws Exception { + public void loadUpdateResourceConfiguration() throws Exception { List<String> ignoredResources = new ArrayList<String>();
//ignored because of differences between test plugin container and real application
commit 6ab817044c8480a02eb82798c75a40e1a0bd4649 Author: Jirka Kremser jkremser@redhat.com Date: Fri Sep 21 17:04:01 2012 +0200
Tests for MeasurementDataManagerBean testing adding and finding the MeasurementTraitData (in particular methods: MeasurementDataManagerBean.addTraitData(), MeasurementDataManagerBean.findTraits(), MeasurementDataManagerBean.findTraitsByCriteria(), and MeasurementDataManagerBean.findCurrentTraitsForResource())
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementDataManagerTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementDataManagerTest.java index a6abea9..80f0cd2 100644 --- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementDataManagerTest.java +++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/measurement/test/MeasurementDataManagerTest.java @@ -41,6 +41,7 @@ import org.testng.annotations.Test;
import org.rhq.core.clientapi.agent.measurement.MeasurementAgentService; import org.rhq.core.domain.auth.Subject; +import org.rhq.core.domain.criteria.MeasurementDataTraitCriteria; import org.rhq.core.domain.measurement.DataType; import org.rhq.core.domain.measurement.DisplayType; import org.rhq.core.domain.measurement.MeasurementCategory; @@ -88,7 +89,7 @@ public class MeasurementDataManagerTest extends AbstractEJB3Test { private MeasurementSchedule schedule1, schedule2, schedule3; private ResourceType theResourceType; private Agent theAgent; - private Set<MeasurementData> expectedResult1, expectedResult2, expectedResult3; + private Set<MeasurementData> expectedResult1, expectedResult2, expectedResult3, expectedResult4;
@BeforeMethod public void beforeMethod() { @@ -363,12 +364,15 @@ public class MeasurementDataManagerTest extends AbstractEJB3Test { long time1 = System.currentTimeMillis(); long time2 = time1 + 1; long time3 = time2 + 1; + long time4 = time3 + 1; String name1 = "a"; String name2 = "b"; String name3 = "c"; + String name4 = "d"; String value1 = "test-value1"; String value2 = "test-value2"; String value3 = "test-value3"; + String value4 = "test-value4";
// method findLiveDataForGroup adds prefix with resource id which is part of equals MeasurementData expectedData1 = makeMeasurement(time1, schedule1.getId(), value1, name1); @@ -377,6 +381,8 @@ public class MeasurementDataManagerTest extends AbstractEJB3Test { expectedData2.setName(resource2.getId() + ":" + name2); MeasurementData expectedData3 = makeMeasurement(time3, schedule3.getId(), value3, name3); expectedData3.setName(resource2.getId() + ":" + name3); + MeasurementData expectedData4 = makeMeasurement(time4, schedule2.getId(), value4, name4); + expectedData4.setName(resource2.getId() + ":" + name4);
expectedResult1 = new HashSet<MeasurementData>(1); expectedResult1.add(expectedData1); @@ -386,6 +392,9 @@ public class MeasurementDataManagerTest extends AbstractEJB3Test { expectedResult3 = new HashSet<MeasurementData>(3); expectedResult3.addAll(expectedResult1); expectedResult3.addAll(expectedResult2); + expectedResult4 = new HashSet<MeasurementData>(2); + expectedResult4.add(expectedData2); + expectedResult4.add(expectedData4);
// mock the MeasurementAgentService MeasurementAgentService mockedMeasurementService = mock(MeasurementAgentService.class); @@ -475,6 +484,238 @@ public class MeasurementDataManagerTest extends AbstractEJB3Test { // ok, it was expected } } + + @Test + public void testAddAndFindTrait1() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult1) { + data.setName(null); + expectedResult.add((MeasurementDataTrait) data); + } + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(expectedResult); + + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findTraits(overlord, resource1.getId(), definitionCt1.getId()); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + @Test + public void testAddAndFindTrait2() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult4) { + data.setName(null); + expectedResult.add((MeasurementDataTrait) data); + } + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(expectedResult); + + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findTraits(overlord, resource2.getId(), definitionCt2.getId()); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + @Test + public void testAddAndFindTrait3() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> traitsData = new HashSet<MeasurementDataTrait>(); + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult2) { + data.setName(null); + traitsData.add((MeasurementDataTrait) data); + if (data.getScheduleId() == schedule2.getId()){ + expectedResult.add((MeasurementDataTrait) data); + } + } + + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(traitsData); + + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findTraits(overlord, resource2.getId(), definitionCt2.getId()); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + @Test + public void testFindNonExistentTraitByResourceId() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findTraits(overlord, resource2.getId(), definitionCt2.getId()); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(Collections.<MeasurementData> emptySet(), actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + + /** + * This test tests more combination of criteria + * @throws Exception + */ + @Test + public void testAddAndFindByCriteria() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult1) { + data.setName(null); + expectedResult.add((MeasurementDataTrait) data); + } + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(expectedResult); + + // get back the trait data by schedule id + MeasurementDataTraitCriteria criteria = new MeasurementDataTraitCriteria(); + criteria.addFilterScheduleId(schedule1.getId()); + List<MeasurementDataTrait> actualResult = measurementDataManager.findTraitsByCriteria(overlord, criteria); + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + + // get back the trait data by resource id + criteria = new MeasurementDataTraitCriteria(); + criteria.addFilterResourceId(resource1.getId()); + actualResult = measurementDataManager.findTraitsByCriteria(overlord, criteria); + actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + + // get back the trait data by schedule id and resource id + criteria = new MeasurementDataTraitCriteria(); + criteria.addFilterScheduleId(schedule1.getId()); + criteria.addFilterResourceId(resource1.getId()); + actualResult = measurementDataManager.findTraitsByCriteria(overlord, criteria); + actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + + // get back the trait data by wrong schedule id + criteria = new MeasurementDataTraitCriteria(); + criteria.addFilterScheduleId(Integer.MIN_VALUE); + actualResult = measurementDataManager.findTraitsByCriteria(overlord, criteria); + assertTrue(actualResult.isEmpty()); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + @Test + public void testAddAndFindCurrentTraitByResourceId() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findCurrentTraitsForResource(overlord, resource1.getId(), null); + assertTrue(actualResult.isEmpty()); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + + @Test + public void testAddAndFindCurrentTraitByResourceIdAcrossMoreSchedules() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult2) { + data.setName(null); + expectedResult.add((MeasurementDataTrait) data); + } + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(expectedResult); + + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findCurrentTraitsForResource(overlord, resource2.getId(), null); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } + + @Test + public void testFindNonExistentCurrentTraitByResourceId() throws Exception { + // prepare DB + EntityManager em = beginTx(); + setupGroupOfResources(em); + commitAndClose(em); + try { + Set<MeasurementDataTrait> expectedResult = new HashSet<MeasurementDataTrait>(); + for (MeasurementData data : expectedResult2) { + data.setName(null); + expectedResult.add((MeasurementDataTrait) data); + } + // add the trait data (it stores it in db (without name field)) + measurementDataManager.addTraitData(expectedResult); + + // get back the trait data + List<MeasurementDataTrait> actualResult = measurementDataManager.findCurrentTraitsForResource(overlord, resource2.getId(), null); + + Set<MeasurementData> actualResultSet = new HashSet<MeasurementData>(actualResult); + assertEquals(expectedResult, actualResultSet); + } catch (Exception e) { + e.printStackTrace(); + fail(); + throw e; + } + } +
private MeasurementData makeMeasurement(long time, int scheduleId, String value, String name) { MeasurementData measurement = new MeasurementDataTrait(new MeasurementDataPK(time, scheduleId), value);
commit 8cdbab3e33cbeb42ce8ef30a863c9d5e3420bd80 Author: Lukas Krejci lkrejci@redhat.com Date: Fri Sep 21 14:46:44 2012 +0200
[BZ 803737] - Adding API difference justification for code change introduced by commit bf4b25f421769909e886eb42f7b99c66b207b200.
diff --git a/modules/core/util/intentional-api-changes-since-4.4.0.xml b/modules/core/util/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..bcbe4e5 --- /dev/null +++ b/modules/core/util/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<differences> + <difference> + <className>org/rhq/core/util/exec/ProcessExecutor</className> + <differenceType>7006</differenceType><!-- method return type changed --> + <method>void redirectStreams(*)</method> + <to>org.rhq.core.util.exec.ProcessExecutor$RedirectThreads</to> + <justification> + This is a protected method and thus accessible only to subclasses. No known subclasses exist. + This is a source-compatible change though (this method used to be void so no caller could have + used the return type) so if there exists a subclass in the 3rd party code, it is going to + be enough for that code to be recompiled to start working again. + </justification> + </difference> +</differences>
commit 9f7142e9d8f5e7dd816f2dadfb92cc4f638a7296 Author: Lukas Krejci lkrejci@redhat.com Date: Fri Sep 21 14:43:58 2012 +0200
Adding generic signature and @Override to get rid of code-style warnings.
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java index 308d9bd..390bb5e 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java @@ -104,7 +104,8 @@ public class ProcessExecutor {
// wait if told to - note that the default is not to wait if (process.getWaitForExit().intValue() > 0) { - Callable<Integer> call = new Callable() { + Callable<Integer> call = new Callable<Integer>() { + @Override public Integer call() throws Exception { Thread.currentThread().setName("ExecuteProcess-" + process.getProgramTitle()); try {
commit dad63bee36143bd4619e62c924cf34b0d65f4f8e Author: Lukas Krejci lkrejci@redhat.com Date: Thu Sep 20 15:28:13 2012 +0200
[BZ 803737] - Adding the ignore rules for intentional API changes (apart from AS7 plugin that I leave for other to investigate and fill in).
diff --git a/modules/core/domain/intentional-api-changes-since-4.4.0.xml b/modules/core/domain/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..6d70888 --- /dev/null +++ b/modules/core/domain/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<differences> + <difference> + <className>org/rhq/core/domain/configuration/ObfuscatedPropertySimple</className> + <differenceType>7004</differenceType><!-- number of args changed --> + <method>void *obfuscate()</method> + <justification>Protected methods used only by JPA and other internal logic. It is not visible or supposed to be used outside of this class.</justification> + </difference> + <difference> + <className>org/rhq/core/domain/configuration/ObfuscatedPropertySimple</className> + <differenceType>7006</differenceType><!-- return type changed --> + <method>void *obfuscate()</method> + <to>java.lang.String</to> + <justification>Protected methods used only by JPA and other internal logic. It is not visible or supposed to be used outside of this class.</justification> + </difference> + <difference> + <className>**/*</className> + <differenceType>6003</differenceType><!-- value of compile-time constant changed --> + <field>*</field> + <justification>The constants we declare on the domain objects are not supposed for public consumption.</justification> + </difference> +</differences> diff --git a/modules/core/plugin-api/intentional-api-changes-since-4.4.0.xml b/modules/core/plugin-api/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..33dd783 --- /dev/null +++ b/modules/core/plugin-api/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<differences> + <difference> + <className>org/rhq/core/pluginapi/inventory/ResourceContext</className> + <differenceType>7004</differenceType><!-- number of args changed --> + <method>ResourceContext(*)</method> + <justification>Instances of this class are provided by the API, it is not supposed to be instantiated by users.</justification> + </difference> + <difference> + <className>org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext</className> + <differenceType>7004</differenceType><!-- number of args changed --> + <method>ResourceUpgradeContext(*)</method> + <justification>Instances of this class are provided by the API, it is not supposed to be instantiated by users.</justification> + </difference> +</differences> diff --git a/modules/enterprise/server/jar/intentional-api-changes-since-4.4.0.xml b/modules/enterprise/server/jar/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..743c970 --- /dev/null +++ b/modules/enterprise/server/jar/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,14 @@ +<differences> + <difference> + <className>org/rhq/enterprise/server/content/RepoManagerRemote</className> + <differenceType>7012</differenceType><!-- method added to an interface --> + <method>byte[] getPackageVersionBytes(org.rhq.core.domain.auth.Subject, int, int)</method> + <justification>Adding a method to a remote API interface is safe. This class is never to be implemented by users.</justification> + </difference> + <difference> + <className>org/rhq/enterprise/server/measurement/MeasurementDataManagerRemote</className> + <differenceType>7012</differenceType><!-- method added to an interface --> + <method>java.util.Set findLiveDataForGroup(org.rhq.core.domain.auth.Subject, int, int[], int[])</method> + <justification>Adding a method to a remote API interface is safe. This class is never to be implemented by users.</justification> + </difference> +</differences> diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml index 4efad25..0a067fe 100644 --- a/modules/enterprise/server/jar/pom.xml +++ b/modules/enterprise/server/jar/pom.xml @@ -916,6 +916,16 @@ <include>**/*Remote</include> <include>**/ServerVersion</include> </includes> + <ignored> + <!-- This is intentionally ignored in any version of RHQ. We never + even report it. --> + <difference> + <className>**/ServerVersion</className> + <differenceType>6003</differenceType> <!-- Constant field value changed --> + <field>namespace</field> + <justification>The namespace changes with every version, so this is definitely an intentional change.</justification> + </difference> + </ignored> </configuration> </plugin> </plugins> diff --git a/modules/plugins/database/intentional-api-changes-since-4.4.0.xml b/modules/plugins/database/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..d1f007a --- /dev/null +++ b/modules/plugins/database/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<differences> + <difference> + <className>org/rhq/plugins/database/DatabaseQueryUtility</className> + <differenceType>7009</differenceType><!-- decreased visibility --> + <method>DatabaseQueryUtility()</method> + <justification>This is a static utility class, so holding a reference to it doesn't make sense. People should correct their code if they did so.</justification> + </difference> + <difference> + <className>org/rhq/plugins/database/DatabaseQueryUtility$StatementParameter</className> + <differenceType>8001</differenceType><!-- class removed --> + <justification>Removed an unused class.</justification> + </difference> +</differences> diff --git a/modules/plugins/jboss-as-5/intentional-api-changes-since-4.4.0.xml b/modules/plugins/jboss-as-5/intentional-api-changes-since-4.4.0.xml new file mode 100644 index 0000000..a6fa4c9 --- /dev/null +++ b/modules/plugins/jboss-as-5/intentional-api-changes-since-4.4.0.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<differences> + <difference> + <className>org/rhq/plugins/jbossas5/Ejb2BeanComponent</className> + <differenceType>7004</differenceType><!-- number of arguments changed --> + <method>org.jboss.managed.api.ManagedComponent getManagedComponent()</method> + <justification> + This difference is due to fixes applied for bug 835113. The old method signature cannot be added back because it would re-introduce the problem fixed by bug 835113. + This method is just protected so it is not visible (or available for use) outside of inheriting classes. + Also, this method is just an override for a base method from ManagedComponentComponent. The base class, ManagedComponentComponent, still has both methods available for use. + The fix for bug 835113 had the Ejb2BeanComponent override a different base method. + + Based on this, no action to be taken for this difference. + </justification> + </difference> +</differences> diff --git a/pom.xml b/pom.xml index 61343ef..b1a59d4 100644 --- a/pom.xml +++ b/pom.xml @@ -191,6 +191,10 @@ <!-- a default value for the child modules indicating that the module is not part of our public API and is therefore not API-checked. --> <rhq.internal>true</rhq.internal> + + <!-- The name of the file in the module's root dir that contains the intentional + api changes to be ignored by Clirr api checks --> + <intentional-api-changes-file>intentional-api-changes-since-${signature-check-base-version}.xml</intentional-api-changes-file> </properties>
@@ -1373,8 +1377,12 @@ </comparisonArtifacts> <logResults>true</logResults> <xmlOutputFile>${project.build.directory}/${project.build.finalName}.signature-check.xml</xmlOutputFile> - <failOnError>false</failOnError> + <failOnError>true</failOnError> + <failOnWarning>true</failOnWarning> <skip>${rhq.internal}</skip> + <!-- note that this is only available in clirr maven plugin 2.5, but internally we use a patched version for our CI builds. + Once new Clirr maven plugin is released, this will work for you, too. --> + <ignoredDifferencesFile>${intentional-api-changes-file}</ignoredDifferencesFile> </configuration> </execution> </executions>
commit 26b37482f90fb01a6771c5c51471e2754dc3cdb4 Author: Elias Ross elias_ross@apple.com Date: Thu Aug 16 14:08:58 2012 -0700
Bug 848938 - JMX Plugin - Leaking connector thread
Ensure connectors are closed during discovery; e.g.
"Thread-2461" daemon prio=10 tid=0x000000006103c800 nid=0x5fc0 waiting on condition [0x00002aab178bb000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at com.sun.jmx.remote.internal.ClientCommunicatorAdmin$Checker.run(ClientCommunicatorAdmin.java:154)
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/JMXDiscoveryComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/JMXDiscoveryComponent.java index e8072ea..1068bb5 100644 --- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/JMXDiscoveryComponent.java +++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/JMXDiscoveryComponent.java @@ -119,27 +119,27 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual
@Override public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) { - Set<DiscoveredResourceDetails> discoveredResources = new LinkedHashSet<DiscoveredResourceDetails>(); + Set<DiscoveredResourceDetails> discoveredResources = new LinkedHashSet<DiscoveredResourceDetails>(); Map<String, List<DiscoveredResourceDetails>> duplicatesByKey = new LinkedHashMap<String, List<DiscoveredResourceDetails>>();
// Filter out JBoss, Tomcat, etc. processes, which will be represented by more specific types of Resources // discovered by other plugins. - List<ProcessScanResult> nonExcludedProcesses = getNonExcludedJavaProcesses(context); + List<ProcessScanResult> nonExcludedProcesses = getNonExcludedJavaProcesses(context);
for (ProcessScanResult process : nonExcludedProcesses) { try { ProcessInfo processInfo = process.getProcessInfo(); DiscoveredResourceDetails details = discoverResourceDetails(context, processInfo); if (details != null) { - //detect discovered jmx resources that are erroneously using the same key - if (discoveredResources.contains(details)) { + //detect discovered jmx resources that are erroneously using the same key + if (discoveredResources.contains(details)) { List<DiscoveredResourceDetails> duplicates = duplicatesByKey.get(details.getResourceKey()); if (duplicates == null) { duplicates = new ArrayList<DiscoveredResourceDetails>(); duplicatesByKey.put(details.getResourceKey(), duplicates); } - duplicates.add(details); - } + duplicates.add(details); + } discoveredResources.add(details); } } catch (RuntimeException re) { @@ -151,7 +151,7 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual } } } - + //Log the erroneous collisions and take them out of the discoveredResource list. for (String duplicateKey : duplicatesByKey.keySet()) { List<DiscoveredResourceDetails> duplicates = duplicatesByKey.get(duplicateKey); @@ -168,7 +168,7 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual private List<ProcessScanResult> getNonExcludedJavaProcesses(ResourceDiscoveryContext context) { // This is the list of all currently running java processes. List<ProcessScanResult> javaProcesses = context.getAutoDiscoveredProcesses(); - + List<ProcessScanResult> nonExcludedJavaProcesses = new ArrayList<ProcessScanResult>(); Set<String> processExcludes = getProcessExcludes(); for (ProcessScanResult javaProcess : javaProcesses) { @@ -199,7 +199,7 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual return false; }
- protected Set<String> getProcessExcludes() { + protected Set<String> getProcessExcludes() { Set<String> processExcludes; String overrideProcessExcludes = System.getProperty(SYSPROP_RHQ_JMXPLUGIN_PROCESS_FILTERS); if (overrideProcessExcludes != null) { @@ -240,7 +240,7 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual } throw new RuntimeException("Failed to connect to JVM with connector address [" + connectorAddress + "].", e); } - + String key = connectorAddress; String name = connectorAddress;
@@ -321,9 +321,17 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual throw new RuntimeException("Failed to parse connector address: " + connectorAddress, e); }
- JMXConnector jmxConnector; + JMXConnector jmxConnector = null; + Long pid; try { jmxConnector = connect(jmxServiceURL); + MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection(); + RuntimeMXBean runtimeMXBean = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConnection, + ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class); + pid = getJvmPid(runtimeMXBean); + if (pid == null) { + throw new RuntimeException("Failed to determine JVM pid by parsing JVM name."); + } } catch (SecurityException e) { // Authentication failed, which most likely means the username and password are not set correctly in // the Resource's plugin config. This is not an error, so return null. @@ -337,19 +345,8 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual log.debug("Unable to upgrade key of JVM Resource with key [" + inventoriedResource.getResourceKey() + "], since connecting to its JMX service URL [" + jmxServiceURL + "] failed: " + e); return null; - } - - Long pid; - try { - MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection(); - RuntimeMXBean runtimeMXBean = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConnection, - ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class); - pid = getJvmPid(runtimeMXBean); - if (pid == null) { - throw new RuntimeException("Failed to determine JVM pid by parsing JVM name."); - } - } catch (Exception e) { - throw new RuntimeException("Failed to determine pid of JVM at [" + jmxServiceURL + "].", e); + } finally { + close(jmxConnector); }
List<ProcessInfo> processes = inventoriedResource.getSystemInformation().getProcesses( @@ -378,6 +375,13 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual return null; }
+ private void close(JMXConnector jmxConnector) { + try { + if (jmxConnector != null) + jmxConnector.close(); + } catch (Exception e) {} + } + private static Long getJvmPid(RuntimeMXBean runtimeMXBean) { Long pid; String jvmName = runtimeMXBean.getName(); @@ -431,8 +435,8 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual pluginConfig.put(new PropertySimple(CONNECTION_TYPE, J2SE5ConnectionTypeDescriptor.class.getName())); if (jmxRemotingPort != null) { pluginConfig.put(new PropertySimple(CONNECTOR_ADDRESS_CONFIG_PROPERTY, jmxServiceURL)); - } - + } + return new DiscoveredResourceDetails(context.getResourceType(), key.toString(), name, version, description, pluginConfig, process); } @@ -463,30 +467,29 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual JMXConnector jmxConnector = null; try { jmxConnector = connect(jmxServiceURL); + return getJavaVersion(jmxConnector); } catch (SecurityException e) { log.warn("Unable to to authenticate to JMX service URL [" + jmxServiceURL + "]: " + e.getMessage()); } catch (IOException e) { log.error("Failed to connect to JMX service URL [" + jmxServiceURL + "].", e); + } catch (Exception e) { + log.error("Failed to determine JVM version for process [" + process.getPid() + "] with command line [" + + Arrays.asList(process.getCommandLine()) + "].", e); + } finally { + close(jmxConnector); } - String version; - if (jmxConnector != null) { - try { + // TODO: We could exec "java -version" here. + return null; + }
- MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection(); - RuntimeMXBean runtimeMXBean = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConnection, - ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class); - version = runtimeMXBean.getSystemProperties().get(SYSPROP_JAVA_VERSION); - if (version == null) { - throw new IllegalStateException("System property [" + SYSPROP_JAVA_VERSION + "] is not defined."); - } - } catch (Exception e) { - log.error("Failed to determine JVM version for process [" + process.getPid() + "] with command line [" + - Arrays.asList(process.getCommandLine()) + "].", e); - version = null; - } - } else { - // TODO: We could exec "java -version" here. - version = null; + protected String getJavaVersion(JMXConnector jmxConnector) throws Exception { + String version; + MBeanServerConnection mbeanServerConnection = jmxConnector.getMBeanServerConnection(); + RuntimeMXBean runtimeMXBean = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConnection, + ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class); + version = runtimeMXBean.getSystemProperties().get(SYSPROP_JAVA_VERSION); + if (version == null) { + throw new IllegalStateException("System property [" + SYSPROP_JAVA_VERSION + "] is not defined."); } return version; } @@ -540,7 +543,7 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual String className = null; for (int i = 1; i < process.getCommandLine().length; i++) { String arg = process.getCommandLine()[i]; - + if (!arg.startsWith("-")) { className = arg; break; @@ -575,4 +578,4 @@ public class JMXDiscoveryComponent implements ResourceDiscoveryComponent, Manual return null; }
-} \ No newline at end of file +}
commit 9f1758393926e3a980b7148938aa358430762053 Author: Jirka Kremser jkremser@redhat.com Date: Wed Sep 19 13:29:01 2012 +0200
[BZ 858533 - Global uncaught exception with 'New' group creation from 'All groups'] NPE was thrown, it was regression of b54ce46
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java index fd617c2..dd5cadc 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java @@ -212,7 +212,8 @@ public class ResourceGroupListView extends Table<ResourceGroupCompositeDataSourc Permission.MANAGE_INVENTORY) { public void executeAction(ListGridRecord[] selection, Object actionValue) { GroupCategory category = null; - String categoryString = getInitialCriteria().getAttribute(ResourceGroupDataSourceField.CATEGORY.propertyName()); + String categoryString = getInitialCriteria() == null ? null : getInitialCriteria().getAttribute( + ResourceGroupDataSourceField.CATEGORY.propertyName()); if (categoryString != null) { category = GroupCategory.COMPATIBLE.name().equals(categoryString) ? GroupCategory.COMPATIBLE : GroupCategory.MIXED; }
commit 6887631b55d273e017257eea610dc5b0df8af1fa Author: Elias Ross elias_ross@apple.com Date: Tue Jul 10 14:19:49 2012 -0700
Bug 839080 - ProcessInfoQuery does not properly handle pidfile with line ending or whitespace
diff --git a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Attribute.java b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Attribute.java index 5c06b66..b9962ea 100644 --- a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Attribute.java +++ b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Attribute.java @@ -35,7 +35,7 @@ class Attribute { name, basename, pidfile, pid }
- private String attributeValue; + private final String attributeValue;
Attribute(String attributeValue, Category category) { validate(attributeValue, category); diff --git a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Conditional.java b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Conditional.java index 3867fe2..cb7a48d 100644 --- a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Conditional.java +++ b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/Conditional.java @@ -33,7 +33,7 @@ package org.rhq.core.system.pquery; * @author John Mazzitelli */ class Conditional { - char separator = '|'; + private char separator = '|';
enum Category { process, arg @@ -47,10 +47,10 @@ class Conditional { unspecified, parent }
- private Category category; - private Attribute attribute; - private Operator operator; - private Qualifier qualifier; + private final Category category; + private final Attribute attribute; + private final Operator operator; + private final Qualifier qualifier;
Conditional(String conditional) { char possibleSeparator = conditional.charAt(0); @@ -74,9 +74,6 @@ class Conditional { try { this.category = Category.valueOf(categoryString); } catch (Exception e) { - } - - if (this.category == null) { throw new IllegalArgumentException("Invalid category: " + conditional); }
@@ -85,9 +82,6 @@ class Conditional { try { this.operator = Operator.valueOf(operatorString); } catch (Exception e) { - } - - if (this.operator == null) { throw new IllegalArgumentException("Invalid operator: " + conditional); }
@@ -95,10 +89,7 @@ class Conditional { try { this.qualifier = Qualifier.valueOf(qualifierString); } catch (Exception e) { - } - - if (this.qualifier == null) { - throw new IllegalArgumentException("Invalid qualifier: " + conditional); + throw new IllegalArgumentException("Invalid qualifier: " + qualifierString); } } else { this.qualifier = Qualifier.unspecified; diff --git a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/ProcessInfoQuery.java b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/ProcessInfoQuery.java index 1e9eeb3..0a05df3 100644 --- a/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/ProcessInfoQuery.java +++ b/modules/core/native-system/src/main/java/org/rhq/core/system/pquery/ProcessInfoQuery.java @@ -22,13 +22,20 @@ */ package org.rhq.core.system.pquery;
+import java.io.BufferedReader; import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.rhq.core.system.NativeSystemInfo; import org.rhq.core.system.ProcessInfo; import org.rhq.core.system.pquery.Conditional.Qualifier; @@ -182,10 +189,13 @@ import org.rhq.core.system.pquery.Conditional.Qualifier; * @author John Mazzitelli */ public class ProcessInfoQuery { + + private static final Log log = LogFactory.getLog(ProcessInfoQuery.class); + /** * The map of all processes keyed on their pids. */ - private Map<Long, ProcessInfo> allProcesses; + private final Map<Long, ProcessInfo> allProcesses;
/** * Constructor for {@link ProcessInfoQuery} given an collection of process information that represents the processes @@ -458,16 +468,22 @@ public class ProcessInfoQuery { String contents;
try { - byte[] bytes = new byte[64]; // a pid file should never come close to being 64 bytes big FileInputStream fis = new FileInputStream(pidfileName); + BufferedReader br = new BufferedReader(new InputStreamReader(fis)); try { - int count = fis.read(bytes); - contents = new String(bytes, 0, count); + contents = br.readLine(); + if (contents == null) { + throw new IOException("empty pid"); + } } finally { fis.close(); } - } catch (Exception e) { - contents = ""; + } catch (FileNotFoundException e) { + log.trace("pid not found"); + return ""; + } catch (IOException e) { + log.warn("unable to read pid file " + pidfileName, e); + return ""; }
return contents.trim(); diff --git a/modules/core/native-system/src/test/java/org/rhq/core/system/pquery/ProcessInfoQueryTest.java b/modules/core/native-system/src/test/java/org/rhq/core/system/pquery/ProcessInfoQueryTest.java index 466983a..a894a73 100644 --- a/modules/core/native-system/src/test/java/org/rhq/core/system/pquery/ProcessInfoQueryTest.java +++ b/modules/core/native-system/src/test/java/org/rhq/core/system/pquery/ProcessInfoQueryTest.java @@ -24,8 +24,11 @@ package org.rhq.core.system.pquery;
import java.io.File; import java.io.FileOutputStream; +import java.io.FileWriter; import java.util.ArrayList; import java.util.List; +import java.util.UUID; + import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.rhq.core.system.ProcessInfo; @@ -262,16 +265,13 @@ public class ProcessInfoQueryTest {
/** * Test PID files. - * - * @throws Exception */ public void testPIQLPidfile() throws Exception { File pidfile = File.createTempFile("test", ".pid"); try { - FileOutputStream fos = new FileOutputStream(pidfile); - fos.write("3".getBytes()); - fos.flush(); - fos.close(); + FileWriter fw = new FileWriter(pidfile); + fw.write("3"); + fw.close();
results = query.query("process|pidfile|match=" + pidfile.getCanonicalPath()); assert results.size() == 1 : results; @@ -346,6 +346,30 @@ public class ProcessInfoQueryTest { }
/** + * Test PID files with whitespace or empty files. + */ + public void testPIQLPidfileWhitespace() throws Exception { + File pidfile = File.createTempFile("test", ".pid"); + try { + results = query.query("process|pidfile|match=" + pidfile.getCanonicalPath()); + assert results.size() == 0 : results; + + FileWriter fw = new FileWriter(pidfile); + fw.write(" 3\r\n"); + fw.close(); + + results = query.query("process|pidfile|match=" + pidfile.getCanonicalPath()); + assert results.size() == 1 : results; + } finally { + pidfile.delete(); + } + results = query.query("process|pidfile|match=" + pidfile.getCanonicalPath()); + assert results.size() == 0 : results; + results = query.query("process|pidfile|match=" + UUID.randomUUID()); + assert results.size() == 0 : results; + } + + /** * Test regular expressions. */ public void testPIQLProcessNameRegularExpression() { @@ -660,4 +684,4 @@ public class ProcessInfoQueryTest { // do nothing } } -} \ No newline at end of file +}
commit bf4b25f421769909e886eb42f7b99c66b207b200 Author: Elias Ross elias_ross@apple.com Date: Sat Aug 18 23:03:34 2012 -0700
rhq-script-plugin does not always capture process output
Ensure output thread completes before exiting startProgram()
Use concurrent library to clean up exit code processing.
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java index ccbe045..308d9bd 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java @@ -33,6 +33,12 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException;
import org.rhq.core.util.UtilI18NResourceKeys;
@@ -45,6 +51,9 @@ import org.rhq.core.util.UtilI18NResourceKeys; * @author John Mazzitelli */ public class ProcessExecutor { + + private static ExecutorService threadPool = Executors.newCachedThreadPool(); + /** * This executes any operating system process as described in the given start command. When this method returns, it * can be assumed that the process was launched but not necessarily finished. The caller can ask this method to @@ -78,7 +87,6 @@ public class ProcessExecutor { * * @return process exit code (if the method waited for it to exit) or <code>null</code> if this method was to only * start the process but not wait or was to wait and the wait time expired before the process exited - * * @throws Exception if any error occurs while trying to start the child process */ protected Integer startProgram(final ProcessToStart process) throws Exception { @@ -91,47 +99,77 @@ public class ProcessExecutor { final Process childProcess = Runtime.getRuntime().exec(cmdline, environment, workingDir);
// redirect the program's streams - // WARNING: - // It seems there is no way to get around a possible race condition - what if the process - // was so fast that it exited already? We didn't get a chance to capture its output. - // I see a unit test that periodically fails because it doesn't get any captured output when - // it should - I think it is because of this race condition. But there is no Java API that - // let's me redirect a process' streams before the process is told to start. - redirectStreams(process, childProcess); - - final Integer[] retExitCode = new Integer[1]; + final RedirectThreads redirect = redirectStreams(process, childProcess); + Integer exitCode = null;
// wait if told to - note that the default is not to wait if (process.getWaitForExit().intValue() > 0) { - Thread waitThread = new Thread("ExecuteProcess-" + process.getProgramTitle()) { - public void run() { + Callable<Integer> call = new Callable() { + public Integer call() throws Exception { + Thread.currentThread().setName("ExecuteProcess-" + process.getProgramTitle()); try { - int exitCode = childProcess.waitFor(); - retExitCode[0] = new Integer(exitCode); - } catch (InterruptedException e) { + return childProcess.waitFor(); + } finally { + // wait for I/O to finish + redirect.join(); } } }; - - waitThread.setDaemon(true); - waitThread.start(); + Future<Integer> future = threadPool.submit(call); try { - waitThread.join(process.getWaitForExit().intValue()); + exitCode = future.get(process.getWaitForExit().intValue(), TimeUnit.MILLISECONDS); } catch (InterruptedException ie) { // this might happen if the launching thread got interrupted + Thread.currentThread().interrupt(); + } catch (TimeoutException e) { + // the documentation requires we return null } finally { - waitThread.interrupt(); + future.cancel(true); }
- if (retExitCode[0] == null) { + if (exitCode == null) { // never got the exit code so the wait time must have expired, kill the process if configured to do so if (process.isKillOnTimeout().booleanValue()) { childProcess.destroy(); } + // cancel the output threads + redirect.interrupt(); } }
- return retExitCode[0]; + return exitCode; + } + + /** + * Wrapper for threads used for capturing output. + * Call {@link #join} to wait for output to be fully captured. + */ + protected static class RedirectThreads { + + private final StreamRedirector stdout; + private final StreamRedirector stderr; + + private RedirectThreads(StreamRedirector stdout, StreamRedirector stderr) { + this.stdout = stdout; + this.stderr = stderr; + } + + /** + * Waits for output to be fully captured. + */ + public void join() throws InterruptedException { + stderr.join(); + stdout.join(); + } + + /** + * Interrupts these threads. + */ + public void interrupt() { + stderr.interrupt(); + stdout.interrupt(); + } + }
/** @@ -146,8 +184,9 @@ public class ProcessExecutor { * @param childProcess the newly spawned child process * * @throws IOException if failed to pipe data to/from stdin/stdout + * @return RedirectThreads containing a handle to the threads redirecting output */ - protected void redirectStreams(ProcessToStart process, Process childProcess) throws IOException { + protected RedirectThreads redirectStreams(ProcessToStart process, Process childProcess) throws IOException { // Process.getInputStream is actually the process's stdout output // Process.getOutputStream is actually the process's stdin intput // Process.getErrorStream is the process's stderr output @@ -175,7 +214,6 @@ public class ProcessExecutor { }
StreamRedirector stdoutThread = new StreamRedirector(threadNamePrefix + "-stdout", stdout, fileOutputStream); - StreamRedirector stderrThread = new StreamRedirector(threadNamePrefix + "-stderr", stderr, fileOutputStream);
stdoutThread.start(); @@ -201,7 +239,7 @@ public class ProcessExecutor {
stdin.close();
- return; + return new RedirectThreads(stdoutThread, stderrThread); }
/** @@ -372,7 +410,7 @@ public class ProcessExecutor { String result = progFile.getPath();
// If executable verification has been turned off then assume the caller wants his executable "as-is". - // Otherwise, validate and ensure a full path. + // Otherwise, validate and ensure a full path. if (Boolean.TRUE.equals(process.isCheckExecutableExists())) { if (!progFile.exists()) { throw new FileNotFoundException(UtilI18NResourceKeys.MSG.getMsg( @@ -453,4 +491,4 @@ public class ProcessExecutor { String newFileName = file.getCanonicalPath() + timestamp; file.renameTo(new File(newFileName)); } -} \ No newline at end of file +} diff --git a/modules/core/util/src/test/java/org/rhq/core/util/exec/ProcessExecTest.java b/modules/core/util/src/test/java/org/rhq/core/util/exec/ProcessExecTest.java index 97dcdaa..49ab3f5 100644 --- a/modules/core/util/src/test/java/org/rhq/core/util/exec/ProcessExecTest.java +++ b/modules/core/util/src/test/java/org/rhq/core/util/exec/ProcessExecTest.java @@ -34,10 +34,8 @@ import org.testng.annotations.Test; @Test public class ProcessExecTest { public void testProcessExecOutputStream() { - int tries = 0; - - while (true) { - tries++; + // run multiple times to ensure race condition fixed + for (int i = 0; i < 100; i++) { ProcessToStart start = new ProcessToStart();
setupProgram(start); @@ -52,16 +50,8 @@ public class ProcessExecTest { assert results.getError() == null : "Should not have failed: " + results; assert results.getExitCode() != null : "Should have had exit code: " + results;
- // there are some times when we can't get the output - see comments in ProcessExecutor.startProgram - // if we failed to get the output this time, let's try again. This is just allowing that rare - // condition to occur in our test - I know of no way via the Java API to avoid it, so let's not - // fail our test just because it happened once (but do fail if we can't get the output after so many tries) byte[] output = baos.toByteArray(); - if (output.length > 0) { - return; // we did get output so everything succeeded! we can pass the test now and just return - } - - if (tries >= 3) { + if (output.length == 0) { assert false : "Should have had some output: " + results; } } @@ -116,4 +106,4 @@ public class ProcessExecTest { start.setArguments(new String[] { "/bin" }); } } -} \ No newline at end of file +}
commit 6314bfb9675380bd8d4194800b54f608bf00acda Author: Jirka Kremser jkremser@redhat.com Date: Tue Sep 18 14:53:48 2012 +0200
[BZ 848494 - Metric graphs on dashboards uses the client's time for obtaining the data] System.currentTimeMillis() is now invoked on the server side for the metric graphs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java index f0a2cab..96fd3d3 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupMetricsPortlet.java @@ -87,6 +87,8 @@ public class GroupMetricsPortlet extends LocatableVLayout implements CustomSetti protected boolean currentlyLoading = false; protected long start = -1; protected long end = -1; + protected int lastN = -1; + protected int units = -1;
// A non-displayed, persisted identifier for the portlet public static final String KEY = "GroupMetrics"; @@ -222,8 +224,10 @@ public class GroupMetricsPortlet extends LocatableVLayout implements CustomSetti column.setHeight(10);//pack
//initialize to defaults - end = System.currentTimeMillis(); - start = end - (1000L * 60 * 60 * 8);//last 8 hrs + end = -1; + start = -1; + lastN = -1; + units = -1;
//result timeframe if enabled PropertySimple property = portletConfig.getSimple(Constant.METRIC_RANGE_ENABLE); @@ -244,13 +248,10 @@ public class GroupMetricsPortlet extends LocatableVLayout implements CustomSetti //Simple time settings property = portletConfig.getSimple(Constant.METRIC_RANGE_LASTN); if (property != null) { - int lastN = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_LASTN, + lastN = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_LASTN, Constant.METRIC_RANGE_LASTN_DEFAULT)); - int units = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_UNIT, + units = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_UNIT, Constant.METRIC_RANGE_UNIT_DEFAULT)); - ArrayList<Long> beginEnd = MeasurementUtility.calculateTimeFrame(lastN, units); - start = Long.valueOf(beginEnd.get(0)); - end = Long.valueOf(beginEnd.get(1)); } } } @@ -323,141 +324,150 @@ public class GroupMetricsPortlet extends LocatableVLayout implements CustomSetti .getId(); }
- //make the asynchronous call for all the measurement data - GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroup( - groupId, definitionArrayIds, start, end, 60, - new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { - @Override - public void onFailure(Throwable caught) { - Log.debug("Error retrieving recent metrics charting data for group [" - + groupId + "]:" + caught.getMessage()); - setRefreshing(false); - } - - @Override - public void onSuccess( - List<List<MeasurementDataNumericHighLowComposite>> results) { - if (!results.isEmpty()) { - boolean someChartedData = false; - //iterate over the retrieved charting data - for (int index = 0; index < displayOrder.length; index++) { - //retrieve the correct measurement definition - MeasurementDefinition md = measurementDefMap - .get(displayOrder[index]); - - //load the data results for the given metric definition - List<MeasurementDataNumericHighLowComposite> data = results - .get(index); - - //locate last and minimum values. - double lastValue = -1; - double minValue = Double.MAX_VALUE;// - for (MeasurementDataNumericHighLowComposite d : data) { - if ((!Double.isNaN(d.getValue())) - && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { - if (d.getValue() < minValue) { - minValue = d.getValue(); - } - lastValue = d.getValue(); + AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>> callback = new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { + @Override + public void onFailure(Throwable caught) { + Log.debug("Error retrieving recent metrics charting data for group [" + + groupId + "]:" + caught.getMessage()); + setRefreshing(false); + } + + @Override + public void onSuccess( + List<List<MeasurementDataNumericHighLowComposite>> results) { + if (!results.isEmpty()) { + boolean someChartedData = false; + //iterate over the retrieved charting data + for (int index = 0; index < displayOrder.length; index++) { + //retrieve the correct measurement definition + MeasurementDefinition md = measurementDefMap + .get(displayOrder[index]); + + //load the data results for the given metric definition + List<MeasurementDataNumericHighLowComposite> data = results + .get(index); + + //locate last and minimum values. + double lastValue = -1; + double minValue = Double.MAX_VALUE;// + for (MeasurementDataNumericHighLowComposite d : data) { + if ((!Double.isNaN(d.getValue())) + && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { + if (d.getValue() < minValue) { + minValue = d.getValue(); } + lastValue = d.getValue(); } + }
- //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline) - String commaDelimitedList = ""; + //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline) + String commaDelimitedList = "";
- for (MeasurementDataNumericHighLowComposite d : data) { - if ((!Double.isNaN(d.getValue())) - && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { - commaDelimitedList += d.getValue() + ","; - } - } - LocatableDynamicForm row = new LocatableDynamicForm( - recentMeasurementsContent.extendLocatorId(md.getName())); - row.setNumCols(3); - HTMLFlow graph = new HTMLFlow(); - // String contents = "<span id='sparkline_" + index + "' class='dynamicsparkline' width='0'>" - // + commaDelimitedList + "</span>"; - String contents = "<span id='sparkline_" + index - + "' class='dynamicsparkline' width='0' " + "values='" - + commaDelimitedList + "'>...</span>"; - graph.setContents(contents); - graph.setContentsType(ContentsType.PAGE); - //diable scrollbars on span - graph.setScrollbarSize(0); - - CanvasItem graphContainer = new CanvasItem(); - graphContainer.setShowTitle(false); - graphContainer.setHeight(16); - graphContainer.setWidth(60); - graphContainer.setCanvas(graph); - - //Link/title element - final String title = md.getDisplayName(); - // String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricSingleResource&id=" - // + resourceId + "&m=" + md.getId(); - final String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricMultiResource&groupId=" - + groupId + "&m=" + md.getId(); - LinkItem link = AbstractActivityView.newLinkItem(title, - destination); - link.addClickHandler(new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - ChartViewWindow window = new ChartViewWindow( - recentMeasurementsContent - .extendLocatorId("ChartWindow"), title); - //generate and include iframed content - FullHTMLPane iframe = new FullHTMLPane( - recentMeasurementsContent - .extendLocatorId("View"), destination); - // .extendLocatorId("View"), - // AbstractActivityView.iframeLink(destination)); - window.addItem(iframe); - window.show(); - } - }); - - //Value - String convertedValue = lastValue + " " + md.getUnits(); - convertedValue = AbstractActivityView - .convertLastValueForDisplay(lastValue, md); - StaticTextItem value = AbstractActivityView - .newTextItem(convertedValue); - - row.setItems(graphContainer, link, value); - //if graph content returned - if ((md.getName().trim().indexOf("Trait.") == -1) - && (lastValue != -1)) { - column.addMember(row); - someChartedData = true; + for (MeasurementDataNumericHighLowComposite d : data) { + if ((!Double.isNaN(d.getValue())) + && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { + commaDelimitedList += d.getValue() + ","; } } - if (!someChartedData) {// when there are results but no chartable entries. - LocatableDynamicForm row = AbstractActivityView.createEmptyDisplayRow( - recentMeasurementsContent.extendLocatorId("None"), - AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE); + LocatableDynamicForm row = new LocatableDynamicForm( + recentMeasurementsContent.extendLocatorId(md.getName())); + row.setNumCols(3); + HTMLFlow graph = new HTMLFlow(); + // String contents = "<span id='sparkline_" + index + "' class='dynamicsparkline' width='0'>" + // + commaDelimitedList + "</span>"; + String contents = "<span id='sparkline_" + index + + "' class='dynamicsparkline' width='0' " + "values='" + + commaDelimitedList + "'>...</span>"; + graph.setContents(contents); + graph.setContentsType(ContentsType.PAGE); + //diable scrollbars on span + graph.setScrollbarSize(0); + + CanvasItem graphContainer = new CanvasItem(); + graphContainer.setShowTitle(false); + graphContainer.setHeight(16); + graphContainer.setWidth(60); + graphContainer.setCanvas(graph); + + //Link/title element + final String title = md.getDisplayName(); + // String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricSingleResource&id=" + // + resourceId + "&m=" + md.getId(); + final String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricMultiResource&groupId=" + + groupId + "&m=" + md.getId(); + LinkItem link = AbstractActivityView.newLinkItem(title, + destination); + link.addClickHandler(new ClickHandler() { + @Override + public void onClick(ClickEvent event) { + ChartViewWindow window = new ChartViewWindow( + recentMeasurementsContent + .extendLocatorId("ChartWindow"), title); + //generate and include iframed content + FullHTMLPane iframe = new FullHTMLPane( + recentMeasurementsContent + .extendLocatorId("View"), destination); + // .extendLocatorId("View"), + // AbstractActivityView.iframeLink(destination)); + window.addItem(iframe); + window.show(); + } + }); + + //Value + String convertedValue = lastValue + " " + md.getUnits(); + convertedValue = AbstractActivityView + .convertLastValueForDisplay(lastValue, md); + StaticTextItem value = AbstractActivityView + .newTextItem(convertedValue); + + row.setItems(graphContainer, link, value); + //if graph content returned + if ((md.getName().trim().indexOf("Trait.") == -1) + && (lastValue != -1)) { column.addMember(row); - } else { - //insert see more link - LocatableDynamicForm row = new LocatableDynamicForm( - recentMeasurementsContent - .extendLocatorId("RecentMeasurementsContentSeeMore")); - String link = LinkManager - .getGroupMonitoringGraphsLink(EntityContext - .forGroup(groupId)); - AbstractActivityView.addSeeMoreLink(row, link, column); + someChartedData = true; } - //call out to 3rd party javascript lib - BrowserUtility.graphSparkLines(); - } else { - LocatableDynamicForm row = AbstractActivityView - .createEmptyDisplayRow( - recentMeasurementsContent.extendLocatorId("None"), - AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE); + } + if (!someChartedData) {// when there are results but no chartable entries. + LocatableDynamicForm row = AbstractActivityView.createEmptyDisplayRow( + recentMeasurementsContent.extendLocatorId("None"), + AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE); column.addMember(row); + } else { + //insert see more link + LocatableDynamicForm row = new LocatableDynamicForm( + recentMeasurementsContent + .extendLocatorId("RecentMeasurementsContentSeeMore")); + String link = LinkManager + .getGroupMonitoringGraphsLink(EntityContext + .forGroup(groupId)); + AbstractActivityView.addSeeMoreLink(row, link, column); } - setRefreshing(false); + //call out to 3rd party javascript lib + BrowserUtility.graphSparkLines(); + } else { + LocatableDynamicForm row = AbstractActivityView + .createEmptyDisplayRow( + recentMeasurementsContent.extendLocatorId("None"), + AbstractActivityView.RECENT_MEASUREMENTS_GROUP_NONE); + column.addMember(row); } - }); + setRefreshing(false); + } + }; + + //make the asynchronous call for all the measurement data + if (end != -1 && start != -1) { + GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroup( + groupId, definitionArrayIds, start, end, 60, callback); + } else if (lastN != -1 && units != -1) { + GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroupForLast( + groupId, definitionArrayIds, lastN, units, 60, callback); + } else { + GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroupForLast( + groupId, definitionArrayIds, 8, MeasurementUtility.UNIT_HOURS, 60, callback); + } } }); } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java index 16869ff..a2a9494 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java @@ -18,6 +18,12 @@ */ package org.rhq.enterprise.gui.coregui.client.dashboard.portlets.resource;
+import java.util.Arrays; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Set; + import com.google.gwt.user.client.rpc.AsyncCallback; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.ContentsType; @@ -31,6 +37,7 @@ import com.smartgwt.client.widgets.form.fields.StaticTextItem; import com.smartgwt.client.widgets.form.fields.events.ClickEvent; import com.smartgwt.client.widgets.form.fields.events.ClickHandler; import com.smartgwt.client.widgets.layout.VLayout; + import org.rhq.core.domain.common.EntityContext; import org.rhq.core.domain.configuration.Configuration; import org.rhq.core.domain.configuration.PropertySimple; @@ -57,8 +64,6 @@ import org.rhq.enterprise.gui.coregui.client.util.Log; import org.rhq.enterprise.gui.coregui.client.util.MeasurementUtility; import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
-import java.util.*; - /**This portlet allows the end user to customize the metric display * * @author Simeon Pinder @@ -104,8 +109,10 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { column.setWidth100();
//initialize to defaults - end = System.currentTimeMillis(); - start = end - (1000L * 60 * 60 * 8);//last 8 hrs + end = -1; + start = -1; + lastN = -1; + units = -1;
//result timeframe if enabled PropertySimple property = portletConfig.getSimple(Constant.METRIC_RANGE_ENABLE); @@ -126,13 +133,10 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { //Simple time settings property = portletConfig.getSimple(Constant.METRIC_RANGE_LASTN); if (property != null) { - int lastN = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_LASTN, + lastN = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_LASTN, Constant.METRIC_RANGE_LASTN_DEFAULT)); - int units = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_UNIT, + units = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_UNIT, Constant.METRIC_RANGE_UNIT_DEFAULT)); - ArrayList<Long> beginEnd = MeasurementUtility.calculateTimeFrame(lastN, units); - start = Long.valueOf(beginEnd.get(0)); - end = Long.valueOf(beginEnd.get(1)); } } } @@ -189,153 +193,162 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { definitionArrayIds[index++] = measurementDefMap.get(definitionToDisplay) .getId(); } - - //make the asynchronous call for all the measurement data - GWTServiceLookup.getMeasurementDataService().findDataForResource(resourceId, - definitionArrayIds, start, end, 60, - new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { - @Override - public void onFailure(Throwable caught) { - Log.debug("Error retrieving recent metrics charting data for resource [" - + resourceId + "]:" + caught.getMessage()); - setRefreshing(false); - } - - @Override - public void onSuccess( - List<List<MeasurementDataNumericHighLowComposite>> results) { - if (!results.isEmpty()) { - boolean someChartedData = false; - //iterate over the retrieved charting data - for (int index = 0; index < displayOrder.length; index++) { - //retrieve the correct measurement definition - MeasurementDefinition md = measurementDefMap - .get(displayOrder[index]); - - //load the data results for the given metric definition - List<MeasurementDataNumericHighLowComposite> data = results - .get(index); - - //locate last and minimum values. - double lastValue = -1; - double minValue = Double.MAX_VALUE;// - for (MeasurementDataNumericHighLowComposite d : data) { - if ((!Double.isNaN(d.getValue())) - && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { - if (d.getValue() < minValue) { - minValue = d.getValue(); - } - lastValue = d.getValue(); + + AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>> callback = new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { + @Override + public void onFailure(Throwable caught) { + Log.debug("Error retrieving recent metrics charting data for resource [" + + resourceId + "]:" + caught.getMessage()); + setRefreshing(false); + } + + @Override + public void onSuccess( + List<List<MeasurementDataNumericHighLowComposite>> results) { + if (!results.isEmpty()) { + boolean someChartedData = false; + //iterate over the retrieved charting data + for (int index = 0; index < displayOrder.length; index++) { + //retrieve the correct measurement definition + MeasurementDefinition md = measurementDefMap + .get(displayOrder[index]); + + //load the data results for the given metric definition + List<MeasurementDataNumericHighLowComposite> data = results + .get(index); + + //locate last and minimum values. + double lastValue = -1; + double minValue = Double.MAX_VALUE;// + for (MeasurementDataNumericHighLowComposite d : data) { + if ((!Double.isNaN(d.getValue())) + && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { + if (d.getValue() < minValue) { + minValue = d.getValue(); } + lastValue = d.getValue(); } + }
- //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline) - String commaDelimitedList = ""; + //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline) + String commaDelimitedList = "";
- for (MeasurementDataNumericHighLowComposite d : data) { - if ((!Double.isNaN(d.getValue())) - && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { - commaDelimitedList += d.getValue() + ","; - } - } - LocatableDynamicForm row = new LocatableDynamicForm( - recentMeasurementsContent.extendLocatorId(md.getName())); - row.setNumCols(3); - row.setColWidths(65, "*", 100); - row.setWidth100(); - row.setAutoHeight(); - row.setOverflow(Overflow.VISIBLE); - HTMLFlow graph = new HTMLFlow(); - String contents = "<span id='sparkline_" + index - + "' class='dynamicsparkline' width='0' " + "values='" - + commaDelimitedList + "'>...</span>"; - graph.setContents(contents); - graph.setContentsType(ContentsType.PAGE); - //disable scrollbars on span - graph.setScrollbarSize(0); - - CanvasItem graphContainer = new CanvasItem(); - graphContainer.setShowTitle(false); - graphContainer.setHeight(16); - graphContainer.setWidth(60); - graphContainer.setCanvas(graph); - - //Link/title element - final String title = md.getDisplayName(); - final String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricSingleResource&id=" - + resourceId + "&m=" + md.getId(); - - //have link launch modal window on click - LinkItem link = AbstractActivityView.newLinkItem(title, - destination); - link.setTooltip(title); - link.setTitleVAlign(VerticalAlignment.TOP); - link.setAlign(Alignment.LEFT); - link.setClipValue(true); - link.setWrap(true); - link.setHeight(26); - link.setWidth("100%"); - link.addClickHandler(new ClickHandler() { - @Override - public void onClick(ClickEvent event) { - ChartViewWindow window = new ChartViewWindow( - recentMeasurementsContent - .extendLocatorId("ChartWindow"), title); - //generate and include iframed content - FullHTMLPane iframe = new FullHTMLPane( - recentMeasurementsContent.extendLocatorId("View"), - destination); - window.addItem(iframe); - window.show(); - } - }); - - //Value - String convertedValue; - convertedValue = AbstractActivityView - .convertLastValueForDisplay(lastValue, md); - StaticTextItem value = AbstractActivityView - .newTextItem(convertedValue); - value.setVAlign(VerticalAlignment.TOP); - value.setAlign(Alignment.RIGHT); - - row.setItems(graphContainer, link, value); - row.setWidth100(); - - //if graph content returned - if ((md.getName().trim().indexOf("Trait.") == -1) - && (lastValue != -1)) { - column.addMember(row); - someChartedData = true; + for (MeasurementDataNumericHighLowComposite d : data) { + if ((!Double.isNaN(d.getValue())) + && (String.valueOf(d.getValue()).indexOf("NaN") == -1)) { + commaDelimitedList += d.getValue() + ","; } } - if (!someChartedData) {// when there are results but no chartable entries. - LocatableDynamicForm row = AbstractActivityView - .createEmptyDisplayRow( - recentMeasurementsContent.extendLocatorId("None"), - AbstractActivityView.RECENT_MEASUREMENTS_NONE); + LocatableDynamicForm row = new LocatableDynamicForm( + recentMeasurementsContent.extendLocatorId(md.getName())); + row.setNumCols(3); + row.setColWidths(65,"*",100); + row.setWidth100(); + row.setAutoHeight(); + row.setOverflow(Overflow.VISIBLE); + HTMLFlow graph = new HTMLFlow(); + String contents = "<span id='sparkline_" + index + + "' class='dynamicsparkline' width='0' " + "values='" + + commaDelimitedList + "'>...</span>"; + graph.setContents(contents); + graph.setContentsType(ContentsType.PAGE); + //disable scrollbars on span + graph.setScrollbarSize(0); + + CanvasItem graphContainer = new CanvasItem(); + graphContainer.setShowTitle(false); + graphContainer.setHeight(16); + graphContainer.setWidth(60); + graphContainer.setCanvas(graph); + + //Link/title element + final String title = md.getDisplayName(); + final String destination = "/resource/common/monitor/Visibility.do?mode=chartSingleMetricSingleResource&id=" + + resourceId + "&m=" + md.getId(); + + //have link launch modal window on click + LinkItem link = AbstractActivityView.newLinkItem(title, + destination); + link.setTooltip(title); + link.setTitleVAlign(VerticalAlignment.TOP); + link.setAlign(Alignment.LEFT); + link.setClipValue(true); + link.setWrap(true); + link.setHeight(26); + link.setWidth("100%"); + link.addClickHandler(new ClickHandler() { + @Override + public void onClick(ClickEvent event) { + ChartViewWindow window = new ChartViewWindow( + recentMeasurementsContent + .extendLocatorId("ChartWindow"), title); + //generate and include iframed content + FullHTMLPane iframe = new FullHTMLPane( + recentMeasurementsContent.extendLocatorId("View"), + destination); + window.addItem(iframe); + window.show(); + } + }); + + //Value + String convertedValue; + convertedValue = AbstractActivityView + .convertLastValueForDisplay(lastValue, md); + StaticTextItem value = AbstractActivityView + .newTextItem(convertedValue); + value.setVAlign(VerticalAlignment.TOP); + value.setAlign(Alignment.RIGHT); + + row.setItems(graphContainer, link, value); + row.setWidth100(); + + //if graph content returned + if ((md.getName().trim().indexOf("Trait.") == -1) + && (lastValue != -1)) { column.addMember(row); - } else { - //insert see more link - LocatableDynamicForm row = new LocatableDynamicForm( - recentMeasurementsContent - .extendLocatorId("RecentMeasurementsContentSeeMore")); - String link = LinkManager - .getResourceMonitoringGraphsLink(resourceId); - AbstractActivityView.addSeeMoreLink(row, link, column); + someChartedData = true; } - //call out to 3rd party javascript lib - BrowserUtility.graphSparkLines(); - } else { + } + if (!someChartedData) {// when there are results but no chartable entries. LocatableDynamicForm row = AbstractActivityView .createEmptyDisplayRow( recentMeasurementsContent.extendLocatorId("None"), AbstractActivityView.RECENT_MEASUREMENTS_NONE); column.addMember(row); + } else { + //insert see more link + LocatableDynamicForm row = new LocatableDynamicForm( + recentMeasurementsContent + .extendLocatorId("RecentMeasurementsContentSeeMore")); + String link = LinkManager + .getResourceMonitoringGraphsLink(resourceId); + AbstractActivityView.addSeeMoreLink(row, link, column); } - setRefreshing(false); + //call out to 3rd party javascript lib + BrowserUtility.graphSparkLines(); + } else { + LocatableDynamicForm row = AbstractActivityView + .createEmptyDisplayRow( + recentMeasurementsContent.extendLocatorId("None"), + AbstractActivityView.RECENT_MEASUREMENTS_NONE); + column.addMember(row); } - }); + setRefreshing(false); + } + }; + + //make the asynchronous call for all the measurement data + if (end != -1 && start != -1) { + GWTServiceLookup.getMeasurementDataService().findDataForResource( + resourceId, definitionArrayIds, start, end, 60, callback); + } else if (lastN != -1 && units != -1) { + GWTServiceLookup.getMeasurementDataService().findDataForResourceForLast( + resourceId, definitionArrayIds, lastN, units, 60, callback); + } else { + GWTServiceLookup.getMeasurementDataService().findDataForResourceForLast( + resourceId, definitionArrayIds, 8, MeasurementUtility.UNIT_HOURS, 60, callback); + } } }); } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/MeasurementDataGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/MeasurementDataGWTService.java index 0488b0c..d056e97 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/MeasurementDataGWTService.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/MeasurementDataGWTService.java @@ -54,9 +54,15 @@ public interface MeasurementDataGWTService extends RemoteService {
List<List<MeasurementDataNumericHighLowComposite>> findDataForResource(int resourceId, int[] definitionIds, long beginTime, long endTime, int numPoints) throws RuntimeException; + + List<List<MeasurementDataNumericHighLowComposite>> findDataForResourceForLast(int resourceId, int[] definitionIds, + int lastN, int unit, int numPoints) throws RuntimeException;
List<List<MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(int groupId, int[] definitionIds, long beginTime, long endTime, int numPoints) throws RuntimeException; + + List<List<MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroupForLast(int groupId, int[] definitionIds, + int lastN, int unit, int numPoints) throws RuntimeException;
PageList<MeasurementDefinition> findMeasurementDefinitionsByCriteria(MeasurementDefinitionCriteria criteria) throws RuntimeException; diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java index 8445a46..385e557 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMetricGraphView.java @@ -323,12 +323,9 @@ public abstract class AbstractMetricGraphView extends LocatableVLayout { } }));
- long max = System.currentTimeMillis(); - long min = max - (1000L * 60 * 60 * 8); - int xTicks = getDefaultWidth() / 140;
- plotOptions.addXAxisOptions(new AxisOptions().setTicks(xTicks).setMinimum(min).setMaximum(max) + plotOptions.addXAxisOptions(new AxisOptions().setTicks(xTicks) .setTickFormatter(new TickFormatter() { public String formatTickValue(double tickValue, Axis axis) { com.google.gwt.i18n.client.DateTimeFormat dateFormat = DateTimeFormat diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java index 23f84ea..fe8b398 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/ResourceGroupMetricGraphView.java @@ -36,6 +36,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync; import org.rhq.enterprise.gui.coregui.client.inventory.common.AbstractMetricGraphView; import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository; +import org.rhq.enterprise.gui.coregui.client.util.MeasurementUtility; import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/** @@ -95,10 +96,9 @@ public class ResourceGroupMetricGraphView extends AbstractMetricGraphView { if (def.getId() == getDefinitionId()) { setDefinition(def);
- GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroup( - getEntityId(), new int[] { getDefinitionId() }, - System.currentTimeMillis() - (1000L * 60 * 60 * 8), - System.currentTimeMillis(), 60, + GWTServiceLookup.getMeasurementDataService().findDataForCompatibleGroupForLast( + getEntityId(), new int[] { getDefinitionId() }, 8, + MeasurementUtility.UNIT_HOURS, 60, new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { public void onFailure(Throwable caught) { CoreGUI.getErrorHandler().handleError( diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java index 7a68ba2..1e99fb5 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java @@ -42,6 +42,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectLi import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.avail.AvailabilityBarView; import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository; import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout; +import org.rhq.enterprise.server.measurement.util.MeasurementUtils;
/** * @author Greg Hinkle @@ -101,8 +102,8 @@ public class GraphListView extends LocatableVLayout implements ResourceSelectLis measDefIdArray[i] = measurementDefinitions.get(i).getId(); }
- GWTServiceLookup.getMeasurementDataService().findDataForResource(resource.getId(), measDefIdArray, - System.currentTimeMillis() - (1000L * 60 * 60 * 8), System.currentTimeMillis(), 60, + GWTServiceLookup.getMeasurementDataService().findDataForResourceForLast(resource.getId(), measDefIdArray, + 8, MeasurementUtils.UNIT_HOURS, 60, new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { public void onFailure(Throwable caught) { CoreGUI.getErrorHandler().handleError(MSG.view_resource_monitor_graphs_loadFailed(), diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java index 330eaf0..11d7b55 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/LiveGraphView.java @@ -246,14 +246,6 @@ public class LiveGraphView extends LocatableVLayout {
handler.add(new DataPoint(d.getTimestamp(), d.getValue())); plot.redraw(); - - if (d.getTimestamp() > max) { - max = System.currentTimeMillis(); - min = max - (1000L * 60); - - // plotOptions.setXAxisOptions(new AxisOptions().setMinimum(min).setMaximum(max)); - } - } }); } @@ -268,9 +260,6 @@ public class LiveGraphView extends LocatableVLayout { } }));
- min = System.currentTimeMillis(); - max = System.currentTimeMillis() + (1000L * 60); - plotOptions.addXAxisOptions(new AxisOptions().setTicks(8).setTickFormatter(new TickFormatter() { public String formatTickValue(double tickValue, Axis axis) { DateTimeFormat dateFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM); diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java index d051b92..76f2d1e 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricGraphView.java @@ -40,6 +40,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.common.AbstractMetricGrap import org.rhq.enterprise.gui.coregui.client.inventory.resource.AncestryUtil; import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository; import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility; +import org.rhq.enterprise.server.measurement.util.MeasurementUtils;
/** * @author Greg Hinkle @@ -109,10 +110,8 @@ public class ResourceMetricGraphView extends AbstractMetricGraphView { if (def.getId() == getDefinitionId()) { setDefinition(def);
- GWTServiceLookup.getMeasurementDataService().findDataForResource(getEntityId(), - new int[] { getDefinitionId() }, - System.currentTimeMillis() - (1000L * 60 * 60 * 8), - System.currentTimeMillis(), 60, + GWTServiceLookup.getMeasurementDataService().findDataForResourceForLast(getEntityId(), + new int[] { getDefinitionId() }, 8, MeasurementUtils.UNIT_HOURS, 60, new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() { public void onFailure(Throwable caught) { CoreGUI.getErrorHandler().handleError( diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java index f014c94..5e40890 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/MeasurementDataGWTServiceImpl.java @@ -39,11 +39,11 @@ import org.rhq.core.domain.util.PageControl; import org.rhq.core.domain.util.PageList; import org.rhq.enterprise.gui.coregui.client.gwt.MeasurementDataGWTService; import org.rhq.enterprise.gui.coregui.server.util.SerialUtility; -import org.rhq.enterprise.server.measurement.CallTimeDataManagerLocal; import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal; import org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerLocal; import org.rhq.enterprise.server.measurement.MeasurementOOBManagerLocal; import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal; +import org.rhq.enterprise.server.measurement.util.MeasurementUtils; import org.rhq.enterprise.server.util.LookupUtil;
/** @@ -55,7 +55,6 @@ public class MeasurementDataGWTServiceImpl extends AbstractGWTServiceImpl implem private static final long serialVersionUID = 1L;
private MeasurementDataManagerLocal dataManager = LookupUtil.getMeasurementDataManager(); - private CallTimeDataManagerLocal callTimeDataManager = LookupUtil.getCallTimeDataManager(); private MeasurementOOBManagerLocal measurementOOBManager = LookupUtil.getOOBManager();
private MeasurementScheduleManagerLocal scheduleManager = LookupUtil.getMeasurementScheduleManager(); @@ -99,6 +98,12 @@ public class MeasurementDataGWTServiceImpl extends AbstractGWTServiceImpl implem throw getExceptionToThrowToClient(t); } } + + public List<List<MeasurementDataNumericHighLowComposite>> findDataForResourceForLast(int resourceId, int[] definitionIds, + int lastN, int unit, int numPoints) throws RuntimeException { + List<Long> beginEnd = MeasurementUtils.calculateTimeFrame(lastN, unit); + return findDataForResource(resourceId, definitionIds, beginEnd.get(0), beginEnd.get(1), numPoints); + }
public List<List<MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroup(int groupId, int[] definitionIds, long beginTime, long endTime, int numPoints) throws RuntimeException { @@ -114,7 +119,13 @@ public class MeasurementDataGWTServiceImpl extends AbstractGWTServiceImpl implem throw getExceptionToThrowToClient(t); } } - + + public List<List<MeasurementDataNumericHighLowComposite>> findDataForCompatibleGroupForLast(int groupId, + int[] definitionIds, int lastN, int unit, int numPoints) throws RuntimeException { + List<Long> beginEnd = MeasurementUtils.calculateTimeFrame(lastN, unit); + return findDataForCompatibleGroup(groupId, definitionIds, beginEnd.get(0), beginEnd.get(1), numPoints); + } + public PageList<MeasurementDefinition> findMeasurementDefinitionsByCriteria(MeasurementDefinitionCriteria criteria) throws RuntimeException { try {
commit 9b454ae51add16d4ec25b85833ce2875e542da36 Author: Heiko W. Rupp hwr@redhat.com Date: Tue Sep 18 11:44:29 2012 +0200
Make the rest-docs processor also output the value classes used in the REST api.
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml index c567be7..4efad25 100644 --- a/modules/enterprise/server/jar/pom.xml +++ b/modules/enterprise/server/jar/pom.xml @@ -804,9 +804,12 @@ <processors> <processor>org.rhq.helpers.rest_docs_generator.ClassLevelProcessor</processor> </processors> - <compilerArguments>-AtargetDirectory=${project.build.directory}/docs/xml</compilerArguments> - <!-- Comment the next line in to get more verbose output for debugging --> - <!--<compilerArguments>-Averbose=true</compilerArguments>--> + <compilerArguments> + -AtargetDirectory=${project.build.directory}/docs/xml + -AmodelPkg=org.rhq.enterprise.server.rest.domain + </compilerArguments> + <!-- Add the next line in to get more verbose output for debugging --> + <!-- -Averbose=true --> </configuration> <executions> <execution> diff --git a/modules/enterprise/server/jar/src/main/xsl/apiout2docbook.xsl b/modules/enterprise/server/jar/src/main/xsl/apiout2docbook.xsl index d97645a..97e0598 100644 --- a/modules/enterprise/server/jar/src/main/xsl/apiout2docbook.xsl +++ b/modules/enterprise/server/jar/src/main/xsl/apiout2docbook.xsl @@ -50,10 +50,13 @@ </xsl:element> </xsl:for-each> </toc> - xsl:apply-templates + <xsl:apply-templates select="class"> <xsl:sort select="@basePath"/> <xsl:sort select="@path"/> </xsl:apply-templates> + <xsl:apply-templates select="data"> + <xsl:sort select="@name"/> + </xsl:apply-templates> </xsl:element> </xsl:template>
@@ -228,5 +231,42 @@
</xsl:template>
+ <xsl:template match="data"> + <xsl:element name="section"> + <title>Data-Class: <xsl:value-of select="@name"/></title> + <xsl:if test="@abstract"> + <subtitle><xsl:value-of select="@abstract"/></subtitle> + </xsl:if> + <xsl:if test="@description"> + <simpara> + Description: <xsl:value-of select="@description"/> + </simpara> + </xsl:if> + + <table> + <title>Properties</title> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + </tr> + xsl:apply-templates/ + </table> + </xsl:element> + </xsl:template> + + <xsl:template match="property"> + <tr> + <td> + <xsl:value-of select="@name"/> + </td> + <td> + <xsl:value-of select="@type"/> + </td> + <td> + <xsl:value-of select="@description"/> + </td> + </tr> + </xsl:template>
</xsl:stylesheet> \ No newline at end of file diff --git a/modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java b/modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java index a3a6ddf..1d6c913 100644 --- a/modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java +++ b/modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java @@ -27,6 +27,7 @@ import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; +import javax.xml.bind.annotation.XmlRootElement; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; @@ -41,6 +42,7 @@ import com.wordnik.swagger.annotations.ApiError; import com.wordnik.swagger.annotations.ApiErrors; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; +import com.wordnik.swagger.annotations.ApiProperty;
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -54,9 +56,9 @@ import org.jboss.resteasy.annotations.GZIP; * @author Heiko W. Rupp */
-@SupportedOptions({ClassLevelProcessor.TARGET_DIRECTORY,ClassLevelProcessor.VERBOSE}) +@SupportedOptions({ClassLevelProcessor.TARGET_DIRECTORY,ClassLevelProcessor.VERBOSE,ClassLevelProcessor.MODEL_PACKAGE_KEY}) @SupportedSourceVersion(SourceVersion.RELEASE_6) -@SupportedAnnotationTypes(value = {"com.wordnik.swagger.annotations.*","javax.ws.rs.*"}) +@SupportedAnnotationTypes(value = {"com.wordnik.swagger.annotations.*","javax.ws.rs.*","javax.xml.bind.annotation.XmlRootElement"}) public class ClassLevelProcessor extends AbstractProcessor {
private static final String JAVAX_WS_RS = "javax.ws.rs"; @@ -66,6 +68,8 @@ public class ClassLevelProcessor extends AbstractProcessor { public static final String TARGET_DIRECTORY = "targetDirectory"; public static final String VERBOSE = "verbose"; private static final String BODY_INDICATOR = "-body-"; + public static final String MODEL_PACKAGE_KEY = "modelPkg"; + public String modelPackage = "org.rhq.enterprise.server.rest.domain";
Log log = LogFactory.getLog(getClass().getName());
@@ -78,9 +82,14 @@ public class ClassLevelProcessor extends AbstractProcessor { Map<String,String>options = processingEnv.getOptions(); if (options.containsKey(TARGET_DIRECTORY)) { targetDirectory = options.get(TARGET_DIRECTORY); + System.out.println("== Target directory is set to " + targetDirectory); } if (options.containsKey(VERBOSE)) verbose=true; + if (options.containsKey(MODEL_PACKAGE_KEY)) { + modelPackage = options.get(MODEL_PACKAGE_KEY); + System.out.println("== Found a model package of " + modelPackage); + } }
@Override @@ -160,6 +169,13 @@ public class ClassLevelProcessor extends AbstractProcessor { private void processClass(Document doc, Element xmlRoot, TypeElement classElementIn) {
log.debug("Looking at " + classElementIn.getQualifiedName().toString()); + // Process the data classes + if (classElementIn.getAnnotation(XmlRootElement.class)!=null) { + processDataClass(doc, classElementIn, xmlRoot); + return; + } + + // NO data class, so it is the api. Path basePath = classElementIn.getAnnotation(Path.class); if (basePath==null || basePath.value().isEmpty()) { log.debug("No @Path found on " + classElementIn.getQualifiedName() + " - skipping"); @@ -339,6 +355,65 @@ public class ClassLevelProcessor extends AbstractProcessor { element.setAttribute("reason",ae.reason()); }
+ private void processDataClass(Document doc, TypeElement classElementIn, Element xmlRoot) { + + String pkg = classElementIn.toString(); + log.debug("Looking at " + pkg); + if (!pkg.startsWith(modelPackage)) { + log.debug(" skipping as it does not meet the required package"); + return; + } + + Element elem = doc.createElement("data"); + xmlRoot.appendChild(elem); + elem.setAttribute("name",classElementIn.getSimpleName().toString()); + Api api = classElementIn.getAnnotation(Api.class); + if (api!=null) { + elem.setAttribute("abstract",api.value()); + if (api.description()!=null && !api.description().isEmpty()) { + elem.setAttribute("description",api.description()); + } + } + processDataClassProperties(doc, classElementIn, elem); + + } + + private void processDataClassProperties(Document doc, TypeElement classElementIn, Element elem) { + // Now look at the properties by processing the getters + for (ExecutableElement m : ElementFilter.methodsIn(classElementIn.getEnclosedElements())) { + + String mName = m.getSimpleName().toString(); + if (mName.startsWith("get") || mName.startsWith("is")) { + Element mElem = doc.createElement("property"); + elem.appendChild(mElem); + String pName; + if (mName.startsWith("get")) { + pName = mName.substring(3); + } else { + pName = mName.substring(2); + } + pName = pName.substring(0,1).toLowerCase() + pName.substring(1); + + mElem.setAttribute("name",pName); + ApiProperty ap = m.getAnnotation(ApiProperty.class); + if (ap!=null) { + mElem.setAttribute("description",ap.value()); + } + TypeMirror returnTypeMirror = m.getReturnType(); + // for types in the modelPackage or java.lang, remove the fqdn + String typeName = returnTypeMirror.toString(); + if (typeName.startsWith(modelPackage)) { + typeName = typeName.substring(modelPackage.length()+1); + } + else if (typeName.startsWith("java.lang")) { + typeName = typeName.substring("java.lang".length()+1); + } + // TODO for collection<type> remove the collection expression and set some collection attribute + mElem.setAttribute("type", typeName); + } + } + } + /** * Determine if the passed mirror belongs to an annotation that denotes a parameter to be skipped * @param t Type to analyze
commit b8a43f237ca0fb8d0c004b3c07f7477f1c1b4eee Author: Heiko W. Rupp hwr@redhat.com Date: Tue Sep 18 11:42:40 2012 +0200
Add support for events in the REST api.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/EventCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/EventCriteria.java index 3967b2e..3bf0a28 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/EventCriteria.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/EventCriteria.java @@ -53,6 +53,7 @@ public class EventCriteria extends Criteria { private Integer filterResourceGroupId; // requires overrides private Integer filterAutoGroupResourceTypeId; // requires overrides private Integer filterAutoGroupParentResourceId; // requires overrides + private Integer filterSourceId; // requires overrides
private boolean fetchSource;
@@ -61,6 +62,7 @@ public class EventCriteria extends Criteria {
public EventCriteria() { filterOverrides.put("sourceName", "source.location like ?"); + filterOverrides.put("sourceId","source.id = ?"); filterOverrides.put("startTime", "timestamp >= ?"); filterOverrides.put("endTime", "timestamp <= ?"); filterOverrides.put("resourceId", "source.resourceId = ?"); @@ -99,6 +101,10 @@ public class EventCriteria extends Criteria { this.filterSourceName = filterSourceName; }
+ public void addFilterSourceId(Integer sourceId) { + this.filterSourceId = sourceId; + } + public void addFilterStartTime(Long filterStartTime) { this.filterStartTime = filterStartTime; } diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java index e66e06b..eb27ca8 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/event/Event.java @@ -183,6 +183,17 @@ public class Event implements Serializable { this.detail = this.detail.substring(0, DETAIL_MAX_LENGTH); }
+ public Event(@NotNull long timestamp, @NotNull EventSeverity severity, @NotNull EventSource source, @NotNull String detail) { + if(source==null) + throw new IllegalArgumentException("Source must not be null."); + this.timestamp = timestamp; + this.severity = severity; + this.detail = detail; + this.sourceLocation = source.getLocation(); + this.source = source; + } + + /** NOTE: This method is not intended to be called by plugins or the Plugin Container. */ public int getId() { return this.id; 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 11597bb..a07456d 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 @@ -7,7 +7,7 @@
<context-param> <param-name>resteasy.jndi.resources</param-name> - <param-value>rhq/StatusHandlerBean/local,rhq/ResourceHandlerBean/local,rhq/MetricHandlerBean/local,rhq/UserHandlerBean/local,rhq/AlertHandlerBean/local,rhq/OperationsHandlerBean/local,rhq/GroupHandlerBean/local</param-value> + <param-value>rhq/StatusHandlerBean/local,rhq/ResourceHandlerBean/local,rhq/MetricHandlerBean/local,rhq/UserHandlerBean/local,rhq/AlertHandlerBean/local,rhq/OperationsHandlerBean/local,rhq/GroupHandlerBean/local,rhq/EventHandlerBean/local</param-value> <description>List of jndi names of EJBs local interfaces that define REST stuff</description> </context-param> <context-param> 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 new file mode 100644 index 0000000..e189c34 --- /dev/null +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerBean.java @@ -0,0 +1,269 @@ +/* + * 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.server.rest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +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.persistence.Query; +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 org.rhq.core.domain.criteria.EventCriteria; +import org.rhq.core.domain.event.Event; +import org.rhq.core.domain.event.EventDefinition; +import org.rhq.core.domain.event.EventSeverity; +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.enterprise.server.RHQConstants; +import org.rhq.enterprise.server.event.EventManagerLocal; +import org.rhq.enterprise.server.rest.domain.EventRest; +import org.rhq.enterprise.server.rest.domain.EventSourceRest; + +/** + * Handle event related things + * @author Heiko W. Rupp + */ +@Stateless +@Interceptors(SetCallerInterceptor.class) +public class EventHandlerBean extends AbstractRestBean implements EventHandlerLocal { + + @EJB + EventManagerLocal eventManager; + + @PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME) + EntityManager em; + + @Override + public Response listEventSourcesForResource( int resourceId, Request request, + HttpHeaders headers) { + + Resource res = fetchResource(resourceId); + Set<EventSource> eventSources = res.getEventSources(); + + List<EventSourceRest> restSources = new ArrayList<EventSourceRest>(eventSources.size()); + for (EventSource source : eventSources) { + EventSourceRest esr = convertEventSource(source); + restSources.add(esr); + } + + + Response.ResponseBuilder builder; + MediaType mediaType = headers.getAcceptableMediaTypes().get(0); + if (mediaType.equals(MediaType.APPLICATION_XML_TYPE)) { + GenericEntity<List<EventSourceRest>> list = new GenericEntity<List<EventSourceRest>>(restSources) {}; + builder = Response.ok(list, mediaType); + } + else { + builder = Response.ok(restSources, mediaType); + } + return builder.build(); + } + + @Override + public EventSourceRest getEventSource(int sourceId) { + + EventSource source = findEventSourceById(sourceId); + EventSourceRest esr = convertEventSource(source); + + return esr; + } + + public EventSourceRest addEventSource(int resourceId, EventSourceRest esr) { + + Resource resource = fetchResource(resourceId); + ResourceType rt = resource.getResourceType(); + Set<EventDefinition> eventDefinitions = rt.getEventDefinitions(); + EventDefinition eventDefinition=null; + for (EventDefinition ed : eventDefinitions) { + if (ed.getName().equals(esr.getName())) { + eventDefinition = ed; + break; + } + } + if (eventDefinition==null) { + throw new StuffNotFoundException("eventDefinition with name " + esr.getName()); + } + // check if a source with the given location already exists for the definition and resource + Query q = em.createQuery("SELECT es FROM EventSource es WHERE es.location = :location AND es.eventDefinition = :definition AND es.resourceId = :resourceId"); + q.setParameter("location",esr.getLocation()); + q.setParameter("definition",eventDefinition); + q.setParameter("resourceId",resourceId); + List<EventSource> sources = q.getResultList(); + + EventSource source; + if (sources.isEmpty()) { + source = new EventSource(esr.getLocation(),eventDefinition,resource); + em.persist(source); + } else if (sources.size()==1) { + source = sources.get(0); + } else { + throw new IllegalStateException("We have more than one EventSource on the same Definition with the same location - must not happen"); + } + + EventSourceRest result = convertEventSource(source); + return result; + } + + @Override + public Response deleteEventSource(int sourceId) { + + EventSource source = findEventSourceById(sourceId); + em.remove(source); // We have a cascade delete on the events TODO make operation async ? + + return Response.ok().build(); + } + + @Override + public Response getEventsForSource(int sourceId, long startTime, + long endTime, String severity, Request request, + HttpHeaders headers) { + + EventSource source = findEventSourceById(sourceId); + + EventCriteria criteria = new EventCriteria(); + criteria.addFilterSourceId(source.getId()); + if (startTime>0) { + criteria.addFilterStartTime(startTime); + } + if (endTime>0) { + criteria.addFilterEndTime(endTime); + } + if (startTime==0 && endTime==0) { + PageControl pageControl = new PageControl(); + pageControl.setPageSize(200); + criteria.setPageControl(pageControl); + } + + Response.ResponseBuilder builder = getEventsAsBuilderForCriteria(headers, criteria); + + return builder.build(); + } + + + @Override + public Response getEventsForResource(int resourceId, + long startTime, + long endTime, String severity, Request request, + HttpHeaders headers) { + + EventCriteria criteria = new EventCriteria(); + criteria.addFilterResourceId(resourceId); + if (startTime>0) { + criteria.addFilterStartTime(startTime); + } + if (endTime>0) { + criteria.addFilterEndTime(endTime); + } + if (startTime==0 && endTime==0) { + PageControl pageControl = new PageControl(); + pageControl.setPageSize(200); + criteria.setPageControl(pageControl); + } + + Response.ResponseBuilder builder = getEventsAsBuilderForCriteria(headers, criteria); + + return builder.build(); + + } + + public Response addEventsToSource(int sourceId, List<EventRest> eventRest) { + + EventSource source = findEventSourceById(sourceId); + Map<EventSource,Set<Event>> eventMap = new HashMap<EventSource, Set<Event>>(); + Set<Event> events = new HashSet<Event>(eventRest.size()); + for (EventRest eRest : eventRest) { + EventSeverity eventSeverity = EventSeverity.valueOf(eRest.getSeverity()); + Event event = new Event(eRest.getTimestamp(),eventSeverity,source,eRest.getDetail()); + events.add(event); + } + eventMap.put(source,events); + eventManager.addEventData(eventMap); + + return Response.noContent().build(); + } + + + private Response.ResponseBuilder getEventsAsBuilderForCriteria(HttpHeaders headers, EventCriteria criteria) { + List<Event> eventList = eventManager.findEventsByCriteria(caller,criteria); + List<EventRest> restEvents = new ArrayList<EventRest>(eventList.size()); + for (Event event : eventList) { + restEvents.add(convertEvent(event)); + } + + MediaType mediaType = headers.getAcceptableMediaTypes().get(0); + Response.ResponseBuilder builder; + if (mediaType.equals(MediaType.APPLICATION_XML_TYPE)) { + GenericEntity<List<EventRest>> list = new GenericEntity<List<EventRest>>(restEvents) {}; + builder = Response.ok(list, mediaType); + } + else { + builder = Response.ok(restEvents, mediaType); + } + return builder; + } + + private EventSourceRest convertEventSource(EventSource source) { + EventSourceRest esr = new EventSourceRest(); + esr.setId(source.getId()); + esr.setDescription(source.getEventDefinition().getDescription()); + esr.setDisplayName(source.getEventDefinition().getDisplayName()); + esr.setName(source.getEventDefinition().getName()); + esr.setLocation(source.getLocation()); + esr.setResourceId(source.getResourceId()); + + return esr; + } + + private EventRest convertEvent(Event event) { + EventRest er = new EventRest(); + er.setDetail(event.getDetail()); + er.setId(event.getId()); + er.setSeverity(event.getSeverity().toString()); + er.setTimestamp(event.getTimestamp()); + er.setSourceId(event.getSource().getId()); + + return er; + } + + private EventSource findEventSourceById(int sourceId) { + + EventSource source = em.find(EventSource.class,sourceId); + if (source==null) + throw new StuffNotFoundException("Event source with id " + sourceId); + return source; + + } + +} diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerLocal.java new file mode 100644 index 0000000..276312a --- /dev/null +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/EventHandlerLocal.java @@ -0,0 +1,121 @@ +/* + * 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.server.rest; + +import java.util.List; + +import javax.ejb.Local; +import javax.ws.rs.DELETE; +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.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Request; +import javax.ws.rs.core.Response; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wordnik.swagger.annotations.ApiParam; + +import org.jboss.resteasy.annotations.GZIP; + +import org.rhq.enterprise.server.rest.domain.EventRest; +import org.rhq.enterprise.server.rest.domain.EventSourceRest; + +/** + * Class that deals with events + * @author Heiko W. Rupp + */ +@Local +@Path("/event") +@Api("Api that deals with Events (e.g snmp traps, logfile lines)") +@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,MediaType.TEXT_HTML}) +public interface EventHandlerLocal { + + + + @GET + @Path("/{id}/sources") + @ApiOperation(value = "List the defined event sources for the resource", responseClass = "EventSourceRest", multiValueResponse = true) + Response listEventSourcesForResource( + @ApiParam("id of the resource") @PathParam("id") int resourceId, + @Context Request request, + @Context HttpHeaders headers); + + + + @POST + @Path("/{id}/sources") + @ApiOperation("Add a new event source for a resource. This can e.g. be a different logfile. " + + "The source.name must match an existing definition fo this resource. " + + "If an event source for the definition name and resource with the same location already exists, no new source is created. " + + "NOTE: An Event source added this way will not sow up in the connection properties.") + EventSourceRest addEventSource( + @ApiParam("id of the resource") @PathParam("id") int resourceId, + EventSourceRest source); + + @DELETE + @Path("/source/{id}") + @ApiOperation(value = "Delete the event source with the passed id") + Response deleteEventSource( + @ApiParam("Id of the source to delete") @PathParam("id") int sourceId); + + @GET + @Path("/source/{id}") + @ApiOperation(value = "Retrieve the event source with the passed id", responseClass = "EventSourceRest") + EventSourceRest getEventSource( + @ApiParam("Id of the source to retrieve") @PathParam("id") int sourceId); + + @POST + @Path("/source/{id}/events") + @ApiOperation("Submit multiple events for one given event source; the event source in the passed Events is ignored.") + Response addEventsToSource( + @ApiParam("Id of the source to add data to") @PathParam("id") int sourceId, List<EventRest> event); + + @GET @GZIP + @Path("/source/{id}/events") + @ApiOperation(value = "List the events for the event source with the passed id. If no time range is given, the last 200 entries will be displayed", + responseClass = "EventRest", multiValueResponse = true) + Response getEventsForSource(@PathParam("id") int sourceId, + @QueryParam("startTime") long startTime, + @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, + @Context HttpHeaders headers); + + @GET @GZIP + @Path("/{id}/events") + @ApiOperation(value="List the events for the resource with the passed id. If no time range is given, the last 200 entries will be displayed", + responseClass = "EventRest", multiValueResponse = true) + Response getEventsForResource(@PathParam("id") int resourceId, + @QueryParam("startTime") long startTime, + @QueryParam("endTime") long endTime, + @QueryParam("severity") String severity, + @Context Request request, + @Context HttpHeaders headers); + + +} diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventRest.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventRest.java new file mode 100644 index 0000000..666b0dc --- /dev/null +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventRest.java @@ -0,0 +1,89 @@ +/* + * 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.server.rest.domain; + +import javax.xml.bind.annotation.XmlRootElement; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiProperty; + +/** + * An event + * @author Heiko W. Rupp + */ +@Api("This class represents one event.") +@XmlRootElement(name = "event") +public class EventRest { + + int id; + String detail; + int sourceId; + long timestamp; + String severity; + + + public EventRest() { + } + + @ApiProperty("RHQ-Internal Id of the event") + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + @ApiProperty("The message to be transmited") + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + @ApiProperty("Id of the source on retrieval. When adding new events, this parameter is ignored.") + public int getSourceId() { + return sourceId; + } + + public void setSourceId(int sourceId) { + this.sourceId = sourceId; + } + + @ApiProperty("Time in millis since epoch when the event occurred") + public long getTimestamp() { + return timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + @ApiProperty("Severity of the event. Allowed values are DEBUG, INFO, WARN, ERROR, FATAL" ) + public String getSeverity() { + return severity; + } + + public void setSeverity(String severity) { + this.severity = severity; + } +} diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventSourceRest.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventSourceRest.java new file mode 100644 index 0000000..5cfa3c9 --- /dev/null +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/domain/EventSourceRest.java @@ -0,0 +1,98 @@ +/* + * 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.server.rest.domain; + +import javax.xml.bind.annotation.XmlRootElement; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiProperty; + +/** + * An EventSource + * @author Heiko W. Rupp + */ +@Api("This class represents an EventSource - e.g. a logfile.") +@XmlRootElement(name="source") +public class EventSourceRest { + + int id; + String name; + String displayName; + String location; + int resourceId; + String description; + + public EventSourceRest() { + } + + @ApiProperty("Id of the EventSource") + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + @ApiProperty("Name of the EventSource - defined in the definition. This is required when adding a new EventSource") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @ApiProperty("Display name of the EventSource - defined in the definition") + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + @ApiProperty("'Location' of the EventSource. This is e.g. the path to the logfile being monitored. This is required when adding a new EventSource") + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + @ApiProperty("Id of the resource this ") + public int getResourceId() { + return resourceId; + } + + public void setResourceId(int resourceId) { + this.resourceId = resourceId; + } + + @ApiProperty("A description of this EventSource") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +}
commit a493f41c90723a6464d5ddb1eafa3a0723f829cc Author: Mike Thompson mithomps@redhat.com Date: Mon Sep 17 14:06:52 2012 -0700
[BZ 852223] IE8 rendering of resource measurement time overlaid on the actual metric name.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java index 8a0898d..16869ff 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java @@ -21,6 +21,7 @@ package org.rhq.enterprise.gui.coregui.client.dashboard.portlets.resource; import com.google.gwt.user.client.rpc.AsyncCallback; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.ContentsType; +import com.smartgwt.client.types.Overflow; import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.HTMLFlow; @@ -240,8 +241,10 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { LocatableDynamicForm row = new LocatableDynamicForm( recentMeasurementsContent.extendLocatorId(md.getName())); row.setNumCols(3); - row.setColWidths(65,"*","*"); + row.setColWidths(65, "*", 100); row.setWidth100(); + row.setAutoHeight(); + row.setOverflow(Overflow.VISIBLE); HTMLFlow graph = new HTMLFlow(); String contents = "<span id='sparkline_" + index + "' class='dynamicsparkline' width='0' " + "values='" @@ -265,9 +268,13 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { //have link launch modal window on click LinkItem link = AbstractActivityView.newLinkItem(title, destination); + link.setTooltip(title); link.setTitleVAlign(VerticalAlignment.TOP); link.setAlign(Alignment.LEFT); - link.setClipValue(false); + link.setClipValue(true); + link.setWrap(true); + link.setHeight(26); + link.setWidth("100%"); link.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { @@ -284,7 +291,7 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet { });
//Value - String convertedValue = lastValue + " " + md.getUnits(); + String convertedValue; convertedValue = AbstractActivityView .convertLastValueForDisplay(lastValue, md); StaticTextItem value = AbstractActivityView
commit 7880800def42dbcd7dfa3d51309fd7fcc5cffef1 Author: Mike Thompson mithomps@redhat.com Date: Mon Sep 17 12:09:35 2012 -0700
Remove deprecated GWT Search classes that are no longer used as they were replaced by smartGWT search classes. Deprecated classes can be retrieved from history.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/AbstractSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/AbstractSearchBar.java deleted file mode 100644 index d26913a..0000000 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/AbstractSearchBar.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2010 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.search; - -import com.google.gwt.user.client.ui.Composite; -import org.rhq.core.domain.search.SearchSubsystem; - -/** - * Abstract class for SearchBar, so that a separate implementation can be written alongside the original. - * @author Joseph Marques - */ -@Deprecated -public abstract class AbstractSearchBar extends Composite { - - public abstract SearchSubsystem getSearchSubsystem(); - - public abstract String getSelectedTab(); - - public abstract void activateSavedSearch(String savedSearchName); -} diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java deleted file mode 100644 index 4875c92..0000000 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java +++ /dev/null @@ -1,550 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2010 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.search; - -import com.google.gwt.event.dom.client.*; -import com.google.gwt.event.logical.shared.CloseEvent; -import com.google.gwt.event.logical.shared.CloseHandler; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.*; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.SavedSearchCriteria; -import org.rhq.core.domain.search.SavedSearch; -import org.rhq.core.domain.search.SearchSubsystem; -import org.rhq.enterprise.gui.coregui.client.CoreGUI; -import org.rhq.enterprise.gui.coregui.client.Messages; -import org.rhq.enterprise.gui.coregui.client.UserSessionManager; -import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; -import org.rhq.enterprise.gui.coregui.client.search.favorites.SavedSearchGrid; -import org.rhq.enterprise.gui.coregui.client.search.favorites.SavedSearchGrid.SavedSearchSelectionHandler; -import org.rhq.enterprise.gui.coregui.client.search.suggest.SuggestTextBox_v3; -import org.rhq.enterprise.gui.coregui.client.util.Log; -import org.rhq.enterprise.gui.coregui.client.util.message.Message; -import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity; - -import java.util.List; - -/** - * @author Joseph Marques - */ -@Deprecated -public class FlexSearchBar extends AbstractSearchBar { - - private static final Messages MSG = CoreGUI.getMessages(); - - public static final String DEFAULT_PATTERN_NAME = MSG.view_searchBar_defaultPattern(); - - private static final String IMAGE_DIR = "/coregui/images/search/"; - - private static final String STAR_OFF_URL = IMAGE_DIR + "star1.png"; - private static final String STAR_ACTIVE_URL = IMAGE_DIR + "star2.png"; - private static final String STAR_ON_URL = IMAGE_DIR + "star3.png"; - - private static final String ARROW_WHITE_URL = IMAGE_DIR + "menu_arrow.png"; - private static final String ARROW_GRAY_URL = IMAGE_DIR + "menu_arrow_down.png"; - - public static final String TRASH = IMAGE_DIR + "trash.png"; - - private final TextBox patternField = new TextBox(); - private final SuggestTextBox_v3 autoCompletePatternField = new SuggestTextBox_v3(this, patternField); - private final TextBox patternNameField = new TextBox(); - private final Label patternNameLabel = new Label(); - - private final Image starImage = new Image(STAR_OFF_URL); - private final Image arrowImage = new Image(ARROW_WHITE_URL); - - private final PopupPanel savedSearchesPanel = new PopupPanel(true); - private SavedSearchGrid savedSearchesGrid; - - private int currentSearchId = 0; - - private SearchSubsystem searchSubsystem; - private String defaultSearchText; - private String defaultSavedSearchPatternId; - - HorizontalPanel sbc; - HorizontalPanel sbc_sbbgc; - HorizontalPanel sbc_sbbgc_sbcc; - HorizontalPanel sbc_sbbgc_sbcc_sbclhs_pfc; - HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_aic; - HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_sic; - HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_pnfc; - HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_pnlc; - HorizontalPanel sbc_sbbc; - HorizontalPanel sbc_pfsc; - HorizontalPanel sbc_ssc; - - private HorizontalPanel createHPanel(Panel parent, String className, String id) { - HorizontalPanel panel = new HorizontalPanel(); - if (parent != null) { - parent.add(panel); - } - if (className != null) { - panel.setStyleName(className); - } - if (id != null) { - panel.getElement().setId(id); - } - return panel; - } - - public FlexSearchBar(SearchSubsystem searchSubsystem) { - this(searchSubsystem, null); - } - - public FlexSearchBar(SearchSubsystem searchSubsystem, String initialSearchText) { - Log.info("Loading SearchBar..."); - - this.searchSubsystem = searchSubsystem; - this.savedSearchesGrid = new SavedSearchGrid(searchSubsystem); - // TODO: load default saved search pattern, if user has selected one - // populate default search text - // ensure that search subsystem is selected, probably want to force it to be a ctor argument - - sbc = createHPanel(null, "searchBarContainer", null); - sbc_sbbgc = createHPanel(sbc, "searchBarBackgroundContainer", null); - sbc_sbbgc_sbcc = createHPanel(sbc_sbbgc, "searchBarComponentsContainer", null); - sbc_sbbgc_sbcc_sbclhs_pfc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentLHS", "patternFieldContainer"); - sbc_sbbgc_sbcc_sbcrhs_aic = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "arrowImageContainer"); - sbc_sbbgc_sbcc_sbcrhs_sic = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "starImageContainer"); - sbc_sbbgc_sbcc_sbcrhs_pnfc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "patternNameFieldContainer"); - sbc_sbbgc_sbcc_sbcrhs_pnlc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "patternNameLabelContainer"); - sbc_pfsc = createHPanel(sbc, null, "patternFieldSuggestionsContainer"); - sbc_ssc = createHPanel(sbc, null, "savedSearchesContainer"); - - sbc_sbbgc_sbcc_sbclhs_pfc.add(autoCompletePatternField); - sbc_sbbgc_sbcc_sbcrhs_sic.add(starImage); - sbc_sbbgc_sbcc_sbcrhs_aic.add(arrowImage); - sbc_sbbgc_sbcc_sbcrhs_pnfc.add(patternNameField); - sbc_sbbgc_sbcc_sbcrhs_pnlc.add(patternNameLabel); - sbc_ssc.add(savedSearchesPanel); - - initWidget(sbc); - - setupAutoCompletingPatternField(); - setupPatternNameField(); - setupPatternNameLabel(); - setupStarImage(); - setupArrowImage(); - setupSavedSearches(); - - setDefaultSearchText(initialSearchText); - if (getDefaultSearchText() != null) { - this.autoCompletePatternField.setText(getDefaultSearchText()); - } else if (getDefaultSavedSearchPatternId() != null) { - try { - Integer savedSearchId = Integer.valueOf(getDefaultSavedSearchPatternId()); - activateSavedSearch(savedSearchId); - } catch (Exception e) { - this.autoCompletePatternField.setText(MSG - .view_searchBar_savedSearch_failFind(getDefaultSavedSearchPatternId())); - } - } - } - - public SearchSubsystem getSearchSubsystem() { - return searchSubsystem; - } - - public void setDefaultSearchText(String defaultSearchText) { - if (defaultSearchText == null || defaultSearchText.trim().equals("")) { - return; // do nothing - } - - this.defaultSearchText = defaultSearchText; - } - - public String getDefaultSearchText() { - return defaultSearchText; - } - - public void setDefaultSavedSearchPatternId(String defaultSavedSearchPatternId) { - if (defaultSavedSearchPatternId == null || defaultSavedSearchPatternId.trim().equals("")) { - return; // do nothing - } - - this.defaultSavedSearchPatternId = defaultSavedSearchPatternId; - } - - public String getDefaultSavedSearchPatternId() { - return defaultSavedSearchPatternId; - } - - private void setupAutoCompletingPatternField() { - autoCompletePatternField.getElement().setId("patternField"); - autoCompletePatternField.setStyleName("patternField"); - - AutoCompletePatternFieldEventHandler handler = new AutoCompletePatternFieldEventHandler(); - autoCompletePatternField.getTextBox().addFocusHandler(handler); - autoCompletePatternField.getTextBox().addBlurHandler(handler); - autoCompletePatternField.addKeyPressHandler(handler); - } - - private void setupPatternNameField() { - patternNameField.setStyleName("patternNameField"); - patternNameField.setVisible(false); - - PatternNameFieldEventHandler handler = new PatternNameFieldEventHandler(); - patternNameField.addKeyPressHandler(handler); - patternNameField.addClickHandler(handler); - patternNameField.addBlurHandler(handler); - } - - private void setupPatternNameLabel() { - patternNameLabel.setStyleName("patternNameLabel"); - patternNameLabel.setVisible(false); - - PatternNameLabelEventHandler handler = new PatternNameLabelEventHandler(); - patternNameLabel.addClickHandler(handler); - } - - private void setupStarImage() { - StarImageEventHandler handler = new StarImageEventHandler(); - starImage.addClickHandler(handler); - starImage.addMouseOverHandler(handler); - starImage.addMouseOutHandler(handler); - } - - private void setupArrowImage() { - ArrowImageEventHandler handler = new ArrowImageEventHandler(); - arrowImage.addClickHandler(handler); - } - - private void setupSavedSearches() { - savedSearchesPanel.add(savedSearchesGrid); - savedSearchesPanel.setStyleName("savedSearchesPanel"); - savedSearchesGrid.addStyleName("savedSearchesPanel"); - - // panel position will be re-calculated on down-arrow click - //savedSearchesPanel.show(); - savedSearchesPanel.hide(); - - SavedSearchesEventHandler handler = new SavedSearchesEventHandler(); - savedSearchesPanel.addCloseHandler(handler); - savedSearchesGrid.setSavedSearchSelectionHandler(handler); - } - - private void turnNameFieldIntoLabel(boolean nameJustUpdated) { - String name = patternNameField.getText(); - - if (name.equalsIgnoreCase(DEFAULT_PATTERN_NAME)) { - name = ""; - } - - arrowImage.setVisible(true); - patternNameField.setVisible(false); - - if ("".equals(name)) { - starImage.setUrl(STAR_OFF_URL); - } else { - // NOTE: currently do not support updated a saved search pattern - if (0 == currentSearchId) { - String pattern = autoCompletePatternField.getText(); - createSavedSearch(name, pattern); - } else if (nameJustUpdated) { - updateSavedSearchName(currentSearchId, name); - } - - starImage.setUrl(STAR_ON_URL); - patternNameLabel.setText(elipse(name)); - patternNameLabel.setVisible(true); - autoCompletePatternField.setFocus(true); - } - } - - private void turnNameLabelIntoField() { - patternNameField.setText(patternNameLabel.getText()); - patternNameField.setVisible(true); - patternNameLabel.setVisible(false); - patternNameField.setFocus(true); - } - - private String elipse(String data) { - if (data.length() > 14) { - return data.substring(0, 20) + "..."; - } - return data; - } - - private void createSavedSearch(final String name, final String pattern) { - Subject subject = UserSessionManager.getSessionSubject(); - SavedSearch newSavedSearch = new SavedSearch(searchSubsystem, name, pattern, subject); - GWTServiceLookup.getSearchService().createSavedSearch(newSavedSearch, new AsyncCallback<Integer>() { - @Override - public void onSuccess(Integer newSavedSearchId) { - CoreGUI.getMessageCenter() - .notify(new Message(MSG.view_searchBar_savedSearch_save(name), Severity.Info)); - currentSearchId = newSavedSearchId; - } - - @Override - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failSave(name), caught); - } - }); - } - - private void updateSavedSearchName(final int savedSearchId, final String newName) { - GWTServiceLookup.getSearchService().updateSavedSearchName(savedSearchId, newName, new AsyncCallback<Boolean>() { - @Override - public void onSuccess(Boolean hadUpdates) { - if (hadUpdates) { - CoreGUI.getMessageCenter().notify( - new Message(MSG.view_searchBar_savedSearch_rename(newName), Severity.Info)); - } - } - - @Override - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failRename(newName), caught); - } - }); - } - - /* - * Event Handlers - */ - class AutoCompletePatternFieldEventHandler implements KeyPressHandler, FocusHandler, BlurHandler { - public void onKeyPress(KeyPressEvent event) { - // hide pattern field/label, turn off star - if (event.getCharCode() == KeyCodes.KEY_ENTER) { - return; - } - - patternNameLabel.setText(""); - patternNameLabel.setVisible(false); - patternNameField.setValue("", true); - patternNameField.setVisible(false); - currentSearchId = 0; - starImage.setUrl(STAR_OFF_URL); - - if (event.getCharCode() == KeyCodes.KEY_ESCAPE) { - autoCompletePatternField.hideSuggestionList(); - event.preventDefault(); - event.stopPropagation(); - } - } - - public void onFocus(FocusEvent event) { - autoCompletePatternField.showSuggestionList(); - savedSearchesPanel.hide(); - } - - public void onBlur(BlurEvent event) { - savedSearchesPanel.hide(); - } - } - - class PatternNameFieldEventHandler implements KeyPressHandler, ClickHandler, BlurHandler { - public void onKeyPress(KeyPressEvent event) { - if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { - Log.debug("key press pattern name field"); - turnNameFieldIntoLabel(true); - } - } - - public void onClick(ClickEvent event) { - if (patternNameField.getText().equals(DEFAULT_PATTERN_NAME)) { - patternNameField.setValue("", false); - } - } - - public void onBlur(BlurEvent event) { - // If this is a name change update (star on) then return to displaying the unchanged label. - // otherwise, abort the creation of the new saved search. - if (starImage.getUrl().endsWith(STAR_ON_URL)) { - patternNameField.setVisible(false); - patternNameLabel.setVisible(true); - - } else { - patternNameField.setVisible(false); - patternNameLabel.setVisible(false); - } - } - } - - class PatternNameLabelEventHandler implements ClickHandler { - public void onClick(ClickEvent event) { - turnNameLabelIntoField(); - } - } - - class StarImageEventHandler implements ClickHandler, MouseOverHandler, MouseOutHandler { - public void onClick(ClickEvent event) { - - // note - since hover changes off to active, we never have the star off case here - if (starImage.getUrl().endsWith(STAR_ACTIVE_URL)) { - if (patternNameField.isVisible()) { - patternNameField.setVisible(false); - - } else { - patternNameField.setText(DEFAULT_PATTERN_NAME); - patternNameField.setVisible(true); - patternNameField.selectAll(); - patternNameField.setFocus(true); - patternNameLabel.setVisible(false); - - } - } else if (starImage.getUrl().endsWith(STAR_ON_URL)) { - starImage.setUrl(STAR_ACTIVE_URL); - patternNameField.setVisible(false); - patternNameLabel.setVisible(false); - } - } - - public void onMouseOver(MouseOverEvent event) { - if (starImage.getUrl().endsWith(STAR_OFF_URL) && !"".equals(getValue().trim())) { - - starImage.setUrl(STAR_ACTIVE_URL); - } - } - - public void onMouseOut(MouseOutEvent event) { - if (starImage.getUrl().endsWith(STAR_ACTIVE_URL) && !patternNameField.isVisible()) { - starImage.setUrl(STAR_OFF_URL); - } - } - } - - class ArrowImageEventHandler implements ClickHandler { - public void onClick(ClickEvent event) { - savedSearchesGrid.updateModel(new AsyncCallback<List<SavedSearch>>() { - @Override - public void onFailure(Throwable caught) { - // nothing needs to be done - } - - @Override - public void onSuccess(List<SavedSearch> updatedGridData) { - int left = autoCompletePatternField.getAbsoluteLeft(); - int top = autoCompletePatternField.getAbsoluteTop() + autoCompletePatternField.getOffsetHeight(); - savedSearchesPanel.setPopupPosition(left, top + 5); - savedSearchesPanel.show(); - arrowImage.setUrl(ARROW_GRAY_URL); - } - }); - } - } - - class SavedSearchesEventHandler implements CloseHandler<PopupPanel>, SavedSearchSelectionHandler { - public void onClose(CloseEvent<PopupPanel> event) { - arrowImage.setUrl(ARROW_WHITE_URL); - } - - public void handleSelection(final int rowIndex, final int columnIndex, final SavedSearch savedSearch) { - Log.debug("SavedSearchesEventHandler.handleSelection(" + rowIndex + "," + columnIndex + "," + savedSearch - + ")"); - if (columnIndex == 1) { - GWTServiceLookup.getSearchService().deleteSavedSearch(savedSearch.getId(), new AsyncCallback<Void>() { - @Override - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError( - MSG.view_searchBar_savedSearch_failDelete(savedSearch.getName()), caught); - } - - @Override - public void onSuccess(Void result) { - // handle deletion of current saved search - if (currentSearchId == savedSearch.getId()) { - currentSearchId = 0; - patternNameField.setValue("", true); - patternNameField.setVisible(false); - patternNameLabel.setText(""); - patternNameLabel.setVisible(false); - autoCompletePatternField.setFocus(true); - starImage.setUrl(STAR_OFF_URL); - savedSearchesPanel.hide(); - } - - // handle deletion of the one and only element in the list - if (savedSearchesGrid.size() == 1) { - savedSearchesPanel.hide(); - } - - savedSearchesGrid.removeRow(rowIndex); - - CoreGUI.getMessageCenter().notify( - new Message(MSG.view_searchBar_savedSearch_delete(savedSearch.getName()), Severity.Info)); - } - }); - } else { - activateSavedSearch(savedSearch); // activating the saved search also clicks the button - } - } - } - - public void activateSavedSearch(Integer savedSearchId) { - activeSavedSearchByIdOrName(savedSearchId, null); - } - - public void activateSavedSearch(String savedSearchName) { - activeSavedSearchByIdOrName(null, savedSearchName); - } - - private void activeSavedSearchByIdOrName(Integer savedSearchId, final String savedSearchName) { - Subject subject = UserSessionManager.getSessionSubject(); - SavedSearchCriteria criteria = new SavedSearchCriteria(); - criteria.addFilterSubjectId(subject.getId()); - criteria.addFilterId(savedSearchId); // null OK - criteria.addFilterName(savedSearchName); // null OK - criteria.setStrict(true); - - GWTServiceLookup.getSearchService().findSavedSearchesByCriteria(criteria, - new AsyncCallback<List<SavedSearch>>() { - @Override - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failFind(savedSearchName), - caught); - } - - @Override - public void onSuccess(List<SavedSearch> results) { - if (results.size() == 0) { - CoreGUI.getMessageCenter().notify( - new Message(MSG.view_searchBar_savedSearch_failFind(savedSearchName), Severity.Error)); - } else { - SavedSearch savedSearch = results.get(0); - activateSavedSearch(savedSearch); - } - } - }); - } - - public void activateSavedSearch(SavedSearch savedSearch) { - currentSearchId = savedSearch.getId(); - autoCompletePatternField.setValue(savedSearch.getPattern(), true); - patternNameField.setValue(savedSearch.getName(), true); - Log.debug("search results change: [" + savedSearch.getName() + "," + savedSearch.getPattern() + "]"); - turnNameFieldIntoLabel(false); - savedSearchesPanel.hide(); - } - - public String getSelectedTab() { - return null; - } - - public void addKeyPressHandler(KeyPressHandler handler) { - autoCompletePatternField.addKeyPressHandler(handler); - } - - public String getValue() { - return autoCompletePatternField.getText(); - } - -} diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java deleted file mode 100644 index 3845a27..0000000 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2010 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.search.favorites; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; -import com.google.gwt.user.client.Event; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.Grid; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.SavedSearchCriteria; -import org.rhq.core.domain.search.SavedSearch; -import org.rhq.core.domain.search.SearchSubsystem; -import org.rhq.core.domain.util.PageOrdering; -import org.rhq.enterprise.gui.coregui.client.CoreGUI; -import org.rhq.enterprise.gui.coregui.client.UserSessionManager; -import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Joseph Marques - */ -@Deprecated -public class SavedSearchGrid extends Grid { - - private SavedSearchSelectionHandler patternSelectionHandler; - private SearchSubsystem searchSubsystem; - private List<SavedSearch> data = new ArrayList<SavedSearch>(); - - public interface SavedSearchSelectionHandler { - public void handleSelection(int rowIndex, int columnIndex, SavedSearch savedSearch); - } - - public void setSavedSearchSelectionHandler(SavedSearchSelectionHandler handler) { - this.patternSelectionHandler = handler; - } - - class SavedSearchRowFormatter extends RowFormatter { - private int savedSearchCount; - - public SavedSearchRowFormatter() { - this(0); - } - - public SavedSearchRowFormatter(int savedSearchCount) { - this.savedSearchCount = savedSearchCount; - } - - @Override - public String getStyleName(int row) { - // add -bottom decoration for all rows except last - if (row < savedSearchCount) { - return " savedSearchesPanel-row"; - } - return ""; - } - - @Override - public String getStylePrimaryName(int row) { - return getStyleName(row); - } - } - - public SavedSearchGrid(SearchSubsystem searchSubsystem) { - super(0, 2); // assume no rows to start, but we'll always have 2 columns - - setRowFormatter(new SavedSearchRowFormatter()); - sinkEvents(Event.ONMOUSEOVER | Event.ONMOUSEOUT | Event.ONCLICK); - setCellSpacing(0); - setCellPadding(5); - setStyleName("savedSearchesGrid"); - - this.searchSubsystem = searchSubsystem; - } - - @Override - public void onBrowserEvent(Event event) { - Element td = getEventTargetCell(event); - if (td == null) { - return; - } - Element tr = DOM.getParent(td); - Element table = DOM.getParent(tr); - switch (DOM.eventGetType(event)) { - case Event.ONCLICK: { - int columnIndex = DOM.getChildIndex(tr, td); - int rowIndex = DOM.getChildIndex(table, tr); - SavedSearch savedSearch = data.get(rowIndex); // get request-cached element that should be in that row - patternSelectionHandler.handleSelection(rowIndex, columnIndex, savedSearch); - if (columnIndex == 0) { - onRowOut(tr); - } - break; - } - case Event.ONMOUSEOVER: { - onRowOver(tr); - break; - } - case Event.ONMOUSEOUT: { - onRowOut(tr); - break; - } - } - } - - protected void onRowOut(Element row) { - Element actionCell = DOM.getChild(row, 1); - DOM.setStyleAttribute(actionCell, "background", ""); - DOM.setStyleAttribute(row, "backgroundColor", "white"); - } - - protected void onRowOver(Element row) { - Element actionCell = DOM.getChild(row, 1); - //DOM.setStyleAttribute(actionCell, "backgroundImage", "url(" + SearchBar.TRASH + ")"); - DOM.setStyleAttribute(actionCell, "backgroundRepeat", "no-repeat"); - DOM.setStyleAttribute(actionCell, "backgroundPosition", "center"); - DOM.setStyleAttribute(actionCell, "width", "24px"); - DOM.setStyleAttribute(actionCell, "height", "24px"); - DOM.setStyleAttribute(row, "backgroundColor", "rgb(222,222,222)"); - } - - public void updateModel(final AsyncCallback<List<SavedSearch>> callback) { - Subject subject = UserSessionManager.getSessionSubject(); - SavedSearchCriteria criteria = new SavedSearchCriteria(); - criteria.addFilterSubjectId(subject.getId()); - criteria.addFilterSearchSubsystem(searchSubsystem); - criteria.addSortName(PageOrdering.ASC); - - GWTServiceLookup.getSearchService().findSavedSearchesByCriteria(criteria, - new AsyncCallback<List<SavedSearch>>() { - @Override - public void onSuccess(List<SavedSearch> userSavedSearches) { - data = userSavedSearches; // cache for correct client-side lookup on selection event - clear(true); - resizeRows(userSavedSearches.size()); - - int i = 0; - SavedSearchRowFormatter rowFormatter = new SavedSearchRowFormatter(data.size()); - for (SavedSearch nextSavedSearch : userSavedSearches) { - setHTML(i, 0, stylize(nextSavedSearch)); - setHTML(i, 1, trashify()); - i++; - } - setRowFormatter(rowFormatter); - - callback.onSuccess(userSavedSearches); - } - - @Override - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError( - CoreGUI.getMessages().view_searchBar_savedSearch_failFind("*"), caught); - - callback.onFailure(caught); - } - }); - } - - private static String stylize(SavedSearch savedSearch) { - String name = savedSearch.getName(); - String pattern = savedSearch.getPattern(); - String count = savedSearch.getResultCount() == null ? "" : "(" + savedSearch.getResultCount() + ")"; - return "<span class="savedSearchesPanel-top">" + name + "</span> " + count + "<br/>" // - + "<span class="savedSearchesPanel-bottom">" + pattern + "</span>"; - } - - private static String trashify() { - return "<div name="action"></div>"; - } - - public String getSelectedItem() { - return ""; - } - - public int size() { - return data.size(); - } -} diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java deleted file mode 100644 index c4b91c5..0000000 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java +++ /dev/null @@ -1,762 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2010 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.search.suggest; - -import com.google.gwt.event.dom.client.*; -import com.google.gwt.event.logical.shared.*; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.*; -import com.google.gwt.user.client.ui.SuggestOracle.Callback; -import com.google.gwt.user.client.ui.SuggestOracle.Request; -import com.google.gwt.user.client.ui.SuggestOracle.Response; -import com.google.gwt.user.client.ui.SuggestOracle.Suggestion; -import org.rhq.core.domain.search.SearchSuggestion; -import org.rhq.core.domain.search.SearchSuggestion.Kind; -import org.rhq.enterprise.gui.coregui.client.CoreGUI; -import org.rhq.enterprise.gui.coregui.client.Messages; -import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; -import org.rhq.enterprise.gui.coregui.client.gwt.SearchGWTServiceAsync; -import org.rhq.enterprise.gui.coregui.client.search.AbstractSearchBar; -import org.rhq.enterprise.gui.coregui.client.util.Log; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -@Deprecated -public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocusHandlers, HasValue<String>, - - HasSelectionHandlers<Suggestion> { - - private static final Messages MSG = CoreGUI.getMessages(); - - private final AbstractSearchBar searchBar; - private final SearchSuggestOracle oracle; - - private int limit = 20; - private int currentCursorPosition = 0; - private final SuggestionMenu suggestionMenu; - private final PopupPanel suggestionPopup; - private final TextBoxBase box; - private final Callback callback = new Callback() { - public void onSuggestionsReady(Request request, Response response) { - showSuggestions(response.getSuggestions()); - } - }; - - private final String STYLE_NAME_TEXT_BOX = "patternField"; - private final String STYLE_NAME_POPUP_PANEL = "suggestPanel"; - - public SuggestTextBox_v3(AbstractSearchBar searchBar, TextBoxBase box) { - super(); - - this.searchBar = searchBar; - this.oracle = new SearchSuggestOracle(); - - this.box = box; - this.box.setName("SearchPatternField"); - initWidget(box); - - getElement().setAttribute("autocomplete", "off"); // we're producing completion suggestions, not the browser - - // suggestionMenu must be created before suggestionPopup, because - // suggestionMenu is suggestionPopup's widget - suggestionMenu = new SuggestionMenu(true); - // let the text box maintain focus when navigating the menu - suggestionMenu.setFocusOnHoverEnabled(false); - suggestionPopup = createPopup(); - - // need to fork PopupPanel to access the animation type - //suggestionPopup.setAnimationType(PopupPanel.AnimationType.ROLL_DOWN); - - addEventsToTextBox(); - setStyleName(STYLE_NAME_TEXT_BOX); - } - - private PopupPanel createPopup() { - PopupPanel p = new PopupPanel(true, false); - p.setWidget(suggestionMenu); - p.setStyleName(STYLE_NAME_POPUP_PANEL); - p.setPreviewingAllNativeEvents(true); - p.addAutoHidePartner(getTextBox().getElement()); - return p; - } - - class SuggestionCompletionCommand implements Command { - - private Suggestion suggestion; - - public SuggestionCompletionCommand(Suggestion suggestion) { - this.suggestion = suggestion; - } - - public void execute() { - complete(suggestion, currentCursorPosition); - } - } - - private void showSuggestions(Collection<? extends Suggestion> suggestions) { - if (suggestions.size() > 0) { - - // Hide the popup before we manipulate the menu within it. If we do not - // do this, some browsers will redraw the popup as items are removed - // and added to the menu. - boolean isAnimationEnabled = suggestionPopup.isAnimationEnabled(); - if (suggestionPopup.isAttached()) { - suggestionPopup.hide(); - } - - suggestionMenu.clearItems(); - - for (Suggestion curSuggestion : suggestions) { - final SuggestionMenuItem menuItem = new SuggestionMenuItem(curSuggestion, oracle.isDisplayStringHTML(), - new SuggestionCompletionCommand(curSuggestion)); - - suggestionMenu.addItem(menuItem); - } - - class TextBoxSkewWrapper extends TextBox { - private TextBoxBase wrapped; - private int skewWidth; - private int skewHeight; - - public TextBoxSkewWrapper(TextBoxBase textBoxBase, int skewWidth, int skewHeight) { - this.wrapped = textBoxBase; - this.skewWidth = skewWidth; - this.skewHeight = skewHeight; - } - - @Override - public int getOffsetWidth() { - return wrapped.getOffsetWidth(); - } - - @Override - public int getOffsetHeight() { - return wrapped.getOffsetHeight(); - } - - @Override - public int getAbsoluteLeft() { - return wrapped.getAbsoluteLeft() + skewWidth; - } - - @Override - public int getAbsoluteTop() { - return wrapped.getAbsoluteTop() + skewHeight; - } - } - - suggestionPopup.showRelativeTo(new TextBoxSkewWrapper(getTextBox(), 0, 5)); - suggestionPopup.setAnimationEnabled(isAnimationEnabled); - } else { - suggestionPopup.hide(); - } - - setFocus(true); - } - - private void addEventsToTextBox() { - class TextBoxEvents extends HandlesAllKeyEvents implements ValueChangeHandler<String>, ClickHandler { - - private boolean isInstructionalCommentSelected() { - if (!suggestionPopup.isAttached() || suggestionMenu.getSelectedItemIndex() < 0) { - return false; - } - - SearchSuggestion searchSuggestion = suggestionMenu.getSearchSuggestion(); - Kind kind = searchSuggestion.getKind(); - return kind == Kind.InstructionalTextComment; - } - - // We used to allow clicking and keypress to select from the suggestion list. But this - // could be confusing because we keep focus in the text box. A return would likely mean - // the user wants to submit the current pattern in the text box for search. But if the mouse - // was hovering over a suggest menu item, which could be accidental as the menu can be large and - // pops up automatically, his pattern would get replaced by a random suggestion entry and then - // that would get submitted. So, we now only accept clicking to select from the suggest menu - // and we assume a return means the user wants to submit the current text box pattern. - public void onClick(ClickEvent event) { - - // if the user clicked on one of our helpful little messages then just ignore it - if (isInstructionalCommentSelected()) { - return; - } - - handleSuggestions(); - } - - public void onKeyDown(KeyDownEvent event) { - delegateEvent(SuggestTextBox_v3.this, event); - } - - public void onKeyPress(KeyPressEvent event) { - if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) { - Log.debug("****** Pressed Enter in SearchBar"); - hideSuggestionList(); - } - - delegateEvent(SuggestTextBox_v3.this, event); - } - - public void onKeyUp(KeyUpEvent event) { - handleSuggestions(); - - delegateEvent(SuggestTextBox_v3.this, event); - } - - public void onValueChange(ValueChangeEvent<String> event) { - Log.debug("OnValueChange in SearchBar: "+event.getValue()); - delegateEvent(SuggestTextBox_v3.this, event); - } - - private void handleSuggestions() { - int nextCursorPosition = getTextBox().getCursorPos(); - if (nextCursorPosition != -1) { - // refresh suggestions if cursor moved, meaning users want suggestions from a different context - if (currentCursorPosition != nextCursorPosition) { - currentCursorPosition = nextCursorPosition; - showSuggestions(); - } - } - } - } - - TextBoxEvents events = new TextBoxEvents(); - events.addKeyHandlersTo(box); - box.addClickHandler(events); - box.addValueChangeHandler(events); - } - - /* - * Composite methods - */ - public void setLimit(int limit) { - this.limit = limit; - } - - /* - * Handler methods - */ - public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { - return addDomHandler(handler, KeyDownEvent.getType()); - } - - public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) { - return addDomHandler(handler, KeyPressEvent.getType()); - } - - public HandlerRegistration addKeyUpHandler(KeyUpHandler handler) { - return addDomHandler(handler, KeyUpEvent.getType()); - } - - public HandlerRegistration addSelectionHandler(SelectionHandler<Suggestion> handler) { - return addHandler(handler, SelectionEvent.getType()); - } - - public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) { - return addHandler(handler, ValueChangeEvent.getType()); - } - - public int getLimit() { - return limit; - } - - /* - * TextBox methods - */ - public void setText(String text) { - box.setText(text); - } - - public void setValue(String newValue) { - box.setValue(newValue); - } - - public void setValue(String value, boolean fireEvents) { - box.setValue(value, fireEvents); - } - - public String getText() { - return box.getText(); - } - - public String getValue() { - return box.getValue(); - } - - public TextBoxBase getTextBox() { - return box; - } - - public void setFocus(boolean focused) { - box.setFocus(focused); - } - - /* - * SuggestBox methods - */ - public void showSuggestionList() { - if (isAttached()) { - showSuggestions(); - } - } - - public void hideSuggestionList() { - this.suggestionPopup.hide(); - } - - public boolean isSuggestionListShowing() { - return suggestionPopup.isShowing(); - } - - /** - * Get the number of suggestions that are currently showing. - * - * @return the number of suggestions currently showing, 0 if there are none - */ - int getSuggestionCount() { - return isSuggestionListShowing() ? suggestionMenu.getNumItems() : 0; - } - - void showSuggestions() { - String query = box.getText(); - int cursorPos = currentCursorPosition; - if (query.length() == 0) { - oracle.requestDefaultSuggestions(new SearchSuggestionRequest(null, cursorPos, limit), callback); - } else { - oracle.requestSuggestions(new SearchSuggestionRequest(query, cursorPos, limit), callback); - } - } - - /** - * The SuggestionMenu class is used for the display and selection of - * suggestions in the SuggestBox widget. SuggestionMenu differs from MenuBar - * in that it always has a vertical orientation, and it has no submenus. It - * also allows for programmatic selection of items in the menu, and - * programmatically performing the action associated with the selected item. - * In the MenuBar class, items cannot be selected programatically - they can - * only be selected when the user places the mouse over a particlar item. - * Additional methods in SuggestionMenu provide information about the number - * of items in the menu, and the index of the currently selected item. - */ - private static class SuggestionMenu extends MenuBar { - - public SuggestionMenu(boolean vertical) { - super(vertical); - // Make sure that CSS styles specified for the default Menu classes - // do not affect this menu - setStyleName(""); - } - - @SuppressWarnings("unused") - public void doSelectedItemAction() { - // In order to perform the action of the item that is currently - // selected, the menu must be showing. - MenuItem selectedItem = getSelectedItem(); - if (selectedItem != null) { - selectedItem.getCommand().execute(); - //doItemAction(selectedSuggestItem, true); - } - } - - public int getNumItems() { - return getItems().size(); - } - - /** - * Returns the index of the menu item that is currently selected. - * - * @return returns the selected item - */ - public int getSelectedItemIndex() { - // The index of the currently selected item can only be - // obtained if the menu is showing. - MenuItem selectedItem = getSelectedItem(); - if (selectedItem != null) { - return getItems().indexOf(selectedItem); - } - return -1; - } - - public SearchSuggestion getSearchSuggestion() { - SuggestionMenuItem menuItem = (SuggestionMenuItem) getSelectedItem(); - Suggestion suggestion = menuItem.getSuggestion(); - SearchSuggestion searchSuggestion = extraSearchSuggestion(suggestion); - return searchSuggestion; - } - } - - private static SearchSuggestion extraSearchSuggestion(Suggestion suggestion) { - SearchSuggestionOracleAdapter adapter = (SearchSuggestionOracleAdapter) suggestion; - SearchSuggestion searchSuggestion = adapter.getSearchSuggestion(); - return searchSuggestion; - } - - /** - * Class for menu items in a SuggestionMenu. A SuggestionMenuItem differs from - * a MenuItem in that each item is backed by a Suggestion object. The text of - * each menu item is derived from the display string of a Suggestion object, - * and each item stores a reference to its Suggestion object. - */ - private static class SuggestionMenuItem extends MenuItem { - - private static final String STYLENAME_DEFAULT = "suggestData"; - - private Suggestion suggestion; - - public SuggestionMenuItem(Suggestion suggestion, boolean asHTML, SuggestionCompletionCommand command) { - super(getFormattedLabel(suggestion), asHTML, command); - // Each suggestion should be placed in a single row in the suggestion - // menu. If the window is resized and the suggestion cannot fit on a - // single row, it should be clipped (instead of wrapping around and - // taking up a second row). - DOM.setStyleAttribute(getElement(), "whiteSpace", "nowrap"); - setStyleName(STYLENAME_DEFAULT); - setSuggestion(suggestion); - } - - public Suggestion getSuggestion() { - return suggestion; - } - - public void setSuggestion(Suggestion suggestion) { - this.suggestion = suggestion; - } - - private static String getFormattedLabel(Suggestion suggestion) { - return getFormattedLabel(extraSearchSuggestion(suggestion)); - } - - private static String getFormattedLabel(SearchSuggestion item) { - String className = "suggestData "; - String prefix = ""; - - if (item.getKind() == SearchSuggestion.Kind.Simple) { - className += "suggestDataSimple"; - prefix = "text"; - } else if (item.getKind() == SearchSuggestion.Kind.Advanced) { - className += "suggestDataAdvanced"; - prefix = "query"; - } else if (item.getKind() == SearchSuggestion.Kind.GlobalSavedSearch - || item.getKind() == SearchSuggestion.Kind.UserSavedSearch) { - className += "suggestDataSavedSearch"; - prefix = "saved"; - } else { - } - - String style = "font-variant: small-caps; font-weight: bold; font-size: 11px; float: left; margin-left: 2px; width: 50px;"; - int marginOffset = 20; - if (className.endsWith("suggestDataSavedSearch")) { - style += " color: green;"; - marginOffset += 2; - } else { - style += " color: gray;"; - if (className.endsWith("suggestDataSimple")) { - marginOffset += 8; - } - } - - String decoratedPrefix = wrap(prefix, style); - String formattedItemLabel = chopWithEvery(item.getLabel(), "<br/>", 100); - String decoratedItemLabel = decorate(formattedItemLabel, "background-color: yellow;", item.getStartIndex(), - item.getEndIndex()); - String highlightedSuggestion = colorOperator(decoratedItemLabel); - String decoratedSuffix = wrap(highlightedSuggestion, "float: left; "); - String floatClear = "<br style="clear: both;" />"; - - String innerHTML = decoratedPrefix + decoratedSuffix + floatClear; - return innerHTML; - } - - private static String chopWithEvery(String toChop, String with, int every) { - //String[] words = toChop.split("\s"); - List<String> words = chop(toChop, "\/- \t\r\n"); - StringBuilder results = new StringBuilder(); - int currentLineLength = 0; - for (String next : words) { - results.append(next); - currentLineLength += next.length(); - if (currentLineLength + next.length() > every) { - results.append(with); - currentLineLength = 0; - } - } - - return results.toString(); - } - - // StringTokenzier doesn't exist in GWT, so have to write my own - private static List<String> chop(String dataToChop, String chopTokens) { - List<String> words = new ArrayList<String>(); - - StringBuilder builder = new StringBuilder(); - for (char next : dataToChop.toCharArray()) { - if (chopTokens.indexOf(next) != -1) { - if (builder.length() > 0) { - words.add(builder.toString()); - builder = new StringBuilder(); - } - } - builder.append(next); - } - - if (builder.length() > 0) { - words.add(builder.toString()); - } - - return words; - } - - private static final List<String> OPERATORS = Arrays.asList("!==", "!=", "==", "="); - - // TODO: fixing coloring strategy - private static String colorOperator(String data) { - for (String operator : OPERATORS) { - int index = -1; - while ((index = data.indexOf(operator, index + 1)) != -1) { - if ((index - 5 >= 0) && data.substring(index - 5, index).equals("style") == false) { - break; - } - } - if (index != -1) { - return decorate(data, "color: blue;", index, index + operator.length()); - } - } - return data; - } - - private static String wrap(String data, String style) { - return "<span style="" + style + "">" + data + "</span>"; - } - - /* - private static String decorate(String data, String style, int startIndex, int endIndex) { - if (startIndex == -1) { - return data; // no match - } - String before = data.substring(0, startIndex); - String highlight = data.substring(startIndex, endIndex); - String after = data.substring(endIndex); - return before + "<span style="" + style + "">" + highlight + "</span>" + after; - } - */ - - private static String decorate(String data, String style, int startIndex, int endIndex) { - if (startIndex == -1 || (startIndex == endIndex)) { - return data; // no match or zero-width match - } - - String[] words = data.split("<br/>"); - int counter = 0; - int wordIndex = 0; - int letterIndex = 0; - - StringBuilder results = new StringBuilder(); - while (counter < startIndex) { - if (wordIndex == words.length) { - break; - } - - if (letterIndex < words[wordIndex].length()) { // more letters left in the current word? - results.append(words[wordIndex].charAt(letterIndex)); // append the next char of the current word - letterIndex++; // move to the next char in the current word - counter++; // only move counter forward when we've added non-BR chars to the results - } else { // next word - results.append("<br/>"); // put the break point back in between words - letterIndex = 0; // point to the first char - wordIndex++; // of the next word - } - } - - // we're at start index, wrap all words and word fragments in the specified style up to endIndex - results.append("<span style="" + style + "">"); // seed action - while (counter < endIndex) { - if (wordIndex == words.length) { - break; - } - - if (letterIndex < words[wordIndex].length()) { // more letters left in the current word? - results.append(words[wordIndex].charAt(letterIndex)); // append the next char of the current word - letterIndex++; // move to the next char in the current word - counter++; // only move counter forward when we've added non-BR chars to the results - } else { // next word - results.append("</span>"); // close the previous word, we don't highlight breaks - results.append("<br/>"); // put the break point back in between words - letterIndex = 0; // point to the first char - wordIndex++; // of the next word - results.append("<span style="" + style + "">"); // prepare for next word - } - } - results.append("</span>"); // end last dangling span - - // append the rest of the current word fragment, if any - if (wordIndex != words.length) { - results.append(words[wordIndex].substring(letterIndex)); - } - - // append the rest of the words - while (++wordIndex < words.length) { - results.append("<br/>"); // put the break point back in between words - results.append(words[wordIndex]); - } - - return results.toString(); - } - } - - @Deprecated - class SearchSuggestOracle extends SuggestOracle { - private SearchGWTServiceAsync searchService = GWTServiceLookup.getSearchService(); - - @Override - public boolean isDisplayStringHTML() { - return true; - } - - @Override - public void requestDefaultSuggestions(Request request, Callback callback) { - requestSuggestions(request, callback); - } - - @Override - public void requestSuggestions(final Request request, final Callback callback) { - SearchSuggestionRequest suggestionRequest = (SearchSuggestionRequest) request; - String expression = suggestionRequest.getQuery(); - int caretPosition = suggestionRequest.getCursorPosition(); - - searchService.getTabAwareSuggestions(searchBar.getSearchSubsystem(), expression, caretPosition, - searchBar.getSelectedTab(), new AsyncCallback<List<SearchSuggestion>>() { - - public void onSuccess(List<SearchSuggestion> results) { - adaptAndHandle(results.toArray(new SearchSuggestion[results.size()])); - } - - public void onFailure(Throwable caught) { - SearchSuggestion errorInform = new SearchSuggestion(Kind.InstructionalTextComment, MSG - .view_searchBar_instructional_failSuggest()); - adaptAndHandle(errorInform); - } - - private void adaptAndHandle(SearchSuggestion... searchSuggestionResults) { - List<SearchSuggestionOracleAdapter> adaptedResults = new java.util.ArrayList<SearchSuggestionOracleAdapter>(); - for (SearchSuggestion next : searchSuggestionResults) { - adaptedResults.add(new SearchSuggestionOracleAdapter(next)); - } - if (adaptedResults.isEmpty()) { - adaptedResults.add(new SearchSuggestionOracleAdapter(new SearchSuggestion( - Kind.InstructionalTextComment, MSG.view_searchBar_instructional_noSuggest()))); - } - SuggestOracle.Response response = new SuggestOracle.Response(adaptedResults); - callback.onSuggestionsReady(request, response); - } - }); - } - } - - protected void complete(Suggestion suggestion, int cursorPosition) { - SearchSuggestion searchSuggestion = extraSearchSuggestion(suggestion); - String currentText = getText().toLowerCase(); - - if (searchSuggestion.getKind() == SearchSuggestion.Kind.GlobalSavedSearch - || searchSuggestion.getKind() == SearchSuggestion.Kind.UserSavedSearch) { - // execute saved searches immediately, since they presumably constitute complete expressions - Log.debug("selected '" + searchSuggestion.getLabel() + "' saved search suggestion"); - searchBar.activateSavedSearch(searchSuggestion.getValue()); - } else { - // selecting a simple suggestion or advanced suggestion - - int previousWhitespaceIndex = cursorPosition; - if (cursorPosition != 0) { - while (--previousWhitespaceIndex > 0) { - if (currentText.charAt(previousWhitespaceIndex) == ' ') { - previousWhitespaceIndex++; // put index right after found whitespace - break; - } - } - } - - int futureWhitespaceIndex = cursorPosition; - while (futureWhitespaceIndex < currentText.length()) { - if (currentText.charAt(futureWhitespaceIndex) == ' ') { - break; - } - futureWhitespaceIndex++; - } - - String before = getText().substring(0, previousWhitespaceIndex); - String completion = suggestion.getReplacementString(); - String after = getText().substring(futureWhitespaceIndex); - - setValue(before + completion + after, true); - currentCursorPosition = before.length() + completion.length(); - getTextBox().setCursorPos(currentCursorPosition); - - showSuggestions(); - } - } - - @Deprecated - class SearchSuggestionRequest extends SuggestOracle.Request { - private int cursorPosition; - - public SearchSuggestionRequest(String query, int cursorPosition, int limit) { - super(query, limit); - this.cursorPosition = cursorPosition; - } - - public int getCursorPosition() { - return cursorPosition; - } - } - - class SearchSuggestionOracleAdapter implements SuggestOracle.Suggestion { - private final SearchSuggestion suggestion; - - public SearchSuggestionOracleAdapter(SearchSuggestion suggestion) { - this.suggestion = suggestion; - } - - public String getDisplayString() { - return suggestion.getLabel(); - } - - public String getReplacementString() { - return suggestion.getValue(); - } - - public SearchSuggestion getSearchSuggestion() { - return suggestion; - } - } - - public HandlerRegistration addFocusHandler(FocusHandler handler) { - // TODO Auto-generated method stub - return null; - } - - public HandlerRegistration addBlurHandler(BlurHandler handler) { - // TODO Auto-generated method stub - return null; - } -}
commit 123a951be3bd28161cdf7ccf3d45e59124d86489 Author: Jay Shaughnessy jshaughn@redhat.com Date: Fri Sep 14 12:30:47 2012 -0400
[Bug 856819 - [as7, CLI] NullPointerException when trying to deploy war on EAP 6 in domain mode using CLI and createPackageBackedResource method] The AS7 deployment code was relying on PackageVersion.filename being set. But this is not a reliable field, it only reflects the filename of the file uploaded to provide the content. It can't be used because: - It is not set unless the file is tryly uploaded (likein he GUI via PackageVersionFileUploadServlet) - It is not set via the CLI, or potentially other mechanisms, which supply only the binary content - It is not necessarily a valid reflection of the content (i.e. not unique, etc)
The packageName is really the only thing we can use here. It is guaranteed, is unique, and should reflect the content. It is what is used for similar needs in the previous plugins.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java index 2851128..a4e99b4 100644 --- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java +++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java @@ -390,7 +390,7 @@ public class BaseComponent<T extends ResourceComponent<?>> implements AS7Compone ServerPluginConfiguration serverPluginConfig = getServerComponent().getServerPluginConfiguration(); ASUploadConnection uploadConnection = new ASUploadConnection(serverPluginConfig.getHostname(), serverPluginConfig.getPort(), serverPluginConfig.getUser(), serverPluginConfig.getPassword()); - OutputStream out = uploadConnection.getOutputStream(details.getFileName()); + OutputStream out = uploadConnection.getOutputStream(details.getKey().getName()); contentServices.downloadPackageBitsForChildResource(cctx, resourceTypeName, details.getKey(), out);
JsonNode uploadResult = uploadConnection.finishUpload(); diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java index 7be42bb..1c667da 100644 --- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java +++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DeploymentComponent.java @@ -134,7 +134,7 @@ public class DeploymentComponent extends BaseComponent<ResourceComponent<?>> imp ResourcePackageDetails detail = packages.iterator().next();
ASUploadConnection uploadConnection = new ASUploadConnection(getASConnection()); - OutputStream out = uploadConnection.getOutputStream(detail.getFileName()); + OutputStream out = uploadConnection.getOutputStream(detail.getKey().getName()); ResourceType resourceType = context.getResourceType();
log.info("Deploying " + resourceType.getName() + " Resource with key [" + detail.getKey() +"]..."); diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java index 8d5c64e..82b1042 100644 --- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java +++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java @@ -101,8 +101,8 @@ public class ServerGroupComponent extends BaseComponent implements ContentFacet, ServerPluginConfiguration serverPluginConfig = getServerComponent().getServerPluginConfiguration(); ASUploadConnection uploadConnection = new ASUploadConnection(serverPluginConfig.getHostname(), serverPluginConfig.getPort(), serverPluginConfig.getUser(), serverPluginConfig.getPassword()); - String fileName = details.getFileName(); - OutputStream out = uploadConnection.getOutputStream(fileName); + String packageName = details.getName(); + OutputStream out = uploadConnection.getOutputStream(packageName); contentServices.downloadPackageBits(cctx, details.getKey(), out, false); JsonNode uploadResult = uploadConnection.finishUpload(); if (uploadResult.has(OUTCOME)) { @@ -113,7 +113,7 @@ public class ServerGroupComponent extends BaseComponent implements ContentFacet, ASConnection connection = getASConnection();
Address deploymentsAddress = new Address(); - deploymentsAddress.add("deployment", fileName); + deploymentsAddress.add("deployment", packageName); Operation step1 = new Operation("add",deploymentsAddress); // step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash)); List<Object> content = new ArrayList<Object>(1); @@ -122,10 +122,10 @@ public class ServerGroupComponent extends BaseComponent implements ContentFacet, content.add(contentValues); step1.addAdditionalProperty("content",content);
- step1.addAdditionalProperty("name", fileName); + step1.addAdditionalProperty("name", packageName);
Address serverGroupAddress = new Address(context.getResourceKey()); - serverGroupAddress.add("deployment", fileName); + serverGroupAddress.add("deployment", packageName); Operation step2 = new Operation("add",serverGroupAddress); Operation step3 = new Operation("deploy",serverGroupAddress);
commit c1ba47b0832ac7268c426d4111a2ee2e19c1e4ae Author: Jay Shaughnessy jshaughn@redhat.com Date: Fri Sep 14 12:25:25 2012 -0400
[Bug 856833 - [as7] CLI invocation for a DomainDeployment Proxy deployToServerGroup fails] This really had nothing to do with AS7, and everything to do with the ResourceProxy code in the CLI, when it attempted to translate command-line params to an operation Configuration.
diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ConfigurationClassBuilder.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ConfigurationClassBuilder.java index 29bd4a6..b739581 100644 --- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ConfigurationClassBuilder.java +++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ConfigurationClassBuilder.java @@ -35,6 +35,11 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple; */ public class ConfigurationClassBuilder {
+ /** + * @param def + * @return Map of propertyName to types for the config def + * @throws NotFoundException + */ public static LinkedHashMap<String, CtClass> translateParameters(ConfigurationDefinition def) throws NotFoundException { LinkedHashMap<String, CtClass> result = new LinkedHashMap<String, CtClass>(); @@ -45,7 +50,7 @@ public class ConfigurationClassBuilder { for (PropertyDefinition pd : def.getPropertyDefinitions().values()) { if (pd instanceof PropertyDefinitionSimple) { PropertyDefinitionSimple simple = (PropertyDefinitionSimple) pd; - String name = simpleName(simple.getDisplayName()); + String name = pd.getName(); CtClass paramType = getSimpleTypeClass(simple); result.put(name, paramType); }
commit 2b1a462a41684da0ce8acfd289f1a81ed32c8097 Author: Stefan Negrea snegrea@redhat.com Date: Fri Sep 14 07:56:18 2012 -0500
[BZ 857441] Update Sigar version
diff --git a/.classpath b/.classpath index a5a5568..c7b5745 100644 --- a/.classpath +++ b/.classpath @@ -239,7 +239,7 @@ <classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0.GA/richfaces-ui-3.3.0.GA-sources.jar"/> <classpathentry exported="true" kind="var" path="M2_REPO/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar"/> <classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-cache/1.4.1.SP9/jboss-cache-1.4.1.SP9.jar"/> - <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132/sigar-1.6.5.132.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.3.82/sigar-1.6.3.82-sources.jar"/> + <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3-sources.jar"/> <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jta/4.2.3.SP5/jboss-jta-4.2.3.SP5.jar"/> <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jts-common/4.2.3.SP5/jboss-jts-common-4.2.3.SP5.jar"/> <classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossws-spi/1.1.1.GA/jbossws-spi-1.1.1.GA.jar"/> diff --git a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java index e622910..97b6df8 100644 --- a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java +++ b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java @@ -63,7 +63,7 @@ public class SigarInstaller { .loadMetadataFromPom("pom.xml") .goOffline() // TODO (ips, 05/02/12): Figure out how to make this work without hard-coding the version. - .artifact("org.hyperic:sigar-dist:zip:1.6.5.132") + .artifact("org.hyperic:sigar-dist:zip:1.6.5.132-3") .resolveAs(JavaArchive.class);
if (sigars.size() > 1) { diff --git a/modules/core/native-system/ant-run.xml b/modules/core/native-system/ant-run.xml index 51507a7..a98f94d 100644 --- a/modules/core/native-system/ant-run.xml +++ b/modules/core/native-system/ant-run.xml @@ -11,7 +11,7 @@ Ant Script that builds a test jar to run SIGAR bug replication code. <!-- in case it wasn't passed in, assume the default location --> <property name="settings.localRepository" location="${user.home}/.m2/repository"/> <property name="project.version" value="3.0.0-SNAPSHOT"/> - <property name="sigar.version" value="1.6.5.132"/> + <property name="sigar.version" value="1.6.5.132-3"/> <property name="log4j.version" value="1.2.16"/>
<fileset dir="${settings.localRepository}" id="jar.fileset"> diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml index 456a260..587a9e9 100644 --- a/modules/enterprise/agent/ant-run.xml +++ b/modules/enterprise/agent/ant-run.xml @@ -11,7 +11,7 @@ Ant Script that provides ways to package the Agent. <!-- in case these weren't passed in (i.e. not invoked via maven), assume some defaults --> <property name="settings.localRepository" location="${user.home}/.m2/repository"/> <property name="project.version" value="2.0.0-SNAPSHOT"/> - <property name="sigar.version" value="1.6.5.132"/> + <property name="sigar.version" value="1.6.5.132-3"/> <property name="augeas.version" value="0.9.0"/> <property name="augeas.classifier" value="el5"/> <property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/> diff --git a/pom.xml b/pom.xml index 7c1451e..61343ef 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ <jtds.version>1.2.2</jtds.version> <richfaces.version>3.3.3.Final</richfaces.version> <jline.version>0.9.94</jline.version> - <sigar.version>1.6.5.132</sigar.version> + <sigar.version>1.6.5.132-3</sigar.version> <sigar.zip.version>1.6.5</sigar.zip.version> <quartz.version>1.6.5</quartz.version> <jna.version>3.2.5</jna.version>
commit 6c45114a0ab937e1aa0709ca162c9ebabd04c4ce Author: Mike Thompson mithomps@redhat.com Date: Thu Sep 13 14:01:28 2012 -0700
In addition to caching images also cache *.jpg and *.png as there can be images (such as those from smartGWT) that dont match the /images/* pattern and also need to be cached.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/filter/CacheControlFilter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/filter/CacheControlFilter.java index dcd0cfb..3d1848f 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/filter/CacheControlFilter.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/filter/CacheControlFilter.java @@ -58,7 +58,7 @@ public class CacheControlFilter implements Filter { httpResponse.setDateHeader("Expires", now.getTime() - 1); httpResponse.setHeader("Pragma", "no-cache"); httpResponse.setHeader("Cache-Control", "public, max-age=0, must-revalidate"); - } else if (requestURI.contains(".cache.") || requestURI.contains("/images/")) { + } else if (requestURI.contains(".cache.") || requestURI.contains("/images/") || requestURI.endsWith("*.jpg") || requestURI.endsWith("*.png")) { // Tell browser to cache the content for one year. Date now = new Date(); HttpServletResponse httpResponse = (HttpServletResponse) response;
commit 0f008edea21b9749226c5fa63947a29c0bfff399 Author: Mike Thompson mithomps@redhat.com Date: Thu Sep 13 13:55:49 2012 -0700
Optimize css properties in CoreGUI.css.
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css index 7c86907..6095aec 100644 --- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css +++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css @@ -56,47 +56,27 @@ a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
.OddRow { - background-color: white; - border-bottom-color: rgb(230, 234, 239); - border-bottom-style: solid; - border-bottom-width: 1px; - border-right-color: rgb(217, 224, 227); - border-right-style: solid; - border-right-width: 1px; - + background-color: #ffffff; + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); }
.OddRowDisabled { - background-color: white; - border-bottom-color: rgb(230, 234, 239); - border-bottom-style: solid; - border-bottom-width: 1px; - border-right-color: rgb(217, 224, 227); - border-right-style: solid; - border-right-width: 1px; - + background-color: #ffffff; + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); }
.EvenRow { background-color: rgb(246, 246, 246); - border-bottom-color: rgb(230, 234, 239); - border-bottom-style: solid; - border-bottom-width: 1px; - border-right-color: rgb(217, 224, 227); - border-right-style: solid; - border-right-width: 1px; - + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); }
.EvenRowDisabled { background-color: rgb(246, 246, 246); - border-bottom-color: rgb(230, 234, 239); - border-bottom-style: solid; - border-bottom-width: 1px; - border-right-color: rgb(217, 224, 227); - border-right-style: solid; - border-right-width: 1px; - + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); }
.inheritColor { @@ -170,8 +150,7 @@ a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover { }
.availBarDown { - background-image: url("images/availBar/down.png"); - background-repeat: repeat-x; + background: url("images/availBar/down.png") repeat-x; height: 28px; }
@@ -317,9 +296,8 @@ a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
/** Not used right now **/ .gwtMenuBar { - background-image: url('images/header/header_bg.png'); + background: url('images/header/header_bg.png') repeat-x; /*background-image: url("http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/skin... - background-repeat: repeat-x; padding: 0px; -moz-box-sizing: border-box; overflow: hidden; @@ -366,10 +344,7 @@ a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover { }
.InfoBlock,.ConfirmationBlock,.WarnBlock,.ErrorBlock,.FatalBlock { - /*padding: 4px;*/ - border-width: 1px; - border-style: solid; - /*font-size: 10px;*/ + border: 1px solid; color: #000000; }
@@ -407,8 +382,7 @@ a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover { }
.configurationEditorHeaderCell { - border-style: solid; - border-width: 1px; + border: 1px solid; background-color: #EEE; /* light gray */ font-weight: bolder; }
commit 743ad90df5e1efecf2e0d66246cf50a9788195f9 Author: Mike Thompson mithomps@redhat.com Date: Thu Sep 13 13:54:21 2012 -0700
Remove old search.js and search.css as no longer needed.
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html index 6a78aab..cdcfe24 100644 --- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html +++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html @@ -17,7 +17,7 @@ if(search.indexOf("locale") == -1){ // IE uses browserLanguage var lang = navigator.language!=null ? navigator.language : navigator.browserLanguage; - var lang = lang.replace("-", "_"); + lang = lang.replace("-", "_"); document.write("<meta name='gwt:property' content='locale="+lang +"'>"); } </script> @@ -32,7 +32,6 @@ </script>
<link rel="stylesheet" href="CoreGUI.css"> - <link rel="stylesheet" href="css/search.css">
<style type="text/css"> .menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled { diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css deleted file mode 100644 index 81a6967..0000000 --- a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css +++ /dev/null @@ -1,245 +0,0 @@ - -input { - white-space: no-wrap; -} - -div { - margin-right: auto; - margin-left: auto; -} - -/* - * - * search container elements - * searchBarContainer width is the total width of the search bar. - * searchBarBackgroundContainer is the available width for the components inside (takes into consideration RHS padding) - * - */ - -.searchBarContainer { - width: 800px; - position: relative; - background-color: white; - height: 34px; - vertical-align: bottom; - z-index: 999999; -} - -.searchBarBackgroundContainer { - position: absolute; - background-color: white; - border-style: inset; - border-color: gray; - border-width: 1px 1px 1px 1px; - padding: 0; - width: 785px; - height: 20px; - z-index: 999999; -} - -.searchBarComponentsContainer { - width: 100%; - margin: 0; - padding: 0; - z-index: 999999; -} - -.searchBarComponentLHS { - background-color: white; - float: left; - /* width: 200px; */ -} - -.searchBarComponentRHS { - background-color: white; - float: right; - padding-right: 4px; - padding-top: 2px; -} - - -/* - * - * pattern field items - * patternField is the current pattern, its width is the max visible portion - * patternNameField is the the edit box when naming a saved search, its width is the max visible portion (less the border) - * patternNameLabel is for displaying the saved search name when a saved search is selected - * - * - the combined width of patternField + patternNameField + all other RHS components (the star and - * arrow images) must equal the width of searchBarBackgroundContainer in order for everything to be seen when - * patternNameField (or patternNameLabel) are being shown. - * - the width of patternNameField and patternNameLabel must be the same. - * - */ - -.patternField { - font-size: 13px; - font-family: arial, sans-serif; - width: 600px; - padding: 0; - margin: 0; - border-color: white; - border-style: none; - outline: none; - z-index: 999999; -} - -.patternNameField { - font-size: 11px; - color: green; - width: 150px; - white-space: no-wrap; - border-color: gray; - border-style: dotted; - border-width: thin; - outline: none; - z-index: 999999; -} - -.patternNameLabel { - background-color: rgb(192, 236, 207); - color: rgb(51, 106, 63); - font-weight: bold; - white-space: nowrap; - text-align: left; - border-style: none; - font-size: 11px; - width: 150px; - z-index: 999999; -} - - -/* - * - * saved search items - * - */ - -.savedSearchesPanel { - background-color: white; - border-style: none; - padding: 0; - margin: 0; - width: 785px; - z-index: 999999; -} - -.savedSearchesPanel-row { - background-color: white; - border-style: none; - border-bottom-width: thin; - border-bottom-style: solid; - border-bottom-color: gray; - padding: 0px 0px 0px 0px; - margin: 0px 5px 0px 5px; - width: 785px; -} - -.savedSearchesGrid { - background-color: white; - border-style: solid; - border-width: thin; - border-color: buttonshadow; - - border-style: outset; - border-top-color: silver; - border-left-color: silver; - border-bottom-color: gray; - border-right-color: gray; - border-width: 1px 1px 1px 1px; - - padding: 0; - margin: 0; -} - -.savedSearchesPanel-top { - color: green; - font-size: 12px; - position: relative; - padding: 0; - margin: 0; - top: 1px; -} - -.savedSearchesPanel-bottom { - font-size: 10px; - position: relative; - padding: 0; - margin: 3px; - bottom: 1px; -} - - -/* - * - * suggest items - * suggestPanel spans the width of the container, all of the relevant widths must equal that of .searchBarBackgroundContainer - * - */ - -.suggestPanel { - width: 785px; - background: white; - border-style: outset; - border-top-color: silver; - border-left-color: silver; - border-bottom-color: gray; - border-right-color: gray; - border-width: 1px 1px 1px 1px; - - z-index: 999999; -} - -.suggestData { - width: 785px; - margin: 0; - padding: 0; - border: none; -} - -.suggestData-selected { - width: 785px; - background: rgb(222,222,222); -} - -.suggestDataSimple { - color: black; -} - -.suggestDataAdvanced { - color: blue; -} - -.suggestDataSavedSearch { - color: green; -} - - -/* - * Rounded Corners - * http://articles.sitepoint.com/article/rounded-corners-css-javascript - * - * Applied to the patternNameLabel, so the width should be set the same - */ - -div.rounded { - /* just a container for rounded2 div replacement algorithm */ -} -div.rounded2 { - width: 150px; - z-index: 999999; - background: rgb(192, 236, 207) url(/coregui/images/search/corner-upper-right-8.png) no-repeat top right; -} -div.rounded2 div { - background: transparent url(/coregui/images/search/corner-upper-left-8.png) no-repeat top left; -} -div.rounded2 div div { - background: transparent url(/coregui/images/search/corner-lower-right-8.png) no-repeat bottom right; -} -div.rounded2 div div div { - background: transparent url(/coregui/images/search/corner-lower-left-8.png) no-repeat bottom left; -} - -div.rounded2 div div div div { - background-image: none; -} \ No newline at end of file diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/search.js b/modules/enterprise/gui/coregui/src/main/webapp/js/search.js deleted file mode 100644 index ad86428..0000000 --- a/modules/enterprise/gui/coregui/src/main/webapp/js/search.js +++ /dev/null @@ -1,61 +0,0 @@ -function roundedCorners() { - var divs = document.getElementsByTagName('div'); - var rounded_divs = []; - for (var i = 0; i < divs.length; i++) { - if (/\brounded\b/.exec(divs[i].className)) { - rounded_divs[rounded_divs.length] = divs[i]; - } - } - for (var i = 0; i < rounded_divs.length; i++) { - var original = rounded_divs[i]; - - /* Make it the inner div of the four */ - original.className = original.className.replace('rounded', ''); - //var originalId = original.id; - //original.id = null; - - /* Now create the outer-most div */ - var tr = document.createElement('div'); - //tr.id = originalId; - tr.className = 'rounded2'; - - /* Swap out the original (we'll put it back later) */ - original.parentNode.replaceChild(tr, original); - - /* Create the two other inner nodes */ - var tl = document.createElement('div'); - var br = document.createElement('div'); - - /* Now glue the nodes back in to the document */ - tr.appendChild(tl); - tl.appendChild(br); - br.appendChild(original); - } -} - -function loadRoundedCorners() { -/* - var pos = navigator.userAgent.indexOf('MSIE'); - if (pos > -1) { - var longVersion = navigator.userAgent.substring(pos + 5); - var shortVersion = longVersion.substring(0, longVersion.indexOf(';')); - if (shortVersion.indexOf('8') == -1) { - return; - } - } -*/ - - if (typeof window.onload != 'function') { - window.onload = roundedCorners; - } else { - var oldMethod = window.onload; - window.onload = function() { - if (oldMethod) { - oldMethod(); - } - roundedCorners(); - } - } -} - -loadRoundedCorners();
rhq-commits@lists.fedorahosted.org