[rhq] Branch 'drift' - 4 commits - .classpath modules/core modules/enterprise
by Jay Shaughnessy
.classpath | 4
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/drift/DriftAgentService.java | 2
modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml | 4
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 2
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java | 21 -
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java | 154 -------
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java | 135 ------
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java | 29 +
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java | 179 --------
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java | 36 +
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java | 153 -------
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftChangeSetCriteria.java | 184 +++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftCriteria.java | 164 ++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java | 201 ++++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java | 172 ++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractDriftFile.java | 87 ----
modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractJPADriftFile.java | 87 ++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java | 38 -
modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java | 30 +
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java | 29 +
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDiffReport.java | 38 +
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFile.java | 26 +
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFileBits.java | 94 ----
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftSnapshot.java | 91 ++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java | 181 +++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java | 179 ++++++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFile.java | 75 +++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFileBits.java | 94 ++++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java | 181 ---------
modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java | 179 --------
modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftFile.java | 75 ---
modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java | 68 ---
modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java | 6
modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java | 28 -
modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java | 103 ++---
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftFilesSender.java | 8
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java | 9
modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftFilesSenderTest.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java | 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java | 47 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java | 39 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 19
modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 154 ++++---
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java | 30 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java | 13
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java | 9
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 8
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java | 29 -
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java | 2
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java | 42 --
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java | 15
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java | 62 ---
modules/enterprise/server/plugins/drift-rhq/src/main/resources/META-INF/rhq-serverplugin.xml | 6
modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml | 1
61 files changed, 1976 insertions(+), 1710 deletions(-)
New commits:
commit 607e5aa25e51621b1886fb77fa71263fa78b13c8
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Aug 3 09:23:04 2011 -0400
Make analogous addition of driftConfigId filter to change set criteria, in
the refactored code.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
index d73c744..331400c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
@@ -65,12 +65,13 @@ public class JPADriftChangeSetCriteria extends Criteria implements DriftChangeSe
filterOverrides.put("createdBefore", "ctime <= ?");
if (null != changeSetCriteria) {
- this.addFilterId(changeSetCriteria.getFilterId());
- this.addFilterResourceId(changeSetCriteria.getFilterResourceId());
this.addFilterCategory(changeSetCriteria.getFilterCategory());
this.addFilterCreatedAfter(changeSetCriteria.getFilterCreatedAfter());
this.addFilterCreatedBefore(changeSetCriteria.getFilterCreatedBefore());
+ this.addFilterDriftConfigurationId(changeSetCriteria.getFilterDriftConfigurationId());
this.addFilterEndVersion(changeSetCriteria.getFilterEndVersion());
+ this.addFilterId(changeSetCriteria.getFilterId());
+ this.addFilterResourceId(changeSetCriteria.getFilterResourceId());
this.addFilterStartVersion(changeSetCriteria.getFilterStartVersion());
this.addFilterVersion(changeSetCriteria.getFilterVersion());
commit d459906cc666e125cb5eafe9a346c46fd831aa41
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Aug 3 09:21:29 2011 -0400
Change eclipse .classpath for new morphia dep version.
diff --git a/.classpath b/.classpath
index bdc2f4f..a46eaf4 100644
--- a/.classpath
+++ b/.classpath
@@ -117,8 +117,8 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-testng/3.1/unitils-testng-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.6.3/mongo-java-driver-2.6.3.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/com/google/code/morphia/morphia/1.00-SNAPSHOT/morphia-1.00-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.6.3/mongo-java-driver-2.6.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/code/morphia/morphia/0.99/morphia-0.99.jar"/>
<classpathentry exported="true" kind="lib" path="modules/enterprise/remoting/webservices/target/rhq-remoting-webservices-4.1.0-SNAPSHOT/wsconsume-output"/>
<classpathentry kind="src" path="modules/common/ant-bundle/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/plugins/drift-mongodb/src/main/java"/>
commit 73d50a6fde3bcbd8568e38e3978e2fee79c636c8
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 2 17:25:46 2011 -0400
Drift Refactoring
- Settle on 'JPA' as the prefix for RHQ's default drift plugin. This avoids
using the rhq project name in the naming scheme. And reflects that this is
a JPA (well actually Hibernate) drift backend implementation.
- Prefix more classes with 'Drift' for easier classification.
- Settle on prefix-based naming for drift Criteria hierarchy
- Add copyright and class-level jdoc to several classes
- Ensure CoreGUI uses only GenericXXXCriteria classes and Interfaces. It
was assuming the JPA drift impl in places. (note, 'Generic' was previously
'Basic' but is changed to better reflect that the class does not rely on
any backend implementation choice.)
- Change various signatures as needed to support drift plugin architecture.
- remove a lot of warnings by qualifying type decls.
- Reenable DriftManagerBeanTests
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/drift/DriftAgentService.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/drift/DriftAgentService.java
index c269e5a..6137400 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/drift/DriftAgentService.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/drift/DriftAgentService.java
@@ -40,7 +40,7 @@ public interface DriftAgentService {
* @param driftFiles
* @return the results of the immediate scheduling
*/
- boolean requestDriftFiles(int resourceId, Headers headers, List<DriftFile> driftFiles);
+ boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles);
/**
* Execute drift detection immediately. If any drift is found, the agent will send the
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
index 8dbc06e..0675792 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
@@ -126,8 +126,8 @@
DEFAULT_PROPERTY_VALUE="false" FREAD_ONLY="FALSE"/>
<!-- default drift server plugin settings -->
- <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="drift-rhq"
- DEFAULT_PROPERTY_VALUE="drift-rhq" FREAD_ONLY="FALSE"/>
+ <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="drift-jpa"
+ DEFAULT_PROPERTY_VALUE="drift-jpa" FREAD_ONLY="FALSE"/>
</table>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index fe5f1f6..98e7438 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3590,7 +3590,7 @@
<schema-directSQL>
<statement desc="Adding drift server plugin active plugin system configuration property">
INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
- VALUES (57, 'ACTIVE_DRIFT_PLUGIN', 'drift-rhq', 'drift-rhq')
+ VALUES (57, 'ACTIVE_DRIFT_PLUGIN', 'drift-jpa', 'drift-jpa')
</statement>
</schema-directSQL>
</schemaSpec>
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
index f377ade..b95ef28 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
@@ -1,11 +1,28 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
import org.rhq.core.domain.util.PageControl;
/**
* All criteria, regardless of the backend storage that will be queried with this criteria, needs
- * to support certain base functionality (like paging).
- * This base interface provides that common API.
+ * to support certain base functionality (like paging). This base interface provides that common API.
*
* @author John Sanda
*/
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
deleted file mode 100644
index ba46bc2..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.rhq.core.domain.criteria;
-
-import org.rhq.core.domain.drift.DriftChangeSetCategory;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageOrdering;
-
-public class BasicDriftChangeSetCriteria implements DriftChangeSetCriteria {
-
- private static final long serialVersionUID = 1L;
-
- private String filterId;
-
- private String filterVersion;
-
- private String filterStartVersion;
-
- private String filterEndVersion;
-
- private Long filterCreatedAfter;
-
- private Long filterCreatedBefore;
-
- private Integer filterResourceId;
-
- private Integer filterDriftConfigId;
-
- private DriftChangeSetCategory filterCategory;
-
- private boolean fetchDrifts;
-
- private PageOrdering sortVersion;
-
- private PageControl pageControl;
-
- @Override
- public void addFilterId(String filterId) {
- this.filterId = filterId;
- }
-
- @Override
- public String getFilterId() {
- return filterId;
- }
-
- @Override
- public void addFilterVersion(String filterVersion) {
- this.filterVersion = filterVersion;
- }
-
- @Override
- public String getFilterVersion() {
- return filterVersion;
- }
-
- @Override
- public void addFilterStartVersion(String filterStartVersion) {
- this.filterStartVersion = filterStartVersion;
- }
-
- @Override
- public String getFilterStartVersion() {
- return filterStartVersion;
- }
-
- @Override
- public void addFilterEndVersion(String filterEndVersion) {
- this.filterEndVersion = filterEndVersion;
- }
-
- @Override
- public String getFilterEndVersion() {
- return filterEndVersion;
- }
-
- @Override
- public void addFilterCreatedAfter(Long filterCreatedAfter) {
- this.filterCreatedAfter = filterCreatedAfter;
- }
-
- @Override
- public Long getFilterCreatedAfter() {
- return filterCreatedAfter;
- }
-
- @Override
- public void addFilterCreatedBefore(Long filterCreatedBefore) {
- this.filterCreatedBefore = filterCreatedBefore;
- }
-
- @Override
- public Long getFilterCreatedBefore() {
- return filterCreatedBefore;
- }
-
- @Override
- public void addFilterResourceId(Integer filterResourceId) {
- this.filterResourceId = filterResourceId;
- }
-
- @Override
- public Integer getFilterResourceId() {
- return filterResourceId;
- }
-
- @Override
- public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
- this.filterDriftConfigId = filterDriftConfigId;
- }
-
- @Override
- public Integer getFilterDriftConfigurationId() {
- return filterDriftConfigId;
- }
-
- @Override
- public void addFilterCategory(DriftChangeSetCategory filterCategory) {
- this.filterCategory = filterCategory;
- }
-
- @Override
- public DriftChangeSetCategory getFilterCategory() {
- return filterCategory;
- }
-
- @Override
- public void fetchDrifts(boolean fetchDrifts) {
- this.fetchDrifts = fetchDrifts;
- }
-
- @Override
- public boolean isFetchDrifts() {
- return fetchDrifts;
- }
-
- @Override
- public void addSortVersion(PageOrdering sortVersion) {
- this.sortVersion = sortVersion;
- }
-
- @Override
- public PageOrdering getSortVersion() {
- return sortVersion;
- }
-
- @Override
- public PageControl getPageControlOverrides() {
- return pageControl;
- }
-
- @Override
- public void setPageControl(PageControl pageControl) {
- this.pageControl = pageControl;
- }
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java
deleted file mode 100644
index b1a5695..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.rhq.core.domain.criteria;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageOrdering;
-
-import static org.rhq.core.domain.util.CriteriaUtils.getListIgnoringNulls;
-
-public class BasicDriftCriteria implements DriftCriteria {
-
- private static final long serialVersionUID = 1L;
-
- private String filterId;
-
- private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
-
- private String filterChangeSetId;
-
- private String filterPath;
-
- private List<Integer> filterResourceIds = new ArrayList<Integer>();
-
- private boolean fetchChangeSet;
-
- private Long filterStartTime;
-
- private Long filterEndTime;
-
- private PageControl pageControl;
-
- private PageOrdering sortCtime;
-
- @Override
- public void addFilterId(String filterId) {
- this.filterId = filterId;
- }
-
- @Override
- public String getFilterId() {
- return filterId;
- }
-
- @Override
- public void addFilterCategories(DriftCategory... filterCategories) {
- this.filterCategories = getListIgnoringNulls(filterCategories);
- }
-
- @Override
- public List<DriftCategory> getFilterCategories() {
- return filterCategories;
- }
-
- @Override
- public void addFilterChangeSetId(String filterChangeSetId) {
- this.filterChangeSetId = filterChangeSetId;
- }
-
- @Override
- public String getFilterChangeSetId() {
- return filterChangeSetId;
- }
-
- @Override
- public void addFilterPath(String filterPath) {
- this.filterPath = filterPath;
- }
-
- @Override
- public String getFilterPath() {
- return filterPath;
- }
-
- @Override
- public void addFilterResourceIds(Integer... filterResourceIds) {
- this.filterResourceIds = getListIgnoringNulls(filterResourceIds);
- }
-
- @Override
- public List<Integer> getFilterResourceIds() {
- return filterResourceIds;
- }
-
- @Override
- public void addFilterStartTime(Long filterStartTime) {
- this.filterStartTime = filterStartTime;
- }
-
- @Override
- public Long getFilterStartTime() {
- return filterStartTime;
- }
-
- @Override
- public void addFilterEndTime(Long filterEndTime) {
- this.filterEndTime = filterEndTime;
- }
-
- @Override
- public Long getFilterEndTime() {
- return filterEndTime;
- }
-
- @Override
- public void fetchChangeSet(boolean fetchChangeSet) {
- this.fetchChangeSet = fetchChangeSet;
- }
-
- @Override
- public boolean isFetchChangeSet() {
- return fetchChangeSet;
- }
-
- @Override
- public void addSortCtime(PageOrdering sortCtime) {
- this.sortCtime = sortCtime;
- }
-
- @Override
- public PageOrdering getSortCtime() {
- return sortCtime;
- }
-
- @Override
- public PageControl getPageControlOverrides() {
- return pageControl;
- }
-
- @Override
- public void setPageControl(PageControl pageControl) {
- this.pageControl = pageControl;
- }
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 273db4b..a3c61a6 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -1,11 +1,34 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
-import java.io.Serializable;
-
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftChangeSetCriteria extends BaseCriteria, Serializable {
+/**
+ * To support pluggable drift server implementations this Interface provides the contract required for
+ * Criteria based searching on DriftChangeSet.
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+public interface DriftChangeSetCriteria extends BaseCriteria {
void addFilterId(String filterId);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
deleted file mode 100644
index 0ca1d36..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.DriftChangeSetCategory;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
-import org.rhq.core.domain.util.PageOrdering;
-
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSetCriteria {
- private static final long serialVersionUID = 1L;
-
- private Integer filterId;
- private Integer filterInitial; // needs override
- private Integer filterResourceId; // needs override
- private Integer filterDriftConfigurationId;
- private Integer filterVersion;
- private Integer filterStartVersion;
- private Integer filterEndVersion;
- private Long filterCreatedAfter;
- private Long filterCreatedBefore;
- private DriftChangeSetCategory filterCategory;
- private boolean fetchDrifts;
-
- private PageOrdering sortVersion;
-
- public DriftChangeSetJPACriteria() {
- filterOverrides.put("initial", "version = 0");
- filterOverrides.put("resourceId", "resource.id = ?");
- filterOverrides.put("startVersion", "version >= ?");
- filterOverrides.put("endVersion", "version <= ?");
- filterOverrides.put("createdAfter", "ctime >= ?");
- filterOverrides.put("createdBefore", "ctime <= ?");
- }
-
- @Override
- public Class<RhqDriftChangeSet> getPersistentClass() {
- return RhqDriftChangeSet.class;
- }
-
- public void addFilterId(String filterId) {
- if (filterId != null) {
- this.filterId = Integer.parseInt(filterId);
- }
- }
-
- @Override
- public String getFilterId() {
- return filterId == null ? null : filterId.toString();
- }
-
- public void addFilterVersion(String filterVersion) {
- if (filterVersion != null) {
- this.filterVersion = Integer.parseInt(filterVersion);
- }
- }
-
- @Override
- public String getFilterVersion() {
- return filterVersion == null ? null : filterVersion.toString();
- }
-
- @Override
- public void addFilterStartVersion(String filterStartVersion) {
- if (filterStartVersion != null) {
- this.filterStartVersion = Integer.parseInt(filterStartVersion);
- }
- }
-
- @Override
- public String getFilterStartVersion() {
- return filterStartVersion == null ? null : filterStartVersion.toString();
- }
-
- @Override
- public void addFilterEndVersion(String filterEndVersion) {
- if (filterEndVersion != null) {
- this.filterEndVersion = Integer.parseInt(filterEndVersion);
- }
- }
-
- @Override
- public String getFilterEndVersion() {
- return filterEndVersion == null ? null : filterEndVersion.toString();
- }
-
- @Override
- public void addFilterCreatedAfter(Long filterCreatedAfter) {
- this.filterCreatedAfter = filterCreatedAfter;
- }
-
- @Override
- public Long getFilterCreatedAfter() {
- return filterCreatedAfter;
- }
-
- @Override
- public void addFilterCreatedBefore(Long filterCreatedBefore) {
- this.filterCreatedBefore = filterCreatedBefore;
- }
-
- @Override
- public Long getFilterCreatedBefore() {
- return filterCreatedBefore;
- }
-
- public void addFilterResourceId(Integer filterResourceId) {
- this.filterResourceId = filterResourceId;
- }
-
- @Override
- public Integer getFilterResourceId() {
- return filterResourceId;
- }
-
- @Override
- public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
- this.filterDriftConfigurationId = filterDriftConfigId;
- }
-
- @Override
- public Integer getFilterDriftConfigurationId() {
- return filterDriftConfigurationId;
- }
-
- public void addFilterCategory(DriftChangeSetCategory filterCategory) {
- this.filterCategory = filterCategory;
- }
-
- @Override
- public DriftChangeSetCategory getFilterCategory() {
- return filterCategory;
- }
-
- public void fetchDrifts(boolean fetchDrifts) {
- this.fetchDrifts = fetchDrifts;
- }
-
- @Override
- public boolean isFetchDrifts() {
- return fetchDrifts;
- }
-
- public void addSortVersion(PageOrdering sortVersion) {
- addSortField("version");
- this.sortVersion = sortVersion;
- }
-
- @Override
- public PageOrdering getSortVersion() {
- return sortVersion;
- }
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
index cdd061e..25c1e53 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
@@ -1,12 +1,34 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
-import java.io.Serializable;
-import java.util.List;
-
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftCriteria extends BaseCriteria, Serializable {
+/**
+ * To support pluggable drift server implementations this Interface provides the contract required for
+ * Criteria based searching on Drift.
+ *
+ * @author Jay Shaughnessy
+ *
+ */
+public interface DriftCriteria extends BaseCriteria {
void addFilterId(String filterId);
@@ -14,7 +36,7 @@ public interface DriftCriteria extends BaseCriteria, Serializable {
void addFilterCategories(DriftCategory... filterCategories);
- List<DriftCategory> getFilterCategories();
+ DriftCategory[] getFilterCategories();
void addFilterChangeSetId(String filterChangeSetId);
@@ -26,7 +48,7 @@ public interface DriftCriteria extends BaseCriteria, Serializable {
void addFilterResourceIds(Integer... filterResourceIds);
- List<Integer> getFilterResourceIds();
+ Integer[] getFilterResourceIds();
void addFilterStartTime(Long filterStartTime);
@@ -44,6 +66,4 @@ public interface DriftCriteria extends BaseCriteria, Serializable {
PageOrdering getSortCtime();
-
-
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java
deleted file mode 100644
index 506cb06..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.util.CriteriaUtils;
-import org.rhq.core.domain.util.PageOrdering;
-
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class DriftJPACriteria extends Criteria implements DriftCriteria {
- private static final long serialVersionUID = 1L;
-
- private Integer filterId;
- private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
- private Integer filterChangeSetId; // needs override
- private String filterPath;
- private List<Integer> filterResourceIds = new ArrayList<Integer>();
- private Long filterStartTime; // requires overrides
- private Long filterEndTime; // requires overrides
-
- private boolean fetchChangeSet;
-
- private PageOrdering sortCtime;
-
- public DriftJPACriteria() {
- filterOverrides.put("changeSetId", "changeSet.id = ?");
- filterOverrides.put("categories", "category IN ( ? )");
- filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
- filterOverrides.put("startTime", "ctime >= ?");
- filterOverrides.put("endTime", "ctime <= ?");
- }
-
- @Override
- public Class<RhqDrift> getPersistentClass() {
- return RhqDrift.class;
- }
-
- public void addFilterId(String filterId) {
- if (filterId != null) {
- this.filterId = Integer.parseInt(filterId);
- }
- }
-
- @Override
- public String getFilterId() {
- return filterId == null ? null : filterId.toString();
- }
-
- public void addFilterCategories(DriftCategory... filterCategories) {
- this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
- }
-
- @Override
- public List<DriftCategory> getFilterCategories() {
- return filterCategories;
- }
-
- public void addFilterChangeSetId(String filterChangeSetId) {
- if (filterChangeSetId != null) {
- this.filterChangeSetId = Integer.parseInt(filterChangeSetId);
- }
- }
-
- @Override
- public String getFilterChangeSetId() {
- return filterChangeSetId == null ? null : filterChangeSetId.toString();
- }
-
- public void addFilterPath(String filterPath) {
- this.filterPath = filterPath;
- }
-
- @Override
- public String getFilterPath() {
- return filterPath;
- }
-
- public void addFilterResourceIds(Integer... filterResourceIds) {
- this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
- }
-
- @Override
- public List<Integer> getFilterResourceIds() {
- return filterResourceIds;
- }
-
- public void addFilterStartTime(Long filterStartTime) {
- this.filterStartTime = filterStartTime;
- }
-
- @Override
- public Long getFilterStartTime() {
- return filterStartTime;
- }
-
- public void addFilterEndTime(Long filterEndTime) {
- this.filterEndTime = filterEndTime;
- }
-
- @Override
- public Long getFilterEndTime() {
- return filterEndTime;
- }
-
- public void fetchChangeSet(boolean fetchChangeSet) {
- this.fetchChangeSet = fetchChangeSet;
- }
-
- @Override
- public boolean isFetchChangeSet() {
- return fetchChangeSet;
- }
-
- public void addSortCtime(PageOrdering sortCtime) {
- addSortField("ctime");
- this.sortCtime = sortCtime;
- }
-
- @Override
- public PageOrdering getSortCtime() {
- return sortCtime;
- }
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftChangeSetCriteria.java
new file mode 100644
index 0000000..073d89e
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftChangeSetCriteria.java
@@ -0,0 +1,184 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
+
+import java.io.Serializable;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * The generic implementation of DriftChangeSetCriteria makes no assumptions about the actual drift server
+ * plugin that will service the relevant requests. It is a simple impl of the interface and is
+ * suitable for use by any component that can not assume a backend implmentation, like a GUI
+ * client. Server side implementations will use this to populate the plugin-specific implementation
+ * of the interface.
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+public class GenericDriftChangeSetCriteria implements Serializable, DriftChangeSetCriteria {
+
+ private static final long serialVersionUID = 1L;
+
+ private String filterId;
+
+ private String filterVersion;
+
+ private String filterStartVersion;
+
+ private String filterEndVersion;
+
+ private Long filterCreatedAfter;
+
+ private Long filterCreatedBefore;
+
+ private Integer filterResourceId;
+
+ private Integer filterDriftConfigId;
+
+ private DriftChangeSetCategory filterCategory;
+
+ private boolean fetchDrifts;
+
+ private PageOrdering sortVersion;
+
+ private PageControl pageControl;
+
+ @Override
+ public void addFilterId(String filterId) {
+ this.filterId = filterId;
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId;
+ }
+
+ @Override
+ public void addFilterVersion(String filterVersion) {
+ this.filterVersion = filterVersion;
+ }
+
+ @Override
+ public String getFilterVersion() {
+ return filterVersion;
+ }
+
+ @Override
+ public void addFilterStartVersion(String filterStartVersion) {
+ this.filterStartVersion = filterStartVersion;
+ }
+
+ @Override
+ public String getFilterStartVersion() {
+ return filterStartVersion;
+ }
+
+ @Override
+ public void addFilterEndVersion(String filterEndVersion) {
+ this.filterEndVersion = filterEndVersion;
+ }
+
+ @Override
+ public String getFilterEndVersion() {
+ return filterEndVersion;
+ }
+
+ @Override
+ public void addFilterCreatedAfter(Long filterCreatedAfter) {
+ this.filterCreatedAfter = filterCreatedAfter;
+ }
+
+ @Override
+ public Long getFilterCreatedAfter() {
+ return filterCreatedAfter;
+ }
+
+ @Override
+ public void addFilterCreatedBefore(Long filterCreatedBefore) {
+ this.filterCreatedBefore = filterCreatedBefore;
+ }
+
+ @Override
+ public Long getFilterCreatedBefore() {
+ return filterCreatedBefore;
+ }
+
+ @Override
+ public void addFilterResourceId(Integer filterResourceId) {
+ this.filterResourceId = filterResourceId;
+ }
+
+ @Override
+ public Integer getFilterResourceId() {
+ return filterResourceId;
+ }
+
+ @Override
+ public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
+ this.filterDriftConfigId = filterDriftConfigId;
+ }
+
+ @Override
+ public Integer getFilterDriftConfigurationId() {
+ return filterDriftConfigId;
+ }
+
+ @Override
+ public void addFilterCategory(DriftChangeSetCategory filterCategory) {
+ this.filterCategory = filterCategory;
+ }
+
+ @Override
+ public DriftChangeSetCategory getFilterCategory() {
+ return filterCategory;
+ }
+
+ @Override
+ public void fetchDrifts(boolean fetchDrifts) {
+ this.fetchDrifts = fetchDrifts;
+ }
+
+ @Override
+ public boolean isFetchDrifts() {
+ return fetchDrifts;
+ }
+
+ @Override
+ public void addSortVersion(PageOrdering sortVersion) {
+ this.sortVersion = sortVersion;
+ }
+
+ @Override
+ public PageOrdering getSortVersion() {
+ return sortVersion;
+ }
+
+ @Override
+ public PageControl getPageControlOverrides() {
+ return pageControl;
+ }
+
+ @Override
+ public void setPageControl(PageControl pageControl) {
+ this.pageControl = pageControl;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftCriteria.java
new file mode 100644
index 0000000..b8a84d8
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/GenericDriftCriteria.java
@@ -0,0 +1,164 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
+
+import static org.rhq.core.domain.util.CriteriaUtils.getListIgnoringNulls;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * The generic implementation of DriftCriteria makes no assumptions about the actual drift server
+ * plugin that will service the relevant requests. It is a simple impl of the interface and is
+ * suitable for use by any component that can not assume a backend implmentation, like a GUI
+ * client. Server side implementations will use this to populate the plugin-specific implementation
+ * of the interface.
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+public class GenericDriftCriteria implements Serializable, DriftCriteria {
+
+ private static final long serialVersionUID = 1L;
+
+ private String filterId;
+
+ private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
+
+ private String filterChangeSetId;
+
+ private String filterPath;
+
+ private List<Integer> filterResourceIds = new ArrayList<Integer>();
+
+ private boolean fetchChangeSet;
+
+ private Long filterStartTime;
+
+ private Long filterEndTime;
+
+ private PageControl pageControl;
+
+ private PageOrdering sortCtime;
+
+ @Override
+ public void addFilterId(String filterId) {
+ this.filterId = filterId;
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId;
+ }
+
+ @Override
+ public void addFilterCategories(DriftCategory... filterCategories) {
+ this.filterCategories = getListIgnoringNulls(filterCategories);
+ }
+
+ @Override
+ public DriftCategory[] getFilterCategories() {
+ return filterCategories.toArray(new DriftCategory[filterCategories.size()]);
+ }
+
+ @Override
+ public void addFilterChangeSetId(String filterChangeSetId) {
+ this.filterChangeSetId = filterChangeSetId;
+ }
+
+ @Override
+ public String getFilterChangeSetId() {
+ return filterChangeSetId;
+ }
+
+ @Override
+ public void addFilterPath(String filterPath) {
+ this.filterPath = filterPath;
+ }
+
+ @Override
+ public String getFilterPath() {
+ return filterPath;
+ }
+
+ @Override
+ public void addFilterResourceIds(Integer... filterResourceIds) {
+ this.filterResourceIds = getListIgnoringNulls(filterResourceIds);
+ }
+
+ @Override
+ public Integer[] getFilterResourceIds() {
+ return filterResourceIds.toArray(new Integer[filterResourceIds.size()]);
+ }
+
+ @Override
+ public void addFilterStartTime(Long filterStartTime) {
+ this.filterStartTime = filterStartTime;
+ }
+
+ @Override
+ public Long getFilterStartTime() {
+ return filterStartTime;
+ }
+
+ @Override
+ public void addFilterEndTime(Long filterEndTime) {
+ this.filterEndTime = filterEndTime;
+ }
+
+ @Override
+ public Long getFilterEndTime() {
+ return filterEndTime;
+ }
+
+ @Override
+ public void fetchChangeSet(boolean fetchChangeSet) {
+ this.fetchChangeSet = fetchChangeSet;
+ }
+
+ @Override
+ public boolean isFetchChangeSet() {
+ return fetchChangeSet;
+ }
+
+ @Override
+ public void addSortCtime(PageOrdering sortCtime) {
+ this.sortCtime = sortCtime;
+ }
+
+ @Override
+ public PageOrdering getSortCtime() {
+ return sortCtime;
+ }
+
+ @Override
+ public PageControl getPageControlOverrides() {
+ return pageControl;
+ }
+
+ @Override
+ public void setPageControl(PageControl pageControl) {
+ this.pageControl = pageControl;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
new file mode 100644
index 0000000..d73c744
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftChangeSetCriteria.java
@@ -0,0 +1,200 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.core.domain.criteria;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+import org.rhq.core.domain.drift.JPADriftChangeSet;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * The JPA Drift Server plugin (the RHQ default) implementation of DriftChangeSetCriteria.
+ *
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class JPADriftChangeSetCriteria extends Criteria implements DriftChangeSetCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private Integer filterInitial; // needs override
+ private Integer filterResourceId; // needs override
+ private Integer filterDriftConfigurationId;
+ private Integer filterVersion;
+ private Integer filterStartVersion;
+ private Integer filterEndVersion;
+ private Long filterCreatedAfter;
+ private Long filterCreatedBefore;
+ private DriftChangeSetCategory filterCategory;
+ private boolean fetchDrifts;
+
+ private PageOrdering sortVersion;
+
+ public JPADriftChangeSetCriteria() {
+ this(null);
+ }
+
+ public JPADriftChangeSetCriteria(DriftChangeSetCriteria changeSetCriteria) {
+ filterOverrides.put("initial", "version = 0");
+ filterOverrides.put("resourceId", "resource.id = ?");
+ filterOverrides.put("startVersion", "version >= ?");
+ filterOverrides.put("endVersion", "version <= ?");
+ filterOverrides.put("createdAfter", "ctime >= ?");
+ filterOverrides.put("createdBefore", "ctime <= ?");
+
+ if (null != changeSetCriteria) {
+ this.addFilterId(changeSetCriteria.getFilterId());
+ this.addFilterResourceId(changeSetCriteria.getFilterResourceId());
+ this.addFilterCategory(changeSetCriteria.getFilterCategory());
+ this.addFilterCreatedAfter(changeSetCriteria.getFilterCreatedAfter());
+ this.addFilterCreatedBefore(changeSetCriteria.getFilterCreatedBefore());
+ this.addFilterEndVersion(changeSetCriteria.getFilterEndVersion());
+ this.addFilterStartVersion(changeSetCriteria.getFilterStartVersion());
+ this.addFilterVersion(changeSetCriteria.getFilterVersion());
+
+ this.addSortVersion(changeSetCriteria.getSortVersion());
+
+ this.fetchDrifts(changeSetCriteria.isFetchDrifts());
+ }
+ }
+
+ @Override
+ public Class<JPADriftChangeSet> getPersistentClass() {
+ return JPADriftChangeSet.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterVersion(String filterVersion) {
+ if (filterVersion != null) {
+ this.filterVersion = Integer.parseInt(filterVersion);
+ }
+ }
+
+ @Override
+ public String getFilterVersion() {
+ return filterVersion == null ? null : filterVersion.toString();
+ }
+
+ @Override
+ public void addFilterStartVersion(String filterStartVersion) {
+ if (filterStartVersion != null) {
+ this.filterStartVersion = Integer.parseInt(filterStartVersion);
+ }
+ }
+
+ @Override
+ public String getFilterStartVersion() {
+ return filterStartVersion == null ? null : filterStartVersion.toString();
+ }
+
+ @Override
+ public void addFilterEndVersion(String filterEndVersion) {
+ if (filterEndVersion != null) {
+ this.filterEndVersion = Integer.parseInt(filterEndVersion);
+ }
+ }
+
+ @Override
+ public String getFilterEndVersion() {
+ return filterEndVersion == null ? null : filterEndVersion.toString();
+ }
+
+ @Override
+ public void addFilterCreatedAfter(Long filterCreatedAfter) {
+ this.filterCreatedAfter = filterCreatedAfter;
+ }
+
+ @Override
+ public Long getFilterCreatedAfter() {
+ return filterCreatedAfter;
+ }
+
+ @Override
+ public void addFilterCreatedBefore(Long filterCreatedBefore) {
+ this.filterCreatedBefore = filterCreatedBefore;
+ }
+
+ @Override
+ public Long getFilterCreatedBefore() {
+ return filterCreatedBefore;
+ }
+
+ public void addFilterResourceId(Integer filterResourceId) {
+ this.filterResourceId = filterResourceId;
+ }
+
+ @Override
+ public Integer getFilterResourceId() {
+ return filterResourceId;
+ }
+
+ @Override
+ public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
+ this.filterDriftConfigurationId = filterDriftConfigId;
+ }
+
+ @Override
+ public Integer getFilterDriftConfigurationId() {
+ return filterDriftConfigurationId;
+ }
+
+ public void addFilterCategory(DriftChangeSetCategory filterCategory) {
+ this.filterCategory = filterCategory;
+ }
+
+ @Override
+ public DriftChangeSetCategory getFilterCategory() {
+ return filterCategory;
+ }
+
+ public void fetchDrifts(boolean fetchDrifts) {
+ this.fetchDrifts = fetchDrifts;
+ }
+
+ @Override
+ public boolean isFetchDrifts() {
+ return fetchDrifts;
+ }
+
+ public void addSortVersion(PageOrdering sortVersion) {
+ addSortField("version");
+ this.sortVersion = sortVersion;
+ }
+
+ @Override
+ public PageOrdering getSortVersion() {
+ return sortVersion;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java
new file mode 100644
index 0000000..2962b57
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/JPADriftCriteria.java
@@ -0,0 +1,172 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.criteria;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.drift.JPADrift;
+import org.rhq.core.domain.util.CriteriaUtils;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * The JPA Drift Server plugin (the RHQ default) implementation of DriftCriteria.
+ *
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class JPADriftCriteria extends Criteria implements DriftCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
+ private Integer filterChangeSetId; // needs override
+ private String filterPath;
+ private List<Integer> filterResourceIds = new ArrayList<Integer>();
+ private Long filterStartTime; // requires overrides
+ private Long filterEndTime; // requires overrides
+
+ private boolean fetchChangeSet;
+
+ private PageOrdering sortCtime;
+
+ public JPADriftCriteria() {
+ this(null);
+ }
+
+ public JPADriftCriteria(DriftCriteria driftCriteria) {
+ filterOverrides.put("changeSetId", "changeSet.id = ?");
+ filterOverrides.put("categories", "category IN ( ? )");
+ filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
+ filterOverrides.put("startTime", "ctime >= ?");
+ filterOverrides.put("endTime", "ctime <= ?");
+
+ // seed the JPA criteria with anything set in the provided criteria
+ if (null != driftCriteria) {
+ this.fetchChangeSet(driftCriteria.isFetchChangeSet());
+
+ this.addFilterCategories(driftCriteria.getFilterCategories());
+ this.addFilterChangeSetId(driftCriteria.getFilterChangeSetId());
+ this.addFilterEndTime(driftCriteria.getFilterEndTime());
+ this.addFilterId(driftCriteria.getFilterId());
+ this.addFilterPath(driftCriteria.getFilterPath());
+ this.addFilterResourceIds(driftCriteria.getFilterResourceIds());
+ this.addFilterStartTime(driftCriteria.getFilterStartTime());
+
+ this.addSortCtime(driftCriteria.getSortCtime());
+ }
+ }
+
+ @Override
+ public Class<JPADrift> getPersistentClass() {
+ return JPADrift.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterCategories(DriftCategory... filterCategories) {
+ this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
+ }
+
+ @Override
+ public DriftCategory[] getFilterCategories() {
+ return filterCategories.toArray(new DriftCategory[filterCategories.size()]);
+ }
+
+ public void addFilterChangeSetId(String filterChangeSetId) {
+ if (filterChangeSetId != null) {
+ this.filterChangeSetId = Integer.parseInt(filterChangeSetId);
+ }
+ }
+
+ @Override
+ public String getFilterChangeSetId() {
+ return filterChangeSetId == null ? null : filterChangeSetId.toString();
+ }
+
+ public void addFilterPath(String filterPath) {
+ this.filterPath = filterPath;
+ }
+
+ @Override
+ public String getFilterPath() {
+ return filterPath;
+ }
+
+ public void addFilterResourceIds(Integer... filterResourceIds) {
+ this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
+ }
+
+ @Override
+ public Integer[] getFilterResourceIds() {
+ return filterResourceIds.toArray(new Integer[filterResourceIds.size()]);
+ }
+
+ public void addFilterStartTime(Long filterStartTime) {
+ this.filterStartTime = filterStartTime;
+ }
+
+ @Override
+ public Long getFilterStartTime() {
+ return filterStartTime;
+ }
+
+ public void addFilterEndTime(Long filterEndTime) {
+ this.filterEndTime = filterEndTime;
+ }
+
+ @Override
+ public Long getFilterEndTime() {
+ return filterEndTime;
+ }
+
+ public void fetchChangeSet(boolean fetchChangeSet) {
+ this.fetchChangeSet = fetchChangeSet;
+ }
+
+ @Override
+ public boolean isFetchChangeSet() {
+ return fetchChangeSet;
+ }
+
+ public void addSortCtime(PageOrdering sortCtime) {
+ addSortField("ctime");
+ this.sortCtime = sortCtime;
+ }
+
+ @Override
+ public PageOrdering getSortCtime() {
+ return sortCtime;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractDriftFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractDriftFile.java
deleted file mode 100644
index 8f92087..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractDriftFile.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.drift;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.MappedSuperclass;
-import javax.persistence.PrePersist;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-
-/**
- * A RhqDriftFile represents one unique piece of content used for drift tracking. Because the bits are supported
- * by java.sql.Blob and java.io streaming, we must hide the bits from entities used on the gwt client. This base
- * class is used as the superclass for both RhqDriftFile (no blob) and DriftFileBits (blob).
- *
- * @author Jay Shaughnessy
- * @author John Mazzitelli
- * @author John Sanda
- */
-@MappedSuperclass
-(a)XmlAccessorType(XmlAccessType.FIELD)
-public class AbstractDriftFile implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Column(name = "CTIME", nullable = false)
- protected Long ctime = -1L;
-
- @Column(name = "DATA_SIZE", nullable = true)
- protected Long dataSize;
-
- @Column(name = "STATUS", nullable = false)
- @Enumerated(EnumType.STRING)
- protected DriftFileStatus status = DriftFileStatus.EMPTY;
-
- protected AbstractDriftFile() {
- }
-
- public Long getCtime() {
- return ctime;
- }
-
- @PrePersist
- void onPersist() {
- this.ctime = System.currentTimeMillis();
- }
-
- public void setDataSize(Long dataSize) {
- this.dataSize = dataSize;
- }
-
- public Long getDataSize() {
- return dataSize;
- }
-
- public DriftFileStatus getStatus() {
- return status;
- }
-
- public void setStatus(DriftFileStatus status) {
- this.status = status;
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractJPADriftFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractJPADriftFile.java
new file mode 100644
index 0000000..5988562
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/AbstractJPADriftFile.java
@@ -0,0 +1,87 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.PrePersist;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+
+/**
+ * A JPADriftFile represents one unique piece of content used for drift tracking. Because the bits are supported
+ * by java.sql.Blob and java.io streaming, we must hide the bits from entities used on the gwt client. This base
+ * class is used as the superclass for both JPADriftFile (no blob) and JPADriftFileBits (blob).
+ *
+ * @author Jay Shaughnessy
+ * @author John Mazzitelli
+ * @author John Sanda
+ */
+@MappedSuperclass
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class AbstractJPADriftFile implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Column(name = "CTIME", nullable = false)
+ protected Long ctime = -1L;
+
+ @Column(name = "DATA_SIZE", nullable = true)
+ protected Long dataSize;
+
+ @Column(name = "STATUS", nullable = false)
+ @Enumerated(EnumType.STRING)
+ protected DriftFileStatus status = DriftFileStatus.EMPTY;
+
+ protected AbstractJPADriftFile() {
+ }
+
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @PrePersist
+ void onPersist() {
+ this.ctime = System.currentTimeMillis();
+ }
+
+ public void setDataSize(Long dataSize) {
+ this.dataSize = dataSize;
+ }
+
+ public Long getDataSize() {
+ return dataSize;
+ }
+
+ public DriftFileStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(DriftFileStatus status) {
+ this.status = status;
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
deleted file mode 100644
index e0659d9..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.core.domain.drift;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class DiffReport<T> {
-
- private List<T> notInLeft = new ArrayList<T>();
-
- private List<T> notInRight = new ArrayList<T>();
-
- private List<T> conflicts = new ArrayList<T>();
-
- public List<T> getElementsNotInLeft() {
- return notInLeft;
- }
-
- public void elementNotInLeft(T element) {
- notInLeft.add(element);
- }
-
- public List<T> getElementsNotInRight() {
- return notInRight;
- }
-
- public void elementNotInRight(T element) {
- notInRight.add(element);
- }
-
- public List<T> getElementsInConflict() {
- return conflicts;
- }
-
- public void elementInConflict(T element) {
- conflicts.add(element);
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
index aa20d15..3356e7a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
@@ -1,6 +1,34 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.drift;
-public interface Drift<C extends DriftChangeSet, F extends DriftFile> {
+/**
+ * To support pluggable drift server implementations this Interface provides the contract required for
+ * defining and persisting each Drift entry in a DriftChangeSet.
+ *
+ * @param <C> A server plugin's DriftChangeSet implementation
+ * @param <F> A server plugin's DriftFile implementation
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+public interface Drift<C extends DriftChangeSet<?>, F extends DriftFile> {
String getId();
void setId(String id);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
index 70cc9a4..b0cd61d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
@@ -1,8 +1,35 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.drift;
import java.util.Set;
-public interface DriftChangeSet<D extends Drift> {
+/**
+ * To support pluggable drift server implementations this Interface provides the contract required for
+ * defining and persisting each DriftChangeSet reported from an Agent.
+ *
+ * @param <D> A server plugin's Drift implementation
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+public interface DriftChangeSet<D extends Drift<?, ?>> {
String getId();
void setId(String id);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDiffReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDiffReport.java
new file mode 100644
index 0000000..b9551cf
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.core.domain.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DriftDiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFile.java
index 572e3da..94b1d3b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFile.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFile.java
@@ -1,8 +1,30 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.drift;
-import java.io.Serializable;
-public interface DriftFile extends Serializable {
+/*
+ * To support pluggable drift server implementations this Interface provides the contract required for
+ * defining and persisting each DriftFile. A DriftFile represents one unique piece of content used for
+ * drift tracking.
+ */
+public interface DriftFile {
String getHashId();
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFileBits.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFileBits.java
deleted file mode 100644
index f85ef9c..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftFileBits.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.drift;
-
-import java.io.InputStream;
-import java.io.Serializable;
-import java.sql.Blob;
-import java.sql.SQLException;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Lob;
-import javax.persistence.Table;
-
-/**
- * A RhqDriftFile represents one unique piece of content used for drift tracking. Note that DriftFileBits provides
- * access to the bits through java.sql.Blob. This entity can not be used client-side (gwt) whereas its sister class,
- * RhqDriftFile, can. Both enities share the same table and abstract superclass. See RHQDomain.gwt.xml for how to
- * exclude unwanted domain classes from the gwt compile.
- *
- * @author Jay Shaughnessy
- * @author John Mazzitelli
- * @author John Sanda
- */
-@Entity
-@Table(name = "RHQ_DRIFT_FILE")
-public class DriftFileBits extends AbstractDriftFile implements Serializable {
- private static final long serialVersionUID = 1L;
-
- // this is a hash/digest that should uniquely identify the content
- @Id
- @Column(name = "HASH_ID", nullable = false)
- private String hashId;
-
- protected DriftFileBits() {
- super();
- }
-
- public DriftFileBits(String hashId) {
- super();
- this.hashId = hashId;
- }
-
- public String getHashId() {
- return hashId;
- }
-
- public void setHashId(String hashId) {
- this.hashId = hashId;
- }
-
- @Lob
- @Column(name = "DATA", nullable = true)
- private Blob data;
-
- public Blob getBlob() {
- return data;
- }
-
- public InputStream getData() throws SQLException {
- return data.getBinaryStream();
- }
-
- public void setData(Blob blob) {
- this.data = blob;
- }
-
- @Override
- public String toString() {
- return "DriftFileContent [hashId=" + hashId + ", status=" + status + "]";
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftSnapshot.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftSnapshot.java
new file mode 100644
index 0000000..58a11c7
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftSnapshot.java
@@ -0,0 +1,91 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.core.domain.drift;
+
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * A representation of an agent's drift file monitoring.
+ *
+ * @author John Sanda
+ */
+public class DriftSnapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int version;
+
+ private Map<String, Drift<?, ?>> entries = new TreeMap<String, Drift<?, ?>>();
+
+ public int getVersion() {
+ return version;
+ }
+
+ public Collection<Drift<?, ?>> getEntries() {
+ return entries.values();
+ }
+
+ public <D extends Drift<?, ?>> DriftSnapshot add(DriftChangeSet<D> changeSet) {
+ for (Drift<?, ?> entry : changeSet.getDrifts()) {
+ entries.remove(entry.getPath());
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.put(entry.getPath(), entry);
+ }
+ }
+ version = changeSet.getVersion();
+ return this;
+ }
+
+ public DriftDiffReport<?> diff(DriftSnapshot right) {
+ DriftSnapshot left = this;
+ DriftDiffReport<Drift<?, ?>> diff = new DriftDiffReport<Drift<?, ?>>();
+
+ for (Map.Entry<String, Drift<?, ?>> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift<?, ?>> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift<?, ?>> entry : left.entries.entrySet()) {
+ Drift<?, ?> rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java
new file mode 100644
index 0000000..02d41da
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADrift.java
@@ -0,0 +1,181 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.PrePersist;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * The JPA Drift Server plugin (the RHQ default) implementation of Drift.
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = JPADrift.QUERY_DELETE_BY_RESOURCES, query = "" //
+ + "DELETE FROM JPADrift d " //
+ + " WHERE d.changeSet IN ( SELECT dcs FROM JPADriftChangeSet dcs WHERE dcs.resource.id IN ( :resourceIds ) ) )") })
+@Table(name = "RHQ_DRIFT")
+@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
+public class JPADrift implements Serializable, Drift<JPADriftChangeSet, JPADriftFile> {
+ private static final long serialVersionUID = 1L;
+
+ public static final String QUERY_DELETE_BY_RESOURCES = "JPADrift.deleteByResources";
+
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @Id
+ private int id;
+
+ @Column(name = "CTIME", nullable = false)
+ private Long ctime = -1L;
+
+ @Column(name = "CATEGORY", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private DriftCategory category;
+
+ @Column(name = "PATH", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private String path;
+
+ @JoinColumn(name = "DRIFT_CHANGE_SET_ID", referencedColumnName = "ID", nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ private JPADriftChangeSet changeSet;
+
+ @JoinColumn(name = "OLD_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.EAGER, optional = true)
+ private JPADriftFile oldDriftFile;
+
+ @JoinColumn(name = "NEW_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.EAGER, optional = true)
+ private JPADriftFile newDriftFile;
+
+ protected JPADrift() {
+ }
+
+ /**
+ * @param resource
+ * @param category
+ * @param oldDriftFile required for FILE_CHANGED and FILE_REMOVED, null for FILE_ADDED
+ * @param newDriftFile required for FILE_CHANGED and FILE_ADDED, null for FILE_REMOVED
+ */
+ public JPADrift(JPADriftChangeSet changeSet, String path, DriftCategory category, JPADriftFile oldDriftFile,
+ JPADriftFile newDriftFile) {
+ this.changeSet = changeSet;
+ this.path = path;
+ this.category = category;
+ this.oldDriftFile = oldDriftFile;
+ this.newDriftFile = newDriftFile;
+ }
+
+ @Override
+ public String getId() {
+ return Integer.toString(id);
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = Integer.parseInt(id);
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @PrePersist
+ void onPersist() {
+ this.ctime = System.currentTimeMillis();
+ }
+
+ @Override
+ public JPADriftChangeSet getChangeSet() {
+ return changeSet;
+ }
+
+ @Override
+ public void setChangeSet(JPADriftChangeSet changeSet) {
+ this.changeSet = changeSet;
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public JPADriftFile getOldDriftFile() {
+ return oldDriftFile;
+ }
+
+ @Override
+ public void setOldDriftFile(JPADriftFile oldDriftFile) {
+ this.oldDriftFile = oldDriftFile;
+ }
+
+ @Override
+ public JPADriftFile getNewDriftFile() {
+ return newDriftFile;
+ }
+
+ @Override
+ public void setNewDriftFile(JPADriftFile newDriftFile) {
+ this.newDriftFile = newDriftFile;
+ }
+
+ @Override
+ public String toString() {
+ return "JPADrift [ id=" + id + ", category=" + category + ", path=" + path + ", changeSet=" + changeSet + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java
new file mode 100644
index 0000000..975d7d1
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftChangeSet.java
@@ -0,0 +1,179 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToMany;
+import javax.persistence.PrePersist;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.rhq.core.domain.resource.Resource;
+
+/**
+ * The JPA Drift Server plugin (the RHQ default) implementation of DriftChangeSet.
+ *
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = JPADriftChangeSet.QUERY_DELETE_BY_RESOURCES, query = "" //
+ + "DELETE FROM JPADriftChangeSet dcs " //
+ + " WHERE dcs.resource.id IN ( :resourceIds )") })
+@Table(name = "RHQ_DRIFT_CHANGE_SET")
+@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
+public class JPADriftChangeSet implements Serializable, DriftChangeSet<JPADrift> {
+ private static final long serialVersionUID = 1L;
+
+ public static final String QUERY_DELETE_BY_RESOURCES = "JPADriftChangeSet.deleteByResources";
+
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @Id
+ private int id;
+
+ @Column(name = "CTIME", nullable = false)
+ private Long ctime = -1L;
+
+ // 0..N
+ @Column(name = "VERSION", nullable = false)
+ private int version;
+
+ @Column(name = "CATEGORY", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private DriftChangeSetCategory category;
+
+ @Column(name = "CONFIG_ID", nullable = false)
+ private int driftConfigurationId;
+
+ @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
+ @ManyToOne(optional = false)
+ private Resource resource;
+
+ @OneToMany(mappedBy = "changeSet", cascade = { CascadeType.ALL })
+ private Set<JPADrift> drifts = new LinkedHashSet<JPADrift>();
+
+ protected JPADriftChangeSet() {
+ }
+
+ public JPADriftChangeSet(Resource resource, int version, DriftChangeSetCategory category, int configId) {
+ this.resource = resource;
+ this.version = version;
+ this.category = category;
+ driftConfigurationId = configId;
+ }
+
+ @Override
+ public String getId() {
+ return Integer.toString(id);
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = Integer.parseInt(id);
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @PrePersist
+ void onPersist() {
+ this.ctime = System.currentTimeMillis();
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public int getResourceId() {
+ return resource.getId();
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
+
+ @Override
+ public int getDriftConfigurationId() {
+ return driftConfigurationId;
+ }
+
+ @Override
+ public void setDriftConfigurationId(int id) {
+ driftConfigurationId = id;
+ }
+
+ @Override
+ public Set<JPADrift> getDrifts() {
+ return drifts;
+ }
+
+ @Override
+ public void setDrifts(Set<JPADrift> drifts) {
+ this.drifts = drifts;
+ }
+
+ @Override
+ public String toString() {
+ return "JPADriftChangeSet [id=" + id + ", resource=" + resource + ", version=" + version + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFile.java
new file mode 100644
index 0000000..3a9c6b9
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFile.java
@@ -0,0 +1,75 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * The JPA Drift Server plugin (the RHQ default) implementation of DriftFile. Note that JPADriftFile does not
+ * include the actual bits, and therefore can be used freely client-side (gwt). The bits are stored via the
+ * JPADriftFileBits class, which is like this one but adds the Blob field.
+ *
+ * @author Jay Shaughnessy
+ * @author John Mazzitelli
+ * @author John Sanda
+ */
+@Entity
+@Table(name = "RHQ_DRIFT_FILE")
+public class JPADriftFile extends AbstractJPADriftFile implements Serializable, DriftFile {
+ private static final long serialVersionUID = 1L;
+
+ // this is a hash/digest that should uniquely identify the content
+ @Id
+ @Column(name = "HASH_ID", nullable = false)
+ private String hashId;
+
+ protected JPADriftFile() {
+ super();
+ }
+
+ public JPADriftFile(String hashId) {
+ super();
+ this.hashId = hashId;
+ }
+
+ @Override
+ public String getHashId() {
+ return hashId;
+ }
+
+ @Override
+ public void setHashId(String hashId) {
+ this.hashId = hashId;
+ }
+
+ @Override
+ public String toString() {
+ return "JPADriftFile [hashId=" + hashId + ", status=" + status + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFileBits.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFileBits.java
new file mode 100644
index 0000000..d326790
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/JPADriftFileBits.java
@@ -0,0 +1,94 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import java.sql.Blob;
+import java.sql.SQLException;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.Table;
+
+/**
+ * A JPADriftFile represents one unique piece of content used for drift tracking. Note that JPADriftFileBits
+ * provides access to the bits through java.sql.Blob. This entity can not be used client-side (gwt) whereas its
+ * sister class, JPADriftFile, can. Both entities share the same table and abstract superclass. See
+ * RHQDomain.gwt.xml for how to exclude unwanted domain classes from the gwt compile.
+ *
+ * @author Jay Shaughnessy
+ * @author John Mazzitelli
+ * @author John Sanda
+ */
+@Entity
+@Table(name = "RHQ_DRIFT_FILE")
+public class JPADriftFileBits extends AbstractJPADriftFile implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ // this is a hash/digest that should uniquely identify the content
+ @Id
+ @Column(name = "HASH_ID", nullable = false)
+ private String hashId;
+
+ protected JPADriftFileBits() {
+ super();
+ }
+
+ public JPADriftFileBits(String hashId) {
+ super();
+ this.hashId = hashId;
+ }
+
+ public String getHashId() {
+ return hashId;
+ }
+
+ public void setHashId(String hashId) {
+ this.hashId = hashId;
+ }
+
+ @Lob
+ @Column(name = "DATA", nullable = true)
+ private Blob data;
+
+ public Blob getBlob() {
+ return data;
+ }
+
+ public InputStream getData() throws SQLException {
+ return data.getBinaryStream();
+ }
+
+ public void setData(Blob blob) {
+ this.data = blob;
+ }
+
+ @Override
+ public String toString() {
+ return "DriftFileContent [hashId=" + hashId + ", status=" + status + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java
deleted file mode 100644
index ef48961c..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.drift;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-/**
- * An occurrence of drifty to be reported and managed by the user.
-
- * @author Jay Shaughnessy
- * @author John Sanda
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = RhqDrift.QUERY_DELETE_BY_RESOURCES, query = "" //
- + "DELETE FROM RhqDrift d " //
- + " WHERE d.changeSet IN ( SELECT dcs FROM RhqDriftChangeSet dcs WHERE dcs.resource.id IN ( :resourceIds ) ) )") })
-@Table(name = "RHQ_DRIFT")
-@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
-public class RhqDrift implements Serializable, Drift<RhqDriftChangeSet, RhqDriftFile> {
- private static final long serialVersionUID = 1L;
-
- public static final String QUERY_DELETE_BY_RESOURCES = "RhqDrift.deleteByResources";
-
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
- @Id
- private int id;
-
- @Column(name = "CTIME", nullable = false)
- private Long ctime = -1L;
-
- @Column(name = "CATEGORY", nullable = false)
- @Enumerated(EnumType.STRING)
- private DriftCategory category;
-
- @Column(name = "PATH", nullable = false)
- @Enumerated(EnumType.STRING)
- private String path;
-
- @JoinColumn(name = "DRIFT_CHANGE_SET_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY, optional = false)
- private RhqDriftChangeSet changeSet;
-
- @JoinColumn(name = "OLD_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
- @ManyToOne(fetch = FetchType.EAGER, optional = true)
- private RhqDriftFile oldDriftFile;
-
- @JoinColumn(name = "NEW_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
- @ManyToOne(fetch = FetchType.EAGER, optional = true)
- private RhqDriftFile newDriftFile;
-
- protected RhqDrift() {
- }
-
- /**
- * @param resource
- * @param category
- * @param oldDriftFile required for FILE_CHANGED and FILE_REMOVED, null for FILE_ADDED
- * @param newDriftFile required for FILE_CHANGED and FILE_ADDED, null for FILE_REMOVED
- */
- public RhqDrift(RhqDriftChangeSet changeSet, String path, DriftCategory category, RhqDriftFile oldDriftFile,
- RhqDriftFile newDriftFile) {
- this.changeSet = changeSet;
- this.path = path;
- this.category = category;
- this.oldDriftFile = oldDriftFile;
- this.newDriftFile = newDriftFile;
- }
-
- @Override
- public String getId() {
- return Integer.toString(id);
- }
-
- @Override
- public void setId(String id) {
- this.id = Integer.parseInt(id);
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @PrePersist
- void onPersist() {
- this.ctime = System.currentTimeMillis();
- }
-
- @Override
- public RhqDriftChangeSet getChangeSet() {
- return changeSet;
- }
-
- @Override
- public void setChangeSet(RhqDriftChangeSet changeSet) {
- this.changeSet = changeSet;
- }
-
- @Override
- public DriftCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftCategory category) {
- this.category = category;
- }
-
- @Override
- public String getPath() {
- return path;
- }
-
- @Override
- public void setPath(String path) {
- this.path = path;
- }
-
- @Override
- public RhqDriftFile getOldDriftFile() {
- return oldDriftFile;
- }
-
- @Override
- public void setOldDriftFile(RhqDriftFile oldDriftFile) {
- this.oldDriftFile = oldDriftFile;
- }
-
- @Override
- public RhqDriftFile getNewDriftFile() {
- return newDriftFile;
- }
-
- @Override
- public void setNewDriftFile(RhqDriftFile newDriftFile) {
- this.newDriftFile = newDriftFile;
- }
-
- @Override
- public String toString() {
- return "RhqDrift [ id=" + id + ", category=" + category + ", path=" + path + ", changeSet=" + changeSet + "]";
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java
deleted file mode 100644
index 7313282..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.drift;
-
-import java.io.Serializable;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.hibernate.annotations.Type;
-
-import org.rhq.core.domain.resource.Resource;
-
-/**
- * @author Jay Shaughnessy
- * @author John Sanda
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = RhqDriftChangeSet.QUERY_DELETE_BY_RESOURCES, query = "" //
- + "DELETE FROM RhqDriftChangeSet dcs " //
- + " WHERE dcs.resource.id IN ( :resourceIds )") })
-@Table(name = "RHQ_DRIFT_CHANGE_SET")
-@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
-public class RhqDriftChangeSet implements Serializable, DriftChangeSet<RhqDrift> {
- private static final long serialVersionUID = 1L;
-
- public static final String QUERY_DELETE_BY_RESOURCES = "RhqDriftChangeSet.deleteByResources";
-
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
- @Id
- private int id;
-
- @Column(name = "CTIME", nullable = false)
- private Long ctime = -1L;
-
- // 0..N
- @Column(name = "VERSION", nullable = false)
- private int version;
-
- @Column(name = "CATEGORY", nullable = false)
- @Enumerated(EnumType.STRING)
- private DriftChangeSetCategory category;
-
- @Column(name = "CONFIG_ID", nullable = false)
- private int driftConfigurationId;
-
- @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(optional = false)
- private Resource resource;
-
- @OneToMany(mappedBy = "changeSet", cascade = { CascadeType.ALL })
- private Set<RhqDrift> drifts = new LinkedHashSet<RhqDrift>();
-
- protected RhqDriftChangeSet() {
- }
-
- public RhqDriftChangeSet(Resource resource, int version, DriftChangeSetCategory category, int configId) {
- this.resource = resource;
- this.version = version;
- this.category = category;
- driftConfigurationId = configId;
- }
-
- @Override
- public String getId() {
- return Integer.toString(id);
- }
-
- @Override
- public void setId(String id) {
- this.id = Integer.parseInt(id);
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @PrePersist
- void onPersist() {
- this.ctime = System.currentTimeMillis();
- }
-
- @Override
- public int getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(int version) {
- this.version = version;
- }
-
- @Override
- public DriftChangeSetCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftChangeSetCategory category) {
- this.category = category;
- }
-
- @Override
- public int getResourceId() {
- return resource.getId();
- }
-
- public Resource getResource() {
- return resource;
- }
-
- public void setResource(Resource resource) {
- this.resource = resource;
- }
-
- @Override
- public int getDriftConfigurationId() {
- return driftConfigurationId;
- }
-
- @Override
- public void setDriftConfigurationId(int id) {
- driftConfigurationId = id;
- }
-
- @Override
- public Set<RhqDrift> getDrifts() {
- return drifts;
- }
-
- @Override
- public void setDrifts(Set<RhqDrift> drifts) {
- this.drifts = drifts;
- }
-
- @Override
- public String toString() {
- return "RhqDriftChangeSet [id=" + id + ", resource=" + resource + ", version=" + version + "]";
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftFile.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftFile.java
deleted file mode 100644
index c9c0b59..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftFile.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.domain.drift;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * A RhqDriftFile represents one unique piece of content used for drift tracking. Note that RhqDriftFile does not
- * include the actual bits, and therefore can be used freely client-side (gwt). The bits are stored via the
- * DriftFileBits class, which is like this one but adds the Blob field.
- *
- * @author Jay Shaughnessy
- * @author John Mazzitelli
- * @author John Sanda
- */
-@Entity
-@Table(name = "RHQ_DRIFT_FILE")
-public class RhqDriftFile extends AbstractDriftFile implements DriftFile {
- private static final long serialVersionUID = 1L;
-
- // this is a hash/digest that should uniquely identify the content
- @Id
- @Column(name = "HASH_ID", nullable = false)
- private String hashId;
-
- protected RhqDriftFile() {
- super();
- }
-
- public RhqDriftFile(String hashId) {
- super();
- this.hashId = hashId;
- }
-
- @Override
- public String getHashId() {
- return hashId;
- }
-
- @Override
- public void setHashId(String hashId) {
- this.hashId = hashId;
- }
-
- @Override
- public String toString() {
- return "RhqDriftFile [hashId=" + hashId + ", status=" + status + "]";
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
deleted file mode 100644
index 91e5f50..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.rhq.core.domain.drift;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-
-public class Snapshot implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private int version;
-
- private Map<String, Drift> entries = new TreeMap<String, Drift>();
-
- public int getVersion() {
- return version;
- }
-
- public Collection<Drift> getEntries() {
- return entries.values();
- }
-
- public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
- for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry.getPath());
- if (entry.getCategory() != FILE_REMOVED) {
- entries.put(entry.getPath(), entry);
- }
- }
- version = changeSet.getVersion();
- return this;
- }
-
- public DiffReport diff(Snapshot right) {
- Snapshot left = this;
- DiffReport<Drift> diff = new DiffReport<Drift>();
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- if (!right.entries.containsKey(entry.getKey())) {
- diff.elementNotInRight(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
- if (!left.entries.containsKey(entry.getKey())) {
- diff.elementNotInLeft(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- Drift rightDrift = right.entries.get(entry.getKey());
- if (rightDrift != null) {
- DriftFile leftFile = entry.getValue().getNewDriftFile();
- DriftFile rightFile = rightDrift.getNewDriftFile();
-
- if (!leftFile.getHashId().equals(rightFile.getHashId())) {
- diff.elementInConflict(entry.getValue());
- }
- }
- }
-
- return diff;
- }
-
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java
index 97fa7ef..4f6e57e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java
@@ -1,9 +1,13 @@
package org.rhq.core.domain.drift.dto;
+import java.io.Serializable;
+
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
-public class DriftFileDTO implements DriftFile {
+public class DriftFileDTO implements Serializable, DriftFile {
+
+ private static final long serialVersionUID = 1L;
private String hash;
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
index 05757a7..6641004 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
@@ -1,5 +1,7 @@
package org.rhq.core.domain.drift;
+import static org.apache.commons.io.IOUtils.toInputStream;
+
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.File;
@@ -21,8 +23,6 @@ import org.testng.annotations.Test;
import org.rhq.core.domain.test.AbstractEJB3Test;
import org.rhq.core.util.MessageDigestGenerator;
-import static org.apache.commons.io.IOUtils.toInputStream;
-
public class DriftFileTest extends AbstractEJB3Test {
static private final MessageDigestGenerator digestGen = new MessageDigestGenerator(MessageDigestGenerator.SHA_256);
@@ -36,12 +36,12 @@ public class DriftFileTest extends AbstractEJB3Test {
executeInTransaction(new TransactionCallback() {
@Override
public void execute() throws Exception {
- getEntityManager().createQuery("delete from RhqDriftFile").executeUpdate();
+ getEntityManager().createQuery("delete from JPADriftFile").executeUpdate();
}
});
}
- // Note, this test is more of a general Blob handling test. A real RhqDriftFile never has its content updated.
+ // Note, this test is more of a general Blob handling test. A real JPADriftFile never has its content updated.
// But this is a useful test to just ensure Blob handling is working as expected.
@Test(groups = { "integration.ejb3", "driftFile" })
public void updateDriftFileData() throws Exception {
@@ -49,7 +49,7 @@ public class DriftFileTest extends AbstractEJB3Test {
String hashId = digestGen.calcDigestString(content);
// Create the initial driftFile
- final DriftFileBits df1 = new DriftFileBits();
+ final JPADriftFileBits df1 = new JPADriftFileBits();
df1.setHashId(hashId);
df1.setDataSize((long) content.length());
df1.setData(Hibernate.createBlob(toInputStream(content), content.length()));
@@ -66,7 +66,7 @@ public class DriftFileTest extends AbstractEJB3Test {
executeInTransaction(new TransactionCallback() {
@Override
public void execute() {
- DriftFileBits df2 = getEntityManager().find(DriftFileBits.class, df1.getHashId());
+ JPADriftFileBits df2 = getEntityManager().find(JPADriftFileBits.class, df1.getHashId());
df2.setData(Hibernate.createBlob(toInputStream(newContent), newContent.length()));
getEntityManager().merge(df2);
}
@@ -77,7 +77,7 @@ public class DriftFileTest extends AbstractEJB3Test {
@Override
public void execute() {
try {
- DriftFileBits df3 = getEntityManager().find(DriftFileBits.class, df1.getHashId());
+ JPADriftFileBits df3 = getEntityManager().find(JPADriftFileBits.class, df1.getHashId());
String expected = newContent;
String actual = IOUtils.toString(df3.getData());
@@ -101,7 +101,7 @@ public class DriftFileTest extends AbstractEJB3Test {
for (int i = 0; i < numDriftFiles; ++i) {
File dataFile = createDataFile("test_data.txt", 1, (char) ('a' + i));
- final DriftFileBits driftFile = new DriftFileBits();
+ final JPADriftFileBits driftFile = new JPADriftFileBits();
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
driftFile.setData(Hibernate.createBlob(new BufferedInputStream(new FileInputStream(dataFile))));
@@ -117,12 +117,12 @@ public class DriftFileTest extends AbstractEJB3Test {
}
final List<Blob> blobs = new ArrayList<Blob>();
- final List<DriftFileBits> driftFiles = new ArrayList<DriftFileBits>();
+ final List<JPADriftFileBits> driftFiles = new ArrayList<JPADriftFileBits>();
for (final String hashId : driftFileHashIds) {
executeInTransaction(new TransactionCallback() {
@Override
public void execute() {
- DriftFileBits driftFileBits = getEntityManager().find(DriftFileBits.class, hashId);
+ JPADriftFileBits driftFileBits = getEntityManager().find(JPADriftFileBits.class, hashId);
blobs.add(driftFileBits.getBlob());
driftFiles.add(driftFileBits);
}
@@ -141,7 +141,7 @@ public class DriftFileTest extends AbstractEJB3Test {
for (int i = 0; i < numDriftFiles; ++i) {
File dataFile = createDataFile("test_data.txt", 10, 'X');
- final DriftFileBits driftFile = new DriftFileBits();
+ final JPADriftFileBits driftFile = new JPADriftFileBits();
final int driftFileNum = i;
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
@@ -159,18 +159,18 @@ public class DriftFileTest extends AbstractEJB3Test {
} catch (Exception e) {
// expected for file 2 or higher
if (driftFileNum == 0) {
- fail("Should not be able to store RhqDriftFile with same hashId more than once.");
+ fail("Should not be able to store JPADriftFile with same hashId more than once.");
}
}
}
final List<Blob> blobs = new ArrayList<Blob>();
- final List<DriftFileBits> driftFiles = new ArrayList<DriftFileBits>();
+ final List<JPADriftFileBits> driftFiles = new ArrayList<JPADriftFileBits>();
for (final String hashId : driftFileHashIds) {
executeInTransaction(new TransactionCallback() {
@Override
public void execute() {
- DriftFileBits driftFileBits = getEntityManager().find(DriftFileBits.class, hashId);
+ JPADriftFileBits driftFileBits = getEntityManager().find(JPADriftFileBits.class, hashId);
blobs.add(driftFileBits.getBlob());
driftFiles.add(driftFileBits);
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
index 93653b3..4237f3a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -1,10 +1,5 @@
package org.rhq.core.domain.drift;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
@@ -15,19 +10,26 @@ import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.testng.Assert.assertEquals;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
+@SuppressWarnings("unchecked")
public class SnapshotTest {
@Test
public void addChangeSetWithAddedFile() {
int configId = 1;
- FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
- .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
+ FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId).add(new FakeDrift(FILE_ADDED,
+ null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
- Snapshot snapshot = new Snapshot().add(changeSet);
+ DriftSnapshot snapshot = new DriftSnapshot().add(changeSet);
- assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
- "a snapshot that contains a single change set");
+ assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build "
+ + "a snapshot that contains a single change set");
assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
}
@@ -35,16 +37,20 @@ public class SnapshotTest {
public void addChangeSetsWithAddedFiles() {
int configId = 1;
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift<?, ?> entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
+ Drift<?, ?> entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+ DriftSnapshot snapshot = new DriftSnapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
- "with two change sets and file added in second change set");
+ // not sure but asSet with one arg was not working for me, so create Set manually
+ Set set = new HashSet<Drift<?, ?>>();
+ set.add(entry1);
+ set.add(entry2);
+ assertCollectionMatchesNoOrder(set, snapshot.getEntries(), "Failed to build snapshot "
+ + "with two change sets and file added in second change set");
assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
}
@@ -52,35 +58,38 @@ public class SnapshotTest {
public void replaceFileWithChangedVersion() {
int configId = 1;
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift<?, ?> entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
- new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
+ Drift<?, ?> entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED), new FakeDriftFile(
+ "4d5e6f", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+ DriftSnapshot snapshot = new DriftSnapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
- "Failed to build snapshot with file changed");
+ // not sure but asSet with one arg was not working for me, so create Set manually
+ Set set = new HashSet<Drift<?, ?>>();
+ set.add(entry2);
+ assertCollectionMatchesNoOrder(set, snapshot.getEntries(), "Failed to build snapshot with file changed");
}
@Test
public void deleteFileThatHasBeenRemoved() {
int configId = 1;
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
+ Drift<?, ?> entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift<?, ?> entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+ DriftSnapshot snapshot = new DriftSnapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
- "Failed to build snapshot with a file " +
- "removed.");
+ // not sure but asSet with one arg was not working for me, so create Set manually
+ Set set = new HashSet<Drift<?, ?>>();
+ set.add(entry2);
+ assertCollectionMatchesNoOrder(set, snapshot.getEntries(), "Failed to build snapshot with a file " + "removed.");
}
@Test
@@ -89,17 +98,16 @@ public class SnapshotTest {
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
+ DriftSnapshot right = new DriftSnapshot().add(changeSet1);
Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
- Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+ DriftSnapshot left = new DriftSnapshot().add(changeSet1).add(changeSet2);
- DiffReport diff = left.diff(right);
+ DriftDiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(),
- "Diff report does not contain " +
- "elements that are in the left but not in the right.");
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain "
+ + "elements that are in the left but not in the right.");
}
@Test
@@ -108,17 +116,16 @@ public class SnapshotTest {
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
+ DriftSnapshot right = new DriftSnapshot().add(changeSet1);
Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
+ DriftSnapshot left = new DriftSnapshot().add(changeSet2);
- DiffReport diff = left.diff(right);
+ DriftDiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(),
- "Diff report does not contain " +
- "elements that are in the left but not in the right");
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain "
+ + "elements that are in the left but not in the right");
}
@Test
@@ -127,17 +134,16 @@ public class SnapshotTest {
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
+ DriftSnapshot right = new DriftSnapshot().add(changeSet1);
Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
+ DriftSnapshot left = new DriftSnapshot().add(changeSet2);
- DiffReport diff = left.diff(right);
+ DriftDiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(),
- "Diff report does not contain " +
- "element that are in both left and right and are in conflict");
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain "
+ + "element that are in both left and right and are in conflict");
}
<E> Set<E> asSet(E... elements) {
@@ -318,13 +324,14 @@ public class SnapshotTest {
@Override
public String toString() {
- return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
- ", path: " + path + "]";
+ return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile
+ + ", path: " + path + "]";
}
}
- static class FakeDriftFile implements DriftFile {
+ static class FakeDriftFile implements Serializable, DriftFile {
+ private static final long serialVersionUID = 1L;
private String hash;
private long size;
private DriftFileStatus status;
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftFilesSender.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftFilesSender.java
index 6f53c6e..73bb8b2 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftFilesSender.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftFilesSender.java
@@ -1,5 +1,7 @@
package org.rhq.core.pc.drift;
+import static org.rhq.core.util.file.FileUtil.copyFile;
+
import java.io.File;
import java.io.IOException;
import java.util.List;
@@ -13,8 +15,6 @@ import org.rhq.common.drift.FileEntry;
import org.rhq.common.drift.Headers;
import org.rhq.core.domain.drift.DriftFile;
-import static org.rhq.core.util.file.FileUtil.copyFile;
-
public class DriftFilesSender implements Runnable {
private Log log = LogFactory.getLog(DriftFilesSender.class);
@@ -23,7 +23,7 @@ public class DriftFilesSender implements Runnable {
private Headers headers;
- private List<DriftFile> driftFiles;
+ private List<? extends DriftFile> driftFiles;
private ChangeSetManager changeSetMgr;
@@ -37,7 +37,7 @@ public class DriftFilesSender implements Runnable {
this.headers = headers;
}
- public void setDriftFiles(List<DriftFile> driftFiles) {
+ public void setDriftFiles(List<? extends DriftFile> driftFiles) {
this.driftFiles = driftFiles;
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 879ceca..d22563c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -1,5 +1,7 @@
package org.rhq.core.pc.drift;
+import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
+
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -31,8 +33,6 @@ import org.rhq.core.pc.inventory.ResourceContainer;
import org.rhq.core.pc.measurement.MeasurementManager;
import org.rhq.core.util.stream.StreamUtil;
-import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
-
public class DriftManager extends AgentService implements DriftAgentService, DriftClient, ContainerService {
private final Log log = LogFactory.getLog(DriftManager.class);
@@ -109,8 +109,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration,
- DriftChangeSetCategory type) {
+ public void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration, DriftChangeSetCategory type) {
try {
File changeSetFile = changeSetMgr.findChangeSet(resourceId, driftConfiguration.getName(), type);
if (changeSetFile == null) {
@@ -214,7 +213,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public boolean requestDriftFiles(int resourceId, Headers headers, List<DriftFile> driftFiles) {
+ public boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles) {
DriftFilesSender sender = new DriftFilesSender();
sender.setResourceId(resourceId);
sender.setDriftClient(this);
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftFilesSenderTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftFilesSenderTest.java
index b2cd6c2..c1f4559 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftFilesSenderTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftFilesSenderTest.java
@@ -9,7 +9,7 @@ import org.testng.annotations.Test;
import org.rhq.common.drift.Headers;
import org.rhq.core.domain.drift.DriftFile;
-import org.rhq.core.domain.drift.RhqDriftFile;
+import org.rhq.core.domain.drift.JPADriftFile;
import static org.apache.commons.io.FileUtils.touch;
import static org.apache.commons.io.IOUtils.writeLines;
@@ -160,7 +160,7 @@ public class DriftFilesSenderTest extends DriftTest {
List<DriftFile> driftFiles(String... hashes) {
List<DriftFile> files = new ArrayList<DriftFile>();
for (String hash : hashes) {
- files.add(new RhqDriftFile(hash));
+ files.add(new JPADriftFile(hash));
}
return files;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
index b182d08..94cec23 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
@@ -23,7 +23,7 @@ import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftComposite;
@@ -349,14 +349,15 @@ public abstract class AbstractRecentDriftsPortlet extends DriftHistoryView imple
* the portlet. This sets the counter appropriately and stops further queries to the server.
*/
@Override
- protected int getTotalRows(final PageList<DriftComposite> result, final DSResponse response, final DSRequest request) {
+ protected int getTotalRows(final PageList<DriftComposite> result, final DSResponse response,
+ final DSRequest request) {
return result.size();
}
@Override
- protected DriftJPACriteria getFetchCriteria(DSRequest request) {
- DriftJPACriteria criteria = new DriftJPACriteria();
+ protected GenericDriftCriteria getFetchCriteria(DSRequest request) {
+ GenericDriftCriteria criteria = new GenericDriftCriteria();
// result count
String currentSetting = this.configuration.getSimpleValue(Constant.RESULT_COUNT,
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
index afb6345..2151eee 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
@@ -32,10 +32,8 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.criteria.BaseCriteria;
-import org.rhq.core.domain.criteria.BasicDriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.BasicDriftCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.util.PageList;
@@ -94,34 +92,35 @@ public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSourc
// There is no parent - we are at the root of the tree.
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
- DriftChangeSetCriteria criteria = getDriftChangeSetCriteria(request);
-
- driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
- public void onSuccess(PageList<DriftChangeSet> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
+ GenericDriftChangeSetCriteria criteria = getDriftChangeSetCriteria(request);
+
+ driftService.findDriftChangeSetsByCriteria(criteria,
+ new AsyncCallback<PageList<? extends DriftChangeSet>>() {
+ public void onSuccess(PageList<? extends DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
} else {
String changesetId = parentId;
- DriftCriteria criteria = new BasicDriftCriteria();
+ GenericDriftCriteria criteria = new GenericDriftCriteria();
criteria.addFilterChangeSetId(changesetId);
- driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<? extends Drift>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
response.setStatus(DSResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
- public void onSuccess(PageList<Drift> result) {
+ public void onSuccess(PageList<? extends Drift> result) {
response.setData(buildRecords(result));
response.setTotalRows(result.getTotalSize());
processResponse(request.getRequestId(), response);
@@ -176,8 +175,8 @@ public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSourc
*
* @return the criteria to use when querying for change setss
*/
- protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
- BasicDriftChangeSetCriteria criteria = new BasicDriftChangeSetCriteria();
+ protected GenericDriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
criteria.addSortVersion(PageOrdering.DESC);
criteria.setPageControl(getPageControl(request));
return criteria;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index 8a6c448..5fd4e3e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -37,8 +37,7 @@ import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.BasicDriftCriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftComposite;
@@ -61,7 +60,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Jay Shaughnessy
* @author John Mazzitelli
*/
-public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria> {
+public class DriftDataSource extends RPCDataSource<DriftComposite, GenericDriftCriteria> {
public static final String CATEGORY_ICON_NEW = ImageManager.getDriftCategoryIcon(null);
public static final String CATEGORY_ICON_ADD = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_ADDED);
@@ -172,7 +171,7 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
}
@Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final DriftCriteria criteria) {
+ protected void executeFetch(final DSRequest request, final DSResponse response, final GenericDriftCriteria criteria) {
if (criteria == null) {
// the user selected no categories in the filter - it makes sense from the UI perspective to show 0 rows
response.setTotalRows(0);
@@ -259,14 +258,14 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
}
@Override
- protected DriftCriteria getFetchCriteria(DSRequest request) {
+ protected GenericDriftCriteria getFetchCriteria(DSRequest request) {
DriftCategory[] categoriesFilter = getArrayFilter(request, FILTER_CATEGORIES, DriftCategory.class);
if (categoriesFilter == null || categoriesFilter.length == 0) {
return null; // user didn't select any priorities - return null to indicate no data should be displayed
}
- BasicDriftCriteria criteria = new BasicDriftCriteria();
+ GenericDriftCriteria criteria = new GenericDriftCriteria();
criteria.fetchChangeSet(true);
criteria.addFilterCategories(categoriesFilter);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index c51806a..3ad61c3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -29,7 +29,7 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
-import org.rhq.core.domain.criteria.BasicDriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
@@ -60,27 +60,28 @@ public class DriftDetailsView extends LocatableVLayout {
}
private void show(String driftId) {
- BasicDriftCriteria criteria = new BasicDriftCriteria();
+ GenericDriftCriteria criteria = new GenericDriftCriteria();
criteria.addFilterId(driftId);
criteria.fetchChangeSet(true);
- GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
- @Override
- public void onSuccess(PageList<Drift> result) {
- if (result.getTotalSize() != 1) {
- CoreGUI.getMessageCenter().notify(
- new Message("Got [" + result.getTotalSize()
- + "] results. Should have been 1. The details shown here might not be correct.",
- Severity.Warning));
+ GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria,
+ new AsyncCallback<PageList<? extends Drift>>() {
+ @Override
+ public void onSuccess(PageList<? extends Drift> result) {
+ if (result.getTotalSize() != 1) {
+ CoreGUI.getMessageCenter().notify(
+ new Message("Got [" + result.getTotalSize()
+ + "] results. Should have been 1. The details shown here might not be correct.",
+ Severity.Warning));
+ }
+ Drift drift = result.get(0);
+ show(drift);
}
- Drift drift = result.get(0);
- show(drift);
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
- }
- });
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
+ }
+ });
}
private void show(Drift drift) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
index cf42485..01bb14a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
@@ -53,7 +53,7 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
- * A view that displays a paginated table of {@link org.rhq.core.domain.drift.RhqDrift}s, along with the
+ * A view that displays a paginated table of {@link org.rhq.core.domain.drift.JPADrift}s, along with the
* ability to filter those drifts, sort those drifts, double-click a row to view full details a drift, and perform
* various actions on the the drifts: delete selected, delete all from source, etc.
* This view full respects the user's authorization, and will not allow acttions on the drifts unless the user is
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
index f5341e2..f0f6049 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
@@ -22,7 +22,7 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import com.smartgwt.client.data.DSRequest;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
/**
* @author John Mazzitelli
@@ -42,8 +42,8 @@ public class ResourceDriftChangeSetsTreeDataSource extends AbstractDriftChangeSe
}
@Override
- protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
- DriftChangeSetCriteria criteria = super.getDriftChangeSetCriteria(request);
+ protected GenericDriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ GenericDriftChangeSetCriteria criteria = super.getDriftChangeSetCriteria(request);
criteria.addFilterResourceId(this.context.resourceId);
return criteria;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index cc7c6f0..3618885 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -22,14 +22,13 @@ import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
/**
@@ -105,7 +104,8 @@ public interface DriftGWTService extends RemoteService {
*
* @return all drift changesets that matches the specified criteria
*/
- PageList<DriftChangeSet> findDriftChangeSetsByCriteria(DriftChangeSetCriteria criteria) throws RuntimeException;
+ PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(GenericDriftChangeSetCriteria criteria)
+ throws RuntimeException;
/**
* Find all drifts that match the specified criteria.
@@ -114,11 +114,11 @@ public interface DriftGWTService extends RemoteService {
*
* @return all drifts that match the specified criteria
*/
- PageList<Drift> findDriftsByCriteria(DriftCriteria criteria) throws RuntimeException;
+ PageList<? extends Drift<?, ?>> findDriftsByCriteria(GenericDriftCriteria criteria) throws RuntimeException;
- PageList<DriftComposite> findDriftCompositesByCriteria(DriftCriteria criteria);
+ PageList<DriftComposite> findDriftCompositesByCriteria(GenericDriftCriteria criteria);
- Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
+ DriftSnapshot createSnapshot(Subject subject, GenericDriftChangeSetCriteria criteria);
/**
* Get the specified drift configuration for the specified context.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index cb44a90..264ed26 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -20,13 +20,13 @@ package org.rhq.enterprise.gui.coregui.server.gwt;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
@@ -94,9 +94,10 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(DriftChangeSetCriteria criteria) {
+ public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(GenericDriftChangeSetCriteria criteria) {
try {
- PageList<DriftChangeSet> results = driftServer.findDriftChangeSetsByCriteria(getSessionSubject(), criteria);
+ PageList<? extends DriftChangeSet<?>> results = driftServer.findDriftChangeSetsByCriteria(
+ getSessionSubject(), criteria);
return SerialUtility.prepare(results, "DriftService.findDriftChangeSetsByCriteria");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
@@ -104,9 +105,9 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public PageList<Drift> findDriftsByCriteria(DriftCriteria criteria) throws RuntimeException {
+ public PageList<? extends Drift<?, ?>> findDriftsByCriteria(GenericDriftCriteria criteria) throws RuntimeException {
try {
- PageList<Drift> results = driftServer.findDriftsByCriteria(getSessionSubject(), criteria);
+ PageList<? extends Drift<?, ?>> results = driftServer.findDriftsByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(results, "DriftService.findDriftsByCriteria");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
@@ -114,7 +115,7 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public PageList<DriftComposite> findDriftCompositesByCriteria(DriftCriteria criteria) {
+ public PageList<DriftComposite> findDriftCompositesByCriteria(GenericDriftCriteria criteria) {
try {
PageList<DriftComposite> results = driftServer.findDriftCompositesByCriteria(getSessionSubject(), criteria);
return SerialUtility.prepare(results, "DriftService.findDriftCompositesByCriteria");
@@ -124,7 +125,7 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
+ public DriftSnapshot createSnapshot(Subject subject, GenericDriftChangeSetCriteria criteria) {
try {
return driftServer.createSnapshot(subject, criteria);
} catch (Throwable t) {
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml
index 19f5453..e7840c1 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/core/RHQDomain.gwt.xml
@@ -32,7 +32,7 @@
<source path="client"/>
<source path="domain">
<!-- Exclude any domain classes that can not be used client-side due to use of unsupported class use -->
- <exclude name="**/DriftFileBits.*"/>
+ <exclude name="**/JPADriftFileBits.*"/>
</source>
<!--<generate-with class="org.rhq.core.rebind.RecordBuilderGenerator">
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 0479c4a..419ad99 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -19,6 +19,8 @@
*/
package org.rhq.enterprise.server.drift;
+import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
@@ -59,19 +61,22 @@ import org.rhq.core.clientapi.agent.drift.DriftAgentService;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.JPADriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.JPADriftCriteria;
import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
-import org.rhq.core.domain.drift.DriftFileBits;
import org.rhq.core.domain.drift.DriftFileStatus;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
-import org.rhq.core.domain.drift.RhqDriftFile;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
+import org.rhq.core.domain.drift.JPADrift;
+import org.rhq.core.domain.drift.JPADriftChangeSet;
+import org.rhq.core.domain.drift.JPADriftFile;
+import org.rhq.core.domain.drift.JPADriftFileBits;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
@@ -83,8 +88,12 @@ import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
+/**
+ * The SLSB implementation for Drift Management.
+ *
+ * @author Jay Shaughnessy
+ @ @author John Sanda
+ */
@Stateless
public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
private final Log log = LogFactory.getLog(this.getClass());
@@ -151,8 +160,8 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
public boolean visit(ZipEntry zipEntry, ZipInputStream stream) throws Exception {
- List<? extends DriftFile> emptyDriftFiles = new ArrayList<RhqDriftFile>();
- RhqDriftChangeSet driftChangeSet = null;
+ List<JPADriftFile> emptyDriftFiles = new ArrayList<JPADriftFile>();
+ JPADriftChangeSet driftChangeSet = null;
try {
ChangeSetReader reader = new ChangeSetReaderImpl(new BufferedReader(new InputStreamReader(
@@ -163,13 +172,13 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
int version = getChangeSetVersion(resource, config);
if (config == null) {
- log.error("Unable to locate " + config.getClass().getSimpleName() + "[id: " +
- config.getId() + ", name: " + config.getName() + "]. Change set cannot be saved.");
+ log.error("Unable to locate DriftConfiguration for Resource [" + resource
+ + "]. Change set cannot be saved.");
return false;
}
DriftChangeSetCategory category = reader.getHeaders().getType();
- driftChangeSet = new RhqDriftChangeSet(resource, version, category, config.getId());
+ driftChangeSet = new JPADriftChangeSet(resource, version, category, config.getId());
entityManager.persist(driftChangeSet);
for (DirectoryEntry dir = reader.readDirectoryEntry(); null != dir; dir = reader
@@ -177,10 +186,10 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
for (Iterator<FileEntry> i = dir.iterator(); i.hasNext();) {
FileEntry entry = i.next();
- RhqDriftFile oldDriftFile = getDriftFile(entry.getOldSHA(),
- (List<RhqDriftFile>) emptyDriftFiles);
- RhqDriftFile newDriftFile = getDriftFile(entry.getNewSHA(),
- (List<RhqDriftFile>) emptyDriftFiles);
+ JPADriftFile oldDriftFile = getDriftFile(entry.getOldSHA(),
+ (List<JPADriftFile>) emptyDriftFiles);
+ JPADriftFile newDriftFile = getDriftFile(entry.getNewSHA(),
+ (List<JPADriftFile>) emptyDriftFiles);
// TODO Figure out an efficient way to save coverage change sets.
// The initial/coverage change set could contain hundreds or even thousands
@@ -191,21 +200,20 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
// use a path with only forward slashing to ensure consistent paths across reports
String path = new File(dir.getDirectory(), entry.getFile()).getPath();
path = FileUtil.useForwardSlash(path);
- RhqDrift drift = new RhqDrift(driftChangeSet, path, entry.getType(), oldDriftFile,
+ JPADrift drift = new JPADrift(driftChangeSet, path, entry.getType(), oldDriftFile,
newDriftFile);
entityManager.persist(drift);
}
}
- // send a message to the agent requesting the empty RhqDriftFile content
+ // send a message to the agent requesting the empty JPADriftFile content
if (!emptyDriftFiles.isEmpty()) {
AgentClient agentClient = agentManager.getAgentClient(subjectManager.getOverlord(),
resourceId);
DriftAgentService service = agentClient.getDriftAgentService();
try {
- if (service.requestDriftFiles(resourceId, reader.getHeaders(),
- (List<DriftFile>) emptyDriftFiles)) {
+ if (service.requestDriftFiles(resourceId, reader.getHeaders(), emptyDriftFiles)) {
for (DriftFile driftFile : emptyDriftFiles) {
driftFile.setStatus(DriftFileStatus.REQUESTED);
}
@@ -247,10 +255,11 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
* @return The next change set version number
*/
int getChangeSetVersion(Resource r, DriftConfiguration c) {
- DriftChangeSetJPACriteria criteria = new DriftChangeSetJPACriteria();
+ JPADriftChangeSetCriteria criteria = new JPADriftChangeSetCriteria();
criteria.addFilterResourceId(r.getId());
criteria.addFilterDriftConfigurationId(c.getId());
- List<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), criteria);
+ List<? extends DriftChangeSet<?>> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(),
+ criteria);
return changeSets.size();
}
@@ -268,17 +277,17 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
private abstract class ChangeSetFileVisitor implements ZipUtil.ZipEntryVisitor {
}
- private RhqDriftFile getDriftFile(String sha256, List<RhqDriftFile> emptyDriftFiles) {
- RhqDriftFile result = null;
+ private JPADriftFile getDriftFile(String sha256, List<JPADriftFile> emptyDriftFiles) {
+ JPADriftFile result = null;
if (null == sha256 || "0".equals(sha256)) {
return result;
}
- result = entityManager.find(RhqDriftFile.class, sha256);
- // if the RhqDriftFile is not yet in the db, then it needs to be fetched from the agent
+ result = entityManager.find(JPADriftFile.class, sha256);
+ // if the JPADriftFile is not yet in the db, then it needs to be fetched from the agent
if (null == result) {
- result = persistDriftFile(new RhqDriftFile(sha256));
+ result = persistDriftFile(new JPADriftFile(sha256));
emptyDriftFiles.add(result);
}
@@ -286,7 +295,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public RhqDriftFile persistDriftFile(RhqDriftFile driftFile) {
+ public JPADriftFile persistDriftFile(JPADriftFile driftFile) {
entityManager.persist(driftFile);
return driftFile;
@@ -294,11 +303,11 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
@TransactionAttribute(REQUIRES_NEW)
- public void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception {
+ public void persistDriftFileData(JPADriftFile driftFile, InputStream data) throws Exception {
- DriftFileBits df = entityManager.find(DriftFileBits.class, driftFile.getHashId());
+ JPADriftFileBits df = entityManager.find(JPADriftFileBits.class, driftFile.getHashId());
if (null == df) {
- throw new IllegalArgumentException("RhqDriftFile not found [" + driftFile.getHashId() + "]");
+ throw new IllegalArgumentException("JPADriftFile not found [" + driftFile.getHashId() + "]");
}
df.setData(Hibernate.createBlob(new BufferedInputStream(data)));
df.setStatus(DriftFileStatus.LOADED);
@@ -321,7 +330,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
ZipUtil.unzipFile(filesZip, dir);
for (File file : dir.listFiles()) {
- RhqDriftFile driftFile = new RhqDriftFile(file.getName());
+ JPADriftFile driftFile = new JPADriftFile(file.getName());
try {
driftManager.persistDriftFileData(driftFile, new FileInputStream(file));
} catch (Exception e) {
@@ -334,15 +343,17 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
boolean deleted = dir.delete();
if (!deleted) {
- LogFactory.getLog(getClass()).info("Unable to delete " + dir.getAbsolutePath() + ". This directory and " +
- "its contents are no longer needed. It can be deleted.");
+ LogFactory.getLog(getClass()).info(
+ "Unable to delete " + dir.getAbsolutePath() + ". This directory and "
+ + "its contents are no longer needed. It can be deleted.");
}
-// DriftFileVisitor dfVisitor = new DriftFileVisitor(driftManager);
-// ZipUtil.walkZipFile(filesZip, dfVisitor);
+ // DriftFileVisitor dfVisitor = new DriftFileVisitor(driftManager);
+ // ZipUtil.walkZipFile(filesZip, dfVisitor);
}
+ /* TODO: dead code ?
private static class DriftFileVisitor implements ZipUtil.ZipEntryVisitor {
private DriftManagerLocal driftManager;
@@ -353,7 +364,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
String sha256 = entry.getName();
- RhqDriftFile driftFile = new RhqDriftFile(sha256);
+ JPADriftFile driftFile = new JPADriftFile(sha256);
// TODO use server plugin
try {
@@ -365,6 +376,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
return true;
}
}
+ */
@Override
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
@@ -372,7 +384,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
int result = 0;
for (String driftId : driftIds) {
- Drift doomed = entityManager.find(RhqDrift.class, driftId);
+ Drift<?, ?> doomed = entityManager.find(JPADrift.class, driftId);
if (null != doomed) {
entityManager.remove(doomed);
++result;
@@ -397,7 +409,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
public int deleteDriftsByContext(Subject subject, EntityContext entityContext) throws RuntimeException {
int result = 0;
- DriftJPACriteria criteria = new DriftJPACriteria();
+ JPADriftCriteria criteria = new JPADriftCriteria();
switch (entityContext.getType()) {
case Resource:
@@ -412,11 +424,11 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
throw new IllegalArgumentException("Entity Context Type not supported [" + entityContext + "]");
}
- List<RhqDrift> drifts = driftManager.findDriftsByCriteria(subject, criteria);
+ List<? extends Drift<?, ?>> drifts = driftManager.findDriftsByCriteria(subject, criteria);
if (!drifts.isEmpty()) {
String[] driftIds = new String[drifts.size()];
int i = 0;
- for (Drift drift : drifts) {
+ for (Drift<?, ?> drift : drifts) {
driftIds[i++] = drift.getId();
}
@@ -498,33 +510,47 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
}
+ // TODO, this code could move to a separate SLSB supporting only the JPA Drift impl
@Override
- public PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
+ DriftChangeSetCriteria criteria) {
+
+ JPADriftChangeSetCriteria jpaCriteria = (criteria instanceof JPADriftChangeSetCriteria) ? (JPADriftChangeSetCriteria) criteria
+ : new JPADriftChangeSetCriteria(criteria);
+
+ CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, jpaCriteria);
+ CriteriaQueryRunner<JPADriftChangeSet> queryRunner = new CriteriaQueryRunner<JPADriftChangeSet>(jpaCriteria,
+ generator, entityManager);
+ PageList<JPADriftChangeSet> result = queryRunner.execute();
- CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
- CriteriaQueryRunner<RhqDriftChangeSet> queryRunner = new CriteriaQueryRunner<RhqDriftChangeSet>(criteria, generator,
- entityManager);
- PageList<RhqDriftChangeSet> result = queryRunner.execute();
return result;
}
+ // TODO, this code could move to a separate SLSB supporting only the JPA Drift impl
@Override
- public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftJPACriteria criteria) {
- //
- PageList<RhqDrift> drifts = findDriftsByCriteria(subject, criteria);
+ public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria) {
+
+ PageList<? extends Drift<?, ?>> drifts = findDriftsByCriteria(subject, criteria);
PageList<DriftComposite> composites = new PageList<DriftComposite>();
- for (RhqDrift drift : drifts) {
- composites.add(new DriftComposite(drift, drift.getChangeSet().getResource()));
+ for (Drift<?, ?> drift : drifts) {
+ JPADrift d = (JPADrift) drift;
+ composites.add(new DriftComposite(drift, d.getChangeSet().getResource()));
}
return composites;
}
+ // TODO, this code could move to a separate SLSB supporting only the JPA Drift impl
@Override
- public PageList<RhqDrift> findDriftsByCriteria(Subject subject, DriftJPACriteria criteria) {
+ public PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+
+ JPADriftCriteria jpaCriteria = (criteria instanceof JPADriftCriteria) ? (JPADriftCriteria) criteria
+ : new JPADriftCriteria(criteria);
+
+ CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, jpaCriteria);
+ CriteriaQueryRunner<JPADrift> queryRunner = new CriteriaQueryRunner<JPADrift>(jpaCriteria, generator,
+ entityManager);
+ PageList<JPADrift> result = queryRunner.execute();
- CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
- CriteriaQueryRunner<RhqDrift> queryRunner = new CriteriaQueryRunner<RhqDrift>(criteria, generator, entityManager);
- PageList<RhqDrift> result = queryRunner.execute();
return result;
}
@@ -555,7 +581,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
if (null == result) {
- throw new IllegalArgumentException("RhqDrift Configuration Id [" + driftConfigId
+ throw new IllegalArgumentException("JPADrift Configuration Id [" + driftConfigId
+ "] not found for entityContext [" + entityContext + "]");
}
@@ -563,8 +589,8 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public RhqDriftFile getDriftFile(Subject subject, String sha256) {
- RhqDriftFile result = entityManager.find(RhqDriftFile.class, sha256);
+ public JPADriftFile getDriftFile(Subject subject, String sha256) {
+ JPADriftFile result = entityManager.find(JPADriftFile.class, sha256);
return result;
}
@@ -599,12 +625,12 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
// TODO security checks
- Snapshot snapshot = new Snapshot();
- PageList<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subject, criteria);
+ DriftSnapshot snapshot = new DriftSnapshot();
+ PageList<? extends DriftChangeSet<?>> changeSets = findDriftChangeSetsByCriteria(subject, criteria);
- for (RhqDriftChangeSet changeSet : changeSets) {
+ for (DriftChangeSet<?> changeSet : changeSets) {
snapshot.add(changeSet);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 6939c7c..70843d4 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -26,14 +26,14 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
-import org.rhq.core.domain.drift.RhqDriftFile;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
+import org.rhq.core.domain.drift.JPADriftFile;
import org.rhq.core.domain.util.PageList;
@Local
@@ -105,12 +105,12 @@ public interface DriftManagerLocal extends DriftManagerRemote {
void deleteDriftConfiguration(Subject subject, EntityContext entityContext, String driftConfigName);
/**
- * Simple get method for a RhqDriftFile. Does not return the content.
+ * Simple get method for a JPADriftFile. Does not return the content.
* @param subject
* @param sha256
- * @return The RhqDriftFile sans content.
+ * @return The JPADriftFile sans content.
*/
- RhqDriftFile getDriftFile(Subject subject, String sha256);
+ JPADriftFile getDriftFile(Subject subject, String sha256);
/**
* Standard criteria based fetch method
@@ -118,9 +118,9 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The DriftChangeSets matching the criteria
*/
- PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetJPACriteria criteria);
+ PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
- PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftJPACriteria criteria);
+ PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
/**
* Standard criteria based fetch method
@@ -128,7 +128,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The Drifts matching the criteria
*/
- PageList<RhqDrift> findDriftsByCriteria(Subject subject, DriftJPACriteria criteria);
+ PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
/**
* Get the specified drift configuration for the specified context.
@@ -178,7 +178,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @return
* @throws Exception
*/
- RhqDriftFile persistDriftFile(RhqDriftFile driftFile) throws Exception;
+ JPADriftFile persistDriftFile(JPADriftFile driftFile) throws Exception;
/**
* SUPPORTS DRIFT RHQ SERVER PLUGIN
@@ -186,8 +186,8 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param data
* @throws Exception
*/
- void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception;
+ void persistDriftFileData(JPADriftFile driftFile, InputStream data) throws Exception;
- Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+ DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index f66c3ab..9bad08f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -1,5 +1,7 @@
package org.rhq.enterprise.server.drift;
+import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
+
import java.io.File;
import java.util.Iterator;
@@ -24,7 +26,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
@@ -37,8 +39,6 @@ import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginManager;
import org.rhq.enterprise.server.util.LookupUtil;
-import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
-
@Stateless
public class DriftServerBean implements DriftServerLocal, DriftServerRemote {
@@ -62,14 +62,15 @@ public class DriftServerBean implements DriftServerLocal, DriftServerRemote {
@Override
@TransactionAttribute(NOT_SUPPORTED)
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
+ public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
+ DriftChangeSetCriteria criteria) {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
return driftServerPlugin.findDriftChangeSetsByCriteria(subject, criteria);
}
@Override
@TransactionAttribute(NOT_SUPPORTED)
- public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ public PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
return driftServerPlugin.findDriftsByCriteria(subject, criteria);
}
@@ -97,7 +98,7 @@ public class DriftServerBean implements DriftServerLocal, DriftServerRemote {
@Override
@TransactionAttribute(NOT_SUPPORTED)
- public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
+ public DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
return driftServerPlugin.createSnapshot(subject, criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
index eda3a4f..3c9da33 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
@@ -12,7 +12,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
@Local
@@ -28,12 +28,12 @@ public interface DriftServerLocal {
void detectDrift(Subject subject, EntityContext context, DriftConfiguration driftConfig);
- PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+ PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
- PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
+ PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
- Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
+ DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java
index a3dc30b..33f1aa7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java
@@ -5,14 +5,14 @@ import javax.ejb.Remote;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
@Remote
public interface DriftServerRemote {
- PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+ PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
- Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
+ DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index 5a57837..5130a5a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -23,12 +23,11 @@ import java.io.File;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
@@ -40,9 +39,9 @@ import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
*/
public interface DriftServerPluginFacet extends ServerPluginComponent {
- PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+ PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
- PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
+ PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
@@ -50,5 +49,5 @@ public interface DriftServerPluginFacet extends ServerPluginComponent {
void saveChangeSetFiles(File changeSetFilesZip) throws Exception;
- Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
+ DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 53ec93e..f0b1308 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -69,8 +69,8 @@ import org.rhq.core.domain.content.PackageInstallationStep;
import org.rhq.core.domain.content.ResourceRepo;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.drift.JPADrift;
+import org.rhq.core.domain.drift.JPADriftChangeSet;
import org.rhq.core.domain.event.Event;
import org.rhq.core.domain.event.EventSource;
import org.rhq.core.domain.measurement.Availability;
@@ -503,8 +503,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
AlertDampeningEvent.QUERY_DELETE_BY_RESOURCES, // alert-
AlertNotification.QUERY_DELETE_BY_RESOURCES, // related
AlertDefinition.QUERY_DELETE_BY_RESOURCES, // deletes
- RhqDrift.QUERY_DELETE_BY_RESOURCES, // drift before changeset
- RhqDriftChangeSet.QUERY_DELETE_BY_RESOURCES };
+ JPADrift.QUERY_DELETE_BY_RESOURCES, // drift before changeset
+ JPADriftChangeSet.QUERY_DELETE_BY_RESOURCES };
List<Integer> resourceIds = new ArrayList<Integer>();
resourceIds.add(resourceId);
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 68482bc..6520ce9 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -41,17 +41,16 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.JPADriftChangeSetCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftConfiguration;
-import org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
-import org.rhq.core.domain.drift.RhqDriftFile;
+import org.rhq.core.domain.drift.JPADriftFile;
+import org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
@@ -69,11 +68,12 @@ import org.rhq.enterprise.server.util.LookupUtil;
@Test(groups = "drift-manager")
public class DriftManagerBeanTest extends AbstractEJB3Test {
- private static final boolean ENABLE_TESTS = false;
+ private static final boolean ENABLE_TESTS = true;
private DriftManagerLocal driftManager;
private Subject overlord;
private Resource newResource;
+ @SuppressWarnings("unused")
private DriftServerService driftServerService;
/**
@@ -120,16 +120,16 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
assertTrue(changeset1.exists());
driftManager.storeChangeSet(newResource.getId(), changeset1);
- DriftChangeSetJPACriteria c = new DriftChangeSetJPACriteria();
+ JPADriftChangeSetCriteria c = new JPADriftChangeSetCriteria();
c.addFilterResourceId(newResource.getId());
c.fetchDrifts(true);
- List<RhqDriftChangeSet> changeSets = driftManager.findDriftChangeSetsByCriteria(overlord, c);
+ List<? extends DriftChangeSet<?>> changeSets = driftManager.findDriftChangeSetsByCriteria(overlord, c);
assertEquals(1, changeSets.size());
- RhqDriftChangeSet changeSet = changeSets.get(0);
+ DriftChangeSet<?> changeSet = changeSets.get(0);
assertEquals(0, changeSet.getVersion());
assertEquals("Expected to find one entry in change set", 1, changeSet.getDrifts().size());
- RhqDriftFile driftFile = driftManager.getDriftFile(overlord, "aaaaa");
+ JPADriftFile driftFile = driftManager.getDriftFile(overlord, "aaaaa");
assertNotNull(driftFile);
assertEquals(DriftFileStatus.REQUESTED, driftFile.getStatus());
@@ -146,7 +146,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
changeSet = changeSets.get(1);
assertEquals(1, changeSet.getVersion());
assertEquals(1, changeSet.getDrifts().size());
- RhqDrift drift = changeSet.getDrifts().iterator().next();
+ Drift<?, ?> drift = changeSet.getDrifts().iterator().next();
assertEquals("dir/filename.ext", drift.getPath());
assertEquals("aaaaa", drift.getOldDriftFile().getHashId());
assertEquals("bbbbb", drift.getNewDriftFile().getHashId());
@@ -255,7 +255,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
try {
// wipe out any test DriftFiles (the test files have sha256 0,1,...)
for (int i = 0, numDeleted = 1; (numDeleted > 0); ++i) {
- numDeleted = getEntityManager().createQuery("delete from RhqDriftFile where hash_id = '" + i + "'")
+ numDeleted = getEntityManager().createQuery("delete from JPADriftFile where hash_id = '" + i + "'")
.executeUpdate();
}
} catch (Exception e) {
@@ -298,7 +298,6 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
driftConfigs.add(test1Config.getConfiguration());
driftConfigs.add(test2Config.getConfiguration());
-
resource = new Resource("reskey" + System.currentTimeMillis(), "resname", resourceType);
resource.setUuid("" + new Random().nextInt());
resource.setAgent(agent);
@@ -366,7 +365,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
private class TestConfigService implements DriftAgentService {
@Override
- public boolean requestDriftFiles(int resourceId, Headers headers, List<DriftFile> driftFiles) {
+ public boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles) {
return true;
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java
index 8d39917..2c31e18 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/TestAgentClient.java
@@ -331,7 +331,7 @@ public class TestAgentClient implements AgentClient, BundleAgentService, DriftAg
}
@Override
- public boolean requestDriftFiles(int resourceId, Headers headers, List<DriftFile> driftFiles) {
+ public boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles) {
return false;
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index d1115ba..d58c3f1 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -1,11 +1,12 @@
package org.rhq.enterprise.server.plugins.drift.mongodb;
+import static org.rhq.enterprise.server.util.LookupUtil.getResourceManager;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
@@ -16,8 +17,6 @@ import com.google.code.morphia.Morphia;
import com.google.code.morphia.query.Query;
import com.mongodb.Mongo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.bson.types.ObjectId;
import org.rhq.common.drift.ChangeSetReader;
@@ -32,7 +31,7 @@ import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.dto.DriftChangeSetDTO;
import org.rhq.core.domain.drift.dto.DriftDTO;
import org.rhq.core.domain.drift.dto.DriftFileDTO;
@@ -47,11 +46,9 @@ import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBFile;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
-import static org.rhq.enterprise.server.util.LookupUtil.getResourceManager;
-
public class MongoDBDriftServer implements DriftServerPluginFacet {
- private final Log log = LogFactory.getLog(MongoDBDriftServer.class);
+ //private final Log log = LogFactory.getLog(MongoDBDriftServer.class);
private Mongo connection;
@@ -64,10 +61,7 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
@Override
public void initialize(ServerPluginContext context) throws Exception {
connection = new Mongo("localhost");
- morphia = new Morphia()
- .map(MongoDBChangeSet.class)
- .map(MongoDBChangeSetEntry.class)
- .map(MongoDBFile.class);
+ morphia = new Morphia().map(MongoDBChangeSet.class).map(MongoDBChangeSetEntry.class).map(MongoDBFile.class);
ds = morphia.createDatastore(connection, "rhq");
}
@@ -124,11 +118,12 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
- Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
- .filter("resourceId =", criteria.getFilterResourceId());
+ public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
+ DriftChangeSetCriteria criteria) {
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class).filter("resourceId =",
+ criteria.getFilterResourceId());
- PageList results = new PageList<DriftChangeSetDTO>();
+ PageList<DriftChangeSetDTO> results = new PageList<DriftChangeSetDTO>();
for (MongoDBChangeSet changeSet : query) {
DriftChangeSetDTO changeSetDTO = toDTO(changeSet);
Set<DriftDTO> entries = new HashSet<DriftDTO>();
@@ -144,7 +139,7 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ public PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class);
boolean changeSetIdFiltered = false;
@@ -161,7 +156,7 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
query.filter("id = ", new ObjectId(criteria.getFilterChangeSetId()));
}
- PageList results = new PageList<DriftDTO>();
+ PageList<DriftDTO> results = new PageList<DriftDTO>();
for (MongoDBChangeSet changeSet : query) {
DriftChangeSetDTO changeSetDTO = toDTO(changeSet);
@@ -170,14 +165,13 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
}
- return (PageList<Drift>) results;
+ return results;
}
@Override
public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria) {
- Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
- .filter("files.category in ", criteria.getFilterCategories())
- .filter("resourceId in", criteria.getFilterResourceIds());
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class).filter("files.category in ",
+ criteria.getFilterCategories()).filter("resourceId in", criteria.getFilterResourceIds());
PageList<DriftComposite> results = new PageList<DriftComposite>();
Map<Integer, Resource> resources = loadResourceMap(subject, criteria.getFilterResourceIds());
@@ -193,13 +187,13 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
+ public DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
return null;
}
- Map<Integer, Resource> loadResourceMap(Subject subject, List<Integer> resourceIds) {
+ Map<Integer, Resource> loadResourceMap(Subject subject, Integer[] resourceIds) {
ResourceCriteria criteria = new ResourceCriteria();
- criteria.addFilterIds(resourceIds.toArray(new Integer[resourceIds.size()]));
+ criteria.addFilterIds(resourceIds);
ResourceManagerLocal resourceMgr = getResourceManager();
PageList<Resource> resources = resourceMgr.findResourcesByCriteria(subject, criteria);
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java
index ea0c509..6a40465 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java
@@ -1,5 +1,7 @@
package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+import java.io.Serializable;
+
import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
@@ -7,14 +9,17 @@ import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
@Entity
-public class MongoDBFile implements DriftFile {
+public class MongoDBFile implements Serializable, DriftFile {
+
+ private static final long serialVersionUID = 1L;
+ @SuppressWarnings("unused")
@Id
private String hash;
@Override
public String getHashId() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
@@ -24,12 +29,12 @@ public class MongoDBFile implements DriftFile {
@Override
public Long getCtime() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public Long getDataSize() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
@@ -39,7 +44,7 @@ public class MongoDBFile implements DriftFile {
@Override
public DriftFileStatus getStatus() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index c2520d5..7a28b53 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -19,6 +19,8 @@
*/
package org.rhq.enterprise.server.plugins.drift;
+import static org.rhq.enterprise.server.util.LookupUtil.getDriftManager;
+
import java.io.File;
import org.apache.commons.logging.Log;
@@ -27,20 +29,15 @@ import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
-import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.drift.DriftManagerLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
-import static org.rhq.enterprise.server.util.LookupUtil.getDriftManager;
-
/**
* A drift server-side plugin component that the server uses to process drift files.
*
@@ -72,21 +69,22 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
}
@Override
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
- PageList<? extends DriftChangeSet> results = getDriftManager().findDriftChangeSetsByCriteria(subject,
- toJPACriteria(criteria));
- return (PageList<DriftChangeSet>) results;
+ public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
+ DriftChangeSetCriteria criteria) {
+ PageList<? extends DriftChangeSet<?>> results = getDriftManager().findDriftChangeSetsByCriteria(subject,
+ criteria);
+ return results;
}
@Override
- public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
- PageList<? extends Drift> results = getDriftManager().findDriftsByCriteria(subject, toJPACriteria(criteria));
- return (PageList<Drift>) results;
+ public PageList<? extends Drift<?, ?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ PageList<? extends Drift<?, ?>> results = getDriftManager().findDriftsByCriteria(subject, criteria);
+ return results;
}
@Override
public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria) {
- return getDriftManager().findDriftCompositesByCriteria(subject, toJPACriteria(criteria));
+ return getDriftManager().findDriftCompositesByCriteria(subject, criteria);
}
@Override
@@ -102,40 +100,8 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
+ public DriftSnapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
DriftManagerLocal driftMgr = getDriftManager();
- return driftMgr.createSnapshot(subject, toJPACriteria(criteria));
- }
-
- private DriftChangeSetJPACriteria toJPACriteria(DriftChangeSetCriteria criteria) {
- DriftChangeSetJPACriteria jpaCriteria = new DriftChangeSetJPACriteria();
- jpaCriteria.addFilterId(criteria.getFilterId());
- jpaCriteria.addFilterResourceId(criteria.getFilterResourceId());
- jpaCriteria.addFilterDriftConfigurationId(criteria.getFilterDriftConfigurationId());
- jpaCriteria.addFilterCategory(criteria.getFilterCategory());
- jpaCriteria.addFilterCreatedAfter(criteria.getFilterCreatedAfter());
- jpaCriteria.addFilterCreatedBefore(criteria.getFilterCreatedBefore());
- jpaCriteria.addFilterEndVersion(criteria.getFilterEndVersion());
- jpaCriteria.addFilterStartVersion(criteria.getFilterStartVersion());
- jpaCriteria.addFilterVersion(criteria.getFilterVersion());
- jpaCriteria.addSortVersion(criteria.getSortVersion());
- jpaCriteria.fetchDrifts(criteria.isFetchDrifts());
-
- return jpaCriteria;
- }
-
- private DriftJPACriteria toJPACriteria(DriftCriteria criteria) {
- DriftJPACriteria jpaCriteria = new DriftJPACriteria();
- jpaCriteria.addFilterId(criteria.getFilterId());
- jpaCriteria.addFilterCategories(criteria.getFilterCategories().toArray(new DriftCategory[]{}));
- jpaCriteria.addFilterChangeSetId(criteria.getFilterChangeSetId());
- jpaCriteria.addFilterEndTime(criteria.getFilterEndTime());
- jpaCriteria.addFilterPath(criteria.getFilterPath());
- jpaCriteria.addFilterResourceIds(criteria.getFilterResourceIds().toArray(new Integer[]{}));
- jpaCriteria.addFilterStartTime(criteria.getFilterStartTime());
- jpaCriteria.fetchChangeSet(criteria.isFetchChangeSet());
- jpaCriteria.addSortCtime(criteria.getSortCtime());
-
- return jpaCriteria;
+ return driftMgr.createSnapshot(subject, criteria);
}
}
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/drift-rhq/src/main/resources/META-INF/rhq-serverplugin.xml
index 0843ff5..e245d04 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -3,9 +3,9 @@
<drift-plugin
version="1.0"
apiVersion="1.0"
- description="The Drift Management RHQ Persistence Store (the default backend)"
- displayName="Drift:RHQ"
- name="drift-rhq"
+ description="The JPA Drift Management Backend (the RHQ default backend)"
+ displayName="Drift:JPA (RHQ default)"
+ name="drift-jpa"
package="org.rhq.enterprise.server.plugins.drift"
xmlns="urn:xmlns:rhq-serverplugin.drift"
xmlns:serverplugin="urn:xmlns:rhq-serverplugin"
diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
index 7f67766..9e221a0 100644
--- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
+++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
@@ -57,6 +57,7 @@
<pathelement location="../alert-subject/target/alert-subject-${project.version}.jar" />
<pathelement location="../alert-log4j/target/alert-log4j-${project.version}.jar" />
<pathelement location="../cobbler/target/cobbler-${project.version}.jar" />
+ <pathelement location="../drift-mongodb/target/drift-mongodb-serverplugin-${project.version}.jar" />
<pathelement location="../drift-rhq/target/rhq-serverplugin-drift-${project.version}.jar" />
<pathelement location="../filetemplate-bundle/target/rhq-serverplugin-filetemplate-bundle-${project.version}.jar" />
<pathelement location="../ant-bundle/target/rhq-serverplugin-ant-bundle-${project.version}.jar" />
commit e618398ee8022f1073713af206a22b09653642e1
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 2 16:36:35 2011 -0400
Add mongodb jar deps and src decls
diff --git a/.classpath b/.classpath
index a1e9e14..bdc2f4f 100644
--- a/.classpath
+++ b/.classpath
@@ -117,8 +117,12 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-testng/3.1/unitils-testng-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.6.3/mongo-java-driver-2.6.3.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/com/google/code/morphia/morphia/1.00-SNAPSHOT/morphia-1.00-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="modules/enterprise/remoting/webservices/target/rhq-remoting-webservices-4.1.0-SNAPSHOT/wsconsume-output"/>
<classpathentry kind="src" path="modules/common/ant-bundle/src/main/java"/>
+ <classpathentry kind="src" path="modules/enterprise/server/plugins/drift-mongodb/src/main/java"/>
+ <classpathentry kind="src" path="modules/enterprise/server/plugins/drift-mongodb/src/test/java"/>
<classpathentry kind="src" path="modules/common/drift/src/main/java"/>
<classpathentry kind="src" path="modules/common/drift/src/test/java"/>
<classpathentry kind="src" path="modules/enterprise/server/plugins/drift-rhq/src/main/java"/>
12 years, 10 months
[rhq] Branch 'as7plugin' - modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java | 11 ++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit ee2df9a58992f13168c15656df0f3dcabcf053e1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Aug 3 13:36:20 2011 +0200
Catch the case where AS7 claims success at returning an attribute but in fact returns null.
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 b2e1919..131c1a0 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
@@ -65,7 +65,6 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -123,7 +122,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
path = pluginConfiguration.getSimpleValue("path", null);
- Address address = new Address(path);
+ address = new Address(path);
key = context.getResourceKey();
myServerName = context.getResourceKey().substring(context.getResourceKey().lastIndexOf("/")+1);
@@ -160,10 +159,14 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
Operation op = new ReadAttribute(address,req.getName()); // TODO batching
Result res = connection.execute(op, false);
- if (!res.isSuccess())
+ if (!res.isSuccess()) {
+ log.warn("Getting metric [" + req.getName() +"] at [ " + address + "] failed: " + res.getFailureDescription());
continue;
+ }
- String val = (String) res.getResult();
+ String val = (String) res.getResult();
+ if (val==null) // One of the AS7 ways of telling "This is not implemented" See also AS7-1454
+ continue;
if (req.getDataType()== DataType.MEASUREMENT) {
if (!val.equals("no metrics available")) { // AS 7 returns this
12 years, 10 months
[rhq] Branch 'stefan/dbreset' - 2 commits - modules/core modules/enterprise
by snegrea
modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java | 50 ++++----
modules/enterprise/gui/installer-war/pom.xml | 1
modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java | 59 +++-------
3 files changed, 45 insertions(+), 65 deletions(-)
New commits:
commit c89fd0c3b66219fbce0b3f079ea7ade0ddcee14f
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 2 18:25:57 2011 -0500
DB installation test now uses dbreset to propertly reset the database (even for Oracle configurations).
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
index 3f99d10..9cd49e4 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
@@ -39,14 +39,13 @@ public class DBReset {
private static final String DB_NAME = System.getProperty("rhq.ds.db-name", "rhq_installer_test_db");
private static final String SERVER = System.getProperty("rhq.ds.server-name", "127.0.0.1");
+ private static final String DB_URL = System.getProperty("rhq.ds.connection-url", "jdbc:postgresql://" + SERVER
+ + ":5432/" + DB_NAME);
private static final String USER = System.getProperty("rhq.ds.user-name", "rhqadmin");
private static final String ADMIN_USER = System.getProperty("rhq.db.admin.username", "postgres");
private static final String ADMIN_PASSWORD = System.getProperty("rhq.db.admin.password", "postgres");
- private static final String DB_RESET = System.getProperty("dbreset", "false");
- private static final String DB_URL = System.getProperty("rhq.ds.connection-url", "jdbc:postgresql://" + SERVER
- + ":5432/" + DB_NAME);
-
private static final String DB_TYPE_MAPPING = System.getProperty("rhq.ds.type-mapping", "PostgreSQL");
+ private static final String DB_RESET = System.getProperty("dbreset", "false");
/**
* @param args
@@ -67,7 +66,7 @@ public class DBReset {
}
}
- private void performDBReset(String dbTypeMapping, String dbUrl, String dbName, String user, String adminUser,
+ public void performDBReset(String dbTypeMapping, String dbUrl, String dbName, String user, String adminUser,
String adminPassword) throws Exception {
if (dbTypeMapping.equals("PostgreSQL")) {
Connection connection = null;
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index 517399c..900d476 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -147,6 +147,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
+ <rhq.test.ds.type-mapping>${rhq.test.ds.type-mapping}</rhq.test.ds.type-mapping>
<rhq.test.ds.server-name>${rhq.test.ds.server-name}</rhq.test.ds.server-name>
<rhq.test.ds.db-name>${rhq.test.ds.db-name}</rhq.test.ds.db-name>
<rhq.test.ds.connection-url>${rhq.test.ds.connection-url}</rhq.test.ds.connection-url>
diff --git a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
index 956e25e..6633cb7 100644
--- a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
+++ b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
@@ -23,18 +23,18 @@
package org.rhq.enterprise.installer;
-import org.rhq.core.db.DbUtil;
-import org.rhq.core.db.setup.DBSetup;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
import java.io.File;
-import java.net.URI;
import java.net.URL;
-import java.sql.Connection;
-import java.sql.Statement;
import java.util.Properties;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.rhq.core.db.reset.DBReset;
+import org.rhq.core.db.setup.DBSetup;
+import org.rhq.enterprise.installer.ServerInformation;
+import org.rhq.enterprise.installer.ServerProperties;
+
/**
* The tests in this class exercise the dbsetup/dbupgrade code that is run in the installer. The tests currently only
* run against postgresql. Support needs to be added for oracle. The tests do not do any post-install/upgrade
@@ -46,13 +46,15 @@ import java.util.Properties;
public class DBInstallationTest {
private final String LOG_DIRECTORY = System.getProperty("java.io.tmpdir", "rhq/installer-test");
- private final String TEST_DB = System.getProperty("rhq.test.ds.db-name","rhq_installer_test_db");
+ private final String DB_NAME = System.getProperty("rhq.test.ds.db-name", "rhq_installer_test_db");
private final String USERNAME = System.getProperty("rhq.test.ds.user-name", "rhqadmin");
private final String PASSWORD = System.getProperty("rhq.test.ds.password", "rhqadmin");
private final String SERVER = System.getProperty("rhq.test.ds.server-name", "127.0.0.1");
- private final String DB_URL = System.getProperty("rhq.test.ds.connection-url", "jdbc:postgresql://" + SERVER + ":5432/"+TEST_DB);
+ private final String DB_URL = System.getProperty("rhq.test.ds.connection-url", "jdbc:postgresql://" + SERVER
+ + ":5432/" + DB_NAME);
private final String ADMIN_USERNAME = System.getProperty("rhq.db.admin.username", "postgres");
private final String ADMIN_PASSWORD = System.getProperty("rhq.db.admin.password", "postgres");
+ private static final String DB_TYPE_MAPPING = System.getProperty("rhq.test.ds.type-mapping", "PostgreSQL");
private ServerInformation installer;
@@ -79,8 +81,8 @@ public class DBInstallationTest {
@Test
public void overwriteJON231Schema() throws Exception {
- installSchemaAndData("2.3.1");
- installer.createNewDatabaseSchema(getInstallProperties());
+ installSchemaAndData("2.3.1");
+ installer.createNewDatabaseSchema(getInstallProperties());
}
@Test
@@ -88,13 +90,13 @@ public class DBInstallationTest {
installSchemaAndData("2.3.1");
installer.upgradeExistingDatabaseSchema(getInstallProperties());
}
-
+
@Test
public void overwriteJON240Schema() throws Exception {
- installSchemaAndData("2.4.0");
- installer.createNewDatabaseSchema(getInstallProperties());
+ installSchemaAndData("2.4.0");
+ installer.createNewDatabaseSchema(getInstallProperties());
}
-
+
@Test
public void upgradeJON240Schema() throws Exception {
installSchemaAndData("2.4.0");
@@ -110,29 +112,8 @@ public class DBInstallationTest {
}
private void recreateTestDatabase() throws Exception {
- Connection connection = null;
- Statement dropDB = null;
- Statement createDB = null;
-
- try {
- connection = DbUtil.getConnection(DB_URL.replace(TEST_DB,"postgres"), ADMIN_USERNAME, ADMIN_PASSWORD);
-
- dropDB = connection.createStatement();
- dropDB.execute("drop database if exists " + TEST_DB);
-
- createDB = connection.createStatement();
- createDB.execute("create database " + TEST_DB + " with owner " + USERNAME);
- } finally {
- if (connection != null) {
- connection.close();
- }
- if (dropDB != null) {
- dropDB.close();
- }
- if (createDB != null) {
- createDB.close();
- }
- }
+ DBReset dbReset = new DBReset();
+ dbReset.performDBReset(DB_TYPE_MAPPING, DB_URL, DB_NAME, USERNAME, ADMIN_USERNAME, ADMIN_PASSWORD);
}
private void installSchemaAndData(String jonVersion) throws Exception {
commit 3d19754c73074ab2478d8b537af48878dd7863e1
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 2 18:14:51 2011 -0500
Make dbreset configurable to it can be used/consumed by other modules.
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
index 8a32c43..3f99d10 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
@@ -37,53 +37,53 @@ import org.rhq.core.db.DbUtil;
public class DBReset {
private static Log log = LogFactory.getLog(DBReset.class);
- private final String DB = System.getProperty("rhq.ds.db-name", "rhq_installer_test_db");
- private final String SERVER = System.getProperty("rhq.ds.server-name", "127.0.0.1");
- private final String USER = System.getProperty("rhq.ds.user-name", "rhqadmin");
- private final String ADMIN_USER = System.getProperty("rhq.db.admin.username", "postgres");
- private final String ADMIN_PASSWORD = System.getProperty("rhq.db.admin.password", "postgres");
- private final String DB_RESET = System.getProperty("dbreset", "false");
- private final String DB_URL = System.getProperty("rhq.ds.connection-url", "jdbc:postgresql://" + SERVER + ":5432/"
- + DB);
+ private static final String DB_NAME = System.getProperty("rhq.ds.db-name", "rhq_installer_test_db");
+ private static final String SERVER = System.getProperty("rhq.ds.server-name", "127.0.0.1");
+ private static final String USER = System.getProperty("rhq.ds.user-name", "rhqadmin");
+ private static final String ADMIN_USER = System.getProperty("rhq.db.admin.username", "postgres");
+ private static final String ADMIN_PASSWORD = System.getProperty("rhq.db.admin.password", "postgres");
+ private static final String DB_RESET = System.getProperty("dbreset", "false");
+ private static final String DB_URL = System.getProperty("rhq.ds.connection-url", "jdbc:postgresql://" + SERVER
+ + ":5432/" + DB_NAME);
- private final String DB_TYPE_MAPPING = System.getProperty("rhq.ds.type-mapping", "PostgreSQL");
+ private static final String DB_TYPE_MAPPING = System.getProperty("rhq.ds.type-mapping", "PostgreSQL");
/**
* @param args
*/
public static void main(String[] args) {
+ if (DB_RESET.equals("false")) {
+ return;
+ }
+
DBReset dbreset = new DBReset();
try {
- dbreset.performDBReset();
+ dbreset.performDBReset(DB_TYPE_MAPPING, DB_URL, DB_NAME, USER, ADMIN_USER, ADMIN_PASSWORD);
+ System.setProperty("dbsetup", "true");
} catch (Exception e) {
log.info(e);
System.exit(1);
}
}
- private void performDBReset() throws Exception {
- if (DB_RESET.equals("false")) {
- return;
- }
-
- System.setProperty("dbsetup", "true");
-
- if (DB_TYPE_MAPPING.equals("PostgreSQL")) {
+ private void performDBReset(String dbTypeMapping, String dbUrl, String dbName, String user, String adminUser,
+ String adminPassword) throws Exception {
+ if (dbTypeMapping.equals("PostgreSQL")) {
Connection connection = null;
Statement dropDB = null;
Statement createDB = null;
try {
- connection = DbUtil.getConnection(DB_URL.replace(DB, "postgres"), ADMIN_USER, ADMIN_PASSWORD);
+ connection = DbUtil.getConnection(dbUrl.replace(dbName, "postgres"), adminUser, adminPassword);
dropDB = connection.createStatement();
- dropDB.execute("drop database if exists " + DB);
+ dropDB.execute("drop database if exists " + dbName);
createDB = connection.createStatement();
- createDB.execute("create database " + DB + " with owner " + USER);
+ createDB.execute("create database " + dbName + " with owner " + user);
- log.info("Dropped and created database " + DB + ".");
+ log.info("Dropped and created postgres database " + dbName + ".");
} finally {
if (dropDB != null) {
dropDB.close();
@@ -101,7 +101,7 @@ public class DBReset {
PreparedStatement cleanUserStatement = null;
try {
- connection = DbUtil.getConnection(DB_URL, ADMIN_USER, ADMIN_PASSWORD);
+ connection = DbUtil.getConnection(DB_URL, adminUser, ADMIN_PASSWORD);
connection.setAutoCommit(false);
String plsql = "declare cursor all_objects_to_drop is\n"
@@ -118,12 +118,11 @@ public class DBReset {
+ " end;\n"
+ " end loop;\n"
+ " end;\n";
- log.info(plsql);
cleanUserStatement = connection.prepareStatement(plsql);
cleanUserStatement.execute();
connection.commit();
- log.info("Cleand database " + DB + ".");
+ log.info("Cleaned Oracle database " + dbName + ".");
} finally {
if (cleanUserStatement != null) {
cleanUserStatement.close();
12 years, 10 months
[rhq] Branch 'drift' - modules/enterprise
by John Sanda
modules/enterprise/server/plugins/drift-mongodb/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5647a5530d6bbd5e61c2da40e874092886cc3614
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 17:18:36 2011 -0400
Downgrading morphia dependency from SNAPSHOT to release version
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 958d3e0..2cb4bbf 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -54,7 +54,7 @@
<dependency>
<groupId>com.google.code.morphia</groupId>
<artifactId>morphia</artifactId>
- <version>1.00-SNAPSHOT</version>
+ <version>0.99</version>
</dependency>
<dependency>
12 years, 10 months
[rhq] 2 commits - modules/plugins
by snegrea
modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml | 15 +++++-----
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 601a57e20e12f6b2dd4e3c8816ab5c92225a4d2e
Merge: 36992e5 f416f35
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 2 15:53:41 2011 -0500
Merge branch 'mod_cluster_plugin'
commit f416f3555271ae10f481662f5fef8448936258f2
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 2 14:33:43 2011 -0500
Better descriptions for mod_cluster operations.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 29b334f..4846490 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -26,9 +26,10 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
<c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
- <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
<c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
<c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
@@ -52,13 +53,13 @@
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
</parameters>
</operation>
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
+ <operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
@@ -69,7 +70,7 @@
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
</parameters>
</operation>
- <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
@@ -77,9 +78,9 @@
<metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
- <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster."/>
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
12 years, 10 months
[rhq] Branch 'mod_cluster_plugin' - modules/plugins
by snegrea
modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml | 15 +++++-----
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 0dc410cb68b743f82f3385cbb2610bb06a727f81
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 2 14:33:43 2011 -0500
Better descriptions for mod_cluster operations.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 29b334f..4846490 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -26,9 +26,10 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
<c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
- <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
<c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
<c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
@@ -52,13 +53,13 @@
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
</parameters>
</operation>
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
+ <operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
@@ -69,7 +70,7 @@
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
</parameters>
</operation>
- <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
@@ -77,9 +78,9 @@
<metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
- <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster."/>
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
12 years, 10 months
[rhq] 95 commits - etc/cli-scripts modules/core modules/enterprise modules/plugins modules/test-utils
by John Sanda
etc/cli-scripts/drift.js | 66 +
modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml | 6
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 9
modules/core/domain/src/main/java/org/rhq/core/domain/common/composite/SystemSettings.java | 39
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java | 154 +++
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java | 135 +++
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java | 43 -
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftComposite.java | 8
modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java | 91 ++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java | 94 ++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java | 50 +
modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java | 94 --
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java | 3
modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java | 2
modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java | 14
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java | 18
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PopupWindow.java | 63 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java | 24
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/AbstractAlertDefinitionsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/GroupAlertDefinitionsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/TemplateAlertDefinitionsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java | 405 ++++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java | 128 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java | 365 +--------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection2.java | 367 +++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java | 59 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java | 18
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java | 44 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java | 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/SystemGWTService.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionListView.java | 42 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupMemberResourceOperationHistoryListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/schedule/GroupOperationScheduleListView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationHistoryView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/traits/TraitsView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryListView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/schedule/ResourceOperationScheduleListView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java | 21
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java | 10
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 3
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16_open.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/Drift_new_16.png |binary
modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/client/RemoteClient.java | 5
modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java | 5
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java | 1
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 27
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java | 5
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java | 18
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java | 66 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java | 47 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java | 3
modules/enterprise/server/plugins/drift-mongodb/pom.xml | 290 +++++++
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java | 244 ++++++
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java | 122 +++
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java | 94 ++
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java | 49 +
modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml | 22
modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java | 95 ++
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java | 30
modules/enterprise/server/plugins/pom.xml | 1
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 12
modules/test-utils/src/main/java/org/rhq/test/AssertUtils.java | 17
modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java | 11
84 files changed, 2994 insertions(+), 651 deletions(-)
New commits:
commit 36992e5f56228c1582cbc757f763027c1eeebc53
Merge: 3d58037 0f7fc0f
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 16:22:16 2011 -0400
Merge branch 'drift'
commit 0f7fc0f283c9c382f45881c84fe99caa16246439
Merge: 7e6fa99 24c7ecb
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 14:58:52 2011 -0400
Merge branch 'master' into drift
Conflicts:
modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
commit 7e6fa990fa40f4585a286cf251b0f36643ac0a83
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 14:06:12 2011 -0400
Updating query method to work with retrieving change sets
The mongodb plugin does not yet fully support criteria queries. As
different queries are implemented, I am attempting to update the plugin
to support those queries until the plugin better/fully implements the
criteria apis.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
index 8453713..afb6345 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
@@ -33,9 +33,9 @@ import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.criteria.BaseCriteria;
import org.rhq.core.domain.criteria.BasicDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.BasicDriftCriteria;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.util.PageList;
@@ -111,7 +111,7 @@ public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSourc
});
} else {
String changesetId = parentId;
- DriftCriteria criteria = new DriftJPACriteria();
+ DriftCriteria criteria = new BasicDriftCriteria();
criteria.addFilterChangeSetId(changesetId);
driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index 17b9f16..d1115ba 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -145,12 +145,21 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
@Override
public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
- String[] idFields = criteria.getFilterId().split(":");
- ObjectId changeSetId = new ObjectId(idFields[0]);
- String path = idFields[1];
- Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
- .filter("id = ", changeSetId)
- .filter("files.path = ", path);
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class);
+ boolean changeSetIdFiltered = false;
+
+ if (criteria.getFilterId() != null) {
+ String[] idFields = criteria.getFilterId().split(":");
+ ObjectId changeSetId = new ObjectId(idFields[0]);
+ String path = idFields[1];
+
+ query.filter("files.path = ", path);
+ query.filter("id = ", changeSetId);
+ }
+
+ if (!changeSetIdFiltered && criteria.getFilterChangeSetId() != null) {
+ query.filter("id = ", new ObjectId(criteria.getFilterChangeSetId()));
+ }
PageList results = new PageList<DriftDTO>();
commit 6b66f0483fb57be021a02de0ed25729e88ba87f7
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 09:48:46 2011 -0400
Add support for specifying optional change set criteria filters
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
index ee54191..cddd7de 100644
--- a/etc/cli-scripts/drift.js
+++ b/etc/cli-scripts/drift.js
@@ -12,6 +12,13 @@ function createSnapshot(rid, cname) {
criteria.addFilterResourceId(rid);
criteria.addFilterDriftConfigurationId(config.id);
+ if (arguments.length > 2) {
+ var filters = arguments[2];
+ for (key in filters) {
+ criteria['addFilter' + key[0].toUpperCase() + key.substring(1)](filters[key]);
+ }
+ }
+
return DriftServer.createSnapshot(criteria);
}
commit a3fe993d72bcb308b6d9bf25fbfc420b9d63a4a6
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 1 22:43:51 2011 -0400
Initial commit for drift.js
This javascript file contains some helper functions for generating
snapshots and displays the results of snapshot diffs.
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
new file mode 100644
index 0000000..ee54191
--- /dev/null
+++ b/etc/cli-scripts/drift.js
@@ -0,0 +1,59 @@
+// This script has a dependency on rhq/etc/cl-scripts/util.js. The following
+// command needs to be run in order to load the functions in util.js:
+//
+// exec -f /path/to/rhq/etc/cli-scripts/util.js
+//
+// Then the same exec command can be run to load functions in this script.
+
+function createSnapshot(rid, cname) {
+ var config = findDriftConfig(rid, function(c) { return cname.equals(c.name) });
+
+ var criteria = BasicDriftChangeSetCriteria();
+ criteria.addFilterResourceId(rid);
+ criteria.addFilterDriftConfigurationId(config.id);
+
+ return DriftServer.createSnapshot(criteria);
+}
+
+function findDriftConfig(rid, fn) {
+ var criteria = ResourceCriteria();
+ criteria.addFilterId(rid);
+ criteria.fetchDriftConfigurations(true);
+
+ var resources = ResourceManager.findResourcesByCriteria(criteria);
+ var resource = resources.get(0);
+
+ return find(resource.driftConfigurations, function(config) {
+ return fn(DriftConfiguration(config));
+ });
+}
+
+function diff(s1, s2) {
+ var theDiff = s1.diff(s2);
+
+ function printEntry(entry) {
+ println(entry.newDriftFile.hashId + '\t' + entry.path);
+ }
+
+ function report(header, elements) {
+ println(header + ':');
+ foreach(elements, printEntry);
+ println('\n');
+ }
+
+ report('elements in conflict', theDiff.elementsInConflict);
+ report('elements not in left', theDiff.elementsNotInLeft);
+ report('elements not in right', theDiff.elementsNotInRight);
+}
+
+function filterEntry(props) {
+ return function(entry) {
+ var filteredEntry = {};
+ foreach(props, function(prop) {
+ if (entry[prop]) {
+ filteredEntry[prop] = entry[prop];
+ }
+ });
+ return filteredEntry;
+ }
+}
commit 0dc48d31c12b4dbd6e6ca4b2bb67fb13f5b9f057
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 1 22:41:01 2011 -0400
Initial attempt at fetch change sets
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index bc88533..17b9f16 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -4,8 +4,10 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@@ -123,7 +125,22 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
@Override
public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
- return new PageList<DriftChangeSet>();
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
+ .filter("resourceId =", criteria.getFilterResourceId());
+
+ PageList results = new PageList<DriftChangeSetDTO>();
+ for (MongoDBChangeSet changeSet : query) {
+ DriftChangeSetDTO changeSetDTO = toDTO(changeSet);
+ Set<DriftDTO> entries = new HashSet<DriftDTO>();
+ for (MongoDBChangeSetEntry entry : changeSet.getDrifts()) {
+ entries.add(toDTO(entry, changeSetDTO));
+ }
+ changeSetDTO.setDrifts(entries);
+ results.add(changeSetDTO);
+ }
+
+ return results;
+ //return new PageList<DriftChangeSet>();
}
@Override
@@ -189,6 +206,7 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) {
DriftChangeSetDTO dto = new DriftChangeSetDTO();
dto.setId(changeSet.getId());
+ // TODO copy resource id
dto.setDriftConfigurationId(changeSet.getDriftConfigurationId());
dto.setVersion(changeSet.getVersion());
dto.setCtime(changeSet.getCtime());
commit efcf0c5f3ec664ee2899756cd45df7a591837d99
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Aug 1 16:18:28 2011 -0400
add change set menu item "show configuration" - not implemented yet until we get the proper composite query
added new icons for "coverage" change sets versus "drift"
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
index a513687..4c1c429 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
@@ -79,7 +79,21 @@ public class ImageManager {
return "[SKIN]/actions/undo.png";
}
+ /**
+ * Returns a drift icon given the category of the drift.
+ * Note that if the category is null, it will be assumed the drift icon
+ * should be one that indicates the file is "new" (presumably from
+ * a coverage change set report - that is, its the first time the file
+ * has been seen).
+ *
+ * @param category
+ * @return path to icon
+ */
public static String getDriftCategoryIcon(DriftCategory category) {
+ if (category == null) {
+ return "subsystems/drift/Drift_new_16.png";
+ }
+
switch (category) {
case FILE_ADDED:
return "subsystems/drift/Drift_add_16.png";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PopupWindow.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PopupWindow.java
new file mode 100644
index 0000000..e72518a
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PopupWindow.java
@@ -0,0 +1,63 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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;
+
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.events.CloseClickHandler;
+import com.smartgwt.client.widgets.events.CloseClientEvent;
+
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
+
+/**
+ * Generic window that you can use to popup details. Populate the popup
+ * window with any canvas.
+ *
+ * @author John Mazzitelli
+ */
+public class PopupWindow extends LocatableWindow {
+ /**
+ * Create the popup dialog window.
+ *
+ * @param locatorId
+ * @param canvas if not <code>null</code>, this will be added to the window.
+ */
+ public PopupWindow(String locatorId, Canvas canvas) {
+ super(locatorId);
+ setTitle(MSG.common_title_details());
+ setShowMinimizeButton(false);
+ setShowMaximizeButton(true);
+ setIsModal(true);
+ setShowModalMask(true);
+ setWidth(600);
+ setHeight(400);
+ setAutoCenter(true);
+ setShowResizer(true);
+ setCanDragResize(true);
+ centerInPage();
+ addCloseClickHandler(new CloseClickHandler() {
+ public void onCloseClick(CloseClientEvent event) {
+ markForDestroy();
+ }
+ });
+ if (canvas != null) {
+ addItem(canvas);
+ }
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 8203361..20e5bf1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -40,12 +40,17 @@ import com.smartgwt.client.widgets.tree.TreeNode;
import com.smartgwt.client.widgets.tree.events.NodeContextClickEvent;
import com.smartgwt.client.widgets.tree.events.NodeContextClickHandler;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftConfigurationDefinition;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.PopupWindow;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.configuration.ConfigurationEditor;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
@@ -230,9 +235,42 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
});
contextMenu.addItem(deleteItem);
+ // item that shows the drift configuration
+ MenuItem configItem = new MenuItem(MSG.view_drift_changeset_tree_showConfiguration());
+ configItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ showDriftConfiguration(node.getChangeSetId());
+ }
+ });
+ contextMenu.addItem(configItem);
+
return contextMenu;
}
+ protected void showDriftConfiguration(final String changeSetId) {
+ ConfigurationDefinition def = DriftConfigurationDefinition.getInstance();
+ Configuration config = new Configuration();
+ ConfigurationEditor editor = new ConfigurationEditor(extendLocatorId("driftConfigEditor"), def, config);
+ editor.setReadOnly(true);
+ PopupWindow window = new PopupWindow("details", editor);
+ window.show();
+
+ // DriftChangeSetCriteria criteria = new BasicDriftChangeSetCriteria();
+ // criteria.addFilterId(changeSetId);
+ // criteria.fetchDriftConfiguration(true);
+ // GWTServiceLookup.getDriftService().findDriftChangeSetCompositesByCriteria(criteria,
+ // new AsyncCallback<PageList<DriftChangeSet>>() {
+ // public void onSuccess(PageList<DriftChangeSet> result) {
+ // // TODO
+ // }
+ //
+ // public void onFailure(Throwable t) {
+ // CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadConfigFailure(changeSetId),
+ // t);
+ // }
+ // });
+ }
+
/**
* We override this because we know all of our nodes will have titles. Without this,
* I could not get the title of change set nodes to show - it always fell back to using
@@ -248,11 +286,23 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
static class ChangeSetTreeNode extends TreeNode {
public ChangeSetTreeNode(DriftChangeSet changeset) {
setIsFolder(true);
- setIcon("subsystems/drift/ChangeSet_16.png");
setShowOpenIcon(true);
setID(changeset.getId());
setName(padWithZeroes(changeset.getVersion())); // we sort on this column, hence we make sure the version # is padded
setTitle(buildDriftChangeSetNodeName(changeset));
+
+ switch (changeset.getCategory()) {
+ case COVERAGE:
+ setIcon("subsystems/drift/ChangeSet_Coverage_16.png");
+ break;
+ case DRIFT:
+ setIcon("subsystems/drift/ChangeSet_16.png");
+ break;
+ }
+ }
+
+ public String getChangeSetId() {
+ return getAttribute("id");
}
private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
@@ -263,7 +313,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
str.append(" (");
str.append(TimestampCellFormatter.format(changeset.getCtime(),
TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
- str.append(')');
+ str.append(")");
return str.toString();
}
@@ -285,6 +335,11 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setParentID(parentID);
setID(parentID + '_' + drift.getId());
setName(drift.getPath()); // we sort on this column
+ setAttribute("driftId", drift.getId());
+ }
+
+ public String getDriftId() {
+ return getAttribute("driftId");
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index 0d59be8..8a6c448 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -63,6 +63,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
*/
public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria> {
+ public static final String CATEGORY_ICON_NEW = ImageManager.getDriftCategoryIcon(null);
public static final String CATEGORY_ICON_ADD = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_ADDED);
public static final String CATEGORY_ICON_CHANGE = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_CHANGED);
public static final String CATEGORY_ICON_REMOVE = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_REMOVED);
@@ -121,6 +122,8 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
return MSG.view_drift_category_fileChanged();
} else if (CATEGORY_ICON_REMOVE.equals(cat)) {
return MSG.view_drift_category_fileRemoved();
+ } else if (CATEGORY_ICON_NEW.equals(cat)) {
+ return MSG.view_drift_category_fileNew();
} else {
return ""; // will never get here
}
@@ -304,7 +307,14 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
Drift drift = from.getDrift();
record.setAttribute(ATTR_ID, drift.getId());
record.setAttribute(ATTR_CTIME, new Date(drift.getCtime()));
- record.setAttribute(ATTR_CATEGORY, ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ switch (drift.getChangeSet().getCategory()) {
+ case COVERAGE:
+ record.setAttribute(ATTR_CATEGORY, ImageManager.getDriftCategoryIcon(null));
+ break;
+ case DRIFT:
+ record.setAttribute(ATTR_CATEGORY, ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ break;
+ }
record.setAttribute(ATTR_PATH, drift.getPath());
record.setAttribute(ATTR_CHANGESET_VERSION, drift.getChangeSet().getVersion());
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index ea8c956..0ba3347 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1120,10 +1120,13 @@ view_drift = Drift
view_drift_button_detectNow = Detect Now
view_drift_category_fileAdded = File Added
view_drift_category_fileChanged = File Changed
+view_drift_category_fileNew = New Detection
view_drift_category_fileRemoved = File Removed
view_drift_changeSets = Change Sets
view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+view_drift_changeset_tree_loadConfigFailure = Failed to load drift configuration for change set id [{0}]
view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
+view_drift_changeset_tree_showConfiguration = Show Configuration
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index a07568a..977f4a4 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -938,10 +938,13 @@ view_dashboards_title = Dashboard
##view_drift_button_detectNow = Detect Now
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
+##view_drift_category_fileNew = New Detection
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadConfigFailure = Failed to load drift configuration for change set id [{0}]
##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
+##view_drift_changeset_tree_showConfiguration = Show Configuration
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6e68cff..6af4be0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1104,9 +1104,12 @@ view_dashboards_portlets_refresh_success1 = ポートレットの自動リフレ
view_dashboards_portlets_refresh_success2 = 自動リフレッシュするポートレットのリロードを停止しています
view_dashboards_title = ダッシュボード
##view_drift = Drift
+##view_drift_category_fileNew = New Detection
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadConfigFailure = Failed to load drift configuration for change set id [{0}]
##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
+##view_drift_changeset_tree_showConfiguration = Show Configuration
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index fa86006..0d1e7c9 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1138,10 +1138,13 @@ view_dashboards_title = Dashboard~
##view_drift_button_detectNow = Detect Now
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
+##view_drift_category_fileNew = New Detection
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadConfigFailure = Failed to load drift configuration for change set id [{0}]
##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
+##view_drift_changeset_tree_showConfiguration = Show Configuration
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 79816c5..a6c6880 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1113,9 +1113,12 @@ view_dashboards_portlets_refresh_success1 = \u6210\u529f\u4fee\u6539portlets\u81
view_dashboards_portlets_refresh_success2 = \u6210\u529f\u505c\u7528portlets\u81ea\u52a8\u5237\u65b0\u7684\u91cd\u8f7d
view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
+##view_drift_category_fileNew = New Detection
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadConfigFailure = Failed to load drift configuration for change set id [{0}]
##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
+##view_drift_changeset_tree_showConfiguration = Show Configuration
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16.png
new file mode 100644
index 0000000..7ae8f52
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16_open.png
new file mode 100644
index 0000000..85e3cf4
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_Coverage_16_open.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/Drift_new_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/Drift_new_16.png
new file mode 100644
index 0000000..e3e4f97
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/Drift_new_16.png differ
commit 5a81800b803be0d83ebc18a91f763ad43d364b70
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 1 15:23:33 2011 -0400
temporarily disabling test until mongodb server is available with hudson builds
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
index cfdc802..ac20ac4 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
@@ -45,7 +45,7 @@ public class MongoDBChangeSetTest {
ds.delete(deleteAll);
}
- @Test
+ @Test(enabled = false)
public void saveAndLoadEmptyChangeSet() throws Exception {
MongoDBChangeSet expected = new MongoDBChangeSet();
expected.setCategory(COVERAGE);
@@ -59,7 +59,7 @@ public class MongoDBChangeSetTest {
assertPropertiesMatch("Failed to save change set", expected, actual);
}
- @Test
+ @Test(enabled = false)
public void saveAndLoadChangeSetWithOneEntry() throws Exception {
MongoDBChangeSet expected = new MongoDBChangeSet();
expected.setResourceId(10001);
@@ -75,7 +75,7 @@ public class MongoDBChangeSetTest {
"changeSet");
}
- @Test
+ @Test(enabled = false)
public void saveAndFindChangeSetById() throws Exception {
MongoDBChangeSet expected = new MongoDBChangeSet();
expected.setCategory(COVERAGE);
commit 26bfa2034a6306ed941d6a1fd5f26840e32eef84
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 1 15:17:18 2011 -0400
Add config id to drift change set criteria
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
index 2debece..ba46bc2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
@@ -22,6 +22,8 @@ public class BasicDriftChangeSetCriteria implements DriftChangeSetCriteria {
private Integer filterResourceId;
+ private Integer filterDriftConfigId;
+
private DriftChangeSetCategory filterCategory;
private boolean fetchDrifts;
@@ -101,6 +103,16 @@ public class BasicDriftChangeSetCriteria implements DriftChangeSetCriteria {
}
@Override
+ public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
+ this.filterDriftConfigId = filterDriftConfigId;
+ }
+
+ @Override
+ public Integer getFilterDriftConfigurationId() {
+ return filterDriftConfigId;
+ }
+
+ @Override
public void addFilterCategory(DriftChangeSetCategory filterCategory) {
this.filterCategory = filterCategory;
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index b5f71b2..273db4b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -35,6 +35,10 @@ public interface DriftChangeSetCriteria extends BaseCriteria, Serializable {
Integer getFilterResourceId();
+ void addFilterDriftConfigurationId(Integer filterDriftConfigId);
+
+ Integer getFilterDriftConfigurationId();
+
void addFilterCategory(DriftChangeSetCategory filterCategory);
DriftChangeSetCategory getFilterCategory();
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
index 7a7f78f..0ca1d36 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
@@ -39,6 +39,7 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
private Integer filterId;
private Integer filterInitial; // needs override
private Integer filterResourceId; // needs override
+ private Integer filterDriftConfigurationId;
private Integer filterVersion;
private Integer filterStartVersion;
private Integer filterEndVersion;
@@ -138,6 +139,16 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
return filterResourceId;
}
+ @Override
+ public void addFilterDriftConfigurationId(Integer filterDriftConfigId) {
+ this.filterDriftConfigurationId = filterDriftConfigId;
+ }
+
+ @Override
+ public Integer getFilterDriftConfigurationId() {
+ return filterDriftConfigurationId;
+ }
+
public void addFilterCategory(DriftChangeSetCategory filterCategory) {
this.filterCategory = filterCategory;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 8e4d1f7..0479c4a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -147,11 +147,6 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
try {
- DriftChangeSetJPACriteria c = new DriftChangeSetJPACriteria();
- c.addFilterResourceId(resourceId);
- List<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), c);
- final int version = changeSets.size();
-
ZipUtil.walkZipFile(changeSetZip, new ChangeSetFileVisitor() {
@Override
@@ -165,6 +160,8 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
// store the new change set info (not the actual blob)
DriftConfiguration config = findDriftConfiguration(resource, reader.getHeaders());
+ int version = getChangeSetVersion(resource, config);
+
if (config == null) {
log.error("Unable to locate " + config.getClass().getSimpleName() + "[id: " +
config.getId() + ", name: " + config.getName() + "]. Change set cannot be saved.");
@@ -240,6 +237,24 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
}
+ /**
+ * This method only exists temporarily until the version header is added to the change
+ * set meta data file. This method determines the version by looking at the number of
+ * change sets in the database.
+ *
+ * @param r The resource
+ * @param c The drift configuration
+ * @return The next change set version number
+ */
+ int getChangeSetVersion(Resource r, DriftConfiguration c) {
+ DriftChangeSetJPACriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addFilterResourceId(r.getId());
+ criteria.addFilterDriftConfigurationId(c.getId());
+ List<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), criteria);
+
+ return changeSets.size();
+ }
+
DriftConfiguration findDriftConfiguration(Resource resource, Headers headers) {
for (Configuration config : resource.getDriftConfigurations()) {
DriftConfiguration driftConfig = new DriftConfiguration(config);
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 1755d3e..c2520d5 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -111,6 +111,7 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
DriftChangeSetJPACriteria jpaCriteria = new DriftChangeSetJPACriteria();
jpaCriteria.addFilterId(criteria.getFilterId());
jpaCriteria.addFilterResourceId(criteria.getFilterResourceId());
+ jpaCriteria.addFilterDriftConfigurationId(criteria.getFilterDriftConfigurationId());
jpaCriteria.addFilterCategory(criteria.getFilterCategory());
jpaCriteria.addFilterCreatedAfter(criteria.getFilterCreatedAfter());
jpaCriteria.addFilterCreatedBefore(criteria.getFilterCreatedBefore());
commit 608dffc9a54c653d6c27b560730fe939d72a0a0e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jul 29 17:20:11 2011 -0400
[BZ-726508 - Can't create alert condition on certain metrics]
Since metric def names may not be unique, they are duplicated
for the 'Per Minute' version of certain metrics, don't use them
for the value map keys in alert def drop downs.
- Also, some of these metric name lists are long, sort the
menu entries.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
index 2fd9400..44875d8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
@@ -24,9 +24,11 @@
package org.rhq.enterprise.gui.coregui.client.alert.definitions;
import java.util.ArrayList;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Set;
+import java.util.TreeSet;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.form.DynamicForm;
@@ -572,7 +574,7 @@ public class NewConditionEditor extends LocatableDynamicForm {
LinkedHashMap<String, String> traitsMap = new LinkedHashMap<String, String>();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
if (def.getDataType() == DataType.TRAIT) {
- traitsMap.put(def.getName(), def.getDisplayName());
+ traitsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
@@ -703,10 +705,21 @@ public class NewConditionEditor extends LocatableDynamicForm {
private SelectItem buildMetricDropDownMenu(String itemName, boolean dynamicOnly, FormItemIfFunction ifFunc) {
LinkedHashMap<String, String> metricsMap = new LinkedHashMap<String, String>();
- for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
+ TreeSet<MeasurementDefinition> sortedDefs = new TreeSet<MeasurementDefinition>(
+ new Comparator<MeasurementDefinition>() {
+
+ @Override
+ public int compare(MeasurementDefinition o1, MeasurementDefinition o2) {
+ return o1.getDisplayName().compareTo(o2.getDisplayName());
+ }
+ });
+ sortedDefs.addAll(this.resourceType.getMetricDefinitions());
+
+ for (MeasurementDefinition def : sortedDefs) {
if (def.getDataType() == DataType.MEASUREMENT) {
if (!dynamicOnly || def.getNumericType() == NumericType.DYNAMIC) {
- metricsMap.put(def.getName(), def.getDisplayName());
+ // use id as opposed to name for key, the name is not unique when per-minute metric is also used
+ metricsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
}
@@ -726,7 +739,7 @@ public class NewConditionEditor extends LocatableDynamicForm {
LinkedHashMap<String, String> metricsMap = new LinkedHashMap<String, String>();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
if (def.getDataType() == DataType.CALLTIME) {
- metricsMap.put(def.getName(), def.getDisplayName());
+ metricsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
@@ -790,9 +803,10 @@ public class NewConditionEditor extends LocatableDynamicForm {
return help;
}
- private MeasurementDefinition getMeasurementDefinition(String metricName) {
+ private MeasurementDefinition getMeasurementDefinition(String metricId) {
+ int id = Integer.valueOf(metricId).intValue();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
- if (metricName.equals(def.getName())) {
+ if (id == def.getId()) {
return def;
}
}
commit db8e0a195c7ef54dca2d137933d9f52b2bac9539
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jul 29 13:28:33 2011 -0400
[BZ-726714 - Metric template creation generates NPE (null pointer exception)]
Fix a problem when trying to apply a metric template to a resource in a
"hidden" state like UNINVENTORIED.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
index 98110ac..03cd4bb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
@@ -498,6 +498,17 @@ public class MeasurementScheduleManagerBean implements MeasurementScheduleManage
for (Integer resourceId : reqMap.keySet()) {
Agent agent = agentManager.getAgentByResourceId(subjectManager.getOverlord(), resourceId);
+ // Ignore resources that are not actually associated with an agent. For example,
+ // those with an UNINVENTORIED status.
+ if (null == agent) {
+ if (log.isDebugEnabled()) {
+ log.debug("Ignoring measurement schedule change for non-agent-related resource ["
+ + resourceId + "]. It is probably waiting to be uninventoried.");
+ }
+
+ continue;
+ }
+
Set<ResourceMeasurementScheduleRequest> agentUpdate = agentUpdates.get(agent);
if (agentUpdate == null) {
agentUpdate = new HashSet<ResourceMeasurementScheduleRequest>();
commit ff805de329d0aacfc2a9345987a1274a4e4d8930
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 16:54:51 2011 -0400
Adding a drift template
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 21161fe..4cf5b2d 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -1191,6 +1191,18 @@
</configuration>
</content>
+ <drift-configuration name="Core Files">
+ <basedir>
+ <value-context>pluginConfiguration</value-context>
+ <value-name>jbossHomeDir</value-name>
+ </basedir>
+ <includes>
+ <include path="bin" />
+ <include path="lib" />
+ <include path="client" />
+ </includes>
+ </drift-configuration>
+
<bundle-target>
<destination-base-dir name="Install Directory" description="The top directory where the JBossAS Server is installed. (i.e. the value found in the 'JBoss Home Directory' connection property)">
<value-context>pluginConfiguration</value-context>
commit f7da51617e05e16c33791a92907e359c201e18ee
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 29 16:48:16 2011 -0400
emit a warning if the query returns us too much stuff
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index aee99cf..c51806a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -35,6 +35,8 @@ import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
@@ -64,6 +66,12 @@ public class DriftDetailsView extends LocatableVLayout {
GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
@Override
public void onSuccess(PageList<Drift> result) {
+ if (result.getTotalSize() != 1) {
+ CoreGUI.getMessageCenter().notify(
+ new Message("Got [" + result.getTotalSize()
+ + "] results. Should have been 1. The details shown here might not be correct.",
+ Severity.Warning));
+ }
Drift drift = result.get(0);
show(drift);
}
@@ -78,6 +86,7 @@ public class DriftDetailsView extends LocatableVLayout {
private void show(Drift drift) {
for (Canvas child : getMembers()) {
removeMember(child);
+ child.destroy();
}
// the change set to which the drift belongs
commit b7c8d2f78a437a375f250d38de47dc08aa0e633c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 29 16:18:20 2011 -0400
make sure the URL id is prefexed with 0id_ so CoreGUI knows this is an ID
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
index 378350d..646c32f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
@@ -25,6 +25,7 @@ package org.rhq.enterprise.gui.coregui.client;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.enterprise.gui.coregui.client.admin.roles.RolesView;
import org.rhq.enterprise.gui.coregui.client.admin.users.UsersView;
+import org.rhq.enterprise.gui.coregui.client.components.table.StringIDTableSection;
/**
* @author Greg Hinkle
@@ -218,14 +219,6 @@ public class LinkManager {
return link;
}
- public static String getSubsystemDriftHistoryLink(int resourceId, String driftId) {
- return "#Resource/" + resourceId + "/Drift/History/" + driftId;
- }
-
- public static String getSubsystemDriftConfigLink(int resourceId, int driftConfigId) {
- return "#Resource/" + resourceId + "/Drift/Config/" + driftConfigId;
- }
-
public static String getAutodiscoveryQueueLink() {
if (GWT) {
return "#Administration/Security/Auto%20Discovery%20Queue";
@@ -459,7 +452,14 @@ public class LinkManager {
return "#Bundles/Bundle/" + bundleId + "/deployments/" + bundleDeploymentId;
}
- public static String getDriftHistoryLink(int resourceId, int driftId) {
+ public static String getDriftHistoryLink(int resourceId, String driftId) {
+ if (!driftId.startsWith(StringIDTableSection.ID_PREFIX)) {
+ driftId = StringIDTableSection.ID_PREFIX + driftId;
+ }
return "#Resource/" + resourceId + "/Drift/History/" + driftId;
}
+
+ public static String getDriftConfigLink(int resourceId, int driftConfigId) {
+ return "#Resource/" + resourceId + "/Drift/Config/" + driftConfigId;
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java
index c4118af..1c5a333 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java
@@ -93,7 +93,7 @@ public abstract class StringIDTableSection<DS extends RPCDataSource> extends Abs
@Override
public void showDetails(String id) {
if (id != null && id.length() > 0) {
- History.newItem(getBasePath() + "/" + id);
+ History.newItem(getBasePath() + "/" + convertIDToCurrentViewPath(id));
} else {
String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), (id == null) ? "null" : id
.toString());
@@ -105,18 +105,24 @@ public abstract class StringIDTableSection<DS extends RPCDataSource> extends Abs
@Override
public abstract Canvas getDetailsView(String id);
- private static final String ID_PREFIX = "0id_"; // the prefix to be placed in front of the string IDs in URLs
+ // the main CoreGUI class will assume anything with a digit as the first character in a path segment in the URL is an ID.
+ public static final String ID_PREFIX = "0id_"; // the prefix to be placed in front of the string IDs in URLs
@Override
protected String convertCurrentViewPathToID(String path) {
+ if (!path.startsWith(ID_PREFIX)) {
+ return path; // prefixed has already been stripped
+ }
return path.substring(ID_PREFIX.length()); // skip the initial "0id_" - see convertIDToCurrentViewPath for what this is all about
}
@Override
protected String convertIDToCurrentViewPath(String id) {
- // the main CoreGUI class will assume anything with a digit as the first character in a path segment in the URL
- // is an ID. Because we aren't assured the given ID will be a digit, let's prepend the digit here and make it
+ // Because we aren't assured the given ID will be a digit, let's prepend the digit here and make it
// look like an ID to CoreGUI. We will strip this off when we convert this back to an ID - see convertCurrentViewPathToID
+ if (id.startsWith(ID_PREFIX)) {
+ return id; // it is already prefixed
+ }
return ID_PREFIX + id;
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 6f4bbf2..aee99cf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -20,6 +20,8 @@
package org.rhq.enterprise.gui.coregui.client.drift;
+import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
+
import java.util.LinkedHashMap;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -30,34 +32,29 @@ import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import org.rhq.core.domain.criteria.BasicDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
-
/**
* @author Jay Shaughnessy
*/
-public class DriftDetailsView extends LocatableVLayout implements BookmarkableView {
+public class DriftDetailsView extends LocatableVLayout {
private String driftId;
- private static DriftDetailsView INSTANCE = new DriftDetailsView("DriftDetailsView");
-
- public static DriftDetailsView getInstance() {
- return INSTANCE;
+ public DriftDetailsView(String locatorId, String driftId) {
+ super(locatorId);
+ this.driftId = driftId;
+ setMembersMargin(10);
}
- private DriftDetailsView(String id) {
- // access through the static singleton only (see renderView)
- super(id);
-
- setMembersMargin(10);
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+ show(this.driftId);
}
private void show(String driftId) {
@@ -80,7 +77,7 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
private void show(Drift drift) {
for (Canvas child : getMembers()) {
- removeChild(child);
+ removeMember(child);
}
// the change set to which the drift belongs
@@ -157,11 +154,4 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
addMember(driftForm);
}
-
- @Override
- public void renderView(ViewPath viewPath) {
- driftId = viewPath.getCurrent().getPath();
- show(driftId);
- }
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
index 060c9d1..cf42485 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
@@ -156,7 +156,7 @@ public class DriftHistoryView extends StringIDTableSection<DriftDataSource> {
public String format(Object value, ListGridRecord record, int i, int i1) {
Integer resourceId = record.getAttributeAsInt(AncestryUtil.RESOURCE_ID);
String driftId = getId(record);
- String url = LinkManager.getSubsystemDriftHistoryLink(resourceId, driftId);
+ String url = LinkManager.getDriftHistoryLink(resourceId, driftId);
String formattedValue = TimestampCellFormatter.format(value);
return SeleniumUtility.getLocatableHref(url, formattedValue, null);
}
@@ -285,7 +285,7 @@ public class DriftHistoryView extends StringIDTableSection<DriftDataSource> {
@Override
public Canvas getDetailsView(String driftId) {
- return DriftDetailsView.getInstance();
+ return new DriftDetailsView(extendLocatorId("Details"), driftId);
}
public EntityContext getContext() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index 3ee0b5f..51f2ec2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -47,7 +47,7 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
protected String getNodeTargetLink(TreeNode node) {
if (node instanceof DriftTreeNode) {
String driftIdStr = node.getAttribute(AbstractDriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
- String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, driftIdStr);
return path;
}
return null;
commit 385db545221d5aa7bcbdca6abc23b3ffbb294d70
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 29 15:13:29 2011 -0400
factor TableSection to support string IDs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 85f5e92..1c52477 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -53,8 +53,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceT
import org.rhq.enterprise.gui.coregui.client.menu.MenuBarView;
import org.rhq.enterprise.gui.coregui.client.report.ReportTopView;
import org.rhq.enterprise.gui.coregui.client.report.tag.TaggedView;
-import org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestDataSourceResponseStatisticsView;
+import org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestTopView;
import org.rhq.enterprise.gui.coregui.client.util.ErrorHandler;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -383,6 +383,11 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
} else {
if (view.matches(TREE_NAV_VIEW_PATTERN)) {
// e.g. "Resource/10001" or "Resource/AutoGroup/10003"
+ // TODO: need to support string IDs "Drift/History/0id_abcdefghijk"
+ // TODO: see StringIDTableSection.ID_PREFIX
+ // TODO: remember \D is a non-digit, and \d is a digit
+ // TODO: String suffix = currentViewPath.replaceFirst("\\D*[^/]*", ""); // this might be OK if 0id_ starts with a digit
+ // TODO: suffix = suffix.replaceFirst("((\\d.*)|(0id_[^/]*))", "");
if (!currentViewPath.startsWith(view)) {
// The Node that was selected is not the same Node that was previously selected - it
// may not even be the same node type. For example, the user could have moved from a
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
index 115d4a8..bfa9ae6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
@@ -26,9 +26,9 @@ import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-
import com.smartgwt.client.widgets.grid.events.CellClickEvent;
import com.smartgwt.client.widgets.grid.events.CellClickHandler;
+
import org.rhq.core.domain.authz.Permission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
@@ -85,7 +85,7 @@ public class RolesView extends TableSection<RolesDataSource> implements Bookmark
addTableAction(extendLocatorId("New"), MSG.common_button_new(), createNewAction());
addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(), getDeleteConfirmMessage(),
- createDeleteAction());
+ createDeleteAction());
super.configureTable();
}
@@ -184,7 +184,7 @@ public class RolesView extends TableSection<RolesDataSource> implements Bookmark
}
@Override
- public Canvas getDetailsView(int roleId) {
+ public Canvas getDetailsView(Integer roleId) {
return new RoleEditView(extendLocatorId("Detail"), roleId);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
index 427b1c2..4fdd6e5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
@@ -26,9 +26,9 @@ import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-
import com.smartgwt.client.widgets.grid.events.CellClickEvent;
import com.smartgwt.client.widgets.grid.events.CellClickHandler;
+
import org.rhq.core.domain.authz.Permission;
import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
import org.rhq.enterprise.gui.coregui.client.PermissionsLoader;
@@ -211,7 +211,8 @@ public class UsersView extends TableSection<UsersDataSource> {
};
}
- public Canvas getDetailsView(int subjectId) {
+ @Override
+ public Canvas getDetailsView(Integer subjectId) {
return new UserEditView(extendLocatorId("Detail"), subjectId);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
index 45dd32c..3fa6202 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
@@ -277,7 +277,7 @@ public class AlertHistoryView extends TableSection<AlertDataSource> {
}
@Override
- public Canvas getDetailsView(int alertId) {
+ public Canvas getDetailsView(Integer alertId) {
return AlertDetailsView.getInstance();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/AbstractAlertDefinitionsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/AbstractAlertDefinitionsView.java
index c49fc4f..7f2cce0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/AbstractAlertDefinitionsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/AbstractAlertDefinitionsView.java
@@ -134,7 +134,7 @@ public abstract class AbstractAlertDefinitionsView extends TableSection<Abstract
}
@Override
- public SingleAlertDefinitionView getDetailsView(final int id) {
+ public SingleAlertDefinitionView getDetailsView(final Integer id) {
final SingleAlertDefinitionView singleAlertDefinitionView = new SingleAlertDefinitionView(this
.extendLocatorId("singleAlertDefinitionView"), this);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/GroupAlertDefinitionsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/GroupAlertDefinitionsView.java
index 9fa9c31..fc0dbb1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/GroupAlertDefinitionsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/GroupAlertDefinitionsView.java
@@ -93,7 +93,7 @@ public class GroupAlertDefinitionsView extends AbstractAlertDefinitionsView {
}
@Override
- public SingleAlertDefinitionView getDetailsView(int id) {
+ public SingleAlertDefinitionView getDetailsView(Integer id) {
SingleAlertDefinitionView view = super.getDetailsView(id);
if (id == 0) {
// when creating a new alert def, make sure to set this in the new alert def
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
index ea41bc2..e31e554 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ResourceAlertDefinitionsView.java
@@ -93,7 +93,7 @@ public class ResourceAlertDefinitionsView extends AbstractAlertDefinitionsView {
}
@Override
- public SingleAlertDefinitionView getDetailsView(int id) {
+ public SingleAlertDefinitionView getDetailsView(Integer id) {
SingleAlertDefinitionView view = super.getDetailsView(id);
if (id == 0) {
// when creating a new alert def, make sure to set this in the new alert def
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/TemplateAlertDefinitionsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/TemplateAlertDefinitionsView.java
index 688dea4..755c8d7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/TemplateAlertDefinitionsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/TemplateAlertDefinitionsView.java
@@ -100,7 +100,7 @@ public class TemplateAlertDefinitionsView extends AbstractAlertDefinitionsView {
}
@Override
- public SingleAlertDefinitionView getDetailsView(int id) {
+ public SingleAlertDefinitionView getDetailsView(Integer id) {
SingleAlertDefinitionView view = super.getDetailsView(id);
if (id == 0) {
// when creating a new alert def, make sure to set this in the new alert def
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
index df8a406..7178269 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
@@ -39,7 +39,6 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.DetailsView;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.buttons.BackButton;
@@ -49,10 +48,16 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
+ * Provides the typical table view with the additional ability of traversing to a "details" view
+ * when double-clicking a individual row in the table - a masters/detail view in effect.
+ *
+ * @param <DS> the datasource used to obtain data for the table
+ * @param <ID> the type used for IDs. This identifies the type used to uniquely refer to a row in the table
+ *
* @author Greg Hinkle
* @author John Mazzitelli
*/
-public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> implements BookmarkableView {
+public abstract class AbstractTableSection<DS extends RPCDataSource, ID> extends Table<DS> implements BookmarkableView {
private VLayout detailsHolder;
private Canvas detailsView;
@@ -60,38 +65,39 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
private boolean escapeHtmlInDetailsLinkColumn;
private boolean initialDisplay;
- protected TableSection(String locatorId, String tableTitle) {
+ protected AbstractTableSection(String locatorId, String tableTitle) {
super(locatorId, tableTitle);
}
- protected TableSection(String locatorId, String tableTitle, Criteria criteria) {
+ protected AbstractTableSection(String locatorId, String tableTitle, Criteria criteria) {
super(locatorId, tableTitle, criteria);
}
- protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
+ protected AbstractTableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
super(locatorId, tableTitle, sortSpecifiers);
}
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
+ protected AbstractTableSection(String locatorId, String tableTitle, Criteria criteria,
+ SortSpecifier[] sortSpecifiers) {
super(locatorId, tableTitle, sortSpecifiers, criteria);
}
- protected TableSection(String locatorId, String tableTitle, boolean autoFetchData) {
+ protected AbstractTableSection(String locatorId, String tableTitle, boolean autoFetchData) {
super(locatorId, tableTitle, autoFetchData);
}
- protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
+ protected AbstractTableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
String[] excludedFieldNames) {
super(locatorId, tableTitle, null, sortSpecifiers, excludedFieldNames);
}
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
- String[] excludedFieldNames) {
+ protected AbstractTableSection(String locatorId, String tableTitle, Criteria criteria,
+ SortSpecifier[] sortSpecifiers, String[] excludedFieldNames) {
super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
}
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
- String[] excludedFieldNames, boolean autoFetchData) {
+ protected AbstractTableSection(String locatorId, String tableTitle, Criteria criteria,
+ SortSpecifier[] sortSpecifiers, String[] excludedFieldNames, boolean autoFetchData) {
super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
}
@@ -177,8 +183,8 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
if (value == null) {
return "";
}
- Integer recordId = getId(record);
- String detailsUrl = "#" + getBasePath() + "/" + recordId;
+ ID recordId = getId(record);
+ String detailsUrl = "#" + getBasePath() + "/" + convertIDToCurrentViewPath(recordId);
String formattedValue = (escapeHtmlInDetailsLinkColumn) ? StringUtility.escapeHtml(value.toString())
: value.toString();
return SeleniumUtility.getLocatableHref(detailsUrl, formattedValue, null);
@@ -190,7 +196,7 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
* Shows the details view for the given record of the table.
*
* The default implementation of this method assumes there is an
- * id attribute on the record and passes it to {@link #showDetails(int)}.
+ * id attribute on the record and passes it to {@link #showDetails(Object)}.
* Subclasses are free to override this behavior. Subclasses usually
* will need to set the {@link #setDetailsView(Canvas) details view}
* explicitly.
@@ -202,7 +208,7 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
throw new IllegalArgumentException("'record' parameter is null.");
}
- Integer id = getId(record);
+ ID id = getId(record);
showDetails(id);
}
@@ -210,7 +216,7 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
* Returns the details canvas with information on the item given its list grid record.
*
* The default implementation of this method is to assume there is an
- * id attribute on the record and pass that ID to {@link #getDetailsView(int)}.
+ * id attribute on the record and pass that ID to {@link #getDetailsView(Object)}.
* Subclasses are free to override this - which you usually want to do
* if you know the full details of the item are stored in the record attributes
* and thus help avoid making a round trip to the DB.
@@ -218,66 +224,76 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
* @param record the record of the item whose details to be shown; ; null if empty details view should be shown.
*/
public Canvas getDetailsView(ListGridRecord record) {
- Integer id = getId(record);
+ ID id = getId(record);
return getDetailsView(id);
}
- protected Integer getId(ListGridRecord record) {
- Integer id = (record != null) ? record.getAttributeAsInt("id") : 0;
- if (id == null) {
- String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
- CoreGUI.getErrorHandler().handleError(msg);
- throw new IllegalStateException(msg);
- }
- return id;
- }
+ /**
+ * Subclasses define how they want to format their identifiers. These uniquely identify
+ * rows in the table. Typical values/types for IDs are Integers or Strings.
+ *
+ * @param record the individual record that contains the ID to be extracted and returned
+ *
+ * @return the ID of the given row/record from the table.
+ */
+ protected abstract ID getId(ListGridRecord record);
/**
* Shows empty details for a new item being created.
* This method is usually called when a user clicks a 'New' button.
*
+ * Subclasses are free to override this if they need a custom way to show the details view.
+ *
* @see #showDetails(ListGridRecord)
*/
public void newDetails() {
- History.newItem(basePath + "/0");
+ History.newItem(basePath + "/0"); // assumes the subclasses will understand "0" means "new details page"
}
/**
- * Shows the details for an item has the given ID.
+ * Shows the details for an item that has the given ID.
* This method is usually called when a user goes to the details
* page via a bookmark, double-cick on a list view row, or direct link.
*
- * @param id the id of the row whose details are to be shown; Should be a valid id, > 0.
+ * @param id the id of the row whose details are to be shown; Must be a valid ID.
*
* @see #showDetails(ListGridRecord)
*
- * @throws IllegalArgumentException if id <= 0.
+ * @throws IllegalArgumentException if id is invalid
*/
- public void showDetails(int id) {
- if (id > 0) {
- History.newItem(basePath + "/" + id);
- } else {
- String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), Integer.toString(id));
- CoreGUI.getErrorHandler().handleError(msg);
- throw new IllegalArgumentException(msg);
- }
- }
+ public abstract void showDetails(ID id);
/**
* Returns the details canvas with information on the item that has the given ID.
* Note that an empty details view should be returned if the id passed in is 0 (as would
* be the case if a new item is to be created using the details view).
*
- * @param id the id of the details to be shown; will be 0 if an empty details view should be shown.
+ * @param id the id of the details to be shown; will be "0" if an empty details view should be shown.
+ */
+ public abstract Canvas getDetailsView(ID id);
+
+ /**
+ * Given the path from the URL that identifies the ID, this returns the ID represented by that path string.
+ * @param path the path as it was found in the current view path (i.e. in the URL)
+ * @return the ID that identifies the item referred to by the URL
+ */
+ protected abstract ID convertCurrentViewPathToID(String path);
+
+ /**
+ * Given the ID of a particular item, this returns a path string suitable for placement in a URL such that that URL will
+ * identify the particular item.
+ *
+ * @return how the ID can be represented within a view path (i.e. in a URL)
+ * @param id the ID that identifies the item to be referred by in a URL
*/
- public abstract Canvas getDetailsView(int id);
+ protected abstract String convertIDToCurrentViewPath(ID id);
@Override
public void renderView(ViewPath viewPath) {
this.basePath = viewPath.getPathToCurrent();
if (!viewPath.isEnd()) {
- int id = Integer.parseInt(viewPath.getCurrent().getPath());
+ ID id = convertCurrentViewPathToID(viewPath.getCurrent().getPath());
this.detailsView = getDetailsView(id);
if (this.detailsView instanceof BookmarkableView) {
((BookmarkableView) this.detailsView).renderView(viewPath);
@@ -325,7 +341,7 @@ public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> i
* detailsView in edit-mode, the content canvas will already be hidden, which means the
* animateHide would be a no-op (the event won't fire). this causes the detailsHolder
* to keep a reference to the previous detailsView (the one in create-mode) instead of the
- * newly returned reference from getDetailsView(int) that was called when the renderView
+ * newly returned reference from getDetailsView(ID) that was called when the renderView
* methods were called hierarchically down to render the new detailsView in edit-mode.
* therefore, we need to explicitly destroy what's already there (presumably the detailsView
* in create-mode), and then rebuild it (presumably the detailsView in edit-mode).
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java
new file mode 100644
index 0000000..c4118af
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/StringIDTableSection.java
@@ -0,0 +1,122 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.components.table;
+
+import com.google.gwt.user.client.History;
+import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.SortSpecifier;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * The TableSection abstract implementation that supports IDs as basic Strings.
+ *
+ * Use this if you have tabular data whose rows are not identified with Integers but
+ * some other non-numeric string.
+ *
+ * If you have tabular data whose rows have integer IDs, use {@link TableSection}.
+ *
+ * @author John Mazzitelli
+ */
+public abstract class StringIDTableSection<DS extends RPCDataSource> extends AbstractTableSection<DS, String> {
+
+ public StringIDTableSection(String locatorId, String tableTitle, boolean autoFetchData) {
+ super(locatorId, tableTitle, autoFetchData);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames, boolean autoFetchData) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, Criteria criteria) {
+ super(locatorId, tableTitle, criteria);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, sortSpecifiers, excludedFieldNames);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers);
+ }
+
+ public StringIDTableSection(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ }
+
+ @Override
+ protected String getId(ListGridRecord record) {
+ String id = null;
+ if (record != null) {
+ id = record.getAttribute("id");
+ }
+
+ if (id == null || id.length() == 0) {
+ String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalStateException(msg);
+ }
+ return id;
+ }
+
+ @Override
+ public void showDetails(String id) {
+ if (id != null && id.length() > 0) {
+ History.newItem(getBasePath() + "/" + id);
+ } else {
+ String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), (id == null) ? "null" : id
+ .toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalArgumentException(msg);
+ }
+ }
+
+ @Override
+ public abstract Canvas getDetailsView(String id);
+
+ private static final String ID_PREFIX = "0id_"; // the prefix to be placed in front of the string IDs in URLs
+
+ @Override
+ protected String convertCurrentViewPathToID(String path) {
+ return path.substring(ID_PREFIX.length()); // skip the initial "0id_" - see convertIDToCurrentViewPath for what this is all about
+ }
+
+ @Override
+ protected String convertIDToCurrentViewPath(String id) {
+ // the main CoreGUI class will assume anything with a digit as the first character in a path segment in the URL
+ // is an ID. Because we aren't assured the given ID will be a digit, let's prepend the digit here and make it
+ // look like an ID to CoreGUI. We will strip this off when we convert this back to an ID - see convertCurrentViewPathToID
+ return ID_PREFIX + id;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java
new file mode 100644
index 0000000..3eb65c5
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java
@@ -0,0 +1,114 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.components.table;
+
+import com.google.gwt.user.client.History;
+import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.SortSpecifier;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * The TableSection abstract implementation that supports IDs as Integers.
+ *
+ * Since most master/detail table views have Integers for IDs that uniquely identify
+ * rows in the table, this is the typical superclass implementation used for
+ * most of RHQ's concrete TableSection views.
+ *
+ * @author John Mazzitelli
+ */
+public abstract class TableSection<DS extends RPCDataSource> extends AbstractTableSection<DS, Integer> {
+
+ public TableSection(String locatorId, String tableTitle, boolean autoFetchData) {
+ super(locatorId, tableTitle, autoFetchData);
+ }
+
+ public TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames, boolean autoFetchData) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
+ }
+
+ public TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
+ }
+
+ public TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers);
+ }
+
+ public TableSection(String locatorId, String tableTitle, Criteria criteria) {
+ super(locatorId, tableTitle, criteria);
+ }
+
+ public TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers, String[] excludedFieldNames) {
+ super(locatorId, tableTitle, sortSpecifiers, excludedFieldNames);
+ }
+
+ public TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers);
+ }
+
+ public TableSection(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ }
+
+ @Override
+ protected Integer getId(ListGridRecord record) {
+ Integer id = (record != null) ? record.getAttributeAsInt("id") : 0;
+ if (id == null) {
+ String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalStateException(msg);
+ }
+ return id;
+ }
+
+ @Override
+ public void showDetails(Integer id) {
+ if (id != null && id.intValue() > 0) {
+ History.newItem(getBasePath() + "/" + id);
+ } else {
+ String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), (id == null) ? "null" : id
+ .toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalArgumentException(msg);
+ }
+ }
+
+ @Override
+ public abstract Canvas getDetailsView(Integer id);
+
+ @Override
+ protected Integer convertCurrentViewPathToID(String path) {
+ return Integer.valueOf(path);
+ }
+
+ @Override
+ protected String convertIDToCurrentViewPath(Integer id) {
+ if (id == null) {
+ return "0";
+ }
+ return id.toString();
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
index 071e2de..f090bd8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
@@ -226,7 +226,7 @@ public class DriftConfigurationView extends TableSection<DriftConfigurationDataS
}
@Override
- public Canvas getDetailsView(int driftConfigId) {
+ public Canvas getDetailsView(Integer driftConfigId) {
return new DriftConfigurationEditView(extendLocatorId("ConfigEdit"), context, driftConfigId, hasWriteAccess);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
index f00640a..060c9d1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
@@ -42,9 +42,9 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.components.form.EnumSelectItem;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
+import org.rhq.enterprise.gui.coregui.client.components.table.StringIDTableSection;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
-import org.rhq.enterprise.gui.coregui.client.components.table.TableSection2;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -62,7 +62,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
*
* @author Jay Shaughnessy
*/
-public class DriftHistoryView extends TableSection2<DriftDataSource> {
+public class DriftHistoryView extends StringIDTableSection<DriftDataSource> {
public static final ViewName SUBSYSTEM_VIEW_ID = new ViewName("RecentDrifts", MSG.common_title_recent_drifts());
@@ -283,7 +283,6 @@ public class DriftHistoryView extends TableSection2<DriftDataSource> {
// });
// }
-
@Override
public Canvas getDetailsView(String driftId) {
return DriftDetailsView.getInstance();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
index fa623f1..e146f0e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
@@ -211,7 +211,7 @@ public class EventCompositeHistoryView extends TableSection<EventCompositeDataso
}
@Override
- public Canvas getDetailsView(int eventId) {
+ public Canvas getDetailsView(Integer eventId) {
return EventCompositeDetailsView.getInstance();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionListView.java
index 7e1d548..4a6db81 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/definitions/GroupDefinitionListView.java
@@ -128,26 +128,26 @@ public class GroupDefinitionListView extends TableSection<GroupDefinitionDataSou
nextCalculationTimeField);
addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(), MSG.common_msg_areYouSure(),
- new AbstractTableAction(TableActionEnablement.ANY) {
- public void executeAction(ListGridRecord[] selection, Object actionValue) {
- final int[] groupDefinitionIds = TableUtility.getIds(selection);
- ResourceGroupGWTServiceAsync groupManager = GWTServiceLookup.getResourceGroupService(60000);
- groupManager.deleteGroupDefinitions(groupDefinitionIds, new AsyncCallback<Void>() {
- @Override
- public void onSuccess(Void result) {
- CoreGUI.getMessageCenter().notify(
- new Message(MSG.view_dynagroup_deleteSuccessfulSelection(String
- .valueOf(groupDefinitionIds.length)), Severity.Info));
- GroupDefinitionListView.this.refresh();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_dynagroup_deleteFailureSelection(), caught);
- }
- });
- }
- });
+ new AbstractTableAction(TableActionEnablement.ANY) {
+ public void executeAction(ListGridRecord[] selection, Object actionValue) {
+ final int[] groupDefinitionIds = TableUtility.getIds(selection);
+ ResourceGroupGWTServiceAsync groupManager = GWTServiceLookup.getResourceGroupService(60000);
+ groupManager.deleteGroupDefinitions(groupDefinitionIds, new AsyncCallback<Void>() {
+ @Override
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_dynagroup_deleteSuccessfulSelection(String
+ .valueOf(groupDefinitionIds.length)), Severity.Info));
+ GroupDefinitionListView.this.refresh();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_dynagroup_deleteFailureSelection(), caught);
+ }
+ });
+ }
+ });
addTableAction(extendLocatorId("New"), MSG.common_button_new(), null, new AbstractTableAction() {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
@@ -180,7 +180,7 @@ public class GroupDefinitionListView extends TableSection<GroupDefinitionDataSou
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
final SingleGroupDefinitionView singleGroupDefinitionView = new SingleGroupDefinitionView(this
.extendLocatorId("Details"));
return singleGroupDefinitionView;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
index f1c7cfa..10d2cb9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/traits/TraitsView.java
@@ -74,7 +74,7 @@ public class TraitsView extends AbstractMeasurementDataTraitListView {
}
@Override
- public Canvas getDetailsView(int definitionId) {
+ public Canvas getDetailsView(Integer definitionId) {
return new TraitsDetailView(extendLocatorId("Detail"), this.groupId, definitionId);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupMemberResourceOperationHistoryListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupMemberResourceOperationHistoryListView.java
index b9eb6bb..03dde04 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupMemberResourceOperationHistoryListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupMemberResourceOperationHistoryListView.java
@@ -80,7 +80,7 @@ public class GroupMemberResourceOperationHistoryListView extends
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
return new ResourceOperationHistoryDetailsView(extendLocatorId("DetailsView"), true);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryListView.java
index 8ad3170..ecf55ca 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/history/GroupOperationHistoryListView.java
@@ -45,7 +45,7 @@ public class GroupOperationHistoryListView extends AbstractOperationHistoryListV
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
return new GroupOperationHistoryDetailsView(extendLocatorId("DetailsView"), this.groupComposite);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/schedule/GroupOperationScheduleListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/schedule/GroupOperationScheduleListView.java
index 7f9c2f1..6561291 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/schedule/GroupOperationScheduleListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/operation/schedule/GroupOperationScheduleListView.java
@@ -20,6 +20,7 @@
package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.operation.schedule;
import com.smartgwt.client.widgets.Canvas;
+
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.enterprise.gui.coregui.client.inventory.common.detail.operation.schedule.AbstractOperationScheduleListView;
@@ -45,9 +46,8 @@ public class GroupOperationScheduleListView extends AbstractOperationScheduleLis
}
@Override
- public Canvas getDetailsView(int scheduleId) {
- return new GroupOperationScheduleDetailsView(extendLocatorId("DetailsView"),
- this.groupComposite, scheduleId);
+ public Canvas getDetailsView(Integer scheduleId) {
+ return new GroupOperationScheduleDetailsView(extendLocatorId("DetailsView"), this.groupComposite, scheduleId);
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
index c445d32..50fbc30 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
@@ -58,7 +58,7 @@ public class ConfigurationHistoryView extends AbstractConfigurationHistoryView<C
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
ConfigurationHistoryDetailView detailView = new ConfigurationHistoryDetailView(this.getLocatorId());
return detailView;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationHistoryView.java
index fdd6657..4fad987 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationHistoryView.java
@@ -60,7 +60,7 @@ public class PluginConfigurationHistoryView extends
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
PluginConfigurationHistoryDetailView detailView = new PluginConfigurationHistoryDetailView(this.getLocatorId());
return detailView;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/traits/TraitsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/traits/TraitsView.java
index 55a6f99..fe7b9ec 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/traits/TraitsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/traits/TraitsView.java
@@ -38,7 +38,7 @@ public class TraitsView extends AbstractMeasurementDataTraitListView {
}
@Override
- public Canvas getDetailsView(int definitionId) {
+ public Canvas getDetailsView(Integer definitionId) {
return new TraitsDetailView(extendLocatorId("Detail"), this.resourceId, definitionId);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryListView.java
index 3d64039..a222b73 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/history/ResourceOperationHistoryListView.java
@@ -47,7 +47,7 @@ public class ResourceOperationHistoryListView extends OperationHistoryView {
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
return new ResourceOperationHistoryDetailsView(this.extendLocatorId("DetailsView"));
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/schedule/ResourceOperationScheduleListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/schedule/ResourceOperationScheduleListView.java
index 221390c..859747a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/schedule/ResourceOperationScheduleListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/schedule/ResourceOperationScheduleListView.java
@@ -46,9 +46,9 @@ public class ResourceOperationScheduleListView extends AbstractOperationSchedule
}
@Override
- public Canvas getDetailsView(int scheduleId) {
- return new ResourceOperationScheduleDetailsView(extendLocatorId("DetailsView"),
- this.resourceComposite, scheduleId);
+ public Canvas getDetailsView(Integer scheduleId) {
+ return new ResourceOperationScheduleDetailsView(extendLocatorId("DetailsView"), this.resourceComposite,
+ scheduleId);
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
index 70a5ff9..5461aa0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/OperationHistoryView.java
@@ -23,13 +23,9 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
-import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
-import com.smartgwt.client.data.DSCallback;
import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.Record;
import com.smartgwt.client.data.SortSpecifier;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
@@ -191,7 +187,8 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
final List<Integer> successIds = new ArrayList<Integer>();
final List<Integer> failureIds = new ArrayList<Integer>();
for (ListGridRecord record : recordsToBeDeleted) {
- final ResourceOperationHistory operationHistoryToRemove = new OperationHistoryDataSource().copyValues(record);
+ final ResourceOperationHistory operationHistoryToRemove = new OperationHistoryDataSource()
+ .copyValues(record);
GWTServiceLookup.getOperationService().deleteOperationHistory(operationHistoryToRemove.getId(), force,
new AsyncCallback<Void>() {
public void onSuccess(Void result) {
@@ -202,7 +199,7 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
public void onFailure(Throwable caught) {
// TODO: i18n
CoreGUI.getErrorHandler().handleError("Failed to delete " + operationHistoryToRemove + ".",
- caught);
+ caught);
failureIds.add(operationHistoryToRemove.getId());
handleCompletion(successIds, failureIds, numberOfRecordsToBeDeleted);
}
@@ -214,10 +211,13 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
if ((successIds.size() + failureIds.size()) == numberOfRecordsToBeDeleted) {
// TODO: i18n
if (successIds.size() == numberOfRecordsToBeDeleted) {
- CoreGUI.getMessageCenter().notify(new Message("Deleted " + numberOfRecordsToBeDeleted + " operation history items."));
+ CoreGUI.getMessageCenter().notify(
+ new Message("Deleted " + numberOfRecordsToBeDeleted + " operation history items."));
} else {
- CoreGUI.getMessageCenter().notify(new Message("Deleted " + successIds.size()
- + " operation history items, but failed to delete the items with the following IDs: " + failureIds));
+ CoreGUI.getMessageCenter().notify(
+ new Message("Deleted " + successIds.size()
+ + " operation history items, but failed to delete the items with the following IDs: "
+ + failureIds));
}
refresh();
}
@@ -228,7 +228,7 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
}
@Override
- public Canvas getDetailsView(int id) {
+ public Canvas getDetailsView(Integer id) {
return new ResourceOperationHistoryDetailsView(extendLocatorId("Detail"));
}
@@ -237,5 +237,4 @@ public class OperationHistoryView extends TableSection<OperationHistoryDataSourc
return OperationHistoryDataSource.Field.OPERATION_NAME;
}
-
}
commit 66bcc38c099082f3077f7cf5f1b0429cb826f2d8
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 29 15:13:12 2011 -0400
rename TableSection to AbstractTableSection to prepare for refactoring of the TableSection hierarchy
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
new file mode 100644
index 0000000..df8a406
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/AbstractTableSection.java
@@ -0,0 +1,389 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.table;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.user.client.History;
+import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.SortSpecifier;
+import com.smartgwt.client.types.AnimationEffect;
+import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.widgets.AnimationCallback;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.events.DoubleClickEvent;
+import com.smartgwt.client.widgets.events.DoubleClickHandler;
+import com.smartgwt.client.widgets.grid.CellFormatter;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.layout.VLayout;
+
+import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.DetailsView;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.buttons.BackButton;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+
+/**
+ * @author Greg Hinkle
+ * @author John Mazzitelli
+ */
+public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> implements BookmarkableView {
+
+ private VLayout detailsHolder;
+ private Canvas detailsView;
+ private String basePath;
+ private boolean escapeHtmlInDetailsLinkColumn;
+ private boolean initialDisplay;
+
+ protected TableSection(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, Criteria criteria) {
+ super(locatorId, tableTitle, criteria);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers, criteria);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, boolean autoFetchData) {
+ super(locatorId, tableTitle, autoFetchData);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, null, sortSpecifiers, excludedFieldNames);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
+ }
+
+ protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames, boolean autoFetchData) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ this.initialDisplay = true;
+
+ detailsHolder = new LocatableVLayout(extendLocatorId("tableSection"));
+ detailsHolder.setAlign(VerticalAlignment.TOP);
+ //detailsHolder.setWidth100();
+ //detailsHolder.setHeight100();
+ detailsHolder.setMargin(4);
+ detailsHolder.hide();
+
+ addMember(detailsHolder);
+
+ // if the detailsView is already defined it means we want the details view to be rendered prior to
+ // the master view, probably due to a direct navigation or refresh (like F5 when sitting on the details page)
+ if (null != detailsView) {
+ switchToDetailsView();
+ }
+ }
+
+ /**
+ * The default implementation wraps the {@link #getDetailsLinkColumnCellFormatter()} column with the
+ * {@link #getDetailsLinkColumnCellFormatter()}. This is typically the 'name' column linking to the detail
+ * view, given the 'id'. Also, establishes a double click handler for the row which invokes
+ * {@link #showDetails(com.smartgwt.client.widgets.grid.ListGridRecord)}</br>
+ * </br>
+ * In general, in overrides, call super.configureTable *after* manipulating the ListGrid fields.
+ *
+ * @see org.rhq.enterprise.gui.coregui.client.components.table.Table#configureTable()
+ */
+ @Override
+ protected void configureTable() {
+ if (isDetailsEnabled()) {
+ ListGrid grid = getListGrid();
+
+ // Make the value of some specific field a link to the details view for the corresponding record.
+ ListGridField field = (grid != null) ? grid.getField(getDetailsLinkColumnName()) : null;
+ if (field != null) {
+ field.setCellFormatter(getDetailsLinkColumnCellFormatter());
+ }
+
+ setListGridDoubleClickHandler(new DoubleClickHandler() {
+ @Override
+ public void onDoubleClick(DoubleClickEvent event) {
+ ListGrid listGrid = (ListGrid) event.getSource();
+ ListGridRecord[] selectedRows = listGrid.getSelection();
+ if (selectedRows != null && selectedRows.length == 1) {
+ showDetails(selectedRows[0]);
+ }
+ }
+ });
+ }
+ }
+
+ protected boolean isDetailsEnabled() {
+ return true;
+ }
+
+ public void setEscapeHtmlInDetailsLinkColumn(boolean escapeHtmlInDetailsLinkColumn) {
+ this.escapeHtmlInDetailsLinkColumn = escapeHtmlInDetailsLinkColumn;
+ }
+
+ /**
+ * Override if you don't want FIELD_NAME to be wrapped ina link.
+ * @return the name of the field to be wrapped, or null if no field should be wrapped.
+ */
+ protected String getDetailsLinkColumnName() {
+ return FIELD_NAME;
+ }
+
+ /**
+ * Override if you don't want the detailsLinkColumn to have the default link wrapper.
+ * @return the desired CellFormatter.
+ */
+ protected CellFormatter getDetailsLinkColumnCellFormatter() {
+ return new CellFormatter() {
+ public String format(Object value, ListGridRecord record, int i, int i1) {
+ if (value == null) {
+ return "";
+ }
+ Integer recordId = getId(record);
+ String detailsUrl = "#" + getBasePath() + "/" + recordId;
+ String formattedValue = (escapeHtmlInDetailsLinkColumn) ? StringUtility.escapeHtml(value.toString())
+ : value.toString();
+ return SeleniumUtility.getLocatableHref(detailsUrl, formattedValue, null);
+ }
+ };
+ }
+
+ /**
+ * Shows the details view for the given record of the table.
+ *
+ * The default implementation of this method assumes there is an
+ * id attribute on the record and passes it to {@link #showDetails(int)}.
+ * Subclasses are free to override this behavior. Subclasses usually
+ * will need to set the {@link #setDetailsView(Canvas) details view}
+ * explicitly.
+ *
+ * @param record the record whose details are to be shown
+ */
+ public void showDetails(ListGridRecord record) {
+ if (record == null) {
+ throw new IllegalArgumentException("'record' parameter is null.");
+ }
+
+ Integer id = getId(record);
+ showDetails(id);
+ }
+
+ /**
+ * Returns the details canvas with information on the item given its list grid record.
+ *
+ * The default implementation of this method is to assume there is an
+ * id attribute on the record and pass that ID to {@link #getDetailsView(int)}.
+ * Subclasses are free to override this - which you usually want to do
+ * if you know the full details of the item are stored in the record attributes
+ * and thus help avoid making a round trip to the DB.
+ *
+ * @param record the record of the item whose details to be shown; ; null if empty details view should be shown.
+ */
+ public Canvas getDetailsView(ListGridRecord record) {
+ Integer id = getId(record);
+ return getDetailsView(id);
+ }
+
+ protected Integer getId(ListGridRecord record) {
+ Integer id = (record != null) ? record.getAttributeAsInt("id") : 0;
+ if (id == null) {
+ String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalStateException(msg);
+ }
+ return id;
+ }
+
+ /**
+ * Shows empty details for a new item being created.
+ * This method is usually called when a user clicks a 'New' button.
+ *
+ * @see #showDetails(ListGridRecord)
+ */
+ public void newDetails() {
+ History.newItem(basePath + "/0");
+ }
+
+ /**
+ * Shows the details for an item has the given ID.
+ * This method is usually called when a user goes to the details
+ * page via a bookmark, double-cick on a list view row, or direct link.
+ *
+ * @param id the id of the row whose details are to be shown; Should be a valid id, > 0.
+ *
+ * @see #showDetails(ListGridRecord)
+ *
+ * @throws IllegalArgumentException if id <= 0.
+ */
+ public void showDetails(int id) {
+ if (id > 0) {
+ History.newItem(basePath + "/" + id);
+ } else {
+ String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), Integer.toString(id));
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalArgumentException(msg);
+ }
+ }
+
+ /**
+ * Returns the details canvas with information on the item that has the given ID.
+ * Note that an empty details view should be returned if the id passed in is 0 (as would
+ * be the case if a new item is to be created using the details view).
+ *
+ * @param id the id of the details to be shown; will be 0 if an empty details view should be shown.
+ */
+ public abstract Canvas getDetailsView(int id);
+
+ @Override
+ public void renderView(ViewPath viewPath) {
+ this.basePath = viewPath.getPathToCurrent();
+
+ if (!viewPath.isEnd()) {
+ int id = Integer.parseInt(viewPath.getCurrent().getPath());
+ this.detailsView = getDetailsView(id);
+ if (this.detailsView instanceof BookmarkableView) {
+ ((BookmarkableView) this.detailsView).renderView(viewPath);
+ }
+
+ switchToDetailsView();
+ } else {
+ switchToTableView();
+ }
+ }
+
+ protected String getBasePath() {
+ return this.basePath;
+ }
+
+ /**
+ * For use by subclasses that want to define their own details view.
+ *
+ * @param detailsView the new details view
+ */
+ protected void setDetailsView(Canvas detailsView) {
+ this.detailsView = detailsView;
+ }
+
+ /**
+ * Switches to viewing the details canvas, hiding the table. This does not
+ * do anything with reloading data or switching to the selected row in the table;
+ * this only changes the visibility of canvases.
+ */
+ protected void switchToDetailsView() {
+ Canvas contents = getTableContents();
+
+ // If the Table has not yet been initialized then ignore
+ if (contents != null) {
+ if (contents.isVisible()) {
+ contents.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
+ @Override
+ public void execute(boolean b) {
+ buildDetailsView();
+ }
+ });
+ } else {
+ /*
+ * if the programmer chooses to go directly from the detailView in create-mode to the
+ * detailsView in edit-mode, the content canvas will already be hidden, which means the
+ * animateHide would be a no-op (the event won't fire). this causes the detailsHolder
+ * to keep a reference to the previous detailsView (the one in create-mode) instead of the
+ * newly returned reference from getDetailsView(int) that was called when the renderView
+ * methods were called hierarchically down to render the new detailsView in edit-mode.
+ * therefore, we need to explicitly destroy what's already there (presumably the detailsView
+ * in create-mode), and then rebuild it (presumably the detailsView in edit-mode).
+ */
+ SeleniumUtility.destroyMembers(detailsHolder);
+
+ buildDetailsView();
+ }
+ }
+ }
+
+ private void buildDetailsView() {
+ detailsView.setWidth100();
+ detailsView.setHeight100();
+
+ boolean isEditable = (detailsView instanceof DetailsView && ((DetailsView) detailsView).isEditable());
+ if (!isEditable) {
+ // Only add the "Back to List" button if the details are definitely not editable, because if they are
+ // editable, a Cancel button should already be provided by the details view.
+ BackButton backButton = new BackButton(extendLocatorId("BackButton"), MSG.view_tableSection_backButton(),
+ basePath);
+ detailsHolder.addMember(backButton);
+ VLayout verticalSpacer = new LocatableVLayout(extendLocatorId("verticalSpacer"));
+ verticalSpacer.setHeight(8);
+ detailsHolder.addMember(verticalSpacer);
+ }
+
+ detailsHolder.addMember(detailsView);
+ detailsHolder.animateShow(AnimationEffect.WIPE);
+ }
+
+ /**
+ * Switches to viewing the table, hiding the details canvas.
+ */
+ protected void switchToTableView() {
+ final Canvas contents = getTableContents();
+ if (contents != null) {
+ // If this is not the initial display of the table, refresh the table's data. Otherwise, a refresh would be
+ // redundant, since the data was just loaded when the table was drawn.
+ if (this.initialDisplay) {
+ this.initialDisplay = false;
+ } else {
+ Log.debug("Refreshing data for Table [" + getClass().getName() + "]...");
+ refresh();
+ }
+ if (detailsHolder != null && detailsHolder.isVisible()) {
+ detailsHolder.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
+ @Override
+ public void execute(boolean b) {
+ SeleniumUtility.destroyMembers(detailsHolder);
+
+ contents.animateShow(AnimationEffect.WIPE);
+ }
+ });
+ } else {
+ contents.animateShow(AnimationEffect.WIPE);
+ }
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java
deleted file mode 100644
index df8a406..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.enterprise.gui.coregui.client.components.table;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.user.client.History;
-import com.smartgwt.client.data.Criteria;
-import com.smartgwt.client.data.SortSpecifier;
-import com.smartgwt.client.types.AnimationEffect;
-import com.smartgwt.client.types.VerticalAlignment;
-import com.smartgwt.client.widgets.AnimationCallback;
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.events.DoubleClickEvent;
-import com.smartgwt.client.widgets.events.DoubleClickHandler;
-import com.smartgwt.client.widgets.grid.CellFormatter;
-import com.smartgwt.client.widgets.grid.ListGrid;
-import com.smartgwt.client.widgets.grid.ListGridField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.layout.VLayout;
-
-import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.DetailsView;
-import org.rhq.enterprise.gui.coregui.client.ViewPath;
-import org.rhq.enterprise.gui.coregui.client.components.buttons.BackButton;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
-
-/**
- * @author Greg Hinkle
- * @author John Mazzitelli
- */
-public abstract class TableSection<DS extends RPCDataSource> extends Table<DS> implements BookmarkableView {
-
- private VLayout detailsHolder;
- private Canvas detailsView;
- private String basePath;
- private boolean escapeHtmlInDetailsLinkColumn;
- private boolean initialDisplay;
-
- protected TableSection(String locatorId, String tableTitle) {
- super(locatorId, tableTitle);
- }
-
- protected TableSection(String locatorId, String tableTitle, Criteria criteria) {
- super(locatorId, tableTitle, criteria);
- }
-
- protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
- super(locatorId, tableTitle, sortSpecifiers);
- }
-
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
- super(locatorId, tableTitle, sortSpecifiers, criteria);
- }
-
- protected TableSection(String locatorId, String tableTitle, boolean autoFetchData) {
- super(locatorId, tableTitle, autoFetchData);
- }
-
- protected TableSection(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
- String[] excludedFieldNames) {
- super(locatorId, tableTitle, null, sortSpecifiers, excludedFieldNames);
- }
-
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
- String[] excludedFieldNames) {
- super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
- }
-
- protected TableSection(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
- String[] excludedFieldNames, boolean autoFetchData) {
- super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
- }
-
- @Override
- protected void onInit() {
- super.onInit();
-
- this.initialDisplay = true;
-
- detailsHolder = new LocatableVLayout(extendLocatorId("tableSection"));
- detailsHolder.setAlign(VerticalAlignment.TOP);
- //detailsHolder.setWidth100();
- //detailsHolder.setHeight100();
- detailsHolder.setMargin(4);
- detailsHolder.hide();
-
- addMember(detailsHolder);
-
- // if the detailsView is already defined it means we want the details view to be rendered prior to
- // the master view, probably due to a direct navigation or refresh (like F5 when sitting on the details page)
- if (null != detailsView) {
- switchToDetailsView();
- }
- }
-
- /**
- * The default implementation wraps the {@link #getDetailsLinkColumnCellFormatter()} column with the
- * {@link #getDetailsLinkColumnCellFormatter()}. This is typically the 'name' column linking to the detail
- * view, given the 'id'. Also, establishes a double click handler for the row which invokes
- * {@link #showDetails(com.smartgwt.client.widgets.grid.ListGridRecord)}</br>
- * </br>
- * In general, in overrides, call super.configureTable *after* manipulating the ListGrid fields.
- *
- * @see org.rhq.enterprise.gui.coregui.client.components.table.Table#configureTable()
- */
- @Override
- protected void configureTable() {
- if (isDetailsEnabled()) {
- ListGrid grid = getListGrid();
-
- // Make the value of some specific field a link to the details view for the corresponding record.
- ListGridField field = (grid != null) ? grid.getField(getDetailsLinkColumnName()) : null;
- if (field != null) {
- field.setCellFormatter(getDetailsLinkColumnCellFormatter());
- }
-
- setListGridDoubleClickHandler(new DoubleClickHandler() {
- @Override
- public void onDoubleClick(DoubleClickEvent event) {
- ListGrid listGrid = (ListGrid) event.getSource();
- ListGridRecord[] selectedRows = listGrid.getSelection();
- if (selectedRows != null && selectedRows.length == 1) {
- showDetails(selectedRows[0]);
- }
- }
- });
- }
- }
-
- protected boolean isDetailsEnabled() {
- return true;
- }
-
- public void setEscapeHtmlInDetailsLinkColumn(boolean escapeHtmlInDetailsLinkColumn) {
- this.escapeHtmlInDetailsLinkColumn = escapeHtmlInDetailsLinkColumn;
- }
-
- /**
- * Override if you don't want FIELD_NAME to be wrapped ina link.
- * @return the name of the field to be wrapped, or null if no field should be wrapped.
- */
- protected String getDetailsLinkColumnName() {
- return FIELD_NAME;
- }
-
- /**
- * Override if you don't want the detailsLinkColumn to have the default link wrapper.
- * @return the desired CellFormatter.
- */
- protected CellFormatter getDetailsLinkColumnCellFormatter() {
- return new CellFormatter() {
- public String format(Object value, ListGridRecord record, int i, int i1) {
- if (value == null) {
- return "";
- }
- Integer recordId = getId(record);
- String detailsUrl = "#" + getBasePath() + "/" + recordId;
- String formattedValue = (escapeHtmlInDetailsLinkColumn) ? StringUtility.escapeHtml(value.toString())
- : value.toString();
- return SeleniumUtility.getLocatableHref(detailsUrl, formattedValue, null);
- }
- };
- }
-
- /**
- * Shows the details view for the given record of the table.
- *
- * The default implementation of this method assumes there is an
- * id attribute on the record and passes it to {@link #showDetails(int)}.
- * Subclasses are free to override this behavior. Subclasses usually
- * will need to set the {@link #setDetailsView(Canvas) details view}
- * explicitly.
- *
- * @param record the record whose details are to be shown
- */
- public void showDetails(ListGridRecord record) {
- if (record == null) {
- throw new IllegalArgumentException("'record' parameter is null.");
- }
-
- Integer id = getId(record);
- showDetails(id);
- }
-
- /**
- * Returns the details canvas with information on the item given its list grid record.
- *
- * The default implementation of this method is to assume there is an
- * id attribute on the record and pass that ID to {@link #getDetailsView(int)}.
- * Subclasses are free to override this - which you usually want to do
- * if you know the full details of the item are stored in the record attributes
- * and thus help avoid making a round trip to the DB.
- *
- * @param record the record of the item whose details to be shown; ; null if empty details view should be shown.
- */
- public Canvas getDetailsView(ListGridRecord record) {
- Integer id = getId(record);
- return getDetailsView(id);
- }
-
- protected Integer getId(ListGridRecord record) {
- Integer id = (record != null) ? record.getAttributeAsInt("id") : 0;
- if (id == null) {
- String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
- CoreGUI.getErrorHandler().handleError(msg);
- throw new IllegalStateException(msg);
- }
- return id;
- }
-
- /**
- * Shows empty details for a new item being created.
- * This method is usually called when a user clicks a 'New' button.
- *
- * @see #showDetails(ListGridRecord)
- */
- public void newDetails() {
- History.newItem(basePath + "/0");
- }
-
- /**
- * Shows the details for an item has the given ID.
- * This method is usually called when a user goes to the details
- * page via a bookmark, double-cick on a list view row, or direct link.
- *
- * @param id the id of the row whose details are to be shown; Should be a valid id, > 0.
- *
- * @see #showDetails(ListGridRecord)
- *
- * @throws IllegalArgumentException if id <= 0.
- */
- public void showDetails(int id) {
- if (id > 0) {
- History.newItem(basePath + "/" + id);
- } else {
- String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), Integer.toString(id));
- CoreGUI.getErrorHandler().handleError(msg);
- throw new IllegalArgumentException(msg);
- }
- }
-
- /**
- * Returns the details canvas with information on the item that has the given ID.
- * Note that an empty details view should be returned if the id passed in is 0 (as would
- * be the case if a new item is to be created using the details view).
- *
- * @param id the id of the details to be shown; will be 0 if an empty details view should be shown.
- */
- public abstract Canvas getDetailsView(int id);
-
- @Override
- public void renderView(ViewPath viewPath) {
- this.basePath = viewPath.getPathToCurrent();
-
- if (!viewPath.isEnd()) {
- int id = Integer.parseInt(viewPath.getCurrent().getPath());
- this.detailsView = getDetailsView(id);
- if (this.detailsView instanceof BookmarkableView) {
- ((BookmarkableView) this.detailsView).renderView(viewPath);
- }
-
- switchToDetailsView();
- } else {
- switchToTableView();
- }
- }
-
- protected String getBasePath() {
- return this.basePath;
- }
-
- /**
- * For use by subclasses that want to define their own details view.
- *
- * @param detailsView the new details view
- */
- protected void setDetailsView(Canvas detailsView) {
- this.detailsView = detailsView;
- }
-
- /**
- * Switches to viewing the details canvas, hiding the table. This does not
- * do anything with reloading data or switching to the selected row in the table;
- * this only changes the visibility of canvases.
- */
- protected void switchToDetailsView() {
- Canvas contents = getTableContents();
-
- // If the Table has not yet been initialized then ignore
- if (contents != null) {
- if (contents.isVisible()) {
- contents.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
- @Override
- public void execute(boolean b) {
- buildDetailsView();
- }
- });
- } else {
- /*
- * if the programmer chooses to go directly from the detailView in create-mode to the
- * detailsView in edit-mode, the content canvas will already be hidden, which means the
- * animateHide would be a no-op (the event won't fire). this causes the detailsHolder
- * to keep a reference to the previous detailsView (the one in create-mode) instead of the
- * newly returned reference from getDetailsView(int) that was called when the renderView
- * methods were called hierarchically down to render the new detailsView in edit-mode.
- * therefore, we need to explicitly destroy what's already there (presumably the detailsView
- * in create-mode), and then rebuild it (presumably the detailsView in edit-mode).
- */
- SeleniumUtility.destroyMembers(detailsHolder);
-
- buildDetailsView();
- }
- }
- }
-
- private void buildDetailsView() {
- detailsView.setWidth100();
- detailsView.setHeight100();
-
- boolean isEditable = (detailsView instanceof DetailsView && ((DetailsView) detailsView).isEditable());
- if (!isEditable) {
- // Only add the "Back to List" button if the details are definitely not editable, because if they are
- // editable, a Cancel button should already be provided by the details view.
- BackButton backButton = new BackButton(extendLocatorId("BackButton"), MSG.view_tableSection_backButton(),
- basePath);
- detailsHolder.addMember(backButton);
- VLayout verticalSpacer = new LocatableVLayout(extendLocatorId("verticalSpacer"));
- verticalSpacer.setHeight(8);
- detailsHolder.addMember(verticalSpacer);
- }
-
- detailsHolder.addMember(detailsView);
- detailsHolder.animateShow(AnimationEffect.WIPE);
- }
-
- /**
- * Switches to viewing the table, hiding the details canvas.
- */
- protected void switchToTableView() {
- final Canvas contents = getTableContents();
- if (contents != null) {
- // If this is not the initial display of the table, refresh the table's data. Otherwise, a refresh would be
- // redundant, since the data was just loaded when the table was drawn.
- if (this.initialDisplay) {
- this.initialDisplay = false;
- } else {
- Log.debug("Refreshing data for Table [" + getClass().getName() + "]...");
- refresh();
- }
- if (detailsHolder != null && detailsHolder.isVisible()) {
- detailsHolder.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
- @Override
- public void execute(boolean b) {
- SeleniumUtility.destroyMembers(detailsHolder);
-
- contents.animateShow(AnimationEffect.WIPE);
- }
- });
- } else {
- contents.animateShow(AnimationEffect.WIPE);
- }
- }
- }
-
-}
commit 276d4aa49f568399f5adb35134647e84a119aff9
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 15:23:28 2011 -0400
Need to copy resource id filer into jpa criteria object
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 54eda95..8e4d1f7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -66,11 +66,11 @@ import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
-import org.rhq.core.domain.drift.RhqDriftFile;
import org.rhq.core.domain.drift.DriftFileBits;
import org.rhq.core.domain.drift.DriftFileStatus;
import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.drift.RhqDriftFile;
import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index bed8bd5..1755d3e 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -110,6 +110,7 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
private DriftChangeSetJPACriteria toJPACriteria(DriftChangeSetCriteria criteria) {
DriftChangeSetJPACriteria jpaCriteria = new DriftChangeSetJPACriteria();
jpaCriteria.addFilterId(criteria.getFilterId());
+ jpaCriteria.addFilterResourceId(criteria.getFilterResourceId());
jpaCriteria.addFilterCategory(criteria.getFilterCategory());
jpaCriteria.addFilterCreatedAfter(criteria.getFilterCreatedAfter());
jpaCriteria.addFilterCreatedBefore(criteria.getFilterCreatedBefore());
commit f557f05fa617968bd151a83765b0fa0dcf98a5e5
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 13:57:20 2011 -0400
fixing import
diff --git a/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java b/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
index 622108f..da296f9 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
@@ -6,7 +6,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import static junitx.util.Converter.asList;
+import static java.util.Arrays.asList;
public class CollectionMatchesChecker<T> {
commit 7e9ec31437b8b547bb1c048113081031b86a9721
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 13:47:51 2011 -0400
Fix filter overrides for range filters
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
index 6c17877..7a7f78f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
@@ -39,9 +39,9 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
private Integer filterId;
private Integer filterInitial; // needs override
private Integer filterResourceId; // needs override
- private String filterVersion;
- private String filterStartVersion;
- private String filterEndVersion;
+ private Integer filterVersion;
+ private Integer filterStartVersion;
+ private Integer filterEndVersion;
private Long filterCreatedAfter;
private Long filterCreatedBefore;
private DriftChangeSetCategory filterCategory;
@@ -52,10 +52,10 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
public DriftChangeSetJPACriteria() {
filterOverrides.put("initial", "version = 0");
filterOverrides.put("resourceId", "resource.id = ?");
- filterOverrides.put("filterStartVersion", "version >= ?");
- filterOverrides.put("filterEndVersion", "version <= ?");
- filterOverrides.put("filterCreatedAfter", "ctime >= ?");
- filterOverrides.put("filterCreatedBefore", "ctime <= ?");
+ filterOverrides.put("startVersion", "version >= ?");
+ filterOverrides.put("endVersion", "version <= ?");
+ filterOverrides.put("createdAfter", "ctime >= ?");
+ filterOverrides.put("createdBefore", "ctime <= ?");
}
@Override
@@ -75,32 +75,38 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
}
public void addFilterVersion(String filterVersion) {
- this.filterVersion = filterVersion;
+ if (filterVersion != null) {
+ this.filterVersion = Integer.parseInt(filterVersion);
+ }
}
@Override
public String getFilterVersion() {
- return filterVersion;
+ return filterVersion == null ? null : filterVersion.toString();
}
@Override
public void addFilterStartVersion(String filterStartVersion) {
- this.filterStartVersion = filterStartVersion;
+ if (filterStartVersion != null) {
+ this.filterStartVersion = Integer.parseInt(filterStartVersion);
+ }
}
@Override
public String getFilterStartVersion() {
- return filterStartVersion;
+ return filterStartVersion == null ? null : filterStartVersion.toString();
}
@Override
public void addFilterEndVersion(String filterEndVersion) {
- this.filterEndVersion = filterEndVersion;
+ if (filterEndVersion != null) {
+ this.filterEndVersion = Integer.parseInt(filterEndVersion);
+ }
}
@Override
public String getFilterEndVersion() {
- return filterEndVersion;
+ return filterEndVersion == null ? null : filterEndVersion.toString();
}
@Override
commit 921524020da4ac5149eafeea5cfd89ccc2ce849a
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 12:30:46 2011 -0400
Prepend directory in path of file entries
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index c24099a..bc88533 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -37,6 +37,7 @@ import org.rhq.core.domain.drift.dto.DriftFileDTO;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
+import org.rhq.core.util.file.FileUtil;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
@@ -100,9 +101,11 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
for (DirectoryEntry dirEntry : reader) {
for (FileEntry fileEntry : dirEntry) {
+ String path = new File(dirEntry.getDirectory(), fileEntry.getFile()).getPath();
+ path = FileUtil.useForwardSlash(path);
MongoDBChangeSetEntry entry = new MongoDBChangeSetEntry();
entry.setCategory(fileEntry.getType());
- entry.setPath(fileEntry.getFile());
+ entry.setPath(path);
changeSet.add(entry);
}
}
commit 7ac71a20e868119305be5afb400570a0ac3cbdf7
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 11:59:25 2011 -0400
Adding DriftServer to remote client for use from CLI
diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
index a965cb9..8538d9a 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqFacade.java
@@ -32,6 +32,7 @@ import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftServerRemote;
import org.rhq.enterprise.server.event.EventManagerRemote;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
@@ -89,6 +90,8 @@ public interface RhqFacade {
DiscoveryBossRemote getDiscoveryBoss();
+ DriftServerRemote getDriftServer();
+
DriftManagerRemote getDriftManager();
EventManagerRemote getEventManager();
diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
index 473d95e..ff632d7 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/client/RhqManagers.java
@@ -29,6 +29,7 @@ import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftServerRemote;
import org.rhq.enterprise.server.event.EventManagerRemote;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
@@ -64,6 +65,7 @@ public enum RhqManagers {
ConfigurationManager(ConfigurationManagerRemote.class), //
ContentManager(ContentManagerRemote.class), //
DataAccessManager(DataAccessManagerRemote.class), //
+ DriftServer(DriftServerRemote.class),
DriftManager(DriftManagerRemote.class), //
DiscoveryBoss(DiscoveryBossRemote.class), //
EventManager(EventManagerRemote.class), //
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java b/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
index 4fb2364..6060d9e 100644
--- a/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/FakeRhqFacade.java
@@ -34,6 +34,7 @@ import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftServerRemote;
import org.rhq.enterprise.server.event.EventManagerRemote;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
@@ -179,6 +180,10 @@ public class FakeRhqFacade implements RhqFacade {
return null;
}
+ public DriftServerRemote getDriftServer() {
+ return null;
+ }
+
@Override
public DriftManagerRemote getDriftManager() {
return null;
diff --git a/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/client/RemoteClient.java b/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/client/RemoteClient.java
index 0460864..2d9973d 100644
--- a/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/client/RemoteClient.java
+++ b/modules/enterprise/remoting/client-api/src/main/java/org/rhq/enterprise/client/RemoteClient.java
@@ -44,6 +44,7 @@ import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftServerRemote;
import org.rhq.enterprise.server.event.EventManagerRemote;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
@@ -275,6 +276,10 @@ public class RemoteClient implements RhqFacade {
return RemoteClientProxy.getProcessor(this, RhqManagers.CallTimeDataManager);
}
+ public DriftServerRemote getDriftServer() {
+ return RemoteClientProxy.getProcessor(this, RhqManagers.DriftServer);
+ }
+
public DriftManagerRemote getDriftManager() {
return RemoteClientProxy.getProcessor(this, RhqManagers.DriftManager);
}
diff --git a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
index 96778f9..b3c2b8c 100644
--- a/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
+++ b/modules/enterprise/server/client-api/src/main/java/org/rhq/enterprise/client/LocalClient.java
@@ -41,6 +41,7 @@ import org.rhq.enterprise.server.content.ContentManagerRemote;
import org.rhq.enterprise.server.content.RepoManagerRemote;
import org.rhq.enterprise.server.discovery.DiscoveryBossRemote;
import org.rhq.enterprise.server.drift.DriftManagerRemote;
+import org.rhq.enterprise.server.drift.DriftServerRemote;
import org.rhq.enterprise.server.event.EventManagerRemote;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerRemote;
import org.rhq.enterprise.server.measurement.AvailabilityManagerRemote;
@@ -132,6 +133,10 @@ public class LocalClient implements RhqFacade {
return getProxy(LookupUtil.getDiscoveryBoss(), DiscoveryBossRemote.class);
}
+ public DriftServerRemote getDriftServer() {
+ return getProxy(LookupUtil.getDriftServer(), DriftServerRemote.class);
+ }
+
public DriftManagerRemote getDriftManager() {
return getProxy(LookupUtil.getDriftManager(), DriftManagerRemote.class);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 005ed8b..f66c3ab 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -19,7 +19,6 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
@@ -41,7 +40,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
@Stateless
-public class DriftServerBean implements DriftServerLocal {
+public class DriftServerBean implements DriftServerLocal, DriftServerRemote {
// TODO Should security checks be handled here instead of delegating to the drift plugin?
// Currently any security checks that need to be performed are delegated to the plugin.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java
new file mode 100644
index 0000000..a3dc30b
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerRemote.java
@@ -0,0 +1,18 @@
+package org.rhq.enterprise.server.drift;
+
+import javax.ejb.Remote;
+
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.util.PageList;
+
+@Remote
+public interface DriftServerRemote {
+
+ PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+
+ Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
+
+}
commit 4fc7ef6434bcfab86d8b2459e3f263106606267b
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 07:06:15 2011 -0400
createSnapshot method in drift server api needs to use criteria interfaces
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index 10f72f5..cc7c6f0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -118,7 +118,7 @@ public interface DriftGWTService extends RemoteService {
PageList<DriftComposite> findDriftCompositesByCriteria(DriftCriteria criteria);
- Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
/**
* Get the specified drift configuration for the specified context.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index b440ffd..cb44a90 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -21,7 +21,6 @@ package org.rhq.enterprise.gui.coregui.server.gwt;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
@@ -125,7 +124,7 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
try {
return driftServer.createSnapshot(subject, criteria);
} catch (Throwable t) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 9de0966..005ed8b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -98,7 +98,7 @@ public class DriftServerBean implements DriftServerLocal {
@Override
@TransactionAttribute(NOT_SUPPORTED)
- public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
return driftServerPlugin.createSnapshot(subject, criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
index 5046e83..eda3a4f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
@@ -7,7 +7,6 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
@@ -35,6 +34,6 @@ public interface DriftServerLocal {
PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
- Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index 867464d..5a57837 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -50,5 +50,5 @@ public interface DriftServerPluginFacet extends ServerPluginComponent {
void saveChangeSetFiles(File changeSetFilesZip) throws Exception;
- Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria);
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index bc9feaa..c24099a 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -25,7 +25,6 @@ import org.rhq.common.drift.FileEntry;
import org.rhq.common.drift.Headers;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.drift.Drift;
@@ -165,7 +164,7 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
return null;
}
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 78d7843..bed8bd5 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -102,9 +102,9 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
}
@Override
- public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetCriteria criteria) {
DriftManagerLocal driftMgr = getDriftManager();
- return driftMgr.createSnapshot(subject, criteria);
+ return driftMgr.createSnapshot(subject, toJPACriteria(criteria));
}
private DriftChangeSetJPACriteria toJPACriteria(DriftChangeSetCriteria criteria) {
commit 0f7a3a150bc05d585706e0c059d5e09727298b40
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 29 00:44:28 2011 -0400
Updating drift-mongodb plugin to display drift details (still POC)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
index 50b4634..8453713 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
@@ -32,8 +32,8 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.BasicDriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
@@ -177,7 +177,7 @@ public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSourc
* @return the criteria to use when querying for change setss
*/
protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
- DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ BasicDriftChangeSetCriteria criteria = new BasicDriftChangeSetCriteria();
criteria.addSortVersion(PageOrdering.DESC);
criteria.setPageControl(getPageControl(request));
return criteria;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index 0e3f7ed..0d59be8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -37,8 +37,8 @@ import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.criteria.BasicDriftCriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftComposite;
@@ -263,7 +263,7 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
return null; // user didn't select any priorities - return null to indicate no data should be displayed
}
- DriftJPACriteria criteria = new DriftJPACriteria();
+ BasicDriftCriteria criteria = new BasicDriftCriteria();
criteria.fetchChangeSet(true);
criteria.addFilterCategories(categoriesFilter);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 2582a49..6f4bbf2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -27,8 +27,7 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.BasicDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
@@ -62,7 +61,7 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
}
private void show(String driftId) {
- DriftCriteria criteria = new DriftJPACriteria();
+ BasicDriftCriteria criteria = new BasicDriftCriteria();
criteria.addFilterId(driftId);
criteria.fetchChangeSet(true);
GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index c90594a..bc9feaa 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -16,6 +16,7 @@ import com.mongodb.Mongo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.bson.types.ObjectId;
import org.rhq.common.drift.ChangeSetReader;
import org.rhq.common.drift.ChangeSetReaderImpl;
@@ -33,6 +34,7 @@ import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.drift.dto.DriftChangeSetDTO;
import org.rhq.core.domain.drift.dto.DriftDTO;
+import org.rhq.core.domain.drift.dto.DriftFileDTO;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
@@ -124,7 +126,23 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
@Override
public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
- return new PageList<Drift>();
+ String[] idFields = criteria.getFilterId().split(":");
+ ObjectId changeSetId = new ObjectId(idFields[0]);
+ String path = idFields[1];
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
+ .filter("id = ", changeSetId)
+ .filter("files.path = ", path);
+
+ PageList results = new PageList<DriftDTO>();
+
+ for (MongoDBChangeSet changeSet : query) {
+ DriftChangeSetDTO changeSetDTO = toDTO(changeSet);
+ for (MongoDBChangeSetEntry entry : changeSet.getDrifts()) {
+ results.add((toDTO(entry, changeSetDTO)));
+ }
+ }
+
+ return (PageList<Drift>) results;
}
@Override
@@ -185,6 +203,13 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
dto.setPath(entry.getPath());
dto.setCategory(entry.getCategory());
+ DriftFileDTO fileDTO = new DriftFileDTO();
+ fileDTO.setHashId("1a2b3c4e5f");
+
+ dto.setOldDriftFile(fileDTO);
+ dto.setNewDriftFile(fileDTO);
+
return dto;
}
+
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
index 6aff9aa..cfdc802 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
@@ -1,5 +1,7 @@
package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+import java.util.List;
+
import com.google.code.morphia.Datastore;
import com.google.code.morphia.Morphia;
import com.google.code.morphia.query.Query;
@@ -14,6 +16,7 @@ import org.rhq.core.domain.drift.DriftCategory;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.rhq.test.AssertUtils.assertPropertiesMatch;
+import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
public class MongoDBChangeSetTest {
@@ -72,4 +75,21 @@ public class MongoDBChangeSetTest {
"changeSet");
}
+ @Test
+ public void saveAndFindChangeSetById() throws Exception {
+ MongoDBChangeSet expected = new MongoDBChangeSet();
+ expected.setCategory(COVERAGE);
+ expected.setVersion(1);
+ expected.setDriftConfigurationId(1);
+
+ ds.save(expected);
+
+ List<MongoDBChangeSet> results = ds.createQuery(MongoDBChangeSet.class)
+ .filter("id = ", expected.getObjectId())
+ .asList();
+
+ assertEquals(results.size(), 1, "Expected to get back one change set");
+
+ }
+
}
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 8d4cae4..78d7843 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -73,15 +73,8 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
@Override
public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
- DriftChangeSetJPACriteria jpaCriteria = new DriftChangeSetJPACriteria();
- jpaCriteria.addFilterId(criteria.getFilterId());
- jpaCriteria.addFilterResourceId(criteria.getFilterResourceId());
- jpaCriteria.addFilterVersion(criteria.getFilterVersion());
- jpaCriteria.addFilterCategory(criteria.getFilterCategory());
- jpaCriteria.fetchDrifts(criteria.isFetchDrifts());
-
PageList<? extends DriftChangeSet> results = getDriftManager().findDriftChangeSetsByCriteria(subject,
- jpaCriteria);
+ toJPACriteria(criteria));
return (PageList<DriftChangeSet>) results;
}
@@ -114,6 +107,21 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
return driftMgr.createSnapshot(subject, criteria);
}
+ private DriftChangeSetJPACriteria toJPACriteria(DriftChangeSetCriteria criteria) {
+ DriftChangeSetJPACriteria jpaCriteria = new DriftChangeSetJPACriteria();
+ jpaCriteria.addFilterId(criteria.getFilterId());
+ jpaCriteria.addFilterCategory(criteria.getFilterCategory());
+ jpaCriteria.addFilterCreatedAfter(criteria.getFilterCreatedAfter());
+ jpaCriteria.addFilterCreatedBefore(criteria.getFilterCreatedBefore());
+ jpaCriteria.addFilterEndVersion(criteria.getFilterEndVersion());
+ jpaCriteria.addFilterStartVersion(criteria.getFilterStartVersion());
+ jpaCriteria.addFilterVersion(criteria.getFilterVersion());
+ jpaCriteria.addSortVersion(criteria.getSortVersion());
+ jpaCriteria.fetchDrifts(criteria.isFetchDrifts());
+
+ return jpaCriteria;
+ }
+
private DriftJPACriteria toJPACriteria(DriftCriteria criteria) {
DriftJPACriteria jpaCriteria = new DriftJPACriteria();
jpaCriteria.addFilterId(criteria.getFilterId());
commit 756469b8265282e85dd8405547ee3b6e3a06a625
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 21:48:04 2011 -0400
Initial commit for "basic" criteria classes
coregui needs to use the basic criteria classes and not the JPA criteria
classes. The JPA criteria classes convert string ids to integers, and
this results in an exception when using a drift server plugin other than
the default.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
new file mode 100644
index 0000000..2debece
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftChangeSetCriteria.java
@@ -0,0 +1,142 @@
+package org.rhq.core.domain.criteria;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+
+public class BasicDriftChangeSetCriteria implements DriftChangeSetCriteria {
+
+ private static final long serialVersionUID = 1L;
+
+ private String filterId;
+
+ private String filterVersion;
+
+ private String filterStartVersion;
+
+ private String filterEndVersion;
+
+ private Long filterCreatedAfter;
+
+ private Long filterCreatedBefore;
+
+ private Integer filterResourceId;
+
+ private DriftChangeSetCategory filterCategory;
+
+ private boolean fetchDrifts;
+
+ private PageOrdering sortVersion;
+
+ private PageControl pageControl;
+
+ @Override
+ public void addFilterId(String filterId) {
+ this.filterId = filterId;
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId;
+ }
+
+ @Override
+ public void addFilterVersion(String filterVersion) {
+ this.filterVersion = filterVersion;
+ }
+
+ @Override
+ public String getFilterVersion() {
+ return filterVersion;
+ }
+
+ @Override
+ public void addFilterStartVersion(String filterStartVersion) {
+ this.filterStartVersion = filterStartVersion;
+ }
+
+ @Override
+ public String getFilterStartVersion() {
+ return filterStartVersion;
+ }
+
+ @Override
+ public void addFilterEndVersion(String filterEndVersion) {
+ this.filterEndVersion = filterEndVersion;
+ }
+
+ @Override
+ public String getFilterEndVersion() {
+ return filterEndVersion;
+ }
+
+ @Override
+ public void addFilterCreatedAfter(Long filterCreatedAfter) {
+ this.filterCreatedAfter = filterCreatedAfter;
+ }
+
+ @Override
+ public Long getFilterCreatedAfter() {
+ return filterCreatedAfter;
+ }
+
+ @Override
+ public void addFilterCreatedBefore(Long filterCreatedBefore) {
+ this.filterCreatedBefore = filterCreatedBefore;
+ }
+
+ @Override
+ public Long getFilterCreatedBefore() {
+ return filterCreatedBefore;
+ }
+
+ @Override
+ public void addFilterResourceId(Integer filterResourceId) {
+ this.filterResourceId = filterResourceId;
+ }
+
+ @Override
+ public Integer getFilterResourceId() {
+ return filterResourceId;
+ }
+
+ @Override
+ public void addFilterCategory(DriftChangeSetCategory filterCategory) {
+ this.filterCategory = filterCategory;
+ }
+
+ @Override
+ public DriftChangeSetCategory getFilterCategory() {
+ return filterCategory;
+ }
+
+ @Override
+ public void fetchDrifts(boolean fetchDrifts) {
+ this.fetchDrifts = fetchDrifts;
+ }
+
+ @Override
+ public boolean isFetchDrifts() {
+ return fetchDrifts;
+ }
+
+ @Override
+ public void addSortVersion(PageOrdering sortVersion) {
+ this.sortVersion = sortVersion;
+ }
+
+ @Override
+ public PageOrdering getSortVersion() {
+ return sortVersion;
+ }
+
+ @Override
+ public PageControl getPageControlOverrides() {
+ return pageControl;
+ }
+
+ @Override
+ public void setPageControl(PageControl pageControl) {
+ this.pageControl = pageControl;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java
new file mode 100644
index 0000000..b1a5695
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BasicDriftCriteria.java
@@ -0,0 +1,135 @@
+package org.rhq.core.domain.criteria;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+
+import static org.rhq.core.domain.util.CriteriaUtils.getListIgnoringNulls;
+
+public class BasicDriftCriteria implements DriftCriteria {
+
+ private static final long serialVersionUID = 1L;
+
+ private String filterId;
+
+ private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
+
+ private String filterChangeSetId;
+
+ private String filterPath;
+
+ private List<Integer> filterResourceIds = new ArrayList<Integer>();
+
+ private boolean fetchChangeSet;
+
+ private Long filterStartTime;
+
+ private Long filterEndTime;
+
+ private PageControl pageControl;
+
+ private PageOrdering sortCtime;
+
+ @Override
+ public void addFilterId(String filterId) {
+ this.filterId = filterId;
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId;
+ }
+
+ @Override
+ public void addFilterCategories(DriftCategory... filterCategories) {
+ this.filterCategories = getListIgnoringNulls(filterCategories);
+ }
+
+ @Override
+ public List<DriftCategory> getFilterCategories() {
+ return filterCategories;
+ }
+
+ @Override
+ public void addFilterChangeSetId(String filterChangeSetId) {
+ this.filterChangeSetId = filterChangeSetId;
+ }
+
+ @Override
+ public String getFilterChangeSetId() {
+ return filterChangeSetId;
+ }
+
+ @Override
+ public void addFilterPath(String filterPath) {
+ this.filterPath = filterPath;
+ }
+
+ @Override
+ public String getFilterPath() {
+ return filterPath;
+ }
+
+ @Override
+ public void addFilterResourceIds(Integer... filterResourceIds) {
+ this.filterResourceIds = getListIgnoringNulls(filterResourceIds);
+ }
+
+ @Override
+ public List<Integer> getFilterResourceIds() {
+ return filterResourceIds;
+ }
+
+ @Override
+ public void addFilterStartTime(Long filterStartTime) {
+ this.filterStartTime = filterStartTime;
+ }
+
+ @Override
+ public Long getFilterStartTime() {
+ return filterStartTime;
+ }
+
+ @Override
+ public void addFilterEndTime(Long filterEndTime) {
+ this.filterEndTime = filterEndTime;
+ }
+
+ @Override
+ public Long getFilterEndTime() {
+ return filterEndTime;
+ }
+
+ @Override
+ public void fetchChangeSet(boolean fetchChangeSet) {
+ this.fetchChangeSet = fetchChangeSet;
+ }
+
+ @Override
+ public boolean isFetchChangeSet() {
+ return fetchChangeSet;
+ }
+
+ @Override
+ public void addSortCtime(PageOrdering sortCtime) {
+ this.sortCtime = sortCtime;
+ }
+
+ @Override
+ public PageOrdering getSortCtime() {
+ return sortCtime;
+ }
+
+ @Override
+ public PageControl getPageControlOverrides() {
+ return pageControl;
+ }
+
+ @Override
+ public void setPageControl(PageControl pageControl) {
+ this.pageControl = pageControl;
+ }
+}
commit 956cbb899ed45301921c7ab3fc39a9e9eb67ce30
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 21:03:27 2011 -0400
Adding support in coregui for string ids
TableSection has a lot of code driven off of integer ids, and there are
a lots of subclasses. I started out trying to refactor it to support
string ids, but due to concerns over introducing regressions in existing
(and working) subclasses, I decided to introduce TableSection2 which
deals with string ids. After review, this code may get refactored or
altogether go away with the logic being merged into TableSection.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
index 10c15e4..378350d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
@@ -218,7 +218,7 @@ public class LinkManager {
return link;
}
- public static String getSubsystemDriftHistoryLink(int resourceId, int driftId) {
+ public static String getSubsystemDriftHistoryLink(int resourceId, String driftId) {
return "#Resource/" + resourceId + "/Drift/History/" + driftId;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection2.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection2.java
new file mode 100644
index 0000000..28beafe
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/TableSection2.java
@@ -0,0 +1,367 @@
+package org.rhq.enterprise.gui.coregui.client.components.table;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.user.client.History;
+import com.smartgwt.client.data.Criteria;
+import com.smartgwt.client.data.SortSpecifier;
+import com.smartgwt.client.types.AnimationEffect;
+import com.smartgwt.client.types.VerticalAlignment;
+import com.smartgwt.client.widgets.AnimationCallback;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.events.DoubleClickEvent;
+import com.smartgwt.client.widgets.events.DoubleClickHandler;
+import com.smartgwt.client.widgets.grid.CellFormatter;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.layout.VLayout;
+
+import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.DetailsView;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.buttons.BackButton;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+
+public abstract class TableSection2 <DS extends RPCDataSource> extends Table<DS> implements BookmarkableView {
+
+ private VLayout detailsHolder;
+ private Canvas detailsView;
+ private String basePath;
+ private boolean escapeHtmlInDetailsLinkColumn;
+ private boolean initialDisplay;
+
+ protected TableSection2(String locatorId, String tableTitle) {
+ super(locatorId, tableTitle);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, Criteria criteria) {
+ super(locatorId, tableTitle, criteria);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers) {
+ super(locatorId, tableTitle, sortSpecifiers, criteria);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, boolean autoFetchData) {
+ super(locatorId, tableTitle, autoFetchData);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, null, sortSpecifiers, excludedFieldNames);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames);
+ }
+
+ protected TableSection2(String locatorId, String tableTitle, Criteria criteria, SortSpecifier[] sortSpecifiers,
+ String[] excludedFieldNames, boolean autoFetchData) {
+ super(locatorId, tableTitle, criteria, sortSpecifiers, excludedFieldNames, autoFetchData);
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ this.initialDisplay = true;
+
+ detailsHolder = new LocatableVLayout(extendLocatorId("tableSection"));
+ detailsHolder.setAlign(VerticalAlignment.TOP);
+ //detailsHolder.setWidth100();
+ //detailsHolder.setHeight100();
+ detailsHolder.setMargin(4);
+ detailsHolder.hide();
+
+ addMember(detailsHolder);
+
+ // if the detailsView is already defined it means we want the details view to be rendered prior to
+ // the master view, probably due to a direct navigation or refresh (like F5 when sitting on the details page)
+ if (null != detailsView) {
+ switchToDetailsView();
+ }
+ }
+
+ /**
+ * The default implementation wraps the {@link #getDetailsLinkColumnCellFormatter()} column with the
+ * {@link #getDetailsLinkColumnCellFormatter()}. This is typically the 'name' column linking to the detail
+ * view, given the 'id'. Also, establishes a double click handler for the row which invokes
+ * {@link #showDetails(com.smartgwt.client.widgets.grid.ListGridRecord)}</br>
+ * </br>
+ * In general, in overrides, call super.configureTable *after* manipulating the ListGrid fields.
+ *
+ * @see org.rhq.enterprise.gui.coregui.client.components.table.Table#configureTable()
+ */
+ @Override
+ protected void configureTable() {
+ if (isDetailsEnabled()) {
+ ListGrid grid = getListGrid();
+
+ // Make the value of some specific field a link to the details view for the corresponding record.
+ ListGridField field = (grid != null) ? grid.getField(getDetailsLinkColumnName()) : null;
+ if (field != null) {
+ field.setCellFormatter(getDetailsLinkColumnCellFormatter());
+ }
+
+ setListGridDoubleClickHandler(new DoubleClickHandler() {
+ @Override
+ public void onDoubleClick(DoubleClickEvent event) {
+ ListGrid listGrid = (ListGrid) event.getSource();
+ ListGridRecord[] selectedRows = listGrid.getSelection();
+ if (selectedRows != null && selectedRows.length == 1) {
+ showDetails(selectedRows[0]);
+ }
+ }
+ });
+ }
+ }
+
+ protected boolean isDetailsEnabled() {
+ return true;
+ }
+
+ public void setEscapeHtmlInDetailsLinkColumn(boolean escapeHtmlInDetailsLinkColumn) {
+ this.escapeHtmlInDetailsLinkColumn = escapeHtmlInDetailsLinkColumn;
+ }
+
+ /**
+ * Override if you don't want FIELD_NAME to be wrapped ina link.
+ * @return the name of the field to be wrapped, or null if no field should be wrapped.
+ */
+ protected String getDetailsLinkColumnName() {
+ return FIELD_NAME;
+ }
+
+ /**
+ * Override if you don't want the detailsLinkColumn to have the default link wrapper.
+ * @return the desired CellFormatter.
+ */
+ protected CellFormatter getDetailsLinkColumnCellFormatter() {
+ return new CellFormatter() {
+ public String format(Object value, ListGridRecord record, int i, int i1) {
+ if (value == null) {
+ return "";
+ }
+ String recordId = getId(record);
+ String detailsUrl = "#" + getBasePath() + "/" + recordId;
+ String formattedValue = (escapeHtmlInDetailsLinkColumn) ? StringUtility.escapeHtml(value.toString())
+ : value.toString();
+ return SeleniumUtility.getLocatableHref(detailsUrl, formattedValue, null);
+ }
+ };
+ }
+
+ /**
+ * Shows the details view for the given record of the table.
+ *
+ * The default implementation of this method assumes there is an
+ * id attribute on the record and passes it to {@link #showDetails(String)}.
+ * Subclasses are free to override this behavior. Subclasses usually
+ * will need to set the {@link #setDetailsView(Canvas) details view}
+ * explicitly.
+ *
+ * @param record the record whose details are to be shown
+ */
+ public void showDetails(ListGridRecord record) {
+ if (record == null) {
+ throw new IllegalArgumentException("'record' parameter is null.");
+ }
+
+ String id = getId(record);
+ showDetails(id);
+ }
+
+ /**
+ * Returns the details canvas with information on the item given its list grid record.
+ *
+ * The default implementation of this method is to assume there is an
+ * id attribute on the record and pass that ID to {@link #getDetailsView(String)}.
+ * Subclasses are free to override this - which you usually want to do
+ * if you know the full details of the item are stored in the record attributes
+ * and thus help avoid making a round trip to the DB.
+ *
+ * @param record the record of the item whose details to be shown; ; null if empty details view should be shown.
+ */
+ public Canvas getDetailsView(ListGridRecord record) {
+ String id = getId(record);
+ return getDetailsView(id);
+ }
+
+ protected String getId(ListGridRecord record) {
+ String id = null;
+ if (record != null) {
+ id = record.getAttribute("id");
+ }
+ if (id == null || id.length() == 0) {
+ String msg = MSG.view_tableSection_error_noId(this.getClass().toString());
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalStateException(msg);
+ }
+ return id;
+ }
+
+ /**
+ * Shows empty details for a new item being created.
+ * This method is usually called when a user clicks a 'New' button.
+ *
+ * @see #showDetails(ListGridRecord)
+ */
+ public void newDetails() {
+ History.newItem(basePath + "/0");
+ }
+
+ /**
+ * Shows the details for an item has the given ID.
+ * This method is usually called when a user goes to the details
+ * page via a bookmark, double-cick on a list view row, or direct link.
+ *
+ * @param id the id of the row whose details are to be shown; Should be a valid id.
+ *
+ * @see #showDetails(ListGridRecord)
+ *
+ * @throws IllegalArgumentException if id is null or empty string
+ */
+ public void showDetails(String id) {
+ if (id == null || id.length() == 0) {
+ History.newItem(basePath + "/" + id);
+ } else {
+ String msg = MSG.view_tableSection_error_badId(this.getClass().toString(), id);
+ CoreGUI.getErrorHandler().handleError(msg);
+ throw new IllegalArgumentException(msg);
+ }
+ }
+
+ /**
+ * Returns the details canvas with information on the item that has the given ID.
+ * Note that an empty details view should be returned if the id passed in is 0 (as would
+ * be the case if a new item is to be created using the details view).
+ *
+ * @param id the id of the details to be shown; will be null if an empty details view should be shown.
+ */
+ public abstract Canvas getDetailsView(String id);
+
+ @Override
+ public void renderView(ViewPath viewPath) {
+ this.basePath = viewPath.getPathToCurrent();
+
+ if (!viewPath.isEnd()) {
+ String id = viewPath.getCurrent().getPath();
+ this.detailsView = getDetailsView(id);
+ if (this.detailsView instanceof BookmarkableView) {
+ ((BookmarkableView) this.detailsView).renderView(viewPath);
+ }
+ switchToDetailsView();
+ } else {
+ switchToTableView();
+ }
+ }
+
+ protected String getBasePath() {
+ return this.basePath;
+ }
+
+ /**
+ * For use by subclasses that want to define their own details view.
+ *
+ * @param detailsView the new details view
+ */
+ protected void setDetailsView(Canvas detailsView) {
+ this.detailsView = detailsView;
+ }
+
+ /**
+ * Switches to viewing the details canvas, hiding the table. This does not
+ * do anything with reloading data or switching to the selected row in the table;
+ * this only changes the visibility of canvases.
+ */
+ protected void switchToDetailsView() {
+ Canvas contents = getTableContents();
+
+ // If the Table has not yet been initialized then ignore
+ if (contents != null) {
+ if (contents.isVisible()) {
+ contents.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
+ @Override
+ public void execute(boolean b) {
+ buildDetailsView();
+ }
+ });
+ } else {
+ /*
+ * if the programmer chooses to go directly from the detailView in create-mode to the
+ * detailsView in edit-mode, the content canvas will already be hidden, which means the
+ * animateHide would be a no-op (the event won't fire). this causes the detailsHolder
+ * to keep a reference to the previous detailsView (the one in create-mode) instead of the
+ * newly returned reference from getDetailsView(String) that was called when the renderView
+ * methods were called hierarchically down to render the new detailsView in edit-mode.
+ * therefore, we need to explicitly destroy what's already there (presumably the detailsView
+ * in create-mode), and then rebuild it (presumably the detailsView in edit-mode).
+ */
+ SeleniumUtility.destroyMembers(detailsHolder);
+
+ buildDetailsView();
+ }
+ }
+ }
+
+ private void buildDetailsView() {
+ detailsView.setWidth100();
+ detailsView.setHeight100();
+
+ boolean isEditable = (detailsView instanceof DetailsView && ((DetailsView) detailsView).isEditable());
+ if (!isEditable) {
+ // Only add the "Back to List" button if the details are definitely not editable, because if they are
+ // editable, a Cancel button should already be provided by the details view.
+ BackButton backButton = new BackButton(extendLocatorId("BackButton"), MSG.view_tableSection_backButton(),
+ basePath);
+ detailsHolder.addMember(backButton);
+ VLayout verticalSpacer = new LocatableVLayout(extendLocatorId("verticalSpacer"));
+ verticalSpacer.setHeight(8);
+ detailsHolder.addMember(verticalSpacer);
+ }
+
+ detailsHolder.addMember(detailsView);
+ detailsHolder.animateShow(AnimationEffect.WIPE);
+ }
+
+ /**
+ * Switches to viewing the table, hiding the details canvas.
+ */
+ protected void switchToTableView() {
+ final Canvas contents = getTableContents();
+ if (contents != null) {
+ // If this is not the initial display of the table, refresh the table's data. Otherwise, a refresh would be
+ // redundant, since the data was just loaded when the table was drawn.
+ if (this.initialDisplay) {
+ this.initialDisplay = false;
+ } else {
+ Log.debug("Refreshing data for Table [" + getClass().getName() + "]...");
+ refresh();
+ }
+ if (detailsHolder != null && detailsHolder.isVisible()) {
+ detailsHolder.animateHide(AnimationEffect.WIPE, new AnimationCallback() {
+ @Override
+ public void execute(boolean b) {
+ SeleniumUtility.destroyMembers(detailsHolder);
+
+ contents.animateShow(AnimationEffect.WIPE);
+ }
+ });
+ } else {
+ contents.animateShow(AnimationEffect.WIPE);
+ }
+ }
+ }
+
+
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index 5563a8c..0e3f7ed 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -302,7 +302,7 @@ public class DriftDataSource extends RPCDataSource<DriftComposite, DriftCriteria
public static ListGridRecord convert(DriftComposite from) {
ListGridRecord record = new ListGridRecord();
Drift drift = from.getDrift();
- record.setAttribute(ATTR_ID, Integer.valueOf(drift.getId()));
+ record.setAttribute(ATTR_ID, drift.getId());
record.setAttribute(ATTR_CTIME, new Date(drift.getCtime()));
record.setAttribute(ATTR_CATEGORY, ImageManager.getDriftCategoryIcon(drift.getCategory()));
record.setAttribute(ATTR_PATH, drift.getPath());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
index a608f8f..f00640a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
@@ -44,7 +44,7 @@ import org.rhq.enterprise.gui.coregui.client.components.form.EnumSelectItem;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
-import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
+import org.rhq.enterprise.gui.coregui.client.components.table.TableSection2;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -62,7 +62,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
*
* @author Jay Shaughnessy
*/
-public class DriftHistoryView extends TableSection<DriftDataSource> {
+public class DriftHistoryView extends TableSection2<DriftDataSource> {
public static final ViewName SUBSYSTEM_VIEW_ID = new ViewName("RecentDrifts", MSG.common_title_recent_drifts());
@@ -155,7 +155,7 @@ public class DriftHistoryView extends TableSection<DriftDataSource> {
return new CellFormatter() {
public String format(Object value, ListGridRecord record, int i, int i1) {
Integer resourceId = record.getAttributeAsInt(AncestryUtil.RESOURCE_ID);
- Integer driftId = getId(record);
+ String driftId = getId(record);
String url = LinkManager.getSubsystemDriftHistoryLink(resourceId, driftId);
String formattedValue = TimestampCellFormatter.format(value);
return SeleniumUtility.getLocatableHref(url, formattedValue, null);
@@ -283,8 +283,9 @@ public class DriftHistoryView extends TableSection<DriftDataSource> {
// });
// }
+
@Override
- public Canvas getDetailsView(int driftId) {
+ public Canvas getDetailsView(String driftId) {
return DriftDetailsView.getInstance();
}
commit b6c8e5e261b4662afcd71dbdb99d1be2a50e3596
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 16:09:13 2011 -0400
Updating drift-mongodb plugin to use drift DTOs
The drift-mongodb plugin defines its own implementations of the Drift
entities. Those entities live inside the drift-mongodb plugin and
consequently are not known or usable from coregui. Drift server plugins
will have to go through the DTO layer to ensure compatibility with
coregui.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java
index 68a5ff7..4ace8d1 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java
@@ -1,12 +1,15 @@
package org.rhq.core.domain.drift.dto;
+import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
-public class DriftChangeSetDTO implements DriftChangeSet<DriftDTO> {
+public class DriftChangeSetDTO implements DriftChangeSet<DriftDTO>, Serializable {
+
+ private static final long serialVersionUID = 1L;
private String id;
@@ -37,6 +40,10 @@ public class DriftChangeSetDTO implements DriftChangeSet<DriftDTO> {
return ctime;
}
+ public void setCtime(Long ctime) {
+ this.ctime = ctime;
+ }
+
@Override
public int getVersion() {
return version;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java
index adc5c52..a75858f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java
@@ -1,9 +1,13 @@
package org.rhq.core.domain.drift.dto;
+import java.io.Serializable;
+
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
-public class DriftDTO implements Drift<DriftChangeSetDTO, DriftFileDTO> {
+public class DriftDTO implements Drift<DriftChangeSetDTO, DriftFileDTO>, Serializable {
+
+ private static final long serialVersionUID = 1L;
private String id;
@@ -34,6 +38,10 @@ public class DriftDTO implements Drift<DriftChangeSetDTO, DriftFileDTO> {
return ctime;
}
+ public void setCtime(Long ctime) {
+ this.ctime = ctime;
+ }
+
@Override
public DriftChangeSetDTO getChangeSet() {
return changeSet;
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index 2b3aca0..c90594a 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -31,6 +31,8 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.drift.dto.DriftChangeSetDTO;
+import org.rhq.core.domain.drift.dto.DriftDTO;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
@@ -135,9 +137,9 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
Map<Integer, Resource> resources = loadResourceMap(subject, criteria.getFilterResourceIds());
for (MongoDBChangeSet changeSet : query) {
+ DriftChangeSetDTO changeSetDTO = toDTO(changeSet);
for (MongoDBChangeSetEntry entry : changeSet.getDrifts()) {
- entry.setChangeSet(changeSet);
- results.add(new DriftComposite(entry, resources.get(changeSet.getResourceId())));
+ results.add(new DriftComposite(toDTO(entry, changeSetDTO), resources.get(changeSet.getResourceId())));
}
}
@@ -163,4 +165,26 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
return map;
}
+
+ DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) {
+ DriftChangeSetDTO dto = new DriftChangeSetDTO();
+ dto.setId(changeSet.getId());
+ dto.setDriftConfigurationId(changeSet.getDriftConfigurationId());
+ dto.setVersion(changeSet.getVersion());
+ dto.setCtime(changeSet.getCtime());
+ dto.setCategory(changeSet.getCategory());
+
+ return dto;
+ }
+
+ DriftDTO toDTO(MongoDBChangeSetEntry entry, DriftChangeSetDTO changeSetDTO) {
+ DriftDTO dto = new DriftDTO();
+ dto.setChangeSet(changeSetDTO);
+ dto.setId(entry.getId());
+ dto.setCtime(entry.getCtime());
+ dto.setPath(entry.getPath());
+ dto.setCategory(entry.getCategory());
+
+ return dto;
+ }
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
index 2818b2c..bcf9f5c 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
@@ -7,6 +7,7 @@ import java.util.Set;
import com.google.code.morphia.annotations.Embedded;
import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
+import com.google.code.morphia.annotations.PostLoad;
import org.bson.types.ObjectId;
@@ -103,6 +104,7 @@ public class MongoDBChangeSet implements DriftChangeSet<MongoDBChangeSetEntry>,
public MongoDBChangeSet add(MongoDBChangeSetEntry entry) {
entries.add(entry);
+ entry.setChangeSet(this);
return this;
}
@@ -110,4 +112,11 @@ public class MongoDBChangeSet implements DriftChangeSet<MongoDBChangeSetEntry>,
public void setDrifts(Set<MongoDBChangeSetEntry> drifts) {
entries = drifts;
}
+
+ @PostLoad
+ void initEntries() {
+ for (MongoDBChangeSetEntry entry : entries) {
+ entry.setChangeSet(this);
+ }
+ }
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
index ced7bff..dddfb02 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
@@ -3,6 +3,7 @@ package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
import java.io.Serializable;
import com.google.code.morphia.annotations.Embedded;
+import com.google.code.morphia.annotations.Transient;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
@@ -18,6 +19,9 @@ public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFil
private String path;
+ @Transient
+ private MongoDBChangeSet changeSet;
+
public MongoDBChangeSetEntry() {
}
@@ -28,7 +32,7 @@ public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFil
@Override
public String getId() {
- return null;
+ return changeSet.getId() + ":" + path;
}
@Override
@@ -37,16 +41,17 @@ public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFil
@Override
public Long getCtime() {
- return null;
+ return ctime;
}
@Override
public MongoDBChangeSet getChangeSet() {
- return null;
+ return changeSet;
}
@Override
public void setChangeSet(MongoDBChangeSet changeSet) {
+ this.changeSet = changeSet;
}
@Override
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
index b5b8306..6aff9aa 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
@@ -9,7 +9,8 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
+import org.rhq.core.domain.drift.DriftCategory;
+
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.rhq.test.AssertUtils.assertPropertiesMatch;
@@ -32,7 +33,7 @@ public class MongoDBChangeSetTest {
.map(MongoDBChangeSetEntry.class)
.map(MongoDBFile.class);
- ds = morphia.createDatastore(connection, "rhq");
+ ds = morphia.createDatastore(connection, "rhqtest");
}
@BeforeMethod
@@ -59,7 +60,7 @@ public class MongoDBChangeSetTest {
public void saveAndLoadChangeSetWithOneEntry() throws Exception {
MongoDBChangeSet expected = new MongoDBChangeSet();
expected.setResourceId(10001);
- expected.getDrifts().add(new MongoDBChangeSetEntry("foo", FILE_ADDED));
+ expected.add(new MongoDBChangeSetEntry("foo", DriftCategory.FILE_ADDED));
ds.save(expected);
@@ -67,7 +68,8 @@ public class MongoDBChangeSetTest {
assertNotNull(expected, "Failed to load change set");
assertPropertiesMatch("Failed to save change set", expected, actual, "drifts");
- assertCollectionMatchesNoOrder(expected.getDrifts(), actual.getDrifts(), "Failed to save change set entries");
+ assertCollectionMatchesNoOrder("Failed to save change set entries", expected.getDrifts(), actual.getDrifts(),
+ "changeSet");
}
}
diff --git a/modules/test-utils/src/main/java/org/rhq/test/AssertUtils.java b/modules/test-utils/src/main/java/org/rhq/test/AssertUtils.java
index fc41623..7524fc8 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/AssertUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/AssertUtils.java
@@ -23,13 +23,14 @@
package org.rhq.test;
-import static org.testng.Assert.*;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
public class AssertUtils {
/**
@@ -123,4 +124,16 @@ public class AssertUtils {
assertTrue(result.isMatch(), msg + " -- " + result.getDetails());
}
+ public static <T> void assertCollectionMatchesNoOrder(String msg, Collection<T> expected, Collection<T> actual,
+ String... ignoredProperties) {
+ CollectionMatchesChecker<T> checker = new CollectionMatchesChecker<T>();
+ checker.setExpected(expected);
+ checker.setActual(actual);
+ checker.setIgnoredProperties(ignoredProperties);
+
+ MatchResult result = checker.execute();
+
+ assertTrue(result.isMatch(), msg + " -- " + result.getDetails());
+ }
+
}
diff --git a/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java b/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
index 26b75c9..622108f 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/CollectionMatchesChecker.java
@@ -2,7 +2,11 @@ package org.rhq.test;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
+
+import static junitx.util.Converter.asList;
public class CollectionMatchesChecker<T> {
@@ -10,6 +14,8 @@ public class CollectionMatchesChecker<T> {
private Collection<T> actual;
+ private Set<String> ignoredProperties = new HashSet<String>();
+
public void setExpected(Collection<T> expected) {
this.expected = expected;
}
@@ -18,6 +24,10 @@ public class CollectionMatchesChecker<T> {
this.actual = actual;
}
+ public void setIgnoredProperties(String... ignoredProperties) {
+ this.ignoredProperties.addAll(asList(ignoredProperties));
+ }
+
public MatchResult execute() {
boolean isMatch = true;
StringBuilder details = new StringBuilder();
@@ -63,6 +73,7 @@ public class CollectionMatchesChecker<T> {
PropertyMatcher<T> matcher = new PropertyMatcher<T>();
matcher.setExpected(elementToSearchFor);
matcher.setActual(actual);
+ matcher.setIgnoredProperties(ignoredProperties);
MatchResult result = matcher.execute();
if (result.isMatch()) {
commit e3ac67735346a310e142e7ed28fb65126e26e440
Merge: 5d5f12b fb4f3a1
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 09:13:44 2011 -0400
Merge branch 'drift' into drift-mongodb
commit fb4f3a1cfdf55801cf74293fe05a626af98c33b9
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 09:11:14 2011 -0400
fix typo and remove gwt library that was only for prototyping
diff --git a/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar b/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar
deleted file mode 100644
index e8a10a6..0000000
Binary files a/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar and /dev/null differ
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
index 229183d..a039930 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
@@ -201,7 +201,7 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot
}
private Map<String, String> getDriftServerPlugins() {
- DriftServerPluginManager pluginMgr = getDriftSererPluginManager();
+ DriftServerPluginManager pluginMgr = getDriftServerPluginManager();
Map<String, String> plugins = new HashMap<String, String>();
for (ServerPluginEnvironment env : pluginMgr.getPluginEnvironments()) {
@@ -211,7 +211,7 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot
return plugins;
}
- private DriftServerPluginManager getDriftSererPluginManager() {
+ private DriftServerPluginManager getDriftServerPluginManager() {
MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
if (masterPC == null) {
log.warn(MasterServerPluginContainer.class.getSimpleName() + " is not started yet");
commit 5d5f12b94c665c3c28841a56d58e633cd612d687
Merge: e753a90 b384576
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 09:07:41 2011 -0400
Merge branch 'drift' into drift-mongodb
commit b384576d06abbfea2a6263f528ddaa3d5b74a9df
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 28 08:51:03 2011 -0400
Need to use strings for ids and not integers
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 278a0d9..2582a49 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -20,8 +20,6 @@
package org.rhq.enterprise.gui.coregui.client.drift;
-import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
-
import java.util.LinkedHashMap;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -41,6 +39,8 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
+
/**
* @author Jay Shaughnessy
*/
@@ -161,7 +161,7 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
@Override
public void renderView(ViewPath viewPath) {
- driftId = Integer.toString(viewPath.getCurrentAsInt());
+ driftId = viewPath.getCurrent().getPath();
show(driftId);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
index 63037c1..db51c99 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
@@ -51,7 +51,6 @@ public class RHQConstants {
// DRIFT Server properties
public static final String ACTIVE_DRIFT_PLUGIN = "ACTIVE_DRIFT_PLUGIN";
- public static final String DRIFT_PLUGINS = "DRIFT_PLUGINS";
// Base URL for the application - (i think this is only used for alert emails)
public static final String BaseURL = "CAM_BASE_URL";
commit 6e60760d3f00f3498a02d6ecfb3547da9e5940e6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Jul 27 15:17:52 2011 -0400
context menu on change set node
multiple select tree nodes
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 6085af1..8203361 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -47,7 +47,6 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -67,7 +66,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// fetch the top nodes at the inital onDraw()
setAutoFetchData(true);
setAnimateFolders(false);
- setSelectionType(SelectionStyle.SINGLE);
+ setSelectionType(SelectionStyle.MULTIPLE);
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
@@ -96,9 +95,10 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
TreeNode eventNode = event.getNode();
if (eventNode instanceof ChangeSetTreeNode) {
- CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ Menu menu = buildChangeSetTreeNodeContextMenu((ChangeSetTreeNode) eventNode);
+ menu.showContextMenu();
} else if (eventNode instanceof DriftTreeNode) {
- Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ Menu menu = buildDriftTreeNodeContextMenu((DriftTreeNode) eventNode);
menu.showContextMenu();
}
}
@@ -171,12 +171,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @param node the drift node whose menu is to be displayed
* @return the context menu to display
*/
- protected Menu buildContextMenu(final DriftTreeNode node) {
+ protected Menu buildDriftTreeNodeContextMenu(final DriftTreeNode node) {
Menu contextMenu = new Menu();
// title
- String titleName = node.getName();
+ String titleName = node.getTitle();
if (titleName.length() > 50) {
// make sure the title isn't really long so the menu is not abnormally wide
titleName = "..." + titleName.substring(titleName.length() - 50);
@@ -204,6 +204,36 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
}
/**
+ * Builds the right-mouse-click context menu for the given change set node
+ * @param node the change set node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildChangeSetTreeNodeContextMenu(final ChangeSetTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getTitle();
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem deleteItem = new MenuItem(MSG.common_button_delete());
+ deleteItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ // TODO: delete the change set
+ }
+ });
+ contextMenu.addItem(deleteItem);
+
+ return contextMenu;
+ }
+
+ /**
* We override this because we know all of our nodes will have titles. Without this,
* I could not get the title of change set nodes to show - it always fell back to using
* the name. This way is at least faster, since we don't do any conditional checking,
commit 0dd75a22859b78cb31da25e14f986497d3a2b700
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 27 14:50:44 2011 -0400
Making the active drift server plugin configurable via system settings
When a drift serer plugin is loaded or unloaded, it is added to or
removed from the systems settings. When the DriftServerBean (SLSB
layers) asks for the drift plugin, the DriftServerPlugin queries the
system settings to find the active drift server plugin. The drift-rhq
plugin is active by default.
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index 349b84c..b385473 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -143,7 +143,7 @@ public class JPAUtils {
em.createNativeQuery("delete from rhq_measurement_sched");
em.createNativeQuery("delete from rhq_measurement_def");
em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57, 58)");
em.createNativeQuery("delete from rhq_alert_notification");
em.createNativeQuery("delete from rhq_alert_condition_log");
em.createNativeQuery("delete from rhq_alert");
commit 9fb6a02ecb51d1caedd4e7c7567a8414c3294e7f
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 21:22:19 2011 -0400
Persist drift detection schedule across agent restarts
This commit add functionality for persisting drift detection schedules
across restarts. When the agent is shutting down and the inventory is
persisted to disk, the schedules are now written out to disk along with
the rest of the inventory.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index f499697..879ceca 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -67,11 +67,36 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
driftDetector.setChangeSetManager(changeSetMgr);
driftDetector.setDriftClient(this);
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ initSchedules(inventoryMgr.getPlatform(), inventoryMgr);
+
driftThreadPool = new ScheduledThreadPoolExecutor(5);
// TODO Make the drift detection rate configurable
driftThreadPool.scheduleAtFixedRate(driftDetector, 30, 60, TimeUnit.SECONDS);
}
+ private void initSchedules(Resource r, InventoryManager inventoryMgr) {
+ if (r.getId() == 0) {
+ log.debug("Will not reschedule drift detection schedules for " + r + ". It is not sync'ed yet.");
+ return;
+ }
+
+ ResourceContainer container = inventoryMgr.getResourceContainer(r.getId());
+ if (container == null) {
+ log.debug("No resource container found for " + r + ". Unable to reschedule drift detection schedules.");
+ return;
+ }
+
+ log.debug("Rescheduling drift detection schedules for " + r);
+ for (DriftDetectionSchedule schedule : container.getDriftSchedules()) {
+ schedulesQueue.addSchedule(schedule);
+ }
+
+ for (Resource child : r.getChildResources()) {
+ initSchedules(child, inventoryMgr);
+ }
+ }
+
@Override
public void shutdown() {
driftThreadPool.shutdown();
@@ -164,8 +189,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
- return false;
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
+ return schedule;
}
@Override
@@ -208,9 +233,16 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
- if (!updated) {
- schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
+ if (updatedSchedule == null) {
+ updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
+ schedulesQueue.addSchedule(updatedSchedule);
+ }
+
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ ResourceContainer container = inventoryMgr.getResourceContainer(resourceId);
+ if (container != null) {
+ container.getDriftSchedules().add(updatedSchedule);
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index ca7edc5..374e27e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -38,7 +38,7 @@ public interface ScheduleQueue {
* Adds a schedule to the queue for processing by the drift detector
*
* @param schedule A {@link DriftDetectionSchedule} object
- * @return true if the schedule is added, falsed otherwise
+ * @return true if the schedule is added, false otherwise
*/
boolean addSchedule(DriftDetectionSchedule schedule);
@@ -52,9 +52,9 @@ public interface ScheduleQueue {
*
* @param resourceId The resource id
* @param config A {@link DriftConfiguration} belonging the resource with the specified id
- * @return true if the schedule is updated, false otherwise.
+ * @return A copy of the updated schedule or null if no update was performed
*/
- boolean update(int resourceId, DriftConfiguration config);
+ DriftDetectionSchedule update(int resourceId, DriftConfiguration config);
/**
* Removes the schedule identified by the resource id and the drift configuration. More
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 499ad91..b4a2f00 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -112,20 +112,26 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
try {
lock.writeLock().lock();
if (isActiveSchedule(resourceId, config)) {
update(activeSchedule, config);
- } else {
- DriftDetectionSchedule schedule = remove(resourceId, config);
- if (schedule == null) {
- return false;
- }
- update(schedule, config);
- queue.offer(schedule);
+ return activeSchedule.copy();
+ }
+
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return null;
}
- return true;
+
+ update(schedule, config);
+
+ if (queue.offer(schedule)) {
+ return schedule.copy();
+ }
+
+ return null;
} finally {
lock.writeLock().unlock();
}
commit 9cbb6031b3327b953f2a235d149e73c2cfccc2b1
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 18:31:39 2011 -0400
tweek folder icons for drift
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
index fdda214..e728bc8 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
index 358cf61..1ca204f 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit 1a9ff3317ece2ee10c8c0769174c165324785f8e
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 16:14:26 2011 -0400
Adding support for updating drift configs
When the server sends a request to the agent to update a drift
configuration, that config is attached to a schedule which is in one of
two places. It is either on the schedule queue or it is "active"
schedule currently being processed by the drift detector. The config
update will be applied such that the next time the drift detector
processes the schedule the update will take effect.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index b92dd7c..153e5a9 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -47,52 +47,44 @@ public class DriftDetector implements Runnable {
@Override
public void run() {
- DriftDetectionSchedule schedule = scheduleQueue.dequeue();
+ DriftDetectionSchedule schedule = scheduleQueue.getNextSchedule();
if (schedule == null) {
return;
}
- if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- if (!schedule.getDriftConfiguration().getEnabled()) {
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- DriftConfiguration driftConfig = schedule.getDriftConfiguration();
- int resourceId = schedule.getResourceId();
- DriftChangeSetCategory changeSetType = null;
- int changes = 0;
-
try {
- if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
- basedir(resourceId, driftConfig), COVERAGE))) {
- changeSetType = DRIFT;
- changes = generateDriftChangeSet(schedule);
- } else {
- changeSetType = COVERAGE;
- generateCoverageChangeSet(schedule);
+ if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
+ return;
}
- } catch (IOException e) {
- // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
- log.error("An error occurred while scanning for drift", e);
- }
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ return;
+ }
- if (changeSetType == COVERAGE || changes > 0) {
- driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ DriftConfiguration driftConfig = schedule.getDriftConfiguration();
+ int resourceId = schedule.getResourceId();
+ DriftChangeSetCategory changeSetType = null;
+ int changes = 0;
+
+ try {
+ if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
+ basedir(resourceId, driftConfig), COVERAGE))) {
+ changeSetType = DRIFT;
+ changes = generateDriftChangeSet(schedule);
+ } else {
+ changeSetType = COVERAGE;
+ generateCoverageChangeSet(schedule);
+ }
+ } catch (IOException e) {
+ // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
+ log.error("An error occurred while scanning for drift", e);
+ }
+
+ if (changeSetType == COVERAGE || changes > 0) {
+ driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ }
+ } finally {
+ scheduleQueue.deactivateSchedule();
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 879ceca..f499697 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -67,36 +67,11 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
driftDetector.setChangeSetManager(changeSetMgr);
driftDetector.setDriftClient(this);
- InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
- initSchedules(inventoryMgr.getPlatform(), inventoryMgr);
-
driftThreadPool = new ScheduledThreadPoolExecutor(5);
// TODO Make the drift detection rate configurable
driftThreadPool.scheduleAtFixedRate(driftDetector, 30, 60, TimeUnit.SECONDS);
}
- private void initSchedules(Resource r, InventoryManager inventoryMgr) {
- if (r.getId() == 0) {
- log.debug("Will not reschedule drift detection schedules for " + r + ". It is not sync'ed yet.");
- return;
- }
-
- ResourceContainer container = inventoryMgr.getResourceContainer(r.getId());
- if (container == null) {
- log.debug("No resource container found for " + r + ". Unable to reschedule drift detection schedules.");
- return;
- }
-
- log.debug("Rescheduling drift detection schedules for " + r);
- for (DriftDetectionSchedule schedule : container.getDriftSchedules()) {
- schedulesQueue.addSchedule(schedule);
- }
-
- for (Resource child : r.getChildResources()) {
- initSchedules(child, inventoryMgr);
- }
- }
-
@Override
public void shutdown() {
driftThreadPool.shutdown();
@@ -189,8 +164,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
- return schedule;
+ public boolean update(int resourceId, DriftConfiguration config) {
+ return false;
}
@Override
@@ -233,16 +208,9 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
- if (updatedSchedule == null) {
- updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
- schedulesQueue.addSchedule(updatedSchedule);
- }
-
- InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
- ResourceContainer container = inventoryMgr.getResourceContainer(resourceId);
- if (container != null) {
- container.getDriftSchedules().add(updatedSchedule);
+ boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
+ if (!updated) {
+ schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index 374e27e..ca7edc5 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -38,7 +38,7 @@ public interface ScheduleQueue {
* Adds a schedule to the queue for processing by the drift detector
*
* @param schedule A {@link DriftDetectionSchedule} object
- * @return true if the schedule is added, false otherwise
+ * @return true if the schedule is added, falsed otherwise
*/
boolean addSchedule(DriftDetectionSchedule schedule);
@@ -52,9 +52,9 @@ public interface ScheduleQueue {
*
* @param resourceId The resource id
* @param config A {@link DriftConfiguration} belonging the resource with the specified id
- * @return A copy of the updated schedule or null if no update was performed
+ * @return true if the schedule is updated, false otherwise.
*/
- DriftDetectionSchedule update(int resourceId, DriftConfiguration config);
+ boolean update(int resourceId, DriftConfiguration config);
/**
* Removes the schedule identified by the resource id and the drift configuration. More
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index b4a2f00..499ad91 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -112,26 +112,20 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
- public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
+ public boolean update(int resourceId, DriftConfiguration config) {
try {
lock.writeLock().lock();
if (isActiveSchedule(resourceId, config)) {
update(activeSchedule, config);
- return activeSchedule.copy();
- }
-
- DriftDetectionSchedule schedule = remove(resourceId, config);
- if (schedule == null) {
- return null;
- }
-
- update(schedule, config);
-
- if (queue.offer(schedule)) {
- return schedule.copy();
+ } else {
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return false;
+ }
+ update(schedule, config);
+ queue.offer(schedule);
}
-
- return null;
+ return true;
} finally {
lock.writeLock().unlock();
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 9b62422..49dab54 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -58,7 +58,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("coverage-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
File changeSet = changeSet(driftConfig.getName(), COVERAGE);
@@ -77,12 +77,12 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("basedir-entry-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId(), driftConfig);
- scheduleQueue.enqueue(schedule);
+ scheduleQueue.addSchedule(schedule);
detector.run();
assertChangeSetContainsDirEntry(changeSet(driftConfig.getName(), COVERAGE),
@@ -102,7 +102,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("multiple-files-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -127,7 +127,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("sibling-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -153,7 +153,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("nested-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -188,7 +188,7 @@ public class DriftDetectorTest extends DriftTest {
File server1Conf = new File(confDir, "server-1.conf");
touch(server1Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
}
@@ -217,7 +217,7 @@ public class DriftDetectorTest extends DriftTest {
File server2Conf = new File(confDir, "server-2.conf");
touch(server2Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
@@ -266,7 +266,7 @@ public class DriftDetectorTest extends DriftTest {
// create some drift
server2Conf.delete();
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
commit 3dbd0ceb341cf3ad9332c791ba8a3ebb3febdaff
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 16:05:42 2011 -0400
add sort direction
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 2d7205d..6085af1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -26,6 +26,7 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
@@ -70,6 +71,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
+ setSortDirection(SortDirection.DESCENDING);
}
@Override
commit 2d57c8fcf6814de5199321b258abb8378ec75cff
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 15:58:32 2011 -0400
sort the tree and provide a refresh button
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 7778084..2d7205d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -24,7 +24,9 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
+import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
import com.smartgwt.client.widgets.menu.Menu;
@@ -67,6 +69,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
+ setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
}
@Override
@@ -198,6 +201,17 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
return contextMenu;
}
+ /**
+ * We override this because we know all of our nodes will have titles. Without this,
+ * I could not get the title of change set nodes to show - it always fell back to using
+ * the name. This way is at least faster, since we don't do any conditional checking,
+ * we always immediately use the getTitle results.
+ */
+ @Override
+ protected String getNodeTitle(Record node, int recordNum, ListGridField field) {
+ return ((TreeNode) node).getTitle();
+ }
+
@SuppressWarnings("unchecked")
static class ChangeSetTreeNode extends TreeNode {
public ChangeSetTreeNode(DriftChangeSet changeset) {
@@ -205,7 +219,8 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setIcon("subsystems/drift/ChangeSet_16.png");
setShowOpenIcon(true);
setID(changeset.getId());
- setName(buildDriftChangeSetNodeName(changeset));
+ setName(padWithZeroes(changeset.getVersion())); // we sort on this column, hence we make sure the version # is padded
+ setTitle(buildDriftChangeSetNodeName(changeset));
}
private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
@@ -219,6 +234,14 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
str.append(')');
return str.toString();
}
+
+ private String padWithZeroes(int numberToPad) {
+ String stringToPad = String.valueOf(numberToPad);
+ char[] zeroes = new char[10 - stringToPad.length()];
+ for (int i = 0; i < zeroes.length; i++)
+ zeroes[i] = '0';
+ return new String(zeroes) + stringToPad;
+ }
}
@SuppressWarnings("unchecked")
@@ -229,7 +252,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
String parentID = drift.getChangeSet().getId();
setParentID(parentID);
setID(parentID + '_' + drift.getId());
- setName(drift.getPath());
+ setName(drift.getPath()); // we sort on this column
+ }
+
+ @Override
+ public String getTitle() {
+ return super.getName();
}
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index 48f5bc8..56b4aa2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -19,7 +19,14 @@
*/
package org.rhq.enterprise.gui.coregui.client.drift;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.toolbar.ToolStrip;
+
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableToolStrip;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
@@ -42,7 +49,23 @@ public class DriftChangeSetsView extends LocatableVLayout {
protected void onDraw() {
super.onDraw();
- addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ final ResourceDriftChangeSetsTreeView tree = new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"),
+ this.hasWriteAccess, this.context);
+ addMember(tree);
+
+ ToolStrip toolStrip = new LocatableToolStrip(extendLocatorId("toolstrip"));
+ toolStrip.setBackgroundImage(null);
+ toolStrip.setWidth100();
+ toolStrip.setMembersMargin(3);
+ toolStrip.setPadding(3);
+ IButton refreshButton = new LocatableIButton(extendLocatorId("refreshButton"), MSG.common_button_refresh());
+ refreshButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ tree.refresh();
+ }
+ });
+ toolStrip.addMember(refreshButton);
+ addMember(toolStrip);
}
public EntityContext getContext() {
commit c9a5c067500d221fe36d0438952b12a6e2c2b809
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 13:34:42 2011 -0400
refactor so we can later put in group classes but still support indiv resources
fix query so we filter on resource ID for resource view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 50d787d..7778084 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -67,8 +67,6 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
-
- setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
deleted file mode 100644
index c6e9e65..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.drift;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.fields.DataSourceTextField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.tree.TreeNode;
-
-import org.rhq.core.domain.criteria.BaseCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-
-/**
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
-
- private static final String ATTR_PARENT_ID = "parentId";
- public static final String ATTR_ID = "id";
- public static final String ATTR_NAME = "name";
-
- private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
- private final boolean canManageDrift;
-
- public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
- super();
- this.canManageDrift = canManageDrift;
- List<DataSourceField> fields = addDataSourceFields();
- addFields(fields);
- }
-
- @Override
- protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
-
- DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
- idDataField.setPrimaryKey(true);
- fields.add(idDataField);
-
- DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
- nameDataField.setCanEdit(false);
- fields.add(nameDataField);
-
- DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
- parentIdField.setForeignKey(ATTR_ID);
- fields.add(parentIdField);
-
- return fields;
- }
-
- @Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
-
- String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
-
- if (parentId == null) {
-
- // There is no parent - we are at the root of the tree.
- // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
- // We will lazily load drifts when the these changeset tree nodes are opened
- DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.DESC);
- criteria.setPageControl(getPageControl(request));
-
- driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
- public void onSuccess(PageList<DriftChangeSet> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
- } else {
- String changesetId = parentId;
- DriftCriteria criteria = new DriftJPACriteria();
- criteria.addFilterChangeSetId(changesetId);
-
- driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
-
- public void onSuccess(PageList<Drift> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
- });
-
- /*
- * I am leaving this code commented for future reference. Because today the drit change set tree only
- * shows simple changeset->drift tree, we don't need this. But if we need to have
- * multiple types of child nodes, we'll need something like below to query
- * for the different child node data. For example, we'd need this if we have a tree like:
- * ChangeSet
- * |____Resources
- * | |____ My resource 1
- * | |____ ...
- * |_____Drifts
- * |___ Drift #1
- * |___ Drift #2
- * |___ ...
- * Today we only have Drifts child nodes, so we don't need to have that intermediate
- * "Drifts" node. If we later want to introduce different node types (like Resources)
- * we need additional code like below.
- *
-
- // we are at an inner node, being asked to get the children of it
- if (p.endsWith("_drifts")) {
- // ...load drift items like above in the real code...
- } else if (p.endsWith("_resources")) {
- // ...load resource items and put those nodes in the tree...
- } else {
- // This is an unknown type of node, so just log an error.
- // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
- // we'll add more if-else statements above to process those different nodes.
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
- }
-
- *
- */
- }
-
- return;
- }
-
- @Override
- protected BaseCriteria getFetchCriteria(DSRequest request) {
- // our executeFetch will determine on its own what criteria to use based on what is to be fetched
- // thus we don't return anything here and let the executeFetch do everything
- return null;
- }
-
- @Override
- public Object copyValues(Record from) {
- return null; // don't need this method.
- }
-
- @Override
- public ListGridRecord[] buildRecords(Collection dataObjects) {
- return buildRecordsForKnownChangeSets(dataObjects, null);
- }
-
- public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
- if (dataObjects == null) {
- return null;
- }
-
- final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
-
- for (Object item : dataObjects) {
-
- // the resultant item is a direct node to build
- records.add(copyValues(item));
-
- // now build the children of the node
- /*
- * We do not have the need for building any intermeidate nodes today.
- * There is nothing to do, but if in the future we have differnet node types,
- * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
- * for an example of where this is already done. Commenting this out just as an
- * example of how this can be done.
-
- if (item instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) item;
-
- // each bundle has two direct children - the versions and destinations folders
- TreeNode versionNode = new TreeNode(MSG.view_drift());
- versionNode.setID(changeset.getId() + "_drifts");
- versionNode.setParentID(changeset.getId());
- versionNode.setName(MSG.view_drift());
- versionNode.setAttribute("name", MSG.view_drift());
- records.add(versionNode);
- } else if (item instanceof Drift) {
- if (canManageDrift) {
- records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
- }
- }
-
- *
- */
- }
-
- return records.toArray(new ListGridRecord[records.size()]);
- }
-
- @Override
- public ListGridRecord copyValues(Object from) {
- return copyValuesForKnownDriftChangeSet(from, null);
- }
-
- public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- TreeNode node;
- if (from instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) from;
- node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
- } else if (from instanceof Drift) {
- Drift drift = (Drift) from;
- node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
- } else {
- throw new IllegalArgumentException("please report this bug - bad value: " + from);
- }
- // if, in the future, we add more node types, we'll add more else-if statements here
-
- return node;
- }
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index 3e368d5..3ee0b5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -40,11 +40,13 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
this.context = context;
+
+ setDataSource(new ResourceDriftChangeSetsTreeDataSource(canManageDrift, context));
}
protected String getNodeTargetLink(TreeNode node) {
if (node instanceof DriftTreeNode) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String driftIdStr = node.getAttribute(AbstractDriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
return path;
}
commit aacd5bbe5c198d23ef5c775a473f4f68e54eea86
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 09:22:15 2011 -0400
Adding logic to check the enabled flag during drift detection
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index 153e5a9..b92dd7c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -47,44 +47,52 @@ public class DriftDetector implements Runnable {
@Override
public void run() {
- DriftDetectionSchedule schedule = scheduleQueue.getNextSchedule();
+ DriftDetectionSchedule schedule = scheduleQueue.dequeue();
if (schedule == null) {
return;
}
- try {
- if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
- return;
- }
+ if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
+ scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
+ return;
+ }
- if (!schedule.getDriftConfiguration().getEnabled()) {
- return;
- }
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ schedule.updateShedule();
+ scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
+ return;
+ }
- DriftConfiguration driftConfig = schedule.getDriftConfiguration();
- int resourceId = schedule.getResourceId();
- DriftChangeSetCategory changeSetType = null;
- int changes = 0;
-
- try {
- if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
- basedir(resourceId, driftConfig), COVERAGE))) {
- changeSetType = DRIFT;
- changes = generateDriftChangeSet(schedule);
- } else {
- changeSetType = COVERAGE;
- generateCoverageChangeSet(schedule);
- }
- } catch (IOException e) {
- // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
- log.error("An error occurred while scanning for drift", e);
- }
+ DriftConfiguration driftConfig = schedule.getDriftConfiguration();
+ int resourceId = schedule.getResourceId();
+ DriftChangeSetCategory changeSetType = null;
+ int changes = 0;
- if (changeSetType == COVERAGE || changes > 0) {
- driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ try {
+ if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
+ basedir(resourceId, driftConfig), COVERAGE))) {
+ changeSetType = DRIFT;
+ changes = generateDriftChangeSet(schedule);
+ } else {
+ changeSetType = COVERAGE;
+ generateCoverageChangeSet(schedule);
}
- } finally {
- scheduleQueue.deactivateSchedule();
+ } catch (IOException e) {
+ // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
+ log.error("An error occurred while scanning for drift", e);
+ }
+
+ schedule.updateShedule();
+ scheduleQueue.enqueue(schedule);
+
+ if (changeSetType == COVERAGE || changes > 0) {
+ driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
}
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 49dab54..9b62422 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -58,7 +58,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("coverage-test", resourceDir.getAbsolutePath());
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
File changeSet = changeSet(driftConfig.getName(), COVERAGE);
@@ -77,12 +77,12 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("basedir-entry-test", resourceDir.getAbsolutePath());
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId(), driftConfig);
- scheduleQueue.addSchedule(schedule);
+ scheduleQueue.enqueue(schedule);
detector.run();
assertChangeSetContainsDirEntry(changeSet(driftConfig.getName(), COVERAGE),
@@ -102,7 +102,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("multiple-files-test", resourceDir.getAbsolutePath());
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -127,7 +127,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("sibling-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -153,7 +153,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("nested-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -188,7 +188,7 @@ public class DriftDetectorTest extends DriftTest {
File server1Conf = new File(confDir, "server-1.conf");
touch(server1Conf);
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
}
@@ -217,7 +217,7 @@ public class DriftDetectorTest extends DriftTest {
File server2Conf = new File(confDir, "server-2.conf");
touch(server2Conf);
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
@@ -266,7 +266,7 @@ public class DriftDetectorTest extends DriftTest {
// create some drift
server2Conf.delete();
- scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
commit b2c361ccfb990323c384e2f109552864cc1f993a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:45 2011 -0400
sort the query in desc order, though the tree currently ignores this and has its own sorting.
need to fix that later
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index fe8586a..c6e9e65 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -95,7 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.ASC);
+ criteria.addSortVersion(PageOrdering.DESC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
commit 3d5dcc8f08d9a11016d929f648cccf061c424ba7
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:03 2011 -0400
default subtab view for drift is the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 4efc189..0e63d8e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -243,13 +243,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
driftTab = new TwoLevelTab(getTabSet().extendLocatorId(Tab.DRIFT), new ViewName(Tab.DRIFT, MSG
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
- this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
- MSG.view_tabs_common_history()), null);
this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
+ this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
+ MSG.view_tabs_common_history()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
+ driftTab.registerSubTabs(driftChangeSets, driftHistory, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -519,17 +519,17 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), resourcePermissions.isDrift())) {
- updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
}
});
- updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
}
});
commit 9c2a1bd249ad2bd9d8de882ec806cc3e03d15c74
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:49:19 2011 -0400
initial start of the context menu for the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 521d7b2..50d787d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -27,14 +27,24 @@ import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
+import com.smartgwt.client.widgets.menu.Menu;
+import com.smartgwt.client.widgets.menu.MenuItem;
+import com.smartgwt.client.widgets.menu.MenuItemSeparator;
+import com.smartgwt.client.widgets.menu.events.ClickHandler;
+import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeNode;
-import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
-import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickHandler;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -56,18 +66,9 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setAnimateFolders(false);
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
- setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
setShowHeader(false);
setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
-
- addNodeClickHandler(new NodeClickHandler() {
- public void onNodeClick(NodeClickEvent event) {
- TreeNode node = event.getNode();
- String link = getNodeTargetLink(node);
- CoreGUI.goToView(link);
- }
- });
}
@Override
@@ -76,13 +77,30 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// We may need to wait for tree data to be fetched before we can complete processing the selected path.
// When the datasource pulls data keep processing the selectedPath if necessary.
- this.addDataArrivedHandler(new DataArrivedHandler() {
+ addDataArrivedHandler(new DataArrivedHandler() {
public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
if (null != pendingPath) {
selectPath(pendingPath);
}
}
});
+
+ addNodeContextClickHandler(new NodeContextClickHandler() {
+ public void onNodeContextClick(final NodeContextClickEvent event) {
+ // stop the browser right-click menu
+ event.cancel();
+
+ TreeNode eventNode = event.getNode();
+
+ if (eventNode instanceof ChangeSetTreeNode) {
+ CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ } else if (eventNode instanceof DriftTreeNode) {
+ Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ menu.showContextMenu();
+ }
+ }
+ });
+
}
public void selectPath(ViewPath viewPath) {
@@ -144,4 +162,76 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @return the node's link
*/
protected abstract String getNodeTargetLink(TreeNode node);
+
+ /**
+ * Builds the right-mouse-click context menu for the given drift node
+ * @param node the drift node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildContextMenu(final DriftTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getName();
+ if (titleName.length() > 50) {
+ // make sure the title isn't really long so the menu is not abnormally wide
+ titleName = "..." + titleName.substring(titleName.length() - 50);
+ }
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem detailsItem = new MenuItem(MSG.common_title_details());
+ detailsItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ String link = getNodeTargetLink(node);
+ if (link != null) {
+ CoreGUI.goToView(link);
+ }
+ }
+ });
+ contextMenu.addItem(detailsItem);
+
+ return contextMenu;
+ }
+
+ @SuppressWarnings("unchecked")
+ static class ChangeSetTreeNode extends TreeNode {
+ public ChangeSetTreeNode(DriftChangeSet changeset) {
+ setIsFolder(true);
+ setIcon("subsystems/drift/ChangeSet_16.png");
+ setShowOpenIcon(true);
+ setID(changeset.getId());
+ setName(buildDriftChangeSetNodeName(changeset));
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(),
+ TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ static class DriftTreeNode extends TreeNode {
+ public DriftTreeNode(Drift drift) {
+ setIsFolder(false);
+ setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ String parentID = drift.getChangeSet().getId();
+ setParentID(parentID);
+ setID(parentID + '_' + drift.getId());
+ setName(drift.getPath());
+ }
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index c609a1e..fe8586a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -39,9 +39,8 @@ import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
@@ -96,6 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addSortVersion(PageOrdering.ASC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
@@ -233,38 +233,18 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
}
public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- String parentID;
- TreeNode node = new TreeNode();
+ TreeNode node;
if (from instanceof DriftChangeSet) {
DriftChangeSet changeset = (DriftChangeSet) from;
- node.setIsFolder(true);
- node.setIcon("subsystems/drift/ChangeSet_16.png");
- node.setShowOpenIcon(true);
- node.setID(changeset.getId());
- node.setName(buildDriftChangeSetNodeName(changeset));
-
+ node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
} else if (from instanceof Drift) {
Drift drift = (Drift) from;
- node.setIsFolder(false);
- node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
- parentID = drift.getChangeSet().getId();
- node.setParentID(parentID);
- node.setID(parentID + '_' + drift.getId());
- node.setName(drift.getPath());
+ node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
+ } else {
+ throw new IllegalArgumentException("please report this bug - bad value: " + from);
}
// if, in the future, we add more node types, we'll add more else-if statements here
return node;
}
-
- private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
- StringBuilder str = new StringBuilder();
- str.append(MSG.common_title_version());
- str.append(' ');
- str.append(changeset.getVersion());
- str.append(" (");
- str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
- str.append(')');
- return str.toString();
- }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index dc2a22d..3e368d5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -43,9 +43,12 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
protected String getNodeTargetLink(TreeNode node) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
- String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
- return path;
+ if (node instanceof DriftTreeNode) {
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
+ }
+ return null;
}
}
commit 36d7884b3f156c42b005be6c7c6d0b8907277dd7
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 16:37:56 2011 -0400
the initial start of the drift change set tree view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 8203361..521d7b2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -24,29 +24,17 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
-import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
-import com.smartgwt.client.types.SortDirection;
-import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
-import com.smartgwt.client.widgets.menu.Menu;
-import com.smartgwt.client.widgets.menu.MenuItem;
-import com.smartgwt.client.widgets.menu.MenuItemSeparator;
-import com.smartgwt.client.widgets.menu.events.ClickHandler;
-import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeNode;
-import com.smartgwt.client.widgets.tree.events.NodeContextClickEvent;
-import com.smartgwt.client.widgets.tree.events.NodeContextClickHandler;
+import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -66,11 +54,20 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// fetch the top nodes at the inital onDraw()
setAutoFetchData(true);
setAnimateFolders(false);
- setSelectionType(SelectionStyle.MULTIPLE);
+ setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
+ setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
setShowHeader(false);
- setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
- setSortDirection(SortDirection.DESCENDING);
+
+ setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
+
+ addNodeClickHandler(new NodeClickHandler() {
+ public void onNodeClick(NodeClickEvent event) {
+ TreeNode node = event.getNode();
+ String link = getNodeTargetLink(node);
+ CoreGUI.goToView(link);
+ }
+ });
}
@Override
@@ -79,31 +76,13 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// We may need to wait for tree data to be fetched before we can complete processing the selected path.
// When the datasource pulls data keep processing the selectedPath if necessary.
- addDataArrivedHandler(new DataArrivedHandler() {
+ this.addDataArrivedHandler(new DataArrivedHandler() {
public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
if (null != pendingPath) {
selectPath(pendingPath);
}
}
});
-
- addNodeContextClickHandler(new NodeContextClickHandler() {
- public void onNodeContextClick(final NodeContextClickEvent event) {
- // stop the browser right-click menu
- event.cancel();
-
- TreeNode eventNode = event.getNode();
-
- if (eventNode instanceof ChangeSetTreeNode) {
- Menu menu = buildChangeSetTreeNodeContextMenu((ChangeSetTreeNode) eventNode);
- menu.showContextMenu();
- } else if (eventNode instanceof DriftTreeNode) {
- Menu menu = buildDriftTreeNodeContextMenu((DriftTreeNode) eventNode);
- menu.showContextMenu();
- }
- }
- });
-
}
public void selectPath(ViewPath viewPath) {
@@ -165,131 +144,4 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @return the node's link
*/
protected abstract String getNodeTargetLink(TreeNode node);
-
- /**
- * Builds the right-mouse-click context menu for the given drift node
- * @param node the drift node whose menu is to be displayed
- * @return the context menu to display
- */
- protected Menu buildDriftTreeNodeContextMenu(final DriftTreeNode node) {
-
- Menu contextMenu = new Menu();
-
- // title
- String titleName = node.getTitle();
- if (titleName.length() > 50) {
- // make sure the title isn't really long so the menu is not abnormally wide
- titleName = "..." + titleName.substring(titleName.length() - 50);
- }
- MenuItem titleItem = new MenuItem(titleName);
- titleItem.setEnabled(false);
- contextMenu.setItems(titleItem);
-
- // separator
- contextMenu.addItem(new MenuItemSeparator());
-
- // item that links to the history details
- MenuItem detailsItem = new MenuItem(MSG.common_title_details());
- detailsItem.addClickHandler(new ClickHandler() {
- public void onClick(MenuItemClickEvent event) {
- String link = getNodeTargetLink(node);
- if (link != null) {
- CoreGUI.goToView(link);
- }
- }
- });
- contextMenu.addItem(detailsItem);
-
- return contextMenu;
- }
-
- /**
- * Builds the right-mouse-click context menu for the given change set node
- * @param node the change set node whose menu is to be displayed
- * @return the context menu to display
- */
- protected Menu buildChangeSetTreeNodeContextMenu(final ChangeSetTreeNode node) {
-
- Menu contextMenu = new Menu();
-
- // title
- String titleName = node.getTitle();
- MenuItem titleItem = new MenuItem(titleName);
- titleItem.setEnabled(false);
- contextMenu.setItems(titleItem);
-
- // separator
- contextMenu.addItem(new MenuItemSeparator());
-
- // item that links to the history details
- MenuItem deleteItem = new MenuItem(MSG.common_button_delete());
- deleteItem.addClickHandler(new ClickHandler() {
- public void onClick(MenuItemClickEvent event) {
- // TODO: delete the change set
- }
- });
- contextMenu.addItem(deleteItem);
-
- return contextMenu;
- }
-
- /**
- * We override this because we know all of our nodes will have titles. Without this,
- * I could not get the title of change set nodes to show - it always fell back to using
- * the name. This way is at least faster, since we don't do any conditional checking,
- * we always immediately use the getTitle results.
- */
- @Override
- protected String getNodeTitle(Record node, int recordNum, ListGridField field) {
- return ((TreeNode) node).getTitle();
- }
-
- @SuppressWarnings("unchecked")
- static class ChangeSetTreeNode extends TreeNode {
- public ChangeSetTreeNode(DriftChangeSet changeset) {
- setIsFolder(true);
- setIcon("subsystems/drift/ChangeSet_16.png");
- setShowOpenIcon(true);
- setID(changeset.getId());
- setName(padWithZeroes(changeset.getVersion())); // we sort on this column, hence we make sure the version # is padded
- setTitle(buildDriftChangeSetNodeName(changeset));
- }
-
- private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
- StringBuilder str = new StringBuilder();
- str.append(MSG.common_title_version());
- str.append(' ');
- str.append(changeset.getVersion());
- str.append(" (");
- str.append(TimestampCellFormatter.format(changeset.getCtime(),
- TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
- str.append(')');
- return str.toString();
- }
-
- private String padWithZeroes(int numberToPad) {
- String stringToPad = String.valueOf(numberToPad);
- char[] zeroes = new char[10 - stringToPad.length()];
- for (int i = 0; i < zeroes.length; i++)
- zeroes[i] = '0';
- return new String(zeroes) + stringToPad;
- }
- }
-
- @SuppressWarnings("unchecked")
- static class DriftTreeNode extends TreeNode {
- public DriftTreeNode(Drift drift) {
- setIsFolder(false);
- setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
- String parentID = drift.getChangeSet().getId();
- setParentID(parentID);
- setID(parentID + '_' + drift.getId());
- setName(drift.getPath()); // we sort on this column
- }
-
- @Override
- public String getTitle() {
- return super.getName();
- }
- }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..c609a1e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -0,0 +1,270 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceTextField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
+
+ private static final String ATTR_PARENT_ID = "parentId";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+
+ private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
+ private final boolean canManageDrift;
+
+ public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
+ super();
+ this.canManageDrift = canManageDrift;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+
+ DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
+ idDataField.setPrimaryKey(true);
+ fields.add(idDataField);
+
+ DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
+ nameDataField.setCanEdit(false);
+ fields.add(nameDataField);
+
+ DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
+ parentIdField.setForeignKey(ATTR_ID);
+ fields.add(parentIdField);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
+
+ String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
+
+ if (parentId == null) {
+
+ // There is no parent - we are at the root of the tree.
+ // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
+ // We will lazily load drifts when the these changeset tree nodes are opened
+ DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.setPageControl(getPageControl(request));
+
+ driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
+ public void onSuccess(PageList<DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ } else {
+ String changesetId = parentId;
+ DriftCriteria criteria = new DriftJPACriteria();
+ criteria.addFilterChangeSetId(changesetId);
+
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Drift> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
+
+ /*
+ * I am leaving this code commented for future reference. Because today the drit change set tree only
+ * shows simple changeset->drift tree, we don't need this. But if we need to have
+ * multiple types of child nodes, we'll need something like below to query
+ * for the different child node data. For example, we'd need this if we have a tree like:
+ * ChangeSet
+ * |____Resources
+ * | |____ My resource 1
+ * | |____ ...
+ * |_____Drifts
+ * |___ Drift #1
+ * |___ Drift #2
+ * |___ ...
+ * Today we only have Drifts child nodes, so we don't need to have that intermediate
+ * "Drifts" node. If we later want to introduce different node types (like Resources)
+ * we need additional code like below.
+ *
+
+ // we are at an inner node, being asked to get the children of it
+ if (p.endsWith("_drifts")) {
+ // ...load drift items like above in the real code...
+ } else if (p.endsWith("_resources")) {
+ // ...load resource items and put those nodes in the tree...
+ } else {
+ // This is an unknown type of node, so just log an error.
+ // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
+ // we'll add more if-else statements above to process those different nodes.
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
+ }
+
+ *
+ */
+ }
+
+ return;
+ }
+
+ @Override
+ protected BaseCriteria getFetchCriteria(DSRequest request) {
+ // our executeFetch will determine on its own what criteria to use based on what is to be fetched
+ // thus we don't return anything here and let the executeFetch do everything
+ return null;
+ }
+
+ @Override
+ public Object copyValues(Record from) {
+ return null; // don't need this method.
+ }
+
+ @Override
+ public ListGridRecord[] buildRecords(Collection dataObjects) {
+ return buildRecordsForKnownChangeSets(dataObjects, null);
+ }
+
+ public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
+ if (dataObjects == null) {
+ return null;
+ }
+
+ final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
+
+ for (Object item : dataObjects) {
+
+ // the resultant item is a direct node to build
+ records.add(copyValues(item));
+
+ // now build the children of the node
+ /*
+ * We do not have the need for building any intermeidate nodes today.
+ * There is nothing to do, but if in the future we have differnet node types,
+ * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
+ * for an example of where this is already done. Commenting this out just as an
+ * example of how this can be done.
+
+ if (item instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) item;
+
+ // each bundle has two direct children - the versions and destinations folders
+ TreeNode versionNode = new TreeNode(MSG.view_drift());
+ versionNode.setID(changeset.getId() + "_drifts");
+ versionNode.setParentID(changeset.getId());
+ versionNode.setName(MSG.view_drift());
+ versionNode.setAttribute("name", MSG.view_drift());
+ records.add(versionNode);
+ } else if (item instanceof Drift) {
+ if (canManageDrift) {
+ records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
+ }
+ }
+
+ *
+ */
+ }
+
+ return records.toArray(new ListGridRecord[records.size()]);
+ }
+
+ @Override
+ public ListGridRecord copyValues(Object from) {
+ return copyValuesForKnownDriftChangeSet(from, null);
+ }
+
+ public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
+ String parentID;
+ TreeNode node = new TreeNode();
+ if (from instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) from;
+ node.setIsFolder(true);
+ node.setIcon("subsystems/drift/ChangeSet_16.png");
+ node.setShowOpenIcon(true);
+ node.setID(changeset.getId());
+ node.setName(buildDriftChangeSetNodeName(changeset));
+
+ } else if (from instanceof Drift) {
+ Drift drift = (Drift) from;
+ node.setIsFolder(false);
+ node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ parentID = drift.getChangeSet().getId();
+ node.setParentID(parentID);
+ node.setID(parentID + '_' + drift.getId());
+ node.setName(drift.getPath());
+ }
+ // if, in the future, we add more node types, we'll add more else-if statements here
+
+ return node;
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index f610b8b..48f5bc8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -38,6 +38,13 @@ public class DriftChangeSetsView extends LocatableVLayout {
this.hasWriteAccess = hasWriteAccess;
}
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ }
+
public EntityContext getContext() {
return context;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index 3ee0b5f..dc2a22d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -40,17 +40,12 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
this.context = context;
-
- setDataSource(new ResourceDriftChangeSetsTreeDataSource(canManageDrift, context));
}
protected String getNodeTargetLink(TreeNode node) {
- if (node instanceof DriftTreeNode) {
- String driftIdStr = node.getAttribute(AbstractDriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
- String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
- return path;
- }
- return null;
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index c7d6f91..ea8c956 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1123,6 +1123,7 @@ view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
view_drift_changeSets = Change Sets
view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 5fe14aa..a07568a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -941,6 +941,7 @@ view_dashboards_title = Dashboard
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6bce847..6e68cff 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1106,6 +1106,7 @@ view_dashboards_title = ダッシュボード
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index bd2b6fb..fa86006 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1141,6 +1141,7 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 9fa9115..79816c5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1115,6 +1115,7 @@ view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
index e728bc8..fdda214 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
index 1ca204f..358cf61 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit f92e6778c84c0ee2a8264ccfde321992fd23ef4d
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jul 24 21:13:24 2011 -0400
Adding createSnapshot method to drift server api
Also moving Snapshot and DiffReport classes to core/domain to make them
accessible to coregui.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
index c32f053..93653b3 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -1,5 +1,10 @@
package org.rhq.core.domain.drift;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
@@ -10,24 +15,19 @@ import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.testng.Assert.assertEquals;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
public class SnapshotTest {
@Test
public void addChangeSetWithAddedFile() {
int configId = 1;
- FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId).add(new FakeDrift(FILE_ADDED,
- null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
+ FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
+ .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
Snapshot snapshot = new Snapshot().add(changeSet);
- assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build "
- + "a snapshot that contains a single change set");
+ assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
+ "a snapshot that contains a single change set");
assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
}
@@ -43,8 +43,8 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot "
- + "with two change sets and file added in second change set");
+ assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
+ "with two change sets and file added in second change set");
assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
}
@@ -55,8 +55,8 @@ public class SnapshotTest {
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED), new FakeDriftFile(
- "4d5e6f", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
+ new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
@@ -78,8 +78,9 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file "
- + "removed.");
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
+ "Failed to build snapshot with a file " +
+ "removed.");
}
@Test
@@ -96,8 +97,9 @@ public class SnapshotTest {
DiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
- "elements that are in the left but not in the right.");
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
}
@Test
@@ -114,8 +116,9 @@ public class SnapshotTest {
DiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
- "elements that are in the left but not in the right");
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right");
}
@Test
@@ -132,8 +135,9 @@ public class SnapshotTest {
DiffReport diff = left.diff(right);
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
- "element that are in both left and right and are in conflict");
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(),
+ "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
}
<E> Set<E> asSet(E... elements) {
@@ -314,8 +318,8 @@ public class SnapshotTest {
@Override
public String toString() {
- return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile
- + ", path: " + path + "]";
+ return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
+ ", path: " + path + "]";
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
deleted file mode 100644
index 89f3286..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class DiffReport<T> {
-
- private List<T> notInLeft = new ArrayList<T>();
-
- private List<T> notInRight = new ArrayList<T>();
-
- private List<T> conflicts = new ArrayList<T>();
-
- public List<T> getElementsNotInLeft() {
- return notInLeft;
- }
-
- public void elementNotInLeft(T element) {
- notInLeft.add(element);
- }
-
- public List<T> getElementsNotInRight() {
- return notInRight;
- }
-
- public void elementNotInRight(T element) {
- notInRight.add(element);
- }
-
- public List<T> getElementsInConflict() {
- return conflicts;
- }
-
- public void elementInConflict(T element) {
- conflicts.add(element);
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
deleted file mode 100644
index 5dc18fa..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.DriftFile;
-
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-
-public class Snapshot implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private int version;
-
- private Map<String, Drift> entries = new TreeMap<String, Drift>();
-
- public int getVersion() {
- return version;
- }
-
- public Collection<Drift> getEntries() {
- return entries.values();
- }
-
- public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
- for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry.getPath());
- if (entry.getCategory() != FILE_REMOVED) {
- entries.put(entry.getPath(), entry);
- }
- }
- version = changeSet.getVersion();
- return this;
- }
-
- public DiffReport diff(Snapshot right) {
- Snapshot left = this;
- DiffReport<Drift> diff = new DiffReport<Drift>();
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- if (!right.entries.containsKey(entry.getKey())) {
- diff.elementNotInRight(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
- if (!left.entries.containsKey(entry.getKey())) {
- diff.elementNotInLeft(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- Drift rightDrift = right.entries.get(entry.getKey());
- if (rightDrift != null) {
- DriftFile leftFile = entry.getValue().getNewDriftFile();
- DriftFile rightFile = rightDrift.getNewDriftFile();
-
- if (!leftFile.getHashId().equals(rightFile.getHashId())) {
- diff.elementInConflict(entry.getValue());
- }
- }
- }
-
- return diff;
- }
-
-}
commit 859c811f28b8169cdc4137ef69ed74f8e1a6ef5f
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 22:57:09 2011 -0400
First cut at createSnapshot method in DriftManagerBean
Also refactoring tests in server/jar to use the JPAUtils class for
resetting the db.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c03e3e6..bc8d26a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -38,24 +38,6 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
-// executeInTransaction(new TransactionCallback() {
-// @Override
-// public void execute() throws Exception {
-// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
-//
-// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
-// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
-// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
-// // native SQL to perform the delete on the join table rhq_drift_config_map.
-// //
-// // jsanda
-// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
-//
-// getEntityManager().createQuery("delete from Resource").executeUpdate();
-// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
-// }
-// });
-
executeInTransaction(new TransactionCallback() {
@Override
public void execute() throws Exception {
commit afe3a4879e6ea3de983caf34fc80d9eddcef86ce
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 21:38:07 2011 -0400
Initial commit for JPAUtils
Refactoring some methods in AbstractEJB3Test to delegate to JPAUtils
with the intent to eliminate duplicate code in core/domain and
server/jar tests. Most importantly though, the method clearDB is now
part of JPAUtils making it accessible to any test. This provides a much
more robust way of resetting the entire database to a known, consistent
state.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c9e61ef..c03e3e6 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -3,10 +3,6 @@ package org.rhq.core.domain.drift;
import java.util.HashSet;
import java.util.Set;
-import javax.persistence.EntityManager;
-import javax.transaction.SystemException;
-
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -16,6 +12,7 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.shared.ResourceBuilder;
import org.rhq.core.domain.test.AbstractEJB3Test;
+import org.rhq.test.TransactionCallback;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index aa6e0e0..dc5319a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -30,8 +30,6 @@ import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
@@ -42,6 +40,13 @@ import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
+import org.rhq.test.JPAUtils;
+import org.rhq.test.TransactionCallback;
+
+import static org.rhq.test.JPAUtils.clearDB;
+import static org.rhq.test.JPAUtils.lookupEntityManager;
+import static org.rhq.test.JPAUtils.lookupTransactionManager;
+
public abstract class AbstractEJB3Test extends AssertJUnit {
@BeforeClass
@@ -96,26 +101,12 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
EJB3StandaloneBootstrap.shutdown();
}
- private TransactionManager tm;
-
public TransactionManager getTransactionManager() {
- try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
- return tm;
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load transaction manager", e);
- }
+ return lookupTransactionManager();
}
public EntityManager getEntityManager() {
- try {
- return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
- .createEntityManager();
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load entity manager", e);
- }
+ return lookupEntityManager();
}
public boolean isPostgres(EntityManager em) throws Exception {
@@ -148,171 +139,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
protected void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
+ JPAUtils.executeInTransaction(callback);
}
- void clearDB() throws Exception {
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- EntityManager em = getEntityManager();
-
- em.createNativeQuery("delete from jms_subscriptions");
- em.createNativeQuery("delete from jms_roles");
- em.createNativeQuery("delete from jms_users");
- em.createNativeQuery("delete from jms_transactions");
- em.createNativeQuery("delete from jms_messages");
- em.createNativeQuery("delete from rhq_drift_config_map");
- em.createNativeQuery("delete from rhq_drift_template_map");
- em.createNativeQuery("delete from rhq_delete_res_hist");
- em.createNativeQuery("delete from rhq_create_res_hist");
- em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_map");
- em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
- em.createNativeQuery("delete from rhq_bundle_res_deploy");
- em.createNativeQuery("delete from rhq_bundle_deployment");
- em.createNativeQuery("delete from rhq_bundle_destination");
- em.createNativeQuery("delete from rhq_bundle_file");
- em.createNativeQuery("delete from rhq_bundle_version_repo");
- em.createNativeQuery("delete from rhq_bundle_version");
- em.createNativeQuery("delete from rhq_bundle");
- em.createNativeQuery("delete from rhq_bundle_type");
- em.createNativeQuery("delete from rhq_repo_advisory");
- em.createNativeQuery("delete from rhq_advisory_buglist");
- em.createNativeQuery("delete from rhq_advisory_cve");
- em.createNativeQuery("delete from rhq_cve");
- em.createNativeQuery("delete from rhq_advisory_package");
- em.createNativeQuery("delete from rhq_advisory");
- em.createNativeQuery("delete from rhq_distribution_file");
- em.createNativeQuery("delete from rhq_repo_distribution");
- em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_pkg_prd_map");
- em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
- em.createNativeQuery("delete from rhq_repo_pkg_version_map");
- em.createNativeQuery("delete from rhq_repo_repo_relation_map");
- em.createNativeQuery("delete from rhq_repo_repo_group_map");
- em.createNativeQuery("delete from rhq_repo_content_src_map");
- em.createNativeQuery("delete from rhq_repo_resource_map");
- em.createNativeQuery("delete from rhq_package_inst_step");
- em.createNativeQuery("delete from rhq_repo_sync");
- em.createNativeQuery("delete from rhq_content_src_sync");
- em.createNativeQuery("delete from rhq_installed_pkg_hist");
- em.createNativeQuery("delete from rhq_installed_package");
- em.createNativeQuery("delete from rhq_content_req");
- em.createNativeQuery("delete from rhq_package_version");
- em.createNativeQuery("delete from rhq_package_bits");
- em.createNativeQuery("delete from rhq_package");
- em.createNativeQuery("delete from rhq_package_type");
- em.createNativeQuery("delete from rhq_repo_relation");
- em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_repo");
- em.createNativeQuery("delete from rhq_repo_group");
- em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
- em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
- em.createNativeQuery("delete from rhq_meas_data_num_r14");
- em.createNativeQuery("delete from rhq_meas_data_num_r13");
- em.createNativeQuery("delete from rhq_meas_data_num_r12");
- em.createNativeQuery("delete from rhq_meas_data_num_r11");
- em.createNativeQuery("delete from rhq_meas_data_num_r10");
- em.createNativeQuery("delete from rhq_meas_data_num_r09");
- em.createNativeQuery("delete from rhq_meas_data_num_r08");
- em.createNativeQuery("delete from rhq_meas_data_num_r07");
- em.createNativeQuery("delete from rhq_meas_data_num_r06");
- em.createNativeQuery("delete from rhq_meas_data_num_r05");
- em.createNativeQuery("delete from rhq_meas_data_num_r04");
- em.createNativeQuery("delete from rhq_meas_data_num_r03");
- em.createNativeQuery("delete from rhq_meas_data_num_r02");
- em.createNativeQuery("delete from rhq_meas_data_num_r01");
- em.createNativeQuery("delete from rhq_meas_data_num_r00");
- em.createNativeQuery("delete from rhq_measurement_oob_tmp");
- em.createNativeQuery("delete rhq_measurement_oob");
- em.createNativeQuery("delete rhq_resource_avail");
- em.createNativeQuery("delete from rhq_availability");
- em.createNativeQuery("delete from rhq_calltime_data_value");
- em.createNativeQuery("delete from rhq_calltime_data_key");
- em.createNativeQuery("delete from rhq_measurement_data_trait");
- em.createNativeQuery("delete from rhq_measurement_data_num_1d");
- em.createNativeQuery("delete from rhq_measurement_data_num_6h");
- em.createNativeQuery("delete from rhq_measurement_data_num_1h");
- em.createNativeQuery("delete from rhq_measurement_bline");
- em.createNativeQuery("delete from rhq_measurement_sched");
- em.createNativeQuery("delete from rhq_measurement_def");
- em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
- em.createNativeQuery("delete from rhq_alert_notification");
- em.createNativeQuery("delete from rhq_alert_condition_log");
- em.createNativeQuery("delete from rhq_alert");
- em.createNativeQuery("delete from rhq_alert_condition");
- em.createNativeQuery("delete from rhq_alert_dampen_event");
- em.createNativeQuery("delete from rhq_alert_definition");
- em.createNativeQuery("delete from rhq_event");
- em.createNativeQuery("delete from rhq_event_source");
- em.createNativeQuery("delete from rhq_event_def");
- em.createNativeQuery("delete from rhq_operation_schedule");
- em.createNativeQuery("delete from rhq_operation_history");
- em.createNativeQuery("delete from rhq_operation_def");
- em.createNativeQuery("delete from rhq_dashboard_portlet");
- em.createNativeQuery("delete from rhq_dashboard");
- em.createNativeQuery("delete from rhq_saved_search");
- em.createNativeQuery("delete from rhq_subject_role_ldap_map");
- em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
- em.createNativeQuery("delete from rhq_role_ldap_group");
- em.createNativeQuery("delete from rhq_role_resource_group_map");
- em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_tagging_res_group_map");
- em.createNativeQuery("delete from rhq_tagging_resource_map");
- em.createNativeQuery("delete from rhq_tagging");
- em.createNativeQuery("delete from rhq_config_update");
- em.createNativeQuery("delete from rhq_config_group_update");
- em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
- em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
- em.createNativeQuery("delete from rhq_resource_group");
- em.createNativeQuery("delete from rhq_group_def");
- em.createNativeQuery("delete from rhq_resource_error");
- em.createNativeQuery("delete from rhq_resource");
- em.createNativeQuery("delete from rhq_prd_ver");
- em.createNativeQuery("delete from rhq_process_scan");
- em.createNativeQuery("delete from rhq_resource_type_parents");
- em.createNativeQuery("delete from rhq_resource_subcat");
- em.createNativeQuery("delete from rhq_resource_type");
- em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_principal where id <> 2");
- em.createNativeQuery("delete from rhq_failover_details");
- em.createNativeQuery("delete from rhq_failover_list");
- em.createNativeQuery("delete from rhq_partition_details");
- em.createNativeQuery("delete from rhq_partition_event");
- em.createNativeQuery("delete from rhq_agent");
- em.createNativeQuery("delete from rhq_server");
- em.createNativeQuery("delete from rhq_affinity_group");
- em.createNativeQuery("delete from rhq_raw_config");
- em.createNativeQuery("delete from rhq_config_template");
- em.createNativeQuery("delete from rhq_config_property");
- em.createNativeQuery("delete from rhq_config");
- em.createNativeQuery("delete from rhq_config_prop_constr");
- em.createNativeQuery("delete from rhq_conf_prop_def_enum");
- em.createNativeQuery("delete from rhq_config_pd_osrc");
- em.createNativeQuery("delete from rhq_config_prop_def");
- em.createNativeQuery("delete from rhq_config_prop_grp_def");
- em.createNativeQuery("delete from rhq_config_def");
- }
- });
- }
-
- public static interface TransactionCallback {
- void execute() throws Exception;
- }
}
\ No newline at end of file
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index 46611ed..349b84c 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -143,7 +143,7 @@ public class JPAUtils {
em.createNativeQuery("delete from rhq_measurement_sched");
em.createNativeQuery("delete from rhq_measurement_def");
em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57)");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
em.createNativeQuery("delete from rhq_alert_notification");
em.createNativeQuery("delete from rhq_alert_condition_log");
em.createNativeQuery("delete from rhq_alert");
commit 82eafed13bb5e2f0e3e6bda0c59406ef38f29e55
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 07:09:35 2011 -0400
Adding support for version and date ranges in DriftChangeSetCriteria
Version and/or date ranges are needed in order to fetch multiple change
sets to build a snapshot. This commit also includes new set up code in
the base test class AbstractEJB3Test. It clears all database tables
which should be more robust than the approach taken with dbunit.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index bc8d26a..c9e61ef 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -3,6 +3,10 @@ package org.rhq.core.domain.drift;
import java.util.HashSet;
import java.util.Set;
+import javax.persistence.EntityManager;
+import javax.transaction.SystemException;
+
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -12,7 +16,6 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.shared.ResourceBuilder;
import org.rhq.core.domain.test.AbstractEJB3Test;
-import org.rhq.test.TransactionCallback;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
@@ -38,6 +41,24 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
+// executeInTransaction(new TransactionCallback() {
+// @Override
+// public void execute() throws Exception {
+// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
+//
+// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
+// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
+// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
+// // native SQL to perform the delete on the join table rhq_drift_config_map.
+// //
+// // jsanda
+// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
+//
+// getEntityManager().createQuery("delete from Resource").executeUpdate();
+// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
+// }
+// });
+
executeInTransaction(new TransactionCallback() {
@Override
public void execute() throws Exception {
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index dc5319a..aa6e0e0 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -30,6 +30,8 @@ import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
@@ -40,13 +42,6 @@ import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
-import org.rhq.test.JPAUtils;
-import org.rhq.test.TransactionCallback;
-
-import static org.rhq.test.JPAUtils.clearDB;
-import static org.rhq.test.JPAUtils.lookupEntityManager;
-import static org.rhq.test.JPAUtils.lookupTransactionManager;
-
public abstract class AbstractEJB3Test extends AssertJUnit {
@BeforeClass
@@ -101,12 +96,26 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
EJB3StandaloneBootstrap.shutdown();
}
+ private TransactionManager tm;
+
public TransactionManager getTransactionManager() {
- return lookupTransactionManager();
+ try {
+ tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
+ return tm;
+ } catch (NamingException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Failed to load transaction manager", e);
+ }
}
public EntityManager getEntityManager() {
- return lookupEntityManager();
+ try {
+ return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
+ .createEntityManager();
+ } catch (NamingException e) {
+ e.printStackTrace();
+ throw new RuntimeException("Failed to load entity manager", e);
+ }
}
public boolean isPostgres(EntityManager em) throws Exception {
@@ -139,7 +148,171 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
protected void executeInTransaction(TransactionCallback callback) {
- JPAUtils.executeInTransaction(callback);
+ try {
+ getTransactionManager().begin();
+ callback.execute();
+ getTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ getTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
}
+ void clearDB() throws Exception {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ EntityManager em = getEntityManager();
+
+ em.createNativeQuery("delete from jms_subscriptions");
+ em.createNativeQuery("delete from jms_roles");
+ em.createNativeQuery("delete from jms_users");
+ em.createNativeQuery("delete from jms_transactions");
+ em.createNativeQuery("delete from jms_messages");
+ em.createNativeQuery("delete from rhq_drift_config_map");
+ em.createNativeQuery("delete from rhq_drift_template_map");
+ em.createNativeQuery("delete from rhq_delete_res_hist");
+ em.createNativeQuery("delete from rhq_create_res_hist");
+ em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_map");
+ em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
+ em.createNativeQuery("delete from rhq_bundle_res_deploy");
+ em.createNativeQuery("delete from rhq_bundle_deployment");
+ em.createNativeQuery("delete from rhq_bundle_destination");
+ em.createNativeQuery("delete from rhq_bundle_file");
+ em.createNativeQuery("delete from rhq_bundle_version_repo");
+ em.createNativeQuery("delete from rhq_bundle_version");
+ em.createNativeQuery("delete from rhq_bundle");
+ em.createNativeQuery("delete from rhq_bundle_type");
+ em.createNativeQuery("delete from rhq_repo_advisory");
+ em.createNativeQuery("delete from rhq_advisory_buglist");
+ em.createNativeQuery("delete from rhq_advisory_cve");
+ em.createNativeQuery("delete from rhq_cve");
+ em.createNativeQuery("delete from rhq_advisory_package");
+ em.createNativeQuery("delete from rhq_advisory");
+ em.createNativeQuery("delete from rhq_distribution_file");
+ em.createNativeQuery("delete from rhq_repo_distribution");
+ em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_pkg_prd_map");
+ em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_pkg_version_map");
+ em.createNativeQuery("delete from rhq_repo_repo_relation_map");
+ em.createNativeQuery("delete from rhq_repo_repo_group_map");
+ em.createNativeQuery("delete from rhq_repo_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_resource_map");
+ em.createNativeQuery("delete from rhq_package_inst_step");
+ em.createNativeQuery("delete from rhq_repo_sync");
+ em.createNativeQuery("delete from rhq_content_src_sync");
+ em.createNativeQuery("delete from rhq_installed_pkg_hist");
+ em.createNativeQuery("delete from rhq_installed_package");
+ em.createNativeQuery("delete from rhq_content_req");
+ em.createNativeQuery("delete from rhq_package_version");
+ em.createNativeQuery("delete from rhq_package_bits");
+ em.createNativeQuery("delete from rhq_package");
+ em.createNativeQuery("delete from rhq_package_type");
+ em.createNativeQuery("delete from rhq_repo_relation");
+ em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_repo");
+ em.createNativeQuery("delete from rhq_repo_group");
+ em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
+ em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
+ em.createNativeQuery("delete from rhq_meas_data_num_r14");
+ em.createNativeQuery("delete from rhq_meas_data_num_r13");
+ em.createNativeQuery("delete from rhq_meas_data_num_r12");
+ em.createNativeQuery("delete from rhq_meas_data_num_r11");
+ em.createNativeQuery("delete from rhq_meas_data_num_r10");
+ em.createNativeQuery("delete from rhq_meas_data_num_r09");
+ em.createNativeQuery("delete from rhq_meas_data_num_r08");
+ em.createNativeQuery("delete from rhq_meas_data_num_r07");
+ em.createNativeQuery("delete from rhq_meas_data_num_r06");
+ em.createNativeQuery("delete from rhq_meas_data_num_r05");
+ em.createNativeQuery("delete from rhq_meas_data_num_r04");
+ em.createNativeQuery("delete from rhq_meas_data_num_r03");
+ em.createNativeQuery("delete from rhq_meas_data_num_r02");
+ em.createNativeQuery("delete from rhq_meas_data_num_r01");
+ em.createNativeQuery("delete from rhq_meas_data_num_r00");
+ em.createNativeQuery("delete from rhq_measurement_oob_tmp");
+ em.createNativeQuery("delete rhq_measurement_oob");
+ em.createNativeQuery("delete rhq_resource_avail");
+ em.createNativeQuery("delete from rhq_availability");
+ em.createNativeQuery("delete from rhq_calltime_data_value");
+ em.createNativeQuery("delete from rhq_calltime_data_key");
+ em.createNativeQuery("delete from rhq_measurement_data_trait");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1d");
+ em.createNativeQuery("delete from rhq_measurement_data_num_6h");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1h");
+ em.createNativeQuery("delete from rhq_measurement_bline");
+ em.createNativeQuery("delete from rhq_measurement_sched");
+ em.createNativeQuery("delete from rhq_measurement_def");
+ em.createNativeQuery("delete from rhq_plugin");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_alert_notification");
+ em.createNativeQuery("delete from rhq_alert_condition_log");
+ em.createNativeQuery("delete from rhq_alert");
+ em.createNativeQuery("delete from rhq_alert_condition");
+ em.createNativeQuery("delete from rhq_alert_dampen_event");
+ em.createNativeQuery("delete from rhq_alert_definition");
+ em.createNativeQuery("delete from rhq_event");
+ em.createNativeQuery("delete from rhq_event_source");
+ em.createNativeQuery("delete from rhq_event_def");
+ em.createNativeQuery("delete from rhq_operation_schedule");
+ em.createNativeQuery("delete from rhq_operation_history");
+ em.createNativeQuery("delete from rhq_operation_def");
+ em.createNativeQuery("delete from rhq_dashboard_portlet");
+ em.createNativeQuery("delete from rhq_dashboard");
+ em.createNativeQuery("delete from rhq_saved_search");
+ em.createNativeQuery("delete from rhq_subject_role_ldap_map");
+ em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_role_ldap_group");
+ em.createNativeQuery("delete from rhq_role_resource_group_map");
+ em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_tagging_res_group_map");
+ em.createNativeQuery("delete from rhq_tagging_resource_map");
+ em.createNativeQuery("delete from rhq_tagging");
+ em.createNativeQuery("delete from rhq_config_update");
+ em.createNativeQuery("delete from rhq_config_group_update");
+ em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
+ em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
+ em.createNativeQuery("delete from rhq_resource_group");
+ em.createNativeQuery("delete from rhq_group_def");
+ em.createNativeQuery("delete from rhq_resource_error");
+ em.createNativeQuery("delete from rhq_resource");
+ em.createNativeQuery("delete from rhq_prd_ver");
+ em.createNativeQuery("delete from rhq_process_scan");
+ em.createNativeQuery("delete from rhq_resource_type_parents");
+ em.createNativeQuery("delete from rhq_resource_subcat");
+ em.createNativeQuery("delete from rhq_resource_type");
+ em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_principal where id <> 2");
+ em.createNativeQuery("delete from rhq_failover_details");
+ em.createNativeQuery("delete from rhq_failover_list");
+ em.createNativeQuery("delete from rhq_partition_details");
+ em.createNativeQuery("delete from rhq_partition_event");
+ em.createNativeQuery("delete from rhq_agent");
+ em.createNativeQuery("delete from rhq_server");
+ em.createNativeQuery("delete from rhq_affinity_group");
+ em.createNativeQuery("delete from rhq_raw_config");
+ em.createNativeQuery("delete from rhq_config_template");
+ em.createNativeQuery("delete from rhq_config_property");
+ em.createNativeQuery("delete from rhq_config");
+ em.createNativeQuery("delete from rhq_config_prop_constr");
+ em.createNativeQuery("delete from rhq_conf_prop_def_enum");
+ em.createNativeQuery("delete from rhq_config_pd_osrc");
+ em.createNativeQuery("delete from rhq_config_prop_def");
+ em.createNativeQuery("delete from rhq_config_prop_grp_def");
+ em.createNativeQuery("delete from rhq_config_def");
+ }
+ });
+ }
+
+ public static interface TransactionCallback {
+ void execute() throws Exception;
+ }
}
\ No newline at end of file
commit df923540908f8e8c0b4c8b32e839a33956bde646
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 22 16:09:08 2011 -0400
stub out the new drift change sets subtab
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index 56b4aa2..f610b8b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -19,14 +19,7 @@
*/
package org.rhq.enterprise.gui.coregui.client.drift;
-import com.smartgwt.client.widgets.IButton;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.toolbar.ToolStrip;
-
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableToolStrip;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
@@ -45,29 +38,6 @@ public class DriftChangeSetsView extends LocatableVLayout {
this.hasWriteAccess = hasWriteAccess;
}
- @Override
- protected void onDraw() {
- super.onDraw();
-
- final ResourceDriftChangeSetsTreeView tree = new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"),
- this.hasWriteAccess, this.context);
- addMember(tree);
-
- ToolStrip toolStrip = new LocatableToolStrip(extendLocatorId("toolstrip"));
- toolStrip.setBackgroundImage(null);
- toolStrip.setWidth100();
- toolStrip.setMembersMargin(3);
- toolStrip.setPadding(3);
- IButton refreshButton = new LocatableIButton(extendLocatorId("refreshButton"), MSG.common_button_refresh());
- refreshButton.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- tree.refresh();
- }
- });
- toolStrip.addMember(refreshButton);
- addMember(toolStrip);
- }
-
public EntityContext getContext() {
return context;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 0e63d8e..4efc189 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -243,13 +243,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
driftTab = new TwoLevelTab(getTabSet().extendLocatorId(Tab.DRIFT), new ViewName(Tab.DRIFT, MSG
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
- this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
- DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
MSG.view_tabs_common_history()), null);
+ this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
+ DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftChangeSets, driftHistory, driftConfig);
+ driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -519,17 +519,17 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), resourcePermissions.isDrift())) {
- updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
}
});
- updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index ea8c956..c7d6f91 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1123,7 +1123,6 @@ view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
view_drift_changeSets = Change Sets
view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index a07568a..5fe14aa 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -941,7 +941,6 @@ view_dashboards_title = Dashboard
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6e68cff..6bce847 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1106,7 +1106,6 @@ view_dashboards_title = ダッシュボード
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index fa86006..bd2b6fb 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1141,7 +1141,6 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 79816c5..9fa9115 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1115,7 +1115,6 @@ view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
commit 5e82ab5e7794b3b0ee9a2dcbefb407dbbfda48c0
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 22 13:22:56 2011 -0400
Adding support for generating snapshot diffs
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
index 2543bf8..c32f053 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -1,5 +1,6 @@
package org.rhq.core.domain.drift;
+import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -81,6 +82,60 @@ public class SnapshotTest {
+ "removed.");
}
+ @Test
+ public void diffShowsEntriesInLeftAndNotInRight() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
+ }
+
+ @Test
+ public void diffShowsEntriesInRightAndNotInLeft() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
+ "elements that are in the left but not in the right");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
+ }
+
<E> Set<E> asSet(E... elements) {
HashSet<E> set = new HashSet<E>();
for (E element : elements) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
new file mode 100644
index 0000000..89f3286
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.enterprise.server.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
index 2efc8d8..5dc18fa 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -1,12 +1,13 @@
package org.rhq.enterprise.server.drift;
import java.io.Serializable;
-import java.util.Comparator;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftFile;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -16,30 +17,56 @@ public class Snapshot implements Serializable {
private int version;
- private Set<Drift> entries = new TreeSet<Drift>(new Comparator<Drift>() {
- @Override
- public int compare(Drift d1, Drift d2) {
- return d1.getPath().compareTo(d2.getPath());
- }
- });
+ private Map<String, Drift> entries = new TreeMap<String, Drift>();
public int getVersion() {
return version;
}
- public Set<Drift> getEntries() {
- return entries;
+ public Collection<Drift> getEntries() {
+ return entries.values();
}
public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry);
+ entries.remove(entry.getPath());
if (entry.getCategory() != FILE_REMOVED) {
- entries.add(entry);
+ entries.put(entry.getPath(), entry);
}
}
version = changeSet.getVersion();
return this;
}
+ public DiffReport diff(Snapshot right) {
+ Snapshot left = this;
+ DiffReport<Drift> diff = new DiffReport<Drift>();
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ Drift rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
}
commit 951c7a25098e8f9a572de19d2ce830cb3cc93a8a
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 22:03:41 2011 -0400
Adding logic for removing files from a snapshot
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
index 93653b3..2543bf8 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -1,11 +1,5 @@
package org.rhq.core.domain.drift;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
-import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -15,19 +9,24 @@ import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.testng.Assert.assertEquals;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
public class SnapshotTest {
@Test
public void addChangeSetWithAddedFile() {
int configId = 1;
- FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
- .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
+ FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId).add(new FakeDrift(FILE_ADDED,
+ null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
Snapshot snapshot = new Snapshot().add(changeSet);
- assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
- "a snapshot that contains a single change set");
+ assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build "
+ + "a snapshot that contains a single change set");
assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
}
@@ -43,8 +42,8 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
- "with two change sets and file added in second change set");
+ assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot "
+ + "with two change sets and file added in second change set");
assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
}
@@ -55,8 +54,8 @@ public class SnapshotTest {
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
- new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED), new FakeDriftFile(
+ "4d5e6f", 1024, LOADED), "/drift/1.txt");
FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
@@ -78,66 +77,8 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
- "Failed to build snapshot with a file " +
- "removed.");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndNotInRight() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
- Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(),
- "Diff report does not contain " +
- "elements that are in the left but not in the right.");
- }
-
- @Test
- public void diffShowsEntriesInRightAndNotInLeft() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(),
- "Diff report does not contain " +
- "elements that are in the left but not in the right");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(),
- "Diff report does not contain " +
- "element that are in both left and right and are in conflict");
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file "
+ + "removed.");
}
<E> Set<E> asSet(E... elements) {
@@ -318,8 +259,8 @@ public class SnapshotTest {
@Override
public String toString() {
- return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
- ", path: " + path + "]";
+ return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile
+ + ", path: " + path + "]";
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
new file mode 100644
index 0000000..2efc8d8
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -0,0 +1,45 @@
+package org.rhq.enterprise.server.drift;
+
+import java.io.Serializable;
+import java.util.Comparator;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+public class Snapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int version;
+
+ private Set<Drift> entries = new TreeSet<Drift>(new Comparator<Drift>() {
+ @Override
+ public int compare(Drift d1, Drift d2) {
+ return d1.getPath().compareTo(d2.getPath());
+ }
+ });
+
+ public int getVersion() {
+ return version;
+ }
+
+ public Set<Drift> getEntries() {
+ return entries;
+ }
+
+ public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
+ for (Drift entry : changeSet.getDrifts()) {
+ entries.remove(entry);
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.add(entry);
+ }
+ }
+ version = changeSet.getVersion();
+ return this;
+ }
+
+}
commit f76ba9bc7af51217da7d0ea38a06df8367b3ce31
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Jul 27 10:03:45 2011 -0400
add peer-review warning
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index ea2e29d..b1d0bb1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -91,6 +91,12 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* A tabular view of set of data records from an {@link RPCDataSource}.
*
+ * WARNING! If you make _any_ changes to this class, no matter how seemingly
+ * trivial, you must get it peer reviewed. Send out your proposed changes
+ * to the dev mailing list and ask for comments. Any problems introduced to
+ * this class are magnified because it is used in so many UI views and problems
+ * are hard to detect due to the varies ways it is used.
+ *
* @author Greg Hinkle
* @author Ian Springer
*/
commit 6a0bcbf60c4484bca23650b5f277b7936941ff05
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Jul 25 14:30:15 2011 +0200
Configuration.PropertiesProxy now delegates equals(), hashCode() and toString() to the configuration properties values as it should.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
index 5182b09..e8c0bc3 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
@@ -228,6 +228,26 @@ public class Configuration implements Serializable, Cloneable, AbstractPropertyM
public void clear() {
properties.clear();
}
+
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (!(obj instanceof Collection)) {
+ return false;
+ }
+
+ return properties.values().equals(obj);
+ }
+
+ public int hashCode() {
+ return properties.values().hashCode();
+ }
+
+ public String toString() {
+ return properties.values().toString();
+ }
}
private transient PropertiesProxy propertiesProxy;
commit 50de13949aa26f52c2f276d6035a9a6f32ed520e
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 22 17:41:52 2011 +0200
BZ 724929 - get domain deployment to work again.
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 920de9f..83b221b 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
@@ -338,6 +338,8 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
JsonNode resultNode = uploadResult.get("result");
String hash = resultNode.get("BYTES_VALUE").getTextValue();
+
+
ASConnection connection = getASConnection();
Operation step1 = new Operation("add","deployment",tmpName);
@@ -362,9 +364,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
*/
if (!toServerGroup) {
+
// if standalone, then :deploy the deployment anyway
- Operation step2 = new Operation("deploy",step1.getAddress());
- cop.addStep(step2);
+ if (context.getResourceType().getName().contains("Standalone")) {
+ Operation step2 = new Operation("deploy",step1.getAddress());
+ cop.addStep(step2);
+ }
result = connection.execute(cop);
resourceKey = addressToPath(step1.getAddress());
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
index 6911931..0281279 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -28,7 +28,7 @@ import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.Result;
/**
- * Component class for stanalone AS7 servers
+ * Component class for standalone AS7 servers
* @author Heiko W. Rupp
*/
public class StandaloneASComponent extends BaseComponent implements OperationFacet {
commit 4c399fea59c926d14df13c2d327e6d5f2f293b20
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 22 16:36:33 2011 +0200
Implement :reload and :shutdown for standalone servers.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 87a0a5a..b55fc8a 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -154,6 +154,7 @@ public class ASConnection {
Result failure = new Result();
failure.setFailureDescription(e.getMessage());
failure.setOutcome("failure");
+ failure.setThrowable(e);
JsonNode ret = mapper.valueToTree(failure);
return ret;
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 389bed7..920de9f 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
@@ -455,6 +455,9 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
operation = new Operation(op,address,props);
}
+ else {
+ operation = new Operation(op,address);
+ }
} else if (what.equals("destination")) {
address.addAll(pathToAddress(getPath()));
String newName = parameters.getSimpleValue("name","");
@@ -532,7 +535,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
operationResult.setErrorMessage(result.getFailureDescription());
}
else {
- operationResult.setSimpleResult(result.getResult().toString());
+ String tmp;
+ if (result.getResult()==null)
+ tmp = "-none provided by the server-";
+ else
+ tmp = result.getResult().toString();
+ operationResult.setSimpleResult(tmp);
}
}
else {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
new file mode 100644
index 0000000..6911931
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -0,0 +1,71 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.net.ConnectException;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Address;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Component class for stanalone AS7 servers
+ * @author Heiko W. Rupp
+ */
+public class StandaloneASComponent extends BaseComponent implements OperationFacet {
+
+
+ @Override
+ public OperationResult invokeOperation(String name,
+ Configuration parameters) throws Exception {
+
+ // reload, shutdown
+ Operation op = new Operation(name,new Address());
+ Result res = getASConnection().execute(op);
+
+ OperationResult operationResult = new OperationResult();
+ if (name.equals("shutdown")) {
+ /*
+ * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
+ * the server connection is closed and we can't read from it. So if we get connection refused for
+ * reading, this is a good sign.
+ */
+ if (!res.isSuccess()) {
+ if (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused"))
+ operationResult.setSimpleResult("Success");
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ }
+ else {
+ if (res.isSuccess()) {
+ if (res.getResult()!=null)
+ operationResult.setSimpleResult(res.getResult().toString());
+ else
+ operationResult.setSimpleResult("-None provided by server-");
+ }
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ return operationResult;
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
index c8868d6..42ffee7 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
@@ -41,13 +41,16 @@ public class Result {
@JsonProperty("rolled-back")
private boolean rolledBack = false;
+ /** Record throwsables during low level processing */
+ @JsonIgnore
+ private Throwable throwable;
+
public Object getResponseHeaders() {
return responseHeaders;
}
public void setResponseHeaders(Object responseHeaders) {
this.responseHeaders = responseHeaders;
- System.err.println("Response headers: " + responseHeaders);
}
@JsonProperty("response-headers")
@@ -95,6 +98,15 @@ public class Result {
this.rolledBack = rolledBack;
}
+ public Throwable getThrowable() {
+ return throwable;
+ }
+
+ public void setThrowable(Throwable throwable) {
+ this.throwable = throwable;
+ }
+
+
@Override
public String toString() {
return "Result{" +
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index d47b24c..c0e364d 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -286,7 +286,7 @@
<server name="JBossAS7-Standalone"
discovery="BaseProcessDiscovery"
- class="BaseComponent"
+ class="StandaloneASComponent"
>
<plugin-configuration>
@@ -303,6 +303,18 @@
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
+ <operation name="reload" description="Make the server load the (changed) configuration." displayName="Reload">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="shutdown" description="Shut down the server." displayName="Shutdown">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+
+
<metric property="_internal:mgmtRequests" category="performance" dataType="measurement" defaultInterval="120000"
displayType="summary" measurementType="trendsup" description="Number of requests sent to the controller"
displayName="Number of management requests"/>
commit 0ed85a444ed491d623956600209041df6272398e
Author: Elias Ross <genman(a)noderunner.net>
Date: Fri Jul 22 12:04:46 2011 +0200
BZ 723800 - support SNMP inform messages and improve testing.
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
index bdfdd84..3148d09 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
@@ -36,6 +36,7 @@ import java.util.jar.Manifest;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventLocator;
@@ -58,6 +59,7 @@ import org.rhq.core.clientapi.descriptor.plugin.ServerDescriptor;
import org.rhq.core.clientapi.descriptor.plugin.ServiceDescriptor;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.util.exception.WrappedRemotingException;
+import org.xml.sax.SAXException;
/**
* Utilities for agent plugin descriptors.
@@ -125,7 +127,7 @@ public abstract class AgentPluginDescriptorUtil {
* is searched for an implementation version string and if one is found that is the version
* of the plugin. If the manifest entry is also not found, the plugin does not have a version
* associated with it, which causes this method to throw an exception.
- *
+ *
* @param pluginFile the plugin jar
* @param descriptor the plugin descriptor as found in the plugin jar (if <code>null</code>,
* the plugin file will be read and the descriptor parsed from it)
@@ -163,7 +165,7 @@ public abstract class AgentPluginDescriptorUtil {
* Obtains the manifest of the plugin file represented by the given deployment info.
* Use this method rather than calling deploymentInfo.getManifest()
* (workaround for https://jira.jboss.org/jira/browse/JBAS-6266).
- *
+ *
* @param pluginFile the plugin file
* @return the deployed plugin's manifest
*/
@@ -184,7 +186,7 @@ public abstract class AgentPluginDescriptorUtil {
/**
* Given an existing dependency graph and a plugin descriptor, this will add that plugin and its dependencies
* to the dependency graph.
- *
+ *
* @param dependencyGraph
* @param descriptor
*/
@@ -283,9 +285,9 @@ public abstract class AgentPluginDescriptorUtil {
/**
* Loads a plugin descriptor from the given plugin jar and returns it.
- *
+ *
* This is a static method to provide a convenience method for others to be able to use.
- *
+ *
* @param pluginJarFileUrl URL to a plugin jar file
* @return the plugin descriptor found in the given plugin jar file
* @throws PluginContainerException if failed to find or parse a descriptor file in the plugin jar
@@ -301,13 +303,6 @@ public abstract class AgentPluginDescriptorUtil {
testPluginJarIsReadable(pluginJarFileUrl);
- JAXBContext jaxbContext;
- try {
- jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
- } catch (Exception e) {
- throw new PluginContainerException("Failed to create JAXB Context.", new WrappedRemotingException(e));
- }
-
JarInputStream jis = null;
JarEntry descriptorEntry = null;
ValidationEventCollector validationEventCollector = new ValidationEventCollector();
@@ -327,18 +322,7 @@ public abstract class AgentPluginDescriptorUtil {
throw new Exception("The plugin descriptor does not exist");
}
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-
- // Enable schema validation
- URL pluginSchemaURL = AgentPluginDescriptorUtil.class.getClassLoader().getResource(PLUGIN_SCHEMA_PATH);
- Schema pluginSchema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(
- pluginSchemaURL);
- unmarshaller.setSchema(pluginSchema);
- unmarshaller.setEventHandler(validationEventCollector);
-
- PluginDescriptor pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(jis);
-
- return pluginDescriptor;
+ return parsePluginDescriptor(jis, validationEventCollector);
} catch (Exception e) {
throw new PluginContainerException("Could not successfully parse the plugin descriptor ["
+ PLUGIN_DESCRIPTOR_PATH + "] found in plugin jar at [" + pluginJarFileUrl + "].",
@@ -356,6 +340,50 @@ public abstract class AgentPluginDescriptorUtil {
}
}
+ /**
+ * Parses a descriptor from InputStream without a validator.
+ * @param is input to check
+ * @return parsed PluginDescriptor
+ * @throws PluginContainerException if validation fails
+ */
+ public static PluginDescriptor parsePluginDescriptor(InputStream is) throws PluginContainerException {
+ return parsePluginDescriptor(is, new ValidationEventCollector());
+ }
+
+ /**
+ * Parses a descriptor from InputStream without a validator.
+ * @param is input to check
+ * @return parsed PluginDescriptor
+ * @throws PluginContainerException if validation fails
+ */
+ public static PluginDescriptor parsePluginDescriptor(InputStream is,
+ ValidationEventCollector validationEventCollector) throws PluginContainerException {
+ JAXBContext jaxbContext;
+ try {
+ jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
+ } catch (Exception e) {
+ throw new PluginContainerException("Failed to create JAXB Context.", new WrappedRemotingException(e));
+ }
+
+ Unmarshaller unmarshaller;
+ try {
+ unmarshaller = jaxbContext.createUnmarshaller();
+ // Enable schema validation
+ URL pluginSchemaURL = AgentPluginDescriptorUtil.class.getClassLoader().getResource(PLUGIN_SCHEMA_PATH);
+ Schema pluginSchema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(
+ pluginSchemaURL);
+ unmarshaller.setSchema(pluginSchema);
+ unmarshaller.setEventHandler(validationEventCollector);
+
+ PluginDescriptor pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(is);
+ return pluginDescriptor;
+ } catch (JAXBException e) {
+ throw new PluginContainerException(e);
+ } catch (SAXException e) {
+ throw new PluginContainerException(e);
+ }
+ }
+
private static void logValidationEvents(URL pluginJarFileUrl, ValidationEventCollector validationEventCollector,
Log logger) {
for (ValidationEvent event : validationEventCollector.getEvents()) {
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
index 3d9fb10..9fbba96 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
@@ -313,12 +313,7 @@ public class ExtensionModelTest {
URL descriptorUrl = this.getClass().getClassLoader().getResource(file);
System.out.println("Loading plugin descriptor at: " + descriptorUrl);
- JAXBContext jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
-
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- ValidationEventCollector vec = new ValidationEventCollector();
- unmarshaller.setEventHandler(vec);
- pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(descriptorUrl.openStream());
+ pluginDescriptor = (PluginDescriptor) AgentPluginDescriptorUtil.parsePluginDescriptor(descriptorUrl.openStream());
this.metadataManager.loadPlugin(pluginDescriptor);
@@ -360,4 +355,4 @@ public class ExtensionModelTest {
outputType(child, depth + 1);
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
index e137cd8..f9bb654 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
@@ -33,8 +33,9 @@ import org.rhq.core.domain.event.Event;
public interface EventContext {
/**
* Minimum polling interval, in seconds.
+ * Used to be 1 minute, but since poll intervals are configurable it stands that 1 second will suffice.
*/
- int MINIMUM_POLLING_INTERVAL = 60; // 1 minute
+ int MINIMUM_POLLING_INTERVAL = 1; // 1 second
/**
* Publishes the specified Event. This means the Plugin Container will queue the Event to be sent to the Server.
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
index 6bc790d..15a7ce6 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
@@ -27,11 +27,15 @@ import java.util.Properties;
import java.util.Set;
import java.util.Vector;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.domain.event.Event;
+import org.rhq.core.domain.event.EventSeverity;
+import org.rhq.core.pluginapi.event.EventPoller;
import org.snmp4j.CommandResponder;
import org.snmp4j.CommandResponderEvent;
import org.snmp4j.PDU;
import org.snmp4j.PDUv1;
-import org.snmp4j.ScopedPDU;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.IpAddress;
import org.snmp4j.smi.OID;
@@ -39,10 +43,6 @@ import org.snmp4j.smi.TimeTicks;
import org.snmp4j.smi.Variable;
import org.snmp4j.smi.VariableBinding;
-import org.rhq.core.domain.event.Event;
-import org.rhq.core.domain.event.EventSeverity;
-import org.rhq.core.pluginapi.event.EventPoller;
-
/**
* Polls the individual traps
* @author Heiko W. Rupp
@@ -50,9 +50,10 @@ import org.rhq.core.pluginapi.event.EventPoller;
*/
public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
- List<Event> events = new Vector<Event>();
- OID severityOid;
- Properties translation;
+ private final List<Event> events = new Vector<Event>();
+ private OID severityOid;
+ private Properties translation;
+ private Log log = LogFactory.getLog(SnmpTrapEventPoller.class);
public SnmpTrapEventPoller() {
severityOid = null;
@@ -68,8 +69,7 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
in.close();
}
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new RuntimeException(e);
}
}
@@ -79,16 +79,10 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
severityOid = new OID(severityOidString);
}
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.event.EventPoller#getEventType()
- */
public String getEventType() {
return SnmpTrapdComponent.TRAP_TYPE;
}
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.event.EventPoller#poll()
- */
public Set<Event> poll() {
Set<Event> eventSet = new HashSet<Event>();
synchronized (events) {
@@ -103,6 +97,8 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
*/
public void processPdu(CommandResponderEvent cre) {
+ if (log.isDebugEnabled())
+ log.debug("recv: " + cre);
PDU pdu = cre.getPDU();
String sourceAddr;
Address addr = cre.getPeerAddress();
@@ -117,7 +113,6 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
}
if (pdu != null) {
StringBuffer payload = new StringBuffer();
- // System.out.println("=>PDU: " + pdu);
// SNMP v1
if (pdu instanceof PDUv1) {
PDUv1 v1pdu = (PDUv1) pdu;
@@ -127,10 +122,6 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
payload.append("Timestamp: " + new TimeTicks(timeTicks).toString());
payload.append("\n");
}
- // SNMP v3
- else if (pdu instanceof ScopedPDU) {
- ScopedPDU spdu = (ScopedPDU) pdu;
- }
SnmpTrapdComponent.trapCount++;
EventSeverity severity = EventSeverity.INFO;
@@ -168,6 +159,8 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
Event event = new Event(getEventType(), sourceAddr, System.currentTimeMillis(), severity, payload
.toString());
+ if (log.isDebugEnabled())
+ log.debug("queue event " + event);
synchronized (events) {
events.add(event);
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
index f6c6df5..9e0de67 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
@@ -25,7 +25,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.snmp4j.Snmp;
-import org.snmp4j.TransportMapping;
+import org.snmp4j.log.Log4jLogFactory;
import org.snmp4j.smi.UdpAddress;
import org.snmp4j.transport.DefaultUdpTransportMapping;
@@ -57,6 +57,9 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
private Snmp snmp;
private SnmpTrapEventPoller snmpTrapEventPoller;
public static int trapCount = 0;
+ static {
+ org.snmp4j.log.LogFactory.setLogFactory(new Log4jLogFactory());
+ }
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceComponent#getAvailability()
@@ -65,7 +68,7 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
return AvailabilityType.UP;
}
- /**
+ /**
* Start the event polling mechanism and the actual trap listener.
* @see org.rhq.core.pluginapi.inventory.ResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
*/
@@ -78,19 +81,22 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
String community = ps.getStringValue();
ps = conf.getSimple("eventSeverityOid");
String severityOid = ps.getStringValue();
+ ps = conf.getSimple("pollInterval");
+ int pollInterval = ps.getIntegerValue();
eventContext = context.getEventContext();
- snmpTrapEventPoller = new SnmpTrapEventPoller(severityOid);
- eventContext.registerEventPoller(snmpTrapEventPoller, 60);
// TODO: check if the engine is already alive
try {
UdpAddress targetAddress = new UdpAddress(port);
- TransportMapping transport = new DefaultUdpTransportMapping(targetAddress);
- snmp = new Snmp(transport);
+ // TransportMapping transport = new DefaultUdpTransportMapping(targetAddress);
+ snmp = new Snmp(new DefaultUdpTransportMapping());
+ snmpTrapEventPoller = new SnmpTrapEventPoller(severityOid);
+ eventContext.registerEventPoller(snmpTrapEventPoller, pollInterval);
// TODO set up the community here
- snmp.addCommandResponder(snmpTrapEventPoller);
- transport.listen();
+ if (!snmp.addNotificationListener(targetAddress, snmpTrapEventPoller))
+ throw new IOException("cannot attach to " + targetAddress);
+ //transport.listen();
} catch (IOException e) {
log.error("Cannot start snmp engine. Cause: " + ThrowableUtil.getAllMessages(e));
}
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
index aab6d6e..2858082 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
@@ -38,7 +38,7 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
public class SnmpTrapdDiscovery implements ResourceDiscoveryComponent<SnmpTrapdComponent>, ManualAddFacet<SnmpTrapdComponent> {
private static final String PORT_PROPERTY = "port";
-
+
/*
* Autodiscovery is not supported.
*/
@@ -54,7 +54,7 @@ public class SnmpTrapdDiscovery implements ResourceDiscoveryComponent<SnmpTrapdC
*/
public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
ResourceDiscoveryContext<SnmpTrapdComponent> ctx) throws InvalidPluginConfigurationException {
-
+
String port = pluginConfiguration.getSimpleValue(PORT_PROPERTY, null);
String key = "Trapd " + port;
String name = key;
diff --git a/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
index 3b5f442..1846bb7 100644
--- a/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
@@ -17,6 +17,9 @@
<c:simple-property name="port"
description="The port to listen on (Note: ports less than 1024 require root access on unixoids)"
required="true" default="11162" type="integer"/>
+ <c:simple-property name="pollInterval"
+ description="Number of seconds between waiting for SNMP trap events and sending them upstream"
+ required="true" default="10" type="integer"/>
<c:simple-property name="community" description="The community string for SNMP v1 and v2c"
required="false"/>
<c:simple-property name="eventSeverityOid"
diff --git a/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java
new file mode 100644
index 0000000..944b0c1
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java
@@ -0,0 +1,116 @@
+package org.rhq.plugins.snmptrapd;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Set;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.descriptor.AgentPluginDescriptorUtil;
+import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.content.ContentContextImpl;
+import org.rhq.core.pc.event.EventContextImpl;
+import org.rhq.core.pc.event.EventManager;
+import org.rhq.core.pc.operation.OperationContextImpl;
+import org.rhq.core.pc.upgrade.plugins.multi.base.NothingDiscoveringDiscoveryComponent;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.event.EventContext;
+import org.rhq.core.pluginapi.inventory.PluginContainerDeployment;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.operation.OperationContext;
+import org.rhq.core.system.SystemInfo;
+import org.rhq.core.system.SystemInfoFactory;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+
+/**
+ * Base class for RHQ Component Testing.
+ * @author elias
+ */
+public abstract class ComponentTest {
+
+ protected final Log log = LogFactory.getLog(getClass());
+ private static File temp = new File(System.getProperty("java.io.tmpdir"));
+
+ protected ResourceComponent component;
+
+ /**
+ * Constructs a new component test.
+ */
+ protected ComponentTest(ResourceComponent component) {
+ this.component = component;
+ }
+
+ protected EventManager eventManager;
+ protected Configuration configuration;
+
+ @BeforeTest
+ protected void before() throws Exception {
+
+ InputStream is = getClass().getResourceAsStream("/META-INF/rhq-plugin.xml");
+ PluginDescriptor pd = AgentPluginDescriptorUtil.parsePluginDescriptor(is);
+ PluginMetadataManager pmm = new PluginMetadataManager();
+ pmm.addTestPlatformType();
+ Set<ResourceType> rts = pmm.loadPlugin(pd);
+ ResourceType resourceType = rts.iterator().next();
+ configuration = resourceType.getPluginConfigurationDefinition().getDefaultTemplate().createConfiguration();
+
+ setConfiguration();
+
+ // Speed up propagation of events by adjusting delay/period to 1 second
+ PluginContainerConfiguration pcc = new PluginContainerConfiguration();
+ pcc.setEventSenderInitialDelay(1);
+ pcc.setEventSenderPeriod(1);
+
+ PluginContainer.getInstance().setConfiguration(pcc);
+ PluginContainer.getInstance().initialize();
+ eventManager = PluginContainer.getInstance().getEventManager();
+
+ Resource resource = new Resource();
+ resource.setResourceType(resourceType);
+
+ resource.setPluginConfiguration(configuration);
+ ResourceComponent parentResourceComponent = null;
+ ResourceDiscoveryComponent resourceDiscoveryComponent = new NothingDiscoveringDiscoveryComponent();
+ SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
+ File temporaryDirectory = temp;
+ File dataDirectory = temp;
+ String pluginContainerName = "rhq";
+ EventContext eventContext = new EventContextImpl(resource);
+ OperationContext operationContext = new OperationContextImpl(0);
+ ContentContext contentContext = new ContentContextImpl(0);
+ Executor availCollectorThreadPool = Executors.newCachedThreadPool();
+ PluginContainerDeployment pluginContainerDeployment = null;
+ ResourceContext context = new ResourceContext(resource, parentResourceComponent,
+ resourceDiscoveryComponent, systemInfo, temporaryDirectory, dataDirectory,
+ pluginContainerName, eventContext, operationContext, contentContext,
+ availCollectorThreadPool, pluginContainerDeployment);
+ Assert.assertNotNull(context.getEventContext());
+ component.start(context);
+ }
+
+ /**
+ * Called before the configuration is processed; override to set specific plugin parameters.
+ * @see #configuration
+ */
+ protected void setConfiguration() {
+ }
+
+ @AfterTest
+ public void stop() {
+ component.stop();
+ PluginContainer.getInstance().shutdown();
+ }
+
+}
diff --git a/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java
new file mode 100644
index 0000000..143f8c0
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java
@@ -0,0 +1,116 @@
+package org.rhq.plugins.snmptrapd;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Map;
+import java.util.Set;
+
+import org.rhq.core.domain.event.Event;
+import org.rhq.core.domain.event.EventSource;
+import org.rhq.core.domain.event.transfer.EventReport;
+import org.rhq.core.pc.event.EventSenderRunner;
+import org.snmp4j.CommunityTarget;
+import org.snmp4j.PDU;
+import org.snmp4j.Snmp;
+import org.snmp4j.TransportMapping;
+import org.snmp4j.mp.SnmpConstants;
+import org.snmp4j.smi.OID;
+import org.snmp4j.smi.OctetString;
+import org.snmp4j.smi.UdpAddress;
+import org.snmp4j.smi.VariableBinding;
+import org.snmp4j.transport.DefaultUdpTransportMapping;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+
+public class SnmpTrapdComponentTest extends ComponentTest {
+
+
+ private Snmp snmp;
+ private TransportMapping peer;
+ private InetAddress address;
+ private int port;
+ public static final OctetString community = new OctetString("public");
+
+ static final OID alertName = oid("1.3.6.1.4.1.18016.2.1.1");
+ // private static final OID alertResourceName = oid("1.3.6.1.4.1.18016.2.1.2");
+ // private static final OID alertPlatformName = oid("1.3.6.1.4.1.18016.2.1.3");
+ private static final OID alertSeverity = oid("1.3.6.1.4.1.18016.2.1.5");
+ // private static final OID alertUrl = oid("1.3.6.1.4.1.18016.2.1.6");
+
+ private static OID oid(String string) {
+ return new OID(string);
+ }
+
+ public SnmpTrapdComponentTest() {
+ super(new SnmpTrapdComponent());
+ }
+
+ @BeforeTest
+ @Override
+ protected void before() throws Exception {
+ super.before();
+ port = configuration.getSimple("port").getIntegerValue();
+ try {
+ address = InetAddress.getLocalHost();
+ peer = new DefaultUdpTransportMapping(); //new UdpAddress(address, getPort()));
+ snmp = new Snmp(peer);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ protected void setConfiguration() {
+ configuration.getSimple("pollInterval").setIntegerValue(1);
+ }
+
+ private void add(PDU pdu, OID oid, Object message) {
+ String s = String.valueOf(message);
+ pdu.add(new VariableBinding(oid, new OctetString(s)));
+ }
+
+ enum Severity {
+ high, medium, info;
+ }
+
+ protected void sendTrap(String message) {
+ PDU pdu = new PDU();
+ pdu.setType(PDU.TRAP);
+ add(pdu, alertName, message);
+ add(pdu, alertSeverity, Severity.medium);
+
+ CommunityTarget target = new CommunityTarget();
+ target.setCommunity(community);
+ target.setVersion(SnmpConstants.version2c);
+ target.setAddress(new UdpAddress(address, port));
+ target.setTimeout(1000);
+ target.setRetries(2);
+
+ try {
+ snmp.send(pdu, target);
+ } catch (IOException e) {
+ log.error(e.getMessage(), e);
+ }
+ }
+
+ @Test
+ public void test() throws Exception {
+ log.info("listening");
+ sendTrap("hello, world");
+ boolean success = false;
+ for (int i = 0; i < 4; i++) {
+ Thread.sleep(500);
+ EventSenderRunner esr = new EventSenderRunner(eventManager);
+ EventReport eventReport = esr.call();
+ Map<EventSource, Set<Event>> events = eventReport.getEvents();
+ log.info("events " + events);
+ if (events.size() > 0) {
+ success = true;
+ break;
+ }
+ }
+ assertTrue("Did not get event (in time)", success);
+ }
+
+}
diff --git a/modules/plugins/snmptrapd/src/test/resources/log4j.xml b/modules/plugins/snmptrapd/src/test/resources/log4j.xml
new file mode 100644
index 0000000..69a897c
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/resources/log4j.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- tests configuration that only dumps WARN or higher messages due to appender threadhold -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="ERROR"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t] (%c{5}) - %m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ </layout>
+ </appender>
+
+ <category name="org.jboss.on">
+ <priority value="DEBUG"/>
+ </category>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
commit f21c17bd73b45c070ceeae982365ff8f75c3a41c
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 15:38:59 2011 -0400
Removing scratch files that shouldn't have been included in previous commit
diff --git a/modules/core/domain/snapshot.txt b/modules/core/domain/snapshot.txt
deleted file mode 100644
index 1f810c8..0000000
--- a/modules/core/domain/snapshot.txt
+++ /dev/null
@@ -1,3000 +0,0 @@
-93e92c0f415aa66a55ccd0e49d859348d27d5d54367813621979ef0d54e45f9a test1/0 0
-94fbd899459fb6e4939410ee2b0e1bc6bd53a57b2af8032b4a5c0b109d06b84e test1/1 0
-adf3039689ccebf34ec400c347703f17452a9ed9379b99624aa27c0005993731 test1/2 0
-b0879da6fe67fa0b6a9c022362924b13df977c13b25bf7d74c3738e33c398360 test1/3 0
-06656dbb054c912063afd0352d4aa72a071d1a9a4d4183e005a46a09750219de test1/4 0
-8564725d5ef522c04028c8d4ab89455b10913e59332dedd05c5bb7ed7cf80d1e test1/5 0
-251aec9aece7a45263e3f3243930006435dde5c5c0b0bdbea6c5e2304063b9f6 test1/6 0
-f4c7f75e564e53fb29af07c612dd4a5232de603e13a884e058b1e1bd0e909d3e test1/7 0
-77c4d70241d8eed431c5ad1ec4ec83eb7c4c252085aeb411308a3854ede664b2 test1/8 0
-4448f50b3b02039c6162be7ad939db59ff9f43fcd7e5a75aaa5607158d26cc77 test1/9 0
-e283683f6b3cf52ea745d0f2edb9d9dc74da0c0eee06531b5347f4ebecc44723 test1/10 0
-34b6be50f854b805c49be45268fb2ed20d11905b483f260bd9196bff1b1bfa80 test1/11 0
-2bfa9f61b309bc41df4d999e6bde2c3328576b8391421784ae652d5720b93c32 test1/12 0
-5407ab5878fc10dc5254c967b5fe3cf66299d231eb36ac27af1d75c04308162d test1/13 0
-999fc4c84b0440ef6d24c679fe9468f7af41e0875b3a5ba193f54ec824c8466d test1/14 0
-161bd4017bbb689b55d621f9ec7658a5f1f43cb18eb48a96f4b27f31f12a685b test1/15 0
-1ed8304b6f5b888b636438da8ec5134a3a8b373271ad29c55c8a65ee5fad5b8e test1/16 0
-9af92b2dc57f984a7d0f5923e480f509b9f1da52ba0c13ccddbec533104cb5a7 test1/17 0
-c714103b46f3bb4f94aacd14f974a2fd40e968b6fb95d2eba2984992e4914312 test1/18 0
-ad092783b1a1a1efb8dede88a14a83ce57dd72ef9c0220aeeec6a1c54bbf86fe test1/19 0
-ca4ef5ea3f763a7dd58e2d1450212ca8700266e288267b4b44bc07330af9fd69 test1/20 0
-09d3fb328873594a11c77e1100655c891c20aa345ebe836fa8f7f9ebd96b94c8 test1/21 0
-55b174d7c19288f5f7674ce43aa3347cb1602b7df23ea2f249eab97db76e900b test1/22 0
-9555f6f19843fe04312cf23957d408dae400eb3163002b4f1c26945470dbf8d6 test1/23 0
-c6b6c34ac0eba6ac68ce7853942f210fc9aa8702380f53b06d9f8f3eebc017c8 test1/24 0
-0be678fa48e2df02a07d358724ecd00b19ece5653c0c06103367d094815d099e test1/25 0
-d4db7b380bf91f238c03b0165616a201b4a29e70bb40fefb1cd53b1be0c6f6b0 test1/26 0
-11a342df1c98476f73b327c6f7e3e4a419edd3af467eca5180c547aeb6637e20 test1/27 0
-25979869cbf179dd7b91650804438984d53d11591514a1097241a21ce62cfee3 test1/28 0
-095d48e67dea734b4c1e390214cce1fade148df00a03a54ae25fb3ae94e6e717 test1/29 0
-6fc81ff946f393a4da640c4ffc18cc0c79c9c24da1b7a50bfa566342ba853e38 test1/30 0
-f1ace3f1502b144e2badc189bc2b5177a0dee8afe85603775516845e31b4762f test1/31 0
-15270686d4dd3baee620394e99a2b72fd573239787c7a536b0a524922e415de1 test1/32 0
-73fa027929a5eb3eb62b3e2df0e78ecf2196a3df5f2de74d1155a1d867f4eaf0 test1/33 0
-e1cdbaa01ace490fe2d1142550a390310c64e95e7f1b21b4ffd2fd35749971c1 test1/34 0
-f0fa8b8146c6c92350fd9b54a7dc8faf62d8fc4362a4286a07d28b4cb05810bf test1/35 0
-550254395e0d3b832cd0992c480018559965ff4ed2459c17aacf4ccd010e2f5a test1/36 0
-a6691b97eb734822f1c0510474e50b3a6b71ad34c486440787e583b1b47d0747 test1/37 0
-f3852cacd73f6d7b778358aba919912f74b5d473fd055523e6968c846880a68e test1/38 0
-5da6f03a018430a595536d93b439680da6d6a823f44a1623144ebca84581f353 test1/39 0
-6b2571c109ecd5b64c8f1be509c8d7fec3f8dbb422b6c407851311025468283e test1/40 0
-963c1597d2de24b553aa972914c5bd3f19d303067c0ffe38357c2199f9056986 test1/41 0
-68042243d98c62f6705bdc0020eef4ebe5ebd6b7832cf330f022498aa8dcc186 test1/42 0
-9912c7acbf6c86e256ed95e469e859ac9cc5d8fde114abf9ffd02739c8d7dbf3 test1/43 0
-1e335a18dc9d46e1545bc8916c6635f9b0327a2b12552d3b5df01bd6fe9fe7f2 test1/44 0
-497579028dc956d13b353842d4de2303e4300bf82a3107583891ad8888e85039 test1/45 0
-f82d24a260858763fc4650303cd96e8e40f4ec0aa030c9c14b6cbf2056cb44e1 test1/46 0
-4c1f7272a19fe0a3099ef6f4d91762e6a7e12449f62124cbd11d15de911714e1 test1/47 0
-38e403db8d756191973a2f1716d0a8a5e082ea583511fde6cb6f1abb078ee4f3 test1/48 0
-b6556279774a38f8938e7f334eb3633be51916f3051675b048843c8e8ecbf1b2 test1/49 0
-5766243d4d6ffbea18772d0b5926d2886d66b8cbfc6dc00ed8b0069a28a7cac6 test1/50 0
-17fa3dc16a1a190c515fafe9a26f13596dfb5a7a7c5be5ba92bb80d8c738cc21 test1/51 0
-e79c2470c6a8f4e6f59d035ae848b6bd8d941bca899f6156defd5a418a1aa91b test1/52 0
-1425c79446b2e32cc0fd1c919bb1f409844a994756d03bba38bd4669b3cbe94b test1/53 0
-470cacc611b10026a736c639ce709a61bc843c8e947ad40149c29c4384f7623b test1/54 0
-fbf74352f9ad3469810b0360f08903562bf2ee6d7660f8651d37e2f5c09a7d78 test1/55 0
-a6d051dee582e7278bf6fe8a4fd7cf97073b18bef3d5547ace46cdcfeb3b7a63 test1/56 0
-74b6dd40c4d95ef3444d82e536d5dfb3253fcb7d2831318e489881bc967712c0 test1/57 0
-594889b32d366e79a545e487f11a44102b4d4329c04e437904c01beadd1a87a6 test1/58 0
-7ad8d06191419c19a3aa868e5fd0f2ea79e1d2fa37a9ddcbfea584e98583170d test1/59 0
-00a6f54df08ae6720654bb8c4c0a2fb669f362b4d903cccb759f4c3f8b541dab test1/60 0
-c62c7ab4188c70d6b7dfe3127a0f7f1771ec075835f31215fbf74e334299eb11 test1/61 0
-77f54c9394c4d8594421eded4b592a747b346c6cc8f8fee893a7b0db62fb892b test1/62 0
-207d63144c7e3de618fe7f96f4346543d32af8fb1f370b8943da7c5b015c187d test1/63 0
-0c17895edd30ac98a9cea894d1f2ad8b23635302fa1ff0c972bb0778468db22c test1/64 0
-fbe0fc1dab31f0510e6a0da5ad46f0542145bd4efd63f1633b87f24de1aaa3e3 test1/65 0
-88be069fdb3bd08e9284a9fef1e64b828091b83672dd8a2343c369be76880957 test1/66 0
-b674ad594f54f8ef2cc4dbbb84b998f08d2076cc6e9d23591a0dc4cc609adf9b test1/67 0
-8a7c9216ac8d02a31ebd65186d06e88add4720585d408e9808f587c44cea6283 test1/68 0
-89c2acb2a6ff43f1bffb336cc33c9baf8ebc543dc73097d1fb0a9556ac410c56 test1/69 0
-2ae0a4bb528fb450ce4ca0e8208a4c50a86483281f2efc13e1da2918462680ca test1/70 0
-9afc0398b28a4d8a219ba9b4107d3e954237b7d1d80f2dd58942fda25087480a test1/71 0
-402ffa8422932a3e6b4b4ea82e3d849c9fe2d8dd6fbcd974ac6dfd67db97e816 test1/72 0
-51b336dabe9b06c6f4bf0b8ab4beb01d812b5e802d8c562003fef1feb04b5594 test1/73 0
-e3e4209781a43a0cc686d9671d1d13adc8c93a11bf3899185385db69593f1fcb test1/74 0
-ccf800357850ed899d0c20fcbd80d21885a2028de34bc16d786311ee9a9d72cd test1/75 0
-3c994225d1972baa6f97af6455161c3c726ce3b77dad02c4891c6928eb8ae825 test1/76 0
-53d40b96a7bac33f80d966898489de15967b508d60992facbfa8c46c1abad85e test1/77 0
-5383dd2af3479ea61550e0c0fc5ac8d61f6385a5ff9eb3c3a52285aa8a5e2be9 test1/78 0
-ce351ec9efb46ba40dad01e093c14905d8a5dfb1af7a129f6bb22c04fa30fac1 test1/79 0
-e4db5bd0eb3ba46dea729d9bcdc30b23b3b51a0a70847b52a7cd95f296693657 test1/80 0
-5910feacfafedb664c2877588ee39d6a77ff2a0a4ba2be0718d7446f14b64624 test1/81 0
-c8e67ee213c49a9e36da81fa0b0e46732b5ae5fa06993301b42b4acb665c5c68 test1/82 0
-422e2d7728625507190c74fbc5debf436e3214a52bfe81b112e355600dca178b test1/83 0
-ff9ba5727d94a8617a08eec78d5bbe7aff135eb494ddef63d4cab8d8311daea6 test1/84 0
-1038418d653e66633089f1dfbc69be9f92d387a90ef610dcb646f0da6eedf2bb test1/85 0
-248257e12f51227dbb52f96c287e11635f51a520d998587ba481dbe90968cc83 test1/86 0
-6080687a2defc3e4a72ed29137e0a3676395d60e8f9257f14d411eab4034ce09 test1/87 0
-e9c3fe77b8dea071ac40261c8d47270041ad4b0c3d1fc4bda5e3ccfb93318f5c test1/88 0
-b448227cb7726d8d80a9618ad2d237985f14db129816d8cb685de061ef69c197 test1/89 0
-e155e014d4a431498316277e0b8ed4b2d9ae2d581923cace35d5a01d62a7063b test1/90 0
-bd8424f48f00e2ea2a14dd879684a9c46cdd8ed47ea9884163fafbb2c3b29075 test1/91 0
-153b230dcac0bca526235389b061f0053766fb7d0ea8b61d91cee65f7b71b523 test1/92 0
-3c32fa4ee56a4cd9bc186343adea7d61be5f931bd144cd60f691cace1d49634f test1/93 0
-fe6c21de3fe5957810d88a7c5efc9c9b194c3b3a022ac2efc29d8f4af7d2d9ba test1/94 0
-277c096d5578aa103fa518463958625c5379d4bdb200d91f949f8a6f62906d07 test1/95 0
-fe8d978cfa8a5eba2a58ceb811e5e7ad9ef287b2d864e2f4bfe7c26561038785 test1/96 0
-8a2d435818a7d70d9419d0b4e7c78692d960c75376d4eeccf920f772e059edbd test1/97 0
-0180a90589f021bddb305dfa1767de34a9b60988576c6a7e061065b32d2875da test1/98 0
-791799f9931e2f0e464f037625152b7fd9b86fd3aa55aae2f36c58260a0caa1d test1/99 0
-0ddf02f95d3abd712f36e5a9fb83239538ddb461dcd192558b63110a12d9db8d test1/100 0
-770d7e0e31ecfda0a49e85e5b046758c1c620527c102a732b073312944dee44c test1/101 0
-d14b5a9a6e02051e6ffc5e9a7b7e6c8db099737ad3da005b04ae9baf90ed7961 test1/102 0
-5cadf94a6f5e1cc161b8075c676fcc6fee5f314a3496fcf3a864ddb1f2693cf0 test1/103 0
-6e4bae160b599363563699b4acec4ece274ba0f1ecefdc9c7ca6ba85b1046f39 test1/104 0
-cd0af0e0a55ebc613e454e7fd158120daf1b0ccd88238a0d7e638303b6441bf5 test1/105 0
-45b48ed72b11b51b80995659720ab53d1497561e4fb994702709e774f9bce9fb test1/106 0
-1fc332cc25fa971aacc06e498b424ba2f30bbfd5af5c2671de9939fc8be6efec test1/107 0
-da325fb1d76bda85a7bcc51408b37def38abd9cb24181933aa208e689de9b6b0 test1/108 0
-d8992471d36fbb0f6b75221ba3c28bf47e5d3724ba532057234261ed8d445c51 test1/109 0
-5872e099caa22aac444d2c0c7df36656a609bf7ff88a5f2e07ab57e8ab3e8463 test1/110 0
-17fa8d710a7932a2d85f02c19d895db6af85ef8ca09ce0ad2320938c056c1222 test1/111 0
-f90298cd8bbc7f6d9875bd7dbda303726eac9e71657b5b3b6b9ff69722c76cf1 test1/112 0
-34057cce56e528ce18d36b9f30619722041b2268d35c7632a2a60b1c820ab6a9 test1/113 0
-4a019913e772c3d19d02241c38709b1a5d678111f9626b3ff6158470e658cc34 test1/114 0
-384d91d9b6be2058e45daad7a71e8b6b86570e7f7f28f979654b263e1ed3716a test1/115 0
-383caf2e6cec05028ab202d910420ad9b685c425494e775327366292520f7464 test1/116 0
-a68c1833375189b696f757079bb0e965bef7a594749bdfe09179b8f76884cc67 test1/117 0
-33f761834cff416a2e7a9c50476d6e61a20b848b65af354b21277db4bafa79f7 test1/118 0
-cdf4c617bb008e5af0b6177ad7890745aeb7d6681b249af05e62901ff8d10312 test1/119 0
-f245f42b6abdaa9fd4989f6690078d2724569caa14f8f2901e664dafa6739b92 test1/120 0
-69db96dbca51faa3d39492366195ea8854f90365800ed83ea07cb766cbd7c6e3 test1/121 0
-ac32dee0e4bb11fb45378d206075b8aeaadb3781cf1cb9abb3ae92952dc1ddbe test1/122 0
-9da59f7b3a447ebcc335165c33a68b97764396e47b2834f2ce395538a7987b07 test1/123 0
-daa858953cdcc274947de320f347e94e5fbabd1cce8b92efbec322858eb3749d test1/124 0
-d18db683b454fb9ef6214e36de234cc727f5ffcf4dd33cf611c26ef7c114d17a test1/125 0
-f3b79bff4905ee97d05eab0706935b11e2855356fb37277664071ac87bfdb9ad test1/126 0
-8b394a7dc0d99416633f392f0e8a8928a44b4932c4d046fdac01f7fbf07de777 test1/127 0
-5cf8e7acc88ed2ece93a7ee46764da376ce276e15b381066d77654ca76fdca77 test1/128 0
-1722133bc958ed2842fa020b95cc386d10ff7bacf145f1caca65f6b17f79740c test1/129 0
-da60c35db70f29db0fcfefa17fcc014b373cb09fbec8020be0f2422874eaadee test1/130 0
-57612e7db907f0084488969c6724682a32cc016454f457718f3b72abba0d7893 test1/131 0
-c886768d92d40dce485b891db8f9aa5f89fc17d0f7f644634eef7f159ad024b5 test1/132 0
-8fb0955a700af97ec8cbc82740eae78baf0461b095dfb55ea13aa8de1011fe09 test1/133 0
-5ad5dcfe4b6c8f20892fde0f7757ae9902aada719edab50fcf2a9e15b3fd62b3 test1/134 0
-7dd7cda0e4f0ba79022c98ce81b8f813af24fcc92222032014fdc4130dcc7bc6 test1/135 0
-4b71114b12d341aaf9eaf360546fb63f92bad2101b913bf401c96a8c9d699ee4 test1/136 0
-4f8910c3ba4565454ed5e74fd55ab65e21445727734966943fe903e368b612c0 test1/137 0
-83416c194860e8da17d02195703b3d1184c7bb36de16e699e19465e4f693fdb8 test1/138 0
-ac165a46ada013f19aa5a60639f3a778c859a0ee6b259f138c7f0712e79af473 test1/139 0
-ea32e9da4de879a76c2fea22a988fe989405fcd3761a0fa424e9baf78a7391fa test1/140 0
-9bfda524db57a43177e496bc15706972702329a7b3bb1238aa8f9ade65ff32c8 test1/141 0
-f684cf1a93b5b941bbad51258888a692ac20c5297f0fa5cdf8776f72346ffeb3 test1/142 0
-ab516ab86adbcfe94b667cbbda805465bf8b5f424907c06a85966bb7ce2541c9 test1/143 0
-cb8a06068dc9ae497258cdae37761e2b1ba8805d05af0413c88cb1d16a59a46b test1/144 0
-82fed2aaa147eccb99c68a477bf3ca43972d059849bf05bbbec1b8ae18ed8ad0 test1/145 0
-6e29f3b832ff4038cd9524214d5c1820f56c8ae418ab76fd3c78143087a50c8b test1/146 0
-71d61d69f51542c2ca875191bd2d61d5ec7df1ce92dd31003cf47ef009e827a4 test1/147 0
-04290b88ec21383feaf55898062edc5d2b3c658bbee39266679c503f836c584c test1/148 0
-81dd1d834c012a3750357e5f1f3a39c749b1e18d4d64e8da0bc7363f2087d5f5 test1/149 0
-0e573b27ad926a33fafbb626b30597c04e392097842b8ef669ec417ce0d9f2e1 test1/150 0
-0b0e85aefa5254f269278dee2bcf93db170a440b40c309977ed8afc6a177e0b8 test1/151 0
-6cd0e02dfc568762301f861066909f9fab58f8fc4031eb1080203becd192ae66 test1/152 0
-3a6fbb67464fbac9a994f8dc9e9ca24ffdb54d58505ae9161ad7fd198917ce2e test1/153 0
-a8552d2203a95cb65c635e46492a5d65601d349a5beb1527233ac10da7f50948 test1/154 0
-6779dc33d4b85cfa305cbda029b1e30b4f891939b7a5d6a2a397ec13e761eece test1/155 0
-54b4359607d170039b1ae03eb4f1cc38ca6bdc69cd9beb6ea7e795b8977b19d7 test1/156 0
-0af05fe135509e38d8e2c6b86b87377ea9396af869789eb4ad5a5a8976aa588a test1/157 0
-84279e23e4e9fd2b1a88551df8a18c2d8ff5a39acc46f7d7f6c578b70f55c981 test1/158 0
-60069413fe3f3cabdf456781de01186ece1c949906f4ac942882e781ebaae52f test1/159 0
-67dc50fcedcc925248b63b9d6c721eace74bf155dac344ae713c75596c20cdbb test1/160 0
-982335f8f17cd8bd18090830b24cc42ae428b4d11d9096f95ab300d9238ceab8 test1/161 0
-39ce96539abf446780feb4a8ad9708190e8b5660f7f1d0afb76222523b2d65b3 test1/162 0
-54b8f2944628f886aa9fc2b841e2fe98dede8eeb8dde17fed40fd775e23d5811 test1/163 0
-7d3050aed86f48b5691a465829d0aa04d57ff8054c059171be94f02d103d849b test1/164 0
-93fa34cc08bbe366bb115d54f1106fd453fdfe0f6ed0e85250337292d2129f22 test1/165 0
-00c813c05a9629778e1d816d7d488dc12b392d71049812105e611e718a51bf85 test1/166 0
-454324976eddc61634d0df8fba87caa9909cb42cf2b609046f496488565baf82 test1/167 0
-c8efa92bb16ffd454fb00e27e95a0c06d88263f3fd86d95bd1c0a6792a12f755 test1/168 0
-79851af11d1df1ca3491b68bb0062816de488b3fa4f6f1d1b9fe81b85cb971dd test1/169 0
-96cff0601698066d018c84bf96d697c03d1f362e5a407a970de247881f7d0303 test1/170 0
-60b5bdab53b06c6d30f71415e95153aaa87216bc77bc2e3bce7d63199e9cc8c5 test1/171 0
-11ebf3b1eab102a5f42d1fedc90cdfb3745972e74625d1c9d5d3d98f82ca22db test1/172 0
-d302457c4892782536ea2bb3e8088329b5c7c1357b867c91be98740147f3689e test1/173 0
-8275087150cd752cb053f31283a84a8b97d599bd02d0c13c38f6a7ba38aa6d96 test1/174 0
-65e9d252536a0d6b173a8bb22e64d308e9ce4196b58e953de2947ef3e95adc12 test1/175 0
-3c99ff06797305c697787820eb233580638a96c0cbf6877610dd0e7cfa128363 test1/176 0
-e44d0d8a2163e03b1726048862e915ff835b0b3176dd05c32f4e66037dda6b51 test1/177 0
-1995d7eacf17ebcad42731682716b6b66f8ec344c5c070a3d88aa134558e656f test1/178 0
-4f53ec03261b3c38b5dc7889dd4e75836457eac7970a04325f86ecc3f54f6cc4 test1/179 0
-4af3940149a94d212dd91cb1b8e3536b9dcfa58fa533027fde2ade5be43a1285 test1/180 0
-d03494cc1b59ce51d280067998dfac92958223fc21c384bf09a10f575ce92cf2 test1/181 0
-1eab0f69a763f8188da6ab7d0096b0ae6b0607a382c8afadc9247207a0486234 test1/182 0
-018eb8a2a0a6d847b9a2dea900651705a46fbc5cd5c78011a4c4f6f52e6a2ae0 test1/183 0
-23cd6b98474be38d060491b6fe58b7cf053b7a6104669327b952e4f09aebdbd1 test1/184 0
-23cc76a6aafb07b2bfceb6ccf42f21ee20d814ddc15617bcb402f69b7688607a test1/185 0
-82844821edeca06ea5f4a64b08aee16e929c2391ad0275ca7cf28759f986dc00 test1/186 0
-940cccec4de2a2f97d295a3b19adad06594e40d613f55cb9ae5aa5ace61e083c test1/187 0
-0edcb4db3ade1cf50e18cd26d23b765f3ab1a60337b5ed99b39f1fbbe58a0dca test1/188 0
-4892e828d1c7eadf1429e51486740476f885341151a01e83093e7c923c034aaa test1/189 0
-9ed66f2564883f596d838b8b41d37630e9ca47cf8d5db1c2450f5cb8e0b346ad test1/190 0
-74fc7e95f051fa265ad1f2e84bd5e4e7ab0d827b669439f6700ae4235c0649f1 test1/191 0
-8bfc5db387157a1116eccb9993c68b093d777c217da1441e5c792e1ad981691b test1/192 0
-725d03feb739c44f326b363128eedeca6eb690d8983c50729aa9fc6b36a8afa0 test1/193 0
-a65800838a06a63d7cc37d2a7bef131f74a3da961ea6baf5885937f6de7d0f89 test1/194 0
-8aca1fb937f64450a12701b6cb3753bd411b463f20b50ccbbb78b304cb7d752a test1/195 0
-cb414ccb9c08c48972607504c99c0d86b2c65e4787921b1667a54f678a6f5c36 test1/196 0
-92cfbc0578f889690e475fea3b8a17903584e31d9feea20db7bb0bd38e5a83ac test1/197 0
-dcf9046cce111eaeb8b1ba3c608947cc3d4e34930ab101487c79c22b559c6b58 test1/198 0
-ee11c873cc9993f887b2da86962a434070ce19217b2502d72fe902d55c075f83 test1/199 0
-684b2acc5ffa90f58c1662ae6515903b43017a97697ad89fe16f24f3985ec1bb test1/200 0
-51901b446f300d0161a64cea30b38a6f9634c58d47d82390aa99c92c51b09c69 test1/201 0
-23f39e274b83f9e9f2e51de9987a4f4633255bed5209ffe45c644ffa81aaaf2a test1/202 0
-7c5d4f20d81ef4c03603acbefa71c044b76612b268cf9e0692b7a5f820c73fad test1/203 0
-d543c31d78ecdff1c6acec653f0952aebe5b35a0f4c646ebc14a8c6317036767 test1/204 0
-59779c0306fb51d7c13389ab87d89e6e4a79132df1f39a4550f81001a1b28b8d test1/205 0
-b1f1d14dbe1bc1ad593f78ae05beed534ed3356acfe4fc242b4b097ce6c047c0 test1/206 0
-b1ce7edcfd936fa33bbc2dae079d8a81c3cdb67d7146a651b9262a6dfbcaad33 test1/207 0
-c090f591cf936a9bee230f83b38638ec6ea175d5a9403b0e8ef4ade8f7c55383 test1/208 0
-527cfe0aeafa72ccfa3253063a600e1b13948f22846268015dbe435b3208e91c test1/209 0
-74238407c20c98a53e4e042d08b52fb1b3575cb226aae4c6d3021bba6d5a8343 test1/210 0
-d9cd5da16389aa1920984e72937d01657a8d7f1a3f8169104ab1eb900eb56c59 test1/211 0
-530ecbf3d591e4bae5388a293d17a7eb62ef25cc9f66e151c73f502ffb3a52ec test1/212 0
-32541fc9519ba3cc2abc9d304934bcb831b2983503281f1f667e2c10870c765d test1/213 0
-a9b81fa1fee8c597389c2499ed07fcc9eeafbaa5a0041d7d9a91a2b545728cf4 test1/214 0
-2d6e33a39655b75fcd67943e08c8c8e51160edc5de0b148408385134c3f65b02 test1/215 0
-05820e4d257b3112fd55e14c0f28163d22d692398575143de90402b693def880 test1/216 0
-d0af57caf143b7b10a31509383b949345ff9bafb78a8fc3e2c66852a2392e65c test1/217 0
-a151353f9969a97629eff1eb21c56dd5c7563a656b48a7488e8717640c854bf3 test1/218 0
-385883c6f59ec676a5a341397408864094a8c352faf140f7551b0432996d4809 test1/219 0
-5a054f41189cd4896157f7dc75f17f3b40f702a8e0d18f2179e53758be7093db test1/220 0
-90b315afcae7a39071264d2eec0294fcbff8167c3ea13d42ba76e730b41cd74a test1/221 0
-7b8dcd748eef3b385d8d013d0575ccffb09018f56ba288651ef9ff2ea48b114e test1/222 0
-13429f3587ee37a731f7d8c04f7bcb5e32b1f53dffdb970b50b0c8a937bd5d8e test1/223 0
-a27f7fd552acbb5797a9f18ccba573c95c08a61c782a381c64c794b4aba8e1f7 test1/224 0
-fde97705a3dc755ca8e8ef37233053817dc6565799cae6859e095459f1eb82e9 test1/225 0
-e0b46e6227f70ceb65c5ffcc5666d39dcbb2c4abadcc857c201ff893567754d5 test1/226 0
-8318fbefd7cb2d2883e956f325bf3de78da1ad4a6970dc6e6158d4575caf9898 test1/227 0
-0d9747eb0d1226ce7b8c67405ebf8b80497c5de69b6daeaf5083dc3d44997dbe test1/228 0
-d9d765fa97e69a14c645e5ebff5522f9fd53bb996a9143e0181c815b2857f520 test1/229 0
-3ad451cf379c4c8006ac292ff12d5493884daa5bc7a9b9ba46172aa54878dc1e test1/230 0
-3348c3bf0602f5b869f53c0c9957a80a94517c88645099291b66c792e439318a test1/231 0
-bf543efd95d944e25e6ac76ae3bc5af3f88f215d5ff0a8d504f7163c9e4ac6f5 test1/232 0
-de57bfeb7b43def7402035c670456ea018e786e2c7a7880b0768d8fc840a1150 test1/233 0
-6537a4b6649c50a0691b230072cdff3325d7a903e51c12015688516e8705aa0e test1/234 0
-a852a1e6bc44b49dcb17984ad443131fc4ffe2d661939578b11cd67c48b7db22 test1/235 0
-b05deba4c8922ba21631bef140a286484aa691f15308758f458841513c88913e test1/236 0
-f2201eb7dfb00362ed8d4712abc1ed9b73323c46e1911c56e7d2c2c35aacf381 test1/237 0
-28ff52b5666e5974af2df51445eca3f5a37f5bf67218305b8bf6ddb5337cf245 test1/238 0
-e1fe35146d3a36763646b5cf7c91aa7725aea507128c70f56ec2bb4a0207ef65 test1/239 0
-5b91f0790e0c58e102f528f3568c4bd1e9c253b0af7f70c78dba4c2d55c20c44 test1/240 0
-ad793a544dcc74c1d7122692312d7321be0a40347138a9a3d5cf81326486afec test1/241 0
-c16dc1e017f5e8bf20418c7370395a805c78b058149903b36c481302df1a2b33 test1/242 0
-37ea7110bf4f151c9b6490d6e69e03c2679c88cabc700422d1e2a9331bbfe2a6 test1/243 0
-c400a6b6560e46dd48159a8b2268a42784bdb4a730cfad9552077ac83377c6ef test1/244 0
-c705bb491cad1d0b2df518ce07c99df006a1083e5316c3db6ace5dee3cf58c6a test1/245 0
-96ec71d9070d5d70049d10ab788936f539987e6c6fe51ea368df0c74988b536e test1/246 0
-4e89cc8390901451b84a8c31bf00656c05b2bcc2c088ffca0efcfecb3f86f900 test1/247 0
-35f9ea26d5d80cf319e5155125b056b935d83dc1ccfae8d6497e49c6cb5c391e test1/248 0
-0d5d224abf69d50155ffea82f921c5d31fbb8a464376d852684216c8c161c4f6 test1/249 0
-d84efa203e1b7dc194f8f5c34ccbfa113e0d939ce91589bc00fa41e6eae2c36b test1/250 0
-00131158266a252f1e6ba89f1781df1ebb456ee4caf54bfd8b45c7f598ec8114 test1/251 0
-2cfbba4e46922afcae35a7bca5e2f69cdb82e84fba32f6e4ac6ff7d49ee5fc04 test1/252 0
-b03d290c6c16ba06d12dd9a3653a35cc44828a2f54f6dfeb8b3e85aebfef95c2 test1/253 0
-7030e6997946b4f9e1c960e7a2e9b39cde64f9a13aed52b3f6b67e229beccfec test1/254 0
-902339529ca71b9017aa732d215d7745597fb8a03aaa209faabe9f248c18d505 test1/255 0
-84666f8c171facec0339181ef1ddb63e1536fe6774b0245bae8f27a6a750d2ec test1/256 0
-56d270e5ddd17a2f18624d5b824e92cd2ca192a8bb5e8775e2863a9264f1616f test1/257 0
-a19f26b29a37805689c0eb32bd65a4f6f19aa00563faa6b1101bd3d342dcfe6e test1/258 0
-06e874ea0fbf7b3bcc55fd8d1f6b5009dbd6cfbe2f8731519d01b0819e7dbc93 test1/259 0
-e669ba7053fc4acea8ddc4e3192b512e85236f8f09455087e73d968e79a163f8 test1/260 0
-1f47704f57c6bf16116fb341c110eb68b8df2d334415c642c5ff9cbb04ca886c test1/261 0
-de7b7a259fa981fffe1d366a463e54107b64c74847ce13f54098823215de8c09 test1/262 0
-a2e67d4b28b5b6e6cd0ac98f45839d59e3909ca664db822304a2dad94ce430a1 test1/263 0
-411b148139d235469139eab1e3edef142faf76b9fda81a0665599a6a305e0b9b test1/264 0
-f2b10ee09207f01e74a93431bc293a5d833d214254587001f351f11828cf1a6a test1/265 0
-ff0c2f2e88c5bdc31e524fe05dcb4f33ab4a725f8bea6d71ebf48719c1a87728 test1/266 0
-8701191d7a6ba17032aeea57dd89fa08f191ef40cc6cb8fa247452f41c9b3864 test1/267 0
-a6f27b7dd81c319d830c0c44c20aa71f1dc58144c8a476c3b254ca199f3483eb test1/268 0
-38c6d602bb215dc695b7d7b10845b6fc5ccdb1b91467509679d84d0ce8f13ff2 test1/269 0
-6d97f1daf76f2018914da7673d0beb8ad17657d74676c7f5405a14cd64cfc609 test1/270 0
-c7246b0540ed67a36cd4334f34a192932d30ddab470072ccce8ac13070752af8 test1/271 0
-7f3b2432a8a6d3f14ef45ffd6f59db2d5435d85bc97da0ac721e4a07a57f98af test1/272 0
-f361e33dc6b3868045b08a45cdf5580d39e3b178ffdd6748f33e19c05f6c5f16 test1/273 0
-a83292a76edc4dc392666367c674780ee113e9c63801960b8b5f012b8bfbbfff test1/274 0
-39f7f4eb1b7daa3c6ce96182a3a0c2e341c42364b011e680e414999692138bb0 test1/275 0
-202f29fb93567c3946b1e8e37dc5f9090cb46e29311aa570ad82a46505dd7138 test1/276 0
-5cfce21a501faaf353036d66f8af69d924a2f56d850967242aa1b469805c821a test1/277 0
-e94eb1e20a56f2f3110285629998a6716b582faf4ba85bb45db0c97c9f702343 test1/278 0
-306e4b3c970ff6bed8997bb9ca3efd9d72c621a7ad6507474345a5109d02edd5 test1/279 0
-73375ca05ee267bae48fb96ef001e37c6bf64f4ad20f03b5f23fc74c3edbf289 test1/280 0
-2aa9e71cd488cb1e07d32277095726a965fd2adc1e0ae5fc24a22580960ec712 test1/281 0
-ba970b44ad9a2bc0875c01adfd01c147951c82b6a264f9bf8bae522a97795a5b test1/282 0
-d3e2333ec5abec1550f124ee6cb3cceaaf5c8e89037d31984eebd69738d8720f test1/283 0
-b7f4c82bdc02b1ed1777726983809d6bab128dc9a7871f1da663a11d05779b67 test1/284 0
-4d7191b579657cbc396f67b92934469291d43144a2ec6cefec9a48b1dd7e0ffc test1/285 0
-a76bac4b9b4750d9e78d0e4b8471738563d009e48c4f26993ff681c7ac97e4b7 test1/286 0
-c75a6137986a0e5c9ba67f14d31784791e082a62ddd54226b29ad95c386d0887 test1/287 0
-75f761587e28759223410b402b6b381c0b6d20e1c36735d026b95109d3c48c0a test1/288 0
-0169c7602293314eded31f10f8f25e54bdf82e3e083e52c308deaf0bbf148781 test1/289 0
-95a9f1ca86d4e84a6acaf1278ab749735752941d085bd4e7c3c96d6487c6c9bb test1/290 0
-be38afdcabd7b1c1c6ecdaea03b55264b43fcbf08ebc57d98dc2215c5a9de046 test1/291 0
-a2bdd93e7d8f1e557b3db395072128b74dc76b8d3ae1ca49c26435aefa46526d test1/292 0
-712ed4f936672d1c4a6ebdd68ecbcd335291fde8e881ac96a56090ccdb389117 test1/293 0
-cfdc1eec3ab1b78c4ba548c673b4465f048da83bc62691b00bf47b53f4075483 test1/294 0
-5b6dc0cfc2fbe1c954d8167e34858c4569c034975ac034584e1b86dfd55270ac test1/295 0
-eda796f4f1ff71b81c78db79b9b97f543e91437ae19269d0761703ad50260e73 test1/296 0
-d197fd3bf891f51c2b9abe54965eb13b044597d05f1a14e0bb2a38222109f5ce test1/297 0
-3c536320f63057722a2e40db4077d1148bb4fa471b85f887809326e59053b339 test1/298 0
-442c2e6b539fe81fca5a358a5d3b0ef4fc99285d3d36c45c8ff0ad2ab6ab6583 test1/299 0
-2351a94ce525382f5d82a5b0535c4a33ccd4a13474dfa56e515c99fa8c64aaf0 test1/300 0
-9d84d46e39d2565b5c0bead466d5b41257dc4706ea8e91ff51c0dd5278ad98d1 test1/301 0
-753cf0af7209b4c4204fb392daa5f471d19378e4453f3f151febc8beaa7b0896 test1/302 0
-b4ac34a73520a01857c472b346fccf1a3b7c83b7f3b022b9dab1b2579a3cd303 test1/303 0
-8695c9c0379029795157d83b6370458f35e4487852f63279a4b4b35b3e635740 test1/304 0
-c0594f71741e25f9d938d904a2956e71a3f1ad97b311cc580ba73718d74d33e7 test1/305 0
-eca4b309e2375d5faa5a1f571deaebbf27442c7f71274acc4eb7555341017952 test1/306 0
-613aff2c4e6c1a42e98ebccacc5e709118e34447e1090e977d5a6d013d087a8c test1/307 0
-066d0787cebc539ee8af45e904403d0e256ec3c275bb422d55f820a96ee62fa9 test1/308 0
-cfd7796101cdb382ccad79238e0fc0213094b18ed6f9a977fd3fb828cdbbb585 test1/309 0
-f15c21cf62872373c6ae822d5c4117e3372b6c72882013be58f611c988c340eb test1/310 0
-bf71160902e4c4ef75e70d06ea0bdf64ed4f9e47620cb0f284aea284b66b66f9 test1/311 0
-8922211f9c4b277fe23ed1275a7217a856bb8c9c1b878ff42c9d2ef73caa1ae2 test1/312 0
-9e8953a822fc89c84a1946d72f81494ac97408d5c747883cb76835e6d93cdc94 test1/313 0
-d103b9fb0b396b9e629e980a4c1db48baa02ec2052c63182a1fc46741783853c test1/314 0
-30089ac20ab6922024c7344cdbc2388feac545406dea3927607191b2287dac40 test1/315 0
-0af133327ee01fa05d9e8f2ca6e297067214521e9d7b1ea289444d06ae7f855d test1/316 0
-8e1e611320d2483b344b4aabcf5b5712ab79a833911e951ff8ff40fe1fa8def7 test1/317 0
-f52c50ed7b66dc6b0a07a23ffb871f8df60ef5d7b117d3d25f985c9d07bb6189 test1/318 0
-d86a333161165f77d89f436ffd10318000e29a27f6ff6f0cbb457353356fe295 test1/319 0
-53d9c8b5a49e50798bbc9066a877b45143716767e391ad18848bc221ecbcfda7 test1/320 0
-78834b1036a57fdc0ef30465371e8b2620e7b3a4caa3ef34a71fbffe1eecc4c5 test1/321 0
-9ceb0ff15f372d01680cb7ee28acd02c5d6731660fa5fad8724997d7c4884f53 test1/322 0
-e6419cc523eca3fad3616a6952afbaee4bd8a856d25e12b0db50fdcebc91b734 test1/323 0
-6679328ff16a96aded463dfac30ce00edf3342f40973bc741fdc9ecf4a83083a test1/324 0
-dfdb929839749f6ab4f0f4641fdcc8eaaddf9bd5ca698f86e2b2f729a48042fa test1/325 0
-0d4b2edb22037bdaa668a22d904fce3e9154f2a712d6d2bd59616ef0e3840c3f test1/326 0
-f05d1d5cab51b012f529724a6786234a83d70779941897167b8ae6d4138d3250 test1/327 0
-e476cabf2d06a0ace700063664f52e967e859bb28478c29b9867c47841a9910c test1/328 0
-14fb583a38c545bd5d76f337366f7231b3bf30372a9661bf9adb1d37ed7d7436 test1/329 0
-dbb8348cac4dc1734ce75beaa7340d90386be6dc82516915e8b29c55e2e58c68 test1/330 0
-c98eb705ef5130b99b4ee8507826645263edb353187385d57308be31a3dd8433 test1/331 0
-2a3ca6493f8b95449966f5a4644f588ea0b3a462d53d75f889751f2e3dfe5326 test1/332 0
-570bdaa2596d14017fe34b0da2a461eb911f6f991cc85258f2f5512c291acfd5 test1/333 0
-0c1650e727431fbbf1e8c8888135e7dbea5ee3324aaf0266c57e22f89564c0c5 test1/334 0
-3e5b370ed29e1b31aea2dfb0c5b9d69829590c248478a550c386c2a152a9325b test1/335 0
-062f8b0d6c8df91b0268d73aed7ecb54b282190583b485b69f9a929f41098ea9 test1/336 0
-cb400a609c0d1bdb107b1ed5f19d8c2810e6073328b3a55e77fc54243cb3b3fe test1/337 0
-3fb594c0f31786c2f3c68a00dad342ea96c5b9fe54c968b278353b0d7e4bf1bb test1/338 0
-7d5c9d6ce5c2dd1e9e3a06a5cb33e552de63d8d67b1ba5a942d64b458eef86df test1/339 0
-4088231c65b4872cec53f038dd490df6393603e78f6f3675a3be2789ff3f25c7 test1/340 0
-3458d73435b807eac03118dd13a643ae256b0871fb2ee59283fea62eea5085bf test1/341 0
-274dad9b5bda82921bde7c6e8f75127878f5ae213d1b35d625cf04f5ffcf9f32 test1/342 0
-c2985cae86bba3fffc7bee7eeff99acda6ef7c197745bcecf023e8e40f4962ab test1/343 0
-988d71d71ec75923221a140f33b995c663d994828a119a510285a37e92eca30e test1/344 0
-cb092b261a0f9c614b5fd1b465dce38bc80e629d917841a0ec70969faa1faa2f test1/345 0
-846dd105c0b5b8ffad1cedc991994f94f3b0b6642d98f8e406e719b5ee293c2e test1/346 0
-20581dcbad4b0d43ca8884f027e7c055a97527cd1057bf1e0af82d5959c1c98a test1/347 0
-316386885985a759c9418aeee6f47879035af63aae2b755ef2ee4df0ea897cba test1/348 0
-9d21d1e6e1a8c3ca458174a798987c2177d2f4044bc4a7942ef14d608d0357c2 test1/349 0
-2c24c1a8556deec0334bab02601c988db56cad3ef7dfbe603043bba82745164c test1/350 0
-184026503a166c498960d0ada7da533efc9df74f7deea6142b6047cf03db8000 test1/351 0
-1d76c356f8ba580b45397adfb7bcfa5291d86701baba3199ebe2673af9e7931b test1/352 0
-65cc650f92aacddde4e3c950b5e056c2e119d9a54fdba944d19a4254402230ad test1/353 0
-6a7fdc3031d46d17feff57d26402023d723bf6574cfcc0fe4d8a2ecf70ca7aae test1/354 0
-aabeac13bbdeaa56796942635a57dbda65955ef42b54b381ebdc824cef419b7a test1/355 0
-cb7e0c337bf6117c9e31fa61772f39b4a25e89db11480d5f1266c2be5de5248c test1/356 0
-040a482deb9d11a1a9095bec64dcf6c1b20ce3b3ff1db4d17759d95f1f7711ae test1/357 0
-f0ddbc0607f574f6218c09ddd38c50e98c4a576010a4402acc730090d74e4dd9 test1/358 0
-9c9ee7ebfc9c0c7850ac352b6b24e9c899e3e64648aebdf58a06c4afa9186932 test1/359 0
-b82fa41e27eb5dbf03643e4cc0838b5c1cf2071686b92814c5cfad719fb61994 test1/360 0
-73c4b7e130244268fde7fb3df4f186db4d5b2f0474545e3edbf198e9fdf095c0 test1/361 0
-9eb0fc18a7432b389a066b6b3ae2ccf514b993ce23603800cf417539570a1387 test1/362 0
-248de4278686d75bb53caeded3737bbf3b6c8daee1939c350eb7804e35d9616e test1/363 0
-7ec756671cfbf0047c806ae7196104f18785b4da9b4c21468d00c61e602167a3 test1/364 0
-216c0341188ce2d6fe5c298b9e21940acafa6cf9260ec509f32af46ba8d61dc5 test1/365 0
-75ee1bf4464487a684f86bc129b636a09b3e04ff471145710e6125fee6429ae5 test1/366 0
-0edc533721d12945e037484b7be911d001e8a16ec60e114bf95ddee2548ecfa8 test1/367 0
-3cfa4e929f7336ae8b1b73cd373d03c6a3775a26e807c6a96e3fc6d9ce8656df test1/368 0
-d1add6c0468708807249b7a5ef975978dfb97cb8e477e1ac5b04a723d9aa8d22 test1/369 0
-5a17642581b658f53bb07594954a4e6cbbcfa847529059bd927bd2f1ee36f33f test1/370 0
-f549c72c1b440bb0bcf53f5bd5fc9fc11729d720da28da1a2f54be35f15040c2 test1/371 0
-7a6af70f159a14abfa38b1cdb3cd77a2879a223f56fa4c361e8facce9c7c563d test1/372 0
-2973c6c4fc20e448c27dc1c25fe5134b06aa596f7eacc1ae75110a6659c84b3a test1/373 0
-3be688148a3bc7b0dfcd7096ff20c422442b4da005268e92676756c8bbc8cf8f test1/374 0
-2f8d02b663f01de203f17a85562e9ba3e1e73760114a694f636f2389caf9924b test1/375 0
-88f725d0902a165e49a16379340e0d9ad522604200b734b8b2483714745ee006 test1/376 0
-ea7f141f1e6c197aa5760c2b17be56b64eb1fcb0013ba11dfa6a1e3ba03c9ca2 test1/377 0
-6955290f2751465172034e9bbb612bd0d4a59eeaca9d9d97a23ddd258ec585e2 test1/378 0
-ace05d1883480a1188e123fdd9b1631fb829d01e4cc1c09b5b24b5f2ec9ced7d test1/379 0
-4ae2fc3fcbad24e2392c9f9862a9041ecbe390635dce8a55ca3dc7a31d114616 test1/380 0
-31db7d925f03c26b52727449713f1aaa0bf63e991295c1ca79bca1197e3e3ca8 test1/381 0
-47c6c230d305ea92da956b48ed825a8018d8192f165befdbac73aab2ebe344ed test1/382 0
-547bcf9cf5212cf2d97696ef7f0c6cfe1d32693a8b7602a64b742657d1cc1b2a test1/383 0
-fdea6074514194f47712cf998613aeee1f6d112743cfbd15c3c57320da60f281 test1/384 0
-055befcd3b6edb5929f1da67261c56df6f5b17d47e60abb6f7f660ed07d03f10 test1/385 0
-985668e90c560521f0f5bf4288dbe50f722390a3d5d09d654f6768fec067c238 test1/386 0
-c0a1b9a650ad9b8fb5cc8b8e30463b16e2c10c31b4815b3a93b59517547b319d test1/387 0
-8161899d45b88e029369025b1837c91fd23b159c34c6b67b51282469cef76a91 test1/388 0
-1aa6ec0176eb5069e4b45c61c1c91b9d7f93f85006127dbb1a772536a1ee6a4c test1/389 0
-4ca4ab9b9fb1174a7abfd85b1690d9113ba2eccc40f70166674c971c0bacedc2 test1/390 0
-8a255ad12d3b9cba5de3b4b8aad3603729b503b36de07ff96ec9a141aafb4709 test1/391 0
-f83bef82c3811cde4913f6ab2f6038be91d3071b866e7eba127b3f38e56c435a test1/392 0
-92721b3dfd0ced1ef80db31e261ca946c2b1cf459a353a5677f9f7a52cc58627 test1/393 0
-10c95c6ad1af2d228f70830e7f498e7a6cbcc03188b4953c3d79550aa2a7371d test1/394 0
-c09a62446b9fc0af75a14ae9896781293db4e92d097acd6fa5889b16926e232b test1/395 0
-7cbf3b31d4cf3a40d40e4b558e26fedaaf8ee08c0140a8a1624766984cf23c8b test1/396 0
-ae582fd36c3d1ef27a3606318627aa0df48f11dca3bb2291fd648397b492d873 test1/397 0
-071a040edad8dceabbc69df52f57f232e696b50b76d58d5793b9580b7dc80c14 test1/398 0
-48c2d25c71c0ff82d408833907a425179f161af0b7a5483f792f6dce592ae7ce test1/399 0
-ea5a3a1c3ea12edc5740b0b25bc4df9596b39e0d62ea4c0bd7166b85e936fa89 test1/400 0
-3c21d72558cb594ab6ea458b1462bed66390b9eac44fc47005b9464488b966b0 test1/401 0
-c6f561f0394814f53f2c5020e9ba1320a248a306dc6b383019f91b02f261cb3f test1/402 0
-d03479f014756ac8f1918a0c72055f3e74fd58ceac301c48389c4a5b12cd886d test1/403 0
-a74c4437449250f892e76efe22e396130fbada34470be233d9400c72e914dea8 test1/404 0
-b90fce3b327825bd7c13326f61f159fb9be77cd6762256835cd5e17b49e3f8a9 test1/405 0
-d051405dc58a35af00658b0e8d2c00d263ecf2f5fb37a354ee1522709213e726 test1/406 0
-93b9b28739e690c74b767d7bee37f89320d75ed53e8d1fd2b8f14954f5fefd3f test1/407 0
-a6707c063ae2e3a1b2051716126937c48b8f86a9e9dabb2ea3fcb5bceb0a9fca test1/408 0
-652b39c5511ac2c700cf8c36e28b214fa965cd287c76a7b01f7aaa58db674098 test1/409 0
-6bf7d4dd1867fc7d60cce3ccc702f7856975f45275b53c7e165495006476ccc1 test1/410 0
-07a7d35badf5e4783e769be16598ec7746fd5fc3e2f3532206e3520c6c1fd460 test1/411 0
-3b0b4e5045521ad89fd10254553bb07a82eb46fcaabe77bf2c402568b8c415cf test1/412 0
-37486c0c87bfb34f479b619ce19fb00fd4521275b9eab8ec4925e4cc167f51c0 test1/413 0
-e1be95bf97dab89ba0d6c5f9ca88dabb6d85558c83741132c285a70a22bd0b83 test1/414 0
-cc1b11248247c0b7853237386a6c15ebbc97fe13efdbeeece50afdc0052ed10f test1/415 0
-05c61917f3bdb4d25cb109bbad895a72966825aa3afbaa4a0858d6f3989e775c test1/416 0
-86d8da5ac89e37772b4c7a1cefd6af779ffe209ee96f3288628224907cacfc1e test1/417 0
-46e0e05de4ce0543e222f712324adc9002648bb64a2d434cdec252fa50acab15 test1/418 0
-38713d08a5fd56b39f24b32896c70f4ae16e3e9b889e0b02a60ca5d25e7d4182 test1/419 0
-f6489e52a938e6b18b605f749c93b9ae297db3e2d531ca42f674274b5c5e5bb5 test1/420 0
-2cadcc4f341ceffef5ac0f413bdbe1382380bf59d9ce4b17db531a402cfdf52b test1/421 0
-3047e4441ff2c0da119116a2f952786fcbbb9f845696297adfd6d5317b645588 test1/422 0
-7843747e05ec0ea8dfb8b0bdc27d4a06d3ed6b569dab0b1af8cb4bb13f026a4c test1/423 0
-3a95acbf27884860d057a436d29f2e0fc8974f1a03398e0627faa6483875fb60 test1/424 0
-0b0fe35de0c91cadf85e0e5c36fc1a1d3af12c1ffee93cbe8e7e1fe4ed327464 test1/425 0
-bac8e3aa6a880a8a0866c5074a2d11b1530952890a8748028ecfedd9881f37db test1/426 0
-8c86c1d05a96a41b45e71bd6395d0791f1d7425708b1687a86d6b68b17946438 test1/427 0
-3a11175239220d704dbe7718aa07930821b52d377ebfc6c7b6d9be07f3c495ef test1/428 0
-6f757f68f259ee6ec0702dd4a6a86541c7fce54d586dda2333a55bfdccee7edf test1/429 0
-bdb683547287702789e64b437a8255fe89cb58414cab25daa031244cac97d40a test1/430 0
-5e80e76fa21b52373370a02550a9bb7091f7a67a1d9b90406bdedddc337e1397 test1/431 0
-cba7b7c57ec8b9816c22781cda36836ade12f79a24c284cda64ab1ddc534645e test1/432 0
-87b60f281bb9e990496c93062b7ae3991dcedd08c251c58de3780d2fcb8c551b test1/433 0
-0d4d2dfdff9a5e69cd97fca305a0c4ec5444f1b0ed4fb4ace54b2089016df222 test1/434 0
-15805734cb1953a639e576aee695c66100ed0017d8e21b1cceffa53ee3ea5f41 test1/435 0
-b31d21080c47ccb84e35f7dac599e5eaf10251ad33c2801e7869ece911b39809 test1/436 0
-cdecbe7084544381e81d9e5acd80f8bbbd50758b3beef575b28dcf26c5b32e63 test1/437 0
-e45dd819eae60c21039c93c6887fe013f81fe0eb10933fcebc633148e6548c76 test1/438 0
-267a902cd89ed61e3e746995a28f6a684324434af52c0dc894639cba3e736428 test1/439 0
-bb4e75150c8b6cc667b00e1e922868a2bd30d73398d3d4048f1f0d12541eee06 test1/440 0
-b79bcc25ec98192129950622804276e63048b7ff270475954941c452a32fb091 test1/441 0
-8eb8949990691f97567e698d32678632519ee9e871be8d7868fff3ca8a0af0aa test1/442 0
-1e087804ea134e658d208cad9134f345f45137ead6b636189f4d6d89f288802d test1/443 0
-cf9fad7bc3555b2f37f416217b88fe8bb3c84f51cd372d0e547c5e0082aca728 test1/444 0
-2695482158d069afdd9e6006abf1a9149c011e95eb1489933a523f0044575c3b test1/445 0
-d9cdcc5dd250a070a0fd844ed994579a12deb4f6ea4d4d51e03c1853e3bfa6bf test1/446 0
-cb1c0427f6b874af03f4e2e151c70034c91f59d69abbc9b2bcf205718c0bf958 test1/447 0
-786fa44e7cd8564a96d5c5bdd1f460a04d4e712fbfabac81e086924dbde5e1da test1/448 0
-7b1eb65e82cef9d7bc9d5e1c0652a4e305265068621e3bc8e09eea618d6ef832 test1/449 0
-5af9e74a61605b88c3049199e6aab8f174a4273e211d76053dea5878db9149d1 test1/450 0
-57ab0c5102cbb95a95a89bb3992745926228f0c9a910c5f54b907ec17a222584 test1/451 0
-a79837c820987895ca236c61c7c29103a3d20b42f253618333d8d6f1a860b767 test1/452 0
-369ffbcbfee3b361f0796f5fe670864cae41815a3da5c3a32de27154d06e28f1 test1/453 0
-ff1c006b631e53d6d7ddefc3ea7ae28c4024f3810085f75a7ab8ecf9ce3fc1cf test1/454 0
-7d02eebce2d153525c0c3758add22ba75afac29b7a5446d04810baa9f47b1084 test1/455 0
-26009641d0a8fcca6eba691d7fc284084ff06cdf4a466e0ad4ec4a0fc146ba2b test1/456 0
-60e208f94a35a11fe0cf857d104485461cfb84df65c583b7553a2927260e9e37 test1/457 0
-e52188a9646889e1444a8b1203b0609997b3e2eb8bd0c92356b3251d97fb110f test1/458 0
-4a624726bee3a76da7709af0ce228c0355bd6dca921a50d0844f2db18bbfe455 test1/459 0
-d917cb3c78f449434afcb21bd9ffbe5594b2ed9e34c254e40a981656352503f2 test1/460 0
-f0f5f8781638f703ddfe3e66db01265a2710a52eaeb0c0a41fe0b9e3cfdb349e test1/461 0
-125380f75fc8119a6c9c219cd1546b74f2113f36a94884a71365cb2e7d9240df test1/462 0
-2a27ca0707f3ea676123f052b386f19b7757892f3de58b5b00b53f41f1b9882d test1/463 0
-0bbc654de15becb7a8d6e02e1fa6f1add8cd445bc9137fa63907c3f6663bdefe test1/464 0
-9aada2dc2e05020837b9ddcf2749c73d87531fb7bda7fa2d262029b49ece1106 test1/465 0
-81cc1123390fdcaaaca7015a30d2a64ae7ee54c111fda4715a674557507d7762 test1/466 0
-efdeda2601d6872cbc20d340a39b18e13e9b1cf306f212d76d1e4aac7ffe1447 test1/467 0
-c77a1fae105f5ed5485b35f2295ecdfa89050f4663b78d1a02392edf937d9b15 test1/468 0
-dfcfc0bf9b64a1b44f795c459a965aec032453a812d693aed8298dcc711a70f3 test1/469 0
-134405275c2091b63374dfa903271f0a93878acb3e9f17063013193ae66aec70 test1/470 0
-634a7206ab6c204b11f49e67910e6e439b5274f00785916fe459bbd1bbc053cc test1/471 0
-85a5b5846aaba30a578ec445893fc688433066abef0a6f16f08f3ca4cb553a30 test1/472 0
-e30fd385345e1900783973913d865f80aa056f421c7a2ad9b91d96d82fbe87d1 test1/473 0
-42751fc328cc4d5da826aa20b4b412acc445bbae352a3679537c8b6c2af01332 test1/474 0
-9f3cb99b06921de4dea2c49aac935f85a500e72dce01dc6dbc7b668ea64ce6d8 test1/475 0
-f403f0cd92bf77a9fed63bf4160d0fb4ab8c8559a3a9e31dc820665c72d2df43 test1/476 0
-a1784653a210f5c700caacba07f48c55af34c77aa27a2e2a6e61b2cbe30e0699 test1/477 0
-771446592de6e481f97b420e341aaffb76cf4e922df67466923d6f02b5524453 test1/478 0
-59e178a497cc2ad3e19a22d0f9a6adf1d6cbdd44c79e864dbb03a015b747a410 test1/479 0
-12a25610aa08b833cb929ef33e3ec1e822394594999f75640d7269abcf8e616f test1/480 0
-aa5e75732bb87a197970352bf8f1a011ca3e9d1205850332fffb5fe1593fe420 test1/481 0
-1163fcf62cb2011d75b16c686b01297a211244e91557b7569272e5ebd57dc48f test1/482 0
-5a8498b0b8141b8477620d59e99ae67f33aba8ea7ba4165df805c331b1837a6e test1/483 0
-38ff4392851dc6208e207dd562acb2f32ea1e14a7e555ee45561b3a34c15378c test1/484 0
-2034cb697bec724a5d0606f6c76073cb2d239b64e0bfc6811aa9d882ac6372a9 test1/485 0
-d3f199cad7ae5dccd44bc028aa0d2927e004dc1524b69af14a7c9bd11d477f6c test1/486 0
-3ef4640e48af1bfb4334c7e049fe91d59ce98eeeab779ecf4bbb44b2b11f48e4 test1/487 0
-42f8e33028070018f00908a0e82eef7bd6e47a79e4b35aaf2e4aa0f4139a94ab test1/488 0
-4c337f5fbafc7744ab9a0aedaaa10470cf1baef807d3838c8647d3e063e7b504 test1/489 0
-fdc3bdf0ef8a15d2ed0fa0ca0858a877f38700385416673930b22234bb5f24ae test1/490 0
-6e61464a3fbd6a41d2486e2fa7ada9aab21f4c59e6a0e103bb7f7c7dfbd243ba test1/491 0
-5c05e4892cf18c5edd1b355eea329d0bf65432a73ffb7229a7329c5c9b83c5a1 test1/492 0
-bb152622b87c5a2f653940e9ec0370acf8b2b4ca3c59c8cfd8e32637ce33b74b test1/493 0
-6356da68f52c6136de776e72ab821fe501455e1036fec305d1c3385508379360 test1/494 0
-c51330d35c30394a5ac86452ab8d46f2e3d8ec8e950263e910b9f1d6dc2b0943 test1/495 0
-9b1787096ef897aa2c6a673e99eb0ad00c108ff1da77cdc2a59ab55a4e51867d test1/496 0
-accf2527bd51439651dd6efa1e58d4753c71ee5409a8f4eea31e33cf1ed28633 test1/497 0
-8d7003273bf256fc6fe0d6a7e29ac4dd076793686ede306810d7ea847c34192f test1/498 0
-5ce1f2861f337eb1164065b1183ba66533946b7bcb7bb1b71daa516b6350bff9 test1/499 0
-99faf192d9602ef426f97fc62a8074a9bd3f935b0de553569919158aed765332 test1/500 0
-9bc8752eef4199d0154420db1c8d1d33821277be011541d040c6db8a003e5691 test1/501 0
-06ab5524febb3866b5ac9b53c092ba1d555ad24273c6c376f563f99f67db3263 test1/502 0
-d5d3df3310eac34d52559d0e4c3837080eeb0200d9eb89c57ba60574476eeeaf test1/503 0
-265d1c08e6bc4495c5e940afa216a79e6889e52405887ec58b6f78a6c9d266c2 test1/504 0
-d10e1b107173a1081a5df7e54393c12439737892064e22538a0ef78ec30b0ed5 test1/505 0
-3711c236244da1715d67fb5f90266494b21f59cc6dbf0b8cdc97392e265fa1b9 test1/506 0
-3de00a809d5c97fcd31d7a587ac23c759504764687307695179c9337d7f78ab9 test1/507 0
-06cb2a1672ef72c92785733de750549f67599133385a71265501e559e323c513 test1/508 0
-ce1175146bba8770b0034c7fb3bb938f5e47b3e9d4636d4d0d22903f4fcf2277 test1/509 0
-f52272ce4b0d9ca958cf483cbfb5406820de750db97c3e8d809a32e1f1ef5fa7 test1/510 0
-c33fbe0688e569d19a2a5f6cccd2d5b887b22caa410fe4a2c8790f31bb907f1e test1/511 0
-b2b3e4adec1da175d3085d52f02e99c3e86b47abab60cb0dcac070044ebac775 test1/512 0
-7fe8799cebc13c3db8be9595df041d6043e3b2dd0f349b5f4e52d6e798acd286 test1/513 0
-9024a152b84a458e08d13ab422d4977dfa1b4a7ba69c010d0bda0c92d3a7a8c7 test1/514 0
-57688ca17700b42fc35845ecef3969cf0f75c86724325075a565dad0cf4429a6 test1/515 0
-0a5f035ac810ff68919d03a81795f3f40d240dbe0388c9e68d6d07a8b4fc9de1 test1/516 0
-cbb04fa890cc68d5e57a49d91b0e931991f673e38ba08bc63aeb3807c5e70bbd test1/517 0
-a422f4592446ac6bd5a3cba91fb12150843caed2b3027ec167a22042a640e3b2 test1/518 0
-19a24d9b9590f8a42f8ad85cbdca7c99be559097b82e7cb8a50d2adadb3a3b88 test1/519 0
-497eb09bd567e2c85b383ae6d58449b06e82d3634f81b61ae1844d2df89581ca test1/520 0
-8c1acc6f962b8ba0b3e0e884e5c779df664dfec0aafe879edfa7ed70da64f7c3 test1/521 0
-ebc5430c7b1495706f79cf836d95111c29a6d1881d4421c61f987c130b9dd7a4 test1/522 0
-9783aeaac9272ad26888c540d6bf3af93b010272a97d1e61dedb2fe94c9fb784 test1/523 0
-cb0906d5d12cee7f2b2e615f5c50a2ddd00a6f2c7f95204d52f7b6d1f65787e1 test1/524 0
-745075a3e59affac081f05c1ccf1aa832a8cab641dc7ca9b6bde80c14f9c7805 test1/525 0
-a818821765a67a23392bb293c3dc79fb99bb1c4303fed6d6ff5c9bd51d388a48 test1/526 0
-43abdd0aa8ee5ec8850b26be7aa95645e65b75a4c41391b11839e6f032e18608 test1/527 0
-f1f970e8dbd00329246322659a3946f542db588761cf7fc2702df2fd6ad325e9 test1/528 0
-43953f0a8488cacb611b4079c847e3bece4e0eb8908ac7cfe1902eafdcf94bf4 test1/529 0
-7a32d469da9591471052bac1307fb74488f28a555e9b328fbf671922b2e85c03 test1/530 0
-45eb32f682814393ed3487ee5f610f5fac344d4fa56ce111071e5596bcddb44e test1/531 0
-c9d1e01328bce57a878e85afcd9dfdc109d75af6f19e469276b2cf6d6c4a26cb test1/532 0
-25239e3822d53cd8490f24407fa10518b79b270db5b1a090f03769aa9d399be1 test1/533 0
-7f1b2dd8dc594a9679209225e516d280cfb5ba8f94f56b2e10e2f195ff828d69 test1/534 0
-6fbe5a0f3f0c95023a60f505f7f8c011d30d695172a37bcc6dc77ae6925cc04d test1/535 0
-a1e20874db952a63f38a5758719a9b0c5c501645296f9636e6aa520c195a7587 test1/536 0
-7e5db79598346a3bd77249b9ab46532b426465c815897bbb0cbf21b4004a6788 test1/537 0
-11a7fdff7237d13e975c6a999d7a08cff58f0a7e4936c7d4431dc5a61e2c8c4f test1/538 0
-b39f50273db250af58808d566f53c09d000b8e7eee3a76aadf0d825057e48f2f test1/539 0
-20e0e01ff6d6847704a5c30ae7cc4324ad4fdc567d976c7f040e368a4dd22490 test1/540 0
-1725685148ef54508ac8bab44c9235e0caca651b1c7253bd532d191325625e54 test1/541 0
-51ee82409a9ff9cbc6828a6ad8c643dbff49fdfa42118b5f5516f6c4bd5259f4 test1/542 0
-2b97d88684e2b6bae5b4a9fb6bc607698df6e259599ca9f2c7b8bd4db7e3b4af test1/543 0
-4f2b8d32bd474ea9a9cae40d90ffe14c5651ba27d09fbf0eee267d9080be062f test1/544 0
-bed219c39e7bf60463d22bc4b7dedb542cdaf78a67f330f0ec7948ce9c19e6e5 test1/545 0
-2cd826ae0b681e7a08a997c6ca3c5f1c91af3dbba24aa8e9fb52ae450608c0ab test1/546 0
-eb129c3bf22048339142ad4f6e3a0728a5d95720577bb03012bffe0ba1717afb test1/547 0
-c363f6f0db57910e8f665f82c5e6e427739dc2ef7f6f3c5a1ad0a438c89fb4fa test1/548 0
-6bfc1e5d98c90877d2175b9f4c0a1fd21b0dcf3f528d254bb44a2c8086c63143 test1/549 0
-2e478151393e5c7fa5d85104cc85425049afd61981111bea60986f4cb8501509 test1/550 0
-ca3fb813759a14f2cc4e46b40823f1fd3248df9b53a3ea07113c2a5285ee73af test1/551 0
-551f29aa39139add5cb8f6ed7831dbc6c8c017133284e358123e3d507ad719c0 test1/552 0
-184c6ad9a16b102399fdaae54efd42ecd4b41ea0121b1066339cfae1b6cba980 test1/553 0
-278f0a2417c8c93a52a6b99c452865bcbc375c5f44be1f2ed870d96d4a41e008 test1/554 0
-fcb90b4404b0db7a8f3228222283eb46b7d0b26fc88b8e0946d7d32a709857d5 test1/555 0
-a1894ef1b329498a60aebff25f2d46713bcb43e5ff1448a48ff746b928a121f1 test1/556 0
-3c7ffe66c48e0db4337366ac58928fa7e7ea5db1bab6bdaa02b8ed4aea1ebdd4 test1/557 0
-c3ffc4dc78bc3bfdf2b9074c8d14d2d94aea6581dced00a954d2ec5a340bea0f test1/558 0
-d8f06948b68be28ff8bd2ff83056411f5676f9d9444c89f14f57bcab03f7304c test1/559 0
-1b418ead01346808aceba27216a516070f5da3c2074c729e2aa0e97a3486729a test1/560 0
-37d8fad8e00d664612c54eb4189dcfc15d77e7dfa706b041886c3c34c89bf107 test1/561 0
-189a9b7eb27ac923ccec29d51c47caec92757b2594f5469f73983909615674ee test1/562 0
-431be88ac4e67a6237a688016154a41566afe70cc3091115efdb62a2f320623c test1/563 0
-a6b442f2c169414ee0e1c367f82da09d92a0a6d098fb01076c4395ab37ae1488 test1/564 0
-93b79ae2ee1bcba61f1205d388e1b24f8da13ca73919139dfaaa8989171bcaf5 test1/565 0
-73fb66a6bb6afde0fd28da92df2dc3e91d519146d50ccf0116563caede819147 test1/566 0
-e0c6ebeb43f10d4d1955c27ccb56916f45439b33284f4b8cf15a53ab6bbb6102 test1/567 0
-fb544896dd80805e90be4a69a37380b2d60942d8761d03a681de8ea10cddba4d test1/568 0
-023859a3dfd98b211fa663bb099832eeafdb5ea787f16d52564c824375e64fff test1/569 0
-503d524f408b709791766fc42311854e7e87cc6b6eb370128b0e9eb159334be9 test1/570 0
-a2d42b10420c1a947430603c91af2e5339d41bcc43975207ca24106637c47e15 test1/571 0
-92f55001db15d5c1692408b2d543e3e0fc0ac3b257f8081bcb9ee26fb2b56fb9 test1/572 0
-5035106e79744468d177457f5a22a6e9d3db914f3b09fbc599281422d5755140 test1/573 0
-051ebc7b0acc01ea5fc2c81b6ead1241cddecedd88e5c3331706b7f87b6d4139 test1/574 0
-fb72968c5ab91c357b153ee56360933941e7549055b8b6cd75be8b4539079781 test1/575 0
-0e9e45f5bac0fb5332a0dc4e0bcbbbb04afb49c24dc4c27b252f34414262db92 test1/576 0
-96c1c2eabe397c9e029b0464fe21e896cec917bd299d2424b967f40a78eb89a5 test1/577 0
-b5aaf10a9ce27e2e9947d161cbab2151afb2343d5c2baa043f00f4a45d6faf3d test1/578 0
-f271698dcb33763b4efb8b99e60425e95382cd348d1b7e200239d1c22e573df0 test1/579 0
-7553677cc946ff5123f657933a4dba2700cc593cf2a88bbba7c67e37e4babf0f test1/580 0
-19f8427e6049c049e329c38c38b0e750618750c55b1fbce131ce6def9dfd2807 test1/581 0
-02691f69542348d21da7b1207320559c5a72e8a59232266214aedb8f16335ddb test1/582 0
-dacc4544821a465c5fda9750ceddd104b3db58be2cec48775ba22434fb714602 test1/583 0
-9daeabf60a246297b71b30e294b79d695876b345edae46b38bbae5bab737be41 test1/584 0
-bc3002b7548a038b320b72ef818a2aefe568a866795517637769788781e6bd4e test1/585 0
-4d74b803c720e4f4b5e2d127a1ddfa1d58a1a24b072d36a2aa228d327aa2f7e3 test1/586 0
-ee5e5ab42c307951567b4db4a71f382a37013e4db4f99193b99d6506150c0bb5 test1/587 0
-2b3ed7e25574a4001484a5d738ebc33bba4358430b9307adc90035527a45e58b test1/588 0
-038b96624a4d80316dc52672d65790a0f2ef17430dfcc9bb624d3dbbc56c526c test1/589 0
-ee82698e9734d114651a9953b2f3e7e5dfa33038ed2ffce7ebfaebdf948aaecc test1/590 0
-310126601a6ec8b46b28af666b64a3a513d63ab6931995266a948d412b30b4cc test1/591 0
-a88b648ef30197101bb817b3e68942d3fe492adc8ab2f6bc84b04048597d2e9c test1/592 0
-f91fa554dc0ba2c273a9c74115a671164b5f1384aa95a87a456c189306ba9405 test1/593 0
-f0c918bce32571c2261e4778128852da8e0d276a901edab27373d18c0a04c841 test1/594 0
-50664d4d93bd4a555a62c2cd27fcef4eeba24b5296d4fe4d77fdfa907f1ed191 test1/595 0
-f8ac7b7fdcefd8daaacc0fa566c58a66365194cf891dbf45e8c2293b885f0385 test1/596 0
-3e05978da3beaef54cfe2e572482b706f57c7cbe2db12391468074e65af54926 test1/597 0
-b7c43a706ed88cb6c6864f0623f348cd095d3cbcc5fc6634c3b6ea77d84692f4 test1/598 0
-ad632e5cbc06a2bfd6f23695ff13e0e513ad8119e6b25aa1301a2f7dd115ed7a test1/599 0
-5c213db2b5ac423f8816b5c7f3ab24e8f9054ddc9a61bf9a357d49d622e4bc94 test1/600 0
-a1d89bcd8db8e1254ef05f25aae594f466158412782433db9ec6b4f918a7f75e test1/601 0
-660b5a97b58648fb0ed3d491879e9bdcebe30d55f929de18a944c270eab8b16c test1/602 0
-72353b829a13c431b0def97f11be3cf02d3bbdca4abd3ef455ab90bc4e3a0687 test1/603 0
-3c244be5994062923b6467be1f50a41bc722d38fde3bf796d8e0770b77b5ed7a test1/604 0
-dd2ba34cf843fa8d0027c8d8b8cc0a2fab15128880cad9b23b6ff3128ba848a3 test1/605 0
-2d6050e1e4201d5376ee592791996d5a7b0d2e9321e3dd76163565a110f7c9f5 test1/606 0
-8e34b0353f968149bd5e4833fc2f3519d8a3fd58212c8652250d16157a47a2b0 test1/607 0
-bc19ccf937ea25f9b4fc770cd7f0fe8784d92f2dc2061d3c3587ba02f7d3bf1c test1/608 0
-fd5b0756cce8252d011776b0f78ab8dd3fa666e20a7e80a4543f2820920738f1 test1/609 0
-c634686adfc3cbf017711174c28620ad3e1c9e52b68890e61e439db8623d1f38 test1/610 0
-790e2dd20d31280219ee7d5b5d642cde8f73265c314c7e5e1be593b3630b24f8 test1/611 0
-d4ccc5f8a8333fcb5e6d6ad9ad6c73d121fa54badb2a2698b2ab250d1458195e test1/612 0
-eeb5f85699d1d69d0042dc821f7872ead1a34be7ac96606b38725cc464256db2 test1/613 0
-e214803afff199fc978afe1960abd1fd6309effd8fc8c45d58936a3fd4fa2e7f test1/614 0
-1824d601644fbdd78f35f9aa68ddfce7332409f2bf9048b0eb51fd95936e89b6 test1/615 0
-b5cd988115f9ddd4b4fc9356a0b2e3de4ca9171842e2a3f90cf55cafe4758c33 test1/616 0
-1d7c9402adadfd73e29c519d9e3402f208c4f4dca764a830401cc6cd202a9476 test1/617 0
-38218ef197dd4d615e402e247f9cd9f40110a231008da580cdc0a87e16a66834 test1/618 0
-37908be1e5b0006b10a37ecb59a82a61df8ee3dce6f9c268862dca2cffa6455a test1/619 0
-c476b3ec7ab5e83f383f6cd15fec5998e394587dd49c970f553622163cf18c77 test1/620 0
-d7703e33a81a951b271c00168fc91962f915e24aed9d1860806d9d08572add5b test1/621 0
-04cb7b53a6bd906df38a9bcab348aa3271a1aef5cf42331f9e61f5ed81963618 test1/622 0
-c56e85e4005f3d961c2006e36bdd7f37546d4fba6d3761aa123cb556226d1895 test1/623 0
-cabe5810e9c4d17bfee8b41ba465d2cf2e8e435972c0f78de1e89ec71b6707f3 test1/624 0
-2d35be2f4334d1356e153bc27cb21afdf587f67178fec84c635b0bfe95c71cec test1/625 0
-23e80e6224e5b0aeb5cf3143670f71f7c2e6a3e5cf06fb5d995cec02916e7b76 test1/626 0
-a52d6320677e76f45b461f2ddc7d75b31e847ee846320c256e35c2c4ed222614 test1/627 0
-d430693ccffd53000aeae4b23bd3b01bf8983c7d87bd1e4cfdbade7b40b60b55 test1/628 0
-bf97de1f95d716898b255d2f01d8ad4c68d25a27d4f5a5e7ec12ab75a5de4035 test1/629 0
-7b44ab86d817bd51e6bb197db2ff1497a7708901362d50999127009de930538a test1/630 0
-9166610cfd404d2de2ef5c513c39d301bb622dc93c8d1051f42f3c04481cb8cf test1/631 0
-dc5e86bf83e6bf307d74a774cb2ed7c9e7f999ac5377e877f646431b061bd9e5 test1/632 0
-3942e90e330c3d2cbb90f6dc6c6cea90e8ef7e647d3d7c48437b929ac5fe2474 test1/633 0
-6271588af5689099296c752e946db1d1c5f61db469629b6b47172c65f7822fa7 test1/634 0
-1bd2e8690fe3bc11e7e960caee8d752b49442c4a8624df8d0f3f231deeac7b6f test1/635 0
-ddb8b363938fb4ef92ac995dfa8e7480891a42733c917e7626a504cd20ab8c6b test1/636 0
-4fdf4a2e7e02da689074363a7cc791a7efcdb51c3e0127d81e9fba9609de6431 test1/637 0
-9802b11d09f747c545f53c46da02edb83de0ee8029b65ce1c81c4574d7372126 test1/638 0
-e910be00aec2863d85cc7d5a94580a75a5122a710ec305b5cb8297607e2cc628 test1/639 0
-fd62f4325a31ceb1aaadd318fb6333f8174896d911eb924ea167dc0b91cb20b6 test1/640 0
-295673b7feb51275c704065fc887794ca3911b1014b1c9f2a89dfbddb5b2e477 test1/641 0
-8039b1832488c8b241b4fa57b0b4024c423f0c6b9e9df0023dc36cc9bd930651 test1/642 0
-4ba213a60b77610b260c1e1f97c2c7d6925262e3899b20d09c17d85be6976f78 test1/643 0
-0e376572c980b6dabd80d80bfa74265e69f907d040015b05fe012ed2b7eac939 test1/644 0
-5d61b2a58f7a801b060a9cb6f909250340379db7a070781bc6209b8e1f931edd test1/645 0
-b6ca7c52ef10f7d1f1efd5adcd020ddbd455cabb8e7473a053b46cf76de17f25 test1/646 0
-28f9ce90a93b6289c25fcd4cc4420155c7010111e959f59e16321f6c0c1a4301 test1/647 0
-28e38647097a5af37d5bfed2eca849df9a63a28ef09b041be04ac767a8f11c75 test1/648 0
-08b7abff70be25e851375d06d75d1bbdbe316812ac95a48778971008ef58d329 test1/649 0
-517b660a5398678c6367404442b6c06a08c3b889f593e807f796d2be378e3f32 test1/650 0
-855a30c83ef2cdfb05a326c07265beb87b9f5551f2a8d877fe9719f7ba93a57e test1/651 0
-6390e890d7d63b36aaa4f619248091ce1e3ed615eaa2d924cd93cb87f38836af test1/652 0
-740254753e5a22152b9864e9f224dc6e16b1352c8b0910d94239c7cc8ef14cd0 test1/653 0
-c92fcc0a7d2f6cf6c22a56ecd0893968538e6566ee07c1b469b9b2969e4d627d test1/654 0
-a3fe2a9a7027a3bc1cbf7d97be678fd2855c8441f6dfb278b044b433b75159af test1/655 0
-11280946d9f6fbb0cccfb21f93827782395c4961e3e4b805f93eb25b19b17c57 test1/656 0
-1a9e236eaed6fdaf851620fc860687eca30c50fc19277a6297623c5dafd403af test1/657 0
-5daaa394c941772d5af2eed5b60057b4ec2383a68bcc4d1395212e6474b0394f test1/658 0
-37ac3b0ea262b5787e3ef50f6aefe841ef54b10ea98c07e4e67e0e2b340d579e test1/659 0
-4fcc747787e3ebc16ce912730fd0af7666d2066ee516c8d544d28782de468b60 test1/660 0
-4827bca363e8191e8d936e0a1a47a47f85cbe5525fd651ea2a3ce191a45a294f test1/661 0
-a4356d8b84cc8c6afd06fb76e3bfe4de012e717b851cf9391d12e4c6384a1edd test1/662 0
-200c6bcadb44b5e426034eeafdbe30b454ab447962d1063c0ca3ea3a27406dd5 test1/663 0
-c0fffb44d9beec5292a52f27fa701154fb12acf82e2dbf71660a6b6519c2c37e test1/664 0
-80da1008f8ad9d5e5aff17ad141e84d2499997cb9af6f3bfc33f789e81adcaa9 test1/665 0
-00843f3ac4a6cd52d1fc0513a887321229b40d5c801f94a7b54613f7f376c04e test1/666 0
-2a2815b9c8cc8a348c679ffe74cee401ebb02c011f0c4873eefdc416ee217582 test1/667 0
-f1f9adc27210da769bb64d2425d32a83a51abc62bafb2c4ffbdc7296ae67579a test1/668 0
-fc87e46da6bc96e6e2f59586b3ca52544b4792157920ef09f05c420ae0799622 test1/669 0
-356ef03f9ef7675f5b72133ee16cfe402a43f4ed55f7fcac309b4a1b51793835 test1/670 0
-23ccd4b56036582d90d2d8240a4db6cc4ff52681328700a97c86e2b4bbf59b84 test1/671 0
-bd256fe976a9f8eb6cf19e8bcea22e22da341f3a1a3524b332bafe0484680ed1 test1/672 0
-23627aad82bb6354435f258cdc319c68f56e39652b69e63873ecf6e06edd7b1d test1/673 0
-380ecf19e28f9eec5388adda6b2e3b3880087531e418dd19a71c88d16c654646 test1/674 0
-74c3fcede66191e1f6f9a2bc4775bb8b5684194cea39c97d7c151e472621f846 test1/675 0
-38b74487e520f2976e79081dc534946cc26c361f310b7a5f50aabb9ee3c472d6 test1/676 0
-61ec3fb74d990e303a67c6deebb7110e286eba30654cdd29ae2bf40fa3c5bf9b test1/677 0
-3dbe8108c7bcd01354ef5b6db60527858b45fb07bdf594737d0052da1ea5b9d7 test1/678 0
-0233b20a0737da97e8aa77eb085d3e470381e5e332c1c05b5dcd10d6370521c8 test1/679 0
-17f38a26179ade384e33d50b0a772ce912bb6f9031e57a6fadbb22c5bddaa53e test1/680 0
-0bdd1248b74b81461b0038838decc005411c62d11054f8283f0c28d33eb3dc16 test1/681 0
-0b9c92dba83ba8c2daf10052159af316776d1a4d04bd865184966bc1b26b6290 test1/682 0
-25307469d74364427d7693ebbcf28b5843de134693966dc7d67456c73c0df2f6 test1/683 0
-2d5dcd85b584f9cebe511168ad17dfc5731adc7bc9dfd868967e752fe6a3c8f9 test1/684 0
-94a97ea9143c6d280c15a8fb356edd6f2078613c47309e162067183eb9ef5e52 test1/685 0
-3b3bc20d193143f9b6ed4cf7da30b1dbcb91f8af4d473debf626c59bc5d6c0d9 test1/686 0
-6bd4963d1d6591acee7d65878cdf5307062cd338ebabf53365da473c6bffc05d test1/687 0
-748e278b9968ef59e47618cd432b78e7c96a36ccd3bbb79c4344f6bc14df16a9 test1/688 0
-05febe274a53dcff3e16f47c65965ecdcf4b7a0f5b36dd72888ed0b5e48198fa test1/689 0
-837980d21aeeaa8b758085ae1f672e696f66dbeeaed17fce3800eb4ea96b38ea test1/690 0
-197e6ed5064124c7bbdf520b42ec87c539e6ad449f56ea1f64c166f21514419d test1/691 0
-04bd43bc0bde11e6d57bafd836e3ad404bbd63012d11f52334a21cbb298aeffb test1/692 0
-728ed44971d5cab517dfe06d8d354d82d79677535ed957417cf5c5f794b4ea47 test1/693 0
-f663a97e5ae55456d0dabf66714d824a9d6b765d0d18cf44a21dcb297550b629 test1/694 0
-5d2b18cffaba1e00cf91195ff85627b2a67ac35367fa98292a548cda41c1ee3c test1/695 0
-3fe4c99ed2571a3b90549ec9fe9415fa53a2c5d6f5caed165597767302662994 test1/696 0
-f3708530765def56d155da53daac64af7c0b3e225864c4e71c30004030904000 test1/697 0
-4d52ce0059a2ae6d28ae335a429e2ab775cd78ad4bd857c3749b40084b94229c test1/698 0
-325c9c5ef0e88e633fc4ab84f064831bffa1f9f77339d4a6a5f7fe1c52e4eaeb test1/699 0
-87ae6ea5dff2323d56a3d474740aae298a507f6124c73a3a0d5a96a82f7019ba test1/700 0
-a5b430b746e182fab095f9b71f22fe30d36083a72e64c39c0108ff19a45c67bd test1/701 0
-b3f878a9fe25cfdb88ab0c0486b6fe20a69020ce354f7d2c30855342e640be65 test1/702 0
-bccba8d1dc8a5172c89b27e111a0b7e465b0ddbe6c25a8f75b203d4aa0817794 test1/703 0
-5756819d56824e6662e5b7ffa564b4f709183e8d7d399b1ef7f25cd8b338b7be test1/704 0
-2be1bd4b48e6f4cae6e97a7a4d4625b3d9f170832f74538969d88836bd944a20 test1/705 0
-da836ea4bb98c828562eae30139b0057154c9ff37740c38794e390d6f740bcc2 test1/706 0
-42de3aa86f575c8244a8383aae253127c5bb330c8d3ee70b3465f34e695ef4e7 test1/707 0
-4460e11116970577d2ae2f4b9ed0ab915beaa6884b860adf22f9cc7a420d658a test1/708 0
-d8c5ff360784e6eb6f25912e46c3d0020f4bd2cdf4184e3e5bf6f178d00157bc test1/709 0
-2a9ce289a14d9a7355f9ac3ef7133ae38ba51178024501a82f9b0fee1fe52db5 test1/710 0
-6e20670c7497ec4104b1477387b83d8787863148f157b13e680c01adfc75b6ee test1/711 0
-1c1af21e5e5554caff5ec45d227b0cd7cbdae77c9112f54efeb151853376cc6f test1/712 0
-a326bc91116897d0442677fc109e4b898f929ce8676b3d1ddde995fafba92632 test1/713 0
-e7184a3aef754be39f3a46e40b3958dd9ca649ed2f7fd16a5d4e36aba99e3011 test1/714 0
-26a6e57ecaf9e61804205482147ca7a54aaaec7b8ac266bd8efb39952dce9e2b test1/715 0
-b73daac85e4660bc280147560eff04487259a6a273651951fe1e1257f0e2dad6 test1/716 0
-50b71f46b4e43784d9fdb849bde02ef5f21435b76e2670ce2bbf92655cc9115b test1/717 0
-79f07e464ec075ca220d082429fa4327688b4ca551be188482a3d21eb17d36ca test1/718 0
-06437546b0751a0514d729ece433f51d74d72abc00b7be8b74959ca78377163f test1/719 0
-6a8e941b1fa55b8b5fabf953cc915fb0a39bf436a3cce9c6d6f8d3582ce6cd11 test1/720 0
-499c3bd7bdcb1f47806bebea0d67a36a0e2437851a3309b0f8da10407ac8052e test1/721 0
-1c9eafeb6e35ce785771ba1d560c66ab7f6bc392d752a17fffc45c756243a15e test1/722 0
-64521261c51d22ffc26da060e03c5bbf998f135e2fda2c4e7352cb7771019636 test1/723 0
-8a028be24d0dcc4fe415976522f31afda78a97795ba77b5fee28009d75a3d484 test1/724 0
-6fe553aecc8b628284c8a678713a6f996c995a8c6d960d4c7a7e7562eeeb4ca4 test1/725 0
-61c14a02b445d666f14b0f4e9bc091eb62ff6f66220a7c56d62bacc6a63d830b test1/726 0
-251a9e2bd4c58e4f2014628d456ceb308f12dd847b8f614df8c85ba5640b7159 test1/727 0
-b9b7f1604233e46c190d994931fa9634576c6c90de579a520827962b95acad68 test1/728 0
-e4b15ad8f7276557788e5ca39946d8a7d36418dd617724251e9a8f33e3a43743 test1/729 0
-ab2c301f32447db2c269660b08669eec182982efa0916e0fae3267eb4dd4f86e test1/730 0
-55ad4fed3f558b4d5fb28c2b666e311b181f86b7950f9b56462dadbf41d86c90 test1/731 0
-a7ee16a740be1141c86c0cc57189783f3b32faa89ee6b1b914bd14b0cf2be6b5 test1/732 0
-c33f82f8438f8dd2758564648e7339dcc49e09ea62e9ca6e2aff27c0c5fc0f20 test1/733 0
-3db77f4f06cf07e8df1df5a233bba01ac54f05bc714ffcb6c2112a3ba4b9c386 test1/734 0
-d3b84cfb82a94f76bc25093947b4562ba915e9b83719b2fda44b49a94b45f666 test1/735 0
-f9843f2e1cfb282a2822aff486a540c9b724f876ce9183c818c6f14619315961 test1/736 0
-dbad7733d39b670ed5efccf3595881e75d6c48de73fcbb80d988f33b5ca21d76 test1/737 0
-ea918c07cf4b1c8f3828c291d4ed06c13e002bc4652c8abe9f27a23272ed8c90 test1/738 0
-76a3024c75dc97ea3dada72781033081e7b70356b00fd36a2c217180043a1f5a test1/739 0
-a89344f72b86d4cae723015dc760456d06405ba1e8f46bf4f2ceb922b872bbc2 test1/740 0
-ad29b9d34218824453eaed7d104968465950fbacc7edf00ea0f28ad0dc8b3b42 test1/741 0
-f251a76a9196e7b3e6a125da2a9ea79c700e75ec61ecff491fa54dd93195a2a9 test1/742 0
-44758aacb401717fafdf9b02eb495d14089caf15552bf2c208b17a0c50b1efb5 test1/743 0
-da6af1c6672f86e9f709e1a1b59d670f4c35489ede3df1ef492340dc6da7ed4d test1/744 0
-6f9776fba5d20bc980360b5041d1b64911dbe667db68f4549472deeedc1458eb test1/745 0
-4f5ed0808a5ae55799b88816e4c56d82e4d2504edd8a876a34930275a0ea806c test1/746 0
-ade4d53d50a2d4a4d8db150d61ca85338eb3675eae85cbfb0c9614595b33a084 test1/747 0
-80010bcf79ea468bd398313d10252cd4882abe9c38d46e1ed49e07fabb05df46 test1/748 0
-999d2dad264823b5d5141ea1c5a6d2cc19cbcffdfb28501652eb01f9380cdc66 test1/749 0
-4e10d4c739ec8fe046a128e1c4f74042933b6b2acedd0bee111ae08322a891fe test1/750 0
-5921de6ac57c3f327858928954279871a682baf974dc0d3151321078cc5ffb0b test1/751 0
-2b95e864a4d85d55bc4c7179cbf3a5b2db3bf0ef44700a83e458132a46f75b23 test1/752 0
-7c83e5a0dd52bdc3649d7f697c2d92f0e4cbdfc98e67c4921f7a3ae0fe3bfd7e test1/753 0
-b84aaf77b44497811ce9f312a44c1f70a78ca81762fcecd68b3ed2ee66192fa9 test1/754 0
-8a4723b1dabd232e1970470789695f53f1e3429deac3b6e2409866b2f9310084 test1/755 0
-0822cdbaa990d38c63aef91ca55abcdf898041043b5e79ec6bd99a4d61f2db3f test1/756 0
-c3c43e5118a99e44b6eb189ac9ac9fc727505f69de6e399246fe1750974edffd test1/757 0
-3f5091cfab8d43a2c51ba68f6041e7b649d455d01fce5feca18587ae42c9d0c8 test1/758 0
-a47bb78172fa36d7299ad9b38ddb5eb9e056a8365d80dca2098e578d692a3163 test1/759 0
-753dab26e0c8b0e98f6356c901cd24b6f310058997ef8da8ba382c1e714217ff test1/760 0
-372729d30008aa1e1326486453f5fc2b1eaaba220ca03f63d23e9e17b3ddfa36 test1/761 0
-f2fe7c8b23ecc445047dedb584f23a159b93cdb70d99e9f5bc2be7394d4d0b23 test1/762 0
-afb008f8dcac59c3e386d008c2bd1b0e7f584aee8e941a1fa33d66ebaa097104 test1/763 0
-b8a3ae30a8ff5234c1fe268d4e4d740154b35dc20d7236fef714dd27f1036246 test1/764 0
-04eddeb48112c2bc34bc032c56503fca373cbba9e8cdf1c59dd19ad6890b2730 test1/765 0
-0ffa6b31796107fb5ba384eda13a4baaace7af42dce549fd58bf8b0f55cba65e test1/766 0
-f156e009e85ffbc4f4e0637046d2f913f83ede991be70dff615082878bf45e70 test1/767 0
-774393d55e3bae28d8a58e91c3ad532464dfc20d9648cba58624672741c248ea test1/768 0
-dc4a1a9f034679a1640c58b1d5c519f1841901e29a4eb2e7d360de4b69cb08ef test1/769 0
-1b5c66e31ecfb92232ba59eb3d4c42ccc28315c174f8c0be105df762e54e7fc9 test1/770 0
-53776b9062a6bc86015f7b5a2896dbe9305a0e6f991bbb2e56396d4b6c5439be test1/771 0
-4197248b0e5d07df4187fbeebf335ae8525779fc00b5282578e34472b3b7e28f test1/772 0
-5965a56db632146439c5c0b75fc2424f5143868dc4860574d81944f47fd6eb3d test1/773 0
-4b9243d811aa8720958c1fb4d6484f82d65edac4f4fb60d118cabcfd11666461 test1/774 0
-6a7acfd37ed13554b45984aac2e565bbd22c69a6094474b1bf27c013c29515c4 test1/775 0
-6859cac4fc4d13bb217583603ad09e17e8558790e114f704ca3d73242c995109 test1/776 0
-59d193a7f23b38023d8f2795b20283b7f270fa464d655bd59c607881778432e0 test1/777 0
-93ab24b4d02a6c8d580ddeefc7fd89f631d7f3d655aa58c34a865712d1d59f5d test1/778 0
-9d80acce029d132d3017caee92d5cb1e015055afc3fb206d6e81263c6868347f test1/779 0
-c2a6dfb343e25fdd88cda7de430270434d4dce11ed57ed01699dd39476846b8f test1/780 0
-0c898c68e18d054cd6ea4e6a5aa25ef57419410d6ebaa97762c6f0ff160f9142 test1/781 0
-b5b2564ab1d462898e72866def5a23c1a9cc55d1ec83b7efa972ef12e1b6cf83 test1/782 0
-bd64dc532fe2798d0c37417a5bdd1234b567b9aa681f437ce117ac0739bac4bf test1/783 0
-e1f1661507607b255845f592d79b9e2085db7c10759ff21e8dd8afbddadae74d test1/784 0
-da4509bb842eecda020bbe08f1b8bfa283ed25a162a54d8e0e7329644b6702b2 test1/785 0
-8bdaa5abd3294c0ebc20731ef7e7da9f5409ae05b54ea84df0209890e3962cec test1/786 0
-954f11c612e3f1e23ac8a9d1c1260c28f1ed52cf59ac1f4d6c886f7170d9c865 test1/787 0
-ef95e95a595a2a2e67f32d1637e7223ee8003c127e803a60faaa6b5b205e5f3b test1/788 0
-5ffb660930c1ec1c4f3393cadb4e7dd0a286ee77fc628e1452a6a55c4b1d3efe test1/789 0
-340911241768236de6595b808cba8c47dfb9d69ee902f5edf93eb7ee3d932d23 test1/790 0
-770a1a07c5ae4488ebe08750d8e66129b562d9fda66e7a96f82e655e48687088 test1/791 0
-c057eb441663955358d26574dbbb8b7fe2f86c67e89ab8df20e47089e4af01f4 test1/792 0
-33d8ea3c1a85796f423fecde8929d8f5d21ec9c9108a6543521fb3623cf10a1c test1/793 0
-d18623ac4fe75fd03b338b48c214a033dd2aa49a03ce85f873d5afe9bb601fb1 test1/794 0
-33b1c07ff7c98e53fd4da9f4dee838a3b1897bbd4ce38ee0f04b265733687e20 test1/795 0
-5fe8262bc78b6270142a5fc8bbd7ce5b2da2f67d38a4acea89451951c62500f3 test1/796 0
-d181d66e976f9f8d9b9137f6e70fda90d8cc607c3453c8022ac9609b1c8c458e test1/797 0
-1e9807ae3170d04710cc5f1edf5970e75e170ff88f5a362a5780db29a29c6356 test1/798 0
-2eae1482b8111990595b112f5f9b0ec7aa117a11dd63e67db0ee6b09ee2294e0 test1/799 0
-e1ce48a5b47a6fbe1f316992929853735bc8cd41eca49fa96b4c0aad87ccdc10 test1/800 0
-70a93e9c567fea572dda42c20471938ec7658b79eaecc82594877f1af14d8165 test1/801 0
-36a702919591ba29ef2c93bd8be9baa0d5a57597f1dfdbb7539830c9fb9f638e test1/802 0
-16780f7190dbdde5f18bf3ad7b6232ad5db70c0353e675dc320f46aeaa8022dd test1/803 0
-0481a1ede79240e84fa4b885b3190fa61407eb5ddfa0c2af5e6b6a4129fc368f test1/804 0
-82000e92787a94d7482d85cf257a5b0d06d0daf53e742911e7ddc173011406ee test1/805 0
-5eb8fa70692cd00e836d034294c6dc84724982b968c8c82a36cffae3656a1d55 test1/806 0
-842f67a9036316f00872a8e4b142673733c070b4d56c9489f0dab22bcceb8621 test1/807 0
-b69908946aaa468ad2c25ddd3de95dfb8391c3f0d9c191121459aa414d1ded2c test1/808 0
-48aee682850086a1d37c5f8b4c94667ff4a61627a70b9ee57b49b332c30d6058 test1/809 0
-b00ec3b9ca3b95dc9db743558cc53cbce9f520eb7c129c0ad9babdb5e058cd7c test1/810 0
-63ec907cefabe52eb686f2bf7c541e877644776bd7c539e884c321bc58de5970 test1/811 0
-ab78adef75ea92bad305892391ae74576de83051d418736ad423494198ae05b6 test1/812 0
-4c76cfa27a67d0d6849df72030fd4be0db42fa80cbefbe817105b71ffcaeeedc test1/813 0
-7d8442cca7f5a78a00d673b50fdf08a61893aef1c5a9b5c98411964033adf961 test1/814 0
-d304db740820e34015bbe4785bd203fd9057628ff3d74ddc11158352af36306f test1/815 0
-ec340bfba18fd92963d1a3ee230138784fcdf4e60ce1d43dd14d6646d9ad1571 test1/816 0
-8312c6518d44cc21db9502f6d0ab78dd4804b459ffdd84a30cd46d23452b356d test1/817 0
-00402b5da7c961ee537785a32e625103b50d86620b31233fa9694db6998e3668 test1/818 0
-293c6c125b80e5375ad1fb03f690416e0ff057c5b5916deb0b7126b71795c263 test1/819 0
-4ec401a62bce0c60cb76f1688003f520a0e6f440e441a5c58913c8237ee95dd3 test1/820 0
-63d637ecfaaeeca4f3482c07bd607b1e54eba1a269637a258729c5eebace5a64 test1/821 0
-393cfebe5cbc091f1f9ebaf870da5bffd3374d4dbb8dca1687a0f03434506456 test1/822 0
-278b809894a5a12425f73234379e92763ec02e7df44c1da92dfdcc3f214367ab test1/823 0
-495d2ca3a2cb15c8cb1c9aed0f8c6933985365b2c4163f05073ecd589e721e15 test1/824 0
-98890e1db80bcb6cb5dd6f40d05c32b0104f18c5d644e1f8c3149d257701a6e1 test1/825 0
-e3390f6cc1b5bca016cf1f1fce058e885282f8b4f01bd6dbdb39506e34be71df test1/826 0
-bcba752cbcc095320becf6b98c1752cbdb987721310d207584f3993384cceb40 test1/827 0
-503c26e27a16d1c4ea7b0feefa61762de8f39a5549f7344b98788501be2a5bff test1/828 0
-0d0d5666285a9c6d33a935b215753f3cc967dc7edc052cb214de8a695ed7448b test1/829 0
-ee7a5b14b7ded9d44ca98b1867351fa71268ac2e88175c82bd84d5179d06ccc3 test1/830 0
-0aecc460c83133c297051796b9e17e536c33ac0517c11badc294128557f7bd1f test1/831 0
-431010caaba4ad817291f75240380912b62cfaef1ebf6e85fb6e15032da90174 test1/832 0
-21b5ee719c2c2df4fcb510edd747c6bdab66a34266c9d5173060fa4b6b83f2ee test1/833 0
-3035f5446b4f2702448594a70970edd76c040e153f761adf27fd30e1dfba1f8e test1/834 0
-739c2be39060ae0677f694f80de6996886838d629fd9b43af477291ad803d944 test1/835 0
-1020185a0a5c570b95eefd1e1d3e3ef22aa5e86df8d3057e13c697e0be0ac631 test1/836 0
-e9dfac81c75101cbe6f2f36d381467336ce4108a2bfc191a145296e9ac4a975b test1/837 0
-1888923ca06b4ee8c1d4e279208f18c8d8a7d21949e1edc62a0094975439b139 test1/838 0
-22148d77711be0268b4ca607b75bf7d972b09c73d546e99426fccc75617fad0f test1/839 0
-70ab0fd162bccde605319904797f62376f09ba056b206fd9a50ae72f6fcec5d4 test1/840 0
-e7fa35130840b68d919222dbeb361cb9119e99c3cb69140a38bdc4c4a3630603 test1/841 0
-0d67fbc1aecb496a9da9ea7408b27734a78fe5634abffddaf4fc9409902bbfca test1/842 0
-e473b8cce99598d4342607b3bd2eab39f2c7fae325a915e72cd3776ea44c8ba2 test1/843 0
-c873608a150ca310bda42b0920afe3d7498e1ee986bf89189fe42b8bc4a8121f test1/844 0
-288b079c21168d6e33aa52b731300e602ccec57ff9ef5abae967aee6ea5ac74f test1/845 0
-d9bac38b31d37fc6924527c73ffa4e032c4ad968c8d788e505d5b3c547a09271 test1/846 0
-358ae02992946b3d98cfb9e922ef785a1ce2b7d75e411b6d456b99d3f1351a2d test1/847 0
-35caa024a36c89f9a0328dae8ce3842763f1d9ed1a99edbb01c28f73096117b3 test1/848 0
-9489936a6b3d3a0c283564b7d1d04b4c4a56d9db18c138aab3bb5349cb61b925 test1/849 0
-e529d305f5fc3f51711b6ad9bc488a29539b4706830711f7ecf0066dca7b6daa test1/850 0
-ee4be7668aa7d2217ba3140b9d587593c4954b192b80f411506110f37c7e503c test1/851 0
-4abb1f62635cabb6b6a9b26f768b5e382a374f00c6cc6c5632905581268c4e14 test1/852 0
-df30d010a8077d3911c6928ffa620924bc62d34c6ae264369de9e7922f6ae445 test1/853 0
-b12c3bb791f94e2fea005ca4e94ad1e5b3ef9df65a14afd0c339edc049f48c8e test1/854 0
-80c7cdae300c065de1b85308f50d3e64db640de127d1f3ff06b5a3388aea4f77 test1/855 0
-5196688c8362e328404cd292ed8889e6098591bf2eb37c868048a4dbbe4cee3a test1/856 0
-9570ada06479ced96792842ffc9c69f26c7872a96a07033e420aa18ca2bbb585 test1/857 0
-4f05b489b7f890984ec182b1b08297e6b4909203b98d03feca13e0cb53abee79 test1/858 0
-949696d89d21ed4956e40cd6b4810c0d7c5b2950e07fccaf3ad07cc98a1bd52c test1/859 0
-03e776e62eb63fd3ef84d4eb3fea885ee092c9c45a8bccdaa1c54d50fb8f6f17 test1/860 0
-d24a0358e2485aa527e674acad1858bd932d40128341788cfe1dff26fe55a074 test1/861 0
-325c3b7dee4bbeb9a0ed4244aede9fbebdf1b293b6d51d702879116de0e7a21b test1/862 0
-b36b74bb84508ea89055345af32f739976d3f39f5b59165399174f9d3278bebe test1/863 0
-8283ec0b4c9f26e964922d176293818ff4971d31814041cf12cd758fc32eecfe test1/864 0
-65a5ed5ae98ad878c5ed43f084eaf5b746b01112455009f4ad3370537d10467b test1/865 0
-5f1d5ec0bde8374ec289b931bcceb16cf32a8a78c9051f0dbd2b8913710782e7 test1/866 0
-6d07e6aae985d31b37416d275536edf46a2feb436ec14e90ebd8872e8cc381e7 test1/867 0
-8ebd4cf105364452db0405f2d424023159ac6479a5d87bf603a0aae9a17ac24b test1/868 0
-3857a51bc8ad2d09d7410a804a2f8bb7971d778b42280ac11c32ad6517b7ddb7 test1/869 0
-db704bb5fd36956528a027b8e25c7e13443aca5736589e3e4fd244b3dfcb0ee2 test1/870 0
-57302ba0136da74ae1fc033ed1b63c9775de74c595f2c4b361d2a8acfba6f8a0 test1/871 0
-c7d772f7048fdd4dad9ff68f5ea293ce700738f655a0967003c3da78d4bbc94e test1/872 0
-0ddbe3627d2652e6352d4c2c66d25036d3f80f8250210825a01f29b5a81144da test1/873 0
-5252a08836b92af4ef04548aebf0b407d7c2ad04874c2b1cf4da3ef13bda6da9 test1/874 0
-d6ba333cd171bb75441c6494a98aaf943f7e89a36b88d338d943c4244e099039 test1/875 0
-1100ed72be88ab6814d0007493ccb2607cd1b2a431f75894a93c2774888b69f1 test1/876 0
-208abc0d2ba522025c1dc6feefc028b2e94967cb68eb7d2a192a4afdd7209ba6 test1/877 0
-68149250f84a8b7d0c5cea2bf2bc8888dea2cf29307413ea0a078644b747eb6a test1/878 0
-c1af374ff53cecfb8f89a3d4c9f5f8922296d32b3c49073b498b6f5cf6f7bcd9 test1/879 0
-bced8fec7183eb9e43591f8ea1a4f567cf2d4615fb292f3cfa2e6aa429a75552 test1/880 0
-8abb0adecd8dbfde769d9c9138263e60d8ba07078e3a724a795facb268b2862f test1/881 0
-edc7ee486ce42a36e9563670871ba7f97e3a33660e69f23463f7853798a2fdc2 test1/882 0
-d0d2e11f12762587c7a6b8622d68830231df2e332af59ec6613a6faafd65c55a test1/883 0
-857c7ffd9fed61cf4737e19a85cad4d33d182e16d52fb35aa7eeaa19086bf8bf test1/884 0
-fc7489c9c9c1b343a816b736e157ccdbcd07caaf2fb73ddedab5674511154214 test1/885 0
-ffad883c5ba6f814433b4d34b72be8b697eec721641bd63ccf829258858b4b06 test1/886 0
-5d94fa600efac14b9c21bce1c62591ebea295df155b7e791e712f2c1b017eb97 test1/887 0
-9f7cd7cc3b4ec282ea469db7e9574fcf034eafec84d33f9010fb6d116d9eb2f6 test1/888 0
-d5249ae6592fb9827dad81559200c21eff968dcaa3d716b0350e44b2bb27d3db test1/889 0
-a898ec863a83c6f13ef1f7ab4bd53ed7701385ef8563ea5aaf74a8d21046203e test1/890 0
-1edcc328802dec721390dfae092b0ca1cdd7cbac7429f111f24c60e883d483c7 test1/891 0
-96672b92badc8c357f801830a482c4ba0b30f9107651d2c36a436ca5e4cd84df test1/892 0
-03ff404b5c052581c0348bc65b81a923e81aed4d7d5a94fc2622361d04c3f7f1 test1/893 0
-0bd23d87e03a6ad8fdd59592e6b21954415ae669bf2dec7dcf75c4144f5808ac test1/894 0
-860eea9a3bf1598e9149370dec3b36fee80ccd4ad3f9a58fc989169bdf34794b test1/895 0
-55eef36a58c543a04ce89dcb704ccf4aa6244a14a62bba8a1fb28e10b0b89073 test1/896 0
-2b8f5338b77fd8f0d5becdb6b3cdd0eec01f5eaa788d6b969b34c2f77630519f test1/897 0
-cd3816c7023f73f2f3e3082e1bb55de671e227d63a982353373f27f52b493aef test1/898 0
-0ac91380d72ddacfb36b72125cda1be3a27caa115b3da488430414ddb171b62d test1/899 0
-7cc59565f435a84e51d7d5ced95246052b12530dc316c0578fcf012efc99c15a test1/900 0
-b7f369d3cedf19685cad6049196f074a20e0f56464060d8645534d3795e7b332 test1/901 0
-7488814f75a5645c647794974ec93d2c66308c207bd48511249e7aacb5931e6e test1/902 0
-017da69352342f15351aa2221fa030e431e091f78c68135032dede94eccb4d91 test1/903 0
-4851fd8ad15d7f3c6d494d19fa5c87415b75a910f4437f24735b15a181db441d test1/904 0
-17d0c578bcde1ccc53a344deda6f09b36a3a4f419b829a1f2cd0e42a3f6b0415 test1/905 0
-5eb800a69e560b1c1b1a9dddcf85eb664d78095d0f4bca620dd722cb5f5e5576 test1/906 0
-1c4f58382ae6ba79cc29a4358e3ed24f50c746a390c00fc5921c76346aace0fc test1/907 0
-967d6f5e884ccc5d510f16fbaa9510eec1d8859b60fcc296114f30c6960a733a test1/908 0
-2b7db0c2821e1a90a4c66702d8937caf1329cbf99dd7b8355168ae15c6459066 test1/909 0
-900a4dd01bf33ba965c841846b3bda45c6eba9b419c112342bb9ac87016b5ccc test1/910 0
-51e795c805c1503ebe55e76836d5a66e38017370ed7a439d19642df4f91077c2 test1/911 0
-b98550d0696418e5a3310d069d7caa8f0a74e6fcb61b11fb4324f4010b8e3eab test1/912 0
-29c57e321c154d020af9ee4d594c8ab35496f7a3057f0a79db8b2908086b7d27 test1/913 0
-9ded8c6abaac06ff5a266e9ddd429675dead3816c9613db59f49a215455f5e46 test1/914 0
-73e47c0d9fab1b98f6f22bea075e95a3028a9476a488b44d992e1af607e18c0f test1/915 0
-14beb0b06800b147c1e89524a5d4c6d734c61da376768a0075a01c7881bbb150 test1/916 0
-61f5bd3084445d0c33def4ea1c9cfbda07b74ad08481bcf71f5855dadd9561ab test1/917 0
-ff46dfcba8afdd8af4781a98a629129c3c6e3b954c37763937bc9f2821b08c36 test1/918 0
-891568b9ea605d0ce3bda904c758e48e8a857d06a6bb715c002e433142f9f67f test1/919 0
-ceec962ea95d7e491354872f30da34193837d9c5b9cfe53d965ae68350d18a19 test1/920 0
-72d0ea267da8ca75d8dc6e093c41f731d0eb91db2bc9435912281b86dc5b2ed7 test1/921 0
-acaaa643e3504f2d69bf12fa43d99df587033d75023f2f740735a80a01e25a64 test1/922 0
-2da115e128c16feaa386f9e4fe3391f3259ba514c23803248b6effac42e040df test1/923 0
-bb268aff11dc0707e4365aa738e5e4703d921b473f0dcb40d7791670694636f6 test1/924 0
-b8d8207aaeceb6914ebb8f7750a9b77cd85327515e2ef59e50eac2c3210470d3 test1/925 0
-95795dcf4d2ba7aacad8c2d7b93378a874afde5a03edca2f6ae7ce153b83a0bb test1/926 0
-6273e84971ce0ffbdd25724b78680aabddc85d99d376953050c95b8d5c86caa6 test1/927 0
-e0fc7d9d0e82a7e6f3f4dd8a7e0cd1a75a5e13353efa3e94da8eae292d30a9bd test1/928 0
-0f065e4730a4e50706c401b674148b0dc596a6ab5147ad729a5f3f034f583e60 test1/929 0
-d8a3b6be92697e6b3630c6993dc78e290078c76fc3f3f99029220f6a2b799fa3 test1/930 0
-fa0c4f50cb3b317a348aa46432af36c2f8bb3c7f4bb25393745b35dcba09de0e test1/931 0
-fcb43527a929bc2ebc1fa00ace9921c6609d2f389e140b4a266ad93d1ce8246a test1/932 0
-e820b23e5200d9230b8b4cb72898348b0c6c7fff4b7695a73d19689a6fc49a3f test1/933 0
-c2a546684b4271a8bc5369e877fb7b85060214a6c7a7076b729b977682933460 test1/934 0
-b434ee2bd453117892797a16594313ff3c62ef9c3d6e2dcd83377fd7c91f8d96 test1/935 0
-288b935b0369a24429d40446d142999a22b8917ae05ce2da7eaeca5b88a774ae test1/936 0
-e66819b6cbbaea5a82b5e4f2c4cf0dffc1ef82d34c4b0c2b496ff07fd9bcf346 test1/937 0
-eb988fac9fd03aa068df72fc2e59f8431be0c4b436ffa781d94fb42bb840be58 test1/938 0
-d13635d27272e9c8dcdedbab9ca7ffbfe2d0bc2f9b6a70b8bd05b58b5ca50a0a test1/939 0
-2df840c2ef8711ffd21ef8739427c621ed7e7998f892d505d1e3e24f1c83fa82 test1/940 0
-0b10ec6b91677b91465fa6c274178c1b3230b3c64865f6fea07fdd12a814936b test1/941 0
-1f6cf2abcd3297b1711417b83abc248e2598489091e340cbc60993c1bf8aed6a test1/942 0
-fbe99d7dfe48d79c525aeb71fbf7cb54a0327e0f34b5cb0205370a4aa72295f5 test1/943 0
-c40c024b084c32d43f3ca5ca47323b4f2ba8d2409d66bf83385598c174e2dfa5 test1/944 0
-dfd1774771336f9e39330227b8a47ed19be022162e3bb8a2f1bc2d90f7562bff test1/945 0
-9d6a75bc483062b60a879779ebfe2f7ba3dcb547f51e4c7116b56b5f5b31607f test1/946 0
-75149da7465f79c6641ed15835124a414351f47060bed002b3a167df08481d1d test1/947 0
-5bd3f20d4ccec44841e78b1e31db69694440106ce596a3a9ed38daf2e42098a2 test1/948 0
-f25a68aa95237e9c5d47449b332f8d5f65c3a5cde4d26de5caed4dd465204486 test1/949 0
-2cb93590abaf6f20463a9ceacac618efefa41cf3044deab572746e8b995ec90d test1/950 0
-e62f46d2c1fe261fb64064a46e7f784fec52fc5e7186e745af8398e7e4884a5c test1/951 0
-4cb7791c2ab18537723e5baa6993f00eb389a9720f4cbf35a55b8799ddcf9f35 test1/952 0
-f3e73444c848570dc3e2d3026648ff1e654665b0edfcf9456e8962057012d1dc test1/953 0
-2f68b873db3d68cbcdbfbc0c3497e899cccbaa3c9e8afdf8e2ffe0efd01651b2 test1/954 0
-865355492c5bdba98e05c0841204715973ba32d93155386d6794355e6e38096c test1/955 0
-fd3c0e22f220a55d96a7120facafd852bd55a6d8c67444ab751da299257c7072 test1/956 0
-11d845b1de621f1a34f2f11739269c38d4f77070684903f52556ee0022b5aeb6 test1/957 0
-231e8c04e114ce555c336717c28d801cd194030ce7effd0a5696a1ca497b9aff test1/958 0
-ac7decf59b2d810220acec5819141e901acf651c756e73f92ea145f26fc2880c test1/959 0
-f239cb132010391c6da157b52b6ff093079c4b60a4a0308da52e484e33561ee2 test1/960 0
-cc1d49447cdf5b28711ee1f3044a0731a9e4a6fa0091b311e9ca6e613438a8be test1/961 0
-f94e1a9f00b4076c95ae0bc15bba7237ab7f4a00863e3d02443d6e4eec96eb59 test1/962 0
-4107e1533f6cbd84b813f6bbdf7d0e162f1442847fcfd6a641908fb68657c4ab test1/963 0
-1805c6a10cb02da647954ec37fcbcf0b9b01234abe4db8978e201d0c1283168c test1/964 0
-8d7734523802c4914067c47991f022151340d2be161e11cac33963b2e83726c9 test1/965 0
-efce5e5f596918e846aa14f85d85e4b733ac47acdeaf84dcc427e410f18e2bc9 test1/966 0
-ad71e728035da9e9c4afa5f03e6c94de3ebac7f489efc8f0a82ed9d06ec33aff test1/967 0
-725460acd36098e7ab60b9d0862985f6b78bf2ea72b3ae61593c8fc93240cf26 test1/968 0
-9e3dcfb57ed973c51b2763f46fd01625c4858dd007c1fbb022f6d36e288ec2ff test1/969 0
-43bde0452c32c36bb6c24334ff779b5ed87b3b606f80f69ecfc2faf6679c302a test1/970 0
-002af63965bf58ba78fea496f0c52319b339b72887a2aeccc1bc7ad09dfe0ca8 test1/971 0
-1c5f6b86c86bb75fc01f3cb95a1c5d42c7a908c7d7d56af73c067657c71e497d test1/972 0
-275bc70b5ccb96cc449bfab4f7114b035b30a740ecc974741f6980cec4f63218 test1/973 0
-1a1484b3b9518adbfc74c002cb10311368f6b5a0eaa346945346c87c286e8bd3 test1/974 0
-f6095fcfdff6945c4c91018ae1d37607aa7c0db38282f528e57c98f2cbd8f9ff test1/975 0
-b6c7c373330d4383f1c23df4d369f8edfe72efb5ee9dd47624e91fb5ee19d7c3 test1/976 0
-84ff745c2a4034a995f64090ec02c702cddf0160713de5f16eb5ecc86f1382ee test1/977 0
-a4fe6c84c0f4cc66eacf3ecd630eddc16cd7abd768c240c416a594cb9a8d98fc test1/978 0
-edb60a0970872ebacbab7f03bf0376f860282a74273d87ca13b56954569b3331 test1/979 0
-8be76520415458a0d9fc6ace634dfe9d672f06c386858568c6188989223bc8b9 test1/980 0
-ecd3300db7f84b512376a2e352d7f91a6a16d33b1eb9196ac18f7165cbe5fa87 test1/981 0
-a422e30426de8d986e95901fd5d0c37ecce38ab0726020634aade60dcd82fdf6 test1/982 0
-5c63a6ae605ea9a42b49404d287eac0ba745fa4097d19aa0e744cea2f2491b32 test1/983 0
-a6140385e675a3e6c6578550457052088f4787d32135518c0088d680585fdb45 test1/984 0
-574eb0186b4577e6cd2e06247b6b37d0cfbbf4733228aed42e7bcd1df3598b38 test1/985 0
-a9e2c29553061ebd20a71fdf8cfe572e3f9d5df722570f14acb3df2111de7ddf test1/986 0
-c99164dfc3f6d1df91916fb4fd63f4a17174ccf2457ac8453d3ce09b0299d218 test1/987 0
-d34fef98c0235ea1b66b453ec6ec8ad7d8598d8c4361e27f91f75784089a9a1c test1/988 0
-1c3f0994175adab4a438f17bdd2e4d2e131e1a2a41890ff6b6d7142dbe0765d9 test1/989 0
-deb1ee8a3adbc1189add68b263e513a05ecd9b65e5861a35af4c271943e26bf8 test1/990 0
-181b72c0dad97d9b42d4d6b76799c4128e8d34cfe1327bd50e663d13d12c6329 test1/991 0
-9ad6ceca7ce297cf9fdbc6d47a84b368833c30a58cb5e751668001a713690020 test1/992 0
-f066e0c5ef0c109ed41f21ff737112938fda386abc41588fae53a8e7021215db test1/993 0
-f86b3848d6f5b67a29350b46928825baabf880f097b76682f3fac7bcaf589ca2 test1/994 0
-5a42200434e5ceb78b4d4917b7ebe7dcdeb7a4a307566f46c42890bbfa36a145 test1/995 0
-f87b04562fda7c576f314304d85627bd9ab37371c637b052096258c4e7132a86 test1/996 0
-42d2fadfdb1b4ee3c7d3c254ed880728b07fafcdadabb2a60bb2ea7d2bc1692c test1/997 0
-e1bb8021402887881cf2b32ac5c32516e4ef7b55f152346f7ce3e29189d4bc6a test1/998 0
-00674dadda85a075bedc2bad8e9ed6a74bdaf813cc2b7203cdfec1680658cc18 test1/999 0
-1935e54646d6e353ca808a1e902eb7661024183e9d947ac3bfe5d3615c1b9c9d test1/1000 0
-96264bb6d39f00edff80701fcc823b2991b2d8b96f86460d26727ad2bf103be2 test1/1001 0
-c667f2dfe2d862b732e6f69cd2134f0330321599a7c9bca34ee0ad15875d6e27 test1/1002 0
-95d4b5e8575fb7b2633b309194961ba87df3d07a17412a5ea74d943e117af5d6 test1/1003 0
-b7c4067f278f93d92043878fb8699ea613510014b0e7a5e73b422517724ae7f9 test1/1004 0
-644d870975f2550370768fd9d32c046a14aec8fbf97b608da1d64f0631d6f3d7 test1/1005 0
-cfea72d8c858b37aeb3be45719b107f09a58eeca0064664c478c36bacbeecfa1 test1/1006 0
-dabe77ee10fb4a23d6bd0d36a4d4687d811f7a7cb981ab30f885d20e58f37c2c test1/1007 0
-8c84f7553f3d517852b4e91de89de194e6ce0a9b465d19e127f8090def7f44d5 test1/1008 0
-1eefe47c568624a6c0fb293d50de9bb6d8e169d32aae3e4eb729bb400017ad49 test1/1009 0
-b89bff2ba399297ab594ffdb32cc7543a843c18f390fb8104cf0c750eaf7df33 test1/1010 0
-7f35fc4f10acd3bea75f17707723b69fe756a5ffd74e48f374cc7b0365e6d736 test1/1011 0
-ec1b9243b62f653d83daf3ef8c3db0bb28be5ca6848c7aa9989c35f677221f32 test1/1012 0
-dee826290600a55996c3f672a9b4bf9178538f24244883e420d39885f2ba549d test1/1013 0
-94bd2d6bda44d7bb29ef55e496b75c68faa0fec3d2224b98514cb862933b8d7b test1/1014 0
-350fcbbdc351f7e75854c350212095e618d50b94236353440009e2d4e4f21aa0 test1/1015 0
-39d8a57630df7bfb031c13093b1cdb6abf7281b53c6df54b15d3c1928a427199 test1/1016 0
-a425cd2b4a74967c677fc9aee0a68c20bae73401bbea685174295315debed56b test1/1017 0
-3f075217a562d86abe3b53dff94e09e6b0c5ca6e76f8697e7812aefdb127092a test1/1018 0
-30a37d84527467f12685f2deab37010a85ca6e2368d8d52c7781ced2b5d12138 test1/1019 0
-2e3b67e52111e15c61a32bfb49d425116014741452c1cb86621c7e6fdff662c4 test1/1020 0
-711a7118646c11eaeb5fde1b0daf72e7391ade404e12dc0d38d0ad572faafd10 test1/1021 0
-ccc80c7f328bbb992d5b349490ebcee0c756beb477535971d0310cf9802fc573 test1/1022 0
-722cbf25dd50ae693534f6b76e5c52b72cbe1abdb7e817f2b0bb10bcdb4976f9 test1/1023 0
-5efae2362ee75bc500a9970296b6b66dcbcf69b457d4df9e5c8509cff9a592d1 test1/1024 0
-1731cf651d88f5e1f59cff2ca103371389225955ca96e363b842ffa3b372245e test1/1025 0
-4b1055c1bb421e5235d86f430741446d91e243d6a2f386a3699e9ebe12577278 test1/1026 0
-aba5c34af60c02028119deef9e44db99411bcb5b542722e91377827c910781b3 test1/1027 0
-8fc681e41878f1588720b713a2a03da0f6234c7ea19e69067a30a97429bdc0c0 test1/1028 0
-30ca2234bc002c28deafcc8d68efcc9d7ed57043c7e7f4257aaf6dd4747da5ce test1/1029 0
-dde405d58316b1dd09b5a2fe1da6d5de7de4d2aedf0a90a5c0fd4356b4b4f1cd test1/1030 0
-cb6d6b7643ee8085b80edd001eb9ac7c735efe5fdc335063293f34c7811a370e test1/1031 0
-704ee88b017ec614e9c3d3486bb699d24d299f9a82bb887ff1e61e0bfb449cdc test1/1032 0
-b3334fcb422342e911e0cabb283712dfb58cd53414ad1e544ef2747773e82356 test1/1033 0
-211fd845880f913002dfbf18700d60d1736145b29631e7b789530e54971f1ce6 test1/1034 0
-86677149918462ebed4c4592d09e803709306082c5ef92bf0e99cbc17c541aef test1/1035 0
-595eaaca9cc6346bdb8ebf11325af7eec847f772a344e57d5adc1ef540f1b865 test1/1036 0
-578e7835dd90a1cf1ee92b0f37c590a3343712e3ce7452afa7f966d05e124a8b test1/1037 0
-15cfe5108ce418a8485509674548265684152a6101cc09715923ed8216bcce47 test1/1038 0
-aaa4efde9bda5a0573699751a90891dbb39fc0bdd38225326b1090ed0cf7e0cb test1/1039 0
-c0bf11c82256e46e1a38b0dd2abb16c4e7c4dee34cd7bba4e089180e4c5c0a02 test1/1040 0
-06f7c72b209f0f1d275b5ffa47c31f509f488ab464ecea1ee47a2a5da81f504f test1/1041 0
-56bc351cf244f365e45adc5df7663bfe0fed8146d3a52bea2741630c0cd46819 test1/1042 0
-391fce6144e13745ff5d17b2be5c6e06174143a68ff2a48fbca1cb338d9ef676 test1/1043 0
-78280eb92b5594d2248339b76d910badb43697605dd82655e14b61165203341e test1/1044 0
-3bd6232f0a401aac5b633bdc53cb15d52fc5ce66223f1b5ed139f858b3e1f0e1 test1/1045 0
-77e94c29ed3efd3af87d60d176d4e5ab74eabbb70f8f6b4d1de02306bbe9ffd9 test1/1046 0
-8ddec863715441c1b8d8f160fcd29649638d8d1233a23483a768f4790713c211 test1/1047 0
-b7546707c8ee33d95a2955407d230bc72a74506e0476fe765ade4dbaaa45307b test1/1048 0
-482b47db3aab28436dbfd585fae94fc89d98aa711661424eb25849c720b1b03f test1/1049 0
-4a9b613a3af3286cb10c80e815aeca37a884f67aff502730d2b68eab55f86391 test1/1050 0
-fd8f7047f52b1bf25d132750a30a98b901c0b6c529b23f7f16bd463187b24eb6 test1/1051 0
-76b70dd53adb6aebae017cd510898dea2be2d023a11acc8f9c213ba2fe9960ab test1/1052 0
-c593f7e086810a50e4acf185236793791316fbdfbeb1481f40386ca427ec59ac test1/1053 0
-365632237ecd36a6de395381f7cf6d352dbdb08874ab67d00e6b316d4caf0110 test1/1054 0
-04eff89737818952d7bfd08387bb84a7a4234b4aff3df4e23dea42ebe10863b8 test1/1055 0
-9fcbc46e63fc212d353a010689864d423890bcf0ac7da6a06234311ea729daf1 test1/1056 0
-87b15617b28b815bbcd83de86ce89af83becf5f9eae94b1118ae541ffb6b4b87 test1/1057 0
-cbcf88355ccf79fd59cf6d97a3e9661e2062f1f1a86026850e55900311a709fe test1/1058 0
-185a2ef5b5abc6fedae431bee445607b6a606cd5291e17fa6105742dc921a2a7 test1/1059 0
-02959f2ef4e6274a821481eba4dd5e3bececb11eaa9fcd2efc560623ba5a20e1 test1/1060 0
-8161679219bb92b90b6afae872aff39e672b889c8bfb355c16005e95ee1c50ee test1/1061 0
-bf431025cfed599b18e5490c996c909ad51d5266630b4398f42a773a96908313 test1/1062 0
-715ddfd7d925a6c5da6c8a969ef96bdc7f32f531be9d06b4a9a67144fb9d2cb3 test1/1063 0
-ecd1c2fec0f2f8c185c89543812b94ea2a985b6c57348aa4f31cf9659a5fd2d4 test1/1064 0
-8828aea0e43d9d7876cdd0d93599ae80bd4bdc9d6972ab1bec76d51b01604e8f test1/1065 0
-fd868d64851d1523ec66527e075416d077e2af588bf4f5770c8bbf7ca02523a2 test1/1066 0
-9ab5851c6f071c57633f48fe21f6121037e3d8642003ef7aad696710f0971097 test1/1067 0
-3324b31b12fea37e560fa98789ed1f4853bdeaac3aefcd1fa954f6645323f53f test1/1068 0
-67fe99c3890c9fe3bb7634ea087321c2ac6e6a9172bff6135db40ee4bd154d96 test1/1069 0
-614710c834c908668749aba41ccab5e3455925baba7f8ba73c645e1ba78fada3 test1/1070 0
-695f8868be3b324fa9278610d7ba0e96bd1f6be808fd285b7e6caae2614aa035 test1/1071 0
-562152e12028476e6b1a394e347d7f4ebe0df934acbc317f08811655e1352b6b test1/1072 0
-e247efd9d6dde20883ee3a6596a11b2267e9fabda290fab92473c24f589373d8 test1/1073 0
-cc9cd26962d87d773b58b16b02a6dbbfb6a98f5efee33ae2147565352db65246 test1/1074 0
-6fd974b740949d19b356d4b84638b3c025e82f7a3484a85eccf30e981f2b8166 test1/1075 0
-a2bfb68bedcbef46ef119e3a99ad1279c5d3c2f7debaaf362090b27e04789d23 test1/1076 0
-cb3d1926cbc204266af7c655e41fc26cbe7adc1cdc20a9af184641d49f27c2e9 test1/1077 0
-30a38efc513515d14c5242cd39bf53f1a6135c8f2c284df058386d461e9f6ee4 test1/1078 0
-0a20170c9124d7197559d671b197c0eec13319960fd980395e560878c0675ec5 test1/1079 0
-a4c5ff15649629dcfa7da9f87974e59f83f971aa42064ae84b187cfec2c21d1d test1/1080 0
-56b2b68c4be6af76e893ff2da07fcae0b9bd793b13c7ed8ffee6fb3568a7e1dc test1/1081 0
-0843be3a34fbf85511f20c71a0ab6548b349ec24fe784a5270d265e9b7a0489e test1/1082 0
-7f0c70fffc35d0f94b6e119ef22991bda3742149e772d1b4c5269a5d9afc2cf5 test1/1083 0
-337d1b4112cb3dbce7018e253e8130da2ed50a812c290a75b23c0acf0246f9d6 test1/1084 0
-b08bdc03bcafd6b27cccd87e822ddded6b517f924baa4a7397e3a64e936b054b test1/1085 0
-c19e19e59cac4aac7f3ecec93848398b9e13246e5c864cf85c381854c3e6d2e4 test1/1086 0
-882b807e6e9f67869998d6e0fea438d80ad9a582066357b85e1b77661d307327 test1/1087 0
-f12d1d575b218bdcf7a80ff49b15235efc855610ad0391f2f3edcf67bc447c1d test1/1088 0
-edeb8cccec09aed5203bb1e330ef849ec36de4f64faa5d78aaef05c508e9eda6 test1/1089 0
-4937c4708f6b45eb4d04d286250521036fe6f3b14f253a7ddd22a79b2d458669 test1/1090 0
-250c8e78ebb647faab24fa91964bfebfcd0e3be4cef50075492b6c8e8477477d test1/1091 0
-2a20f6dc13988681056c2d4c31bbccea0b76efcaac11157ed21a454c8e7ff5b3 test1/1092 0
-406383af1c5f3dd765b3fa82e3a045dbcdd01fcf23503fda8b8efb77cacedeee test1/1093 0
-5e4523967784b470f0ac0308e42b9434e657e4e17abec989cd87f8f1e61edfa1 test1/1094 0
-269039d7ebacac02e67fb5f1e9f241505956fcf3595166563476e9714c65a297 test1/1095 0
-4a829e9edc7db10934b4bd3f346505c8bb7255a53c5a6a86ec9cd7aacbf63276 test1/1096 0
-28471d06f30c728fff0c25d2e2e79aa451dd44aa187709c6d404123bd6693b9b test1/1097 0
-33a7f3a751634f16f3d816a6084455c3ce78678993ecc380e6596dc77728a5c2 test1/1098 0
-260a020a47ab118f4c1d8add8655af76effd6f990273063fcaf11c22a9fe96bf test1/1099 0
-8477ee48e08ef8c6d042729013c9170e90cf42727a31cf4a70eb82cc5a0889a3 test1/1100 0
-95f6e0f118bec3615dc09207786e9cd74fbf0cce92b61085a3573df189b5dc70 test1/1101 0
-ece1241839bf05aad4638b8828fb091f5b228330de06b6abbd2bd6dd114359b7 test1/1102 0
-ea21ec02d8d4529967d44d66e020b652c12401f528fbad3226909862d6fb1d51 test1/1103 0
-a41d7671fd78cefac178da785ad26257a6a4b8c71a67104ae0f4d00a1ec8fe07 test1/1104 0
-9ff3675eaefeed08922c582d30ee6a66afc0a4826efd331949e0a26db4ac8723 test1/1105 0
-bc1da177898569ff73d4e7f6d41cc6b4b05c14adb561709b6a146e65396f5411 test1/1106 0
-c222ebc0103ffdc1e26d3f66f273424f1af4ea41e289ad6ccf63a4a188aa81b1 test1/1107 0
-87d27dccfb684919923bd2c324c3db4ff4c56c1d88dee4f08b1bf6f97a5cea03 test1/1108 0
-00dc51d8dafc64b4a4d29dfbfa5db825dd3cdae0b8200193259ee62ac09bda20 test1/1109 0
-65f38e24d2470cf64dfd41c9e77a1bbcf167be02afd82d53ae2b67d0d876ece8 test1/1110 0
-e5a8d2d4a043bee424aa33965dba02ce9e91e815708313da1781c1cfa4614037 test1/1111 0
-d19790a36a1cb7b9c06e8d80ee0f8d4abfd9b88cd64bc67bc9af566c25bbfcaf test1/1112 0
-7781a25192a77c68bdf07a5e515d8c5f4386d8518623eb8f44caea3e4945057f test1/1113 0
-616a1408f69c85dda3f909c43fcae911c72455adf097b6a7f4b889dd3bb96a04 test1/1114 0
-61728a111e00940c36bee71f4706fd71d2a56ecc8aaeeed00a9e07d5b03d55d3 test1/1115 0
-f1cea93ac181efabf8d8c683ebf16693d0077407e2299b302f750acdd9bbcab4 test1/1116 0
-235f62e3a2db9b3729dab346492e666022bdbace878ecb9bd47217d7bfe7a1af test1/1117 0
-9501b06abce156940e346e44f000295e01984fc10859f9b0919409af7b220afa test1/1118 0
-f762556c82b449fcf4b25c11e7497166500e6fc3ec333352cb8b5dd198f088fc test1/1119 0
-727c9f8eb5047afa2e57d8090abb39dc0048f6f7a94ad4bc5142ac1ec256d948 test1/1120 0
-acb050484d3d33b69c3416fb3a86d4fab68cb72e2ba81661a4bb3439c3057f37 test1/1121 0
-803080c34d1f8ce7d16bd8d5cc7a131c027b6424d171547e538811c1bcc5f6c0 test1/1122 0
-8c3f9eb0a4df8972ae8b4612b70826293040b0e9e6526606847957e7439f1579 test1/1123 0
-a2f132da7a7285403eed6a814c2914a2066a69404e7e8b3e5bc7fee8f1586d48 test1/1124 0
-528aa043de9d6509c1734bca3f571e7c5662fe487057f99937909c86bac73072 test1/1125 0
-92d83c2ff4481c86d6333679e50d2f187af9266027ffaa55348095e189b2b7ca test1/1126 0
-872f94bde14a5cfa7ba3e97bf0de08570814e515534564b4b26b9ea117755ce8 test1/1127 0
-88e7b1b48e6d8b94317853402b45ce4de9fa6ca2ed1781e484f8f7c7a503426e test1/1128 0
-abdeaafb8d1366e70211687a99e77965181e95931f26c68adcf9b49d05dec92b test1/1129 0
-7f5111868a769cb8d33eaa991f82cbb696a1bf603f866d4d49f2d61154fd7724 test1/1130 0
-fcd3e869a8e54a6a0ab27dfedec044788f057ae8dbb99edb620242cf8bdc4fe5 test1/1131 0
-75fcf5cbda74d484039c58d1cf83faf0d466acc54b5335409eb245d3120831c5 test1/1132 0
-2089e371afd8cff90e44f4c8bf0f04f24cbf792cf2904c85801870066e4769d1 test1/1133 0
-0be03680bb3529431b8e03f4ad3d112017942ceee73127dc2125089e31f6b9a2 test1/1134 0
-d32441e746a43f5400a04337e276fd23cf46e6feccdfc5b929ac6744257132ce test1/1135 0
-bb6116d44c58ee4ba03e2bd322868c1697189e8761d1bfee08effa1be4d7098b test1/1136 0
-bde5d0ebd82cb750148208f7db310c603a5d36518058d814c527fa514daff8ae test1/1137 0
-5bb1d371caa448a52e8ec58b7810e8cb5ff71d823db8aa9ce958018e9d24f63a test1/1138 0
-5e907f5e871c704a885c4e1df2ab5ef00704eed1e04a3d661ddfd6a7d6838cd7 test1/1139 0
-514e0013983b74ca6dd20e0bab7c30f337ae8dc4fdf6afded3ff82265881b59b test1/1140 0
-c94e6b3dc51da04cad4d4de98641f796168d2e1062836fa333f45ad79c8ca85b test1/1141 0
-d0c94d509054fcff1bd2288ad360d45aca946d06242245ca50b5ded66f763319 test1/1142 0
-0d464b3ef0322e9b966c97f4f713b19af1c86ee055d7231660a41c244b1e54dd test1/1143 0
-82d19214ac90695bb0618a30996424806b4b5596508534aaaf0a55f346da52d9 test1/1144 0
-3db339491d83c9468101d2b628c59c295f0d1a5734325999b090eee91dc13438 test1/1145 0
-e3aa3564d47471f083b948d65781ead5a820b708a0e43792eb9ffc2d55bebdc5 test1/1146 0
-3d49f22fbadedc85eebbb8a817e2a204b39a43d8dbe54100c06b1b57061c88d6 test1/1147 0
-c27cf204d5f1e99d1c1d1ea883ab36bce4d586e9a050af23bfde7cd7d67c4162 test1/1148 0
-a5c014c4aa93d89ce33c6bcbf53a6b709b8022297234f95f9a3883c8a69b3854 test1/1149 0
-490961a48a31fbf6bde0338363e9a4be93c08dd5fc7b14a76d94dbece1855947 test1/1150 0
-332241c53114737ec978f25f17b49e510aea6de0c73da709ced85a2f4877d007 test1/1151 0
-64c8bc36d57ab97eb649d2a7dedca286889894bda8c81aa290e8b302188af00a test1/1152 0
-f1d9a2701f4bd0b75aeae65853754a1c93481881e42defd08fe0f92610955de6 test1/1153 0
-12fd81791429a4403588be0096b2cc8fc9f66c405b0e9af761169cb239858387 test1/1154 0
-0000b876f6a999528ab835c287f6e7617c267b435a7c031dce37d2af506b5a44 test1/1155 0
-6a4d7e65973728c89a0d40c72b58d1b6704d60fe017ab6b529ae9197e50d879a test1/1156 0
-f270c1a1848d291dc2f326e82d0082df70a5a31ac958b2dc7a10d641f66fa69a test1/1157 0
-e8c5348b510593c74658122b5c1d59bd404855d194a29ba789839476e8015119 test1/1158 0
-3be577e1bbc920e0396150fe6bc619a5ded0183fb153746ad793e76e1da9dd7c test1/1159 0
-2b66ffd9232061af92112317cc6f977b07bb2595c3cffdf5ba7cf29eb51dbd73 test1/1160 0
-de93644bbb8148cc75c32c9c8f0cba2616ec6d8b3138b4210e9109ab7e8a4f9d test1/1161 0
-3cb424e7577b18e7e8c6412e3a80076edd773b226b16da25ad14ec554a5c4029 test1/1162 0
-0f357c163debf6ec4496747a71e6617cee0e07d8c3f7b6fa346da96e88b3406d test1/1163 0
-ca89b2c09360104ac71dea16e541eedb63d03152b4b273c2d9ca3e74adee53d5 test1/1164 0
-7064c546c401b42e7a6ebdb776698ca51d10688a21e8eb7d5e5201460316d6c3 test1/1165 0
-ec081d1e826dd0198d7c690fc8b303043ba7ec16c8ab92d07d134b64380ff68c test1/1166 0
-b33f566881a776828bc7e0a3b0dc5eeed5081521b49d4994eb243b2df020f8b0 test1/1167 0
-521c8c26b2b71c45d1b5c928b1bb5999cbfe2c8aeb13109566b81e44578f63ac test1/1168 0
-d197042cc4715bec0105a26479d1267af3f40dc20ee36e48edc8f5d703bdc6a4 test1/1169 0
-ba9df39167bcc9814db2d1144d803b1b0cb77060bcbf2544b8ca6256a6ad1370 test1/1170 0
-3df248efcd0cb3189c40bceb388fd56e6ac25bd78f59b1f52f3f81ff325d493e test1/1171 0
-e3690e40f0482dc5f86ca841e23eb021014c668f48826939a9cf7d5dc8daf054 test1/1172 0
-224b77ae9ea08cf991ccf7126050e11dbe0cfcea1b1422b14a6ead19eac51ba5 test1/1173 0
-daab81e659a24a90276fa1d7b0adbbb3bf7c47a6b5294e638edfd5ef3be5c795 test1/1174 0
-ef6ec5ccdd07cec1dc8bd4a105439fd1ae54d2a5b6ba7407be3d85f91112ac04 test1/1175 0
-aaebcb46a3a9829b6d886c4c161bf22ff72d359264983ecb8fb9de79a0310ea4 test1/1176 0
-955ae1bf1030e828afc363cd6585992ded8c99bc932019e5e13a81cfb54e3b7d test1/1177 0
-e5e8a30b250306d0ddcf72c3826aed0573c506dbe69249b085011f5bb040bf46 test1/1178 0
-31a0ae718df395bc131370ce4576fb8ad6a7569b3e2d132c63b850d7991d5f88 test1/1179 0
-286bf8c355d462fd7811296beced6ac30bf457cbce1a196fc53d05d7fde9596a test1/1180 0
-881f6292cb5a6e29c72a4524d71bf5d49f75ff90fa8812105821d720a71c2b5d test1/1181 0
-a16d7f8f848fffbc5de8a916d6379a35db2e5ba81296f8a3ec641e7816514c86 test1/1182 0
-966e4b669a2a1b761a41ec787ead394bfddf6d8e57024cb7c1fb538293f64b3a test1/1183 0
-0309f63632b182d51623905088c020da5296a52ee8f81cd1218204d960f7fdb8 test1/1184 0
-ef96d7460c8ba3178ba55b1a199a45ccf4729ac172f8cabe956ed2e19bd6f8f7 test1/1185 0
-ac300399b42775d56bbb26b5e28cdefa3bc5ac67754afb6dd0bfa5c959203dfa test1/1186 0
-144620c2de89cbb22aaff1c2c2e7aa62eda90c32e50c0aa6a0e293af41ac7bba test1/1187 0
-414a25ca4e9b6996c8168d48f34e39f8cc891297f43b24872e2932188ac24a25 test1/1188 0
-efb14020c94e4bc59a303401ed1928a35db381ea9d429bac5218a7b7da3b48f7 test1/1189 0
-be39846fd644423a64f5c822f0d4f55e125fe8d93e1fd202f7ffd83e3f38ef99 test1/1190 0
-669d0f82df0701cbe9474378dca273ce02c82f48179c86ec0f452dae6f6198de test1/1191 0
-e9d93ab7c4ebe2e246398c4bcb78a913fb9759add79b4e04c484866a384a30db test1/1192 0
-20d6377d2928c56ce356d7e7f28e5f9672c5a8bdb01d17c29e553211fc9b1134 test1/1193 0
-1389cc029dffacf76851f9a11937db4e21261fa3881a0d5c5c2562feeaf416f0 test1/1194 0
-092f78a33e30d85a3acbdb0bccf769d9ec0bf0c4b4921384140e5f620424c86b test1/1195 0
-ba72ba689cccd010e100be69387111f54255864c2752f550b137e6473c98204b test1/1196 0
-245194c70e73a239d9bb6ab7ed2c956cceeb5a6fc353946c461aea9b61f8b06c test1/1197 0
-80b2c2364a683b3dadc85e39405b05d35917544f026f3383671e823708a6714c test1/1198 0
-eff1c7bed4e6ed556095c9171049bc62803f363e21554fef2ad0989adfc96d27 test1/1199 0
-de12f658fdb0cf214aa241a34fde17f9a1a2c2e428e7b26497ed69d4fed552d6 test1/1200 0
-1dcc6c1994f610d2db4a7aa468dfa23c9a5db60680775a57a951c89ed8c4bd9a test1/1201 0
-fbf76fb27fc5e3127e8ffe5bc2329c7b605783e8ef0b60b1892918ec393a932b test1/1202 0
-140101494f011376774826a381ee669fa7273bee69f218d634b900750441c84a test1/1203 0
-fd3782a5060d76cc34c2c799847b3308782b0135ff27d796e8ab62d145c35864 test1/1204 0
-312c3fefc93e62804fbf17f0cde77ca4c2a6e7703d67767c9c74c8a0b67c2ffd test1/1205 0
-c8dc80b5d19370dc0460eebbaccb5f7e75cdd50e1f42a6489bee6f4276d5ff62 test1/1206 0
-7e3ec09e47a320f4c17e10de379255bfce0782dd788f1bed4b36abeef9ac6a45 test1/1207 0
-65d16f05ac77d41b2298e733d759fc21678d8df319b31a2dff129faa93c553b6 test1/1208 0
-5071cc9f22f3b60c4c3ae020021dc1ad07c26593ca48ea915a7fcbb67fa27d51 test1/1209 0
-6f15da36ed4fafcbf6ff95d47a6b14ebd947f9fcaf9bdb32d502db388c2de29c test1/1210 0
-e27a090051c2f30d095a772bbe44e09f4ae96c6de6614ade517b9f76ce7fb2bc test1/1211 0
-c3c9fc4dcc1848b1e860c18343d6cbd1d03d5bad4bee9f580321a907945baf7d test1/1212 0
-bb8fc6d869959cfc53b6808c76312b3cee3d3c66e50ed238515156d06a0c2134 test1/1213 0
-c13df81d0f1fd5c4679842ecf030572df880e961fe7102a58f323e5b1c162d0b test1/1214 0
-7553d55908f9ff460b2acabc54da619d2007dd490abc42f47e8d7f2757646ff4 test1/1215 0
-702e28ddac74bdc7c048dfc620c5e7d7c71bfb23b10bed8cf8d2122517d0b0c3 test1/1216 0
-078401296157da2b10e674cfc0e1f98ba3feaa5e1ba191ae9218b6ee5113b068 test1/1217 0
-944389a6643bc2357cf27ddb883dad678c77476751f18876997ba4b3a4e7d8d1 test1/1218 0
-5545088d2f1d9c5c8ab32793bf2ff148eb967e816384628093271f85e423cb19 test1/1219 0
-d475b39e44d8fe2aed222c2dc20f058849b566892e102e7623eac3dda1492359 test1/1220 0
-dd926c73d76f2143693360abddf82ee5d47abbeaa13bba92870ba84b23ccc106 test1/1221 0
-b9a0105f25a3087bdd4e432b03d3daae6d39c39b2b092756685470a55b89f002 test1/1222 0
-6d3b501dc1f5b6ff5c9786b3f01ad782ef8c3448403e745b380c7ac6170f5c93 test1/1223 0
-0c743b3af8744dd9a524bcc08027593d94e7cbea37fcca01dded10623a2f50e9 test1/1224 0
-a0d58c34e634441df1f1c3552844667ddf2dc76cc3aef8f22ed6aa9c37e3f725 test1/1225 0
-83ad58edaa79c19939a4714980726ceb79d68d9c52d497cca1b597e19b57da93 test1/1226 0
-cfd8ffa0f11e60e7bec0799136faf77741af92b65936f84e9790982b6f29a8e3 test1/1227 0
-f4fc94aa1274184cd70d26418c0d80abc3c6f058e0da5c2a94bb9b58fc59aa27 test1/1228 0
-546fb5e87ab623d4c980ae36e685a5246a57ea1d48c3688e7ea7544f1c562c82 test1/1229 0
-683dda45efc77fc3f9dd70669a4d0adf31d7b4d543d6e236ccdc68568b17b87c test1/1230 0
-e064a4bca34ec02f19724d14107ceecc92c16497600d83a088dd1c5e0e450c96 test1/1231 0
-588666122321c6e4fabd7bca928a77eb38a2771cce0c83b00b578ddd62b23aaf test1/1232 0
-b62be0fafcabb3141ca55cff8fbdb0c75c8819f666caedde14b64b3a7b41a648 test1/1233 0
-f38ad96df4c17d8fb5e79ae99761efc7df6e252ddda06412d4cf84e5fdc1e893 test1/1234 0
-e9819a6d908610c8ac699d31cff53cd42ed8c2a17e5b109b5cf2950146364f51 test1/1235 0
-c51a2b4faef1187152fc0894f667e22be8ee479ac99d0778e704b515b8764c1c test1/1236 0
-12439e607a61e581f571678c0e9f04088083088192f4e703abb22d5308cdf0dd test1/1237 0
-b34bec8123037166930541d5f466df7b6e27e2c6c98ae954e92415626c66389c test1/1238 0
-5d34a476f2ba8b95651aa2c5b713271d213a6016c270f6b65e8f68b2c82bda37 test1/1239 0
-688a4fb38900f3a238a2f3f0be4d972bc0b1126ece302fcc5c2f28455a4d6d9b test1/1240 0
-ca5da3989bcab4db6ce8f1c95cf636d2d8fa5671d31f76eb7f163241f52c142c test1/1241 0
-c14071715cf63947d14eaaa931d6d9c130d83c4ec4d8d65a0223caff562f4db8 test1/1242 0
-819c7d15ffd75c826d095935959b21bcf78354961b0df0225be653f4ff6cf1f4 test1/1243 0
-229e10125f2e6559b9bc93d4f3cd2bc8e4c673bacc63df7a1e2c181db75dd10c test1/1244 0
-2b7bddf44b266e1d6b19c63c14bf629dafc0f2bc1716f76cba5256efbaf69558 test1/1245 0
-d595015cc6a1047122427d3a53167fa6c17a5422a742621e190b2666016782eb test1/1246 0
-bea09fbee51477acdd11b63a65d5e237bb04633b31b25f32867a85fdf4eaef5e test1/1247 0
-e24a01640f219dfe1969588055c756adc775d43b316160c7fe45feb721fda270 test1/1248 0
-4491a2c6ec2f5aca8dd3913a81d3fa2cbe95f358f2df34a16e790d472cc0a254 test1/1249 0
-52de62c21375b4e812479442ef91c17d09f9b59a42aa724ac22a9ec0a1b8c963 test1/1250 0
-be035c09f05b05e3300cfe472832d70e50606797590e872d2a3c251eee7ba6a9 test1/1251 0
-275b91a0e2ec57c88b4b3704596fe0c358557645855caf0825b9e3d853fee8e1 test1/1252 0
-07ba0687ccf118d12f7d68bd152ec1163dc3aa8207cb755bbe98507d931ccfc4 test1/1253 0
-8b708a7450eb884eabcafbf9750e1e79d005288c4344876c2b6f3d2128c959ad test1/1254 0
-aa924a41bcf7b2b17d82e3fb0f22cb7ae949be44141209b52c3e81f0aa70aea4 test1/1255 0
-f63a51d5a3445b0f5cbf287e870bc74b21d05892d972eca80c4f29a840a969b1 test1/1256 0
-43d00c2fbda0d316048e7fa3682263824ebbeb3ea813022e9ba07cf6f6aafada test1/1257 0
-86daf9761622de8e36eb0d09ed57cb0745679e957df5824af251b1ff2c393402 test1/1258 0
-aef60ea51133ddbdff04c724ec6ef55fcee96e8736b6aa664aabfee01a54b3c8 test1/1259 0
-49abf7194fb12bb1e17e8345a26cc8152e93fe8f449324406d7bce02ea21eacd test1/1260 0
-32925f10aa8bd580808534d36fcae9ef260e1c05139826ec1274c44f056a4ea8 test1/1261 0
-13b81e520e987a56ca35f7065af83f7333a33451cf94ab7747bcefb66a065628 test1/1262 0
-264f33fdd8204005ea60887ee7d7ec8218629878d15b9d17ff4960dccfe64168 test1/1263 0
-6441300db19ba7589dc4eb2eedbccd57a7a4bca0784fd010f144c6c6d29aa85a test1/1264 0
-01c5f35db1c9931bfd5c9de66a4098992c0538c56a15783a7c345e5ce6a99df9 test1/1265 0
-f255306eaeaa308d58002150517f13739a3a855b615dfe685ca294a8adb1f6fa test1/1266 0
-dd806b512e1431187c2dc4f5a991b32a51795e3651e2c91246a5ffdb92981a9e test1/1267 0
-8a28958c001c48920259f419b87b6743caf73fe869422b84018a30406d2eab59 test1/1268 0
-e968c31852e8155b0f94b09629cdb295b882f692960664e4ab63ab5433bd01f6 test1/1269 0
-0d7594024b26066ec3555ce89b8bbbe0ecf572a67e40c719d60afef077d44e73 test1/1270 0
-1ed29d030d82a399af3c882367b303e3c8d59ea599a495a27151369880a7cbda test1/1271 0
-7aff1f30885b6312b5aa49f0db1cf5eba8ed8e0a5611c142b4078ca5c0126d13 test1/1272 0
-21be1d718c07e8667b937c4e2b60d3eed7b70aee6d31c2c6c0fd293efc3c20e9 test1/1273 0
-5209200aaf856f333dcd9377540441ddc0f26b246a863d56ac01ee3e6d310575 test1/1274 0
-eb86a13d3aabc8c7a7dfb27fd9d1eca1df6f7f8f8ee1d63cbbd7ee9fe326305a test1/1275 0
-a2db91d4ca9d416df2f96a8c51c9ff969b7644cc5c8451843d8a8865fae227b9 test1/1276 0
-b7c88723adbbdfb07e3aec5513954f92e18ac02596f054fdbee5369517c8969e test1/1277 0
-8fef27f6bd3f70bca924f4492e94ba85f7ffecf2d9433129960564ae6a84e168 test1/1278 0
-3bc98fd29f8b39bcb695595285df47c9a9c3b07efea61d87ff264e80d5cb1c2e test1/1279 0
-3511c7330002a3ef2031c8439686fc616f594c15469415582590cdf6e75f2a6a test1/1280 0
-bf9e7fc1c4102f9b495617250011b607e8acb22cb61aa981152a026d8d8ce114 test1/1281 0
-7936b3f32a4b769e17554ca751f3d8744ea4a96d57ea37660fe8686c4cb1d25e test1/1282 0
-35694961b327eb87eb958ab67137603032b633a8fa0776df343dfa81cd538611 test1/1283 0
-26ee638a967f9563592b8a055b20649665aabdde81ff62ded1eaf7250b764c66 test1/1284 0
-d0000e3ddf04197cd5b3324f05d002198eb62100cb2b0eadd2d20615cbc225ae test1/1285 0
-f7b1459e0b49789743be08057056910e39824966cb912789abcfab35688bb8cf test1/1286 0
-3de1d4ef7a87c2e79a7dc5e10deeed3c807f60812f179dca38955f5977585281 test1/1287 0
-b1b95b4cd7915e17540202ce4fe9d31dd49b9fb156b2277f33b262630bda7a1e test1/1288 0
-1a25600e0ce85db83f4bd416b40ec1f0d9ae89b7dc968fa149e4f436879fd4d7 test1/1289 0
-15177b5a4870e076d79e5fae1b00b2852b5e79509cbc5efd3856d9d368ae5039 test1/1290 0
-6f6a740c5c0e69ba5a8c46685bb7c31133c9d766540fa6c43ee2d1afd868a4ee test1/1291 0
-819912a0380344045aac26c30e4bec24b7a97e28ac90acfa1f42f0344891bb19 test1/1292 0
-33587a7eddda06804dd8b14791ca47f9add580a242f3eef550c95f5b449995eb test1/1293 0
-3949f91975fea3acf8cc4478a86536e28a98427e1ad343558108870e1b34c51f test1/1294 0
-9ad89e4ac046f8fa9efb159ed780f1545f02d4049f747817015f380163a5cf01 test1/1295 0
-212f514435444f4f3caa9b9da46f6beb5f2f45c4f37bbeb3c78b393a5ef57f97 test1/1296 0
-13a260ab81211339de1c35fa20edc905771f93668b636c0b8ad0a2419bf0b65c test1/1297 0
-ce73829e804ef5c80e54e6a646ec11548371bd3e3cead6566a52c748aab90050 test1/1298 0
-ec459c405fe427a9b6b14b9b41947d61bc9109cb5800025d1c94d82b9b379306 test1/1299 0
-8e71d97c2903a622bb613523d99a12d6c3f98e9356f3a632b6ee97dbd7f898fd test1/1300 0
-741a5fb21dfac65c00d77d5f789614fd2c8b9b4f5c004ef3fd431cbf3ce2add9 test1/1301 0
-aff08950faeb1abc747dac1ff3e4ee519aa438f1962590122d8249f744e057a6 test1/1302 0
-557bf8aa121a5aa7cd62ef42df5d757f92329271a2444747e566dedf5bafb41f test1/1303 0
-d32574ece36d199669b069e01a932ea335983c5dcba0e613b29098f8a396681b test1/1304 0
-e83b17d19463a0d59bee2146b4877912dd5dec4aab7027559979548683cb60a8 test1/1305 0
-9d3d077d5eac3930cd62083a1a63468db25bb96748c3926bc8d81b9aef1fe83b test1/1306 0
-4c61d712d0827ccabf61cb8f4f3db3d2ba657a31c9dc5e6a660199bfd3faee6f test1/1307 0
-8cb553f9d84d1105181101eadd56a1f0feec27ef33a10cd7dc82852a2c72efb5 test1/1308 0
-70f5df24ec8120d34a11b7e9d66b5ced78298ab767da9deec9ea6224cd7e2f07 test1/1309 0
-99ccc170473c23c968f031cb630cd57f36823807ef46fd338c19ca785ab0677b test1/1310 0
-1886b5bf375343a92073f0a345e1415851e9e8d8cc43e2ebccdcb0caa7a19892 test1/1311 0
-9526ac73bef9376e5cb566bc02508f67da34342c24d8e75ef1080e009092639f test1/1312 0
-709a7085e3de6e86fb2d0648d56beba1bae715bf4e95e9dc659c8ebcc9e3a4ad test1/1313 0
-f0990b4db699b292e36e390172c9307602f2a49f40ebd695ae6251a58cd91023 test1/1314 0
-bcc2cbfb4e6867f805b79017421bb502ad53e5e9f7b8d0457e2247c7928993f2 test1/1315 0
-3254beee2c782aea5478976750fda914f38402a544c37d3122d460b0cd7c2fc7 test1/1316 0
-5463c52d17da05d80201247921b5cc76b80daef82e1b344125f4ef7add2074dd test1/1317 0
-4d8f49146bfb65b5a7ef465e1b2e15cc419d6aa3266949959a53b5fbcc9c0ec0 test1/1318 0
-bb9440d9b35796c3b63446dd9676a6748d24b9b389782f5b7b477797e684c0d9 test1/1319 0
-b7acec529401ac97b585870e9d22bc023c4aab8ac0ee8c0bd33e3b9901340fe5 test1/1320 0
-b28e995837407eef24051952bda07fd6540f27bdcfb52d865b07fe39809b4286 test1/1321 0
-5c432ddc0dd2bcf0740f9d4feea73e145b81150838fa3230dd0d5536ff9afb90 test1/1322 0
-ee3e2b01635f2f59db91b5ede66909a00c6462a2e85cdc25fa80a6e3301ba6e9 test1/1323 0
-d6cb9e1d4343c3b9566a3f74eee2f421d05460f68e4ac9c9d9bef1dd06da8315 test1/1324 0
-ab3c6d74748ef7e05505c3458b943440307d61e1eb91c49b90466d3ff85e5ef3 test1/1325 0
-30caba90fce994016ad5d0e2100e346bf3c12a901cb9dadb5ef311b05301a25e test1/1326 0
-b97850f985fd5bf09a35c9bc68f93f7e5cda73e366b81407af8bc3e763f145cd test1/1327 0
-68d5462ec3673c423d4e3ad44c2df1c67f5ba283506cd35e0b3545c8811fad80 test1/1328 0
-8ec2ac087d87163f4c9730ef0ddeeca25c2be16e1575949a8943ab0b137cb0a9 test1/1329 0
-8300af681982443516e3c294ff586382dbdc5578209ada6b9a37ae604ee708ff test1/1330 0
-056ff744185c8990d99dceb604f4b7accd74a64ab986608acd0ea51fb07a7ccf test1/1331 0
-7cf0707027b7d32ba745190aac5386b1ece20625a50645044a985403bd3a8757 test1/1332 0
-ad39309f50e7cb5f511d5aeaab67e30904bc65115c77e4edf8fca1b670630c10 test1/1333 0
-0e5e21d08fdcae8548d6406fe8d1674fd3359413818de762b9131abf3e9520d0 test1/1334 0
-39893f5405f8a34f7395dbd70b673514aba535ccba624b48ee9607ba42964723 test1/1335 0
-0ad89e69433bd1434081f578735a00092954f3b4270879fd3d4f6973734d2926 test1/1336 0
-7cbabb6d82eb1fb4a6951790519ba38659bc37658f83c4e8145490fcdd3a52e9 test1/1337 0
-64b1842360401306713d667c8b3ff8156b2b6f581f83e471c2a0931271c3df36 test1/1338 0
-4b89c9d6ab74f56755b10bc241f29a60440bff13b406aebaee52856a64a0513b test1/1339 0
-71102258b7053a2bb1810b65bb2dce97cd90b98a50683bdb17fc031b81f30f1b test1/1340 0
-61b0d6a2ce19754cde973cdd110ffb86242e42bef59889c664cf1677625b1638 test1/1341 0
-4c8e3bfc0171e77f453077b947c118878c2046df22dfecb47d850d3ce9904474 test1/1342 0
-adb5dc2f4517631b1069826ab865327e16de960580a6cfb5d2ef9a9474ed2892 test1/1343 0
-6ddfb0405944666395000991cd5a1ab03e8c69f8affebd144039713324407282 test1/1344 0
-f2df108a7052ba559e5ee33050428b4e2e723777e3a8b78574fbeb8bdda612b1 test1/1345 0
-6a9ad7e52ba6c5ff1022b3b7ae1cf729b8c8f914d46a58b0e83b967db01e7054 test1/1346 0
-f3cd11e7b09b12b758d3c3f1c46292037c107ac2e5f2aada1219a8b28cf9d314 test1/1347 0
-194aebbeaeb01a07fa98fcd234540c013fb5bc7becb64fb480908363a9eb526e test1/1348 0
-c29b92a5adc1f9bac1a65e29020c652a9feade1f6bb1a682db02fa11a73f77a3 test1/1349 0
-d33ca144fcc51ffa50de417916369e63eb24f932799679adf60b91672e269662 test1/1350 0
-41d761aa4973696f285406e97856fad2b17b69ac90ce9f64589afbd1d1c49a44 test1/1351 0
-49eee93696379ba51e3a25028b5738008ff22cf5c9526793687c87f559bdfab0 test1/1352 0
-e671ab56c5fb8dd59e76ee7ffb72bd29e789eb28c229a7bcce94f76a1e9f871d test1/1353 0
-68012450415f9a6e8bb362003cb26ae714e4419c9bf2ff4a9713c72e2b6c72af test1/1354 0
-bd382be24e23fbacd9e5dbff2abf71a02dbf15fe50e8ae5e4705b0f370da1560 test1/1355 0
-8b07997cd3a1a3b1a338665a4f5e9c203152c31e78fead1182e54b9e47721b9d test1/1356 0
-6023e92f4611e210de706b52d70de327199dcefd7b95114ac0f7adefb1c0311d test1/1357 0
-175a67a76902abcaf6b389cfb4e28798c40c03dc039524c74fa96c890006e8e6 test1/1358 0
-53ac1a28c89882654c1678293c88427422b1fa42bb67f0b1682a70646ea673db test1/1359 0
-0093066aed91d1b0375af630a97fd5b2be233c8849a0b45a527f77edc1b60dda test1/1360 0
-bfeabfeb7a32c7ef2750896cdfb29d239bf44bb0698022d16c04a2ee8196d3e6 test1/1361 0
-8ad19a3dae9285fd60fc6dede702183ec31ae2ddce11c31cef5ba88a8356ca88 test1/1362 0
-6bbc3de5dc435f8a98dc81173c0b9844d71487fdcf17b4ae9b2e9b03d454ef6b test1/1363 0
-308ac99fbe409bd07066e483c67af24a5cee534cea6d19cc5de00b49f4f12660 test1/1364 0
-a70683e6120649ffe9e36e7eade004f6e39d508d9d8f96d595a4ddc6df010c66 test1/1365 0
-92340b16ca4a7adb4ea356f617aaa51c5d3ffbb058b273ed3d4848a9f2411431 test1/1366 0
-1c1473cadc97455fb059329019548f64f6a6b45e3f965fb2e80ed6ef51ce5634 test1/1367 0
-72fd7240b4e90c84f7355c8489c7f692ea5cc861248847304c2e8901d863897f test1/1368 0
-a2c25e7dc2e54fc8f0c7831538f2613f24a57ba76b7d74650d699520e27feb0d test1/1369 0
-f188ce344c17109797d50c341322bb57114a60d11571f670a94e9158c6f452ad test1/1370 0
-e9106cf056f0c23d79c7c28c8dd6eefd0095ac279045fce72723109546e008a6 test1/1371 0
-106779ed4353b7588b28d386d25af17743585a1e2bf923dd1472ceab5ed83177 test1/1372 0
-d6e037bf0758ceee14b3c37fb959b359403460ddb1628c15ae4ca3196d03af89 test1/1373 0
-3014497d7f11ba8da65e96a3252d896f951dc2e2a78c1e16a403c25841d5e697 test1/1374 0
-f5af96ad1eac71dfab626d24f7fd22cd6417c3cf1719153da0029ce6da7a3c72 test1/1375 0
-5ea67043f50168ddd4e18d17bd166e39d82b8a7f43a38f615f25e100645c1569 test1/1376 0
-e87f77d49657444971ee0b1cedf13cbb79ce80a46f2f39bfbee8d69236e3f3b8 test1/1377 0
-a4381ccdbd2e5ef4104267a35a8fce05cb31b852e6fa165b78b4d88289324442 test1/1378 0
-991e7d31ce6abbea4af2bffacbef430044fb6a7695f288e8b08a61bdb92ca688 test1/1379 0
-c2640de545855b99f2ee50ca05f009446d877971a2fe7120f3d2f08d93db9b69 test1/1380 0
-2d1c7690eddeb7aa8bbfefe9eeaab26a85336646466b7b1020a396c5ae35f8ad test1/1381 0
-f3b63246422b5593c918b95067bb6a2dd082c7d474b224975fac3c374d02e179 test1/1382 0
-74c99218ac2b6db2885ff6300bbc817b844ccc1a6ba778e3b3ed633198d1c650 test1/1383 0
-e42e43e11a4c8e51b30e9800907e310c809ce171b1f0145c0a0f4dbdc9960700 test1/1384 0
-dadce04e7b7f47a5653550b9b3630abd5807d4e48746cbe3d2c4439ad014b6a1 test1/1385 0
-9beacad5c01b755d1a1f3d4509da9187ba9c42f3c4a917f701a29b4e1a68cb8d test1/1386 0
-4e43fb427a63723167c693fb7bca7cb67fa92f92981382e578ba1e583d52e6bf test1/1387 0
-be874d2f39a5128ca4e8b664cb2139f95205daa2fe858dc6b4e8d15abbbc2e4f test1/1388 0
-bb41fef6a05095fff1f2d494575b4a96d0c9fe69c5776aa1a5bf7d25a1c28404 test1/1389 0
-cfafcecba78aea9bd84d46a3eb11154ba4e06286f1190e872aeee8bd52ca904d test1/1390 0
-a1536cff37fe0305bce9ab70b7146be280dfb09af24555d3697b9ca2bf7bf175 test1/1391 0
-4d0d8fc3a0a6f824efa2ce91648b643332f899923ffc6cbb4c1225cad8bbd2bb test1/1392 0
-60ce8ffe04a3ccb5e23f4ed2e27c098d346eb90a09211c72e52bc23a9be5aee2 test1/1393 0
-9117ed7a3abd75762c92a01bd2e6c1b19973a435704d0438c3c52e80deb8d6a9 test1/1394 0
-a2fe6e26505e3523bdde1f1931a253e1edb6254f7f7fba5e6730ec91b554e920 test1/1395 0
-6cd6f7201d63c267c790df96a60165fc7756619950651294d3dffbafec9a24fe test1/1396 0
-0ce7e82df09956ad07c3636e147a6d2775f1a2630f01866e82bc961a461be89e test1/1397 0
-9986bbef9e4f2768b7fa3028b87d93e2a7111bf96d0c736e178b211fda5d68c8 test1/1398 0
-de6133a79491d7630c45f0d682e2ea85b2630f7c35d1ca85d8c55896543911c4 test1/1399 0
-6c62420136c4c03b090665397d6119890dd23971faeda9848c6622aa62231a2c test1/1400 0
-3fc45f865933e6a4be256992bf92cbaec801b4dcade31a614a4dbef94b3f214c test1/1401 0
-87b12d352c7cbc32c956a6254c3c6a61280e4d6db286088dbf08072f1c5b90ab test1/1402 0
-2c9f8c33f0177afa87ea71caa5f86b3d1f0f2e6e60bb4a16a3c2d97afd638040 test1/1403 0
-ec7dcead057aa19900f85e8dd8e8ec4305d089bfa7c8fe377bd3b4d1ef23279a test1/1404 0
-6b04b2c1ba7cdb7b043e04afd613a37be245d5ef4c2e90da73674c4c95308d2f test1/1405 0
-7c68da7e9ae283c65abd0bae4c90aebd34c3830bf34b8278dcd677824b6c1c67 test1/1406 0
-f52ba7be6ca7c0c6f401a7839b3ec91862f8b9649c96c95c5041563b978ff682 test1/1407 0
-02dd852f6aab102930bc1048628f6dc8214b999e2a9aa60f11240ae067b9f7e8 test1/1408 0
-69c2a39d95bcd3acdfea04381347f3ee5113851297731f859da11de83915f3b6 test1/1409 0
-7050d05826970ca688b1ae43f5398c636c19f7bd4d02a998602f32bc2e57af26 test1/1410 0
-a36745fa64ff56514cec6cf07d46e4de8ba1419288563afa7ac2a90924ab178e test1/1411 0
-f5f13dcef4f99599d3178de37a49bed28551fbbe1f9f60140d292784d9698a40 test1/1412 0
-bdfb31561a448d044b5e94730cec62399a600e8324a844e9b0f6a945f2ad4acb test1/1413 0
-18e1b8bd35403166ca0ba2b1c7c6ffe9b6ac6fb4d15dfa4d6200bc0d6a21d877 test1/1414 0
-acf4216add925cf2986d7333d68ac23c47818550d9b416cfa5947f0933d000e0 test1/1415 0
-7adf5d72833be1d8e0cd31ccfb3835386082a03c881b1212ff0ce765d1f888c0 test1/1416 0
-5fd1ef32b5bba5426c30347c40cc89a2b5ad3c6b28cbef99d7424cee2df156f1 test1/1417 0
-8e69f113d8a7f58a3075ac825eefcc4e84b8837d7d97449d36bed0a3882d4e9e test1/1418 0
-8cda60d4e29a44649b1b0ddbccb5af97d65c6f82db6ae4745e75fbb452004580 test1/1419 0
-ab7737b30ee65b6169b52e7a629deb922cc9593fbaecafcd210bbd408d20b41a test1/1420 0
-281bcfebc5b1055f98fea03905ba5b21b8e9c8b6f50443adc1e2c7ac30f832b4 test1/1421 0
-11555062f14686d17c4d4cb1d290a1700b6863b417722fcdaaa475eceb297e88 test1/1422 0
-1163d22e6b1a6c396dadfbbfdcc5ff50a194a2e6309e59c70e5367597fec8e9a test1/1423 0
-14e7f662b761e16d9d0e0ce306bd3e6b52198382fa7e376ed5f65dcd70eaf165 test1/1424 0
-456c635868a682cc473af5d24d1adc958955efe6b75601abe804f526ab76a425 test1/1425 0
-9af86888e3e5d463d30bbad54f8c2c2e2563ffe8c57a172d19ca6ce81321d587 test1/1426 0
-6eca17e24f9722c1af27c99318623a32678f7db870119a704bd998a6cd4ec0d0 test1/1427 0
-5f0991b5610dbf83796c007c9f866adbfccdeabd92b3b1a7faeb3dcc6dfa3275 test1/1428 0
-b1135318cd357c5b6bdc78dd5c0b0c0589e8e27c9c4522c226a70105d997b8b2 test1/1429 0
-bcb05aaf1236a7178e86425d99c761e04f72c6799067e45d9219150a3c701371 test1/1430 0
-dd02dbd11d589e98d10c87950abc06a918ad3cb6a8356b8672c5002609281b8c test1/1431 0
-e3402cb67955a3078e180269618b405d076a0e118249e30b5ea625133e8987aa test1/1432 0
-90bb60e6e7b741105a948df61bcc5c0fb02aea2e6f7582f55d7908d00af60be5 test1/1433 0
-1e3c676620fcb018825ea20b45399713e75867ac3e50b76c205e222f5a0f58af test1/1434 0
-5aad2fd5755d4e9d694e8ba6363cb43a728061f0b7c0984b6d92c10b9288ce2f test1/1435 0
-c5fc8cd229ffb08539dd3c0a5513da7cf20f60dfe67803eff2ffe9f92014ef0a test1/1436 0
-602a1e09014806ec648846074e85eb21046caa702a63cb9344355c3eff8d543f test1/1437 0
-29ba6a064865cd558c5fc358e4cc3568fa34728e4c881a3cbe935684b61f14ad test1/1438 0
-7b11d27cc2f62ae2c1d7d2de81d30c83f5ebcf3662960ad0917e694aa913b2de test1/1439 0
-01aebe2e8d0b21ce1a9217498cae20171907950f33136eb190872f760d51ceba test1/1440 0
-6ada5f02145ff6c3206e9c03b6afb6d248846956dc64e901fc316cdc49dd6fd3 test1/1441 0
-e023d395c6236a575208f05fc5d64f15014f721c0336b7ec8fe9ab462a544198 test1/1442 0
-0f0ee73cf515ef01b82c516a9ab7b2b6855c16110219924f0209ab9982f57b94 test1/1443 0
-03dfa088535cad316fe1834f6025c832fa26012df8732d6f466009164639c18a test1/1444 0
-2cbd96e243ba787cafc837cc82da90edba34094f881c3319e733508f488f8982 test1/1445 0
-8802cb9daea68309971ebe332cace9f39e25f9a55a5255b18b898b47fe433d07 test1/1446 0
-945787baf3373bde6cdff8136c2aeca9a354d9dbac394a8fdba1cb8123b25230 test1/1447 0
-26c412e9e94a657e8f56cee883ef6ba2c0f758fa9f0420d722b813e6bdd2e6c7 test1/1448 0
-58cce67f37244e11c98ff0fb44541f6a64d5a9cc329e3fef6e33a74f23520c4d test1/1449 0
-b0c936797fef6595f1b9e1261002bfe1cff27d05e4980b5710bf8f942f98bc5f test1/1450 0
-bf26018b664326884499037e7648e82f73c47910d5a18ca1543356dd909b489b test1/1451 0
-9bd1ef3f79eef85f8d99ef9d3c7a00a37d5981c714ab98c27b2eaca087fed3b1 test1/1452 0
-69aefe9c74e69fbdc21c854edb9ebfdaf19caf5833d13119fc4818fd77a7061f test1/1453 0
-3f5a42634eae022b18556d8d3f460e1636894958289b31b62936b6a72b594d97 test1/1454 0
-540ca613781221ee9041dc718e6bdb6f1b60d0b54d49b2a6ae42f72170f7a66a test1/1455 0
-5904508a526963ecce499e1ff137c2bd712bac6b454c70f42c1a2e5c543388e9 test1/1456 0
-ce8b0f3343da4fe445b929a948dfc0fb3df8e48d39a1bb484b0411a8c3e880b8 test1/1457 0
-c977b4429abd029bbba331142742a7cc6d2cbf3451894a106d3ffaaf56e2768d test1/1458 0
-53f15be7430d211fe7f3f35e219541f5442eae4bf67f29c55567787ab7731bbf test1/1459 0
-d35ec9d54e293bd1246d65730b9ba7912ac814f6f77be18346658402696b02c8 test1/1460 0
-9ecbc4dcaf3e077f1228adade47f04e46317e90b6e5610a3722be19d9d85fb02 test1/1461 0
-bdfe5540d8486018cbd35936d9e188da5ff08c0913b11a17844e3679b91a1a4b test1/1462 0
-136d27e959ba011ca211cc679338395c92aecb690a6b386bfe0ee76a1df3d56f test1/1463 0
-bcd33510b4d8996aeb7ffc40d6fdb53faa8be3f708ebfefda748beda34677df5 test1/1464 0
-c90ea4c267313b1c45ad44f5e1f4d80c1d9f2caa0df9fd51579329389b8347d8 test1/1465 0
-a12679792d7874ba3343eb3594b6274d06f696412bc5db50519fd594a1ac1c4c test1/1466 0
-dc5f76273304fef749167910d5cc3f851996b248bb41ecc0a51144ab95f96ffc test1/1467 0
-18ee8397e85336fd8833d7b58e0057034f730d07a8f07121466763f8cb21e105 test1/1468 0
-0f4fad077fb289d91f6ca7cf40421c66d41052007f06936433ce789dd8febb6e test1/1469 0
-ede748b6bc71a179cb235399ecb28f0065bfb3d74b1747776046c1539e9b6896 test1/1470 0
-d4210cd247c548e1efe4f7c70a050788252b9a74c5df3ad1e1ae60f1762f85a6 test1/1471 0
-f501f293cee58ff8d8392051e073b5700b3b7483657aef23f0c75a128868adfb test1/1472 0
-512019960965a1d6b8781af21b30e2d08bcc62d7b12c778c1496f28d4ee3bbb4 test1/1473 0
-b41178ea0333f28c220e0ae7bd85656654369ca8891987efe964902cae0c56e2 test1/1474 0
-d0c93e682226e3ff62ceb52814ea747e27c69e046383883ef2236bf866757528 test1/1475 0
-b0c3eb2625cd4c33ae55f7cccba2d8818f630fe704b2ecdd1e6751920416f380 test1/1476 0
-4541406f43dcec32c94af4591811fecff12d14fb4d1f11f23b6f078c276c8184 test1/1477 0
-71d2bc3d006bb66988cb822ceb146ecd630864f2e4a104f813be64befb69ca2e test1/1478 0
-426fbe4a71894366c45e8a0d106dc0d23ec37a2fa8d1fbcbaa4ebf44651228be test1/1479 0
-8d715d7542bf8cdec807f62ce9010590bf1527d191b2e68f84d6720554e605dc test1/1480 0
-5685e4b3da19781e25383096cf227fddff35e2fec0ff21e5aa2a9491edfa5bac test1/1481 0
-e89274db339230a9e83a3b1464804b04adacf93da07cddc7d15cbab1319981b4 test1/1482 0
-fcc8645e4202824ccaa9c4452d841fe19bdd176922623c5942b9bb32119293bc test1/1483 0
-ca1add897ae84f5c1c9c96cae585abfb96ae2c2d6bd44deb0d6113e964d3d510 test1/1484 0
-998b324d99fa8baa8743b6147cb73aefa609c36d5fea2ba108c61cc368c67242 test1/1485 0
-068001d5b5abe1dd3095cc261a4bb142da32d0f89dca452613b6759738e06e53 test1/1486 0
-779ff849f0fa73f29b59ae3d4f7095fb20c444f0494f7c7b74d687f904239e71 test1/1487 0
-3254278df1a864b0172cb92ef796b9ec2504c620d3679b55ff7bb16222370357 test1/1488 0
-79d13fd8b1032089bb37a26feff44e90295236e3d5d9f71f17b0f01bdc23a286 test1/1489 0
-4aad8ffcfe4a78cb8932708918e2028bd24a97e2b11345283223aa2ca7d52252 test1/1490 0
-2dff6b536d64442fbd51c8edb6854e4f4489adb6349fa28a5c9ba8e84146d2c8 test1/1491 0
-f3bc4a63d7b26e38bb26e08330a34fc765318aece3aa66b8563dffa79d7012c8 test1/1492 0
-9297a2760d83bd155ec4498a91a5cfb40183af6da3573c0e90eae4c602798749 test1/1493 0
-ea7f9b94714989834afdd1e0285bdb288742f3fe77be41d4ec5b30fc7a2644ae test1/1494 0
-7408f2022dd786223ef678db65f601420ce3604ee85d1cd5d6e19d4b20cdb0b3 test1/1495 0
-3e72ee614c4e708b398b0978e579b0f004c5f9fa2cc0bbd1d4208309903051a4 test1/1496 0
-d9eddf3875132d44232b02dca8e28784ca5519ff905ae128c7ddced99c7149d4 test1/1497 0
-8987907ce2a65f0d0345eee296f85ba48323e22abf8cb058d3bf7d0f5dfb0c84 test1/1498 0
-38d8b6281b191c84ac063f158ef089d5e480f78bcde4c36813b69bf6c5a1400d test1/1499 0
-622d04dea46480235c6acdb092b36d7c6d9451e3f6c3f7d5499b0b96894e36f0 test1/1500 0
-b6916996619db88b6964e673b02678db3c81485eea01d8e22636beb748bf0e4c test1/1501 0
-99ce920a47d5d774f0d2f6dad6d6fe515f17e2defdb510096a6d69cefb3e893a test1/1502 0
-19128ef11fa071eeb9155cbc7a14a3833090c9f56400d3375311602c749e034c test1/1503 0
-6117e3c9f44bf163381f8b6ff9a13b08302c68356d0005bdc62cb9de7c677d84 test1/1504 0
-d6937a5a6955e2be139e3c91da6e5463e10d817dd0a6ec72572b832fed96f69c test1/1505 0
-8705f93bb4b18c544607db6adc4c1d877025d067c8684a7e69cec8454a3b429f test1/1506 0
-1f3f5f326c8750735be0404945105f8b2334504365c4ce6712b08ce401a7f552 test1/1507 0
-f0312b47b0bb570c92d1ac22065feb50d809c78c576a94277b2647bae204ea6b test1/1508 0
-4a843257b4b50c97b71b6441834dc74ddf682992e828e12ba7907277ba1ebb56 test1/1509 0
-f9eedf69ea3256fe997c849865b3859edf8e9ead555e1933592b7d1cec4ba157 test1/1510 0
-3a579e75e30369510e7a584f9ff3c3ccffd2f30572d51589da8b4a7656a35f39 test1/1511 0
-9dc71b6f25b5e9c0fdb50bf347e3b3a5568ea978e4640db5dbdac9e36e601ca0 test1/1512 0
-5d9b2b5187f69072156a6cd7d85ce98c08c8aa75c96a703bac9e9d8e6562bb38 test1/1513 0
-a5888fde3138669220989506478faef1cf6ea53c68168d3917c361e96025bc02 test1/1514 0
-0c0d0438a75bb8a2f5fbae588b8f40ad79ddf10c25022c781518d932990d73f2 test1/1515 0
-d955b60d4a7cf354f0f4b3be71ab99745a8fd860d974c107c5b64ab7126567c9 test1/1516 0
-7fb3e5a656e8f7c24dc0dc8a647733abf84fe4d05ec47af88c53c3b9881c7b72 test1/1517 0
-4db702d52f0bc8c9375d65fa4fb92967599a2d1802918e3734cdaeb39dee90c4 test1/1518 0
-487c9309054167ca555e86b4d99b3ecd957abcca1237c6b52f025af2e7b649fd test1/1519 0
-8f820d7239a2678f699ae80882d61a625592dd6e9a069630d10ebf1ad4ebe9bb test1/1520 0
-3742024fe987034e575ba6fd901e4593c47958adda4f890269c9be186e645039 test1/1521 0
-0ba75a5ecf53e5a76df39c262f6ff5cff1578e7f07b64d9ee17bce9fdced6fcd test1/1522 0
-a321514668a64e300a2f032b29419fb8828d1bbc1ae6d0a63fd60701db507210 test1/1523 0
-b3d5a724537b05863e6502e2a29276222d4e8427357797acbbf25abebfbcc2e7 test1/1524 0
-41af5d7071977cce39ce05982589fdcb3398d4ffee9d224ec4133525feed6d2d test1/1525 0
-83e809c5cada104d0d65ba99593c1fd901081a514705fb4a2699f7428854e2c8 test1/1526 0
-151da1f3c6df6064839628bcdc5c90b1d47c052acd053eb8e22b4dc4ff671da0 test1/1527 0
-3e754e752a9fdf09af4fd6bc4296a9ff5b0ff02db4eb70646f3098d851d072f9 test1/1528 0
-b81a7b3fc16f2498e55b071c54813b0988613b386fd2c5e0ed6d5120c5ca4282 test1/1529 0
-fa3217072903a1b676e14625323a9c1f9a1f25843e31eefda19712bd13b898a5 test1/1530 0
-df87a7bb0943efbb8d46608fb45df542e0e8eba5edd65890beae9a55868bec72 test1/1531 0
-a273a4762df8a5900ca0d8484fafe4413b74c93435fe0acb32a7fa00cc68ff69 test1/1532 0
-c9315a336b279b679381c7869e71790c381f9c0eb45f796e1556b2b3225390c5 test1/1533 0
-7ce72fec86f49add434fc4da99dc73b12155ce81fbfdebfd1f6c3ed106291476 test1/1534 0
-3960eec027b59c540c6a505a76b8862f8586b133adb3b5c433a28a68f1ba6fdd test1/1535 0
-2f1b5d4ff84879613d92987b3a6b121d580f6863dd7a6a61a66ac6bb5ad0720f test1/1536 0
-2330a91b486fc9ff0f4ce2e8d9aa2b470754770284a057c12aa26d1fe716bfa0 test1/1537 0
-13c0e2e5b2fb74249d1b38daf9bc378b712c3190cd282e0849090239ed064ea7 test1/1538 0
-aa75d9393b86d99fb220750a8be3db214cc82be5688a7f5e38bdf0ba5d7936c8 test1/1539 0
-f08d212266799a07ef75795c85c2aed8d924d9b2828f11de52c1893512be343e test1/1540 0
-d99031e73d061597e0cf27c124ec8770fd8a414b34a81e18148df55faf1e5d60 test1/1541 0
-d5dad494fdfd09a5f48d7bf4bcead28eb237c1495d092b7f52b6bbfeebe6bc46 test1/1542 0
-17b0f14ae1df38c6fc76bd126d87f069da406055d418a71ecfdb3ea8442cadc0 test1/1543 0
-d15a95df1a1e435a8c448cae1b860226acda569d6f1e175eb6dbc135d5ae5938 test1/1544 0
-c1c26aacf8171a1463ad8bee6baa83ba062348345975ee9d879ef972c6918b37 test1/1545 0
-e42ceee121a24e851781f725bbf79f76869e41fbd14802321f6ff5cb1412b85a test1/1546 0
-1d825ab0076f6fa7bc330b4b899fc68d2e73741ee9e2e77604e1cbdf6295a978 test1/1547 0
-0365f5177dc3a6490f68d54c5c539cb3c22fcdda877440d1873792e88fcb81af test1/1548 0
-3f6409c40511e85ee2935a11d1f71bccab1ca0fa0a8d5152a483a2c4f2107034 test1/1549 0
-f1c12ba82b06505d1120be9cdf155ff9ac70ecac1e01fd9d8e875da78217c6ed test1/1550 0
-bfac55b229abf7f8c3704d0f9cd1e6db8477759d11aec2640733085779c1cb0b test1/1551 0
-e38f48c77d3f127469d9c3ba12598d6b6035eb44d15e09bafb0087dc223581e3 test1/1552 0
-7fef6f591338f0863ff9aa144c111ecebc1aec14c62eafe565441500dfbe0f6c test1/1553 0
-2ccb661b4ca94e0d730666e1b3c665d1e30de540bc67a0acf1ffda2e5389b8ec test1/1554 0
-670b3d12eb3d64452ba03250203fe6d1c0ed47db71492927832ef51a10839fd9 test1/1555 0
-262ef2248abf34936584d28d59230481eced03b06a54529d87e73519644cb6f8 test1/1556 0
-f0d4610cfa5d7eeb2b97a76232f6f65c85eb2804fa7797a90b535938268db996 test1/1557 0
-37a04f525cce7f0e5b6cf3ca7bfde05c1754e7da04c7dad8e7a9e446ba608d70 test1/1558 0
-bcb0601c9d3fdcfb6e83817d4fb96caf39d56bb5fce3f8e4601a10460ecfca6b test1/1559 0
-2b82b2647ce221f245f04cba9d0fa81794b3cae833f2970807fe2a49516895e6 test1/1560 0
-3567d1f098dccfd99dfa0470caf6dadc87865681db963dbffc2d8a8b47857345 test1/1561 0
-67de9c534dbce8d922b47036a55e21e583d93ef8fdeac010d22ad7b92a3ee1f8 test1/1562 0
-98ce671d260f0a993b9f5a34ffcf9e9aa563c5e3236a3fcac541efcea725306a test1/1563 0
-e30734c45e19015bbc76eb05fbc784c28e70e5c763c114f86f732625de8ca90a test1/1564 0
-239c94bf80a5d7cb3c8b3badeb488448477eea1cc039e1045ba3ce7172198dde test1/1565 0
-3e88718913c11211a2b79b98f3c948654b9be50394d56a1e7cbace3d3f07d568 test1/1566 0
-d54de1201519096cf0ee87efdf5c37fb896ded693a26daf6106f8d6c33cfc6df test1/1567 0
-87eb0e8854b675e928fa2e65952178ab6c6304d5c5d2a896d04b1464b9c94f8e test1/1568 0
-b352d21e43432048bbf52418aa9b795126eacacfb69edbffa653e71388cbd2cf test1/1569 0
-57cf870cebe8b22cd55371df0b189b5acfcadcb9a7bee839fcb589f6e5e01a39 test1/1570 0
-33fc7ef6f6d0e39cfd682f0929e08d6d8d4f9d01979476e4f9cd64abdcbc9706 test1/1571 0
-d99e1ed759b87ba326cc70630fc6b8d81fbf3a11cc2c7dd972df70bb91523b96 test1/1572 0
-1cc408c278f36468c3bc4b73aac60ea59254a3f27ff0c610ca1a7926473b6542 test1/1573 0
-921b5e3781b14b07dde258622f59c879b8687612c5029597feb5d9a265a7c096 test1/1574 0
-089b33d82e7448eaa2218448cfa6e32c54c5727dfc3affd944db938e93de6535 test1/1575 0
-ce014f585fac0edbf2473476fea36f1259b9b9b7308d2de814bb8d868266c301 test1/1576 0
-4683555d152eaddfaa95a9917e9c3f29d93cca7cc87f128132e8d138df505363 test1/1577 0
-ac9cb65718a14f1806a9e89574da850717bf9354c22788fa8f9562e42590386d test1/1578 0
-4d88f597c18cc13212f8ff74ccfa9ed04888909a1bf8d44c3d2924d3b3e89450 test1/1579 0
-e4da7de075068266d4625545f4798399c7cbc1b0ea16be79123f55b48972f8a4 test1/1580 0
-abedb0e5d3f2425d06fe883bb3a6fcbba0a41badc8b3b73e08658f1456706ff1 test1/1581 0
-9e92011e6c6b89a06d8da766b41aa5fac4a1219dcc19f917927fad99087e3c25 test1/1582 0
-565cfa6b844ad1e16917b3c24b1ab255f7038b902339d51c1e7bfe4c31603d27 test1/1583 0
-01cc5d2637e09d20ec8abe3658d74464a6b8a98ca89c4ebc02ffb3d1c4e734e7 test1/1584 0
-e5f8c8586aed7f19457688cd3c1e857e32c804f756f3821efe24883aa4086f0c test1/1585 0
-1449524ba745cc0a358f5075f0ef786142014782da597ff369f75a837f8ec8c7 test1/1586 0
-65a72fb3b572d849610c377eaccba6b57669c11b0d48de1ca5201c8723b1eb64 test1/1587 0
-ddfadf4156834973d5d2f8825e8e7f210e4579d77e07bcd5c77c40bfaa91b30a test1/1588 0
-b97a5eb597a3a77070ebe68cc89929776e1c21e64b13271f0029230f9d402b4b test1/1589 0
-98e536d112c7a98e17df7d66add0c0caf7bd5786835d6cb8ab2a9c02426f0817 test1/1590 0
-2e12a3cf000ed60473fe5fc0ffadaeb25a8b0443a3e4f5056f7cba38985288b6 test1/1591 0
-b8361ba1758fe5c0141fe957e1ca58e8585a2072c481ac6b36135085bcc1d6cb test1/1592 0
-a7cd0d4e946049e31c4624769414355c56da8a17a06e3535c0e876fc8c6d4b0f test1/1593 0
-985c55c37d001814b2bb127517e7d6c1781e46949eaa400c9dd7dcdb8c9ba97c test1/1594 0
-0c32fbfbd275c4d53c2bf269cf384cd628d8f6b395ebcb7b5f21485f1c1256cc test1/1595 0
-60241efee7b1e161f77b92e4079918b717b9f3b861184f9b4db64fe8201cf2d1 test1/1596 0
-68c384541151eb2c5463024001e7c5a4150bbf8281463993d6b426bc4927b2ed test1/1597 0
-66ab3f7c7de7b3042a935a4012b2e30ba9b4f90a7f49d318a340d1c0e71f12cc test1/1598 0
-abfd29f98d43115d15cd16b97307a15bd3bdf91c14e7e20caa412f3502e1756f test1/1599 0
-cb6c334375353db5dc403920ce2cdc644e74f373f6611b6afe8ffda247ff512c test1/1600 0
-db6a09e441da8d0527cc7001ebbb6148c74a130b2c5b5067341628d5e8c3d19d test1/1601 0
-abe4809a942979de7c80665f2c27744a9ee5da289d4dcc83db5bf09fa9a72fb3 test1/1602 0
-139e43bca5adc6b10bd75da693e9d42a99ee7dda63ee62719a67b7d3a9b09619 test1/1603 0
-5ff14439693077d11f32fc71499f8d8d19385d4f528861fe0bf1451e0f081494 test1/1604 0
-23770185f1d9e78e5b093eca40b3310b179013405902c680566e09d3bbc0e120 test1/1605 0
-5208ce48ba4fc76076ec100924581c502a29e33fa4dc9888bcb650e98c32874c test1/1606 0
-4d95762c10dac5cd0bba04f60c29467c6537b8bdabe1f76fc5e4559e3d2ae871 test1/1607 0
-bacfaa625296d491c23d9c8a3fba049e66e37c9e4370d3dff92909febbd30b42 test1/1608 0
-7a1d92b0499e128702ae7ded8a3bfa1e46ce5560c76eb49b365c4ce0d9525469 test1/1609 0
-fe0d257d493f0145b8963c2388855bdad766f91c6713a3e0c823da1b4b6dcfc2 test1/1610 0
-e72915a10e19487b42100e6a4ae770d64f2e67d1f4686bd47a94d0a2e9e7343b test1/1611 0
-76baa965d5a74d0c40c17141b51afd611b4b52855c89cf16f2e6fba2185a6f0b test1/1612 0
-943170d550884c313f1b6ecbfda16cd8fc9c3d5f922008a570291bd20e9ffa99 test1/1613 0
-583b89a1443a52f305d848b6ee57516fd973e8008af9c12c6bcc83c1891cb254 test1/1614 0
-3c929a0dbcab401bf26fe5fc7a85e07fef2ea92766c871ebe7fe87ed6ac21014 test1/1615 0
-0d09c844dbfa9a924e73537857c55316cc895a7b56c802354e7f6fc6263e1047 test1/1616 0
-7427f013c6ecdcc21a99b3df6d05fd42cab31f58363f95a2c1d7019f33d9ae4b test1/1617 0
-daacf0ae0a11455d5b500a8dc323bed6077a41359f37ce9482635b7ff5fb74b1 test1/1618 0
-b46880a4e54e2ec226ba93d7939d4672d90f8e951d60c460531e9ec7b830fffc test1/1619 0
-9a241937f120aa0d86e3e57e0d13ed4843e5d71c654244dd9ab43d6401819e77 test1/1620 0
-4d484ef31ae81169f04f1ce3000a0bb41a466d2e1094161883b0197c9bfc451b test1/1621 0
-0caf7d71319169eb4512fbdb72aa4dda028ae993d5e15717c421d1670160c885 test1/1622 0
-bd059632f7c8a52421aafa5cc772d1016a9f15ab58b6e4dae74ee0ac823cdccb test1/1623 0
-aa085285d0175fdbd166ccca03cc521a461a8e7e874439807c6356c2a13d1c96 test1/1624 0
-60c1d4d107c394c0ed652e741006fdcc8c43f7a22a2270f07cb81530422490f1 test1/1625 0
-d3c8368bbbdc42ffc8c6b67af12a81742daac1f7fe0bb2aac1937abfe802c0e6 test1/1626 0
-1d091cb3e929a37c454c3c2fa30302494991a9742de246dffa28a88dc3d61872 test1/1627 0
-b9abe62b0fd7418062f33ab48474cf70e6d5ee3d6b802c667678e60afec40910 test1/1628 0
-f60a419d63609953817f04a1e341599a1fd0d57576d48c032666e94871813eb5 test1/1629 0
-4af7b57669a832258f95a3ce2630d9c3cbec6a81c2328f80a8a48706c5824aa7 test1/1630 0
-4ea6c5fa2fdd7f1137c08b58b7b09dabafeaf36fad3f94237f5701c98fe45afc test1/1631 0
-636340964e7628d98c0105be9d3c4f08ec91ffedd6b67cdbde37e7178631ab26 test1/1632 0
-55e0f2c76306e08e3b70ded4686a35b3106527048bf2b6a71caeb7c5cd1a290b test1/1633 0
-ee1b5554916c39a7c9b16eb3438cac900d5b262bb11684bc3d794a2bf3273f45 test1/1634 0
-1eb18e8c7b26def3b2233c855f47ba89af6c4c736e80d3a045bb5d12be637fcd test1/1635 0
-1bfdc94863922c2345d91bba937d9506c2127fa776334a2a28115663d8c275fd test1/1636 0
-4aa478fd19ecee0716b9578592f3bb02d99e3c272081822c0f7368abe89ad8d1 test1/1637 0
-09c80c85aeb1b342d6cbaf8645ede00980ff97f8d09680d9e661b6770abeedea test1/1638 0
-7a3c149b5c467301020167168487afd799754530ede3a850f838ea8bd00f984e test1/1639 0
-d2060bfcbb126518d3cf842b28ca10b920dec0cac8c70140cced2248882eff8e test1/1640 0
-220ba2786abcd5c9633dbbd6cea54507b026b5142ee05d4bcb41809651a253ef test1/1641 0
-a1b6f6eaa75470b6b0e93db86f3c1df05a427f8cd98875578bdf27981a01b9bb test1/1642 0
-9686fd7b39082053552437e75b04feea8481c8567eeb8cbff85fdd1260acb9e5 test1/1643 0
-e386ffad5dc8a3d2c1c54841bee4f37d968b70adc5877b74b6cfe4a288873558 test1/1644 0
-a00d0c647f8fbfaf2d919a04854e1e7c250012d813fb9aa99a69027db16b0402 test1/1645 0
-1f187111097c6ee6effce1a61c75a9d656005746a450205951e7086736f8cd33 test1/1646 0
-393511d7d8840b1336e07edf8d74d900d606de93dbb7c946900b0db163feb917 test1/1647 0
-21ad507d0e7f8614aaac9dba5d0ff5b650dd08da345521d31204a9702eefb60d test1/1648 0
-a681f85f9f6758f82670400c558044a156d75e2336d66a691930ef0204b9e6de test1/1649 0
-67fd0e554cd7b717203a5cfd6d942d1247572e5d36a47aed639da3fe00d457eb test1/1650 0
-7414e43d10091795b7f573bd64ebc31c268f1df25f5b5bdeccfccfef2f2064a4 test1/1651 0
-1c114ecb52f88e25c5b58e835740f9bcb18b9fa27c3afa26887060264ff700b7 test1/1652 0
-e5168f6f327d905af63d7968d8d66803a0029a01e6eab161fba79d1faeb0919a test1/1653 0
-b90a9e1cd677f7317f063bbb2136a3d2300b7aa5f7ac7cb7d50a019256b4eca6 test1/1654 0
-a7cd4622a6fc324304588c3f38de5628ddda0d6d8ff1b1bacb82a808b3235b5e test1/1655 0
-4df7027d186cec3b4469c972fad005cddb1cae8a48da9cc5816dd3787636f864 test1/1656 0
-f2119867cae8a680050ce2d3ea66be5bdc565509bcb69640d5f6dc1750fb3224 test1/1657 0
-e2009f34b8ba9f8e18a08d8ccb5c6ff82d8fa72132ef4b2e2ac74807664577a2 test1/1658 0
-eb9e052ddaa32b548225752604dd4ed28ed0dd1949a00502a75a048661f285c0 test1/1659 0
-e044dc8224c211965e4ccee35cdbcb4b098c52e935281787fc8a287417134d5f test1/1660 0
-716d23c1ef01f8dc121fd4ae213b17d832c58b2e5c7d014ec05a7d4bb6f5fb9c test1/1661 0
-dc3f0a3247a8f7f072f5f6c2da9ad3a23b85d8aa876dd5d39255c750420dcd53 test1/1662 0
-0788f094ba19974f14de020962763d3b4ddb00cac8d67d11efe65603771fdc81 test1/1663 0
-41318fddb38506e023e3aec80f3d1b8309109d567d6bef5f213f221c270c8cdf test1/1664 0
-fe9dc317eab105b49e3e35a462244f89be18b5df2b887380cc9faa2b6883f5a7 test1/1665 0
-59fff1d1d25c18bcfd86e3bf5d641d9e4cddce495fe64cc57ed34f6144bd75e7 test1/1666 0
-5fd188bbbc3e33285e3b70858fa83ba68bf40d7e5261609c3735edd1832aa181 test1/1667 0
-880e24b2efe1457b49b956181920429c8bc17e6005cf557bf7902e20610d1ba5 test1/1668 0
-85a4cc35a3403d10d7944b4d6b1a41b2c69cf9ba8372fca5f69529ad2332480b test1/1669 0
-5dcd7a2019d2f450ec384c5b4d8bf5e1bc1a1531c2c5d42703f616604895fbf3 test1/1670 0
-ba8992bf8eeb4ad718e1ed4012860e1a18b74cf0942765e6f5b195e27355ad71 test1/1671 0
-451404f62cdcca2b972fd0f8bc37a209630d87b59b2f396b6bc0f9ea5816d51a test1/1672 0
-03e8ac391b30829384f385ada51b419211d6af89ee447f60549268a67377d4c4 test1/1673 0
-9168f335093dbc43e1bef65660cd29ea2c8cea4504cd8bbbf655e83e0f0cfa67 test1/1674 0
-0aae4343b0470dcda72804c8c1a4cf03d088e9d208588e2e8bcf1521f287bfa8 test1/1675 0
-a35b00daedf7ef0921b2ac908b211952c6ed6d0336b2184bc852fffea9b9e9da test1/1676 0
-accba70f1ff5d5d8d822e1a067d500c4a6816522e521dabf7c75d40d157b22ff test1/1677 0
-37a2f8b6ee33ef6062e11dae1cf7173d7faabbde3c5a0904b3ef71eec0a1643f test1/1678 0
-61448e86a4874966daf148bb0424e1b0b591fa2f38c581ca59a66c00de1c37b0 test1/1679 0
-11cfac369d72a0861050feeb62971149e431bb0f5e026defc5d64c88780db9ab test1/1680 0
-ca4a5d44b14825f4a51249c582077ee9052388b4d6e22ab5039191428931d116 test1/1681 0
-a823ee57fedc8855076d689fd8fce81b76884077c178de696957cb17d0179545 test1/1682 0
-c186939576a5d7871e906f9bd3193e11dab9c8773f4b72a8c2fbbca541679906 test1/1683 0
-7bf0744216b397c41ac277bafd34f1675427b20620b2de41f58ffc6cb27acf91 test1/1684 0
-1731b4888e3f8b0eac7291fdf2a323c567a8a41b902716202cf2c68351bae9ab test1/1685 0
-04996bb33fc49434059f40148028562823c9b12a5ecb1d2870cf211c554d5c38 test1/1686 0
-018278082d5770fa8cb06d8d02e7d5c4592e2b0903847e48e608e108e093d4ce test1/1687 0
-f3ee30ed1cfd382d20c5838c8fcbe263a5a32cdc960a1df78935245c9462a18a test1/1688 0
-127e6f23f3bdda60663738cc837d0f139933df1aa064952047ab600ec0f6a590 test1/1689 0
-873aca8aef9008461a7e509c7e4e959a3aa4deca0b1c039c74e46923d8761f9a test1/1690 0
-a9a267d145154dd66169076ec00a0bd978282e1820d3762e9e21dae00a275266 test1/1691 0
-385c64f232508ac3d182f0cdce610a124882077110088b9a22cb57c8487b7e82 test1/1692 0
-1b8be89cec76a755499c6e6194e0e2a72743d6828aa9b83fce4b654c37bf8b34 test1/1693 0
-73cefaa54ed9b82ebb1af904188d8461192e77a6243f7de65bbdc8bf3d723143 test1/1694 0
-9b3bd592d8dc287386c7cead6ec5a44719e5ec2ac5a593f41ad0735180cdffd1 test1/1695 0
-a8b1911f0e6ade4f2fc8f72d1f58c8b1dfbd7cd394ccc2fc154305411da8e9f3 test1/1696 0
-c637110da897c99313d0aab5f594a971f1629ece787820ee5f844569700c0d78 test1/1697 0
-3deadf5794e1ce5feaabeb8786dd38dad97d8f310dacfc4a1707b4c6df0b5f4c test1/1698 0
-168be638f278e612b1641da1a60d003a0aa1e6b006788e7fb2637456ccc3ce7c test1/1699 0
-2a60398078d442f6f0c08693a0cae0cf67c5690eb00af7d2aa4f11bfe6b4fe08 test1/1700 0
-18ae59b8487a0f2e5afee021a3394c4774c26745dccad9d050b732e26c041321 test1/1701 0
-8da942053e5ad23998c5c2d3bbc7511463f95095389176364c45c270651d1294 test1/1702 0
-a7c81ead490352a452c8fd849d1da1b293a746917dac77be54dc59bd674d0239 test1/1703 0
-f7e3fdba21909dc6c56b31c0d841f2f8b9aa57f569aead804e6f423a836a25d8 test1/1704 0
-006dbd18f0e432b64a486ee967925921febb2684368977e88edb77a0dc661218 test1/1705 0
-caf8c56a986242d715c71acb7f94c619a20aa2775d615e4c047b41d2e6460225 test1/1706 0
-1978426deebb038a4fdf0b6f8610e8af83ba4dde1fc781d0414a82e3aead2c9e test1/1707 0
-5b0daac1505d152cdb619e6abc2eacc048fd360684f356bb3ce46957d977cd25 test1/1708 0
-baaff8a7c3413e4dacc1f77b03646d768db3a1862932a8fa42f8ea2c38c551f8 test1/1709 0
-7fdd9a859eed901d8da350dce65845d5c235f64f6319cfae5c6121e92d2d4712 test1/1710 0
-af6f4c51d508652ee3f4e08be00aa2eb7a9ebe8873ec19b0888ef4c2830a110f test1/1711 0
-63da1db07035436ff1b12ade6bc69ce46ac49b23d7baa3c43304738e0d3a2e50 test1/1712 0
-85481baf544dfd97ea46d5210461e4ee0d9f0f5127537414f805e261c694e114 test1/1713 0
-cd3d13c9978756f52df6a57572f6f8bcaac61d376e41e933106ae7131507c9a9 test1/1714 0
-5adb8b07609d86744744ce919e3cc921df60f927645bb80d3fa3f3510c8eaaf7 test1/1715 0
-c4030c3ad50c958673905dbc647dbc85b609baa3df1888932b2b5956cb952b9e test1/1716 0
-3b3c53afe6b48044e60c7cd3e3560d8a10e6ff226e35fb9689bf74324f8f351c test1/1717 0
-b2867ede2bbbdc6be1eb06383a2db4f3bdd1b98fce7ecf7f1bc3500d3da36b54 test1/1718 0
-dbb7b94a73350c7affcf92c18c5299702d66401f00d0f3d52f28fe2915020473 test1/1719 0
-c7b46cc14547cf6be18328ff6bb955002cc8db7643adec6c66be061f12d97d44 test1/1720 0
-ea680e66f1bba697c4c9476d6041d5b59c3620ff0164d633fa47041ff953e556 test1/1721 0
-dceb25c04188a219bd59972c014838e6af7415a07ce2b6bc133b8944d379a62a test1/1722 0
-b596d01e0f011211e1631b3a5de96207256a8c4931d925d9ecc791e5775b7e85 test1/1723 0
-6d14f3bec907dfd3886cf3c7fa851b27cb92631731de3fc8c7654aa506508871 test1/1724 0
-2b3627a9fc869194be5ebbea6db7261c629332dd8779b4008e4a406a1e16842e test1/1725 0
-312fc04b033591dfca786f3e1b62463526cf67c8e3efc2423ad296721e7ffc2e test1/1726 0
-959c63ceacba1404642012dcd0bb7cbabce62d7cabfcaa8a271dfe7e6e265989 test1/1727 0
-7d1bb6abc515e0eb38b83395096a1dac0af28837967972cbc6f6df254b2c0874 test1/1728 0
-d492340ced2347a4b12f3e4afdcd88d2e66d78a0c71e45671175520e9dfae8a0 test1/1729 0
-3e4cbfdd8bc1bc43c0dc5cef12a773269e444072d8679651ff9b64e0c3e85217 test1/1730 0
-b0ea0d9290b0c8b8466f9b4bf1210d33a49be45b445a460b95faff77113c23a7 test1/1731 0
-5faf5c834d3a6ca5596e25a6156a3fc926a2ee79737918eabdc977d3573b4746 test1/1732 0
-1bd7a630be88e3fa42783cd1344af2f40db71e842cbb91f4ffbe43469a0c171d test1/1733 0
-400ddf0d1fcd437adbd29085044eebd8847d99ac1b1cd695eef2cda27b547137 test1/1734 0
-c847194f99f72a110b0d633025f626c5a7d9f3a00b2816a4e8ff49a556dbed87 test1/1735 0
-53dd844dad16122cb7aaafb0299d5ff943cbfbe80aa06e8dcfcd428b360c0dc1 test1/1736 0
-798af40fa0c811cab170117ebd50a9fc1ad0e528e6b1e67a66532492ef55a672 test1/1737 0
-0ef37dad64d0e30fd25f93653facab686f239faa798dbe63cd475a509c866c38 test1/1738 0
-9295c9faf3ad34a72a7a88999bdce1d83f538cc9b811632d95b1292e3b6bb547 test1/1739 0
-0f7e9c3b90452b1e85980a99466e012cfb9b469b216ee14acbe70c8e5a6a0c57 test1/1740 0
-5a9f8b30848b383bedd34c78494ce596bcf5d8384eaff2cfa236561b767a8df7 test1/1741 0
-ee318ab99c5e3ff2b359e4bca6039c9de6a48a688f1deb7d03e2d111422e82eb test1/1742 0
-5e02b251e1b0a7ca16745403af3184827ee5bb94b84fa8e8e6e1eda86feae89d test1/1743 0
-f710c8ba2a0ba1df936739031d3bd56044650a38318d857466be6d8255689372 test1/1744 0
-e0b35dfafedc4b4b6154dc850a11f2d835c4ab0c6f219c40ea6d35e1646341cb test1/1745 0
-e31a0743f81f5e664eba9be6e4015835686d8d012255dcf0692da51216aed6cc test1/1746 0
-5b7e0a1aabe91c4ac04e0353cbdab97361fb781e00d214c3d33cec99cb115cca test1/1747 0
-2817345a1b76d018b70f4a50dfe04f81a5a9594b12d571103fba0dc7160fad21 test1/1748 0
-7c8f1954402c1c2566149d1437583fe6750419bd157e2d4d94474f8823f9b907 test1/1749 0
-7e15e6f1b9b5ec5e05718f164e3bc799de6c0fe7975455245f5990886b4c58d9 test1/1750 0
-6498ce26a2820f4a5a16f8671550e4c0ba24329e35491ebcb8249fad418bc142 test1/1751 0
-d3345aa3700a8f19bfdf2093ac7edf8a26e64e20e66c82c92e4773cb75bd93c4 test1/1752 0
-55c3bd2e34e377b82719f77d6590bab35f8dcab59258dc038063eef4a35f219e test1/1753 0
-0a2b691a9459037454c9a50994a7031228ad81ba1dd67c6faf173d653a4d8dcc test1/1754 0
-c92e343c7dfde6d07109ecc8d43a3a245373902857756374f4aecf47478a1ac0 test1/1755 0
-acf5a0c838139f59abfc4e1b8327fe157dc6b805bd8f28af78d851214d9e7c87 test1/1756 0
-9499e9426bf6f23b47f87068e551e849776e58e398fa124817483098b5662004 test1/1757 0
-a0744d4a796bca19122484198e72ca90254556d485245a1b13cf037c8aaec73f test1/1758 0
-e2cc38d737018c2fdadc9e5f1436021ae03333a299e97b8e708cd9eee7c890a5 test1/1759 0
-c148412b5e2129d6a98e3ea6ca21f971ae69aa794ac64f9ab7883137c72cdd7b test1/1760 0
-40688b17747c3ecaa1a6d67aad36d11f9e4f534688085a93a18fd71649523ddc test1/1761 0
-dc915254fdf38899ee0fb0cd98b5b3f3c04e028aa353d0361ebc37ff235bc11d test1/1762 0
-011cc313966aa3ee60d00150dd7702749ac3df68c43d26088be4ca7b7e4441c5 test1/1763 0
-e3351966454bf531c421cf211e5e626938573ab8a8b3a164ce9a6cdd667c7e91 test1/1764 0
-8df331abb372357fd9f5d4dc8bea40deb931011d03ee611d2227ff3835269160 test1/1765 0
-0a405ba13b814e4d8362c0469a5885c97d51ecdf7fad04164d359a588cdf21f4 test1/1766 0
-8e472a1b76de2cd3ef899686457adca273ff3a80baac18dade5f23e04463a83e test1/1767 0
-fdabdc853017e55cad4154eeec883f3bfe98cc288169a5be76aaaf96bd812126 test1/1768 0
-9fdd8dde2a1e22b0de6a75cade85dafab0392c93d7db28846c3ccb6e5c5c9e65 test1/1769 0
-46a9b70512333fd332bb8f694abe9ae8f5824d950dfcbc89e1e426092ec54757 test1/1770 0
-7c0ccf0f2e15c1b743350a22c9ddaf53efdcadd84ef1ab99cddf745330ad9acb test1/1771 0
-1fa704c2e6c41073d9cba33d3ade412f0c2319ef3a2e7ef1a9e6fa09108bbc3e test1/1772 0
-8490b5657c7c4ac962d56ba153eba1d55d289b2cf3443a556b7dad10a1f668f5 test1/1773 0
-eaa9ebd6c151f6960882e46b5022bb9644b066462a4c5217d369f24ed5ecd1d7 test1/1774 0
-db62dfc4d4148da854c892ee5294d88801551ecfa48eebe57ee72acdc696a69e test1/1775 0
-915bd981091d14f6af045a25550dfd4543f1e681dcc23dd4bbe82d48b1b2b541 test1/1776 0
-d386a99ee8866ef2088e463e4c39ccf8a798e8babff5456ff235bbd7fdc5df25 test1/1777 0
-6bdf32d512b5d905dfed4cd7fe90965c0bcd2bb1d582142a11c30ac2b040613d test1/1778 0
-f91a848a596d4e8d5c870c4c883c2c9ac8b8f44e202f16068ad42c864290e7e2 test1/1779 0
-107b537e2ddb997ee856fd848a6f40e85e7f8ade6ee185a22a5874d8021c288f test1/1780 0
-0ad8cf10347fe4e336a9a7d3615c61e274147623119e86e89bf35bc226247591 test1/1781 0
-c6b05fcdaf2a08d9a613c1945ad999961803941b0303f69dbdd194b28e3f48da test1/1782 0
-5ff5c64d2e7838975a6286b6661fca10c9e7be3e57ade2f4092a2aff06e9bbb4 test1/1783 0
-e7b092cc69ff886211be2f7c4e74b187d01fd4adec83f9badeee4b1316d7e5ca test1/1784 0
-3ae26e5a5274d913dcfaf4a501058e77040cbc1dbb91f3a88e3a4ea8ccc01f08 test1/1785 0
-0c805732d438defa2cd9450487e9c50281ac2f9d9e7b51606db6640e55f21586 test1/1786 0
-4fdac23245a70b3ffdfe5c3254e0a494915477b4a186b46eef8bac0c00d19f84 test1/1787 0
-7f971ce928efe54a13d8ae989eaeb089ee98d737049c03919788aa37abd11220 test1/1788 0
-3d49026cb395d3e212da704baa47f57c2d3ffd0e3dad681ea4e8d4170bf31b37 test1/1789 0
-848c1b89ffb894221ae27d2cc9d9ccab0a418ebf0ce19692b1ffd2b51d01f43c test1/1790 0
-ee9182d28ea4424939b52ede15bb15f189bd5ae9b5792423e9be917adfe9070b test1/1791 0
-770181dfd5e63fde6c2b1a4ee98a08825d13db36048972fb2741b16a5a2c9e45 test1/1792 0
-ca6cdcb34ed014a86d93d707470121a2dd89a348da166286f23533d838cf2a63 test1/1793 0
-406055ca35b41dc31bdd17129590fd7dd370b9cc106a43e5828da55d79dbac92 test1/1794 0
-e1e9be25543cbcd3ddaa5f16024feff1bf09c0a823ca60a9eefb76421088b511 test1/1795 0
-0b0de5dca7f0b0016e80a79206d2622a78b310b03f4e64bcf1376c2967a38776 test1/1796 0
-9c6fee8c8653dd42830075910b9d4289d488c00358e58de3c6f04ccd171d18a2 test1/1797 0
-5fb7ac3cc64385b9cd6fa602062fed79af7e3c2f5ba3e74b1b8712772e6e0e6c test1/1798 0
-e6f5e22747d409930d1818e31642ca6773d7452c82f6f47823101649fe30a712 test1/1799 0
-d922438b5adeab789caca2b5858a2a797a0deb3573075ec943f8938f3cd6c002 test1/1800 0
-11762fd5f2ee2558079b46914a8e873b9945189f231a56ad747962000dcdb225 test1/1801 0
-ea280696340f302c56ed9702d1595b8eda863c44a5c8ef46604e5daffb3d0ace test1/1802 0
-c7d85965d50fc7a1d013ad351e6a33a73bbeaec66ee2fcd69cd2d521162fe970 test1/1803 0
-6a50b51f186fcae16cc6a336bd8c9b95bdf2f8e1b05b1d65ea70f1316ae620ab test1/1804 0
-73249c56b803ac0976662ca8d7ab828239b561d4ecb2a5a941565f4b0177ab84 test1/1805 0
-b3bcc0f9244cb9ba882607494907f7e7fbb2f8820a0a25503af28ae1c2d4cfde test1/1806 0
-ffd626b4cc58acce777b3b128cda304c56beb90ab69aa85d60f0e03ff44f85a5 test1/1807 0
-b864668455a5fc33bf2e6e4743fa6b3e9867674e5a7486fb96ae2696f9538cd4 test1/1808 0
-860769a0f2fd42825f22f199d2a8617473e940bbb489b11623438e425e8fbf4e test1/1809 0
-90d6659643be3242b3e7a88d546e68ebf2630d23cbcaf43910e01c23a83e0946 test1/1810 0
-70ff59f4186660718adf4a471fdcab5d5fe5e3e0d618220d9b5a999b8018d4e8 test1/1811 0
-a3537162218c1b8efc217fd5edd570711e826216b74b9b458907c5d3bd33bfaa test1/1812 0
-316b6ae00b1dc0af2a92c35c518b1ec0d32f34dff0091c3c6aaafdc89339bdad test1/1813 0
-cf03248b382f0ac64aac5e2bb2e32a2c2cbee18460372ad36e19709e4fae4681 test1/1814 0
-98c589a919f685d8f4829d2af75bdf61fd2c8e6cb92dcd3e0ea852b56c2da2c2 test1/1815 0
-32e85fb867d4c641d97c28c84785a07f6216891225883eeec892885064add33e test1/1816 0
-e1aea112346004842a81bb282b82ed4609225a3492999282e137f4025d8d8a6c test1/1817 0
-0b029db449c09099929b361704e3ac53de0adaba2d20085f1fca97061b6f1f95 test1/1818 0
-c840d188705e90fdabe018c1fa4ca079ba8daea34e9853597180540811f76151 test1/1819 0
-ab82be415f13f9f388b0ec4307427ab70bb413e9e798e431203eadfaa6287220 test1/1820 0
-6710b4839844ba927cfee7f7ec896f5027e88bb605377d56aa941ced244ef67f test1/1821 0
-6a2a9a1f777bb194171a1de84d7fdb2573df85b1a3b58de03c8970b70042c660 test1/1822 0
-ba9f33e682ae2e7ac497151a473090b6f8a66eaa22e92efe6a627ed638ba6cc3 test1/1823 0
-95b01ff0affec4f4632c96677287e1bd86a20e7555c35ece1cdcc21df5664cbb test1/1824 0
-b0f76fbfc7bdd50cc7ffb3c477f13e24edaf5177b5549946d1bc048e3cccc213 test1/1825 0
-c0489af5afb94e1207a866e6c5592808711f384b70fbe6338b3a8edf53c19c74 test1/1826 0
-085f7b773659955705e7936f445ad5b123d6c0d07c96dee83184cd4027c641c1 test1/1827 0
-9e863a0f8617f99d6df1701bd96348bbf57d12b6d2f254c02b307ff149330dc1 test1/1828 0
-6963cc4657aa6b62de097e43fbc8f0f98c0af8a8ef4c2e01580e565bcedb97dc test1/1829 0
-a3339af0285ae0c1648479498a2e6785cc6aee69a912aa38ec48a2df3305d062 test1/1830 0
-ed6c90dac7eb6aac30014bf2d11aa7e1e2ea51f9bff3d8227a9c9a4d3855cd7b test1/1831 0
-2439628ff13fc41f0b21973baaba3c92f84cafa64868400420a98939d670aa13 test1/1832 0
-9a2e1c84c8a4b036367fca42b87c23ed9ac269c3cc69d231a1f66112836e5765 test1/1833 0
-67fa1576105cb6728c2fb66b07a7522392708ef662ac50ebb4d9e8ae3dd7ab85 test1/1834 0
-633fa5fec0b6c448a6f72d0b0f8017a5b5940b808067dd8acf4c2fd78205de03 test1/1835 0
-cf0a58d71bef9551e9841f1caa6d4ee8d7eda7acb76851fb7f9d6aedb771f6cb test1/1836 0
-5e5509cfdae6752bb6e7ebff75f51c4f90746e7b4256d831bd2c548dfa380ed1 test1/1837 0
-392fd1f84e3641b377a53c0db7c5f797c721614f9d297f26104f9a08570c67f0 test1/1838 0
-c80eed196a253b6ffcd4117c9c79b0d571081f4855a7d102b888ccb5335f2183 test1/1839 0
-a4fbddf46d24a23104593111ed47b0512332deb5e6b4f36a69f5af94d3bb14a2 test1/1840 0
-30104508b7e6464ff626e31394a8e5d56f99f600f3376ae7148b400ffcf70960 test1/1841 0
-f918e27b858d87811094672f7ccf365e72052d345326f3358c7dd4b956f59b38 test1/1842 0
-02fff5b78e6c0a178077741a7a111e8af49f582eb50c37e3915ac7978d60041d test1/1843 0
-60a070b92783c4f1091f14db86ce51da318a79a6fe30469983729b646d469487 test1/1844 0
-3f5e1c65b247ce172cba3c924ee878cd2f7b2831d25f05daab4a8e6eef9bef8d test1/1845 0
-a5d066e10fab2b9d6091750c9dccea2d86a0fc4f055ecff5dac6be143335c56c test1/1846 0
-e3e042421c99ac8fae1ae3c79f5d17565f143279f896aafe0800700741aa2b17 test1/1847 0
-df997cbf56be3d0c0d53a2e547b7e5b05fd71e01867695f987c38b17c3cb9927 test1/1848 0
-ff9613d278bcce680d6da0d9cd87c5f1f7f38c7f4666aa616e2bd4a65ff99c39 test1/1849 0
-10d9f19d1b67d52b2fe1a35ad05d195dd2d62c4343bf2d2c70f0b7acfe7f532b test1/1850 0
-e815c1fe8252767af9ac8e48e3ae4016908f16c4cbc669266e449450941f30aa test1/1851 0
-ca48f4388f5f300fdfd42b35453ad87b6347f2a85a881c33d07b106605516b8e test1/1852 0
-95ed75df3e2bc0405231d1b84371170a1c2b43dc8294ab1ace74c4a7bf4bf357 test1/1853 0
-0900b8acb7c8ce4662bf51bba4d03b49df8b97e42ebcb65cf46100e0bda4782a test1/1854 0
-4c6113aa2cb5a6a7adc5b9150411f880521fa304ed16c88f2c97faac7be2c72f test1/1855 0
-0df2d101648e585876d447dc81bfb6d02672eae18bbcb394308fa831e863120a test1/1856 0
-a7760b7181cfd85bd55b77906abbdeec53849230b23b528f5a982a892e59df07 test1/1857 0
-400e4a3cea49cc89b72a2ef3b470ee607d4b149f31cd368eef3bf1eab0813167 test1/1858 0
-566ed1d095dc23008849fa93fbd5cbaea69946b708f18d50981d6497d8737591 test1/1859 0
-e71329e2d418ab6551fec562bcfba2bdf4e8e22c4dbb701d7e9168a0d52e071d test1/1860 0
-be36ffce5f0670ac24319fa3add05e47e00c3dc9ef93373d89850241aafaab21 test1/1861 0
-3e6ba1cbf9ab12b33121ca72cbd1e07528550394793b44a3a2ced458f1c95f10 test1/1862 0
-39d192884aa159a9c0aa400d89c51b0ae1c2bb53f83a7685ff96665fdf91083f test1/1863 0
-c36e4485648860f8b31d8c861901777cbb3e36e255b4814a652e5cbf755403b0 test1/1864 0
-36292819d91aa93ea92bd1b957772fc53bbbb620249e2e1eba2e591d5245014f test1/1865 0
-5c47414c698e16ff2baef28fb115ab819438a47e5bfaca284bcdc1c54a8b2641 test1/1866 0
-4770fe870ff9893b78f0e4db0fe937cf3800152708371fc4dd7b7ab575645b63 test1/1867 0
-3d7399c06f611d3ff6fd49f8dbb9da600ffa249ebe6423389b331ab9438b275a test1/1868 0
-908d863a3650e2580f98a625f7281d8767cd3b24bee7e7b71ad372dc8cf42301 test1/1869 0
-ad5a12001662eda98c6eb02792a393fea12829b9851f67a5f3b630e06f33a52a test1/1870 0
-cdabe686334c5a332b69bf281494f75d7ea1ce3c21804edb0b30b2b6e86d378b test1/1871 0
-807b74519a0bfe60614a477b93516e8f7db723fbe6377481f2d10d746bac23c7 test1/1872 0
-8b38195087326c8aa3a259249683f0aabccf769e0971d8af4575c2599e2bd924 test1/1873 0
-7271d4b9c9e47337315fd46c24b14418b0ae615d01e13a7d0cbafac365045100 test1/1874 0
-6f73c55a0f601f9495cb09b3b9fdc23176aefbea07ebf41d47fb848cf7a293da test1/1875 0
-af24b6f2e09951d00b3f212e81352ee8035e40634dccf080c5fd9858a181b482 test1/1876 0
-8f7fe7d7154a0ee526636bb27c69d60fc18d79e5d0b27ba00c74ddd6868afb86 test1/1877 0
-88e9c1bfc6e9cb228a7cda4e4f44e9a240f743afabe5489bfe34061d4ce7690a test1/1878 0
-2153f7d554ded0028063992dc62c5f10b63916cba1b421a5938c1a0997bc15d1 test1/1879 0
-4d0615556a29086c77c36fc8271f1e7778f5a3fd65c35790ebc3245998dc4e8e test1/1880 0
-93c5d5fc7bda4d7b11edb52380df7c328b388ac208b29cf8a61c9282093b7ac8 test1/1881 0
-8dfbb4610825bd84309f83aeb81d8c159843c5d100a79ae336c370761c31eda5 test1/1882 0
-7efcc45344734b78c1060a8fddb55ed63601ec782798e134d64bb36b9606a2ef test1/1883 0
-6c66448384f1af5daca44d19d5d330f200ec907cf4a2cbe1eb1392351a264558 test1/1884 0
-91d22848dcc40f12b2fbb15f60ab61e243f9bc8f7d68d9a698d39c240d855f0d test1/1885 0
-82a9439ad7fb158041acabd81c90b005404863f4d9ffe41a6d73e47a74d413b2 test1/1886 0
-7745fa52555d2879848b239e5b3abbd5df4c231507e45ba6a5d23d971285e232 test1/1887 0
-5cb19c71e7b69a4c486485c845f81cbe023a5fc21d48e675db739490c4096c78 test1/1888 0
-b031ef79c9102012f6d9feae9ab9715bd09debd1b3a04e8a3daed96d9fe716e7 test1/1889 0
-b59df949fabd329d638a4168ce8595140202c012dfaf2e862f478eb955e57cb1 test1/1890 0
-c69a39fcef3eb421a4028bfae7e7ce11756faf03d8cb97e0382e1fec0d16b4ed test1/1891 0
-55b4aa58006a47f9e2069e29f75c6458b01cad651c066edb419bd884120fbf97 test1/1892 0
-2f655d0e8030dc7077e4f34e7b8f8a23257ddda919efaff1d3a176f1f7c5ba7a test1/1893 0
-c78b2317981511bb3ea1d3eeff48871c358d869ed13a916ab90ca0260e415891 test1/1894 0
-2c1906380980df071bd06e7330ecaec55389fa528bbe2487a0b601712f737545 test1/1895 0
-1de685bb5a12aebf9c9cf79198a6c534ef9ea26ed464828e5622215f83a7520e test1/1896 0
-a848d2806882a7dcec34a213b8d195090009006ab39af1d73c153eed8c6ada2c test1/1897 0
-115f3efb9913e9538e20d2b36d6aed0588787cd2d0dd678cc0ab4213d3834d5f test1/1898 0
-caa58407d52ae83ab52c72b50946f804aed504088d96b36bf8a33bae6d1d5cfb test1/1899 0
-b95b795c4cac492542e16f2da12abaf9f5ac3b99535037a71897ccc6c03a5d5c test1/1900 0
-c49b870d8d55096b08483be6cae1f22ab06a8ad93f8824bd110470d49546eb99 test1/1901 0
-13b80a7439d6c482f38350ffe541e31271ae1db7c71dba0592aebe102986ffe4 test1/1902 0
-819c4ed5083bdf390894d44e368da36d26b1f305b71a6798651c21cda80afb00 test1/1903 0
-a6f60c79053b14aaf6c24e7c3c1d4571a8b99e4f7a40f5d874889851ddf9de0b test1/1904 0
-6994f1eb45af8e1afabc1c627db9d42d8ad1e002559c4305b47cc08aa9c32679 test1/1905 0
-76f783f59b951e642287c02b52aaf005e28ab05a5fd1082d192195a3c94d35b9 test1/1906 0
-0297019dbfd5d7ad1ee286b0dc5fdea19bd61210962527e0ab5d4ac59667d3f0 test1/1907 0
-513dac8e5fb5fdeed7a4e43b72d67ce0e9b9445f25f61e0d32bd8e56b137784d test1/1908 0
-f5fa5219b3ae1df5c196e25d00145e5dffc789f59c615960f38045641b920c8c test1/1909 0
-2305bdefb0e7ff37df7086d34401952186ce0404bb294b28cf00981806a0045e test1/1910 0
-9dcf6129032d5485ec277a710edde4ae374bd2be871d46d13a80a4ca9a878630 test1/1911 0
-569f85e0a7be04b7fb6d6fb5fe88c3e1b90d90fc16c0c0afc6d70e62dcd1eca0 test1/1912 0
-4a77599d5933f7fcc54fc36e8caac7228672d369552600a7268f6f44e7aabe5c test1/1913 0
-f7df9c2a03ee2ea5e78278453bbd2fc8f8bb388d482733baf6f62267f38c2440 test1/1914 0
-05bc3c621a2188ae0f57996511d338f6919c8e6375f4950dd1e5300b64bcb773 test1/1915 0
-49bba5a373bb5ff17455067e6260cdd6820734e9d0dd7a81e4c5406445af6ad7 test1/1916 0
-3f0a485789e8e65ff537e80d36fd010d0b7f532d8fc3dc56536fc4bd249c609a test1/1917 0
-8b97d47d3067893f2209850d89a60efc1793aaf6b63091553ab79c41ca1fcea2 test1/1918 0
-d220251c702d159a46132fa41c86e4197dc929066d309aff3316eef432fcf8c3 test1/1919 0
-84f30b76b6cdabbf45227c07f939a75070dabda421f2baa886e791592f201777 test1/1920 0
-f97cfc1435760cb2611f880d87b271106f419da0fc0b47d0dfd5872bb4dd2d7c test1/1921 0
-13df1eb6a712131a4ddfc7af37283cd007dfa75238e4c6875e7a567d5853ca9e test1/1922 0
-71c30b8c88b83b47918ea56ab9130e82acde49975046a424df7e994fcfcc1845 test1/1923 0
-a1bd9d56eee1f8d0b95897887131d5f54f6e903fcce3c6364caeb5bfe9a43b38 test1/1924 0
-01cfc16b4a04351460899ead11f869735271a2d4a7b4c85a298874820da17e17 test1/1925 0
-0e086756472db45a9c106422aa04cd893c85119d0f01128122a68c349aceb395 test1/1926 0
-5e07a20ac2ec1ca5d50fa2cb6d9abd015099bf4d211c495c048262f6c6b19600 test1/1927 0
-3858d01d6cbe033b6c6de39852c86c5bccbe87153c089487b9fd999cd2c3230e test1/1928 0
-bbf3bf192445e84e8a6a5c1d91f8904bac08b538a90e6ec7b85f6bb1065378f2 test1/1929 0
-d72f0249c28363f15cbdb10beba4a4a377d91e930a94f44c322cc45f3c854c2c test1/1930 0
-d08c30ee6b2f02801bef86105827ece7f521a1d49418568cb30e81ae8970cfee test1/1931 0
-c7be71fb15d6711cf8e8f0f1dbdd32e5941376a9fbc06882da6b7ec40df33d4b test1/1932 0
-d933c3ac6ad8db8fef31ff7b90fb140fa8a950f3df9c7d9c7d2717f72cf029fa test1/1933 0
-ef91320d95a5644658a24303bd57d711139c9433a565cb6c5da8055dd8971fc4 test1/1934 0
-680175f24597a27d756db751172ae7daf69a4fb8d7f1f118fcfda0c393c669a3 test1/1935 0
-753835c6a59d416bbf3664d66217cd175e2fdb0901a92289993bb429b1b02e78 test1/1936 0
-c03b01b7bb189726a304901b0c9c86027dbcdc3aad5104934edc22868c3d5343 test1/1937 0
-803a419c881708dce55bc4bd31d9e6f480a94f5f9eebed08d9c793ba7837a03f test1/1938 0
-b166405c2d3d69820c7fcf1d34fb59b371dba78599552a7d9985e1a5705b35f1 test1/1939 0
-a161fbb87410ed647555b7ac47049165b89d41d1479751af8b8f8be0f583fb23 test1/1940 0
-87f7498c84b51aad72f237b95cb0e9bd49f0b983250e1121614d20ba531e8b5b test1/1941 0
-0d1b972a0c9a66d641e020f1551f57be91afa9c811a15244efeaaca268dde0be test1/1942 0
-a55ade630ee6c2c592a8f4c3f38b0b0abfc657b12e4d9a99af8a0e38990824dd test1/1943 0
-cd292ce487ef5829569e7f71aaded18e332dd7de06099a68e9b41ab9ef5caa2d test1/1944 0
-0b43e52771a6b84ee22aad948644d7f7838c4c6aa0521046058b59185d773f99 test1/1945 0
-bbd90b1028ec6c8c6cd1ceb0e3e75ed921a1bf84c971b7f889734cc9e5af210c test1/1946 0
-38d22451c228e223d25a700e94730d93854cd0d95395d040ab1028caf9c3ed2c test1/1947 0
-71f2ad1d07f111602f72284138fbc841da243b92975e6ece0cbe999a40e6d825 test1/1948 0
-7a3daee1064f8b8fc8a6126914be7975bcddbb09753d61cfe41649fea7bf2b47 test1/1949 0
-c5c21423cbb894f7e5f572ad4827fae968b541d4712c47d6ff84acb6458caf8b test1/1950 0
-0aa4b5b23d25d1b21afa3f185fa73f52ce79e71c916d9200b62be2433cf926a8 test1/1951 0
-1f053fcc43f4fe514a5db03c9a821a9fe4a6e004299f4b8f3ca605520a52df40 test1/1952 0
-84454f0ed2e6b49604aaeb145b4068d33183e27c2fb8463be9871b11f8060a30 test1/1953 0
-2071b54900c0098b88e1b20568e4b52208314da841f50fdf26b8eafcf501301b test1/1954 0
-86f65d76cb3a393f2d1f4361034d11a5cbd202a56688b73616458b9c9670747a test1/1955 0
-7c995e508648936db3acec21af13b4f716413f7aa8bfe21ecb7123e2f4132f58 test1/1956 0
-37dfd08c3f35816064408b05159fa9e8bd2aa5fb4030ae86eb5f7a068872a35e test1/1957 0
-98ee2d54a4f369d82ad1555eb029ce96ce4628243d18546346533d4a55e1ab06 test1/1958 0
-a6f484740fff25b1e7c1220e9240b72c0968db66af8b63a1fdd47dd36d92b94a test1/1959 0
-fa7434563798c59b5bddfe7f8375a030bcb30e447c25a7ba63000980af22f7cf test1/1960 0
-5fad70246ec35f9adc246a84c90ccc8fe468b3c490ca9ca847019e7a853cac7a test1/1961 0
-cd52e4492653813feaa68704c058513e433e8aa957d49e0f933822627ad36c81 test1/1962 0
-4f3fb8097dcbd5bc614dabe0aa1169b1943a6274a8daf8a9a62c657b64b5c003 test1/1963 0
-d627eb06b1fc4a8007081fb06fa329223b02ebf05270cb576c1b32616aa455af test1/1964 0
-c0fb48a0340b89315e8f52265d10a072fb5f8e5886e4346ffe31699e6f9f3d5e test1/1965 0
-4f47d5a31ae6c2da29d3d69cfe1ce061da7434e6e69d0a350b598093a05b6265 test1/1966 0
-2b1a6164deefc223b3c1cbef79245ddf81d9d73b19c871f45f8605cbba8fa707 test1/1967 0
-398f13325f1abaef5e2bea70583724316e0342d829b8028c51f9d925bbf814a7 test1/1968 0
-012f7a3338301a4c32ba16a56122a4a7d9473ea6214937dae39022892908d053 test1/1969 0
-124566776a2ee2484789f619fc17ecf630d19eec412f393307779092ce726f76 test1/1970 0
-0918825cc50466f4572dae1919a092492e99f1b846473ebce4df892d6da2031e test1/1971 0
-8e524a089dc087fdd5d0d28ff5115a203c53d7623d1c50075d766a815e51d1c1 test1/1972 0
-e859cf693cd7bc3229adf026f429ee1e170f3d73034f0ad6eae8d51ca678236f test1/1973 0
-32ac3db65f54bff58c481b27beabf7f74385013fd8c7081894ec67c71d7d626c test1/1974 0
-8b85d0cdddf593a32dd7d442bce7ddd1c2774b60b8d76da915f3ae4dd1d76653 test1/1975 0
-f40a6c8d3a77053a96497c48ab643bdbdcb53fd86da7e13ceb8d0826fd7fd2e5 test1/1976 0
-25e29e6c780033dc8953dd27700fe7bbfaf60bb688367452408dacb0ad6c477c test1/1977 0
-5cd3e31ab534200aeab66d599bc5cf71950495ff742047d8e3012d5df6f919dc test1/1978 0
-ab05427353806c3ab929b9572574bb73cd9ba774d8ee80e2c31992cb435c89b3 test1/1979 0
-037727960fde144246c9f40ab20aa9cf677d10bd04ce643b68e6ca01c10a998c test1/1980 0
-23b7b646e41d7aeb0b909ae5d438d28edcc0d05b21b143b6cb43f5bab19e4961 test1/1981 0
-a969dcd2139397ee8946f3ed00b8a5ba7e9aa3b60725e599a6b8938c4a9394af test1/1982 0
-f345f0417cb8b7bf2b120d4b3a8231d92b637f90e846170271af705a9593c4cb test1/1983 0
-1254a67e10fa8aa5eeb3b0f1e973e320edf9d30e63315c53326ed28cd6610e4f test1/1984 0
-0d48c13ec2a2070084408bc2fdfd1e2a920a11d273a08bda48d74c1d124c40ba test1/1985 0
-9366a05f5e05aa80dd2a78f4a3a1a7df1982a00580fbb8893d783251facac8c0 test1/1986 0
-fd5f0184e0792d74b72e079275c9cba4f4881ef7ae8b17ed08460888cedf8c1c test1/1987 0
-c5f161361d01553dbd23b4f49426b4d5ba4aee47ece4bfb4645760d5af07b86b test1/1988 0
-e4596e54bf858024186a5dd383f3e4eb4920f770157908b5a3a1627299bbc2a2 test1/1989 0
-6608587dd6bf3ad7d6bd9fece08ac4be72ab8a863f4d165c4bfe4c09f4f36e08 test1/1990 0
-9f0363de671184a46a1d9bdfcc04e447c67697f8f366eda50259524abe6888d5 test1/1991 0
-aeb1cb4d0d8c8b9a063f40d10a013833881df671a4d2d3839ec072efa7b75510 test1/1992 0
-b37257bedfb10384baa661a4f126f256de5e366c2bd84787b987b9cee2a23985 test1/1993 0
-3788f5a13703a76d52337ffd75022146ad294859ecc88352ad7695d06dae0027 test1/1994 0
-08c3a981d432519786101dda8f7df65591c456eb8f7fc8636b3039186635b4d0 test1/1995 0
-a4f84f443fb3e0336b4b7e96084acde330cfa4ecd33834bfbd7205d04bfbae33 test1/1996 0
-290b5d500c91f9f489f0662a4bdbd387e9cd3c338216726a8284017f706ebe36 test1/1997 0
-d02337d3b1b3cd36fdf63914fb427a7d91ea94b68e7aee42a156170afa45b8ed test1/1998 0
-aae69e8788220e992e1cdd13a72862472ead396cddbb18fee49b22517d4c163c test1/1999 0
-f2fc5089c757507d650546f117eedb612d2408e633d434825ff74a95a0cafbcc test1/2000 0
-a57ea3973b67d08670859ae529f590fd99513dacdf34ed86590ebd7ae7e8a4be test1/2001 0
-fc06ba818dbe3a5061983e6e66a418895ee4cd206c85735adf27fb01128fe5cd test1/2002 0
-e0684cce45e93b0e7e36bfe060bd01c054b8b5be12337363d3090a1a9565014d test1/2003 0
-724555b3893127728677d2e1753c426bc547ed774df9a68a69417477fdf9a291 test1/2004 0
-465956043c792faa0d21677d70f3a4e04862f591bc0afd1a0742b93a4c527ef3 test1/2005 0
-415d75d051741b6e032323903fd45539d4ee4321dc6c79d7b62fa434e3d5ffba test1/2006 0
-dbdfa1c846ebc8c3e5bd3aaffd963140f4b192d19d287032dc79c003ef91e591 test1/2007 0
-978e1cb47429e8a245c8204d3da98b3ee76200331d23b6b04caeabee37e916c8 test1/2008 0
-b02e7dd1d6f5d4c406f4f87c9a995cfd14779c31c9b197303b003cfbd7bdae77 test1/2009 0
-987af0c9e135933eefd5e10725ea630d3d4aab181b1b97499077a34723fe1e40 test1/2010 0
-99deba53e323a3e4643aeee95870e2da3aeca8b89837aab514f138f0fd4ff08a test1/2011 0
-5116ee74929926814f398120b493a8f69bc351e18bfae4871bad4ec3bca65d32 test1/2012 0
-9f8b98c468f1e957caebe2806fb35f24d0a01988045ad024600b0b77fd535a31 test1/2013 0
-da99fbbd6ff521089e44eb76f1b99b3808306aacbe07653ad44a88a894cf90f0 test1/2014 0
-02560213f5240778ec277aab22bac23752e2aa242060e3192da0ec7b141e63d8 test1/2015 0
-772949abfec305bbc3290549b98358d3c34ed529d993801512977dbf74e2a67d test1/2016 0
-8c3c21d95deb4afdad151804d5eb1d06455ad51aa633b8857c80fecd8a4bbae7 test1/2017 0
-25bda60c9ccbd06a89356d53557508012ae0d96ac19662e62efa55342a110371 test1/2018 0
-2149544454de08bcd62d9a12b1575d39eb1cee1599c0e6943acdb64f07edfee0 test1/2019 0
-9753e14b414ac1976cbbcadd7dbacd77c9da56695456e48471741a4f67b3c1f8 test1/2020 0
-27dc711615c46afee606b5861996703ad082d22882a22537a6db8f8073e9eec5 test1/2021 0
-3baf6e83bbbab8d125ecc79b3460ddf8cb33e8589d32ea37267e50a295e65106 test1/2022 0
-aee2f214346f89433c759fae8d1fdc67c861d931c1a708bb579800986dcb6970 test1/2023 0
-8e54a04f35a410dd214003330f74df5e95281c636f555c1463d4e22b28f11bec test1/2024 0
-9201b18ce1ee4b323687103736632d422e1254375711c3f0e0389d30c17a866d test1/2025 0
-51cf056d140571ed707f6514741ea4c5077cae4b6d046bbf8919b29c9845bdf8 test1/2026 0
-6ef6e1562657d3a7a6cecdcb553a1d5669a6d90623ac70eeebb4ad1b8a22fc6a test1/2027 0
-fc2d720380f0524ddacd1607d49627f443d6b234fb2d6175e476dbd327074b2d test1/2028 0
-556a47b24cf78cc8f41c1c03ba09f15b8eb825b44c38929d98f0e46f691b7f23 test1/2029 0
-f3f8b03880691bcb075a2d29dd748dcc5a384a70dcd311065e8b55184b05dcb6 test1/2030 0
-555b1eb99a6fe75f065c9ddc91994e04508dbda5411ca8fac8eb423aa20a9557 test1/2031 0
-de159829e1ac9acb048632bcf7546d0b50de43039cd34d06d3417d466002f4e4 test1/2032 0
-c4fb9f254dadfe86156f051ca5d80f07d9a9fefdaf4e88b88315b870fec40c63 test1/2033 0
-7aeea18670b28723e8c5cc9ba5880aceeb04952e6be1df1c44dc8d0f72393a1c test1/2034 0
-7b5f139b5dc3a86956d25b30223ae6516c839dcbdd3fad747a422318ec39141b test1/2035 0
-df76051a5286d177f0cf760d2f5d973e3381e36bbf9e7940c508d434a964a105 test1/2036 0
-f86cd0a901a8cb5468ae01809998d0fa7bd9e9991429778036ffa3b2553ea2f2 test1/2037 0
-1bec861e07303b91edc686696613a4c12da7340a468230a87f5f624f523ec6ab test1/2038 0
-12000566ee1337447c296be57a103dea87e92910b8e4b845b0d2db825c3d6d1f test1/2039 0
-3084abc6a27afa80ab818b562321b817651c8051783b2bb0fda9114aba335883 test1/2040 0
-0e3686f0aa5cc15215da0a7b174393099289ef9528a41b07c95224e78e25c909 test1/2041 0
-af50cca50f833f732b6ff737136c950934177c0f6f9e5dab69506e4740c7b67b test1/2042 0
-912342d10f814e3f7f6411682dffa3fb3000d9ebe7511b988235f8e5821f3617 test1/2043 0
-faf624f64253ab43dd8c6921d7773cf7432dabd487a07d36eadcd75dc9cd3133 test1/2044 0
-c9811c2627c57a2ae418ed603f06d741b5500c9da04893c1c3c6b2a3629edc9b test1/2045 0
-93dc877933fa6a0e93600d2b73598d3caf596a0e52aa32fecf195fc879ff58ac test1/2046 0
-396aad060b3f97256e25819384e40899b5b182130dc6da08e4466e8e8c974947 test1/2047 0
-caf27d9f8b2a5ecd5e6511485430273a3bbeb2cf9ab2c3c8f0488cb1868d60aa test1/2048 0
-574b6220c843c313f5fe432c3d98f9025ba5a142c332abe26386c1e474a3eb37 test1/2049 0
-4f635941b761683e89bbc1651e63941e55a42c52ee243fa8911638d07c091c54 test1/2050 0
-5c93f5d672434468b91ab8a3d391bfbaf67987212831913e7d1d46be73a9be83 test1/2051 0
-9769916e2ce3463c297d011b7e4e04b326993d22568b585276cba1f1fa0c637e test1/2052 0
-70f60d99cc3d96a2977f69c8ad3f39604c8bd9fc2c266ed9cbedbb0faf8592ca test1/2053 0
-78052633c014e593c30856f46ce4a6fea3aa286572424214128221e7163d732f test1/2054 0
-58ccd30f7f8a26414f1db7bceee8365ed93c357b5e059e7612313c20167b080d test1/2055 0
-6f49d7a1f9c77f5607cc9d7f6c8e8535c10c404a1dd656d091428cc3f7e84a7d test1/2056 0
-8812d6fc4e9b45ec991febfe6b1be990583ad283e2160dcd2a80ef2528b2f56e test1/2057 0
-c6645400d65b0858bcf35590c5d37cd5003268d4319dc36f74d6179352d845af test1/2058 0
-3cafcbb656c9f93c1e8b49a194773ce2041a9a829e9556e02ef16d6f2e6252d9 test1/2059 0
-46aced58f1fae864be1b78c85a9c4692e4b56e46234d4aab8664679453b5962d test1/2060 0
-ff544e916891c9a7ad615c07df789458994fd841565ab326461b4e49e18f8531 test1/2061 0
-e581c1ef07c47dc70919de4f9481a1997a011df9da90cd78d78c678db813de13 test1/2062 0
-294e2fca9806b7d981fcbea4ddf4f16f4f51fdd138920a590447f2221f8906a6 test1/2063 0
-d70e7df1624cd8c84e7503a73d8191061a11bc89d712212a6fff3ea963a6f9b2 test1/2064 0
-974013f5f2eddcf5507c410500a6cd30eea8348326853daca5b5ab49937974e6 test1/2065 0
-25da8a81c1038009114152814cf04857b02da3771e0f3a8d87aee11d5382e4b9 test1/2066 0
-75bed8ecbad90265a3343f41746d342e9d3c52be4ed3c3f7b8c19539a4004ba1 test1/2067 0
-8d0d89fa8482be67902a260e14136eff8b3ac0d2968b295b36d2aa6d313833a8 test1/2068 0
-9face09f7684988a539a6b88fbe3ca868c9f3591f016283d3000bfe88d8aaf64 test1/2069 0
-fa879cec350bd7f8d5ca31812f6536927509cd92ce725cbf5114b726756c90f5 test1/2070 0
-0080a2d31e5464ecbd8842b342257bc1f1c75563bc47687f76f3023ebf6d6f56 test1/2071 0
-ac7cdcd6345ee144ad43301e0a0d9f25e63d9aeff0f943086ae135c0476df159 test1/2072 0
-ed662d8d814b4e9af09cd76c55a5e47b1c793d3bc5f1067c0050658168b15ce0 test1/2073 0
-ceea8ba1b359cd06543860307410eb2e3801185ef3d5b735a9976193a04414fa test1/2074 0
-a35ac8c5c3913a7f701f1f69ac8ecd13db33f5ed2d36ad3473bbf4d6ab35e621 test1/2075 0
-4acc15fc63e6991ac4a117070d5d2945ad1273d277e8380452fd794b88e4ec8b test1/2076 0
-a805785b91ed490e04e4436e938d54e7dd176a93a8e1c7e77144956e4899bba2 test1/2077 0
-09753734262bab88fd2b807ff9db14df53109ca5c2ded7b63a8e371d311cb828 test1/2078 0
-d11103a0a012bb2208d4b33e12bdcdff6164f035226ea057404fd81580c580fa test1/2079 0
-68c04bbba402020a7d8df090bdb6fcab2819e0ed21d070156ae2ab875d8e4372 test1/2080 0
-7d8ec113fe6bdbb576c1ea54623738ae2282b3be871be5f53bc1ff1bd802fc71 test1/2081 0
-b9daca4a5c2fc1bc791fbc7578de29f11be72c1283649c004c8cc0a19637332f test1/2082 0
-73e59d2b0035972946dd0083efd1b454aeae61173ff3aef92c9b4bb75e33e70b test1/2083 0
-6ad2013612422e84ad329ff42f5e3717b3b36ae2354055eb6f4c09364d6389a1 test1/2084 0
-20c7816c7c852d404cb669744b4e989e65b74af4a0fddb1ad573fab6d5b01fda test1/2085 0
-c72a8d561b6f54aac1680789ecb4034cf8ee18cfbfea87cf105503a8290b363f test1/2086 0
-fab1bb3aac1c4429932a95848285168e287545f071cafc80152cfd0664b13c64 test1/2087 0
-bca32dfbcee94c5f8fc724f9638a75f875235aa483c9e1a37cb981537e2d9a0e test1/2088 0
-2d2d4cead21931a0f9ccd0894cbfeb3461176291c57a34b75ca6459a96bac7e1 test1/2089 0
-9ffeba58cd126e0c3792d643e55292806ce1a70ba349baa336909cd31c122252 test1/2090 0
-792e72453f844b6cddfc9f5b1d30b048422d8d54429250a055aa02d5edc14a76 test1/2091 0
-f4c47edd4f19d89a34e058db36ea04d118dcff90ccdaa7a14accbedc37c15cf1 test1/2092 0
-5c33b7f8bfca2eeee2f988ad647adf4968f1ffbf639bb1de45c40d82bb6011b2 test1/2093 0
-04e80541df8e06207792131cc984f3627a9e37b92147de6dac88a2591fe4395b test1/2094 0
-95f1f4aee65a072277dd41bfbc6c1c531c7ad0dbb037681b3c60fc240708b404 test1/2095 0
-85b83849126f4bdf71fcd3f32c7e3c63ff2e028f2201b028efb7a1adb0758e7d test1/2096 0
-3cfa8d39871b79ef29867e35175cf2468e9ffdcf9538bd15c6f8cbffc76d265d test1/2097 0
-7ca5e19f620eef087ed2bf7bd18ee5f7c2f3a477a5ace130768c1eee0eb777ae test1/2098 0
-8590d87a7bf2d503700f072c881a0df66d914cef6b4f1a528dcf45cd90721eea test1/2099 0
-324d92d3aac8ea302772332e1138d41b205ad8e9408837a7b9295074e0738c37 test1/2100 0
-081fd9e6d4d84665f6fff53656fe17605b99658abd9a985e9a607ee8decf2779 test1/2101 0
-73f60d8606108b0ea8c32fa08f008599d875928fc5d75c32d5d9b1c80ba79c56 test1/2102 0
-2a72013ff4ff6f8dee885c3ab9941f6d65b2cc06ca3f6e06311163d4284e7fc7 test1/2103 0
-6e52936a24c78badf112d1a9ca8eb271649353d42da0662742051d4b5ef7b82e test1/2104 0
-edffa69054c35eff12ea354ae22c08421991d2915a45a316fc99e3c7a2e57bdb test1/2105 0
-82c1d12949cf62d1d2a41263e78ca1cc5939f38d693030479abe7f4b68498650 test1/2106 0
-7b20bf608434df1dcb352c3cd227e8ea81129e50824ea9bba80c4c65b19b42b3 test1/2107 0
-faf187af2ea97c156d8c0a82ea50f368a6567442993452855854a3f0af79ab81 test1/2108 0
-0da217bbfbac2048d245a176fcbaef0be92cee302bbe30a7374b43f733a69e30 test1/2109 0
-7f8872e5527dbc802aa0b5f3634b01cf21aa51f6a8fe9dec9b992d707e19359a test1/2110 0
-59503c8328d67e5bf3e54a4bab001e469b9bebd5e904997d23b5466c066f863a test1/2111 0
-59ccc13132e01f8bf0f28ccfc9bc378d3045fc04e72a5a4354ccb4bf6f0c4ccb test1/2112 0
-c79bcc882c9c41f3c6eb1d46ae8581c7c5dd4a629c64a625351c82381c42ccf9 test1/2113 0
-e393cbef25857a01396140bde495a9f6e4475a29c2be0a75ffcda7ecc8126a67 test1/2114 0
-4243991930bf0e57a257fe26c1525f7d7b230eb473d461937f87c2c9d6b2e74c test1/2115 0
-d80ca696d8976e6bc1189ce940f3d6b08d2267b07f12c39dcf5e561557c761be test1/2116 0
-1b258395256e658af89ffc02b8e8dedfa254b371723638b8e0191b575b626187 test1/2117 0
-2b0077045f83707c57eca029a6e837c4ae8febe2905f2d1708756bb8347f2025 test1/2118 0
-669c9d3dcb6fc699025cad5fbb2e223be7b7cbaa47b5e48eea7fa684b77817fd test1/2119 0
-789c7aa0a0c65acf980c234a63495764035affbe9d95ccea4f4431ceb74f426a test1/2120 0
-0318a5eff2295cfbd961fcbf40efed14ec33db73e94389e44bbd14b98b33db5d test1/2121 0
-ddd79486248bb4b7877bba59b88231da2d6dd15cc3c0926712fbe2e3245b975e test1/2122 0
-0fd41f87b83585542c3fa40f9ad924929311e46ac79e2819e9e9a92538fb19c8 test1/2123 0
-08cdf08b96a508663c2a8884a2081546184ea04c6ae7aaec788fcba62e051e23 test1/2124 0
-0f5740d8206ee2c138eb953c480d92afae885c0b53c1d7910eefdfba851f133c test1/2125 0
-22487321e277e3cd88024260b2d66ea299ee912e581b24ce95ec37b3eb1415ec test1/2126 0
-bea4fa7c1ff5a9f9065fdf0ca5390741caf20e65f94b68a920626cde896979c1 test1/2127 0
-c0d8e47887cf3de55d432e2c69c052caf5fa5c43cee6e4f7805a3895a4ca3ba2 test1/2128 0
-f2f4db7b5ae658302d5660d7c79e3dbacfc66bff591064f5310e93f2b8a48490 test1/2129 0
-f4d04d4ca4467cf972fad0daac890d7b7bcc1d07d2622789c73ac4345daae4ad test1/2130 0
-c724458f80a7277123ca2a0503dee5cf83674888ae49bc9faad1deb9c6a9bf25 test1/2131 0
-f4f8589d0fc80e93611b9585b3b4c01b3068f91af704fffd0334d1ad80033c8d test1/2132 0
-f0da71301558e05567f6e34a5c4c958b71c97dd42774a3307c7f658290476bab test1/2133 0
-b06126a1af8d5069796d63c3b676f93aed00328090615d13cb85e2e778ae12d5 test1/2134 0
-394b9ebc191cb1aea0ec39aeb89cfe2d5fb9b4b95d8e5c95aef88556244816b3 test1/2135 0
-db033c9abfacb61f865a5dc1176dab01611a3ff25da67f559fa42f86e436ca5a test1/2136 0
-e24b35b6de35c1d637f4516d158a0ce71a80155da843befa0f57983646055f47 test1/2137 0
-d11a904c37eabb4a8dd137d427fb02413b45ea159cb43d46af20b68bbc835324 test1/2138 0
-b3234a01665a0fb74ef51c75b06961e02ba144cb4cda4f3e596023dac024c3af test1/2139 0
-360838526e1805b991c0eadc958725397c8eb14a00a30572241d4d33d6266c23 test1/2140 0
-7eb653f896e16d8f305faaf69a6931ca247e5e4f5d2d2c4ea2fc53e60ce6fd65 test1/2141 0
-6383f1ad0b124b2badd895f57e6fc8d9abec80569ebec2520fbdf4768cc0d831 test1/2142 0
-315c04e83cffd42367559e9df7afb6469f9766ec8b76c127f75465b7341160f3 test1/2143 0
-2aa2092e154502fa193bc31b1155dbc84baab5d96d8ad1754ccc62ecb02a36c9 test1/2144 0
-6ec1a9209cd9294aacab90ec3d3eab12182571ddd317d55237f5396484cc053e test1/2145 0
-d3c19b76b10c0a7da077a409ad6f77b097ca819d606ed4ad53e44e9ebcd26825 test1/2146 0
-e6942d180966f814a074a3ac54655c04c236ede67f7f89db1ee8dc6153cd0762 test1/2147 0
-85e7c06031973289383389759a0f5c0da36b49e95ea30d74de995ea67982a9a1 test1/2148 0
-82a766d7132ed98ee86dc851b0f613bbb31fbc121c5b97f17b5924cf904c9b87 test1/2149 0
-04ed017f3a83e0f8105dc8115a280e6cfdef67810e4c1bed9e876688c2dfbd6c test1/2150 0
-b5cc432d3160aefb23a87c7b188d07fdf47cc83a8cebe12807111924d542f831 test1/2151 0
-76549b98fe9cf87340aedac605397994d3f25b285df236c09810e17e9b233b22 test1/2152 0
-5b1bb1028bc7e35ba03b810c58e28d5edffcef165c6ad999e910e95edcf7806a test1/2153 0
-2de7956039012303cd0967a79456c5f1765eddaf9aa2aed88afe7a798958f91a test1/2154 0
-3bd48a943a8d2704ff20a3ca0ed51f1b141fb38284027b890b819440a9f5a04d test1/2155 0
-a8ab62dd72c8888ee50c733c09b4fb2fdbc1abbd028e751ffa506739aaa0d072 test1/2156 0
-d20666a320810a890dbeab10fd1074049209e1a749b08e7655eeadaab3028ec7 test1/2157 0
-ed7fd00850d41dfb22aa24fb5ac1b56a3f3ba231393a9f51b0be49c0f3a38500 test1/2158 0
-ec036eed64897a217aeb4f395e1927b6c9b3ce64a6cbc8f5e8bc45b01e7cac00 test1/2159 0
-c275c8d704364300b083f152cea8852532bd543a23be8149175cf347c2fb6fd2 test1/2160 0
-2c09070a35af89637bcd5c5fc9b5bc2189a89c9d91dbc63a0a457968df52083e test1/2161 0
-c861f68d23e660c1cbcb93ed82b8baf9ec9fad118c97c376309b37c0098268be test1/2162 0
-489e11496c865a395c72a880f7725ecb64b2dc9e9c03c1540d3f08aec0785400 test1/2163 0
-ea9ef3fa28ef27c1d027e6e44ad1d90cf6db99e157126b3f63c7ea83d0ba116c test1/2164 0
-58658b3251a4762f976bb7e0689dfeb877cfa8d09d6e806e0be726b788459abe test1/2165 0
-9fca02fa463fad70b41421150591134fba909e7bb1a3c231b49604461c629a19 test1/2166 0
-7caf125719b93e5d8da83187e1d708e7d899f48b41e293c3f0f0174e9b1f6960 test1/2167 0
-96becad6a1eb038404b77f35723611fbe6922c44d5613d0ed4cfde27c8c6b5de test1/2168 0
-1776bb421a59345bb64da6487606abb1d59bab511b89beeb420c8f88b9ec5a05 test1/2169 0
-3c05a706627e06d14bba52832d488ad32b57effa5ad0b671a11834af0569d480 test1/2170 0
-6088f546ce3cc22b9821cafae8a734ae82ac7b6850a59d8130b1538a133808eb test1/2171 0
-866da6798244c9cff3bc57102efac7d7d718eafb27ddfe1426b3eb19e9628c39 test1/2172 0
-3f7cd6ea845bf30f115b45612c2872b2b8b31ab88e7374a4a70effd7596a00ce test1/2173 0
-a35ea33ffd76dc5aa14a60617d57c1b9b790fa2310626e7e600006cd4a73a2fc test1/2174 0
-c0156417c12977af7851fcd620f6d254c0049b80996ce8aa6d0181f481e5a91c test1/2175 0
-8c12a0f360205d8b22c757c790fc94eca3cb591dcad5df8d652fc34d30f483d7 test1/2176 0
-d905c4a755cff0ae63de516c21dfd75425d34131c21bee984b97b14167da1fd6 test1/2177 0
-68ff55690bf216977f48867969e76f864b698a78ee7b3291d914db50a43fec0c test1/2178 0
-acf1ead7dfe1daa0f5dc378fd9ce826f87d9cf86ab37e62c9d7221f06b7946a5 test1/2179 0
-36ceadaac2a27e39d587d31772279256a1b151020b45832b9eb08ef0e6a1fee3 test1/2180 0
-3f3fd6ff065766b9d209df1ac2f7572cd18a7251b83eeb316f26659bc07ae668 test1/2181 0
-e7d480669048fbbfaf960aa04ee35729dbf991560ffcc982bb283656c6f8cc3e test1/2182 0
-a00130d8bb296089d2e149bfde846a16c04dcf5acc39f9b38ba33c62ecc1d7c7 test1/2183 0
-461e5474dd217c08207fcf2df16a7eb7713c2b0fcc22a75185e0607924ec81ce test1/2184 0
-de89b13084eb1ef620a48a467bb0337b0efe20d7dd6eecc629cff1dc4e5fc596 test1/2185 0
-e29ef8e4c5e18fd2453bda0e3635291e3e612febcdc57dbe138e31d6b44c7ea9 test1/2186 0
-62674c4f26be0f37825246a00f7e07b53657ad9403613ce445755f8928b9259e test1/2187 0
-b7bfee4a0aac049a3e06c2e608b8e5940c649da03f0f312563908953eac5333c test1/2188 0
-0a0e0b95504205e33879d3a873e63b5dc592af6cb8bbb558ec976769ec1d0636 test1/2189 0
-e200b81649e98cd63c78ca9f65dbc02206f4fcd7631fbbcba0b38bfb5b1f21e8 test1/2190 0
-fabe0e2a31fc38fa5cb7d980cae9605044fb5a2f98f9147f003785808e1a6d3c test1/2191 0
-9891e0ae0aaf3c4de7bce58d0510765eb210f8ded5963bb213bd7316756e80b3 test1/2192 0
-f20c72b5c859215fde4cf7e5843a32770a010d4b0030fba108867fce06be7ab0 test1/2193 0
-6d3422048f653bbda50f04dc2136d58a2c979bcf6712cfb7c6867390b400656a test1/2194 0
-4de489f5a822767a296ace3cc0fd130166bab3c9d01c247be3751b1ba787ecf6 test1/2195 0
-cb37148b56ed468ce464032b4989a7f9d66317d68871b74ca3b94c87ed3fd82b test1/2196 0
-9dee5dc891803545e6c3b062d64062421f410a8a1939beaca7997a228f561cb8 test1/2197 0
-b76345d2e877cd95c45aa02769b5fa41e9272355f4f1208882ffcd99bf6d4460 test1/2198 0
-fb88123fcf04f0c70fc765dcf88168ca222513ab1256c7c0d39ec13b35c15966 test1/2199 0
-dbe2e3bdf666f6193b38a2fd892aa2f23122f840e8eec20b65d2ccd75da43b95 test1/2200 0
-3ee28ae073112dd4f510c759e7427143d7a0b780a48767b1ec204890f397100d test1/2201 0
-e900536b4cbd4ee7be965976229a53f87046d447e1bb6502c6d76319d6b1bfbb test1/2202 0
-5f64f9ed8d3c960742049e7ae15dfaa7ec14b6f6c9b3bb1cde2a7ebcacb5ce36 test1/2203 0
-6bcd87e5f17bc2041abf0d1c757eaa1b5aa82c179cae580051f8e56a177c2327 test1/2204 0
-c4f52442f71576754fcf2479a5fc02d34a2588f9a07ed1d9ae35e34dfdf9ac8a test1/2205 0
-d93ab242a2e2b899e43bb37fb6b249fd2392b237e3926e1f04a5b6e186c297ee test1/2206 0
-414e1de8ae21765691a7206893222e718daa5c9eb066c00c03bb6bcf2dcbf768 test1/2207 0
-6390be28c5ab8cb3b72285f407cf25fccd573435d06c777eaf36a39b20cd99ea test1/2208 0
-1d2048f4bf8b800dd281bfc824731fc21d6e628b06fef22e178f908d40603526 test1/2209 0
-6c87236949d181076af920f3f2f4aef6fb1f41d30bed8dc9484676d244de1f86 test1/2210 0
-a018ac3b6e398c0ddfb532c809f538bdad61c06f6d15ab5955bea04a826dd1ca test1/2211 0
-6b2885193e15bb5bedbb331304b7b1ccb63bba76b624a9d31f4d7a2058eefbf6 test1/2212 0
-71be9c1a635be1de654393d78488942dc1f495a629075122933b3d52a6998b93 test1/2213 0
-e26fe0db4a9bc8fc2ca52d1165b1ac606bb4f2b65a8397b3efb2e7eccf0fb7f8 test1/2214 0
-82902e276c127f20d92e3a572ef60489f8d8b3613c5c6375d1c1bb71ec92de26 test1/2215 0
-81fb777852c4148a34e4c25036f5265a583175dc2f4671e93a8240e4f2cb2efc test1/2216 0
-f4e07cc26a1fc35f001cd6a60a5a29081e062f64da947b25bd8abf842ef2390a test1/2217 0
-0603f6eab57e3a9093308e967eac700507c99ef6d492fab55af0bccbe12e6912 test1/2218 0
-a6258fbc0a8a465359e5bada52181319a8d06aa6c139b8070fd4b506c3ddd0cc test1/2219 0
-1784cbf7e094e0220f502d7a1670ad5645fb25d62aaffa5425dabc3523955d79 test1/2220 0
-873e8dfbd4cd5b2a45866eeeadaf2b9507be9ba0f50cc66bf2b3b8fcaf61df26 test1/2221 0
-821f2903f7919d6c840d9aa476deb812703bfed9dc686122ca460caad652073d test1/2222 0
-301f58af68a48893985f5ee15b1fb66b805093ef19366f77ec4ae4c18f38f806 test1/2223 0
-1c4a437b2a87e762ba74ee03a4f7b3f7633fc41da1e0978c5bd91b9891d0496e test1/2224 0
-f7580007393af10557bc0a4224258f6f98df0ed7d4a93f3611e74f2ad7d20e0f test1/2225 0
-971ec0eccddec5192de7e11bf7a88f791d7c2518b9aeebfd7ea63a8414dcd314 test1/2226 0
-31397ca48ac1c5a49919899577e9a5da4d404e93b9b68a6b700820281fc4bfb8 test1/2227 0
-d4e0c5523825907a0b5b4b743baf3c1cab56e81618894913a34d8bef4d5c2b98 test1/2228 0
-38785d0f524364d5c72e91da9f09b6ee1972c967250c1e4d5bce8d8c0acb0fb9 test1/2229 0
-d3f727561c4f86e2e1f67daeeab7b8adf8786e7e785d6a569de77001971ee3a0 test1/2230 0
-df71d84a18460f3e90d400d864f201094a780dc52c863d7ba18a73fc13a30220 test1/2231 0
-4c28ebf7fc8e5444b63bb60f6ca78f15b011b52c2dd2bc5f5df0a6faaebb5c12 test1/2232 0
-5fb1e135aa50602716d43630ab36314c23fcbe77a2f8af65e6119b6d09f3db2a test1/2233 0
-ddfa0bbcc01c421645fc1bf729bfa57b8d1d1c78733358ef0526ef344fc752ac test1/2234 0
-c8ad0a4aeb9ebedd90f5144ce23675e4ee63cd0897ef6f26f7710be7a27b6034 test1/2235 0
-95a8d244e13f4b7f0a435340523c672aaafdeb9b7321a2ceabf1d0d0acbbe538 test1/2236 0
-7aa12528ce4dd175942ffbd68b2f4bc18ee3c171c8133dcfb38dcc155b4e19da test1/2237 0
-e8616dcdc384e828c15e212977cba3719c07e3ae5376c7c5d0f111c6e236a9a5 test1/2238 0
-208bc77523e3d31a346626bcae4abbacdfd909726532fdb80793b5776d869ea5 test1/2239 0
-87641d98b0987bbe98f7d0a41ab362c5a943554459e41415d99b87659ab7171e test1/2240 0
-c08ea31837ea79b6aae4772def1054c8e336fe26e81b8f0530442a4a9e5c975a test1/2241 0
-e584586c9171e1bc0fc3b4899f248c7616bd6aefd84ee9a81d7dafd441522113 test1/2242 0
-3db0e29f9645d2ce477290f1db861b6a1c1b5ad25a0da4b629be5ccfabe5ff59 test1/2243 0
-1de1cd7a9c2d30904e50f96ff02d6d688ffbbc50eed160dd3e9fb345ffca191b test1/2244 0
-66a82285ac90f46b66473fcf432c0a6014ae109610eb47de7265b7b41979abd9 test1/2245 0
-711f07d5aeb97a496fe0b33de80b830fad6ef1ade40949a2316bbb2b12f7bc98 test1/2246 0
-27c6aec840d86f4fe1b4b690e41934a1c348e107aaca89dfd4ba7d9c3cfb56b0 test1/2247 0
-7133d5470310cdb16f1559d50f32a1645963e1d2939e155d85598e742dd78555 test1/2248 0
-c4879a1a3cc11906be34b373fb58f68ca0308e90c091f29eff35e5213533fbf0 test1/2249 0
-62b527d8e73cce8693a8b554e38564f44070b53b11cb21bc249e0a607fd3df9b test1/2250 0
-e4d44312e6bb15594077e448fca316ff59c89a0f78b7fe94140f9f76962c2539 test1/2251 0
-52effbbe022ce24d08e70ec52f9ad6af681c714bac879800cf7461cd959da89c test1/2252 0
-d3aa23ccc3d32727a070c347dc2e182ca7402458eabe08c3625c38613fde5db7 test1/2253 0
-dfefbe8ffe639dada012c016c329d46968c3c9038b3f7e84281e853b1a511d33 test1/2254 0
-c1bddae075670a3d60babdbe21f47998a9dcceab38321bc184c444ccc66cdba4 test1/2255 0
-6920a1e0625c4bd268efbaef5df26b5924ff3db2832f90becfbc8690e2304567 test1/2256 0
-4a6e94937f75d0ea80bbae4c77b51a1cc67d21f9c9100df16cc9c21a7a4c9f7a test1/2257 0
-be0801bf012d6709b58e74f44f5e6e241464f2141ab581b0ebec9a67d58a0fb9 test1/2258 0
-7491d8895044f4f468a08736f05f8088bb037857cbc42a960be42f8dc585ed7d test1/2259 0
-d499227875a49306bd9db5b846f285fa28dbaff7e3ae867626dfedc15e44d56f test1/2260 0
-7edf5b1fc5af09ea0537129c7c9bd6547db4686d7a71bae98259eafa155b2bc6 test1/2261 0
-1ba4ac6dda4d088f3fcbe6b066fa9b26ad9986a4ce0e8e99ef7ab1f750befa49 test1/2262 0
-c2ed9cde01e7be231b4b2f9bfcfc2ce1295137d9abaeb408743400685457494a test1/2263 0
-25239e447b454ad0e1fcb12fde8f2c490c9c98074b7bca86a3ff9a8b14bfd81d test1/2264 0
-0b00ab860ec9d6f9b0d681edb78220a52d594c46cb5e96251881d4d5cefadcfa test1/2265 0
-45633ea33b9a6f0bf72a6820c52492724b46a94cb1c255084ee2300be88ba5c9 test1/2266 0
-cde670ea5cf9abe687ade7445142b6640c536c5f68f82f0d886738bb7e385778 test1/2267 0
-3828affcaef7022f02c3bbf36bbc5ee403ac6848b4d3312c145f62d1930c4c1f test1/2268 0
-4394a95253b2fb44ab62a28cb9b8fc80ebd98ea4353a55216f5ce1beb642f78c test1/2269 0
-9a12c7d3977bf8a4b84566f6dc895c196ccda531e508dc94226ead7e40fd6dd6 test1/2270 0
-74401f7c1d30d9ff9e83282ba8ea64ee72684cd60a69cf5c6bc65f5c9df1ed0e test1/2271 0
-1a1c8675d4241608b2a4e54fb0c68a91bd85bf3ce5f1d7c89bec0cf3f319b9ac test1/2272 0
-2d83a06503fd401bc2bc78843ce2961ddd3b9dd78255e9940158f871fb742c32 test1/2273 0
-43287efb7b4b4ce4a68d411bc49f816242a21d7131862a14c5df6ae2b2bed44c test1/2274 0
-724acbf2eb91890baad3b61f9791de4d4496d1ced5ccea1b6231a631a17453c0 test1/2275 0
-af880f9f410bb2f681e4ac80392f9078e1be1b95790c529bbc1147adf82d253c test1/2276 0
-bc259ed94a5a1b888cbf0c20d29b1741f5fe97713e0e7d73b6d635d7a03269ef test1/2277 0
-0b87b58fd36c28343d9db03e510c77151a4b1f441628d1b4b95295702f7e3a67 test1/2278 0
-6ac0c628d595363c05a41fa416f26600cdbd5ff09be98fab6af06c10991fb748 test1/2279 0
-906e612f065d8a186b2a6c7aa960c36434e68c35779930fb6f5ac944b5d2bc30 test1/2280 0
-0e12d9c21fc4e66eaef5cfb2addb56738a38fa29e0e3db42e81cc0a8bf76afb5 test1/2281 0
-a31d03d82072afad06fbbeab2e537f4b224e3d84d3f1daf527299c88d41a2b74 test1/2282 0
-1ca5186c11cde566b424286070dd5e3264fe18eb4813ef3786d2a1e7f034b674 test1/2283 0
-de168c0774e0889ff1bb883275b3bb184050b851ace959668b9dc38332c640d3 test1/2284 0
-86ba74295293b18ea8308b26f8527e68c971f01620b04ad01d8e874eff0d048b test1/2285 0
-2cd2cda97a3d33e23567ec2610ad5d4037d1342752078bd5c5be56fd640a987d test1/2286 0
-2f7d15c20e3e671ad915c13c0ead7529891ae855b57a1ff78ed3a99c0c850141 test1/2287 0
-ad3f1eb48828dcb89fec3090557e8168c6967ced3ed41ca2c11089d7a783f50b test1/2288 0
-1c56e94f0a52be7b4173495e8554dde3bce24ef21e36da704cc6f6a47adfa250 test1/2289 0
-86513501f54e4c87e6aa820f11c1653f943af0898c55e5146bb1ddf8a11fafa1 test1/2290 0
-5d776ab429901b67d57ff03876034b355fd5fc23cc7b44a57ce6b9dd2b67f0de test1/2291 0
-563fbc233df691e957161439a1fbd1bce8b9812a7166844cfa096da110c8eadd test1/2292 0
-8e28d033b2bafc2b16f804b6d7848c99439eed8f20f40e1f3df2abd4ca49c4fe test1/2293 0
-bed83a643ba5737509df8584963bb1aba2e60207c5b0e127b08069e9a809f291 test1/2294 0
-611b7a7922874e14213cb67af3e6533f70926d89423ef7f254f1f4bbae39edef test1/2295 0
-3d61cf474304d1fc298597932a3c10527ac9d28ec03ae6cf2311bd1c5b19984b test1/2296 0
-b8d9f7a34c1e84ba823bc53d98897a024bfefce5768623e6b8386d546527a0d5 test1/2297 0
-a21e7f715f2dbf5d92a533f49b0005e3df2871130dce1f35ecaf97bd0be0dfe3 test1/2298 0
-615704fd4dea0ff2d7353b38c2a818918f4cf1c37f808630ff61e7edff039faf test1/2299 0
-40a81358767a2fcb5676c8b9d61e28406fa8e0afff74b784d6836b4afec85ab7 test1/2300 0
-6e0b42879b572aeeafae91a23aa00273970e44a631407532195da146b1163fa4 test1/2301 0
-39fbbf6cc306c0e360807aa8ba164bd24965b606c09505151c8e3518155d963d test1/2302 0
-53260895507943a3a96c3e8e159b0cc6e3a195462e61f508b0c00d84e3d03658 test1/2303 0
-d7d8472b0a9ff330a28b9eb0080e9fd948f6f60b3d3e88509311d38faf11bccd test1/2304 0
-2c83b8f7f67e52b610504e9be07b74dd2ee192ae62c0e99048556d1674f9e388 test1/2305 0
-56c829f474b8d8a2fd7c88dffcc96d38c0c405afab0beefd7559e3c554f4dbb3 test1/2306 0
-515b3eeccd54459a6a52e5f7e86f4e1edd67e763f8beece26abb749ebdde1035 test1/2307 0
-29abb4597da4237a720c59094edf259344f410bbb2ee1325fe0b814f7ec932f0 test1/2308 0
-f7eeb4ea6c91513ee1d4135a34a59259812a13647cc2056d7e43da919b096f07 test1/2309 0
-36db0cb4db02b1eebd6e8f8b2b53237e943c976a7b1ea6d0c502bd602550417f test1/2310 0
-2d5095c498c29d4aba60dbe0c720ee77c53a47ee16e9272f55891795b86fa40e test1/2311 0
-bf7e521032d6d93e98d74710cd2e2892eb7db73120bf867721b449a0baa0f4ae test1/2312 0
-df39aa328871e3ac621a88949d3e574fe7b7b75b509f2108a7734a4831f07a82 test1/2313 0
-c14398370f6c5e0f7690c6e221ec6dd7d498fed32b2929491dfe8df9a12ba52f test1/2314 0
-96cd7b39f3b84d2e170c23f64e4cec99b02a9ebbcc23cda56fd23180b7a8af12 test1/2315 0
-b37b7d30772f10510e1f1a2650ab375e8b34d0c78e1de1c5d742520a899d798e test1/2316 0
-fedfcecc3c964c03f1a817a8a1aecb8edadc39ee2905ba3e68c95514ecc5bad7 test1/2317 0
-86f851835026e7806545371a027a482d479180e0b415788914084f77a3ef84bc test1/2318 0
-f4ec3e4499273e2129c60034038835dc00272ad54cc61598749df6fd872019cf test1/2319 0
-69886bf893b2a3257ddf333c8e49c09533b5de652a486a58cf79c1db04b8932e test1/2320 0
-374c3445ce9dea2b03fc0eff9ac1ca91970e40d644b974f34f1869b55d50b2ef test1/2321 0
-70e68888d71eb11a7d1abab32c474b79f7627bb92c14ddf6874bdb9fc6a5f57b test1/2322 0
-39daf1b5e30ab00dab233985a4af243195593c09bf5fefd7aab27fbb30836e38 test1/2323 0
-02eea346fc98d7bb71052c6514f990162b265b82240fa608950045dfd0498fbb test1/2324 0
-37a6a22ab12dcbc97e71a1133c382ea04b45959ce7a0ae9bc72a228c25a1df00 test1/2325 0
-0379b1e3af3c7e9caaf7be0d3fa2f5852b6b3f93f04d288c5273200a62fbfbbe test1/2326 0
-30e8c83dea3078cff5800e05f48bf18699f693bf3e94a2b58d4f85c09fe3cb86 test1/2327 0
-dc9e152ca7487828f3a7a2a3dbbfa3e6ec9178253e914aa52d05e19a9766afea test1/2328 0
-8a916424f2d248e4128eaeb133c7ce54f0366aa0d4051c047242ac83a01e4e14 test1/2329 0
-7a00aa0324c112bd053e18174697aa1cb3513b812e6a155b7fdf1d4d8b16e134 test1/2330 0
-881dea59d0001cdd72e2c7141b0aeab99db3ecc17ab3f0300c77ba3f84fea218 test1/2331 0
-257d71b0f8571141e5a10fb69f082697de8b80c65dea31dfc886de8e992e0c62 test1/2332 0
-9bc10152d613f420c499e68bfeca0f1e8262dabc26c76f25a9b991abb0d05992 test1/2333 0
-95be4121962826fd7282bf0a6d52a1c22b5f995e252d0d706cee3cb2af557b1e test1/2334 0
-2329a90712744157c169bb1e3b143195214808c4e0c1f43e2e4993cecb10c923 test1/2335 0
-3b86b7212b09521633c6f8822209d4e685b6066ccb40ba5100bd3abdfa140836 test1/2336 0
-a7d04532c14e7dd7e416f2f0cb05d3c07e19b76ba9effc752f1bcf9eac676d07 test1/2337 0
-7dbf9edaf283d9678580da8d057eb1f786886b24531783ad8dcb2cebb7c905ff test1/2338 0
-c6a8ceeef6a39d06d39c13e616f1507eedee5908843c73288652fd4e3a1eb9da test1/2339 0
-25e82a20c11b5a9ae6ca5ec0cb125690035904319fdf7e9f66025367b7f5da39 test1/2340 0
-fefa25082755287d04442aaf3915f4ef19bc17c79a2b6e3a8d6b79dccaba3363 test1/2341 0
-e05895af38e8e78eb95e4ff28c26e704ae4f0c5b51dba87322ba7e624abd9f90 test1/2342 0
-5deea7f282c1e994879963530eb2b4514fe5d9be01e476661e0629412d1e172e test1/2343 0
-745f5cb281b9f149404edcfeebd2a93f0a4f83e122bfc22cd618868810748134 test1/2344 0
-eb91fe2606c0528d64b37dfdb4a33c6ab3db14ee5fdadcbd2aabaf33ec4793a3 test1/2345 0
-7a9bc14eb4ff9ee0e351875afb0551d8275287391f6ee5248f2f7b63b37f2d6b test1/2346 0
-1643976f9f41a3894457a466c23f7a980975d1a67548c501860007e8fab0dd10 test1/2347 0
-00e69e93805401e337df6700458b3579a7be1d80537b59d050f222b14b19ec6e test1/2348 0
-c2fceab6e1711d234c537f6d558e811ad4f8f112aa28a6625939455806e258fc test1/2349 0
-4d201b8ac1136e6330e552c3ab99bfee21e203d277031f970a2a634d47a948ab test1/2350 0
-0b72599e0925347e780d21288bae40a0cf0a124c94b433efc067ec58f1dec35c test1/2351 0
-b7958836597552f72e9da6d32fb2cd60e61770880cd1145ebd67a47abd0af5e2 test1/2352 0
-0fda3ba7491dd59350ab61ae431403789ea99b677939ee8a14670a1aba3ca08f test1/2353 0
-25192b129e910219edde31d9ebc723e07ec3773fa343e3d4631809d73473f136 test1/2354 0
-af48eb8c8f9f17e12bc63e7f4971bf9c08b2da5f4dcf25c85772bfd91dd56e10 test1/2355 0
-48ee001ea8db780d0d00dc95b0cd2ad865150fd47016950ccbfa953518043f78 test1/2356 0
-a2e19e45c74b08a398e1c9bf17ab28de9708f81f3c80cba5040729d5dc7a87ee test1/2357 0
-866c3b25c705842e041ddf19d2c0d9c3ad8e796b57fedd6b9ca9f98a6f4fbca8 test1/2358 0
-bc11eda44621d1dcded27992410b64141e2f613d2b7e215dc7c5232b8f2eab59 test1/2359 0
-f75e62a0de545b2df3161989c4428b27518318c193cd56219055b4641d597aed test1/2360 0
-aced475d1cde49fec0c0defab7c70beedb78d3963da54a90a77e97e2addeb293 test1/2361 0
-8c389dd574494d0d1ba4219e2ca8a8aac4caf716ae50a0d651592214411d12a2 test1/2362 0
-aaaafe06daea89591cd44e8279182e8232e4c7041dc86869604001c40a977dea test1/2363 0
-c9dd4c6a16d5c24909c522b7cd6f074b251dffb980eb0bdef96c13403a0e4190 test1/2364 0
-532fef9288539f6238d103499e4e614bd90c97c133e7597aeeae2b98f05efab4 test1/2365 0
-ba51ccf692272081a6cee093a0dbb420bb65392b799cdd78703f2fa0cf4ed2ed test1/2366 0
-7b1ba277b61b3a508abc8ab6cbcfd020895eef7ffa15701a45150f6af334f260 test1/2367 0
-c12f970c06df1f843d154ccc4dca18a57b85fc905f04816e7f16cb4d164f3ca2 test1/2368 0
-a800b2c8df6e165b9b939b0980282a943d4ea383b452544c13253162004ff0df test1/2369 0
-3e15f1630ee4ee7d3e2e5432874d016e8e3680e7cec2ac9088daf8205b56eb4c test1/2370 0
-f7d18c4307ab897292a80ae491ba2b93697e141f5ed22dfff634b4cb5b42ed4a test1/2371 0
-14952e6ebb7a0c890cfefedc26dcd3dc5852f7992b25088b81b0b8070d0f3460 test1/2372 0
-2a0cca81ebcbb0c784d9894ac4cb601362707acfa3eae58d238d9cd004c75414 test1/2373 0
-eacc97edfe5aa1e58ecae2f1e40f32a22f1d110b1cf1eb260f3826730efd15c1 test1/2374 0
-0d40ef7968a0343207fd7c695f52d0ca835ec2007a84e5c99bb9a382e7e08638 test1/2375 0
-7aeeeebc30f2b2b282709fc370afa85cbcc835f5278c61b052d1032b496f2172 test1/2376 0
-af022f91d4553584b782a6d8ef97b5630aa225f57f33b97c08c070b63fc2e764 test1/2377 0
-03d9ad2f646da281d88a2a9886e1a5cd3d8220075def647c742d0a85a4244274 test1/2378 0
-d3999e1b668db4d2c713e7c73d2105a33215cc09735c9664abdce384a6b02446 test1/2379 0
-886c0b823688629c6d08a68f3356bed3d10b13e0a745c71ec991eb7d0016c827 test1/2380 0
-5ffe5fd73667f65e6b020cd91dff21d06bb0dab94edaa0c642a388b250e1118c test1/2381 0
-01756c42aae4ec96e79d59311852f1087d8654743fea6b3fd8e500834616499f test1/2382 0
-34cfe1bc46dcafccb99951bb462ebe63f8b9f360251ab19f72770bfa9cb41b48 test1/2383 0
-dce5c60cdfe45ec8bbf60409dbfccdf78843fbcd8375261d759187fb63a5b288 test1/2384 0
-673acba4e97f5908f348cdca1f191ed5d2a0bf5ca982bc79a979392bc2e2d860 test1/2385 0
-2e182c7625d1bcf780e8e322a1e61b64da2c9d39d33a10a9d49ac70dad4a5e07 test1/2386 0
-259d1a68746b600760dba18e34cb8a748db65a91f3966d05c25770fa93855135 test1/2387 0
-dfef7c7aa36dac5e609b29c1a59c8df3af830140bd27d708ccbfd1cee4c2ae0a test1/2388 0
-ff97050cf7e735e2ecb466a95fe2932c20d02ea12a1f6944880dbaa2ef26181a test1/2389 0
-01a4dc3d1cfaff8599cb5f8ac757a35e899a62a68741b6291a9fee6caf703d15 test1/2390 0
-38ed499b93cc7132d807e2c271df651657fc81757fd680b04cbe3a01ac99d844 test1/2391 0
-fc95a141fe5a83b3b8302821572bc921a7755fa7c3a68bd1d4156ae7507c3586 test1/2392 0
-5e15542fd02dd79044759a50bd93a334b74104afa89646f96349c05217f2f10d test1/2393 0
-d6a0bcf8a02c5ef24ad4c0fa18cba55a91a95e792d00863aeea86c09bb2d46e0 test1/2394 0
-5b91baea773e01b211f38f6370354beb3a7636dd9d97462cd1d89430fb5f4414 test1/2395 0
-f5a7545762b1d8c8d34a0508c7bea9408b508d477352b4bfb53ce6b001ee63af test1/2396 0
-cdc8f0c52ddce95af42588ba184074079dd5389c0f977e892a2d1d17b8754732 test1/2397 0
-81f8936ed4e92298f2db72aed8b084ed7c71f27c71427aa012e85f868b86f0e1 test1/2398 0
-0794dad518bfcae5f3b2024b60f277d235e0ef961455bc5794840c4974c072a8 test1/2399 0
-f2c4909af9f2a0f5279af60a1d63628dad083deb9908830625980380e4fbe742 test1/2400 0
-9ca5247b59bc1de975300efdc1d7c2ae3e01c2cb91a559f8a1d639b84ff26a3a test1/2401 0
-885f61bb41bfab7cecb5da7fe74e9a3ded57dbd294e275bc57e6ed0e051981e7 test1/2402 0
-9282a8ce43c327e28cabbfa15d1e6e27a0c0e37baf3e89dda1a8cc6fb8ac176b test1/2403 0
-7b10077add5c9ebdd4a06c3c9595d5ff5801f8ffae927d23c2b500b0938adbb3 test1/2404 0
-fc70b543147f497ffb7321016c0a9022d7e38e138bd05a03008984dea7185947 test1/2405 0
-7901d3859b5123727d36890f03ff6edfe78453821e8e001971e533e896238e10 test1/2406 0
-57735c81af204b204140aa8ea5aa31f81c83ceb3c29f38c204d16d39614f8f6e test1/2407 0
-29c42b02117b087afda9ef01c1a64eee5d6ef8d11e7924f734c5855e3c5e2eb4 test1/2408 0
-7d6c8711b5776c7f3cd77bcf346c9c7a06729261376e03674fa65bb8484a37c8 test1/2409 0
-dc11856906d69efbe4118596bb02fe809a3964e25ba3a47a34c639e19a350e1a test1/2410 0
-e029c69efae66a89da23d7836e52855c121b8f5ab1b8f5a40e748d05f6205d57 test1/2411 0
-01c2328044256a06294bd1364c4988bb2bf7faaa6109bde7fc81f6bfe373b166 test1/2412 0
-c078d7bbf2de32dd1022408bab248b7c9992f958ead5944882eed79fb8b39269 test1/2413 0
-b901aef7ed07fe9b9b7a2e30a2183c0d4049742570a6d437ea94768a94453e61 test1/2414 0
-08ec77a7eb86cbd92c9a23d2b8238b6a51753c0787050cfed0830a8ef4bbb10b test1/2415 0
-56946ad348b9531994dca4e7ecc65fc5a98d2ca2f84b8eab69e94fa10e1ac849 test1/2416 0
-a7c6e0b68fc6421dac98d6187e1f0b055b98b4579bc9b571e73dc8fb350fa8a5 test1/2417 0
-61aa6b7a58e1ec8b4f833a9642361bf3330f13aa33de8bef7ccd3759468d8fcd test1/2418 0
-06bb33d3ac0f221f6f4c9980e6163ce656bbda9d47dcc01f78ec36d4b1e81938 test1/2419 0
-987a7f17c6d289a5420daba24408ab46ce7656e72aba9f8cb1b5da1e6bc2a415 test1/2420 0
-2c5076156e9896cc4d2310ea7af87209cdec84923b08e52f375cc7f8a4b972f2 test1/2421 0
-8ad1d7f710e6bcb5f7ce316fba996bd43e408d5990afe9dac894e5c1bf900c0d test1/2422 0
-41653786e060828f1d765272efdd01606497f1990509f9b81cce24810b3fc865 test1/2423 0
-e0ff982e5b46eba2e1d6426ed330773a65d717d2df907bc844d31bd4214e6835 test1/2424 0
-fcdae10e0c6306236e6fa2b210b76ee679c7dbbbbd038acd26d6c1b17eb33583 test1/2425 0
-354053dd9d44bd976fd6a7b8c955ed67ecba60109078dcc8f359c486c9f1417e test1/2426 0
-789e7f73d78ab0fbcc2ffbd1ae66a0558306a2fc6e047685cc198d5f9e717e41 test1/2427 0
-e60371b90273609339d9efb96ea92a83ab70cc8d351f11cb0802e930a107165e test1/2428 0
-a67a92a05ffa45bcdb01f9b71e9491e1af640738abe2abaae3d99874f57a26be test1/2429 0
-9c4795a93a2bb4569db0d96e8e20caa1cfddc2f961fb3309297216200b1ae97f test1/2430 0
-e85164f75b79aeea2f97734267e74e072ec1c495b7438aad432da12b99656bb1 test1/2431 0
-2291a6578f678c08ed1e64c48f9b5c3572505b15cf0461536364dafd34818e0e test1/2432 0
-24ea3ff9593e7b67439e8dee49b4762f0e8a0e0a51f004848f81c3795446c487 test1/2433 0
-4b7491008158e6cfde832014f3e4ac3ac89ecf6710f6ecae87c7b0eea792e9e1 test1/2434 0
-2823a5ba65d6e7cdcce75ab9318cad4e5d7a8562dad7a28e46b2810d56b0eef7 test1/2435 0
-8d86968ebb9aabe3e14d5a8345eef6840d3802f0050448aa3ad30c0c799389a6 test1/2436 0
-c7ef4d45b44db1d766f31456e2b1a905d08d2bd812a8c3a19d1509d67173b9b7 test1/2437 0
-86574206ba6a1f5b66db5432d9650c35e2f23ef525a69b81f600d9ab3084ec2c test1/2438 0
-10392a19da01c008dcfa941a2a876701d07fe688191cc2ae0033dbad12fa361c test1/2439 0
-ac610589954442f47b88bb8879d180f0ecfaba439f9c4a3ac1aab3cbd9817327 test1/2440 0
-1aba8c772982428da0e4760f6cb10d8a20785e21c1685a6351251548ee872650 test1/2441 0
-a28372f7a0f9fa4dfc0b79e5ed80ce10bb973b7577fdf2100e7f06926656a328 test1/2442 0
-daa217eb792b981cc05710d3c839c4ca18fbdef2aa87506a9dfbd60d0079e705 test1/2443 0
-cec466254960eef9f980ab043fb05963864118a5864693fc33d5ab36487a1a69 test1/2444 0
-fc6953b423030f37366db0fb5cc1dd84b6763daf90db7939fdf67016527acf2c test1/2445 0
-4e85cee6d1d17efd3569451b888efc9e203d2d4ed7a624b110dac8fa70603098 test1/2446 0
-bde64c17be935cab89a9131ebc6a8b933212e2f20e4e27aebd3a398a8d8e31db test1/2447 0
-7bee64be95457ccec7429c4e83f94ad3f9e89c3ceca26126ff922990d357557c test1/2448 0
-55204ffa92be4909f8a8f927960cf82f48ee4ad5a06e9586b3feb36c56b1c317 test1/2449 0
-956bbf605d86f759e5070551168b54896244a8dbf5c82bf0377d319986ac1cfd test1/2450 0
-1622c8c7910398eeada0463f69b13dcc0bea6792055c7ef91e89cf1cb61aa515 test1/2451 0
-383dcef0e28a882856cd27d97d35110dbdc849076242af7f14e51cca136e8a0e test1/2452 0
-a1b4e27f87b1efe73f5241039d0c2733758cc52807485eea5ccd67a082b57d9b test1/2453 0
-a9a0926cdf9d0546ab8fee6b012f7218ce7058485231d752512e9e7482397de0 test1/2454 0
-550a43cf547914e290806a548f65d67ef53df70668a0f8dfb864cc30afc9cb23 test1/2455 0
-6f1b722ae0a0361456624d9189063d4484701ef740b95d08a8e5c4152aecd7a4 test1/2456 0
-5af60d49bbb62ca0e1e0c3f44a2cbb98a624e2aee209c2603dee96262b9fe55f test1/2457 0
-53cd751d4cb4409a1f57f0277a652c5fea57d3b441527c7ee7a17fa7d624de7f test1/2458 0
-830884c83cd15f4d97825bf6f14f851b367d59a79adb4fdeb3555f286dd2ebd5 test1/2459 0
-3449522e23e9ae243e1fb1b13dddca878af2943c04c967556120d9b3b6ec823e test1/2460 0
-4acdde00de529e1fbe511c7b9ad66720c170e35ff79b675d84bec8a30b97f59e test1/2461 0
-34db087583f4de9d2fb6320b5ffc38597cd238058bd980ef66ea280f97c8da1c test1/2462 0
-71dc3894081a77df259949019cfb384664bf432471f09a8ea014c426cd276c7d test1/2463 0
-0a8a40a00dc22bab81bb0f6527bab7c4080e8bd1d0568dce210a60efb15391cf test1/2464 0
-c74575ce2ebaf9411bd997bba2096018c2e02127dcbb8b24acf432c14400a450 test1/2465 0
-2f6cdfa0d66bb7a42518813e699b4010299ca576526e6b30fbd796216bc83ecd test1/2466 0
-16c39b20b8ca572d2215b03d4f656779ddc586d7699094007b36ca25fc919af4 test1/2467 0
-8bc2841405e6237320e733bc5d166a93739b2ca9a0e8a124ac409b16b919644f test1/2468 0
-1e0f34e595bd017964d69e706efca65b5c008f08589d248677f9893f643e96b7 test1/2469 0
-629f125eec7df2d6b255bbfa4823de1f70176cb430342aff2336b52062d96d2f test1/2470 0
-33a379e9bded2099fc8ce2a7a7d415595bb3ad8bc58938c6d798f31ae044219d test1/2471 0
-cfcc5209149d9407f6a972413fe8e3fda733886fb56c03159844a44dcd738a34 test1/2472 0
-499602a15dfe8d84bab88e20577787e07c2ac65c1e6f6977179d64d2641ccf0b test1/2473 0
-6b2b11647cb3622e52a808a3ab7308a5fd0bb07c131f226138acb01af756e254 test1/2474 0
-0be3dcb9acf6689afed90e76e6d0a7f75a43e6c951d6ecf4638c5f1c3cfd57cd test1/2475 0
-d0ecb15055116cb15724111ee692c096cf703f52559e1e62fa7ee6a5846c75cd test1/2476 0
-2660f2a3a4106f7fd0dcc3b1bde4fdd92d14a97cc3feadfa9c61c1d18833fe95 test1/2477 0
-9f066cd6162b862db492de49a325791845408aa060ed8a6082e77580237a193f test1/2478 0
-ecc9bf0080b360e9fe061f7170078a0c9e26809ef00423bb9db79d65dc297a7f test1/2479 0
-6f5ddaeea64f07d7d5743baac0d21773184d4f26fe11447c935a243d3c6b96d6 test1/2480 0
-11e8a2de12b6be16b15021cd4679360c51bda2f2749570184884d4f61b14528b test1/2481 0
-f574b944661a09d1c10bb8a09ea432cec5f3896402600b4865eaf2aa67c2e5cc test1/2482 0
-36cd79ae17832258f1baefe3f615ab18506a4d845ecd18524d22dfc85dce4ce1 test1/2483 0
-ae99ac24ab8a0456c9808833ecc4c01a85c3cbf1fa142dae571c8534297d1495 test1/2484 0
-4d60df57c37ae39559c3ea48a85aaf8558a14b0ce927b78f9cde776d56355c77 test1/2485 0
-97724a9e3969a7dea582ec0bbd0aca739bb32a3a3a69af297c5b7dc28ce22b5f test1/2486 0
-6ca74430cd9f484c74e661d61f599d7df71e01eb467d2303c44059c2183bc633 test1/2487 0
-d7f882a409f9bb45ed624d2aee4210d8b2c2bfefc8fc2f6899c79be30ef46891 test1/2488 0
-0e3ae7faae663df1b648d0c6ab0a9a7f131961939d66f8e26228a2696db31056 test1/2489 0
-a9f737884d54b249622aa61946ac85dfacf50f27417b6e97665c7f1c03476c2b test1/2490 0
-c3fc4e86dcd4187f004ed0021d3098ffa06e70238893d3fafd3fbe70dcdb8ec6 test1/2491 0
-926e9c29d87dd4ff02d62b2fd4c1587c39b90af056c70f57ce29c9480fd52598 test1/2492 0
-a24793797779fd3c5687515e0a603d60d7912ffb74a6744c1266eba510870f98 test1/2493 0
-f5f51843d0f616c9a63ef1efc266552d060c2e580691182d2c9a9d8f10e3afa2 test1/2494 0
-44982408578ceab99787d406aaa7f7d78157f542da310887fd5695e86f44e6c7 test1/2495 0
-fb4d74c6b24cb9335ce8ce0b94366a962344a61e510d0b469ce695815657417e test1/2496 0
-aba5723348e40bb3fe329936a283166d97f6f77cfc842b5bec36601866898db4 test1/2497 0
-d535fc493c19b1478321bde38cb19ddadd25d53132e4eba7771af3e64c97e66a test1/2498 0
-bff4d1733d1c44dcb5f2423f1f5188104e363075e0b238bcdcb2e5d5dbdabffa test1/2499 0
-2b778010b56c7ea2fc1a0b345a8f2dfde6aeb99c526741d9e45ce8b38f0f3be5 test1/2500 0
-ef58caab748f38f291e8a9cadff04d110deedf4fabf5bf548ac96fba4ad6c6bf test1/2501 0
-f58490c2283306c021904b2810749210b1bdc56c97cee69c3f99651903e84ef8 test1/2502 0
-343a3412df670f59a0ef699e1be121297136839a647720979ccfd75ef26b4e43 test1/2503 0
-6ac6bf47a552ba947364626d53c532667ff0656adac9a1f8d3e46b6e248d1992 test1/2504 0
-a7b1ff691d6d710876aef51dbc66bb4d8703ee9a853a4ec9eb9a5ade29158769 test1/2505 0
-906c4d987b843a8a9ca88e32bd4d0ba9d7195db3a6248d20612f04f63f568c22 test1/2506 0
-146a1666fbb6cb179bbb50a147ef0d4136e0d966dd6329762a3171c9fbb14f01 test1/2507 0
-6d95f192ecd57f367ec231394058bbfd6024ef7787f80fb24c68cd9f7b903293 test1/2508 0
-c7c0617248b0ea3e1bd698f2412173f54b1983c5b98d984d3678e154a94aa62f test1/2509 0
-f22120348aa4bafd6a00492bf8a9f81f386e64e2e2a325b32946faad9806c36e test1/2510 0
-067b3d9fea312d1ab860cbf38c9e284a6623b78e5b851948fb539c5a80c760cb test1/2511 0
-2a9fc6b9b392ff4bc337d740a6697e7a1e1095050bb4d08d9853bda390d4468a test1/2512 0
-935f08bcfe3e5577d5d0504c41d6785168d7379830bf66ab2b2dfcd5787e6278 test1/2513 0
-19adf9851795da605c22f7d9ede92511c28deeae2dac970e2172ba448d1c8fb1 test1/2514 0
-13e213efdad87ffeb109d63aa973a96982a716ef8e2e956ce42e389cbe0e489f test1/2515 0
-614dd583c154edc7a5094a8624375646bc486ee54287b58bf5b547a95e6eb197 test1/2516 0
-ad2510f28929af1db1d4452be21addf56fea068c3ca74547e673ca0bb7bb345c test1/2517 0
-59336ef15626b3b85f1c646b657e3f5b8c3b791d97c2f7c5cd7fda493adbdcce test1/2518 0
-dbc80f93bc08120836001ac73684e9b57ec213d9b09153c2209fbdae58972392 test1/2519 0
-9b7ee1e61becd4c351fd1f2b9be1c047d859cce93cdbea6db4910d84c768022a test1/2520 0
-71f5d6fce3b91e6cf35ebaababc8992a9cc7114c01dd40ebe44b70bd927d7627 test1/2521 0
-6a5371cb7bc779b451e0875ed8f8f668e2154c4223441d1c48992f50756ae836 test1/2522 0
-9a819e1d39bb77b7df6398099ab773be3d6a3a0e58ee8e827edad00f73525598 test1/2523 0
-de2cff9f685f26a877fa0d1fa9269ebc1e1df47bb68791b100a0eb6d35657b28 test1/2524 0
-e369a38333e2c168fc5fab29d2294db8696acc28f429a6c0b9121da00fe3810e test1/2525 0
-ae91dd65f06c430104f7349898377a96418f109004a21c0a5e92b0988157bc9f test1/2526 0
-b522ab831fb35012e4143868f05bbf9602d120f720b575d02374fe25292796d9 test1/2527 0
-4648f6a44ec1d5416ff7ea57eee677eae2619b891a249b09ca74be1beb62b76a test1/2528 0
-22fcf150197d77c48b18e96052c5a43982b1f641800b3d0867042d0a97979f88 test1/2529 0
-bdccc30094c6472bc61ba58d33bddcd22fe4f5b108adbff15e02ec9817880e7c test1/2530 0
-df7f02731d94f2aa8a17a505fbf531e8ec429451cca47445cfcde0e9ad1cbc22 test1/2531 0
-a0af5cd2aaa8c5b7db1b2c683be9d8fc71d666760c99c3d931ae758e05413d8c test1/2532 0
-be24a0240eb7f8d943ac68612f483181ca327241806f0420983f8c13ab9a7474 test1/2533 0
-10ff38b9832979f07aca8c4945cd5d42e2f459c8faacf9b608c61d05d1d506f4 test1/2534 0
-b86beb3dde81ff7dc7a863f216e4f37080c5d24a225c8d2e736751141002d848 test1/2535 0
-ecc4c710880598a26fc27fb7a3e7950bcc31d1721adce1009d45a43dc76aba2e test1/2536 0
-d67dded668cb3e6523f568ae191b7e21440c656c8f26d603633b91b839e12609 test1/2537 0
-fea7998d4da167ea69fd1c9c0e8074c2485c413276dfb2946359d31bebd61614 test1/2538 0
-868b37d6cdc8655d569036eb3d0189552fc1ecceed7c9cc1d37f11473a2db994 test1/2539 0
-2ae5ac2a14fda2c4ea0033152552b9edf6bdd3ebf74cc74202cc3d8a1e528cc1 test1/2540 0
-b26d8d0adcdfa1925c373f755126cb3d57b96ad7a471d293d63dfc93cb961e9a test1/2541 0
-dfe80c832024bf0d5ab6f623a5fd5e0ac92141be0f3c3baedc349aad5043f949 test1/2542 0
-d03034402971f082093ac1b743f72d2be8a11d167c4e9b7a12e7ce362000f842 test1/2543 0
-be894beac213ec9c6d6168108d6ec4a7d4b951c7ff8075e255700318356f4e11 test1/2544 0
-0f9e892347c18b2941862be767031215ca64078f2155b9c1501d341ae499874e test1/2545 0
-4178802f6332bf7fa2688205c096aca827fa426fca6267b6823c6a9e787b9cf9 test1/2546 0
-a2161a0fae79efb2949194c4dc3e9528b934c327144a24b6e2e3961ab5f77040 test1/2547 0
-bdd74e742064b1a9f22eccc8060c8637c42363107600e750e6f55e7c4395c7be test1/2548 0
-9fa51522d80fc5ada925412ab32a65fb82cc3e9423e4de6558434abbe9d95436 test1/2549 0
-66dc0a420a07f97f42c08304a9cf4bc9fed59a790add2a240525e756bbed8ae5 test1/2550 0
-1901afaab8e3f45f868dcad25199d04b11d25a44efe428169e9574e655f5c560 test1/2551 0
-6ee5a3e06480870a483acafa187bceca71729b890c38a8ca6dd28bffa85b9c84 test1/2552 0
-7152c497f369b11e5322e3dbdd3c405fcc18cb6c71500c7839de2c2e613891e7 test1/2553 0
-236106818a02ed844b19b613a5a1b93cb92c0b62a74eda45ffa19ad30dc59bad test1/2554 0
-6e78749a97818d9bc613d7e689810c148be44cd923a0987af63cffc3cde50acf test1/2555 0
-3f9ac134f7bd388fde9f86e4e4ace2c0bfcafc88d7ed8d7b17ca2935a029da6b test1/2556 0
-1858463c98b80c5c08185448e6def51dc1227f95314d359d56e1d2d9b9c82a1f test1/2557 0
-469cb17c67c0c5375fa288f43baa2852408ac13645c3cfb01abaa1d6f653b1c7 test1/2558 0
-4a3c5c28352a52d4f90702fa0bb1c9a1f30744b1b34fdcd605bcc0aa72aad417 test1/2559 0
-2b9c54157f993d661c6b963b1f77d48b684f72412077f1285b420f4c85dc3071 test1/2560 0
-c5d69f05478c744a3616d41de0c5267bfbc5abc9ebc3de9b236d29a0b95ce3d4 test1/2561 0
-7f5e920cfbc045f42ebf5f787a15ad278ccfaef28fcedde7a184e0c1f4cb5131 test1/2562 0
-1befc9112e4038d382286f1888aa9a1c9d28d8cede82d69bdf5241915dbacc91 test1/2563 0
-3fe88c0b7fc3f57e263a3af82fc7481b574650accd8672894d2aceb97440c1e4 test1/2564 0
-d460cf7a796abd59226f9a32ca29454f43e62f835a7a48ec2be8d641c47273ac test1/2565 0
-68357cbbf1de3534d2d2c7a2f9e7a7b26cc787310036d63e6ce97a21a8ff102e test1/2566 0
-f9e4c1b42a1664a72c77cd00cddddec2a61887bd7f0d9ba4f289bd187dee952f test1/2567 0
-20331aa62aeba796140355453648ce2579c41df3be33aa931866bc72f0682ba0 test1/2568 0
-44aa0c549b0678d524a909aad280f8235f474a424858f04fa4eb3beb63bf170e test1/2569 0
-0da71175bdea2a1e158a5308babd42620b2efb799af6b8b60935040d6d360c7e test1/2570 0
-d25791a63a29c369225b5a180efef7507ba6772a3ff55b93a5042471072d8dd9 test1/2571 0
-85093c866c15b181899242b2863cfad7198c462220377e5024ef409ad846ccb4 test1/2572 0
-8afa021e26b88ddc1640938428aab28d5223e041ad723b9250440134370faf42 test1/2573 0
-e0aeba8eb8626af97c8888491060094e89f856bac54020466094803c135f9984 test1/2574 0
-5e059090b044e38b0ee9f7f2a038e77f64989d237514f557e9ae9bca1a092d51 test1/2575 0
-86529154ed58a15fa6b9a1541d61f6288fad342264ae61f930a2399a4d2b14bb test1/2576 0
-f5b37c7604c03d532d16fe9eb0a11c6775c4e917fb4a063d2d83c9dcc4d6d4f6 test1/2577 0
-e821d60cba07a4c5fd2ee58bc58f421671fd99582e84021b5e9b6b51ceb35977 test1/2578 0
-db9bdaa6222dacc63916d91b76ab7a8ebe11325099174c339870c4f89f89d8ba test1/2579 0
-1705735da6753c91803e003af4fbd47d1e04f00c7c028d79356d5f148ad1e0d8 test1/2580 0
-a81f6f86054dc5038da00d6a19b45695e3e162c62759c696dedc334a0764849a test1/2581 0
-dc1349b0dbbb06f109a7d0552b36b42e9d02b98f16a05e6365e57fe7586c50ef test1/2582 0
-7480942e415e89e2f9e7cb39b47fe098871d21e67b4d8ef5011cb49770a382cf test1/2583 0
-1f90792140613aeb30216351fd39c81d019d785fe0b86406e95f47ed5d7cef30 test1/2584 0
-d4be82cbb9bf3872fc3361bff5b176144f11bc4331a94eda455169b8bce279e3 test1/2585 0
-4f41d215cd2bd2283d8bca7f4918863c500be9334bddef5ee7734fdfe2da23be test1/2586 0
-b800e393a322693b5de86fe05486f4e57fba68726d94cc04d090b184db493e9f test1/2587 0
-58ff503b9c148a5d4c97f58d48911e3f7d56dfa5b7e5dda52d3100f7cd455d3c test1/2588 0
-440a847c7ccdaa4c9fd53e806ad424a36b5dc09f86f649c3d4509afb9d2a6c52 test1/2589 0
-9dd9fc8f387932a03f42b04e363bbcb744675716ca93fd4ee6a3ea187e14f004 test1/2590 0
-5a6c333f77534afc1033c26ecda96ba9fc6ede4161e85193ffdc6918ab0e5a5a test1/2591 0
-da5b5ff8b1e42aa0243989243803027b2bef832fff5d4abd7f90ee58967b450f test1/2592 0
-2d4c63c06f24ec40564fec83adedbc9f97adfc42deb40b0dfe3140a5d8aaaf05 test1/2593 0
-adf7e8a09037a6f214d46b744ac00a809fdafb897750a8517a282b35858270df test1/2594 0
-c7000e796aae80195c7e6925385cb1f90e4b361e626bef95ce73c8f65844cc6c test1/2595 0
-80ef6af296fc3573a3967cda657d94b2d2cc40c6943ffc9f88706da571a1cc9b test1/2596 0
-6b8b28c92cef6d8567235008a40277e5d6978eb09accee06e8cab75c1e43e680 test1/2597 0
-1a084399f4a47e965a7353248854793b5469388de7971a695a08fb28f9a7e417 test1/2598 0
-d3be5898b453a959ad0965401556d484cf96897b82d0c601e35b6f6ef7f22e6c test1/2599 0
-aeb51840f21ff92f628f09caa450587f6696b84b772505eccd1588e72baa0534 test1/2600 0
-75df14f569ab79fea8e876239f8a4665a42b2925d939c89eca47bd1b38f6fa03 test1/2601 0
-ede645f1afcd72b9281136918e07ef92149f63a87455fc221e248eaccd615b92 test1/2602 0
-1f2ad6e876606d908092fe87f5fe7e1a422583e1d7320a6fc2ec47f65c3483a0 test1/2603 0
-dec530acbeeb1a9093b7d293a72c07b20c905a00e17bb0b2cabf9f7dbeeddb5e test1/2604 0
-f9c4c3f43430e84cc3968a393e74131e9e0c617a10c12906cffe8ae73c380f95 test1/2605 0
-3e90299c7d0b50990218b0e5a929e6617b3025988386364a93d32a545c44e960 test1/2606 0
-c4a18d255aaa53d32b6e5b4f72c42a0fb08d5f130011acd0428807d1d2b90038 test1/2607 0
-a604283de549ce9fff597f8019d04cafb083882a64a329ad79905ca207030f7e test1/2608 0
-59faab148feceef49fd4c419ca691e08a14beda15eac58f09a8bc1a9c2530b83 test1/2609 0
-959c713c6257d485349181315569ca25ec9f68325ccf9add79c2273e26fe5cc3 test1/2610 0
-e137dff00155318da845cbf0e1923d53877605f317f625f86e358735ac525c01 test1/2611 0
-978f975e2b8bf0373a45b08fbeceea38ba4195b919bb7902d4d3d94f36949742 test1/2612 0
-f8e3f8d2989beca09efbfa4b0ede4475438afcc077fce6ebf218f873f09f7235 test1/2613 0
-7ae1418f30048b47aa06ac9ad4bd44eb14a846fab3b277e12a7af406c924e7ec test1/2614 0
-4551aad2002bfbc5c048449bbe090115968847e9ae8a64fca1a0d750b35c67ad test1/2615 0
-5deeda89c99ea75da963ebe78ba068153728b924414e4767994281c699aa1696 test1/2616 0
-ee516a35bdb7dda3cb36fb88e3e22bb71c9da44558029a0625b87cd0806a7c40 test1/2617 0
-70c3a782784d4a8e1d19b6e45907894ccbc671cb42f95a8f589e172b738fe8a1 test1/2618 0
-b6784b35d030716817d2e9d132d89ec49a5d40aa683b1c0f4e142357bb19d9f9 test1/2619 0
-f11e996b113c67315948e98716e347e4cec95a7fcc5013d06ca65a5c3fbbed50 test1/2620 0
-d83c370d132615030815745e7296d4f36475ffe4b3688c6e480c7b6fd0dbf452 test1/2621 0
-3d14750a7431566ac92eab9db743457dc3fae3f90d2d2a5d98015cb2366b89eb test1/2622 0
-53a1edf54af3ab247a316f20e4c410a50ae72d0867a4bc398cf34feb1ff258a0 test1/2623 0
-ce2f6cd957a51cb357db5115a636e2fdc0ae28e4977eaf35d84d25520e714727 test1/2624 0
-689ff51db54aa787098fd6fe108a93e2e047940d87133a83f38c45c619151c4a test1/2625 0
-e04b6704ebe46f85fc97148bda1320afb49dfdf6b12e2742e2182d04350597c8 test1/2626 0
-b709ede581f63362a297a00d87ee7a75afc287a0a3bf2cd2c953a9536fbc9d2f test1/2627 0
-a5e6de32fe6c9647d89cfc0ddf9ef9d996073829b98c6e8908cb13bda539fcda test1/2628 0
-769f4a92d4a8e52e72a7d8e0ae0883848c693a23f020b608d1918206ec191931 test1/2629 0
-ac2fde4cf2ec3169066dcf33b05e8c2fb1fc7f30ae6c4cbe60f889caee3e294b test1/2630 0
-50d473ee6e0faf16685988bb6f97007ee41c99b887b2e86e8567106ea3b848c1 test1/2631 0
-d3b1cdb74ea1d30ead937bf0dbed8a0e7c77e25c2cabecbbd8c446a190c1c5e5 test1/2632 0
-c80f793dd229e605979ed526ebd05a639d6175fbd352ce65234289a8b722bfa7 test1/2633 0
-edd42aa56c61ab42e93cceb8d3244d808da21c9fdc778ea8c4e49e395c685ada test1/2634 0
-9131982d3c7963d4ec03f3efb9c0c48da71a31581a1da7e64abac3e4debf935a test1/2635 0
-7b1fb748375a63297859ab876e9ffb0403ffb0d1051054cc63d97449cc005d13 test1/2636 0
-2067154697286dcc5ed79315e9b5e006b4cdf0a36e9add2147e4c15ed9526965 test1/2637 0
-7d4f7db629b86efc08c862f92e5f907c463e47aa62dd48da092b90fd1a9056e4 test1/2638 0
-56be074866fcd9015f59f70366fd03126bfb9025f5e044b7f3e21d4c98bd084b test1/2639 0
-fd636f79ec0c89c222775b258c2d9d53ea9c5f0e73978a9df00e3396381573e0 test1/2640 0
-e52698d8433e2d064f2cb3d4c25200e89db170bd79386efe188a8e8b67f865d9 test1/2641 0
-45875db8a1cd318ea04f7a311faf96c23b97eefb0a8ea13245a9f570f09d1651 test1/2642 0
-57fded8a8ff9e96e37cea9a96d97f03d6b42fb44b631658afabe066cced41c1d test1/2643 0
-de5a55cd978e90f40565125b41cacc480a941747ac14b8cc322b8497b6beb893 test1/2644 0
-1e1d47fbbc89cd06ed4f36b1620bfc695f04681a383248d312c1e89a4e632b7f test1/2645 0
-62c84612f92dd7c6dca8beb05d419e7871dc287d62ec93205ec2bed8fb279b3b test1/2646 0
-ee83a40340ccef3debff281f872265de1654f6fc8ce16c26b798e08125efc236 test1/2647 0
-979de8e83429153f2894f24f7b5f0587a5062adbd6c7c51f9db86f9f2745c086 test1/2648 0
-3eaa83a4deb540c2c0f24d07749e5baf629bff655b8499dae8fd3a8f5f1c8573 test1/2649 0
-d033a76f7df198b3c414f94c7c594df3da83823335dfc468226c50367edc82bf test1/2650 0
-c224af2bf464045316df3b4588a4fccbd733bacb8cc71e53a0c5ca95c1ce3c59 test1/2651 0
-12d83ac788b102d1a4eadd3f163cb4e29397d59db2c0263ad03eb9d731015826 test1/2652 0
-a762bb6a860d9d58574f3d354f44e13b75ebc0945c4d645421cca50ef6487f07 test1/2653 0
-6999d04374f1a0d9b9b05966d7962288744929959e9825dfcc45a4dabd97057d test1/2654 0
-56b1c9e8489a2ffe532b6c1462a3a8c22c1391f4bb2389fc04f6dbadc429ab10 test1/2655 0
-92f33ca0c58e866b5df4ed6e65a4959001ff0c1edf7ddc94e28f3a765b3d25bc test1/2656 0
-f5cde198374e97e888730b0a32e3501e5a1bac8c816829c24c6444f7ee5aea9d test1/2657 0
-b4c9afeb855bb9f630fe8bdcf939d781694d02aedf7cbd1a1824ed0be678b167 test1/2658 0
-6bec70eb9222f4b6de05ed28fd670a8d9ee20d41298a7c7ae41fb279551a2842 test1/2659 0
-ff1b5b16130c81a0735ed96e90f32079fe10511a5b7966fd6619ec5a5b0bc21b test1/2660 0
-a21872fda210e1c11ef51928ba8ed0f13dc539fb2136a0238dcc3c0cf9600406 test1/2661 0
-222b1ac105525d8b3e8ca260590d9408abf414de10da6b06e437efdbb6797db2 test1/2662 0
-d597f9b638f8394d8716731e0aef376cfbf148d334dcb27a4b0aaf97f2c16ae2 test1/2663 0
-5788d35217e0a281f0d5d788765d2ae393dde3243601abf69e9d9178f9d3d8b4 test1/2664 0
-9523240de24932826d1637521ec2dafcecbfece93a37836fbb432753520c88d1 test1/2665 0
-03cba944c72766f53d5096919897b6c5cd389b1b13d06c50cc8e7dfa37232554 test1/2666 0
-7efb8d8590e846d6bffdfec91d7d310b99fee8d9a145dfc6ebf3e690ddd7ffe5 test1/2667 0
-4c7900fcd1763191b15071947a9591dbdd489bd7f6e9b93388be35bff0177c9e test1/2668 0
-058453bd6f0ab66fcc6d414f01d6d6de6a65cec591413d2fb71b2c9355894630 test1/2669 0
-b65046d1300481c0c87cb00d9a777efeaf1165b939650850752fd56cd049370d test1/2670 0
-72e8efc1d8d3dc9079f4f72339bdb86d19cb06e8705c2eae54c92b78b199518d test1/2671 0
-6bef39534de0075b1e6f0602b6c6581eff6029155846a48ecc9b2bd0e3d9be64 test1/2672 0
-724d1ac3f19231841a87b6472fa192c0904b394821fa4bfe6f49dc302289277a test1/2673 0
-2c8f131f7f87be27eff1fed447c0be36aa8fad210c1a4f5184ea726e6c90197e test1/2674 0
-233afdc8e6c58d513cf1bdcf7c074f460c6cb2f5a03d6a48ae26398199fa1983 test1/2675 0
-1ec9e28acf9a4d407cd47e3933026efe4541818013309dad184a7d1b40c40274 test1/2676 0
-fcde01a335625de61a3507b315eeda9ebfd8bc5f4b91131364e97aa9301d721b test1/2677 0
-2511e253eee15ce87cc868f7cab762b77831123a65ae2626f7f95604a333e14a test1/2678 0
-958712ed8e0368faa673b547ffca68955a35fdfbf7c32556f8199eec84c50276 test1/2679 0
-48f468667444cb3ad8da3f2544d0aa49237546c41a3872c779b56e75f4eace59 test1/2680 0
-1ebe6030cc1ede1cb846b1c789e9ea302d307ed1fabd60158335dee2fa3984f9 test1/2681 0
-7534112fedd80b9f9e330cbfc0089b8ed03cc481c724f14a9eb5db38e10e98c6 test1/2682 0
-0868308d650afb3998070b187fb42f3c87a510e95c868f686efd67650abf33aa test1/2683 0
-99048c6dcc7c4ea0542a57e5377aac27167a56ff54ee28a20ea284d1cc5bbe09 test1/2684 0
-a403200272e2bb97a73c0b43fef53df5240521792cb4d424713b1c2d8c818464 test1/2685 0
-d2ff826a1f7cbd24c40fb50a819b37490ca31af8dfdc94174c16055e64febc55 test1/2686 0
-6a9af39108789ab73870afa2645a01f147ef85d45680030d3d065a54779a0bfb test1/2687 0
-0566619e5c095768f1ab36fd2b8fb4f974a841b9234271311f951837741e4f05 test1/2688 0
-ad2134cb7b5fe2a73ab3168cf43d0b497655e58076f2ca34687685b248deaf7e test1/2689 0
-60f0a8e61e3b6585b87ac7daf614eab7ab0d6ba3554ac51d10298164f9660d16 test1/2690 0
-2735b8132215bfbb9f5e5ba78ab02d46fa9a08f6878a433df45219f338515412 test1/2691 0
-916d702a7bf5835073d0f15101a9445c536f4a65b664cfcb71b6bb9abe3d4931 test1/2692 0
-dbfa603a22fce058932a89f15c0325115c9475d354da59d5115b0fed9973b63d test1/2693 0
-53e57f96e5591f71ccf92bd3af3bf0290cbfded399f18bce3b1cde77aaeaa74b test1/2694 0
-56995926e7e6f3ddaad6b60da5bfa464ada75eadbe69b556714ec421933a1d68 test1/2695 0
-2b4b77402caa67e6da32f3578d513b3c7f2df09fbcadb1ad0385dc73fe198da8 test1/2696 0
-c80b4e4dff2659bb4e4530a2d2febc944bd2022626c25ee43d539235991dd289 test1/2697 0
-89b2aadf363ef26d79ead65461f4c16f9e7343a7a14d40d338b76f9c439dc342 test1/2698 0
-fd9bf6e76a7b97ad2e2d588662746e92a9957fb8184e9dde67cb840b73cffefa test1/2699 0
-1b307c670076a7fe8e643900b1391e50efef80ac228559e91aefa9f6ef868890 test1/2700 0
-0fcc0ad6bcad924ca70d42bfe2b31c1ba0ff57ee70ebcf09a080edec0e28630c test1/2701 0
-b3f469ebaf2db6d71ea9ef92656e8f2b6cef1f245746a17d5b0468b16e2d7050 test1/2702 0
-cb4321050b3d8de90d7860d80e25dc75ea5404082ec4d3e07a9c5d0668121877 test1/2703 0
-7a5252a5df3218d5e3781e9df6eefc3330273587a6357d3c9327df7a2228de5b test1/2704 0
-ffa3f379c8f4e8902068218fa859c666b2882cac57739b0e788ef26195f49267 test1/2705 0
-8d96a594ad8c72b5164af7f8935234aa0014ed7d5c7e0433ba23727faa52be69 test1/2706 0
-e93bc9daf5d932389f2a8d24db2121ea5421c3ac983b0429b8596b6b1170319b test1/2707 0
-d2b1f9e1b7c2f82c7cc26ebae36a15600742ceaac35c2da8246fbfca0c18c250 test1/2708 0
-f583bcfd2fcd62fabea7b1f9d40f28993dde568e9e25a3a2f7c0ace1a0a76d19 test1/2709 0
-ecbc43ef9300e1589a0d095c6e3d0dd9abb7892c38a0a33f4721251ec9cb10c2 test1/2710 0
-1d88a23e7ac64cef925a57f042f59d7e93e3c7d7c7c4c1bd206e1fc2c4b3fa31 test1/2711 0
-b979e880281bbddaab2e6a1bd684ea37146e4bb35369b3a9502a5da3279a6619 test1/2712 0
-c0e4eb4568904ad4270a080d8b7e9b1cba08f0ad7ec75bc25b1b45e714c0aa0c test1/2713 0
-f03dc6fa2732c5946f70b45c80d0912d8ca8520ad9256cda029f976b6604ea70 test1/2714 0
-97a9f36c9dc9a10b889643348cdf9c851b9eeda92e91dfb36796146ad19ec860 test1/2715 0
-d7fe35a4b544245098ce0356531524ebe15d3ea99a2ece46aadd7938ffbd538e test1/2716 0
-2367cc37222c46fabdd517953cd8c90fe3de2dd13a20289f4557af6988134dbf test1/2717 0
-df57bb54b0fe7ee254bf9463d8c304e6f63388f954702e9f4d909dfb9b08e8d8 test1/2718 0
-dde9410c5b8de527e80ab3cbd470599f581370b9114c742846f194706055bf6f test1/2719 0
-4c65df0c35b0506736c70bba74be4668376acffb58bf00a66a09b1d7251f762d test1/2720 0
-068d2ed00a64507a115ba03c4c06ccd3e6bc76cb77c1e3d4f278c09d92cf9358 test1/2721 0
-29487197526916b219f8261f29e37ea5caaa3a910f318d9c197297ecd71ba571 test1/2722 0
-5937542e90f1fcfa0b9d443f46c0245d24c4328ee32abe42a8ec8ffdb5a338a9 test1/2723 0
-84335a191914666d79044d9f99034b128572d16dd1b3b049531f34e5fb0ec8da test1/2724 0
-6a96ddb7b8f8dc66f3dc56f5ddbac111c0b19b58de73c83239885cb316e91f9b test1/2725 0
-adbec1a38804f6de1c75c5f6bbe783d0b1d44caf17d29ff0892db3b86cc73133 test1/2726 0
-721f2364d865b73032768397b13aa610f67970216212b5e27d03f3afd0df2083 test1/2727 0
-8261447bbf8d1111b88abef54d79bf3eb186ef1afbc397b687d69edd078ebd0f test1/2728 0
-bd08e9bbb24b148d51dcfac4d17f4c555d902c89d30eaeb0798c414c32085578 test1/2729 0
-247080865d74134e1e8621b356c50dcac01e245cef4912d6f6cc13fd53ca2dfd test1/2730 0
-e66db873457c7077bda396081dc462bbb4f8c5fa37ec9abe9b0b8364ad0167ea test1/2731 0
-837bf596c36cad8a5ccd7f37d88105479dbff59222220c915b232f838b19ae22 test1/2732 0
-2da8733bfb643b45e63e02d159115097cc11a13550d8b00ece734981daa773da test1/2733 0
-c8ecb6e1b53b5b15e689edf18f10b76056504fc7405606fb647fd52f8c67128a test1/2734 0
-9b9b5b36b026de625b9a4ffa6f5a77cf8c99f63cf9921b75b170d0f734bcdee0 test1/2735 0
-7151f4da57d4c108da4de89b264fbadcf9700c5b9f72ddec8270abde186b7e7e test1/2736 0
-b8c017aac0f91a7eb3815271f0ce56fcfa992cd2bee71d37355ccef4f4a4c4e6 test1/2737 0
-e63fd20be5465bf3b30e0585a6fd2af215906d130ef02be099020a5a904aed77 test1/2738 0
-b0173d1cdc7578b8755f831d5bc89a0826acafd0a5e1c7e7963f201cc0721c79 test1/2739 0
-f55191a518e7717fd294497a619ce742eab8f926bf86b5c45c46ca780e739533 test1/2740 0
-bdd209dfe960ca0cb37c104494ff09b11d3091235529ae371efdc3e9e006fb89 test1/2741 0
-dc87c01d17c9eb17f848255253e0467a9823c688118a5b70afde7c00c317bd59 test1/2742 0
-3ee0a88d08b1980ff7252904566842045561dea1471c85ef25b3e9b7ed5f9201 test1/2743 0
-b0a691e475d31e93bc5b7734a750e979f06d9b937470b573fb409d1d76366711 test1/2744 0
-06671f3d57f55e69c3ff808e80d8cb782bb1a85b351da71b622ce3d5c39c9c47 test1/2745 0
-254d5aa681c73090dfb40def5c43fb403a947dec3f401c723e0d8a66e5d53892 test1/2746 0
-a491d1e60f56a22e549024c2b1c5087b34c8d8d180dc2deabec5db9e37afcbf8 test1/2747 0
-2819f2773cc3138249a33169777d76ddfd0f8b10b1b98a00e5421d5a0d67d107 test1/2748 0
-249f4e9ed9d77df4e5db010c56e45232d024ca640dc99c4347998614f7714bd1 test1/2749 0
-53bc66337856e257894be40f306dacb478d02e9bdd570ef1f74fed854b02b1a6 test1/2750 0
-4346d0ddb12f4bf1acff1357366f6b06c52721cbf935040bf198369c3568e8ad test1/2751 0
-762a09192187f117a8f7450c0baa9bf3c5006eacba0f16e9eabd0146711bf15a test1/2752 0
-0d92124b4d72a3e13b86f6c5c4342fb0945e8777cc30c355bb75b311697b6930 test1/2753 0
-6f75088fb5d391fc98e2f0032183a2d7092873dd8a016af45c83440aa851b1a6 test1/2754 0
-166e51319c115c02320faf4beebdaf8ded62659c414f1faaf30a732ecc1271e6 test1/2755 0
-563f91ee9a9d42b59171d989fb1eda46599d3033c14a3af8c4e7d3d84784204c test1/2756 0
-626d16eb8c89355316f7fa68e207e3bd8be6471d750569ae081486330a30c1d9 test1/2757 0
-6c76b83a5aadeb87b71ec6150d8272707963eace6ac80ecb740dd4a0f9f4e317 test1/2758 0
-1902ca38727744c5ca4308511ac35cb62a966076d435f0a2ae89ea89ac9b7bcb test1/2759 0
-8ae330b5651ee1387a59eead34c3d14f1341d5f8d4c6565d0348edd269e86d32 test1/2760 0
-f4dad3e97d12b358e2178c92eca1c84b1e1a2000ce7b35375f6d5dcd4fae58f8 test1/2761 0
-d27f3c0ad17fddbb1f374ada0167fddc76db17a80991c3ac4528fca93c91383a test1/2762 0
-bfa2f7e0ba4d50b4729d38b02c867655b5597d4ef771115341dd946c5460e5f9 test1/2763 0
-bfe3e2270f28817b82d1560e1073915537078582ca5ede64d87e8deffc37dfb1 test1/2764 0
-ce5f28c43449082f0fd4970f4b22bc050d822f82f0c06464b64f98bcf5ae05a7 test1/2765 0
-3d7feb160c2264519ca2090d51dcfa7cf87334de713acb95cce4ed93095b4203 test1/2766 0
-8e614681a8e308a61c661c5b1b7a40e26bcf3d07fa9cdeb1cd0fd19ecfab35e2 test1/2767 0
-e098e11351ddec9064424724ae0e7f1304c5d1935692ee2d627fbbd301fcec45 test1/2768 0
-3b0b856e1738e22c3aa08522476bdb88f30259d02738d780b069ab293c018f2e test1/2769 0
-43d6419bd978f32508c6d9beb49b6acff0a7bbb81430863ca83c37176f2239af test1/2770 0
-2b707794ff138d9995b33e1871e58fbd94c5cba44bdf5d0768e9d627ed259e8b test1/2771 0
-28c6b28f7d59f9485c1ed9739ba4cd9f3e78f99c9216d529e5a44f2c9a98482c test1/2772 0
-6c6da015baf87d34c377a14a3692b95591b38e29e18a07aa626ad1be71a6ae05 test1/2773 0
-a173536e20bea77df4e52885c33519c807cb61ebed44ffad188de74e9a4e0333 test1/2774 0
-856907c7e81380e79669b2b585485d759a0b5180d7f662028b1315f750ce49e4 test1/2775 0
-3b2f6d3fe6eedeebb545de74aa5359c8c1bb52ec4672e25b18ca95c98c333c57 test1/2776 0
-54e143dc7235cc659d9d73478763d0412397259cfa76208dc2e685c4745d36b9 test1/2777 0
-e3b8acf4d29daa138f00b2d6522f90be9d2d6a7d5edcab47bd5d07e6925ad569 test1/2778 0
-0a368be2eb9343f5815b2abacab9402ba2bdcc280f50791d558bb3b02d279126 test1/2779 0
-1b5e1b0405c2e60ff7a546c629f92bfea7af2e260788106cfff75615803c350f test1/2780 0
-7be67cddd5a04a030275d83a82557b3d4b1406d8666699d092e15aa9392c9b6f test1/2781 0
-23fa1831330d7c1bc1113b7a5cb8b6bdad3adc29afb3c00af0b54fb362358d8c test1/2782 0
-04ab385b924b44e2089f008ce7d9d51fb4922fd487c9f31a30b4beac28a6ba20 test1/2783 0
-2541d0efaa04cc67510404b142f0445fd9020c5cd740b561f5e7b17b6c748312 test1/2784 0
-774739f36525e002a20ba9771479cc0d99173ce7ecdf5d6b5def20042d9bdf6f test1/2785 0
-d1ae6b1d27dbebd56150da15e9a079ee6f0c0472fc05a8c68d7b7390f837d29c test1/2786 0
-54d06f58c6d694910b3a792b8505651b1927e156d02dfe1c8d284936bbcb5e37 test1/2787 0
-020c88ca8000285074b8943e878940fcdb2bb1efeab59c2a27686d5f48bd5329 test1/2788 0
-44a1f3bbfac5d534e46b2abd8b080375d85e8e9dee35952b633014171e1ecf6b test1/2789 0
-f0e1042a16471aae14f7f5e155a80d25beccf86e99b3ffddd095b61fc26acc6b test1/2790 0
-1bac752e66ab182bccbac1148af675928fcab37fe3a1227fb0af2ca6dae8ad97 test1/2791 0
-e1ea734db508a6c87d0b743d4343588d063e2b25d11520ca54cae8283370de6e test1/2792 0
-60166301d140495d61f1c6942578fee8b0f09943199d1da80da311bdf0f7ecee test1/2793 0
-b9ab514e951977831bb8fc0629edcfb6dff7543cbb2280e8ab32d306616c50e6 test1/2794 0
-e907538330f62cffe737dc9b889d507a5cb3441ca21ef98a021de9c8208a0c2c test1/2795 0
-408134e380e511d9344238f1ed457e6631170f558d222662416a8770d3a2d942 test1/2796 0
-de52ef403fd781f1de82be3b219a07de4343cf8c4d29a5af95a74da6082caca6 test1/2797 0
-fa99431bd1847b4a5ce4f88ff77747e57c1a16af46e223c613e9472d2624b898 test1/2798 0
-d97d1b798ddf2842a7c5ac7d78a12537dab27d15acb0b3dafcfba5f89ce49c97 test1/2799 0
-c933acf9fb14347b5aac3241a0ba345d244f203a21e21b684afc47d210f36710 test1/2800 0
-0e6785a5da77e6acfa84b5aff90ef6a2066583d56b6a75e65fde0d4f0b3959f6 test1/2801 0
-78495d6af176c87e9403d1e227abecc1b48975cdcaccf6bea0c956447296ba88 test1/2802 0
-f01360eb90567167ecd3fce3889253c793ffb3a3809da91288efb3fc262460cf test1/2803 0
-0925b51ebf24b0593d5407f26e4c898dcfaacd7f612c02426bad9811189c1cc7 test1/2804 0
-c3bad171e54ccd54e29ca095abc5ff1e23afe571ed37134d29fa544beeca33f5 test1/2805 0
-839bb33da65182cea98e7dfb371b0b70ab78b92c9e932d9081840d443af5e2da test1/2806 0
-992c5709d26a731cc4f361d28e30fe9a91e1e7c2f2001d07ceaa5f6c652f5eb3 test1/2807 0
-53948bfb8c160b3e8ca1aa4e88f5b378d1c4b7953f9d41fcf5edc8b4e8ca4f88 test1/2808 0
-5053cd6b087f3dbf15eff0b772c66961280352c6b903da4c459d70b44c5050cd test1/2809 0
-083b8beb46c944836fe67fade2a652aa478acbf27d982074687afef531fcad26 test1/2810 0
-e2efef66749b799c0c48229dcac2e6559d00cb092525571817d3dbf12a14f55e test1/2811 0
-d6d2b6c9964f435e34c728d29510109cd8956b2ad0425be9e1475dc1a2de73e3 test1/2812 0
-77b3cdb3d6b6a18899b4f2967f5544d684b19779554b634d3bc010361c641c2e test1/2813 0
-65e361bc6f4f6e163faa4fbe1307af1511b3c229a891bd33034f005cf7ec3d4f test1/2814 0
-9c05a66ef663f73d0eeec2e150dac656da117c6a344e1121aae502e83be2aad9 test1/2815 0
-d374144dd06d0a0902c44152e90788836ac470e5c1ed889e79acc286c42d18bc test1/2816 0
-405fa95b7a2ef8a5804ffeac06f74a053230f600bde58e2567e89c3b7e25f006 test1/2817 0
-e73595adab5ab8a8fd7f6397560942844565a23682b23696569d346e134651f9 test1/2818 0
-b848bd518dc93690a45a1edf2ac0146863ecf23ecec09062dc6a59c614b98683 test1/2819 0
-10bbbbf0f9bc8d82878cff3fb8968eb800a43a39f27291e8d1d63d1dcd53f197 test1/2820 0
-a90df09df42883dc08bad2de757d7c76aafedc1ff958e04bd799055d2680e586 test1/2821 0
-2517b444dd840e26c5d3e73406a27a17ce82befa1ca45109de63633ea27a07f7 test1/2822 0
-3565124ad54da806395bf170fdb5a1760449eb71e4fda0702a75d5734a3818cb test1/2823 0
-545f4bc96398572f9bafd8733224e0916e8c2391a68c5a3319dca82cee786b9b test1/2824 0
-69fbba40b4c151022207eb85297833834924e6df73fbba056528b857ff1a29cb test1/2825 0
-82fb44afff495b00ee99650bd414785bd030e59b2502db475f96c8294bab28a6 test1/2826 0
-380c2673b7c495c9e21d3b2891df197d32a82c03ccddf5b410f560d62df8a043 test1/2827 0
-2d631979aec8ca003dc609dcc8b9c5a4e94a5c8e6ae11be1c10810cb707e4fb0 test1/2828 0
-01adca85e263997fb00a79da16916cd1386511e1479fa49ece67a5cc93804d18 test1/2829 0
-292918ea9572aea300bc8e99f29f201e62d2e770b5294636b15d639fa90eafc0 test1/2830 0
-384eb796c091a7db47ed5512413edd4822b018e0e3f4ae9160149ae274df0b8d test1/2831 0
-072b56a55a44268d8f9a281fca21b2058f2316aeb0ac5f1c5f0d11464f3f9005 test1/2832 0
-f1088639cf58d6448442f9c66cff895f21c676e3df51129d98dc75bdaa83c950 test1/2833 0
-d67e9483962293944f61c64eeef45c85a88c6a6a001fdaa20ba288fb7ed3b81b test1/2834 0
-4121d1448514bf26f59ded75d4dbd49e4e07a91c262f4cbb3960123ab59e880e test1/2835 0
-c2f8d62b9fd4198a1754397b8323cd463cc08c266b97d450626aad9ec39268fa test1/2836 0
-85899bb54bc996c3a1cc87073d70afd5292c96bbb17052b7adb3edb174e532f5 test1/2837 0
-2ac782b7fef6b7a375069acc3f398b70014a01c33fb733faf66fc4885864930b test1/2838 0
-f7e18b2b565d5169bde4fd8b7ade9412a3c098379eb754758833f824eb171682 test1/2839 0
-019c32c27a9c2d46b8738e4e39beb66a40f491538046a532c734e037092794b0 test1/2840 0
-af5a5e7edf8080551bfaf5482cc1102e3fa0e587621c8fb17f82160b20132b9f test1/2841 0
-a7f8bf12a956b01e1c94bed5c7ae556597c3fc387ea92160042d039583355f32 test1/2842 0
-48b4cc523441bd6e03b0c52053365463f76a49beeebc6faf6ebdfeed26db7236 test1/2843 0
-5bc6dfcab6356c8c3505a6ee4d5154580b99b0ee56331aa11618ab9101df45f3 test1/2844 0
-fcffdcaa6fac8219a083d16f751357b50ef45bd8e451095ea7e15fac70ad4b66 test1/2845 0
-dbec24bcf178b405ad8a234613eb3d522158205b14d550abb53edd5bacb0d6e1 test1/2846 0
-260b360df02c65885f6b655c63fc029b00650239d1f05017d5eb0955faf25fcb test1/2847 0
-ec295d4c4674f0e1592fa54c692728a8354eaac80b6825db165780f15325e72e test1/2848 0
-36612898d09267b076cea4c9ae8b3b8de9ecb808c81d4d75a46ddce310122d10 test1/2849 0
-4f8c0f2242625c4720ab49603e655633e21485aff5b1fd481fbfc865901c60dc test1/2850 0
-4847c377188e1209cb8b95c899459d8542f165985cc2847a63d0d28ccb3c48ce test1/2851 0
-92e70d0d27d373cd4b3d92ca1762af9d17e03f580c25215c8157db228c66c0e0 test1/2852 0
-cdeaf99d365d46e148105ed3a6a6f67063271e5e602c6c8df69fd305e75efc18 test1/2853 0
-a7694916a18aca2d06aa7da3d674e22e9cd255cb2bc3a95152594bdf83da4c1e test1/2854 0
-d84d4ba36dd1a0cc786a6ab62329be975f8ac7a328f5771d0f4112f0324d56a2 test1/2855 0
-59341229662ea779d8d63cba45d5c3715fa4c33c89d54e1daf5b97da54fba98d test1/2856 0
-798bc95ad41f69192d2eae69c0ec2fcca50c1e9d97103473bdde3942aea124ed test1/2857 0
-cb2403e10ee67f42365b04dfbff267611a762bad418c76911323a8a628933880 test1/2858 0
-46de72422906d92199355d8d09224de13fe37fec01eb16a5032942fb7136df73 test1/2859 0
-66b3daeca3efb9498d21139cfaed05f625646ca62617d29cbf221fb8265b95d1 test1/2860 0
-d52da1d6b89d8659dbf1a7859ecafdf507aba21e017d1d1297c82280b4433838 test1/2861 0
-9b730b0d51f81fafe1674d248d37e58f6221ffea87b52735ad5fd670a706eb13 test1/2862 0
-4cd71e83488c8110c91a8b777e77766c70f4e8f6b75481798ecdb5c87a441804 test1/2863 0
-b49f40aa3fc9559c4f8c0c6a5e3afef74cc2e021e98d4bbc56b056a22bd33da7 test1/2864 0
-7de6145c104777db6292857431c5af53b1ecca0c1669ea974b97a313016f2fa9 test1/2865 0
-27f3592790b591c2738ae6a5f7b4d39f80e5a61c3c20614600a0f33e58371f7e test1/2866 0
-99ed7c6ac36358c24f06cf03e4d7073206716cf72e3185629e19aef34f4570bb test1/2867 0
-22d412ebbad4b38a1843a46c3563d67a5a7c0218cceca4c33423e299dd40415b test1/2868 0
-fed498be36cb2c0bb64ae9ea368de78003a46078968cc720a2acec1a2f76b0fa test1/2869 0
-c05776cf90e1ae00f43066b11980fe2923e6933179b91b3de7eb496fdc78c515 test1/2870 0
-cc4b2b25aece6e645a0fbff58b71363602990536c901ebeee7a8bb20289d6fe3 test1/2871 0
-968e86bf9630aab3627aff546a5c38f5912aee8342324f4a346ed95b9d0d3d73 test1/2872 0
-8abc40591be782331284e8608ef1f82973963e152df25ec8f9891c49727be8e6 test1/2873 0
-2f3f6d9c47290fe061272cfb6106c12cafe156dc01ccaac004473d6b6beab2b2 test1/2874 0
-5143d99bafa6ba8e1ca73001eb4a41d0158dc8a0136a4c7bc685aa8bf87eec6e test1/2875 0
-4aa778e59f16f854e70cfbe3e787ea27dcb359d2ec0eaecb9901767296998ae5 test1/2876 0
-2b0b7aaa2ab0e32cdd155aab38dded95fec63e5dde52d48b39517c652e595ab6 test1/2877 0
-34a579c64648f78afa1444b1a82d3668b7b7cc80f0df136947fc2829c9c3cce4 test1/2878 0
-927773c703435160888a181409eac7ca4d18bcc91b3a9d9b576c2ccd0d275349 test1/2879 0
-7ae66d21e54997af35a0d329760a545609df5291e6deb9cd436a9472b78428af test1/2880 0
-6fee1832ac36361284f8bad53466d1408c2ce7e8bcfada1d45598611fc2dd85a test1/2881 0
-a7be3ebeccbe23eb6225a139471ec4dd7a74e24deca9daefd118ce987f0f8a7d test1/2882 0
-aae84cbf60a312439e0f1c4214bc93695706e1c4f818a067fcb2e32176766dff test1/2883 0
-4a47c600ed541c8c62b4c13032e927518575ece8f72daf4864f89ddd93afd872 test1/2884 0
-f88b2a2a37f23aee86aae3f733e5085f3bb8c827e29cc613804a771555ac1c56 test1/2885 0
-2d4a3becde98241def3019463c772fdbfd0fccf0f3fa725caecb783f70571da4 test1/2886 0
-4bdd367c3efec38e3baffa123140ec08a06b5928020778119b20dcb62c33f0a2 test1/2887 0
-6dff9f86e4665ec2800db2521e78b3acd43eb621078c306946f478b02f03f8aa test1/2888 0
-09c79b0f3d4ab407f60d6b21c4162696c3836f43ea17aa28690bfcf47f6c83c8 test1/2889 0
-b18d8c06bc9394a07c30968f38835069c947ee5583ae411c9eadd11d7da232e9 test1/2890 0
-7da561130beb7426c5f5ea68652b5f2f24812f16d795e59c133e37be7da362b2 test1/2891 0
-d3386d3f4cd0f6af673254c940e6f27f5a9f6453076c62753ac0dcc90011455c test1/2892 0
-a95f3a258819649a546ccaff18d08407315f587e83664d72d91608b33dd316d3 test1/2893 0
-393ca4dff751f3c8912dd6893e4b0a6a092bba3f5a62e2aa91a59b2122333a5e test1/2894 0
-ca2db108f8be49c3093b2b43053ae67e84b2dc7a7618e7ecbcae975ee43c1bba test1/2895 0
-96eb5e51d71b65a3e51f93973dfd09bc1a064b68a57bd8b392347de8bed43b65 test1/2896 0
-9afedae5118c62fcf3ba4c3a54aa3df5e59499d106fece050dc89298b56e8557 test1/2897 0
-fe0fadd6dbb4a3993d0a6946bc78c049ae7f83b8f0195b82694c6c4527790d14 test1/2898 0
-1beb312f8872f3cafa905b287f22ec68d861ed3fab5917f270c9d48fdf3baece test1/2899 0
-1b864a6d99d2ee3098c16062040163233cdf41d901ffcc60b839da3e26ae6570 test1/2900 0
-d4011b56de71f5e25afd4675b149023b730070f04e3cf62b8329c6b48019aa1c test1/2901 0
-09de244282999f0bf5f1ffb7ecb0c206bc72227a16dd10523bd0ec666e396c79 test1/2902 0
-54192bdbe158c797183fc248c85da09f27c44388a4edfad8b5d6b7ccd45f69de test1/2903 0
-c92a8027b0c3bdde82cc63488fa1b2b344564d5571e670af99cbb170f6eaab05 test1/2904 0
-89b094a37d64705e2c066a8856b4c9dfaf8225f7a14362004d6912a995b64d89 test1/2905 0
-505af18ba330ef3100b8e2f0c31d1d4b222d36e7d9dc3f09d8fd3ed614fcfbb0 test1/2906 0
-61178a21e17cca205adc35bfee2f7b9f3906089c38abcae39afc64c2e029864a test1/2907 0
-048a91abd2933278cc51c2e74d7c59d33c65c1443ab44944db11830ee9e7e6f6 test1/2908 0
-031415bf2dd4344a0139938a40c63a9cae953066ded086d9d25771057f1251a8 test1/2909 0
-65e266de4ff5dcee912db08f03170501d918da696089008c602db48fa1867980 test1/2910 0
-edb2b4b1ddb4c853affcbe5cb82c53582551abf42a2b4377124eed55d43e0e9d test1/2911 0
-c64ba762feb1f4568f66db59dfaf566d3ebc7c7bdca9fa03cb1a3ccc407bb2fe test1/2912 0
-94809d49af3a4705c675f17e5a70c0b7bb4b985bfa103cfc6107444bb05cac1e test1/2913 0
-16733fb82a05f876008deea7b9fc71377271177a2e41dee7457f8bd94339c01f test1/2914 0
-e47526cdd9296f6aa2cfcb5e0cd184918d4dd96d43395a7b40cc1d33ff32399e test1/2915 0
-7c746895b356845875a5319f10daec0e5bccd8964305a4ffc4b757112d1fb69f test1/2916 0
-c7e275e7e00ea5a25a0afce1cc8004845fdd8930f7651a39dd69654eadc111fe test1/2917 0
-aaf71d5580dc9c54221ebb896b256ce1a0b8aafeb5f602913f06e48e8681f464 test1/2918 0
-5b12203350172fea0fd072c45049cffa4db7da0b96b9ea2fc8dd641008f126fb test1/2919 0
-7d838f764aa9d3200bb2d2e9db2d9fd030d7f5659b24bd32f36073c4e326f0d8 test1/2920 0
-62a63042ce91113d5e6fd585692bf299041d80b59e869ac9244f397fd4d00872 test1/2921 0
-f1bc07d0fb9c5c12b41800a3ec4719a511a88d2977ce984935cb7103bcbbf671 test1/2922 0
-b8f3c3ed6335f15751b1991f999a889d884c6d0dc11da86772408594f91c3fbd test1/2923 0
-c27902b2424d33a74d6b6040d71b78026734311a0c1ccfe7d8c0b21d9cde4c56 test1/2924 0
-e0cce9853a9df4c71673743abfdaea3acddd2da91aa7172cebb0cf49be2140a8 test1/2925 0
-7cc5c4b66a7bd725ab79ef0840f8eb7d0011dcadea165a33f669f985a6ad06be test1/2926 0
-006d50c6956221642e9b4ad9cf86d4bc8bb0301e4ae71d82f2630aff4a1ac8ee test1/2927 0
-89a1577e5fb1ef0a7731b6b2d4f58476270c810396e2b22b8db13e7d75d4131c test1/2928 0
-a5453397eec6dfd1d44d59b5ab1c2368fd15bc38411c02770da66c2978c92e05 test1/2929 0
-21fa11d4da39ed740f6af427089bd1e34faab79fa456cf29f63146b27368b923 test1/2930 0
-86b882f7d19cc77981f36ae94272556032096130eff6e69cbf09b47e4302d625 test1/2931 0
-1b3363302630f77bc9ae0c2ba9d26a6cb90eb5858c01872a3681c9430e444b7e test1/2932 0
-25be3bf05a88652b4900370425a2d930a9691745bc5e111ec3dbc8c4f80cb6ff test1/2933 0
-64d05a806ae64f2ad104d188697a0f6d6e9e8ccbb4d62d25b5108e0d71fef929 test1/2934 0
-ad3553888cc380180b670eac3f168637feaf6717b59ca24bde365f02e622e5ad test1/2935 0
-dc855e3d7cd9d345637fb32638954e3c80b9da5d8acd06b4f085cc6d0bf891a8 test1/2936 0
-65044f168cd3ab38be227de1d8b7337eeb79d32c157b68c0abeb685410035742 test1/2937 0
-d2a2076ed4f19908ec2022d1e7b24a8ffadd33b935ea1aebce08d0baab13ac38 test1/2938 0
-57f3715a0f4e4d08afe25d3f21f52c14e91472a6b79d89daf123e6d9ba20d815 test1/2939 0
-cbe78f95ab31a3d8eb8070c27ec6f077b0b9b6a7d9acab619a589bdef271ade9 test1/2940 0
-0b9ad5ba4bea62b691fb3f4435041bb58108ed19bad520e5894627a0ccdbe276 test1/2941 0
-e584746c7db40c58c2fc4e188a5738cc37bd2792a0481edd8c7272ee0f22eed0 test1/2942 0
-e0f8468e3fb932e809ae8189f2e695133f3b8219864b2e9b956319351b0d6cb5 test1/2943 0
-368096572deda36211a28413a1afbee5d19ea19ea3de6f359bbf46b3bb9d98eb test1/2944 0
-8b2abf73fac61167a7545b83979d50ea3f511ab864c38de81a4dfe940d773583 test1/2945 0
-c48135d77474a97778147aa840cbb0409d5fac00bb9167c5270c209391e04b9b test1/2946 0
-2abcc0f29f41835d37b3b5d7fec41f55e73c17833503d0cb0d76bb8697b5eae2 test1/2947 0
-d9d86a738fa5002b0cb5b268c3152719e1809cde1b032849a0b34e9b0c7a066b test1/2948 0
-11652727b8431476aeb90cd8dd2cc05fcbf8d16162ebbb9d5d983802c5c81a2f test1/2949 0
-5867da820fde5940d7c0a34ed8ef397ff0c81c9dbedbc103e3cc2511d28b9aa7 test1/2950 0
-4da53e83a59212b67ee075f7bf6fa4d1b8ab898f5cb17b916551a420e4950ef3 test1/2951 0
-9e6a2d8c86e9500e5a4b7a65ad13e6757d9e7bfcff4cc88a4cc28d91765bc659 test1/2952 0
-a0b2715dc2951179de3e2d2e33131b7ce9ac9680572dd90734897dba5f98e993 test1/2953 0
-9f984e2110bc8312b987585f9254fbe5363a076ceafd45d0834789d0130fff05 test1/2954 0
-ac9593dd50e2aaf31dc843c8ccf8aaa158236cf832c306335a2b3cc6dea748af test1/2955 0
-bb610dc36b46acc9011d6de5994cc3e004a3de0d645885633b2dbbeb690fd6f7 test1/2956 0
-b37a1a5961aa6a6421e7af307d299bc8d09cdc2d3b01b4889eefc03bd49fd155 test1/2957 0
-7cf0e1faef63f78fe2993d865c39e8a425c82ed6885744994f0bce5b4dcf22fa test1/2958 0
-110c2c5a06e8b5a7e7ec2acbeb0d503ac24a5a8d799204ae0ee575b28a9035d8 test1/2959 0
-3c99c7cd555005383293c6cb1dcc7b2822dd0132d5985802dadc892a031ffff6 test1/2960 0
-26835dfed3505322dd68e556eda429873624afa628fdcb23bd02170c544cb4ef test1/2961 0
-2685cc4df39198d502e34a841b81a7a916ea891f15b77a98ff8a153c34e7225a test1/2962 0
-074a1f06c8a5deefda34e60ae30e5af271811eadedbd02e9eab11104f7fe230d test1/2963 0
-fe83d60c7099e231fd0c57edad15472272ab63a0c958df874b00e13ed0eb956f test1/2964 0
-54e48e84bcc0f774f11934f553c1687101c1e639e32ffd4cd9a9fb55eecd285e test1/2965 0
-ddd6fae9979dda839bc7dbc370530e5b3adc8445ee0caceb49519883cee83739 test1/2966 0
-a281835dbed1e4fc9deb7943a5efca05b7ac92f2839027b007e505d4bc7c3d48 test1/2967 0
-a6c9c29efefbe720a6414fc12c2fe4679ff819b5b2c771bd99474573824e73ad test1/2968 0
-7847709e0677cfd0d114158a22cbb4900714c3c276a6a313c0f5f2c1f71df5a8 test1/2969 0
-a7139a1587e08b85776a4b4dfed553b6b7d558c1221a1cefc28c1e46393562e4 test1/2970 0
-5bf5611712faf02cf71cba2ba9efcd925951d45aa4e133b97450f84289e2a5fc test1/2971 0
-172089a3515735aaf4bc246e67f83c5266a5a8ab0efe57a223f93281b4faee2a test1/2972 0
-fa0e4b2f2ee1832ebd68676f22966f65e822b85f680e0397df3d44181732844a test1/2973 0
-3486589dc8ffb845c7fd2818f47c714f9a18e0c089e862d2c9ac203d7e6f3396 test1/2974 0
-2a7357cae0796dd83fe086bc7511f34b0bb61fe6bbda091629e667d6c775f272 test1/2975 0
-c58629fa79ea48da49daee30cafb9d276b3f0467a5f7d0eb522ceb5b9ef83d50 test1/2976 0
-0938caeaffd5a4d4b2557ddf27d85a00e4b135697c70158053942eb289004f64 test1/2977 0
-468e712434715c9808554b76020a660c1df296d448eb4ebd7fcdb53830666ee5 test1/2978 0
-5dcbe597bb4be06b61622efd4ab59715fcda1f85f5b0fb3ffead038a4a7e7975 test1/2979 0
-11e8ebc6da602391abc7b3ed14709e637848a49f794987ff5336adba512cbd29 test1/2980 0
-d66bc7295eba90722a7594c2a9143e7f35a194714921cd3c7f3522122aed4ae9 test1/2981 0
-047ebf0cebf36b6a754faad01a5e3d6e5e0a77766b87f807b1ecaf59174f09da test1/2982 0
-e5351b4749017e65e064b1f152086184e46b8640c329e89db62778a3c1aa817d test1/2983 0
-3db33214f2016e78a7aa6d3f0d2827b8d5d40d3da12a3757f132de597d15c79f test1/2984 0
-08c7cc09e71ed76c82d00e325bdcc84e3a5d2cc386d2f4e03968496a96792f81 test1/2985 0
-cb88fe541000fb33b44e5b70d8c26ac8311c102a124980694d668810dca64cb1 test1/2986 0
-542472a6f3566e0d716b3758d70c2bcfc9b9d09156985867b0fb2e1a13824845 test1/2987 0
-c359e996a630ce709109376d70201bbbb22b2226280717774cbcc19f9f022c21 test1/2988 0
-7bf83c1d95e09ce3c65094da2227b786fee9cd9673c017ac38b5b783106ba27a test1/2989 0
-62e779585c02500ec2e085b07f99797a543c55b53a1bc2048e690f73ef68dcda test1/2990 0
-0f3b82a490c2d3d4caa86d8e290ee2b245c2d97b95af465246935a2f8bdb6fdf test1/2991 0
-85354ff3fee9c06ddaa34fbedb2f7b8b0890436d085de05ce1a0f7fa7f790324 test1/2992 0
-dbf4ab486ca53b2710914bb0ee8f2074c61c024e044fe41501fcd718cd2f1375 test1/2993 0
-b3083cc70ea831123e1f7756527655cbe148898d4e7810caefdfc64a436c5311 test1/2994 0
-e98d3684f784c4dd2faa96ba68a8454e65589cbbd295138604543eda293a67d6 test1/2995 0
-5e850d63c3d528db495ab68e87862655dba38526987667afe1898f6c6b3e4e2e test1/2996 0
-5b18cb632ccd3cc63f9d1a056553d419d56d398a2918b18de31a56bf9f526fa7 test1/2997 0
-16f432cdc47bd1890ee87064f3bd472b457be46ada2763d60441a20cf4dd8079 test1/2998 0
-5ea0b38d9049b021a7c39d798e2aa312659eb1db52569b0c4ccee60f5d356e57 test1/2999 0
commit 8c20ec307817a096741af905f66a99e85a783a3f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 21 21:06:54 2011 +0200
Test configuration writing for nested AS7-resources
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
index a89db4d..c7a4e2a 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
@@ -182,6 +182,9 @@ public class ConfigurationWriteDelegate implements ConfigurationFacet {
private void updateHandlePropertyMapSpecial(CompositeOperation cop, PropertyMap prop, PropertyDefinitionMap propDef) {
Map<String,Object> results = updateHandleMap(prop,propDef);
+ if (prop.get(namePropLocator)==null) {
+ throw new IllegalArgumentException("There is no element in the map with the name " + namePropLocator);
+ }
String addrVal= ((PropertySimple)prop.get(namePropLocator)).getStringValue();
Address addr = new Address(address);
addr.add(type,addrVal);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index 3ed04d1..ad91dac 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -41,7 +41,8 @@ public class Address {
public Address(Address other) {
this();
- path.addAll(other.path);
+ if (other!=null && other.path!=null)
+ path.addAll(other.path);
}
public Address(List<PROPERTY_VALUE> other) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
index 3afc242..4fedcd5 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
@@ -134,5 +134,13 @@ public class Operation {
return address;
}
+ @Override
+ public String toString() {
+ return "Operation{" +
+ "operation='" + operation + '\'' +
+ ", address=" + address +
+ ", additionalProperties=" + additionalProperties +
+ '}';
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
index 3bddfd4..3510b71 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
@@ -222,4 +222,48 @@ public class ConfigurationUpdatingTest extends AbstractConfigurationHandlingTest
String result = mapper.writeValueAsString(cop);
}
+
+ public void test7() throws Exception {
+ ConfigurationDefinition definition = loadDescriptor("SocketBindingGroupStandalone");
+
+ FakeConnection connection = new FakeConnection();
+
+ ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition,connection,null);
+
+ Configuration conf = new Configuration();
+ PropertyMap propertyMap = new PropertyMap("http");
+ propertyMap.put(new PropertySimple("name","http"));
+ propertyMap.put(new PropertySimple("port",18080));
+ propertyMap.put(new PropertySimple("fixed-port",false));
+ PropertyList propertyList = new PropertyList("*");
+ propertyList.add(propertyMap);
+ conf.put(propertyList);
+ conf.put(new PropertySimple("port-offset",0));
+
+ CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf);
+
+ assert cop.numberOfSteps() == 3 : "#Steps should be 3 but were " + cop.numberOfSteps();
+ Operation step1 = cop.step(0);
+ Operation step2 = cop.step(1);
+ Operation step3 = cop.step(2);
+
+ // As we do not specify a base address when creating the delegate 0 or 1 address element is ok.
+ assert step1.getAddress().isEmpty();
+ assert step2.getAddress().size()==1;
+ assert step3.getAddress().size()==1;
+
+ assert step1.getAdditionalProperties().get("name").equals("port-offset");
+ assert step1.getAdditionalProperties().get("value").equals("0");
+
+ assert step2.getAdditionalProperties().get("name").equals("port");
+ assert step2.getAdditionalProperties().get("value").equals("18080");
+
+ assert step3.getAdditionalProperties().get("name").equals("fixed-port");
+ assert step3.getAdditionalProperties().get("value").equals("false");
+
+ assert step2.getAddress().get(0).getKey().equals("socket-binding");
+ assert step2.getAddress().get(0).getValue().equals("http");
+ assert step3.getAddress().get(0).getKey().equals("socket-binding");
+ assert step3.getAddress().get(0).getValue().equals("http");
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml b/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
index 1de7d7a..42ff024 100644
--- a/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
@@ -137,4 +137,41 @@
</resource-configuration>
</server>
+
+ <server name="SocketBindingGroupStandalone"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ >
+
+ <resource-configuration>
+ <c:simple-property name="default-interface" readOnly="true" displayName="Default Interface"
+ description="Default Interface for these bindings. See NetworkInterfaces for its definition"
+ required="true">
+ <c:option-source target="resource" expression="type=NetworkInterface plugin=jboss-as-7"/>
+ </c:simple-property>
+ <!-- note: at domain level there is no port-offset -->
+ <c:simple-property name="port-offset" readOnly="false" displayName="Port Offset"
+ description="Offset from standard ports for this group."
+ required="false"/>
+ <c:group name="children:socket-binding:name" displayName="Individual socket bindings">
+ <c:list-property name="*" displayName="Bindings">
+ <c:map-property name="binding">
+ <c:simple-property name="name" readOnly="true"/>
+ <c:simple-property name="interface"
+ required="false">
+ <c:option-source target="resource" expression="type=NetworkInterface plugin=jboss-as-7"/>
+ </c:simple-property>
+ <c:simple-property name="port" type="integer"/>
+ <c:simple-property name="fixed-port"
+ type="boolean" defaultValue="false"/>
+ <c:simple-property name="multicast-address" required="false"/>
+ <c:simple-property name="multicast-port" type="integer" required="false"/>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
+ </resource-configuration>
+
+ </server>
+
+
</plugin>
\ No newline at end of file
commit f418da3ebe60d1107370ee7436c0bef7d1895b65
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 27 22:52:30 2011 -0400
Refactoring logic for accessing list of drift plugins in system config
Storing the drift config plugin names as was done initially was not
going to work. It would break in an HA environment. Instead of
persisting the names of enabled drift plugins, it is now a calculated
value obtained via a call from the service/SLSB layer.
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
index 6d0e80a..8dbc06e 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
@@ -126,10 +126,8 @@
DEFAULT_PROPERTY_VALUE="false" FREAD_ONLY="FALSE"/>
<!-- default drift server plugin settings -->
- <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
- DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]" FREAD_ONLY="FALSE"/>
- <data ID="58" PROPERTY_KEY="DRIFT_PLUGINS" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
- FREAD_ONLY="FALSE"/>
+ <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="drift-rhq"
+ DEFAULT_PROPERTY_VALUE="drift-rhq" FREAD_ONLY="FALSE"/>
</table>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 2b1097d..fe5f1f6 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3590,14 +3590,7 @@
<schema-directSQL>
<statement desc="Adding drift server plugin active plugin system configuration property">
INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
- VALUES (57, 'ACTIVE_DRIFT_PLUGIN', '[drift-rhq$$Drift:RHQ]', '[drift-rhq$$Drift:RHQ]')
- </statement>
- </schema-directSQL>
-
- <schema-directSQL>
- <statement desc="Adding drift server plugin plugins system configuration property">
- INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
- VALUES (58, 'DRIFT_PLUGINS', '', '[drift-rhq$$Drift:RHQ]')
+ VALUES (57, 'ACTIVE_DRIFT_PLUGIN', 'drift-rhq', 'drift-rhq')
</statement>
</schema-directSQL>
</schemaSpec>
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/common/composite/SystemSettings.java b/modules/core/domain/src/main/java/org/rhq/core/domain/common/composite/SystemSettings.java
new file mode 100644
index 0000000..ae1264d
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/common/composite/SystemSettings.java
@@ -0,0 +1,39 @@
+package org.rhq.core.domain.common.composite;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+// TODO javadocs...
+public class SystemSettings implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Map<String, String> systemConfiguration;
+
+ private Map<String, String> driftPlugins = new HashMap<String, String>();
+
+ public SystemSettings() {
+ }
+
+ public SystemSettings(Map<String, String> sysConfig, Map<String, String> driftPlugins) {
+ systemConfiguration = sysConfig;
+ this.driftPlugins = driftPlugins;
+ }
+
+ public Map<String, String> getSystemConfiguration() {
+ return systemConfiguration;
+ }
+
+ public void setSystemConfiguration(Map<String, String> systemConfiguration) {
+ this.systemConfiguration = systemConfiguration;
+ }
+
+ public Map<String, String> getDriftPlugins() {
+ return driftPlugins;
+ }
+
+ public void setDriftPlugins(Map<String, String> driftPlugins) {
+ this.driftPlugins = driftPlugins;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar b/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar
new file mode 100644
index 0000000..e8a10a6
Binary files /dev/null and b/modules/enterprise/gui/coregui/lib/morphia-gwt-0.99-SNAPSHOT.jar differ
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
index ac861b0..d404581 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
@@ -36,6 +36,7 @@ import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.common.ServerDetails;
import org.rhq.core.domain.common.ServerDetails.Detail;
+import org.rhq.core.domain.common.composite.SystemSettings;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
@@ -127,15 +128,14 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
protected void onDraw() {
super.onDraw();
- GWTServiceLookup.getSystemService().getSystemConfiguration(new AsyncCallback<HashMap<String, String>>() {
+ GWTServiceLookup.getSystemService().getSystemSettings(new AsyncCallback<SystemSettings>() {
@Override
- public void onSuccess(HashMap<String, String> result) {
+ public void onSuccess(SystemSettings result) {
canvas.addMember(getServerDetails());
Configuration config = new Configuration();
- String[] driftPlugins = null;
- for (Map.Entry<String, String> entry : result.entrySet()) {
+ for (Map.Entry<String, String> entry : result.getSystemConfiguration().entrySet()) {
String name = entry.getKey();
String value = (entry.getValue() == null) ? "" : entry.getValue();
@@ -173,9 +173,6 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
if (value.trim().length() == 0) {
value = "true";
}
- } else if (Constant.DRIFT_PLUGINS.equals(name)) {
- driftPlugins = value.split(",");
- continue;
}
PropertySimple prop = new PropertySimple(name, value);
@@ -184,7 +181,7 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
// build our config definition and populate our config editor
editor = new ConfigurationEditor(extendLocatorId("configEditor"), getSystemSettingsDefinition(config,
- driftPlugins), config);
+ result.getDriftPlugins()), config);
editor.addPropertyValueChangeListener(SystemSettingsView.this);
canvas.addMember(editor);
@@ -315,7 +312,8 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
*
* @return system settings config def
*/
- private ConfigurationDefinition getSystemSettingsDefinition(Configuration config, String[] driftPlugins) {
+ private ConfigurationDefinition getSystemSettingsDefinition(Configuration config,
+ Map<String, String> driftPlugins) {
ConfigurationDefinition def = new ConfigurationDefinition("sysset", MSG.view_adminConfig_systemSettings());
///////////////////////////////////
@@ -544,12 +542,10 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
activeDriftServer.setPropertyGroupDefinition(driftGroup);
List<PropertyDefinitionEnumeration> options = new ArrayList<PropertyDefinitionEnumeration>();
- for (String plugin : driftPlugins) {
- // plugin is of the form, [plugin_name$$plugin_display_name]]
- String pluginName = plugin.substring(1, plugin.indexOf("$$"));
- String pluginDisplayName = plugin.substring(pluginName.length() + 3, plugin.indexOf("]"));
- options.add(new PropertyDefinitionEnumeration(pluginDisplayName, plugin));
+ for (Map.Entry<String, String> entry : driftPlugins.entrySet()) {
+ options.add(new PropertyDefinitionEnumeration(entry.getValue(), entry.getKey())) ;
}
+
activeDriftServer.setEnumeratedValues(options, false);
def.put(activeDriftServer);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/SystemGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/SystemGWTService.java
index e530b67..a4fda65 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/SystemGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/SystemGWTService.java
@@ -24,6 +24,7 @@ import com.google.gwt.user.client.rpc.RemoteService;
import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.common.ServerDetails;
+import org.rhq.core.domain.common.composite.SystemSettings;
/**
* Provides information about the server as well as a way to reconfigure parts of the server.
@@ -37,6 +38,8 @@ public interface SystemGWTService extends RemoteService {
ServerDetails getServerDetails() throws RuntimeException;
+ SystemSettings getSystemSettings();
+
HashMap<String, String> getSystemConfiguration() throws RuntimeException;
void setSystemConfiguration(HashMap<String, String> properties, boolean skipValidation) throws RuntimeException;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
index 052bf11..7aa4117 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
@@ -28,6 +28,7 @@ import java.util.Properties;
import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.common.ServerDetails;
+import org.rhq.core.domain.common.composite.SystemSettings;
import org.rhq.enterprise.gui.coregui.client.gwt.SystemGWTService;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.system.SystemManagerLocal;
@@ -66,6 +67,15 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
}
@Override
+ public SystemSettings getSystemSettings() {
+ try {
+ return systemManager.getSystemSettings(getSessionSubject());
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public HashMap<String, String> getSystemConfiguration() throws RuntimeException {
try {
Properties props = systemManager.getSystemConfiguration(getSessionSubject());
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
index 9e405ec..f080f1a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
@@ -18,7 +18,6 @@
*/
package org.rhq.enterprise.server.plugin.pc.drift;
-import java.util.List;
import java.util.Properties;
import org.apache.commons.logging.Log;
@@ -29,12 +28,8 @@ import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
import org.rhq.enterprise.server.system.SystemManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginDescriptorType;
-import static org.rhq.core.domain.util.StringUtils.getListAsString;
-import static org.rhq.core.domain.util.StringUtils.getStringAsList;
import static org.rhq.enterprise.server.RHQConstants.ACTIVE_DRIFT_PLUGIN;
-import static org.rhq.enterprise.server.RHQConstants.DRIFT_PLUGINS;
/**
* This loads in all drift server plugins that can be found. You can obtain a loaded plugin's
@@ -53,55 +48,13 @@ public class DriftServerPluginManager extends ServerPluginManager {
public DriftServerPluginFacet getDriftServerPluginComponent() {
Properties sysConfig = getSysConfig();
- String value = sysConfig.getProperty(ACTIVE_DRIFT_PLUGIN);
+ String pluginName = sysConfig.getProperty(ACTIVE_DRIFT_PLUGIN);
- if (value == null) {
+ if (pluginName == null) {
throw new RuntimeException(ACTIVE_DRIFT_PLUGIN + " system configuration property is not set.");
}
- return (DriftServerPluginFacet) getServerPluginComponent(value.substring(1, value.indexOf("$$")));
- }
-
- @Override
- protected void loadPlugin(ServerPluginEnvironment env, boolean enabled) throws Exception {
- super.loadPlugin(env, enabled);
-
- String pluginName = env.getPluginKey().getPluginName();
- List<String> plugins = getDriftPlugins();
-
- int index = findPluginIndex(plugins, pluginName);
- if (index == -1) {
- plugins.add("[" + pluginName + "$$" + env.getPluginDescriptor().getDisplayName() + "]");
- saveDriftPlugins(plugins);
- }
-
- }
-
- @Override
- protected void unloadPlugin(String pluginName) throws Exception {
- super.unloadPlugin(pluginName);
-
- List<String> plugins = getDriftPlugins();
- int index = findPluginIndex(plugins, pluginName);
-
- if (index != -1) {
- plugins.remove(index);
- saveDriftPlugins(plugins);
- }
- }
-
- private List<String> getDriftPlugins() {
- Properties sysConfig = getSysConfig();
- return getStringAsList(sysConfig.getProperty(DRIFT_PLUGINS, ""), ",", true);
- }
-
- private void saveDriftPlugins(List<String> plugins) throws Exception {
- SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
- SystemManagerLocal systemMgr = LookupUtil.getSystemManager();
-
- Properties sysConfig = systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
- sysConfig.put(DRIFT_PLUGINS, getListAsString(plugins, ","));
- systemMgr.setSystemConfiguration(subjectMgr.getOverlord(), sysConfig, false);
+ return (DriftServerPluginFacet) getServerPluginComponent(pluginName);
}
private Properties getSysConfig() {
@@ -111,17 +64,4 @@ public class DriftServerPluginManager extends ServerPluginManager {
return systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
}
- private int findPluginIndex(List<String> plugins, String name) {
- int i = 0;
- for (String value : plugins) {
- // value is of the form, [plugin_name$$plugin_display_name]
- if (name.equals(value.substring(1, value.indexOf("$$")))) {
- return i;
- }
- ++i;
- }
- return -1;
- }
-
-
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
index 19a454a..229183d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
@@ -60,8 +60,9 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.common.ServerDetails;
-import org.rhq.core.domain.common.SystemConfiguration;
import org.rhq.core.domain.common.ServerDetails.Detail;
+import org.rhq.core.domain.common.SystemConfiguration;
+import org.rhq.core.domain.common.composite.SystemSettings;
import org.rhq.core.server.PersistenceUtility;
import org.rhq.core.util.ObjectNameFactory;
import org.rhq.core.util.StopWatch;
@@ -70,6 +71,10 @@ import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.authz.RequiredPermission;
import org.rhq.enterprise.server.core.CoreServerMBean;
import org.rhq.enterprise.server.core.CustomJaasDeploymentServiceMBean;
+import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
+import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginContainer;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginManager;
import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.enterprise.server.util.SystemDatabaseInformation;
@@ -182,6 +187,46 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot
return copy;
}
+ @RequiredPermission(Permission.MANAGE_SETTINGS)
+ public SystemSettings getSystemSettings(Subject subject) {
+ return new SystemSettings(toMap(getSystemConfiguration(subject)), getDriftServerPlugins());
+ }
+
+ private Map<String, String> toMap(Properties props) {
+ HashMap<String, String> map = new HashMap<String, String>(props.size());
+ for (Map.Entry<Object, Object> entry : props.entrySet()) {
+ map.put(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
+ }
+ return map;
+ }
+
+ private Map<String, String> getDriftServerPlugins() {
+ DriftServerPluginManager pluginMgr = getDriftSererPluginManager();
+ Map<String, String> plugins = new HashMap<String, String>();
+
+ for (ServerPluginEnvironment env : pluginMgr.getPluginEnvironments()) {
+ plugins.put(env.getPluginKey().getPluginName(), env.getPluginDescriptor().getDisplayName());
+ }
+
+ return plugins;
+ }
+
+ private DriftServerPluginManager getDriftSererPluginManager() {
+ MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
+ if (masterPC == null) {
+ log.warn(MasterServerPluginContainer.class.getSimpleName() + " is not started yet");
+ return null;
+ }
+
+ DriftServerPluginContainer pc = masterPC.getPluginContainerByClass(DriftServerPluginContainer.class);
+ if (pc == null) {
+ log.warn(DriftServerPluginContainer.class + " has not been loaded by the " + masterPC.getClass() + " yet");
+ return null;
+ }
+
+ return (DriftServerPluginManager) pc.getPluginManager();
+ }
+
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void loadSystemConfigurationCacheInNewTx() {
// this is used by our timer, so any exceptions coming out here doesn't throw away our timer
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
index e023f48..0d82732 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerLocal.java
@@ -26,6 +26,7 @@ import org.rhq.core.db.DatabaseType;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.common.ServerDetails;
+import org.rhq.core.domain.common.composite.SystemSettings;
/**
* Provides access to the server cloud's system configuration as well as some methods
@@ -146,6 +147,8 @@ public interface SystemManagerLocal {
ServerDetails getServerDetails(Subject subject);
+ SystemSettings getSystemSettings(Subject subject);
+
Properties getSystemConfiguration(Subject subject);
void setSystemConfiguration(Subject subject, Properties properties, boolean skipValidation) throws Exception;
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index b385473..46611ed 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -143,7 +143,7 @@ public class JPAUtils {
em.createNativeQuery("delete from rhq_measurement_sched");
em.createNativeQuery("delete from rhq_measurement_def");
em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57, 58)");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57)");
em.createNativeQuery("delete from rhq_alert_notification");
em.createNativeQuery("delete from rhq_alert_condition_log");
em.createNativeQuery("delete from rhq_alert");
commit a8b8c0db8667875f84b14e502d5c225ad2ceec57
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Jul 27 16:10:09 2011 -0400
[BZ-726202 - alerts not firing despite valid baseline values and alert conditions templates for some agents]
The issue here was that user created baseline did not properly trigger a
measurement condition cache reload for the affected agent. This was due
to the new Baseline not committed/visible to the trans executing the
agent status update.
- also, removed unused findBaselineForResourceAndMeasurementDefinition as
opposed to changing it for this fix.
- made a local public method private and removed some dead commented code
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
index 282ae1a..286a75e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
@@ -355,9 +355,25 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
+ @TransactionAttribute(TransactionAttributeType.NEVER)
public MeasurementBaseline calculateAutoBaseline(Subject subject, Integer measurementScheduleId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+ MeasurementBaseline result = measurementBaselineManager.calculateAutoBaselineInNewTransaction(subject,
+ measurementScheduleId, startDate, endDate, save);
+
+ if (save) {
+ // note, this executes in a new transaction so the baseline must already be committed to the database
+ agentStatusManager.updateByMeasurementBaseline(result.getId());
+ }
+
+ return result;
+ }
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ public MeasurementBaseline calculateAutoBaselineInNewTransaction(Subject subject, Integer measurementScheduleId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+
MeasurementBaseline baseline;
MeasurementSchedule sched = entityManager.find(MeasurementSchedule.class, measurementScheduleId);
@@ -391,13 +407,26 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
- //calculateAutoBaseline(LookupUtil.getSubjectManager().getOverlord(),
- //chartForm.getGroupId(), chartForm.getM()[0], chartForm.getStartDate().getTime(), chartForm
- //.getEndDate().getTime(), false);
-
+ @TransactionAttribute(TransactionAttributeType.NEVER)
public MeasurementBaseline calculateAutoBaseline(Subject subject, int groupId, int definitionId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+ MeasurementBaseline result = measurementBaselineManager.calculateAutoBaselineForGroupInNewTransaction(subject,
+ groupId, definitionId, startDate, endDate, save);
+
+ if (save) {
+ // note, this executes in a new transaction so the baseline must already be committed to the database
+ agentStatusManager.updateByMeasurementBaseline(result.getId());
+ }
+
+ return result;
+ }
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ public MeasurementBaseline calculateAutoBaselineForGroupInNewTransaction(Subject subject, int groupId,
+ int definitionId, long startDate, long endDate, boolean save) throws BaselineCreationException,
+ MeasurementNotFoundException {
+
if (save && !authorizationManager.hasGroupPermission(subject, Permission.MANAGE_MEASUREMENTS, groupId)) {
throw new PermissionException("User[" + subject.getName()
+ "] does not have permission to calculate and set baselines for group[id=" + groupId + "]");
@@ -405,7 +434,7 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
MeasurementBaseline baseline;
try {
- baseline = calculateBaseline(groupId, definitionId, true, startDate, endDate, save);
+ baseline = calculateBaselineForGroup(groupId, definitionId, true, startDate, endDate, save);
if (save) {
// We have changed the baseline information for the schedule, so remove the now outdated OOB info.
oobManager.removeOOBsForGroupAndDefinition(subject, groupId, definitionId);
@@ -435,43 +464,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
}
}
- public MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resourceId,
- Integer measurementDefinitionId) {
- if (!authorizationManager.canViewResource(subject, resourceId)) {
- throw new PermissionException("Cannot view the baseline for resourceId=" + resourceId
- + "] - you do not have permission");
- }
-
- List<MeasurementBaseline> baselines = getBaselinesForResourcesAndDefinitionIds(new Integer[] { resourceId },
- new Integer[] { measurementDefinitionId });
- if ((baselines != null) && (baselines.size() > 0)) {
- return baselines.get(0);
- }
-
- Subject overlord = subjectManager.getOverlord();
- try {
- MeasurementSchedule schedule = measurementScheduleManager.getSchedule(overlord, resourceId,
- measurementDefinitionId, true);
-
- /*
- * Use all available data from the epoch until now to calculate the baseline (we don't need to start from
- * the epoch, because the baseline should have been auto-calculated after a few days, but it's a catch-all)
- */
- MeasurementBaseline baseline = calculateAutoBaseline(overlord, schedule.getId(), 0, System
- .currentTimeMillis(), true);
-
- return baseline;
- } catch (MeasurementNotFoundException mnfe) {
- log.error("Could not find measurement schedule for " + "resourceId=" + resourceId + ", "
- + "measurementDefinitionId=" + measurementDefinitionId, mnfe);
- } catch (BaselineCreationException bce) {
- log.error("Could not calculate baseline for " + "resourceId=" + resourceId + ", "
- + "measurementDefinitionId=" + measurementDefinitionId, bce);
- }
-
- return null;
- }
-
@SuppressWarnings("unchecked")
private List<MeasurementBaseline> getBaselinesForResourcesAndDefinitionIds(Integer[] resourceIds,
Integer[] definitionIds) {
@@ -531,15 +523,13 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
if (save) {
entityManager.persist(baseline);
entityManager.merge(schedule);
-
- notifyAlertConditionCacheManager("calculateBaseline", baseline);
}
return baseline;
}
- public MeasurementBaseline calculateBaseline(int groupId, int definitionId, boolean userEntered, long startDate,
- long endDate, boolean save) throws DataNotAvailableException, BaselineCreationException {
+ private MeasurementBaseline calculateBaselineForGroup(int groupId, int definitionId, boolean userEntered,
+ long startDate, long endDate, boolean save) throws DataNotAvailableException, BaselineCreationException {
MeasurementAggregate agg = dataManager.getAggregate(subjectManager.getOverlord(), groupId, definitionId,
startDate, endDate);
@@ -583,8 +573,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
if (save) {
entityManager.persist(baseline);
entityManager.merge(schedule);
-
- notifyAlertConditionCacheManager("calculateBaseline", baseline);
}
}
@@ -592,12 +580,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
- private void notifyAlertConditionCacheManager(String callingMethod, MeasurementBaseline baseline) {
- agentStatusManager.updateByMeasurementBaseline(baseline.getId());
-
- log.debug("Invoking... " + callingMethod);
- }
-
@SuppressWarnings("unchecked")
public List<MeasurementBaseline> findBaselinesForResource(Subject subject, int resourceId) {
if (authorizationManager.canViewResource(subject, resourceId) == false) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
index 88d8e94..7f7655a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
@@ -92,9 +92,17 @@ public interface MeasurementBaselineManagerLocal {
MeasurementBaseline calculateAutoBaseline(Subject subject, Integer measurementScheduleId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+ // internal use only for transactioning reasons
+ MeasurementBaseline calculateAutoBaselineInNewTransaction(Subject subject, Integer measurementScheduleId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+
MeasurementBaseline calculateAutoBaseline(Subject subject, int groupId, int definitionId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+ // internal use only for transactioning reasons
+ MeasurementBaseline calculateAutoBaselineForGroupInNewTransaction(Subject subject, int groupId, int definitionId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+
/**
* Unset the {@link MeasurementBaseline#setUserEntered(boolean) user-entered} property in baselines so that we can
* do autobaselines on it again.
@@ -105,19 +113,6 @@ public interface MeasurementBaselineManagerLocal {
*/
void enableAutoBaselineCalculation(Subject subject, Integer[] resourceIds, Integer[] definitionIds);
- /**
- * Returns the baseline for a measurement identified by its measurement definition and the resource whose
- * measurement it is.
- *
- * @param subject
- * @param resource
- * @param measurementDefinitionId
- *
- * @return baseline of the resource's measurement with the given definition
- */
- MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resource,
- Integer measurementDefinitionId);
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// The following are shared with the Remote Interface
commit 7a464d4a04553a27de92b426604f81ce6f710567
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Jul 27 15:17:52 2011 -0400
context menu on change set node
multiple select tree nodes
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 6085af1..8203361 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -47,7 +47,6 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -67,7 +66,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// fetch the top nodes at the inital onDraw()
setAutoFetchData(true);
setAnimateFolders(false);
- setSelectionType(SelectionStyle.SINGLE);
+ setSelectionType(SelectionStyle.MULTIPLE);
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
@@ -96,9 +95,10 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
TreeNode eventNode = event.getNode();
if (eventNode instanceof ChangeSetTreeNode) {
- CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ Menu menu = buildChangeSetTreeNodeContextMenu((ChangeSetTreeNode) eventNode);
+ menu.showContextMenu();
} else if (eventNode instanceof DriftTreeNode) {
- Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ Menu menu = buildDriftTreeNodeContextMenu((DriftTreeNode) eventNode);
menu.showContextMenu();
}
}
@@ -171,12 +171,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @param node the drift node whose menu is to be displayed
* @return the context menu to display
*/
- protected Menu buildContextMenu(final DriftTreeNode node) {
+ protected Menu buildDriftTreeNodeContextMenu(final DriftTreeNode node) {
Menu contextMenu = new Menu();
// title
- String titleName = node.getName();
+ String titleName = node.getTitle();
if (titleName.length() > 50) {
// make sure the title isn't really long so the menu is not abnormally wide
titleName = "..." + titleName.substring(titleName.length() - 50);
@@ -204,6 +204,36 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
}
/**
+ * Builds the right-mouse-click context menu for the given change set node
+ * @param node the change set node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildChangeSetTreeNodeContextMenu(final ChangeSetTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getTitle();
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem deleteItem = new MenuItem(MSG.common_button_delete());
+ deleteItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ // TODO: delete the change set
+ }
+ });
+ contextMenu.addItem(deleteItem);
+
+ return contextMenu;
+ }
+
+ /**
* We override this because we know all of our nodes will have titles. Without this,
* I could not get the title of change set nodes to show - it always fell back to using
* the name. This way is at least faster, since we don't do any conditional checking,
commit 9aecf5f44f150b18a2454182d12827a52e16f49f
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 27 14:50:44 2011 -0400
Making the active drift server plugin configurable via system settings
When a drift serer plugin is loaded or unloaded, it is added to or
removed from the systems settings. When the DriftServerBean (SLSB
layers) asks for the drift plugin, the DriftServerPlugin queries the
system settings to find the active drift server plugin. The drift-rhq
plugin is active by default.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 39f0798..e2a599d 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.111</db.schema.version>
+ <db.schema.version>2.112</db.schema.version>
</properties>
<dependencies>
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
index 121e971..6d0e80a 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
@@ -125,6 +125,12 @@
<data ID="56" PROPERTY_KEY="RESOURCE_GENERIC_PROPERTIES_UPGRADE" PROPERTY_VALUE="false"
DEFAULT_PROPERTY_VALUE="false" FREAD_ONLY="FALSE"/>
+ <!-- default drift server plugin settings -->
+ <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
+ DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]" FREAD_ONLY="FALSE"/>
+ <data ID="58" PROPERTY_KEY="DRIFT_PLUGINS" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
+ FREAD_ONLY="FALSE"/>
+
</table>
</dbsetup>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 7e38d96..2b1097d 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3586,6 +3586,22 @@
</schema-directSQL>
</schemaSpec>
+ <schemaSpec version="2.112">
+ <schema-directSQL>
+ <statement desc="Adding drift server plugin active plugin system configuration property">
+ INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
+ VALUES (57, 'ACTIVE_DRIFT_PLUGIN', '[drift-rhq$$Drift:RHQ]', '[drift-rhq$$Drift:RHQ]')
+ </statement>
+ </schema-directSQL>
+
+ <schema-directSQL>
+ <statement desc="Adding drift server plugin plugins system configuration property">
+ INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
+ VALUES (58, 'DRIFT_PLUGINS', '', '[drift-rhq$$Drift:RHQ]')
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
</dbupgrade>
</target>
</project>
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
index 5e83850..ac861b0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
@@ -19,8 +19,10 @@
package org.rhq.enterprise.gui.coregui.client.admin;
+import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -38,6 +40,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionEnumeration;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.domain.configuration.definition.PropertyGroupDefinition;
import org.rhq.core.domain.configuration.definition.PropertySimpleType;
@@ -99,6 +102,9 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
String LDAPBaseDN = "CAM_LDAP_BASE_DN";
String LDAPBindDN = "CAM_LDAP_BIND_DN";
String LDAPBindPW = "CAM_LDAP_BIND_PW";
+
+ String ACTIVE_DRIFT_PLUGIN = "ACTIVE_DRIFT_PLUGIN";
+ String DRIFT_PLUGINS = "DRIFT_PLUGINS";
}
public SystemSettingsView(String locatorId) {
@@ -128,6 +134,7 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
canvas.addMember(getServerDetails());
Configuration config = new Configuration();
+ String[] driftPlugins = null;
for (Map.Entry<String, String> entry : result.entrySet()) {
String name = entry.getKey();
String value = (entry.getValue() == null) ? "" : entry.getValue();
@@ -166,6 +173,9 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
if (value.trim().length() == 0) {
value = "true";
}
+ } else if (Constant.DRIFT_PLUGINS.equals(name)) {
+ driftPlugins = value.split(",");
+ continue;
}
PropertySimple prop = new PropertySimple(name, value);
@@ -173,8 +183,8 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
}
// build our config definition and populate our config editor
- editor = new ConfigurationEditor(extendLocatorId("configEditor"), getSystemSettingsDefinition(config),
- config);
+ editor = new ConfigurationEditor(extendLocatorId("configEditor"), getSystemSettingsDefinition(config,
+ driftPlugins), config);
editor.addPropertyValueChangeListener(SystemSettingsView.this);
canvas.addMember(editor);
@@ -305,7 +315,7 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
*
* @return system settings config def
*/
- private ConfigurationDefinition getSystemSettingsDefinition(Configuration config) {
+ private ConfigurationDefinition getSystemSettingsDefinition(Configuration config, String[] driftPlugins) {
ConfigurationDefinition def = new ConfigurationDefinition("sysset", MSG.view_adminConfig_systemSettings());
///////////////////////////////////
@@ -519,6 +529,31 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
ldapBindPW.setDefaultValue("");
def.put(ldapBindPW);
+ ///////////////////////////////////////////
+ // Drift Server Configuration Properties //
+ ///////////////////////////////////////////
+ PropertyGroupDefinition driftGroup = new PropertyGroupDefinition("drift server");
+ driftGroup.setDisplayName("Drift Server Configuration Settings");
+ driftGroup.setOrder(4);
+ driftGroup.setDefaultHidden(false);
+
+ PropertyDefinitionSimple activeDriftServer = new PropertyDefinitionSimple("ACTIVE_DRIFT_PLUGIN",
+ "The drift server plugin that manages the persistence of drift-related entities and content", true,
+ PropertySimpleType.STRING);
+ activeDriftServer.setDisplayName("Active Drift Server Plugin");
+ activeDriftServer.setPropertyGroupDefinition(driftGroup);
+
+ List<PropertyDefinitionEnumeration> options = new ArrayList<PropertyDefinitionEnumeration>();
+ for (String plugin : driftPlugins) {
+ // plugin is of the form, [plugin_name$$plugin_display_name]]
+ String pluginName = plugin.substring(1, plugin.indexOf("$$"));
+ String pluginDisplayName = plugin.substring(pluginName.length() + 3, plugin.indexOf("]"));
+ options.add(new PropertyDefinitionEnumeration(pluginDisplayName, plugin));
+ }
+ activeDriftServer.setEnumeratedValues(options, false);
+
+ def.put(activeDriftServer);
+
//
// if the config is missing any properties for which we have defaults, set them to their defaults
//
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
index e992271..63037c1 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
@@ -49,6 +49,10 @@ public class RHQConstants {
public static final String LDAPBindDN = "CAM_LDAP_BIND_DN";
public static final String LDAPBindPW = "CAM_LDAP_BIND_PW";
+ // DRIFT Server properties
+ public static final String ACTIVE_DRIFT_PLUGIN = "ACTIVE_DRIFT_PLUGIN";
+ public static final String DRIFT_PLUGINS = "DRIFT_PLUGINS";
+
// Base URL for the application - (i think this is only used for alert emails)
public static final String BaseURL = "CAM_BASE_URL";
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
index 8e00b0c..9e405ec 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
@@ -18,11 +18,23 @@
*/
package org.rhq.enterprise.server.plugin.pc.drift;
+import java.util.List;
+import java.util.Properties;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
+import org.rhq.enterprise.server.system.SystemManagerLocal;
+import org.rhq.enterprise.server.util.LookupUtil;
+import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginDescriptorType;
+
+import static org.rhq.core.domain.util.StringUtils.getListAsString;
+import static org.rhq.core.domain.util.StringUtils.getStringAsList;
+import static org.rhq.enterprise.server.RHQConstants.ACTIVE_DRIFT_PLUGIN;
+import static org.rhq.enterprise.server.RHQConstants.DRIFT_PLUGINS;
/**
* This loads in all drift server plugins that can be found. You can obtain a loaded plugin's
@@ -32,6 +44,7 @@ import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
* @author John Sanda
*/
public class DriftServerPluginManager extends ServerPluginManager {
+
private final Log log = LogFactory.getLog(this.getClass());
public DriftServerPluginManager(DriftServerPluginContainer pc) {
@@ -39,7 +52,76 @@ public class DriftServerPluginManager extends ServerPluginManager {
}
public DriftServerPluginFacet getDriftServerPluginComponent() {
- // TODO The name of the drift server plugin probably will need to be obtained from the system config
- return (DriftServerPluginFacet) getServerPluginComponent("drift-rhq");
+ Properties sysConfig = getSysConfig();
+ String value = sysConfig.getProperty(ACTIVE_DRIFT_PLUGIN);
+
+ if (value == null) {
+ throw new RuntimeException(ACTIVE_DRIFT_PLUGIN + " system configuration property is not set.");
+ }
+
+ return (DriftServerPluginFacet) getServerPluginComponent(value.substring(1, value.indexOf("$$")));
+ }
+
+ @Override
+ protected void loadPlugin(ServerPluginEnvironment env, boolean enabled) throws Exception {
+ super.loadPlugin(env, enabled);
+
+ String pluginName = env.getPluginKey().getPluginName();
+ List<String> plugins = getDriftPlugins();
+
+ int index = findPluginIndex(plugins, pluginName);
+ if (index == -1) {
+ plugins.add("[" + pluginName + "$$" + env.getPluginDescriptor().getDisplayName() + "]");
+ saveDriftPlugins(plugins);
+ }
+
+ }
+
+ @Override
+ protected void unloadPlugin(String pluginName) throws Exception {
+ super.unloadPlugin(pluginName);
+
+ List<String> plugins = getDriftPlugins();
+ int index = findPluginIndex(plugins, pluginName);
+
+ if (index != -1) {
+ plugins.remove(index);
+ saveDriftPlugins(plugins);
+ }
+ }
+
+ private List<String> getDriftPlugins() {
+ Properties sysConfig = getSysConfig();
+ return getStringAsList(sysConfig.getProperty(DRIFT_PLUGINS, ""), ",", true);
}
+
+ private void saveDriftPlugins(List<String> plugins) throws Exception {
+ SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
+ SystemManagerLocal systemMgr = LookupUtil.getSystemManager();
+
+ Properties sysConfig = systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
+ sysConfig.put(DRIFT_PLUGINS, getListAsString(plugins, ","));
+ systemMgr.setSystemConfiguration(subjectMgr.getOverlord(), sysConfig, false);
+ }
+
+ private Properties getSysConfig() {
+ SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
+ SystemManagerLocal systemMgr = LookupUtil.getSystemManager();
+
+ return systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
+ }
+
+ private int findPluginIndex(List<String> plugins, String name) {
+ int i = 0;
+ for (String value : plugins) {
+ // value is of the form, [plugin_name$$plugin_display_name]
+ if (name.equals(value.substring(1, value.indexOf("$$")))) {
+ return i;
+ }
+ ++i;
+ }
+ return -1;
+ }
+
+
}
\ No newline at end of file
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index 349b84c..b385473 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -143,7 +143,7 @@ public class JPAUtils {
em.createNativeQuery("delete from rhq_measurement_sched");
em.createNativeQuery("delete from rhq_measurement_def");
em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57, 58)");
em.createNativeQuery("delete from rhq_alert_notification");
em.createNativeQuery("delete from rhq_alert_condition_log");
em.createNativeQuery("delete from rhq_alert");
commit fea0df9ea83a2abea14e4f80d3e5143458e7edd3
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 27 10:03:47 2011 -0400
Deleting scratch file that should not be in git
diff --git a/modules/core/domain/mvn.out b/modules/core/domain/mvn.out
deleted file mode 100644
index 7e78162..0000000
--- a/modules/core/domain/mvn.out
+++ /dev/null
@@ -1,194 +0,0 @@
-[INFO]
-NOTE: Maven is executing in offline mode. Any artifacts not already in your local
-repository will be inaccessible.
-
-[INFO] Scanning for projects...
-[INFO] ------------------------------------------------------------------------
-[INFO] Building RHQ Domain Model
-[INFO] task-segment: [clean, test]
-[INFO] ------------------------------------------------------------------------
-[INFO] [clean:clean {execution: default-clean}]
-[INFO] Deleting /home/jsanda/Development/redhat/rhq/modules/core/domain/target
-[INFO] [enforcer:enforce {execution: enforce-versions}]
-[INFO] [build-helper:maven-version {execution: default}]
-[WARNING] DEPRECATED [tasks]: Use target instead
-[INFO] [antrun:run {execution: write-build-properties-file}]
-[WARNING] Parameter tasks is deprecated, use target instead
-[INFO] Executing tasks
-
-main:
-[INFO] Executed tasks
-[INFO] [properties:read-project-properties {execution: read-build-properties-file}]
-[INFO] [resources:resources {execution: default-resources}]
-[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
-[INFO] Copying 393 resources
-[INFO] Copying 2 resources
-[INFO] [compiler:compile {execution: default-compile}]
-[INFO] Compiling 391 source files to /home/jsanda/Development/redhat/rhq/modules/core/domain/target/classes
-[WARNING] DEPRECATED [tasks]: Use target instead
-[INFO] [antrun:run {execution: echo-build-properties}]
-[WARNING] Parameter tasks is deprecated, use target instead
-[INFO] Executing tasks
-
-main:
-[INFO] Executed tasks
-[INFO] [resources:testResources {execution: default-testResources}]
-[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
-[INFO] Copying 13 resources
-[INFO] [compiler:testCompile {execution: default-testCompile}]
-[INFO] Compiling 54 source files to /home/jsanda/Development/redhat/rhq/modules/core/domain/target/test-classes
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java:[116,70] [deprecation] connection() in org.hibernate.Session has been deprecated
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/content/test/PackageVersionContentSourceTest.java:[118,71] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.content.PackageVersionContentSource>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/content/test/PackageVersionContentSourceTest.java:[157,80] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/TestUtil.java:[42,37] [unchecked] unchecked cast
-found : java.lang.Object
-required: T
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationTest.java:[198,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.Configuration>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[67,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[90,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[112,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[117,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/test/SerializableTest.java:[177,19] [unchecked] unchecked cast
-found : java.lang.Object
-required: T
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[98,105] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[135,30] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[184,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/ResourceTypeTest.java:[41,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.ResourceType>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java:[332,50] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.plugin.Plugin>
-[WARNING] DEPRECATED [systemProperties]: Use systemPropertyVariables instead.
-[INFO] [surefire:test {execution: default-test}]
-[INFO] Surefire report directory: /home/jsanda/Development/redhat/rhq/modules/core/domain/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running TestSuite
-Starting ejb3...
-Loading EJB3 classes from directory: target/classes
-log4j: Threshold ="null".
-log4j: Class name: [org.apache.log4j.ConsoleAppender]
-log4j: Setting property [target] to [System.out].
-log4j: Setting property [threshold] to [WARN].
-log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
-log4j: Setting property [conversionPattern] to [%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n].
-log4j: Adding appender named [CONSOLE] to category [root].
-WARN 13-07 15:00:21,151 (Ejb3Configuration.java:addXMLEntities:422) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
-lookup
- UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
-...... embedded-jboss-beans deployed....
-...... deploying MM ejb3.....
-...... ejb3 deployed....
-...... deployer created....
-WARN 13-07 15:00:29,804 (Ejb3Configuration.java:addXMLEntities:422) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
-lookup
- UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
-...... deployer started....
-Configuration definition: CONFIG_ENUM_VAL_TEST (test data)
- SimpleProperty[EnumeratedProperty] (Type: STRING)
-Before: [PropertyDefinitionEnumeration{id=10871, name='A', value='a', orderIndex=0}, PropertyDefinitionEnumeration{id=10872, name='B', value='b', orderIndex=1}]
-After: [PropertyDefinitionEnumeration{id=10872, name='B', value='b', orderIndex=1}, PropertyDefinitionEnumeration{id=10871, name='A', value='a', orderIndex=0}]
-Configuration definition: CONFIG_CONSTRAINT_TEST (test data)
- SimpleProperty[ConstrainedProperty] (Type: FLOAT)
-Constraint: FloatRangeConstraint[details=1.0#3.0]
-Configuration definition: TEST_CONFIG (Config definition for the thing)
- SimpleProperty[SimpleProp] (Type: STRING)
- Map Property [MapProp]
- SimpleProperty[IntInMap] (Type: INTEGER)
- SimpleProperty[ConnectionType] (Type: STRING)(Group: Basic Group)
- SimpleProperty[SimpleBool] (Type: BOOLEAN)(Group: Basic Group)
-Serialized version of config was 1367 bytes
-WARN 13-07 15:01:20,904 (JDBCExceptionReporter.java:logExceptions:77) -SQL Error: 0, SQLState: 23505
-ERROR 13-07 15:01:20,905 (JDBCExceptionReporter.java:logExceptions:78) -Batch entry 0 insert into RHQ_DRIFT_FILE (CTIME, DATA_SIZE, STATUS, DATA, HASH_ID) values ('1310583680392', '10485760', 'EMPTY', '1489397', '6486d7a1e0f8a97387e1f1f8780ea7dd1ab212a4b862bcefdfb0f1d1480f9996') was aborted. Call getNextException to see the cause.
-WARN 13-07 15:01:20,906 (JDBCExceptionReporter.java:logExceptions:77) -SQL Error: 0, SQLState: 23505
-ERROR 13-07 15:01:20,906 (JDBCExceptionReporter.java:logExceptions:78) -ERROR: duplicate key value violates unique constraint "rhq_drift_file_pkey"
-ERROR 13-07 15:01:20,907 (AbstractFlushingEventListener.java:performExecutions:301) -Could not synchronize database state with session
-org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
- at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
- at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
- at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
- at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
- at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
- at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
- at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
- at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
- at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
- at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:3074)
- at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:2632)
- at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:1194)
- at org.jboss.tm.TxManager.commit(TxManager.java:588)
- at org.rhq.core.domain.drift.DriftFileTest.executeInTransaction(DriftFileTest.java:187)
- at org.rhq.core.domain.drift.DriftFileTest.loadSameFile(DriftFileTest.java:152)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:597)
- at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:640)
- at org.testng.internal.Invoker.invokeMethod(Invoker.java:627)
- at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:798)
- at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1102)
- at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
- at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
- at org.testng.TestRunner.runWorkers(TestRunner.java:1009)
- at org.testng.TestRunner.privateRun(TestRunner.java:683)
- at org.testng.TestRunner.run(TestRunner.java:553)
- at org.testng.SuiteRunner.runTest(SuiteRunner.java:311)
- at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:306)
- at org.testng.SuiteRunner.privateRun(SuiteRunner.java:268)
- at org.testng.SuiteRunner.run(SuiteRunner.java:217)
- at org.testng.TestNG.runSuite(TestNG.java:1062)
- at org.testng.TestNG.runSuitesLocally(TestNG.java:956)
- at org.testng.TestNG.run(TestNG.java:874)
- at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:61)
- at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:144)
- at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:597)
- at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
- at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
-Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into RHQ_DRIFT_FILE (CTIME, DATA_SIZE, STATUS, DATA, HASH_ID) values ('1310583680392', '10485760', 'EMPTY', '1489397', '6486d7a1e0f8a97387e1f1f8780ea7dd1ab212a4b862bcefdfb0f1d1480f9996') was aborted. Call getNextException to see the cause.
- at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2598)
- at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
- at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
- at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737)
- at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:518)
- at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
- at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)
- ... 42 more
-testTraitQuery ...
-testTraitQuery: found 1 item(s)
- and it is MeasurementDataTrait[value=[Hello World], MeasurementData [MeasurementDataPK: timestamp=[Wed Jul 13 15:01:21 EDT 2011], scheduleId=[12011]]] and name Fake display name
-Created resource with id 13617
-Created resource with id 13618
-Took [5092]ms to create [2000] resources
-Took [853]ms to remove [2000] resources
-Destroying 1 processes
-Destroying process..
-Destroyed 1 processes
commit e753a90cb8d2ab73c2943d9c9491962798ff771d
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 22:32:38 2011 -0400
Initial commit for drift DTOs
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftComposite.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftComposite.java
index 068907a..3313755 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftComposite.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftComposite.java
@@ -24,7 +24,15 @@ public class DriftComposite implements Serializable {
return drift;
}
+ public void setDrift(Drift drift) {
+ this.drift = drift;
+ }
+
public Resource getResource() {
return resource;
}
+
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java
new file mode 100644
index 0000000..68a5ff7
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftChangeSetDTO.java
@@ -0,0 +1,84 @@
+package org.rhq.core.domain.drift.dto;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+
+public class DriftChangeSetDTO implements DriftChangeSet<DriftDTO> {
+
+ private String id;
+
+ private Long ctime;
+
+ private int version;
+
+ private DriftChangeSetCategory category;
+
+ private int configId;
+
+ private int resourceId;
+
+ private Set<DriftDTO> drifts = new HashSet<DriftDTO>();
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public int getDriftConfigurationId() {
+ return configId;
+ }
+
+ @Override
+ public void setDriftConfigurationId(int id) {
+ configId = id;
+ }
+
+ @Override
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ @Override
+ public Set<DriftDTO> getDrifts() {
+ return drifts;
+ }
+
+ @Override
+ public void setDrifts(Set<DriftDTO> drifts) {
+ this.drifts = drifts;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java
new file mode 100644
index 0000000..adc5c52
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftDTO.java
@@ -0,0 +1,86 @@
+package org.rhq.core.domain.drift.dto;
+
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftCategory;
+
+public class DriftDTO implements Drift<DriftChangeSetDTO, DriftFileDTO> {
+
+ private String id;
+
+ private Long ctime;
+
+ private DriftChangeSetDTO changeSet;
+
+ private DriftCategory category;
+
+ private String path;
+
+ private DriftFileDTO oldDriftFile;
+
+ private DriftFileDTO newDriftFile;
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public DriftChangeSetDTO getChangeSet() {
+ return changeSet;
+ }
+
+ @Override
+ public void setChangeSet(DriftChangeSetDTO changeSet) {
+ this.changeSet = changeSet;
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public DriftFileDTO getOldDriftFile() {
+ return oldDriftFile;
+ }
+
+ @Override
+ public void setOldDriftFile(DriftFileDTO oldDriftFile) {
+ this.oldDriftFile = oldDriftFile;
+ }
+
+ @Override
+ public DriftFileDTO getNewDriftFile() {
+ return newDriftFile;
+ }
+
+ @Override
+ public void setNewDriftFile(DriftFileDTO newDriftFile) {
+ this.newDriftFile = newDriftFile;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java
new file mode 100644
index 0000000..97fa7ef
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/dto/DriftFileDTO.java
@@ -0,0 +1,50 @@
+package org.rhq.core.domain.drift.dto;
+
+import org.rhq.core.domain.drift.DriftFile;
+import org.rhq.core.domain.drift.DriftFileStatus;
+
+public class DriftFileDTO implements DriftFile {
+
+ private String hash;
+
+ private Long ctime;
+
+ private Long size;
+
+ private DriftFileStatus status;
+
+ @Override
+ public String getHashId() {
+ return hash;
+ }
+
+ @Override
+ public void setHashId(String hashId) {
+ hash = hashId;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public Long getDataSize() {
+ return size;
+ }
+
+ @Override
+ public void setDataSize(Long size) {
+ this.size = size;
+ }
+
+ @Override
+ public DriftFileStatus getStatus() {
+ return status;
+ }
+
+ @Override
+ public void setStatus(DriftFileStatus status) {
+ this.status = status;
+ }
+}
commit d9fdb0434e2828b47b77138f8fd1856f3728c4a1
Merge: 5840be4 e14fb8a
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 22:33:24 2011 -0400
Merge branch 'drift' into drift-mongodb
commit e14fb8a490ab8b2838612fcb6a5795427dfb93ad
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 21:22:19 2011 -0400
Persist drift detection schedule across agent restarts
This commit add functionality for persisting drift detection schedules
across restarts. When the agent is shutting down and the inventory is
persisted to disk, the schedules are now written out to disk along with
the rest of the inventory.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
index fe42744..ab5bac3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
@@ -1,8 +1,12 @@
package org.rhq.core.pc.drift;
+import java.io.Serializable;
+
import org.rhq.core.domain.drift.DriftConfiguration;
-public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule> {
+public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule>, Serializable {
+
+ private static final long serialVersionUID = 1L;
private int resourceId;
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index f499697..879ceca 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -67,11 +67,36 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
driftDetector.setChangeSetManager(changeSetMgr);
driftDetector.setDriftClient(this);
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ initSchedules(inventoryMgr.getPlatform(), inventoryMgr);
+
driftThreadPool = new ScheduledThreadPoolExecutor(5);
// TODO Make the drift detection rate configurable
driftThreadPool.scheduleAtFixedRate(driftDetector, 30, 60, TimeUnit.SECONDS);
}
+ private void initSchedules(Resource r, InventoryManager inventoryMgr) {
+ if (r.getId() == 0) {
+ log.debug("Will not reschedule drift detection schedules for " + r + ". It is not sync'ed yet.");
+ return;
+ }
+
+ ResourceContainer container = inventoryMgr.getResourceContainer(r.getId());
+ if (container == null) {
+ log.debug("No resource container found for " + r + ". Unable to reschedule drift detection schedules.");
+ return;
+ }
+
+ log.debug("Rescheduling drift detection schedules for " + r);
+ for (DriftDetectionSchedule schedule : container.getDriftSchedules()) {
+ schedulesQueue.addSchedule(schedule);
+ }
+
+ for (Resource child : r.getChildResources()) {
+ initSchedules(child, inventoryMgr);
+ }
+ }
+
@Override
public void shutdown() {
driftThreadPool.shutdown();
@@ -164,8 +189,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
- return false;
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
+ return schedule;
}
@Override
@@ -208,9 +233,16 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
- if (!updated) {
- schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
+ if (updatedSchedule == null) {
+ updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
+ schedulesQueue.addSchedule(updatedSchedule);
+ }
+
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ ResourceContainer container = inventoryMgr.getResourceContainer(resourceId);
+ if (container != null) {
+ container.getDriftSchedules().add(updatedSchedule);
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index ca7edc5..374e27e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -38,7 +38,7 @@ public interface ScheduleQueue {
* Adds a schedule to the queue for processing by the drift detector
*
* @param schedule A {@link DriftDetectionSchedule} object
- * @return true if the schedule is added, falsed otherwise
+ * @return true if the schedule is added, false otherwise
*/
boolean addSchedule(DriftDetectionSchedule schedule);
@@ -52,9 +52,9 @@ public interface ScheduleQueue {
*
* @param resourceId The resource id
* @param config A {@link DriftConfiguration} belonging the resource with the specified id
- * @return true if the schedule is updated, false otherwise.
+ * @return A copy of the updated schedule or null if no update was performed
*/
- boolean update(int resourceId, DriftConfiguration config);
+ DriftDetectionSchedule update(int resourceId, DriftConfiguration config);
/**
* Removes the schedule identified by the resource id and the drift configuration. More
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 499ad91..b4a2f00 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -112,20 +112,26 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
try {
lock.writeLock().lock();
if (isActiveSchedule(resourceId, config)) {
update(activeSchedule, config);
- } else {
- DriftDetectionSchedule schedule = remove(resourceId, config);
- if (schedule == null) {
- return false;
- }
- update(schedule, config);
- queue.offer(schedule);
+ return activeSchedule.copy();
+ }
+
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return null;
}
- return true;
+
+ update(schedule, config);
+
+ if (queue.offer(schedule)) {
+ return schedule.copy();
+ }
+
+ return null;
} finally {
lock.writeLock().unlock();
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
index ab8d30e..fcf1aea 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
@@ -52,6 +52,7 @@ import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.drift.DriftDetectionSchedule;
import org.rhq.core.pc.util.FacetLockType;
import org.rhq.core.pc.util.LoggingThreadFactory;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
@@ -88,6 +89,7 @@ public class ResourceContainer implements Serializable {
private SynchronizationState synchronizationState = SynchronizationState.NEW;
private Set<MeasurementScheduleRequest> measurementSchedule = new HashSet<MeasurementScheduleRequest>();
private Set<ResourcePackageDetails> installedPackages = new HashSet<ResourcePackageDetails>();
+ private Set<DriftDetectionSchedule> driftSchedules = new HashSet<DriftDetectionSchedule>();
// transient fields
private transient ResourceComponent resourceComponent;
@@ -242,6 +244,16 @@ public class ResourceContainer implements Serializable {
}
}
+ public Set<DriftDetectionSchedule> getDriftSchedules() {
+ synchronized (this) {
+ return driftSchedules;
+ }
+ }
+
+ public void setDriftSchedules(Set<DriftDetectionSchedule> schedules) {
+ driftSchedules = schedules;
+ }
+
public ResourceComponentState getResourceComponentState() {
synchronized (this) {
return this.resourceComponentState;
commit 1359b2b4bb7743395916b0a8fab21cff1bc214cf
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 18:31:39 2011 -0400
tweek folder icons for drift
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
index fdda214..e728bc8 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
index 358cf61..1ca204f 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit 302705e7ebf3731bb5eb27d67c8a4f8b38a93248
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 16:14:26 2011 -0400
Adding support for updating drift configs
When the server sends a request to the agent to update a drift
configuration, that config is attached to a schedule which is in one of
two places. It is either on the schedule queue or it is "active"
schedule currently being processed by the drift detector. The config
update will be applied such that the next time the drift detector
processes the schedule the update will take effect.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
index a767b99..fe42744 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
@@ -32,6 +32,13 @@ public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule
nextScan = System.currentTimeMillis() + (driftConfig.getInterval() * 1000);
}
+ public DriftDetectionSchedule copy() {
+ DriftDetectionSchedule copy = new DriftDetectionSchedule(resourceId,
+ new DriftConfiguration(driftConfig.getConfiguration().deepCopyWithoutProxies()));
+ copy.nextScan = nextScan;
+ return copy;
+ }
+
@Override
public int compareTo(DriftDetectionSchedule other) {
if (this.nextScan < other.nextScan) {
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index b92dd7c..153e5a9 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -47,52 +47,44 @@ public class DriftDetector implements Runnable {
@Override
public void run() {
- DriftDetectionSchedule schedule = scheduleQueue.dequeue();
+ DriftDetectionSchedule schedule = scheduleQueue.getNextSchedule();
if (schedule == null) {
return;
}
- if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- if (!schedule.getDriftConfiguration().getEnabled()) {
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- DriftConfiguration driftConfig = schedule.getDriftConfiguration();
- int resourceId = schedule.getResourceId();
- DriftChangeSetCategory changeSetType = null;
- int changes = 0;
-
try {
- if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
- basedir(resourceId, driftConfig), COVERAGE))) {
- changeSetType = DRIFT;
- changes = generateDriftChangeSet(schedule);
- } else {
- changeSetType = COVERAGE;
- generateCoverageChangeSet(schedule);
+ if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
+ return;
}
- } catch (IOException e) {
- // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
- log.error("An error occurred while scanning for drift", e);
- }
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ return;
+ }
- if (changeSetType == COVERAGE || changes > 0) {
- driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ DriftConfiguration driftConfig = schedule.getDriftConfiguration();
+ int resourceId = schedule.getResourceId();
+ DriftChangeSetCategory changeSetType = null;
+ int changes = 0;
+
+ try {
+ if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
+ basedir(resourceId, driftConfig), COVERAGE))) {
+ changeSetType = DRIFT;
+ changes = generateDriftChangeSet(schedule);
+ } else {
+ changeSetType = COVERAGE;
+ generateCoverageChangeSet(schedule);
+ }
+ } catch (IOException e) {
+ // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
+ log.error("An error occurred while scanning for drift", e);
+ }
+
+ if (changeSetType == COVERAGE || changes > 0) {
+ driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ }
+ } finally {
+ scheduleQueue.deactivateSchedule();
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index b688154..f499697 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -141,14 +141,14 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
DriftDetectionSchedule schedule;
@Override
- public DriftDetectionSchedule dequeue() {
+ public DriftDetectionSchedule getNextSchedule() {
DriftDetectionSchedule removedSchedule = schedule;
schedule = null;
return removedSchedule;
}
@Override
- public boolean enqueue(DriftDetectionSchedule schedule) {
+ public boolean addSchedule(DriftDetectionSchedule schedule) {
this.schedule = schedule;
return true;
}
@@ -157,8 +157,23 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
public void clear() {
schedule = null;
}
+
+ @Override
+ public void deactivateSchedule() {
+ schedule = null;
+ }
+
+ @Override
+ public boolean update(int resourceId, DriftConfiguration config) {
+ return false;
+ }
+
+ @Override
+ public DriftDetectionSchedule remove(int resourceId, DriftConfiguration config) {
+ return null;
+ }
};
- queue.enqueue(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ queue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
DriftDetector driftDetector = new DriftDetector();
driftDetector.setChangeSetManager(changeSetMgr);
@@ -170,7 +185,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void scheduleDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- schedulesQueue.enqueue(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
}
@Override
@@ -193,6 +208,10 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
+ boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
+ if (!updated) {
+ schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ }
}
/**
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index 09b0aa5..ca7edc5 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -1,11 +1,79 @@
package org.rhq.core.pc.drift;
+import org.rhq.core.domain.drift.DriftConfiguration;
+
+/**
+ * Manages the drift detection schedules that are processed by the drift detector. The
+ * queue has a concept of the currently "active" schedule. This is identified simply as
+ * the schedule returned from {@link #getNextSchedule()} which is the previous head of the
+ * queue. A reference to the active schedule needs to be maintained because at any point in
+ * time the server can send a request to update the drift configuration that is attached to
+ * a schedule. That schedule will either be on the queue waiting to be processed or in the
+ * "active" state meaning it is currently being processed by the drift detector.
+ */
public interface ScheduleQueue {
- DriftDetectionSchedule dequeue();
+ /**
+ * Removes the head of the queue and returns a copy of the schedule that was removed.
+ * That schedule is also marked as the active schedule.
+ *
+ * @return A copy of the schedule that is removed from the head of the queue.
+ *
+ * @see DriftDetectionSchedule
+ *
+ * @throws IllegalStateException if there is already an active schedule. The active
+ * schedule must be deactivated before getting the next schedule.
+ */
+ DriftDetectionSchedule getNextSchedule();
+
+ /**
+ * This method does two things. First it updates the active schedule's nextScan
+ * property. Then it adds the schedule back onto the queue, allowing the next schedule
+ * at the head of the queue to become active. If there is no active schedule this
+ * method simply does nothing and returns.
+ */
+ void deactivateSchedule();
+
+ /**
+ * Adds a schedule to the queue for processing by the drift detector
+ *
+ * @param schedule A {@link DriftDetectionSchedule} object
+ * @return true if the schedule is added, falsed otherwise
+ */
+ boolean addSchedule(DriftDetectionSchedule schedule);
+
+ /**
+ * This method attempts to update the schedule identified by the resource id the and
+ * the drift configuration. More specifically, the schedule is identified by a
+ * combination of resource id and drift configuraiton name. If the schedule to be
+ * updated is the active schedule, it is immediately updated and then placed back on
+ * the queue the next time {@link #deactivateSchedule()} is called. If the schedule
+ * is on the queue, it is removed, updated, and then added back onto the queue.
+ *
+ * @param resourceId The resource id
+ * @param config A {@link DriftConfiguration} belonging the resource with the specified id
+ * @return true if the schedule is updated, false otherwise.
+ */
+ boolean update(int resourceId, DriftConfiguration config);
- boolean enqueue(DriftDetectionSchedule schedule);
+ /**
+ * Removes the schedule identified by the resource id and the drift configuration. More
+ * specifically, the schedule is identified by a combination of resource id drift
+ * configuration name. This method can remove either the active schedule or a schedule
+ * on the queue.
+ *
+ * @param resourceId The resource id
+ *
+ * @param config A {@link DriftConfiguration} belonging the resource with the specified id
+ *
+ * @return The {@link DriftDetectionSchedule} that is removed or null if no matching
+ * schedule is found.
+ */
+ DriftDetectionSchedule remove(int resourceId, DriftConfiguration config);
+ /**
+ * Removes all elements from the queue and deactivates the active schedule.
+ */
void clear();
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 7934c2d..499ad91 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -3,24 +3,54 @@ package org.rhq.core.pc.drift;
import java.util.PriorityQueue;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import org.rhq.core.domain.drift.DriftConfiguration;
+
public class ScheduleQueueImpl implements ScheduleQueue {
private PriorityQueue<DriftDetectionSchedule> queue = new PriorityQueue<DriftDetectionSchedule>();
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+ private DriftDetectionSchedule activeSchedule;
+
@Override
- public DriftDetectionSchedule dequeue() {
+ public DriftDetectionSchedule getNextSchedule() {
try {
lock.writeLock().lock();
- return queue.poll();
+ if (activeSchedule != null) {
+ throw new IllegalStateException("There is already an active schedule that must be deactivated " +
+ "before getting the next schedule.");
+ }
+ activeSchedule = queue.poll();
+ return activeSchedule == null ? null : activeSchedule.copy();
} finally {
lock.writeLock().unlock();
}
}
+ private boolean isActiveSchedule(int resourceId, DriftConfiguration config) {
+ return activeSchedule != null && activeSchedule.getResourceId() == resourceId &&
+ activeSchedule.getDriftConfiguration().getName().equals(config.getName());
+
+ }
+
@Override
- public boolean enqueue(DriftDetectionSchedule schedule) {
+ public void deactivateSchedule() {
+ try {
+ lock.writeLock().lock();
+ if (activeSchedule == null) {
+ return;
+ }
+ activeSchedule.updateShedule();
+ queue.offer(activeSchedule);
+ activeSchedule = null;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ @Override
+ public boolean addSchedule(DriftDetectionSchedule schedule) {
boolean inserted = false;
try {
lock.writeLock().lock();
@@ -32,9 +62,85 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
+ public DriftDetectionSchedule remove(int resourceId, DriftConfiguration config) {
+ DriftDetectionSchedule scheduleToRemove = null;
+ try {
+ lock.readLock().lock();
+ if (isActiveSchedule(resourceId, config)) {
+ // The schedule to be removed is the currently active schedule so "upgrade"
+ // to the write lock and return the schedule while removing it from the queue
+ // at the same time.
+ try {
+ lock.writeLock().lock();
+ DriftDetectionSchedule removedSchedule = activeSchedule;
+ activeSchedule = null;
+ return removedSchedule;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ for (DriftDetectionSchedule s : queue) {
+ if (s.getResourceId() == resourceId &&
+ s.getDriftConfiguration().getName().equals(config.getName())) {
+ scheduleToRemove = s;
+ break;
+ }
+ }
+
+ // The schedule was not found in the queue so we can simply return null without
+ // any additional processing.
+ if (scheduleToRemove == null) {
+ return null;
+ }
+
+ boolean removed = false;
+ // At this point, we found the target schedule in the queue. We "upgrade" to
+ // the write lock and remove it from the queue. If the schedule was successfully
+ // removed we return it; otherwise, return null.
+ try {
+ lock.writeLock().lock();
+ removed = queue.remove(scheduleToRemove);
+ } finally {
+ lock.writeLock().unlock();
+ }
+
+ return removed ? scheduleToRemove : null;
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ @Override
+ public boolean update(int resourceId, DriftConfiguration config) {
+ try {
+ lock.writeLock().lock();
+ if (isActiveSchedule(resourceId, config)) {
+ update(activeSchedule, config);
+ } else {
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return false;
+ }
+ update(schedule, config);
+ queue.offer(schedule);
+ }
+ return true;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ private void update(DriftDetectionSchedule schedule, DriftConfiguration config) {
+ schedule.getDriftConfiguration().setEnabled(config.getEnabled());
+ schedule.getDriftConfiguration().setInterval(config.getInterval());
+ }
+
+ @Override
public void clear() {
try {
lock.writeLock().lock();
+ activeSchedule = null;
queue.clear();
} finally {
lock.writeLock().unlock();
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 9b62422..49dab54 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -58,7 +58,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("coverage-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
File changeSet = changeSet(driftConfig.getName(), COVERAGE);
@@ -77,12 +77,12 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("basedir-entry-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId(), driftConfig);
- scheduleQueue.enqueue(schedule);
+ scheduleQueue.addSchedule(schedule);
detector.run();
assertChangeSetContainsDirEntry(changeSet(driftConfig.getName(), COVERAGE),
@@ -102,7 +102,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("multiple-files-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -127,7 +127,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("sibling-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -153,7 +153,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("nested-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -188,7 +188,7 @@ public class DriftDetectorTest extends DriftTest {
File server1Conf = new File(confDir, "server-1.conf");
touch(server1Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
}
@@ -217,7 +217,7 @@ public class DriftDetectorTest extends DriftTest {
File server2Conf = new File(confDir, "server-2.conf");
touch(server2Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
@@ -266,7 +266,7 @@ public class DriftDetectorTest extends DriftTest {
// create some drift
server2Conf.delete();
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 276c8b9..9de0966 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -145,7 +145,7 @@ public class DriftServerBean implements DriftServerLocal {
AgentClient agentClient = agentMgr.getAgentClient(subjectMgr.getOverlord(), resourceId);
DriftAgentService service = agentClient.getDriftAgentService();
try {
- service.scheduleDriftDetection(resourceId, driftConfig);
+ service.updateDriftDetection(resourceId, driftConfig);
} catch (Exception e) {
log.warn(" Unable to inform agent of unscheduled drift detection [" + driftConfig + "]", e);
}
commit 934d364a217e74c33f22f19f472ee33a7ad68e5f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 16:05:42 2011 -0400
add sort direction
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 2d7205d..6085af1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -26,6 +26,7 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
@@ -70,6 +71,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
+ setSortDirection(SortDirection.DESCENDING);
}
@Override
commit 9299aefd7d32cbca6e5e85a1cc52e113564d8ded
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 15:58:32 2011 -0400
sort the tree and provide a refresh button
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 7778084..2d7205d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -24,7 +24,9 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
+import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
import com.smartgwt.client.widgets.menu.Menu;
@@ -67,6 +69,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
+ setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
}
@Override
@@ -198,6 +201,17 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
return contextMenu;
}
+ /**
+ * We override this because we know all of our nodes will have titles. Without this,
+ * I could not get the title of change set nodes to show - it always fell back to using
+ * the name. This way is at least faster, since we don't do any conditional checking,
+ * we always immediately use the getTitle results.
+ */
+ @Override
+ protected String getNodeTitle(Record node, int recordNum, ListGridField field) {
+ return ((TreeNode) node).getTitle();
+ }
+
@SuppressWarnings("unchecked")
static class ChangeSetTreeNode extends TreeNode {
public ChangeSetTreeNode(DriftChangeSet changeset) {
@@ -205,7 +219,8 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setIcon("subsystems/drift/ChangeSet_16.png");
setShowOpenIcon(true);
setID(changeset.getId());
- setName(buildDriftChangeSetNodeName(changeset));
+ setName(padWithZeroes(changeset.getVersion())); // we sort on this column, hence we make sure the version # is padded
+ setTitle(buildDriftChangeSetNodeName(changeset));
}
private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
@@ -219,6 +234,14 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
str.append(')');
return str.toString();
}
+
+ private String padWithZeroes(int numberToPad) {
+ String stringToPad = String.valueOf(numberToPad);
+ char[] zeroes = new char[10 - stringToPad.length()];
+ for (int i = 0; i < zeroes.length; i++)
+ zeroes[i] = '0';
+ return new String(zeroes) + stringToPad;
+ }
}
@SuppressWarnings("unchecked")
@@ -229,7 +252,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
String parentID = drift.getChangeSet().getId();
setParentID(parentID);
setID(parentID + '_' + drift.getId());
- setName(drift.getPath());
+ setName(drift.getPath()); // we sort on this column
+ }
+
+ @Override
+ public String getTitle() {
+ return super.getName();
}
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index 48f5bc8..56b4aa2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -19,7 +19,14 @@
*/
package org.rhq.enterprise.gui.coregui.client.drift;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.toolbar.ToolStrip;
+
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableToolStrip;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
@@ -42,7 +49,23 @@ public class DriftChangeSetsView extends LocatableVLayout {
protected void onDraw() {
super.onDraw();
- addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ final ResourceDriftChangeSetsTreeView tree = new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"),
+ this.hasWriteAccess, this.context);
+ addMember(tree);
+
+ ToolStrip toolStrip = new LocatableToolStrip(extendLocatorId("toolstrip"));
+ toolStrip.setBackgroundImage(null);
+ toolStrip.setWidth100();
+ toolStrip.setMembersMargin(3);
+ toolStrip.setPadding(3);
+ IButton refreshButton = new LocatableIButton(extendLocatorId("refreshButton"), MSG.common_button_refresh());
+ refreshButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ tree.refresh();
+ }
+ });
+ toolStrip.addMember(refreshButton);
+ addMember(toolStrip);
}
public EntityContext getContext() {
commit e5b9ac7711eed5dddca75efb27796b80b4f42270
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 13:34:42 2011 -0400
refactor so we can later put in group classes but still support indiv resources
fix query so we filter on resource ID for resource view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..50b4634
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
@@ -0,0 +1,266 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceTextField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
+
+ public static final String ATTR_PARENT_ID = "parentId";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+
+ private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
+ private final boolean canManageDrift;
+
+ public AbstractDriftChangeSetsTreeDataSource(boolean canManageDrift) {
+ super();
+ this.canManageDrift = canManageDrift;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+
+ DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
+ idDataField.setPrimaryKey(true);
+ fields.add(idDataField);
+
+ DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
+ nameDataField.setCanEdit(false);
+ fields.add(nameDataField);
+
+ DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
+ parentIdField.setForeignKey(ATTR_ID);
+ fields.add(parentIdField);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
+
+ String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
+
+ if (parentId == null) {
+
+ // There is no parent - we are at the root of the tree.
+ // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
+ // We will lazily load drifts when the these changeset tree nodes are opened
+ DriftChangeSetCriteria criteria = getDriftChangeSetCriteria(request);
+
+ driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
+ public void onSuccess(PageList<DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ } else {
+ String changesetId = parentId;
+ DriftCriteria criteria = new DriftJPACriteria();
+ criteria.addFilterChangeSetId(changesetId);
+
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Drift> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
+
+ /*
+ * I am leaving this code commented for future reference. Because today the drit change set tree only
+ * shows simple changeset->drift tree, we don't need this. But if we need to have
+ * multiple types of child nodes, we'll need something like below to query
+ * for the different child node data. For example, we'd need this if we have a tree like:
+ * ChangeSet
+ * |____Resources
+ * | |____ My resource 1
+ * | |____ ...
+ * |_____Drifts
+ * |___ Drift #1
+ * |___ Drift #2
+ * |___ ...
+ * Today we only have Drifts child nodes, so we don't need to have that intermediate
+ * "Drifts" node. If we later want to introduce different node types (like Resources)
+ * we need additional code like below.
+ *
+
+ // we are at an inner node, being asked to get the children of it
+ if (p.endsWith("_drifts")) {
+ // ...load drift items like above in the real code...
+ } else if (p.endsWith("_resources")) {
+ // ...load resource items and put those nodes in the tree...
+ } else {
+ // This is an unknown type of node, so just log an error.
+ // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
+ // we'll add more if-else statements above to process those different nodes.
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
+ }
+
+ *
+ */
+ }
+
+ return;
+ }
+
+ /**
+ * Returns a criteria that will be used to obtain the root nodes for the tree - that is,
+ * the top level change set entries.
+ *
+ * Subclasses can override this method, or modify the returned criteria to further
+ * filter the change sets that are to be returned.
+ *
+ * @param request the request being made of the tree
+ *
+ * @return the criteria to use when querying for change setss
+ */
+ protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addSortVersion(PageOrdering.DESC);
+ criteria.setPageControl(getPageControl(request));
+ return criteria;
+ }
+
+ @Override
+ protected BaseCriteria getFetchCriteria(DSRequest request) {
+ // our executeFetch will determine on its own what criteria to use based on what is to be fetched
+ // thus we don't return anything here and let the executeFetch do everything
+ return null;
+ }
+
+ @Override
+ public Object copyValues(Record from) {
+ return null; // don't need this method.
+ }
+
+ @Override
+ public ListGridRecord[] buildRecords(Collection dataObjects) {
+ return buildRecordsForKnownChangeSets(dataObjects, null);
+ }
+
+ public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
+ if (dataObjects == null) {
+ return null;
+ }
+
+ final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
+
+ for (Object item : dataObjects) {
+
+ // the resultant item is a direct node to build
+ records.add(copyValues(item));
+
+ // now build the children of the node
+ /*
+ * We do not have the need for building any intermeidate nodes today.
+ * There is nothing to do, but if in the future we have differnet node types,
+ * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
+ * for an example of where this is already done. Commenting this out just as an
+ * example of how this can be done.
+
+ if (item instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) item;
+
+ // each bundle has two direct children - the versions and destinations folders
+ TreeNode versionNode = new TreeNode(MSG.view_drift());
+ versionNode.setID(changeset.getId() + "_drifts");
+ versionNode.setParentID(changeset.getId());
+ versionNode.setName(MSG.view_drift());
+ versionNode.setAttribute("name", MSG.view_drift());
+ records.add(versionNode);
+ } else if (item instanceof Drift) {
+ if (canManageDrift) {
+ records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
+ }
+ }
+
+ *
+ */
+ }
+
+ return records.toArray(new ListGridRecord[records.size()]);
+ }
+
+ @Override
+ public ListGridRecord copyValues(Object from) {
+ return copyValuesForKnownDriftChangeSet(from, null);
+ }
+
+ public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
+ TreeNode node;
+ if (from instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) from;
+ node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
+ } else if (from instanceof Drift) {
+ Drift drift = (Drift) from;
+ node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
+ } else {
+ throw new IllegalArgumentException("please report this bug - bad value: " + from);
+ }
+ // if, in the future, we add more node types, we'll add more else-if statements here
+
+ return node;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 50d787d..7778084 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -67,8 +67,6 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
-
- setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
deleted file mode 100644
index c6e9e65..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.drift;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.fields.DataSourceTextField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.tree.TreeNode;
-
-import org.rhq.core.domain.criteria.BaseCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-
-/**
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
-
- private static final String ATTR_PARENT_ID = "parentId";
- public static final String ATTR_ID = "id";
- public static final String ATTR_NAME = "name";
-
- private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
- private final boolean canManageDrift;
-
- public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
- super();
- this.canManageDrift = canManageDrift;
- List<DataSourceField> fields = addDataSourceFields();
- addFields(fields);
- }
-
- @Override
- protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
-
- DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
- idDataField.setPrimaryKey(true);
- fields.add(idDataField);
-
- DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
- nameDataField.setCanEdit(false);
- fields.add(nameDataField);
-
- DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
- parentIdField.setForeignKey(ATTR_ID);
- fields.add(parentIdField);
-
- return fields;
- }
-
- @Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
-
- String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
-
- if (parentId == null) {
-
- // There is no parent - we are at the root of the tree.
- // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
- // We will lazily load drifts when the these changeset tree nodes are opened
- DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.DESC);
- criteria.setPageControl(getPageControl(request));
-
- driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
- public void onSuccess(PageList<DriftChangeSet> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
- } else {
- String changesetId = parentId;
- DriftCriteria criteria = new DriftJPACriteria();
- criteria.addFilterChangeSetId(changesetId);
-
- driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
-
- public void onSuccess(PageList<Drift> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
- });
-
- /*
- * I am leaving this code commented for future reference. Because today the drit change set tree only
- * shows simple changeset->drift tree, we don't need this. But if we need to have
- * multiple types of child nodes, we'll need something like below to query
- * for the different child node data. For example, we'd need this if we have a tree like:
- * ChangeSet
- * |____Resources
- * | |____ My resource 1
- * | |____ ...
- * |_____Drifts
- * |___ Drift #1
- * |___ Drift #2
- * |___ ...
- * Today we only have Drifts child nodes, so we don't need to have that intermediate
- * "Drifts" node. If we later want to introduce different node types (like Resources)
- * we need additional code like below.
- *
-
- // we are at an inner node, being asked to get the children of it
- if (p.endsWith("_drifts")) {
- // ...load drift items like above in the real code...
- } else if (p.endsWith("_resources")) {
- // ...load resource items and put those nodes in the tree...
- } else {
- // This is an unknown type of node, so just log an error.
- // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
- // we'll add more if-else statements above to process those different nodes.
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
- }
-
- *
- */
- }
-
- return;
- }
-
- @Override
- protected BaseCriteria getFetchCriteria(DSRequest request) {
- // our executeFetch will determine on its own what criteria to use based on what is to be fetched
- // thus we don't return anything here and let the executeFetch do everything
- return null;
- }
-
- @Override
- public Object copyValues(Record from) {
- return null; // don't need this method.
- }
-
- @Override
- public ListGridRecord[] buildRecords(Collection dataObjects) {
- return buildRecordsForKnownChangeSets(dataObjects, null);
- }
-
- public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
- if (dataObjects == null) {
- return null;
- }
-
- final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
-
- for (Object item : dataObjects) {
-
- // the resultant item is a direct node to build
- records.add(copyValues(item));
-
- // now build the children of the node
- /*
- * We do not have the need for building any intermeidate nodes today.
- * There is nothing to do, but if in the future we have differnet node types,
- * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
- * for an example of where this is already done. Commenting this out just as an
- * example of how this can be done.
-
- if (item instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) item;
-
- // each bundle has two direct children - the versions and destinations folders
- TreeNode versionNode = new TreeNode(MSG.view_drift());
- versionNode.setID(changeset.getId() + "_drifts");
- versionNode.setParentID(changeset.getId());
- versionNode.setName(MSG.view_drift());
- versionNode.setAttribute("name", MSG.view_drift());
- records.add(versionNode);
- } else if (item instanceof Drift) {
- if (canManageDrift) {
- records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
- }
- }
-
- *
- */
- }
-
- return records.toArray(new ListGridRecord[records.size()]);
- }
-
- @Override
- public ListGridRecord copyValues(Object from) {
- return copyValuesForKnownDriftChangeSet(from, null);
- }
-
- public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- TreeNode node;
- if (from instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) from;
- node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
- } else if (from instanceof Drift) {
- Drift drift = (Drift) from;
- node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
- } else {
- throw new IllegalArgumentException("please report this bug - bad value: " + from);
- }
- // if, in the future, we add more node types, we'll add more else-if statements here
-
- return node;
- }
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..f5341e2
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
@@ -0,0 +1,51 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import com.smartgwt.client.data.DSRequest;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsTreeDataSource extends AbstractDriftChangeSetsTreeDataSource {
+
+ private final EntityContext context;
+
+ public ResourceDriftChangeSetsTreeDataSource(boolean canManageDrift, EntityContext context) {
+ super(canManageDrift);
+
+ if (context.type != EntityContext.Type.Resource) {
+ throw new IllegalArgumentException("wrong context: " + context);
+ }
+
+ this.context = context;
+ }
+
+ @Override
+ protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ DriftChangeSetCriteria criteria = super.getDriftChangeSetCriteria(request);
+ criteria.addFilterResourceId(this.context.resourceId);
+ return criteria;
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index 3e368d5..3ee0b5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -40,11 +40,13 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
this.context = context;
+
+ setDataSource(new ResourceDriftChangeSetsTreeDataSource(canManageDrift, context));
}
protected String getNodeTargetLink(TreeNode node) {
if (node instanceof DriftTreeNode) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String driftIdStr = node.getAttribute(AbstractDriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
return path;
}
commit d00c5e84c87a2e906e9a5127c836965acaf6e56f
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 09:22:15 2011 -0400
Adding logic to check the enabled flag during drift detection
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index f2883b9..b92dd7c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -54,6 +54,18 @@ public class DriftDetector implements Runnable {
if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
+ return;
+ }
+
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ schedule.updateShedule();
+ scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
return;
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index fe15677..7934c2d 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -1,7 +1,6 @@
package org.rhq.core.pc.drift;
import java.util.PriorityQueue;
-import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
public class ScheduleQueueImpl implements ScheduleQueue {
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 4f27974..9b62422 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -16,6 +16,7 @@ import org.rhq.common.drift.ChangeSetReaderImpl;
import org.rhq.common.drift.DirectoryEntry;
import org.rhq.common.drift.FileEntry;
import org.rhq.common.drift.Headers;
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftConfiguration;
import static org.apache.commons.io.FileUtils.touch;
@@ -167,6 +168,32 @@ public class DriftDetectorTest extends DriftTest {
@SuppressWarnings("unchecked")
@Test
+ public void skipScheduledThatHasConfigDisabled() throws Exception {
+ detector.setDriftClient(new DriftClientTestStub() {
+ {
+ setBaseDir(resourceDir);
+ }
+
+ @Override
+ public void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration,
+ DriftChangeSetCategory type) {
+ throw new RuntimeException("Should not invoke drift client when drift configuration is disabled");
+ }
+ });
+
+ DriftConfiguration config = driftConfiguration("disabled-config-test", resourceDir.getAbsolutePath());
+ config.setEnabled(false);
+
+ File confDir = mkdir(resourceDir, "conf");
+ File server1Conf = new File(confDir, "server-1.conf");
+ touch(server1Conf);
+
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ detector.run();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
public void includeAddedFileInDriftChangeSet() throws Exception {
DriftConfiguration config = driftConfiguration("file-added-drift-test", resourceDir.getAbsolutePath());
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
index 97bfa45..98c421e 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
@@ -81,6 +81,12 @@ public class DriftTest {
*/
protected File resourceDir;
+ /**
+ * The default interval assigned to drift configurations created using
+ * {@link #driftConfiguration(String, String)}
+ */
+ protected long defaultInterval = 1800L; // 30 minutes;
+
private MessageDigestGenerator digestGenerator;
/**
@@ -180,6 +186,7 @@ public class DriftTest {
/**
* Creates a {@link DriftConfiguration} with the specified basedir. The file system is
* used as the context for the basedir which means the path specified is used as is.
+ * The interval property is set to {@link #defaultInterval}.
*
* @param name The configuration name
* @param basedir An absolute path of the base directory
@@ -189,6 +196,8 @@ public class DriftTest {
DriftConfiguration config = new DriftConfiguration(new Configuration());
config.setName(name);
config.setBasedir(new DriftConfiguration.BaseDirectory(fileSystem, basedir));
+ config.setEnabled(true);
+ config.setInterval(defaultInterval);
return config;
}
commit d0ccf2a4181f6f301bc29e229fe9425885d706d9
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:45 2011 -0400
sort the query in desc order, though the tree currently ignores this and has its own sorting.
need to fix that later
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index fe8586a..c6e9e65 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -95,7 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.ASC);
+ criteria.addSortVersion(PageOrdering.DESC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
commit d1cc955cb7b2ea22dd60e847f5fdca4c52f7a8af
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:03 2011 -0400
default subtab view for drift is the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 4efc189..0e63d8e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -243,13 +243,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
driftTab = new TwoLevelTab(getTabSet().extendLocatorId(Tab.DRIFT), new ViewName(Tab.DRIFT, MSG
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
- this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
- MSG.view_tabs_common_history()), null);
this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
+ this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
+ MSG.view_tabs_common_history()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
+ driftTab.registerSubTabs(driftChangeSets, driftHistory, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -519,17 +519,17 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), resourcePermissions.isDrift())) {
- updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
}
});
- updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
}
});
commit 63afe8975ac731bf9b2422ed2f72b941523359b0
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:49:19 2011 -0400
initial start of the context menu for the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 521d7b2..50d787d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -27,14 +27,24 @@ import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
+import com.smartgwt.client.widgets.menu.Menu;
+import com.smartgwt.client.widgets.menu.MenuItem;
+import com.smartgwt.client.widgets.menu.MenuItemSeparator;
+import com.smartgwt.client.widgets.menu.events.ClickHandler;
+import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeNode;
-import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
-import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickHandler;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -56,18 +66,9 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setAnimateFolders(false);
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
- setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
setShowHeader(false);
setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
-
- addNodeClickHandler(new NodeClickHandler() {
- public void onNodeClick(NodeClickEvent event) {
- TreeNode node = event.getNode();
- String link = getNodeTargetLink(node);
- CoreGUI.goToView(link);
- }
- });
}
@Override
@@ -76,13 +77,30 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// We may need to wait for tree data to be fetched before we can complete processing the selected path.
// When the datasource pulls data keep processing the selectedPath if necessary.
- this.addDataArrivedHandler(new DataArrivedHandler() {
+ addDataArrivedHandler(new DataArrivedHandler() {
public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
if (null != pendingPath) {
selectPath(pendingPath);
}
}
});
+
+ addNodeContextClickHandler(new NodeContextClickHandler() {
+ public void onNodeContextClick(final NodeContextClickEvent event) {
+ // stop the browser right-click menu
+ event.cancel();
+
+ TreeNode eventNode = event.getNode();
+
+ if (eventNode instanceof ChangeSetTreeNode) {
+ CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ } else if (eventNode instanceof DriftTreeNode) {
+ Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ menu.showContextMenu();
+ }
+ }
+ });
+
}
public void selectPath(ViewPath viewPath) {
@@ -144,4 +162,76 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @return the node's link
*/
protected abstract String getNodeTargetLink(TreeNode node);
+
+ /**
+ * Builds the right-mouse-click context menu for the given drift node
+ * @param node the drift node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildContextMenu(final DriftTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getName();
+ if (titleName.length() > 50) {
+ // make sure the title isn't really long so the menu is not abnormally wide
+ titleName = "..." + titleName.substring(titleName.length() - 50);
+ }
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem detailsItem = new MenuItem(MSG.common_title_details());
+ detailsItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ String link = getNodeTargetLink(node);
+ if (link != null) {
+ CoreGUI.goToView(link);
+ }
+ }
+ });
+ contextMenu.addItem(detailsItem);
+
+ return contextMenu;
+ }
+
+ @SuppressWarnings("unchecked")
+ static class ChangeSetTreeNode extends TreeNode {
+ public ChangeSetTreeNode(DriftChangeSet changeset) {
+ setIsFolder(true);
+ setIcon("subsystems/drift/ChangeSet_16.png");
+ setShowOpenIcon(true);
+ setID(changeset.getId());
+ setName(buildDriftChangeSetNodeName(changeset));
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(),
+ TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ static class DriftTreeNode extends TreeNode {
+ public DriftTreeNode(Drift drift) {
+ setIsFolder(false);
+ setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ String parentID = drift.getChangeSet().getId();
+ setParentID(parentID);
+ setID(parentID + '_' + drift.getId());
+ setName(drift.getPath());
+ }
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index c609a1e..fe8586a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -39,9 +39,8 @@ import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
@@ -96,6 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addSortVersion(PageOrdering.ASC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
@@ -233,38 +233,18 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
}
public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- String parentID;
- TreeNode node = new TreeNode();
+ TreeNode node;
if (from instanceof DriftChangeSet) {
DriftChangeSet changeset = (DriftChangeSet) from;
- node.setIsFolder(true);
- node.setIcon("subsystems/drift/ChangeSet_16.png");
- node.setShowOpenIcon(true);
- node.setID(changeset.getId());
- node.setName(buildDriftChangeSetNodeName(changeset));
-
+ node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
} else if (from instanceof Drift) {
Drift drift = (Drift) from;
- node.setIsFolder(false);
- node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
- parentID = drift.getChangeSet().getId();
- node.setParentID(parentID);
- node.setID(parentID + '_' + drift.getId());
- node.setName(drift.getPath());
+ node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
+ } else {
+ throw new IllegalArgumentException("please report this bug - bad value: " + from);
}
// if, in the future, we add more node types, we'll add more else-if statements here
return node;
}
-
- private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
- StringBuilder str = new StringBuilder();
- str.append(MSG.common_title_version());
- str.append(' ');
- str.append(changeset.getVersion());
- str.append(" (");
- str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
- str.append(')');
- return str.toString();
- }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index dc2a22d..3e368d5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -43,9 +43,12 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
protected String getNodeTargetLink(TreeNode node) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
- String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
- return path;
+ if (node instanceof DriftTreeNode) {
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
+ }
+ return null;
}
}
commit 5840be4d821c70b293c8be154e6beb174b929960
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Jul 25 17:11:41 2011 -0400
Adding mapping fields to drift mongodb entities
Also adding initial implementation for
DriftServerPluginFacet.findDriftCompositesByCriteria. The method does
return results but it is not yet usable from the GWT UI since the entity
classes returned are known only to the rhq-mongodb plugin.
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index 722dd22..2b3aca0 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -3,11 +3,15 @@ package org.rhq.enterprise.server.plugins.drift.mongodb;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import com.google.code.morphia.Datastore;
import com.google.code.morphia.Morphia;
+import com.google.code.morphia.query.Query;
import com.mongodb.Mongo;
import org.apache.commons.logging.Log;
@@ -22,10 +26,12 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
@@ -33,6 +39,9 @@ import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSetEntry;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBFile;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+
+import static org.rhq.enterprise.server.util.LookupUtil.getResourceManager;
public class MongoDBDriftServer implements DriftServerPluginFacet {
@@ -118,11 +127,40 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
@Override
public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria) {
- return new PageList<DriftComposite>();
+ Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class)
+ .filter("files.category in ", criteria.getFilterCategories())
+ .filter("resourceId in", criteria.getFilterResourceIds());
+
+ PageList<DriftComposite> results = new PageList<DriftComposite>();
+ Map<Integer, Resource> resources = loadResourceMap(subject, criteria.getFilterResourceIds());
+
+ for (MongoDBChangeSet changeSet : query) {
+ for (MongoDBChangeSetEntry entry : changeSet.getDrifts()) {
+ entry.setChangeSet(changeSet);
+ results.add(new DriftComposite(entry, resources.get(changeSet.getResourceId())));
+ }
+ }
+
+ return results;
}
@Override
public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
return null;
}
+
+ Map<Integer, Resource> loadResourceMap(Subject subject, List<Integer> resourceIds) {
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.addFilterIds(resourceIds.toArray(new Integer[resourceIds.size()]));
+
+ ResourceManagerLocal resourceMgr = getResourceManager();
+ PageList<Resource> resources = resourceMgr.findResourcesByCriteria(subject, criteria);
+
+ Map<Integer, Resource> map = new HashMap<Integer, Resource>();
+ for (Resource r : resources) {
+ map.put(r.getId(), r);
+ }
+
+ return map;
+ }
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
index 2640eff..2818b2c 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
@@ -1,5 +1,6 @@
package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
@@ -13,7 +14,9 @@ import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
@Entity("changesets")
-public class MongoDBChangeSet implements DriftChangeSet<MongoDBChangeSetEntry> {
+public class MongoDBChangeSet implements DriftChangeSet<MongoDBChangeSetEntry>, Serializable {
+
+ private static final long serialVersionUID = 1L;
@Id
private ObjectId id;
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
index 80cdc0c..ced7bff 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
@@ -1,12 +1,16 @@
package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+import java.io.Serializable;
+
import com.google.code.morphia.annotations.Embedded;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
@Embedded
-public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFile> {
+public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFile>, Serializable {
+
+ private static final long serialVersionUID = 1L;
private Long ctime = System.currentTimeMillis();
@@ -14,6 +18,14 @@ public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFil
private String path;
+ public MongoDBChangeSetEntry() {
+ }
+
+ public MongoDBChangeSetEntry(String path, DriftCategory category) {
+ this.path = path;
+ this.category = category;
+ }
+
@Override
public String getId() {
return null;
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
index e6aec82..b5b8306 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
@@ -9,6 +9,7 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
import static org.rhq.test.AssertUtils.assertPropertiesMatch;
@@ -57,7 +58,8 @@ public class MongoDBChangeSetTest {
@Test
public void saveAndLoadChangeSetWithOneEntry() throws Exception {
MongoDBChangeSet expected = new MongoDBChangeSet();
- expected.getDrifts().add(new MongoDBChangeSetEntry());
+ expected.setResourceId(10001);
+ expected.getDrifts().add(new MongoDBChangeSetEntry("foo", FILE_ADDED));
ds.save(expected);
commit cfc31a74808e6a68ea2b334364b377fad5c93c81
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 16:37:56 2011 -0400
the initial start of the drift change set tree view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
index 30523b3..10c15e4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
@@ -458,4 +458,8 @@ public class LinkManager {
public static String getBundleDeploymentLink(int bundleId, int bundleDeploymentId) {
return "#Bundles/Bundle/" + bundleId + "/deployments/" + bundleDeploymentId;
}
+
+ public static String getDriftHistoryLink(int resourceId, int driftId) {
+ return "#Resource/" + resourceId + "/Drift/History/" + driftId;
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
new file mode 100644
index 0000000..521d7b2
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -0,0 +1,147 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.drift;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
+import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
+import com.smartgwt.client.widgets.tree.Tree;
+import com.smartgwt.client.widgets.tree.TreeNode;
+import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ViewId;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
+
+/**
+ * @author John Mazzitelli
+ */
+public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid {
+
+ // We may need to wait for tree data to be fetched before we can complete processing the selected path.
+ // If so, hold it here and retry after the datasource pulls the data.
+ private ViewPath pendingPath = null;
+
+ public AbstractDriftChangeSetsTreeView(String locatorId, boolean canManageDrift) {
+ super(locatorId);
+ setWidth100();
+ setHeight100();
+ setLeaveScrollbarGap(false);
+ // fetch the top nodes at the inital onDraw()
+ setAutoFetchData(true);
+ setAnimateFolders(false);
+ setSelectionType(SelectionStyle.SINGLE);
+ setShowRollOver(false);
+ setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
+ setShowHeader(false);
+
+ setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
+
+ addNodeClickHandler(new NodeClickHandler() {
+ public void onNodeClick(NodeClickEvent event) {
+ TreeNode node = event.getNode();
+ String link = getNodeTargetLink(node);
+ CoreGUI.goToView(link);
+ }
+ });
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ // We may need to wait for tree data to be fetched before we can complete processing the selected path.
+ // When the datasource pulls data keep processing the selectedPath if necessary.
+ this.addDataArrivedHandler(new DataArrivedHandler() {
+ public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
+ if (null != pendingPath) {
+ selectPath(pendingPath);
+ }
+ }
+ });
+ }
+
+ public void selectPath(ViewPath viewPath) {
+ Tree theTree = getTree();
+
+ if (viewPath.viewsLeft() > 0) {
+ String key = "";
+ for (ViewId view : viewPath.getViewPath().subList(2, viewPath.getViewPath().size())) {
+ if (key.length() > 0) {
+ key += "_";
+ }
+
+ key += view.getPath();
+
+ TreeNode node = theTree.findById(key);
+
+ if (node != null) {
+ // open the node, this will force a fetch of child data if necessary
+ theTree.openFolder(node);
+ } else {
+ // wait for data to get loaded...
+ pendingPath = new ViewPath(viewPath.toString());
+ return;
+ }
+ }
+
+ // we found the node, so keep going
+ pendingPath = null;
+
+ final String finalKey = key;
+ GWT.runAsync(new RunAsyncCallback() {
+ public void onFailure(Throwable reason) {
+ }
+
+ public void onSuccess() {
+ TreeNode node = getTree().findById(finalKey);
+ if (node != null) {
+ deselectAllRecords();
+ selectRecord(node);
+ }
+ }
+ });
+ } else {
+ deselectAllRecords();
+ if (getTotalRows() > 0)
+ selectRecord(0);
+ }
+ }
+
+ public void refresh() {
+ invalidateCache();
+ }
+
+ /**
+ * Returns the link (as a string) that the client should be redirected to
+ * if the given node is clicked.
+ *
+ * @param node the node whose target link is to be returned
+ * @return the node's link
+ */
+ protected abstract String getNodeTargetLink(TreeNode node);
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..c609a1e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -0,0 +1,270 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceTextField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
+
+ private static final String ATTR_PARENT_ID = "parentId";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+
+ private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
+ private final boolean canManageDrift;
+
+ public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
+ super();
+ this.canManageDrift = canManageDrift;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+
+ DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
+ idDataField.setPrimaryKey(true);
+ fields.add(idDataField);
+
+ DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
+ nameDataField.setCanEdit(false);
+ fields.add(nameDataField);
+
+ DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
+ parentIdField.setForeignKey(ATTR_ID);
+ fields.add(parentIdField);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
+
+ String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
+
+ if (parentId == null) {
+
+ // There is no parent - we are at the root of the tree.
+ // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
+ // We will lazily load drifts when the these changeset tree nodes are opened
+ DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.setPageControl(getPageControl(request));
+
+ driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
+ public void onSuccess(PageList<DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ } else {
+ String changesetId = parentId;
+ DriftCriteria criteria = new DriftJPACriteria();
+ criteria.addFilterChangeSetId(changesetId);
+
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Drift> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
+
+ /*
+ * I am leaving this code commented for future reference. Because today the drit change set tree only
+ * shows simple changeset->drift tree, we don't need this. But if we need to have
+ * multiple types of child nodes, we'll need something like below to query
+ * for the different child node data. For example, we'd need this if we have a tree like:
+ * ChangeSet
+ * |____Resources
+ * | |____ My resource 1
+ * | |____ ...
+ * |_____Drifts
+ * |___ Drift #1
+ * |___ Drift #2
+ * |___ ...
+ * Today we only have Drifts child nodes, so we don't need to have that intermediate
+ * "Drifts" node. If we later want to introduce different node types (like Resources)
+ * we need additional code like below.
+ *
+
+ // we are at an inner node, being asked to get the children of it
+ if (p.endsWith("_drifts")) {
+ // ...load drift items like above in the real code...
+ } else if (p.endsWith("_resources")) {
+ // ...load resource items and put those nodes in the tree...
+ } else {
+ // This is an unknown type of node, so just log an error.
+ // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
+ // we'll add more if-else statements above to process those different nodes.
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
+ }
+
+ *
+ */
+ }
+
+ return;
+ }
+
+ @Override
+ protected BaseCriteria getFetchCriteria(DSRequest request) {
+ // our executeFetch will determine on its own what criteria to use based on what is to be fetched
+ // thus we don't return anything here and let the executeFetch do everything
+ return null;
+ }
+
+ @Override
+ public Object copyValues(Record from) {
+ return null; // don't need this method.
+ }
+
+ @Override
+ public ListGridRecord[] buildRecords(Collection dataObjects) {
+ return buildRecordsForKnownChangeSets(dataObjects, null);
+ }
+
+ public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
+ if (dataObjects == null) {
+ return null;
+ }
+
+ final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
+
+ for (Object item : dataObjects) {
+
+ // the resultant item is a direct node to build
+ records.add(copyValues(item));
+
+ // now build the children of the node
+ /*
+ * We do not have the need for building any intermeidate nodes today.
+ * There is nothing to do, but if in the future we have differnet node types,
+ * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
+ * for an example of where this is already done. Commenting this out just as an
+ * example of how this can be done.
+
+ if (item instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) item;
+
+ // each bundle has two direct children - the versions and destinations folders
+ TreeNode versionNode = new TreeNode(MSG.view_drift());
+ versionNode.setID(changeset.getId() + "_drifts");
+ versionNode.setParentID(changeset.getId());
+ versionNode.setName(MSG.view_drift());
+ versionNode.setAttribute("name", MSG.view_drift());
+ records.add(versionNode);
+ } else if (item instanceof Drift) {
+ if (canManageDrift) {
+ records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
+ }
+ }
+
+ *
+ */
+ }
+
+ return records.toArray(new ListGridRecord[records.size()]);
+ }
+
+ @Override
+ public ListGridRecord copyValues(Object from) {
+ return copyValuesForKnownDriftChangeSet(from, null);
+ }
+
+ public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
+ String parentID;
+ TreeNode node = new TreeNode();
+ if (from instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) from;
+ node.setIsFolder(true);
+ node.setIcon("subsystems/drift/ChangeSet_16.png");
+ node.setShowOpenIcon(true);
+ node.setID(changeset.getId());
+ node.setName(buildDriftChangeSetNodeName(changeset));
+
+ } else if (from instanceof Drift) {
+ Drift drift = (Drift) from;
+ node.setIsFolder(false);
+ node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ parentID = drift.getChangeSet().getId();
+ node.setParentID(parentID);
+ node.setID(parentID + '_' + drift.getId());
+ node.setName(drift.getPath());
+ }
+ // if, in the future, we add more node types, we'll add more else-if statements here
+
+ return node;
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index f610b8b..48f5bc8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -38,6 +38,13 @@ public class DriftChangeSetsView extends LocatableVLayout {
this.hasWriteAccess = hasWriteAccess;
}
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ }
+
public EntityContext getContext() {
return context;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
new file mode 100644
index 0000000..dc2a22d
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -0,0 +1,51 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.LinkManager;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTreeView {
+
+ private final EntityContext context;
+
+ public ResourceDriftChangeSetsTreeView(String locatorId, boolean canManageDrift, EntityContext context) {
+
+ super(locatorId, canManageDrift);
+
+ if (context.type != EntityContext.Type.Resource) {
+ throw new IllegalArgumentException("wrong context: " + context);
+ }
+
+ this.context = context;
+ }
+
+ protected String getNodeTargetLink(TreeNode node) {
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index c7d6f91..ea8c956 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1123,6 +1123,7 @@ view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
view_drift_changeSets = Change Sets
view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 5fe14aa..a07568a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -941,6 +941,7 @@ view_dashboards_title = Dashboard
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6bce847..6e68cff 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1106,6 +1106,7 @@ view_dashboards_title = ダッシュボード
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index bd2b6fb..fa86006 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1141,6 +1141,7 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 9fa9115..79816c5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1115,6 +1115,7 @@ view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
new file mode 100644
index 0000000..fdda214
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
new file mode 100644
index 0000000..358cf61
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit fe7f34b7c81f58995cba007e0105478d3c53b97c
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Jul 25 13:54:24 2011 -0400
Initial commit for entity classes and some initial unit tests
This commit provides the first cut at drift entities for mongodb. I also
provided an initial implementation for
DriftServerPluginFacet.saveChangeSet.
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 8721db7..958d3e0 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -33,6 +33,19 @@
</dependency>
<dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-common-drift</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.6.3</version>
@@ -72,16 +85,44 @@
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ <executions>
+ <execution>
+ <id>copy-libs</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongo-java-driver</artifactId>
+ </artifactItem>
+ <artifactItem>
+ <groupId>com.google.code.morphia</groupId>
+ <artifactId>morphia</artifactId>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<repositories>
- <id>morphia-repo</id>
- <name>Morphia Repo</name>
- <url>http://morphia.googlecode.com/svn/mavenrepo/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
+ <repository>
+ <id>morphia-repo</id>
+ <name>Morphia Repo</name>
+ <url>http://morphia.googlecode.com/svn/mavenrepo/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
</repositories>
<profiles>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index d7c7202..722dd22 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -1,12 +1,61 @@
package org.rhq.enterprise.server.plugins.drift.mongodb;
+import java.io.BufferedReader;
import java.io.File;
-
+import java.io.InputStreamReader;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import com.google.code.morphia.Datastore;
+import com.google.code.morphia.Morphia;
+import com.mongodb.Mongo;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.common.drift.ChangeSetReader;
+import org.rhq.common.drift.ChangeSetReaderImpl;
+import org.rhq.common.drift.DirectoryEntry;
+import org.rhq.common.drift.FileEntry;
+import org.rhq.common.drift.Headers;
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftComposite;
+import org.rhq.core.domain.drift.Snapshot;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.core.util.ZipUtil;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSetEntry;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBFile;
public class MongoDBDriftServer implements DriftServerPluginFacet {
+ private final Log log = LogFactory.getLog(MongoDBDriftServer.class);
+
+ private Mongo connection;
+
+ private Morphia morphia;
+
+ private Datastore ds;
+
+ static int changeSetVersions = 0;
+
+ @Override
+ public void initialize(ServerPluginContext context) throws Exception {
+ connection = new Mongo("localhost");
+ morphia = new Morphia()
+ .map(MongoDBChangeSet.class)
+ .map(MongoDBChangeSetEntry.class)
+ .map(MongoDBFile.class);
+ ds = morphia.createDatastore(connection, "rhq");
+ }
+
@Override
public void start() {
@@ -23,8 +72,33 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public void saveChangeSet(int resourceId, File changeSetZip) throws Exception {
-
+ public void saveChangeSet(final int resourceId, final File changeSetZip) throws Exception {
+ ZipUtil.walkZipFile(changeSetZip, new ZipUtil.ZipEntryVisitor() {
+ @Override
+ public boolean visit(ZipEntry zipEntry, ZipInputStream stream) throws Exception {
+ ChangeSetReader reader = new ChangeSetReaderImpl(new BufferedReader(new InputStreamReader(stream)));
+
+ Headers headers = reader.getHeaders();
+ MongoDBChangeSet changeSet = new MongoDBChangeSet();
+ changeSet.setCategory(headers.getType());
+ changeSet.setResourceId(resourceId);
+ // TODO Figure out how best to handle drift config reference
+ changeSet.setDriftConfigurationId(1);
+ changeSet.setVersion(changeSetVersions++);
+
+ for (DirectoryEntry dirEntry : reader) {
+ for (FileEntry fileEntry : dirEntry) {
+ MongoDBChangeSetEntry entry = new MongoDBChangeSetEntry();
+ entry.setCategory(fileEntry.getType());
+ entry.setPath(fileEntry.getFile());
+ changeSet.add(entry);
+ }
+ }
+
+ ds.save(changeSet);
+ return true;
+ }
+ });
}
@Override
@@ -33,8 +107,22 @@ public class MongoDBDriftServer implements DriftServerPluginFacet {
}
@Override
- public void initialize(ServerPluginContext context) throws Exception {
+ public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
+ return new PageList<DriftChangeSet>();
+ }
+ @Override
+ public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ return new PageList<Drift>();
}
+ @Override
+ public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria) {
+ return new PageList<DriftComposite>();
+ }
+
+ @Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ return null;
+ }
}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
new file mode 100644
index 0000000..2640eff
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSet.java
@@ -0,0 +1,110 @@
+package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import com.google.code.morphia.annotations.Embedded;
+import com.google.code.morphia.annotations.Entity;
+import com.google.code.morphia.annotations.Id;
+
+import org.bson.types.ObjectId;
+
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+
+@Entity("changesets")
+public class MongoDBChangeSet implements DriftChangeSet<MongoDBChangeSetEntry> {
+
+ @Id
+ private ObjectId id;
+
+ private Long ctime = System.currentTimeMillis();
+
+ private int version;
+
+ private DriftChangeSetCategory category;
+
+ private int configId;
+
+ private int resourceId;
+
+ @Embedded("files")
+ private Set<MongoDBChangeSetEntry> entries = new HashSet<MongoDBChangeSetEntry>();
+
+ public ObjectId getObjectId() {
+ return id;
+ }
+
+ @Override
+ public String getId() {
+ return id.toString();
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = new ObjectId(id);
+ }
+
+ public void setId(ObjectId id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public int getDriftConfigurationId() {
+ return configId;
+ }
+
+ @Override
+ public void setDriftConfigurationId(int id) {
+ configId = id;
+ }
+
+ @Override
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(int id) {
+ resourceId = id;
+ }
+
+ @Override
+ public Set<MongoDBChangeSetEntry> getDrifts() {
+ return entries;
+ }
+
+ public MongoDBChangeSet add(MongoDBChangeSetEntry entry) {
+ entries.add(entry);
+ return this;
+ }
+
+ @Override
+ public void setDrifts(Set<MongoDBChangeSetEntry> drifts) {
+ entries = drifts;
+ }
+}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
new file mode 100644
index 0000000..80cdc0c
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetEntry.java
@@ -0,0 +1,77 @@
+package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+
+import com.google.code.morphia.annotations.Embedded;
+
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftCategory;
+
+@Embedded
+public class MongoDBChangeSetEntry implements Drift<MongoDBChangeSet, MongoDBFile> {
+
+ private Long ctime = System.currentTimeMillis();
+
+ private DriftCategory category;
+
+ private String path;
+
+ @Override
+ public String getId() {
+ return null;
+ }
+
+ @Override
+ public void setId(String id) {
+ }
+
+ @Override
+ public Long getCtime() {
+ return null;
+ }
+
+ @Override
+ public MongoDBChangeSet getChangeSet() {
+ return null;
+ }
+
+ @Override
+ public void setChangeSet(MongoDBChangeSet changeSet) {
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public MongoDBFile getOldDriftFile() {
+ return null;
+ }
+
+ @Override
+ public void setOldDriftFile(MongoDBFile oldDriftFile) {
+ }
+
+ @Override
+ public MongoDBFile getNewDriftFile() {
+ return null;
+ }
+
+ @Override
+ public void setNewDriftFile(MongoDBFile newDriftFile) {
+ }
+}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java
new file mode 100644
index 0000000..ea0c509
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBFile.java
@@ -0,0 +1,49 @@
+package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+
+import com.google.code.morphia.annotations.Entity;
+import com.google.code.morphia.annotations.Id;
+
+import org.rhq.core.domain.drift.DriftFile;
+import org.rhq.core.domain.drift.DriftFileStatus;
+
+@Entity
+public class MongoDBFile implements DriftFile {
+
+ @Id
+ private String hash;
+
+ @Override
+ public String getHashId() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public void setHashId(String hashId) {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public Long getCtime() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public Long getDataSize() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public void setDataSize(Long size) {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public DriftFileStatus getStatus() {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ @Override
+ public void setStatus(DriftFileStatus status) {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml
index e1894d0..eb32c51 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -4,9 +4,9 @@
version="1.0"
apiVersion="1.0"
description="The Drift Management MongoDB Persistence Store"
- displayName="Drift:RHQ"
+ displayName="Drift:MongoDB"
name="drift-mongodb"
- package="org.rhq.enterprise.server.plugins.drift.MorphiaTest"
+ package="org.rhq.enterprise.server.plugins.drift.mongodb"
xmlns="urn:xmlns:rhq-serverplugin.drift"
xmlns:serverplugin="urn:xmlns:rhq-serverplugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java
deleted file mode 100644
index c88432e..0000000
--- a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.rhq.enterprise.server.plugins.drift;
-
-import com.google.code.morphia.Datastore;
-import com.google.code.morphia.Morphia;
-import com.mongodb.DB;
-import com.mongodb.Mongo;
-
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.drift.DriftChangeSet;
-
-public class MorphiaTest {
-
- @Test
- public void connectToMongoDB() throws Exception {
- Mongo connection = new Mongo("localhost");
- DB db = connection.getDB("test");
-
- Morphia morphia = new Morphia();
- morphia.map(DriftChangeSet.class);
-
- Datastore ds = morphia.createDatastore(connection, "test");
-
-// DriftChangeSet changeSet = new DriftChangeSet(null, 1, COVERAGE);
-// ds.save(changeSet);
- }
-
-}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
new file mode 100644
index 0000000..e6aec82
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/entities/MongoDBChangeSetTest.java
@@ -0,0 +1,71 @@
+package org.rhq.enterprise.server.plugins.drift.mongodb.entities;
+
+import com.google.code.morphia.Datastore;
+import com.google.code.morphia.Morphia;
+import com.google.code.morphia.query.Query;
+import com.mongodb.Mongo;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
+import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
+import static org.rhq.test.AssertUtils.assertPropertiesMatch;
+import static org.testng.Assert.assertNotNull;
+
+public class MongoDBChangeSetTest {
+
+ Mongo connection;
+
+ Morphia morphia;
+
+ Datastore ds;
+
+ @BeforeClass
+ public void initDB() throws Exception {
+ connection = new Mongo("localhost");
+
+ morphia = new Morphia()
+ .map(MongoDBChangeSet.class)
+ .map(MongoDBChangeSetEntry.class)
+ .map(MongoDBFile.class);
+
+ ds = morphia.createDatastore(connection, "rhq");
+ }
+
+ @BeforeMethod
+ public void clearCollections() throws Exception {
+ Query deleteAll = ds.createQuery(MongoDBChangeSet.class);
+ ds.delete(deleteAll);
+ }
+
+ @Test
+ public void saveAndLoadEmptyChangeSet() throws Exception {
+ MongoDBChangeSet expected = new MongoDBChangeSet();
+ expected.setCategory(COVERAGE);
+ expected.setVersion(1);
+ expected.setDriftConfigurationId(1);
+
+ ds.save(expected);
+ MongoDBChangeSet actual = ds.get(MongoDBChangeSet.class, expected.getObjectId());
+
+ assertNotNull(actual, "Failed to load change set");
+ assertPropertiesMatch("Failed to save change set", expected, actual);
+ }
+
+ @Test
+ public void saveAndLoadChangeSetWithOneEntry() throws Exception {
+ MongoDBChangeSet expected = new MongoDBChangeSet();
+ expected.getDrifts().add(new MongoDBChangeSetEntry());
+
+ ds.save(expected);
+
+ MongoDBChangeSet actual = ds.get(MongoDBChangeSet.class, expected.getObjectId());
+
+ assertNotNull(expected, "Failed to load change set");
+ assertPropertiesMatch("Failed to save change set", expected, actual, "drifts");
+ assertCollectionMatchesNoOrder(expected.getDrifts(), actual.getDrifts(), "Failed to save change set entries");
+ }
+
+}
commit 33d629c91cab66d62ea80fc57f131638b698b263
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 12:12:31 2011 -0400
drift change set criteria needs to support paging like everyone else.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
index edc436b..f377ade 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
@@ -3,8 +3,11 @@ package org.rhq.core.domain.criteria;
import org.rhq.core.domain.util.PageControl;
/**
- * Created by IntelliJ IDEA. User: jsanda Date: 7/19/11 Time: 5:30 PM To change this template use File | Settings | File
- * Templates.
+ * All criteria, regardless of the backend storage that will be queried with this criteria, needs
+ * to support certain base functionality (like paging).
+ * This base interface provides that common API.
+ *
+ * @author John Sanda
*/
public interface BaseCriteria {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 1b3effc..b5f71b2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -5,7 +5,7 @@ import java.io.Serializable;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftChangeSetCriteria extends Serializable {
+public interface DriftChangeSetCriteria extends BaseCriteria, Serializable {
void addFilterId(String filterId);
commit dd2b33298b58db71552a7435bd9dbdb1bcaa125b
Merge: d2b6c62 3b0c734
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jul 24 22:01:49 2011 -0400
Merge branch 'drift' into drift-mongodb
Conflicts:
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java
modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java
modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
diff --cc modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index 26520a1,bc8d26a..0000000
deleted file mode 100644,100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ /dev/null
commit 3b0c7347778c73588535665e2afc410e1478da9a
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jul 24 21:13:24 2011 -0400
Adding createSnapshot method to drift server api
Also moving Snapshot and DiffReport classes to core/domain to make them
accessible to coregui.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
new file mode 100644
index 0000000..e0659d9
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.core.domain.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
new file mode 100644
index 0000000..91e5f50
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
@@ -0,0 +1,68 @@
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+public class Snapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int version;
+
+ private Map<String, Drift> entries = new TreeMap<String, Drift>();
+
+ public int getVersion() {
+ return version;
+ }
+
+ public Collection<Drift> getEntries() {
+ return entries.values();
+ }
+
+ public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
+ for (Drift entry : changeSet.getDrifts()) {
+ entries.remove(entry.getPath());
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.put(entry.getPath(), entry);
+ }
+ }
+ version = changeSet.getVersion();
+ return this;
+ }
+
+ public DiffReport diff(Snapshot right) {
+ Snapshot left = this;
+ DiffReport<Drift> diff = new DiffReport<Drift>();
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ Drift rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
+}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
new file mode 100644
index 0000000..93653b3
--- /dev/null
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -0,0 +1,383 @@
+package org.rhq.core.domain.drift;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
+import static java.util.Arrays.asList;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
+import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
+import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
+import static org.testng.Assert.assertEquals;
+
+public class SnapshotTest {
+
+ @Test
+ public void addChangeSetWithAddedFile() {
+ int configId = 1;
+
+ FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
+ .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
+
+ Snapshot snapshot = new Snapshot().add(changeSet);
+
+ assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
+ "a snapshot that contains a single change set");
+ assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
+ }
+
+ @Test
+ public void addChangeSetsWithAddedFiles() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
+ "with two change sets and file added in second change set");
+ assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
+ }
+
+ @Test
+ public void replaceFileWithChangedVersion() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+
+ Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
+ new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
+ "Failed to build snapshot with file changed");
+ }
+
+ @Test
+ public void deleteFileThatHasBeenRemoved() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+
+ Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
+ "Failed to build snapshot with a file " +
+ "removed.");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndNotInRight() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
+ }
+
+ @Test
+ public void diffShowsEntriesInRightAndNotInLeft() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(),
+ "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
+ }
+
+ <E> Set<E> asSet(E... elements) {
+ HashSet<E> set = new HashSet<E>();
+ for (E element : elements) {
+ set.add(element);
+ }
+ return set;
+ }
+
+ static class FakeDriftChangeSet implements DriftChangeSet {
+
+ private String id;
+ private int version;
+ private DriftChangeSetCategory category;
+ private int configId;
+ private Set<Drift> drifts = new HashSet<Drift>();
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDriftChangeSet() {
+ }
+
+ public FakeDriftChangeSet(int version, DriftChangeSetCategory category, int configId) {
+ this.version = version;
+ this.category = category;
+ this.configId = configId;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public int getDriftConfigurationId() {
+ return configId;
+ }
+
+ @Override
+ public void setDriftConfigurationId(int id) {
+ configId = id;
+ }
+
+ @Override
+ public int getResourceId() {
+ return 0;
+ }
+
+ @Override
+ public Set getDrifts() {
+ return drifts;
+ }
+
+ @Override
+ public void setDrifts(Set drifts) {
+ this.drifts = drifts;
+ }
+
+ public FakeDriftChangeSet add(Drift drift) {
+ drifts.add(drift);
+ return this;
+ }
+ }
+
+ static class FakeDrift implements Drift {
+
+ private String id;
+ private DriftCategory category;
+ private String path;
+ private DriftFile oldFile;
+ private DriftFile newFile;
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDrift() {
+ }
+
+ public FakeDrift(DriftCategory category, DriftFile oldFile, DriftFile newFile, String path) {
+ this.category = category;
+ this.oldFile = oldFile;
+ this.newFile = newFile;
+ this.path = path;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public DriftChangeSet getChangeSet() {
+ return null;
+ }
+
+ @Override
+ public void setChangeSet(DriftChangeSet changeSet) {
+
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public DriftFile getOldDriftFile() {
+ return oldFile;
+ }
+
+ @Override
+ public void setOldDriftFile(DriftFile oldDriftFile) {
+ this.oldFile = oldDriftFile;
+ }
+
+ @Override
+ public DriftFile getNewDriftFile() {
+ return newFile;
+ }
+
+ @Override
+ public void setNewDriftFile(DriftFile newDriftFile) {
+ newFile = newDriftFile;
+ }
+
+ @Override
+ public String toString() {
+ return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
+ ", path: " + path + "]";
+ }
+ }
+
+ static class FakeDriftFile implements DriftFile {
+
+ private String hash;
+ private long size;
+ private DriftFileStatus status;
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDriftFile() {
+ }
+
+ public FakeDriftFile(String hash, long size, DriftFileStatus status) {
+ this.hash = hash;
+ this.size = size;
+ this.status = status;
+ }
+
+ @Override
+ public String getHashId() {
+ return hash;
+ }
+
+ @Override
+ public void setHashId(String hashId) {
+ hash = hashId;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public Long getDataSize() {
+ return size;
+ }
+
+ @Override
+ public void setDataSize(Long size) {
+ this.size = size;
+ }
+
+ @Override
+ public DriftFileStatus getStatus() {
+ return status;
+ }
+
+ @Override
+ public void setStatus(DriftFileStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "DriftFile[hashId: " + hash + ", dataSize: " + size + ", status: " + status.ordinal() + "]";
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index f69195d..10f72f5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -20,13 +20,16 @@ package org.rhq.enterprise.gui.coregui.client.gwt;
import com.google.gwt.user.client.rpc.RemoteService;
+import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
/**
@@ -115,6 +118,8 @@ public interface DriftGWTService extends RemoteService {
PageList<DriftComposite> findDriftCompositesByCriteria(DriftCriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+
/**
* Get the specified drift configuration for the specified context.
*
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index 8d5beb9..b440ffd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -18,13 +18,16 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
+import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
@@ -122,6 +125,15 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ try {
+ return driftServer.createSnapshot(subject, criteria);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public DriftConfiguration getDriftConfiguration(EntityContext entityContext, int driftConfigId)
throws RuntimeException {
try {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
deleted file mode 100644
index 89f3286..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class DiffReport<T> {
-
- private List<T> notInLeft = new ArrayList<T>();
-
- private List<T> notInRight = new ArrayList<T>();
-
- private List<T> conflicts = new ArrayList<T>();
-
- public List<T> getElementsNotInLeft() {
- return notInLeft;
- }
-
- public void elementNotInLeft(T element) {
- notInLeft.add(element);
- }
-
- public List<T> getElementsNotInRight() {
- return notInRight;
- }
-
- public void elementNotInRight(T element) {
- notInRight.add(element);
- }
-
- public List<T> getElementsInConflict() {
- return conflicts;
- }
-
- public void elementInConflict(T element) {
- conflicts.add(element);
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 4c669e7..54eda95 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -71,6 +71,7 @@ import org.rhq.core.domain.drift.DriftFileBits;
import org.rhq.core.domain.drift.DriftFileStatus;
import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 0fb077d..6939c7c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.drift.RhqDriftFile;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
@Local
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 0dd2aa8..276c8b9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -19,11 +19,13 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
@@ -41,6 +43,13 @@ import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
@Stateless
public class DriftServerBean implements DriftServerLocal {
+ // TODO Should security checks be handled here instead of delegating to the drift plugin?
+ // Currently any security checks that need to be performed are delegated to the plugin.
+ // This is fine *so far* since the only plugin is the default which is our existing SLSB
+ // layer backed by the RHQ database. If the plugins are only supposed to be responsible
+ // for persistence management of drift entities and content, then they should not be
+ // responsible for other concerns like security.
+
private Log log = LogFactory.getLog(DriftServerBean.class);
@PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
@@ -87,6 +96,13 @@ public class DriftServerBean implements DriftServerLocal {
driftServerPlugin.saveChangeSetFiles(changeSetFilesZip);
}
+ @Override
+ @TransactionAttribute(NOT_SUPPORTED)
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ DriftServerPluginFacet driftServerPlugin = getServerPlugin();
+ return driftServerPlugin.createSnapshot(subject, criteria);
+ }
+
DriftServerPluginFacet getServerPlugin() {
MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
if (masterPC == null) {
@@ -201,4 +217,5 @@ public class DriftServerBean implements DriftServerLocal {
throw new IllegalArgumentException("Entity Context Type not supported [" + context + "]");
}
}
+
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
index 756f135..5046e83 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
@@ -7,11 +7,13 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
@Local
@@ -33,4 +35,6 @@ public interface DriftServerLocal {
PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
deleted file mode 100644
index 5dc18fa..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.DriftFile;
-
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-
-public class Snapshot implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private int version;
-
- private Map<String, Drift> entries = new TreeMap<String, Drift>();
-
- public int getVersion() {
- return version;
- }
-
- public Collection<Drift> getEntries() {
- return entries.values();
- }
-
- public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
- for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry.getPath());
- if (entry.getCategory() != FILE_REMOVED) {
- entries.put(entry.getPath(), entry);
- }
- }
- version = changeSet.getVersion();
- return this;
- }
-
- public DiffReport diff(Snapshot right) {
- Snapshot left = this;
- DiffReport<Drift> diff = new DiffReport<Drift>();
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- if (!right.entries.containsKey(entry.getKey())) {
- diff.elementNotInRight(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
- if (!left.entries.containsKey(entry.getKey())) {
- diff.elementNotInLeft(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- Drift rightDrift = right.entries.get(entry.getKey());
- if (rightDrift != null) {
- DriftFile leftFile = entry.getValue().getNewDriftFile();
- DriftFile rightFile = rightDrift.getNewDriftFile();
-
- if (!leftFile.getHashId().equals(rightFile.getHashId())) {
- diff.elementInConflict(entry.getValue());
- }
- }
- }
-
- return diff;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index 890d2d8..867464d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -23,10 +23,12 @@ import java.io.File;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
@@ -47,4 +49,6 @@ public interface DriftServerPluginFacet extends ServerPluginComponent {
void saveChangeSet(int resourceId, File changeSetZip) throws Exception;
void saveChangeSetFiles(File changeSetFilesZip) throws Exception;
+
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
deleted file mode 100644
index 47dbb73..0000000
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ /dev/null
@@ -1,385 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.DriftChangeSetCategory;
-import org.rhq.core.domain.drift.DriftFile;
-import org.rhq.core.domain.drift.DriftFileStatus;
-
-import static java.util.Arrays.asList;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
-import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
-import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
-import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
-import static org.testng.Assert.assertEquals;
-
-public class SnapshotTest {
-
- @Test
- public void addChangeSetWithAddedFile() {
- int configId = 1;
-
- FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
- .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
-
- Snapshot snapshot = new Snapshot().add(changeSet);
-
- assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
- "a snapshot that contains a single change set");
- assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
- }
-
- @Test
- public void addChangeSetsWithAddedFiles() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
- "with two change sets and file added in second change set");
- assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
- }
-
- @Test
- public void replaceFileWithChangedVersion() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
-
- Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
- new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with file changed");
- }
-
- @Test
- public void deleteFileThatHasBeenRemoved() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
-
- Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file " +
- "removed.");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndNotInRight() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
- Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
- "elements that are in the left but not in the right.");
- }
-
- @Test
- public void diffShowsEntriesInRightAndNotInLeft() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
- "elements that are in the left but not in the right");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
- "element that are in both left and right and are in conflict");
- }
-
- <E> Set<E> asSet(E... elements) {
- HashSet<E> set = new HashSet<E>();
- for (E element : elements) {
- set.add(element);
- }
- return set;
- }
-
- static class FakeDriftChangeSet implements DriftChangeSet {
-
- private String id;
- private int version;
- private DriftChangeSetCategory category;
- private int configId;
- private Set<Drift> drifts = new HashSet<Drift>();
- private long ctime = System.currentTimeMillis();
-
- public FakeDriftChangeSet() {
- }
-
- public FakeDriftChangeSet(int version, DriftChangeSetCategory category, int configId) {
- this.version = version;
- this.category = category;
- this.configId = configId;
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public int getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(int version) {
- this.version = version;
- }
-
- @Override
- public DriftChangeSetCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftChangeSetCategory category) {
- this.category = category;
- }
-
- @Override
- public int getDriftConfigurationId() {
- return configId;
- }
-
- @Override
- public void setDriftConfigurationId(int id) {
- configId = id;
- }
-
- @Override
- public int getResourceId() {
- return 0;
- }
-
- @Override
- public Set getDrifts() {
- return drifts;
- }
-
- @Override
- public void setDrifts(Set drifts) {
- this.drifts = drifts;
- }
-
- public FakeDriftChangeSet add(Drift drift) {
- drifts.add(drift);
- return this;
- }
- }
-
- static class FakeDrift implements Drift {
-
- private String id;
- private DriftCategory category;
- private String path;
- private DriftFile oldFile;
- private DriftFile newFile;
- private long ctime = System.currentTimeMillis();
-
- public FakeDrift() {
- }
-
- public FakeDrift(DriftCategory category, DriftFile oldFile, DriftFile newFile, String path) {
- this.category = category;
- this.oldFile = oldFile;
- this.newFile = newFile;
- this.path = path;
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public DriftChangeSet getChangeSet() {
- return null;
- }
-
- @Override
- public void setChangeSet(DriftChangeSet changeSet) {
-
- }
-
- @Override
- public DriftCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftCategory category) {
- this.category = category;
- }
-
- @Override
- public String getPath() {
- return path;
- }
-
- @Override
- public void setPath(String path) {
- this.path = path;
- }
-
- @Override
- public DriftFile getOldDriftFile() {
- return oldFile;
- }
-
- @Override
- public void setOldDriftFile(DriftFile oldDriftFile) {
- this.oldFile = oldDriftFile;
- }
-
- @Override
- public DriftFile getNewDriftFile() {
- return newFile;
- }
-
- @Override
- public void setNewDriftFile(DriftFile newDriftFile) {
- newFile = newDriftFile;
- }
-
- @Override
- public String toString() {
- return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
- ", path: " + path + "]";
- }
- }
-
- static class FakeDriftFile implements DriftFile {
-
- private String hash;
- private long size;
- private DriftFileStatus status;
- private long ctime = System.currentTimeMillis();
-
- public FakeDriftFile() {
- }
-
- public FakeDriftFile(String hash, long size, DriftFileStatus status) {
- this.hash = hash;
- this.size = size;
- this.status = status;
- }
-
- @Override
- public String getHashId() {
- return hash;
- }
-
- @Override
- public void setHashId(String hashId) {
- hash = hashId;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public Long getDataSize() {
- return size;
- }
-
- @Override
- public void setDataSize(Long size) {
- this.size = size;
- }
-
- @Override
- public DriftFileStatus getStatus() {
- return status;
- }
-
- @Override
- public void setStatus(DriftFileStatus status) {
- this.status = status;
- }
-
- @Override
- public String toString() {
- return "DriftFile[hashId: " + hash + ", dataSize: " + size + ", status: " + status.ordinal() + "]";
- }
- }
-
-}
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 456c4a5..8d4cae4 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.drift.DriftManagerLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
@@ -107,6 +108,12 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
driftMgr.storeFiles(changeSetFilesZip);
}
+ @Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ DriftManagerLocal driftMgr = getDriftManager();
+ return driftMgr.createSnapshot(subject, criteria);
+ }
+
private DriftJPACriteria toJPACriteria(DriftCriteria criteria) {
DriftJPACriteria jpaCriteria = new DriftJPACriteria();
jpaCriteria.addFilterId(criteria.getFilterId());
commit b468967cf8d1436096ad63164fee480234d37f93
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 22:57:09 2011 -0400
First cut at createSnapshot method in DriftManagerBean
Also refactoring tests in server/jar to use the JPAUtils class for
resetting the db.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c03e3e6..bc8d26a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -38,24 +38,6 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
-// executeInTransaction(new TransactionCallback() {
-// @Override
-// public void execute() throws Exception {
-// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
-//
-// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
-// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
-// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
-// // native SQL to perform the delete on the join table rhq_drift_config_map.
-// //
-// // jsanda
-// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
-//
-// getEntityManager().createQuery("delete from Resource").executeUpdate();
-// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
-// }
-// });
-
executeInTransaction(new TransactionCallback() {
@Override
public void execute() throws Exception {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 65a6a55..4c669e7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -581,4 +581,17 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
throw new IllegalArgumentException("Entity Context Type not supported [" + context + "]");
}
}
+
+ @Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ // TODO security checks
+ Snapshot snapshot = new Snapshot();
+ PageList<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subject, criteria);
+
+ for (RhqDriftChangeSet changeSet : changeSets) {
+ snapshot.add(changeSet);
+ }
+
+ return snapshot;
+ }
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 4a30952..0fb077d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -177,7 +177,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @return
* @throws Exception
*/
- public RhqDriftFile persistDriftFile(RhqDriftFile driftFile) throws Exception;
+ RhqDriftFile persistDriftFile(RhqDriftFile driftFile) throws Exception;
/**
* SUPPORTS DRIFT RHQ SERVER PLUGIN
@@ -185,6 +185,8 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param data
* @throws Exception
*/
- public void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception;
+ void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception;
+
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index f1934d7..7ffacbf 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -1,7 +1,5 @@
package org.rhq.enterprise.server.resource.metadata;
-import static org.rhq.core.clientapi.shared.PluginDescriptorUtil.loadPluginDescriptor;
-
import java.io.File;
import java.net.URL;
import java.sql.Connection;
@@ -39,10 +37,17 @@ import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.util.LookupUtil;
+import static org.rhq.core.clientapi.shared.PluginDescriptorUtil.loadPluginDescriptor;
+
public class MetadataBeanTest extends AbstractEJB3Test {
private static List<String> plugins = new ArrayList<String>();
+ @Override
+ protected boolean isDBResetNeeded() {
+ return false;
+ }
+
@BeforeGroups(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
public void startMBeanServer() throws Exception {
setupDB();
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index ee2a45f..5ed329f 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -28,7 +28,6 @@ import javax.management.MBeanServerFactory;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
import javax.transaction.TransactionManager;
import org.hibernate.SessionFactory;
@@ -36,6 +35,7 @@ import org.hibernate.stat.Statistics;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
@@ -57,12 +57,28 @@ import org.rhq.enterprise.server.scheduler.SchedulerService;
import org.rhq.enterprise.server.scheduler.SchedulerServiceMBean;
import org.rhq.enterprise.server.util.LookupUtil;
+import static org.rhq.test.JPAUtils.clearDB;
+import static org.rhq.test.JPAUtils.lookupEntityManager;
+import static org.rhq.test.JPAUtils.lookupTransactionManager;
+
/**
* This is the abstract test base for server jar tests.
*
* @author Greg Hinkle
*/
public abstract class AbstractEJB3Test extends AssertJUnit {
+
+ @BeforeClass
+ public void resetDB() throws Exception {
+ if (isDBResetNeeded()) {
+ clearDB();
+ }
+ }
+
+ protected boolean isDBResetNeeded() {
+ return true;
+ }
+
//@BeforeSuite(groups = {"integration.ejb3","PERF"}) // TODO investigate again
@BeforeSuite(alwaysRun = true)
public static void startupEmbeddedJboss() throws Exception {
@@ -165,23 +181,11 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
private static Statistics stats;
public TransactionManager getTransactionManager() {
- try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
- return tm;
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load transaction manager", e);
- }
+ return lookupTransactionManager();
}
public static EntityManager getEntityManager() {
- try {
- return ((EntityManagerFactory) getInitialContext().lookup(RHQConstants.ENTITY_MANAGER_JNDI_NAME))
- .createEntityManager();
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load entity manager", e);
- }
+ return lookupEntityManager();
}
public static InitialContext getInitialContext() {
commit bc096cd1e17cbb3d2b3cbc1ce9733fd6243f97a5
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 21:38:07 2011 -0400
Initial commit for JPAUtils
Refactoring some methods in AbstractEJB3Test to delegate to JPAUtils
with the intent to eliminate duplicate code in core/domain and
server/jar tests. Most importantly though, the method clearDB is now
part of JPAUtils making it accessible to any test. This provides a much
more robust way of resetting the entire database to a known, consistent
state.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c9e61ef..c03e3e6 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -3,10 +3,6 @@ package org.rhq.core.domain.drift;
import java.util.HashSet;
import java.util.Set;
-import javax.persistence.EntityManager;
-import javax.transaction.SystemException;
-
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -16,6 +12,7 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.shared.ResourceBuilder;
import org.rhq.core.domain.test.AbstractEJB3Test;
+import org.rhq.test.TransactionCallback;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index aa6e0e0..dc5319a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -30,8 +30,6 @@ import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
@@ -42,6 +40,13 @@ import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
+import org.rhq.test.JPAUtils;
+import org.rhq.test.TransactionCallback;
+
+import static org.rhq.test.JPAUtils.clearDB;
+import static org.rhq.test.JPAUtils.lookupEntityManager;
+import static org.rhq.test.JPAUtils.lookupTransactionManager;
+
public abstract class AbstractEJB3Test extends AssertJUnit {
@BeforeClass
@@ -96,26 +101,12 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
EJB3StandaloneBootstrap.shutdown();
}
- private TransactionManager tm;
-
public TransactionManager getTransactionManager() {
- try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
- return tm;
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load transaction manager", e);
- }
+ return lookupTransactionManager();
}
public EntityManager getEntityManager() {
- try {
- return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
- .createEntityManager();
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load entity manager", e);
- }
+ return lookupEntityManager();
}
public boolean isPostgres(EntityManager em) throws Exception {
@@ -148,171 +139,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
protected void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
+ JPAUtils.executeInTransaction(callback);
}
- void clearDB() throws Exception {
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- EntityManager em = getEntityManager();
-
- em.createNativeQuery("delete from jms_subscriptions");
- em.createNativeQuery("delete from jms_roles");
- em.createNativeQuery("delete from jms_users");
- em.createNativeQuery("delete from jms_transactions");
- em.createNativeQuery("delete from jms_messages");
- em.createNativeQuery("delete from rhq_drift_config_map");
- em.createNativeQuery("delete from rhq_drift_template_map");
- em.createNativeQuery("delete from rhq_delete_res_hist");
- em.createNativeQuery("delete from rhq_create_res_hist");
- em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_map");
- em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
- em.createNativeQuery("delete from rhq_bundle_res_deploy");
- em.createNativeQuery("delete from rhq_bundle_deployment");
- em.createNativeQuery("delete from rhq_bundle_destination");
- em.createNativeQuery("delete from rhq_bundle_file");
- em.createNativeQuery("delete from rhq_bundle_version_repo");
- em.createNativeQuery("delete from rhq_bundle_version");
- em.createNativeQuery("delete from rhq_bundle");
- em.createNativeQuery("delete from rhq_bundle_type");
- em.createNativeQuery("delete from rhq_repo_advisory");
- em.createNativeQuery("delete from rhq_advisory_buglist");
- em.createNativeQuery("delete from rhq_advisory_cve");
- em.createNativeQuery("delete from rhq_cve");
- em.createNativeQuery("delete from rhq_advisory_package");
- em.createNativeQuery("delete from rhq_advisory");
- em.createNativeQuery("delete from rhq_distribution_file");
- em.createNativeQuery("delete from rhq_repo_distribution");
- em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_pkg_prd_map");
- em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
- em.createNativeQuery("delete from rhq_repo_pkg_version_map");
- em.createNativeQuery("delete from rhq_repo_repo_relation_map");
- em.createNativeQuery("delete from rhq_repo_repo_group_map");
- em.createNativeQuery("delete from rhq_repo_content_src_map");
- em.createNativeQuery("delete from rhq_repo_resource_map");
- em.createNativeQuery("delete from rhq_package_inst_step");
- em.createNativeQuery("delete from rhq_repo_sync");
- em.createNativeQuery("delete from rhq_content_src_sync");
- em.createNativeQuery("delete from rhq_installed_pkg_hist");
- em.createNativeQuery("delete from rhq_installed_package");
- em.createNativeQuery("delete from rhq_content_req");
- em.createNativeQuery("delete from rhq_package_version");
- em.createNativeQuery("delete from rhq_package_bits");
- em.createNativeQuery("delete from rhq_package");
- em.createNativeQuery("delete from rhq_package_type");
- em.createNativeQuery("delete from rhq_repo_relation");
- em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_repo");
- em.createNativeQuery("delete from rhq_repo_group");
- em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
- em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
- em.createNativeQuery("delete from rhq_meas_data_num_r14");
- em.createNativeQuery("delete from rhq_meas_data_num_r13");
- em.createNativeQuery("delete from rhq_meas_data_num_r12");
- em.createNativeQuery("delete from rhq_meas_data_num_r11");
- em.createNativeQuery("delete from rhq_meas_data_num_r10");
- em.createNativeQuery("delete from rhq_meas_data_num_r09");
- em.createNativeQuery("delete from rhq_meas_data_num_r08");
- em.createNativeQuery("delete from rhq_meas_data_num_r07");
- em.createNativeQuery("delete from rhq_meas_data_num_r06");
- em.createNativeQuery("delete from rhq_meas_data_num_r05");
- em.createNativeQuery("delete from rhq_meas_data_num_r04");
- em.createNativeQuery("delete from rhq_meas_data_num_r03");
- em.createNativeQuery("delete from rhq_meas_data_num_r02");
- em.createNativeQuery("delete from rhq_meas_data_num_r01");
- em.createNativeQuery("delete from rhq_meas_data_num_r00");
- em.createNativeQuery("delete from rhq_measurement_oob_tmp");
- em.createNativeQuery("delete rhq_measurement_oob");
- em.createNativeQuery("delete rhq_resource_avail");
- em.createNativeQuery("delete from rhq_availability");
- em.createNativeQuery("delete from rhq_calltime_data_value");
- em.createNativeQuery("delete from rhq_calltime_data_key");
- em.createNativeQuery("delete from rhq_measurement_data_trait");
- em.createNativeQuery("delete from rhq_measurement_data_num_1d");
- em.createNativeQuery("delete from rhq_measurement_data_num_6h");
- em.createNativeQuery("delete from rhq_measurement_data_num_1h");
- em.createNativeQuery("delete from rhq_measurement_bline");
- em.createNativeQuery("delete from rhq_measurement_sched");
- em.createNativeQuery("delete from rhq_measurement_def");
- em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
- em.createNativeQuery("delete from rhq_alert_notification");
- em.createNativeQuery("delete from rhq_alert_condition_log");
- em.createNativeQuery("delete from rhq_alert");
- em.createNativeQuery("delete from rhq_alert_condition");
- em.createNativeQuery("delete from rhq_alert_dampen_event");
- em.createNativeQuery("delete from rhq_alert_definition");
- em.createNativeQuery("delete from rhq_event");
- em.createNativeQuery("delete from rhq_event_source");
- em.createNativeQuery("delete from rhq_event_def");
- em.createNativeQuery("delete from rhq_operation_schedule");
- em.createNativeQuery("delete from rhq_operation_history");
- em.createNativeQuery("delete from rhq_operation_def");
- em.createNativeQuery("delete from rhq_dashboard_portlet");
- em.createNativeQuery("delete from rhq_dashboard");
- em.createNativeQuery("delete from rhq_saved_search");
- em.createNativeQuery("delete from rhq_subject_role_ldap_map");
- em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
- em.createNativeQuery("delete from rhq_role_ldap_group");
- em.createNativeQuery("delete from rhq_role_resource_group_map");
- em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_tagging_res_group_map");
- em.createNativeQuery("delete from rhq_tagging_resource_map");
- em.createNativeQuery("delete from rhq_tagging");
- em.createNativeQuery("delete from rhq_config_update");
- em.createNativeQuery("delete from rhq_config_group_update");
- em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
- em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
- em.createNativeQuery("delete from rhq_resource_group");
- em.createNativeQuery("delete from rhq_group_def");
- em.createNativeQuery("delete from rhq_resource_error");
- em.createNativeQuery("delete from rhq_resource");
- em.createNativeQuery("delete from rhq_prd_ver");
- em.createNativeQuery("delete from rhq_process_scan");
- em.createNativeQuery("delete from rhq_resource_type_parents");
- em.createNativeQuery("delete from rhq_resource_subcat");
- em.createNativeQuery("delete from rhq_resource_type");
- em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_principal where id <> 2");
- em.createNativeQuery("delete from rhq_failover_details");
- em.createNativeQuery("delete from rhq_failover_list");
- em.createNativeQuery("delete from rhq_partition_details");
- em.createNativeQuery("delete from rhq_partition_event");
- em.createNativeQuery("delete from rhq_agent");
- em.createNativeQuery("delete from rhq_server");
- em.createNativeQuery("delete from rhq_affinity_group");
- em.createNativeQuery("delete from rhq_raw_config");
- em.createNativeQuery("delete from rhq_config_template");
- em.createNativeQuery("delete from rhq_config_property");
- em.createNativeQuery("delete from rhq_config");
- em.createNativeQuery("delete from rhq_config_prop_constr");
- em.createNativeQuery("delete from rhq_conf_prop_def_enum");
- em.createNativeQuery("delete from rhq_config_pd_osrc");
- em.createNativeQuery("delete from rhq_config_prop_def");
- em.createNativeQuery("delete from rhq_config_prop_grp_def");
- em.createNativeQuery("delete from rhq_config_def");
- }
- });
- }
-
- public static interface TransactionCallback {
- void execute() throws Exception;
- }
}
\ No newline at end of file
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 3ed6856..5c6e85c 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -15,6 +15,16 @@
<dependencies>
<dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
new file mode 100644
index 0000000..349b84c
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -0,0 +1,207 @@
+package org.rhq.test;
+
+import java.util.Hashtable;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+
+public class JPAUtils {
+
+ public static InitialContext getInitialContext() {
+ Hashtable<String, String> env = new Hashtable<String, String>();
+ env.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
+ env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ try {
+ return new InitialContext(env);
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load initial context", e);
+ }
+ }
+
+ public static EntityManager lookupEntityManager() {
+ try {
+ return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
+ .createEntityManager();
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load entity manager", e);
+ }
+ }
+
+ public static TransactionManager lookupTransactionManager() {
+ try {
+ return (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load transaction manager", e);
+ }
+ }
+
+ public static void executeInTransaction(TransactionCallback callback) {
+ try {
+ lookupTransactionManager().begin();
+ callback.execute();
+ lookupTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ lookupTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
+ }
+
+ public static void clearDB() {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ EntityManager em = lookupEntityManager();
+
+ em.createNativeQuery("delete from jms_subscriptions");
+ em.createNativeQuery("delete from jms_roles");
+ em.createNativeQuery("delete from jms_users");
+ em.createNativeQuery("delete from jms_transactions");
+ em.createNativeQuery("delete from jms_messages");
+ em.createNativeQuery("delete from rhq_drift_config_map");
+ em.createNativeQuery("delete from rhq_drift_template_map");
+ em.createNativeQuery("delete from rhq_delete_res_hist");
+ em.createNativeQuery("delete from rhq_create_res_hist");
+ em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_map");
+ em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
+ em.createNativeQuery("delete from rhq_bundle_res_deploy");
+ em.createNativeQuery("delete from rhq_bundle_deployment");
+ em.createNativeQuery("delete from rhq_bundle_destination");
+ em.createNativeQuery("delete from rhq_bundle_file");
+ em.createNativeQuery("delete from rhq_bundle_version_repo");
+ em.createNativeQuery("delete from rhq_bundle_version");
+ em.createNativeQuery("delete from rhq_bundle");
+ em.createNativeQuery("delete from rhq_bundle_type");
+ em.createNativeQuery("delete from rhq_repo_advisory");
+ em.createNativeQuery("delete from rhq_advisory_buglist");
+ em.createNativeQuery("delete from rhq_advisory_cve");
+ em.createNativeQuery("delete from rhq_cve");
+ em.createNativeQuery("delete from rhq_advisory_package");
+ em.createNativeQuery("delete from rhq_advisory");
+ em.createNativeQuery("delete from rhq_distribution_file");
+ em.createNativeQuery("delete from rhq_repo_distribution");
+ em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_pkg_prd_map");
+ em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_pkg_version_map");
+ em.createNativeQuery("delete from rhq_repo_repo_relation_map");
+ em.createNativeQuery("delete from rhq_repo_repo_group_map");
+ em.createNativeQuery("delete from rhq_repo_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_resource_map");
+ em.createNativeQuery("delete from rhq_package_inst_step");
+ em.createNativeQuery("delete from rhq_repo_sync");
+ em.createNativeQuery("delete from rhq_content_src_sync");
+ em.createNativeQuery("delete from rhq_installed_pkg_hist");
+ em.createNativeQuery("delete from rhq_installed_package");
+ em.createNativeQuery("delete from rhq_content_req");
+ em.createNativeQuery("delete from rhq_package_version");
+ em.createNativeQuery("delete from rhq_package_bits");
+ em.createNativeQuery("delete from rhq_package");
+ em.createNativeQuery("delete from rhq_package_type");
+ em.createNativeQuery("delete from rhq_repo_relation");
+ em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_repo");
+ em.createNativeQuery("delete from rhq_repo_group");
+ em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
+ em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
+ em.createNativeQuery("delete from rhq_meas_data_num_r14");
+ em.createNativeQuery("delete from rhq_meas_data_num_r13");
+ em.createNativeQuery("delete from rhq_meas_data_num_r12");
+ em.createNativeQuery("delete from rhq_meas_data_num_r11");
+ em.createNativeQuery("delete from rhq_meas_data_num_r10");
+ em.createNativeQuery("delete from rhq_meas_data_num_r09");
+ em.createNativeQuery("delete from rhq_meas_data_num_r08");
+ em.createNativeQuery("delete from rhq_meas_data_num_r07");
+ em.createNativeQuery("delete from rhq_meas_data_num_r06");
+ em.createNativeQuery("delete from rhq_meas_data_num_r05");
+ em.createNativeQuery("delete from rhq_meas_data_num_r04");
+ em.createNativeQuery("delete from rhq_meas_data_num_r03");
+ em.createNativeQuery("delete from rhq_meas_data_num_r02");
+ em.createNativeQuery("delete from rhq_meas_data_num_r01");
+ em.createNativeQuery("delete from rhq_meas_data_num_r00");
+ em.createNativeQuery("delete from rhq_measurement_oob_tmp");
+ em.createNativeQuery("delete rhq_measurement_oob");
+ em.createNativeQuery("delete rhq_resource_avail");
+ em.createNativeQuery("delete from rhq_availability");
+ em.createNativeQuery("delete from rhq_calltime_data_value");
+ em.createNativeQuery("delete from rhq_calltime_data_key");
+ em.createNativeQuery("delete from rhq_measurement_data_trait");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1d");
+ em.createNativeQuery("delete from rhq_measurement_data_num_6h");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1h");
+ em.createNativeQuery("delete from rhq_measurement_bline");
+ em.createNativeQuery("delete from rhq_measurement_sched");
+ em.createNativeQuery("delete from rhq_measurement_def");
+ em.createNativeQuery("delete from rhq_plugin");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_alert_notification");
+ em.createNativeQuery("delete from rhq_alert_condition_log");
+ em.createNativeQuery("delete from rhq_alert");
+ em.createNativeQuery("delete from rhq_alert_condition");
+ em.createNativeQuery("delete from rhq_alert_dampen_event");
+ em.createNativeQuery("delete from rhq_alert_definition");
+ em.createNativeQuery("delete from rhq_event");
+ em.createNativeQuery("delete from rhq_event_source");
+ em.createNativeQuery("delete from rhq_event_def");
+ em.createNativeQuery("delete from rhq_operation_schedule");
+ em.createNativeQuery("delete from rhq_operation_history");
+ em.createNativeQuery("delete from rhq_operation_def");
+ em.createNativeQuery("delete from rhq_dashboard_portlet");
+ em.createNativeQuery("delete from rhq_dashboard");
+ em.createNativeQuery("delete from rhq_saved_search");
+ em.createNativeQuery("delete from rhq_subject_role_ldap_map");
+ em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_role_ldap_group");
+ em.createNativeQuery("delete from rhq_role_resource_group_map");
+ em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_tagging_res_group_map");
+ em.createNativeQuery("delete from rhq_tagging_resource_map");
+ em.createNativeQuery("delete from rhq_tagging");
+ em.createNativeQuery("delete from rhq_config_update");
+ em.createNativeQuery("delete from rhq_config_group_update");
+ em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
+ em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
+ em.createNativeQuery("delete from rhq_resource_group");
+ em.createNativeQuery("delete from rhq_group_def");
+ em.createNativeQuery("delete from rhq_resource_error");
+ em.createNativeQuery("delete from rhq_resource");
+ em.createNativeQuery("delete from rhq_prd_ver");
+ em.createNativeQuery("delete from rhq_process_scan");
+ em.createNativeQuery("delete from rhq_resource_type_parents");
+ em.createNativeQuery("delete from rhq_resource_subcat");
+ em.createNativeQuery("delete from rhq_resource_type");
+ em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_principal where id <> 2");
+ em.createNativeQuery("delete from rhq_failover_details");
+ em.createNativeQuery("delete from rhq_failover_list");
+ em.createNativeQuery("delete from rhq_partition_details");
+ em.createNativeQuery("delete from rhq_partition_event");
+ em.createNativeQuery("delete from rhq_agent");
+ em.createNativeQuery("delete from rhq_server");
+ em.createNativeQuery("delete from rhq_affinity_group");
+ em.createNativeQuery("delete from rhq_raw_config");
+ em.createNativeQuery("delete from rhq_config_template");
+ em.createNativeQuery("delete from rhq_config_property");
+ em.createNativeQuery("delete from rhq_config");
+ em.createNativeQuery("delete from rhq_config_prop_constr");
+ em.createNativeQuery("delete from rhq_conf_prop_def_enum");
+ em.createNativeQuery("delete from rhq_config_pd_osrc");
+ em.createNativeQuery("delete from rhq_config_prop_def");
+ em.createNativeQuery("delete from rhq_config_prop_grp_def");
+ em.createNativeQuery("delete from rhq_config_def");
+ }
+ });
+ }
+
+}
diff --git a/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java b/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java
new file mode 100644
index 0000000..711df43
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java
@@ -0,0 +1,7 @@
+package org.rhq.test;
+
+public interface TransactionCallback {
+
+ void execute() throws Exception;
+
+}
commit ccf7dad401703bf3ea4fcbc2800053988a73ef62
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 07:09:35 2011 -0400
Adding support for version and date ranges in DriftChangeSetCriteria
Version and/or date ranges are needed in order to fetch multiple change
sets to build a snapshot. This commit also includes new set up code in
the base test class AbstractEJB3Test. It clears all database tables
which should be more robust than the approach taken with dbunit.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 6ba63df..1b3effc 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -15,6 +15,22 @@ public interface DriftChangeSetCriteria extends Serializable {
String getFilterVersion();
+ void addFilterStartVersion(String filterStartVersion);
+
+ String getFilterStartVersion();
+
+ void addFilterEndVersion(String filterEndVersion);
+
+ String getFilterEndVersion();
+
+ void addFilterCreatedAfter(Long filterCreatedAfter);
+
+ Long getFilterCreatedAfter();
+
+ void addFilterCreatedBefore(Long filterCreatedBefore);
+
+ Long getFilterCreatedBefore();
+
void addFilterResourceId(Integer filterResourceId);
Integer getFilterResourceId();
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
index 9b39cc3..6c17877 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
@@ -40,6 +40,10 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
private Integer filterInitial; // needs override
private Integer filterResourceId; // needs override
private String filterVersion;
+ private String filterStartVersion;
+ private String filterEndVersion;
+ private Long filterCreatedAfter;
+ private Long filterCreatedBefore;
private DriftChangeSetCategory filterCategory;
private boolean fetchDrifts;
@@ -48,6 +52,10 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
public DriftChangeSetJPACriteria() {
filterOverrides.put("initial", "version = 0");
filterOverrides.put("resourceId", "resource.id = ?");
+ filterOverrides.put("filterStartVersion", "version >= ?");
+ filterOverrides.put("filterEndVersion", "version <= ?");
+ filterOverrides.put("filterCreatedAfter", "ctime >= ?");
+ filterOverrides.put("filterCreatedBefore", "ctime <= ?");
}
@Override
@@ -75,6 +83,46 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
return filterVersion;
}
+ @Override
+ public void addFilterStartVersion(String filterStartVersion) {
+ this.filterStartVersion = filterStartVersion;
+ }
+
+ @Override
+ public String getFilterStartVersion() {
+ return filterStartVersion;
+ }
+
+ @Override
+ public void addFilterEndVersion(String filterEndVersion) {
+ this.filterEndVersion = filterEndVersion;
+ }
+
+ @Override
+ public String getFilterEndVersion() {
+ return filterEndVersion;
+ }
+
+ @Override
+ public void addFilterCreatedAfter(Long filterCreatedAfter) {
+ this.filterCreatedAfter = filterCreatedAfter;
+ }
+
+ @Override
+ public Long getFilterCreatedAfter() {
+ return filterCreatedAfter;
+ }
+
+ @Override
+ public void addFilterCreatedBefore(Long filterCreatedBefore) {
+ this.filterCreatedBefore = filterCreatedBefore;
+ }
+
+ @Override
+ public Long getFilterCreatedBefore() {
+ return filterCreatedBefore;
+ }
+
public void addFilterResourceId(Integer filterResourceId) {
this.filterResourceId = filterResourceId;
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index abc300d..c9e61ef 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -1,11 +1,12 @@
package org.rhq.core.domain.drift;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
+import javax.persistence.EntityManager;
import javax.transaction.SystemException;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -20,10 +21,6 @@ import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
public class RhqDriftChangeSetTest extends AbstractEJB3Test {
- static interface TransactionCallback {
- void execute() throws Exception;
- }
-
Resource resource;
DriftConfiguration driftConfig;
@@ -44,23 +41,23 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
-
- // Cascading deletes for Resource.driftConfigurations does not work, nor does it
- // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
- // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
- // native SQL to perform the delete on the join table rhq_drift_config_map.
- //
- // jsanda
- getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
-
- getEntityManager().createQuery("delete from Resource").executeUpdate();
- getEntityManager().createQuery("delete from ResourceType").executeUpdate();
- }
- });
+// executeInTransaction(new TransactionCallback() {
+// @Override
+// public void execute() throws Exception {
+// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
+//
+// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
+// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
+// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
+// // native SQL to perform the delete on the join table rhq_drift_config_map.
+// //
+// // jsanda
+// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
+//
+// getEntityManager().createQuery("delete from Resource").executeUpdate();
+// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
+// }
+// });
executeInTransaction(new TransactionCallback() {
@Override
@@ -115,19 +112,4 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
});
}
- void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
- }
-
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 57ec318..aa6e0e0 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -31,20 +31,26 @@ import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
+import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterGroups;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
public abstract class AbstractEJB3Test extends AssertJUnit {
-// @BeforeSuite(groups = "integration.ejb3")
- @BeforeGroups(groups = "integration.ejb3")
+
+ @BeforeClass
+ public void resetDB() throws Exception {
+ clearDB();
+ }
+
+ @BeforeSuite(groups = "integration.ejb3")
+ //@BeforeGroups(groups = "integration.ejb3")
public static void startupEmbeddedJboss() {
System.out.println("Starting ejb3...");
String classesDir = System.getProperty("ejbjarDirectory", "target/classes");
@@ -140,4 +146,173 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
referenceTime += offset;
return new Date(referenceTime);
}
+
+ protected void executeInTransaction(TransactionCallback callback) {
+ try {
+ getTransactionManager().begin();
+ callback.execute();
+ getTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ getTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
+ }
+
+ void clearDB() throws Exception {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ EntityManager em = getEntityManager();
+
+ em.createNativeQuery("delete from jms_subscriptions");
+ em.createNativeQuery("delete from jms_roles");
+ em.createNativeQuery("delete from jms_users");
+ em.createNativeQuery("delete from jms_transactions");
+ em.createNativeQuery("delete from jms_messages");
+ em.createNativeQuery("delete from rhq_drift_config_map");
+ em.createNativeQuery("delete from rhq_drift_template_map");
+ em.createNativeQuery("delete from rhq_delete_res_hist");
+ em.createNativeQuery("delete from rhq_create_res_hist");
+ em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_map");
+ em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
+ em.createNativeQuery("delete from rhq_bundle_res_deploy");
+ em.createNativeQuery("delete from rhq_bundle_deployment");
+ em.createNativeQuery("delete from rhq_bundle_destination");
+ em.createNativeQuery("delete from rhq_bundle_file");
+ em.createNativeQuery("delete from rhq_bundle_version_repo");
+ em.createNativeQuery("delete from rhq_bundle_version");
+ em.createNativeQuery("delete from rhq_bundle");
+ em.createNativeQuery("delete from rhq_bundle_type");
+ em.createNativeQuery("delete from rhq_repo_advisory");
+ em.createNativeQuery("delete from rhq_advisory_buglist");
+ em.createNativeQuery("delete from rhq_advisory_cve");
+ em.createNativeQuery("delete from rhq_cve");
+ em.createNativeQuery("delete from rhq_advisory_package");
+ em.createNativeQuery("delete from rhq_advisory");
+ em.createNativeQuery("delete from rhq_distribution_file");
+ em.createNativeQuery("delete from rhq_repo_distribution");
+ em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_pkg_prd_map");
+ em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_pkg_version_map");
+ em.createNativeQuery("delete from rhq_repo_repo_relation_map");
+ em.createNativeQuery("delete from rhq_repo_repo_group_map");
+ em.createNativeQuery("delete from rhq_repo_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_resource_map");
+ em.createNativeQuery("delete from rhq_package_inst_step");
+ em.createNativeQuery("delete from rhq_repo_sync");
+ em.createNativeQuery("delete from rhq_content_src_sync");
+ em.createNativeQuery("delete from rhq_installed_pkg_hist");
+ em.createNativeQuery("delete from rhq_installed_package");
+ em.createNativeQuery("delete from rhq_content_req");
+ em.createNativeQuery("delete from rhq_package_version");
+ em.createNativeQuery("delete from rhq_package_bits");
+ em.createNativeQuery("delete from rhq_package");
+ em.createNativeQuery("delete from rhq_package_type");
+ em.createNativeQuery("delete from rhq_repo_relation");
+ em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_repo");
+ em.createNativeQuery("delete from rhq_repo_group");
+ em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
+ em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
+ em.createNativeQuery("delete from rhq_meas_data_num_r14");
+ em.createNativeQuery("delete from rhq_meas_data_num_r13");
+ em.createNativeQuery("delete from rhq_meas_data_num_r12");
+ em.createNativeQuery("delete from rhq_meas_data_num_r11");
+ em.createNativeQuery("delete from rhq_meas_data_num_r10");
+ em.createNativeQuery("delete from rhq_meas_data_num_r09");
+ em.createNativeQuery("delete from rhq_meas_data_num_r08");
+ em.createNativeQuery("delete from rhq_meas_data_num_r07");
+ em.createNativeQuery("delete from rhq_meas_data_num_r06");
+ em.createNativeQuery("delete from rhq_meas_data_num_r05");
+ em.createNativeQuery("delete from rhq_meas_data_num_r04");
+ em.createNativeQuery("delete from rhq_meas_data_num_r03");
+ em.createNativeQuery("delete from rhq_meas_data_num_r02");
+ em.createNativeQuery("delete from rhq_meas_data_num_r01");
+ em.createNativeQuery("delete from rhq_meas_data_num_r00");
+ em.createNativeQuery("delete from rhq_measurement_oob_tmp");
+ em.createNativeQuery("delete rhq_measurement_oob");
+ em.createNativeQuery("delete rhq_resource_avail");
+ em.createNativeQuery("delete from rhq_availability");
+ em.createNativeQuery("delete from rhq_calltime_data_value");
+ em.createNativeQuery("delete from rhq_calltime_data_key");
+ em.createNativeQuery("delete from rhq_measurement_data_trait");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1d");
+ em.createNativeQuery("delete from rhq_measurement_data_num_6h");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1h");
+ em.createNativeQuery("delete from rhq_measurement_bline");
+ em.createNativeQuery("delete from rhq_measurement_sched");
+ em.createNativeQuery("delete from rhq_measurement_def");
+ em.createNativeQuery("delete from rhq_plugin");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_alert_notification");
+ em.createNativeQuery("delete from rhq_alert_condition_log");
+ em.createNativeQuery("delete from rhq_alert");
+ em.createNativeQuery("delete from rhq_alert_condition");
+ em.createNativeQuery("delete from rhq_alert_dampen_event");
+ em.createNativeQuery("delete from rhq_alert_definition");
+ em.createNativeQuery("delete from rhq_event");
+ em.createNativeQuery("delete from rhq_event_source");
+ em.createNativeQuery("delete from rhq_event_def");
+ em.createNativeQuery("delete from rhq_operation_schedule");
+ em.createNativeQuery("delete from rhq_operation_history");
+ em.createNativeQuery("delete from rhq_operation_def");
+ em.createNativeQuery("delete from rhq_dashboard_portlet");
+ em.createNativeQuery("delete from rhq_dashboard");
+ em.createNativeQuery("delete from rhq_saved_search");
+ em.createNativeQuery("delete from rhq_subject_role_ldap_map");
+ em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_role_ldap_group");
+ em.createNativeQuery("delete from rhq_role_resource_group_map");
+ em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_tagging_res_group_map");
+ em.createNativeQuery("delete from rhq_tagging_resource_map");
+ em.createNativeQuery("delete from rhq_tagging");
+ em.createNativeQuery("delete from rhq_config_update");
+ em.createNativeQuery("delete from rhq_config_group_update");
+ em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
+ em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
+ em.createNativeQuery("delete from rhq_resource_group");
+ em.createNativeQuery("delete from rhq_group_def");
+ em.createNativeQuery("delete from rhq_resource_error");
+ em.createNativeQuery("delete from rhq_resource");
+ em.createNativeQuery("delete from rhq_prd_ver");
+ em.createNativeQuery("delete from rhq_process_scan");
+ em.createNativeQuery("delete from rhq_resource_type_parents");
+ em.createNativeQuery("delete from rhq_resource_subcat");
+ em.createNativeQuery("delete from rhq_resource_type");
+ em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_principal where id <> 2");
+ em.createNativeQuery("delete from rhq_failover_details");
+ em.createNativeQuery("delete from rhq_failover_list");
+ em.createNativeQuery("delete from rhq_partition_details");
+ em.createNativeQuery("delete from rhq_partition_event");
+ em.createNativeQuery("delete from rhq_agent");
+ em.createNativeQuery("delete from rhq_server");
+ em.createNativeQuery("delete from rhq_affinity_group");
+ em.createNativeQuery("delete from rhq_raw_config");
+ em.createNativeQuery("delete from rhq_config_template");
+ em.createNativeQuery("delete from rhq_config_property");
+ em.createNativeQuery("delete from rhq_config");
+ em.createNativeQuery("delete from rhq_config_prop_constr");
+ em.createNativeQuery("delete from rhq_conf_prop_def_enum");
+ em.createNativeQuery("delete from rhq_config_pd_osrc");
+ em.createNativeQuery("delete from rhq_config_prop_def");
+ em.createNativeQuery("delete from rhq_config_prop_grp_def");
+ em.createNativeQuery("delete from rhq_config_def");
+ }
+ });
+ }
+
+ public static interface TransactionCallback {
+ void execute() throws Exception;
+ }
}
\ No newline at end of file
commit 64fc9eabcd406ed63230444d2e85d70c00244fb6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 22 16:09:08 2011 -0400
stub out the new drift change sets subtab
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
new file mode 100644
index 0000000..f610b8b
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -0,0 +1,48 @@
+/*
+ * 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.enterprise.gui.coregui.client.drift;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * A view that displays a tree of all change sets and their related drift trails.
+ *
+ * @author John Mazzitelli
+ */
+public class DriftChangeSetsView extends LocatableVLayout {
+
+ private EntityContext context;
+ private boolean hasWriteAccess;
+
+ protected DriftChangeSetsView(String locatorId, String tableTitle, EntityContext context, boolean hasWriteAccess) {
+ super(locatorId);
+ this.context = context;
+ this.hasWriteAccess = hasWriteAccess;
+ }
+
+ public EntityContext getContext() {
+ return context;
+ }
+
+ protected boolean hasWriteAccess() {
+ return this.hasWriteAccess;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java
new file mode 100644
index 0000000..ab54e88
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java
@@ -0,0 +1,40 @@
+/*
+ * 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.enterprise.gui.coregui.client.drift;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsView extends DriftChangeSetsView {
+ public static ResourceDriftChangeSetsView get(String locatorId, ResourceComposite composite) {
+ String tableTitle = MSG.view_drift_changeSets_resourceViewTitle();
+ EntityContext context = EntityContext.forResource(composite.getResource().getId());
+ boolean hasWriteAccess = composite.getResourcePermission().isDrift();
+ return new ResourceDriftChangeSetsView(locatorId, tableTitle, context, hasWriteAccess);
+ }
+
+ private ResourceDriftChangeSetsView(String locatorId, String tableTitle, EntityContext context,
+ boolean hasWriteAccess) {
+ super(locatorId, tableTitle, context, hasWriteAccess);
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index b8031ea..4efc189 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -50,6 +50,7 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.SubTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewFactory;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftChangeSetsView;
import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftConfigurationView;
import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftHistoryView;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -98,6 +99,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
public static class DriftSubTab {
public static final String CONFIGURATION = "Configuration";
public static final String HISTORY = "History";
+ public static final String CHANGE_SETS = "ChangeSets";
}
public static class OperationsSubTab {
@@ -143,6 +145,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
private SubTab configHistory;
private SubTab eventHistory;
private SubTab driftHistory;
+ private SubTab driftChangeSets;
private SubTab driftConfig;
private SubTab contentDeployed;
private SubTab contentNew;
@@ -242,9 +245,11 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
MSG.view_tabs_common_history()), null);
+ this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
+ DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftHistory, driftConfig);
+ driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -521,6 +526,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
}
});
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ @Override
+ public Canvas createView() {
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ }
+ });
+
updateSubTab(this.driftTab, this.driftConfig, true, true, new ViewFactory() {
@Override
public Canvas createView() {
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 354e504..c7d6f91 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1121,6 +1121,8 @@ view_drift_button_detectNow = Detect Now
view_drift_category_fileAdded = File Added
view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
+view_drift_changeSets = Change Sets
+view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index f117bdf..5fe14aa 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -939,6 +939,8 @@ view_dashboards_title = Dashboard
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
##view_drift_category_fileRemoved = File Removed
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index f343153..6bce847 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1104,6 +1104,8 @@ view_dashboards_portlets_refresh_success1 = ポートレットの自動リフレ
view_dashboards_portlets_refresh_success2 = 自動リフレッシュするポートレットのリロードを停止しています
view_dashboards_title = ダッシュボード
##view_drift = Drift
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 516f235..bd2b6fb 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1139,6 +1139,8 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
##view_drift_category_fileRemoved = File Removed
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index bcac425..9fa9115 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1113,6 +1113,8 @@ view_dashboards_portlets_refresh_success1 = \u6210\u529f\u4fee\u6539portlets\u81
view_dashboards_portlets_refresh_success2 = \u6210\u529f\u505c\u7528portlets\u81ea\u52a8\u5237\u65b0\u7684\u91cd\u8f7d
view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
commit 1ea599c35ea9377818a0424c6eae32ab00f56a22
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 22 14:17:26 2011 -0400
tell eclipse that some source is now in the filtered sources location
diff --git a/.classpath b/.classpath
index c263ab4..d5bec34 100644
--- a/.classpath
+++ b/.classpath
@@ -154,6 +154,7 @@
<classpathentry kind="src" path="modules/enterprise/server/xml-schemas/target/generated-sources/xjc"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/src/test/java"/>
+ <classpathentry kind="src" path="modules/enterprise/server/jar/src/main/filtered-sources/java"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/target/generated-sources/antlr3"/>
<classpathentry kind="src" path="modules/enterprise/binding/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/gui/coregui/src/main/java"/>
commit a9f16e8f23c3f52d8529217f533d2b07b02a117f
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 22 13:24:06 2011 -0400
Do not upload large amounts of data to the db for unit tests
We will however want to test uploading large and very large files in a
separate test suite.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
index b22ac84..05757a7 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
@@ -96,11 +96,11 @@ public class DriftFileTest extends AbstractEJB3Test {
// running and should be moved to an integration test suite.
@Test(groups = { "integration.ejb3", "driftFile" })
public void loadMultipleDriftFilesWithoutLoadingData() throws Exception {
- int numDriftFiles = 10;
+ int numDriftFiles = 3;
final List<String> driftFileHashIds = new ArrayList<String>();
for (int i = 0; i < numDriftFiles; ++i) {
- File dataFile = createDataFile("test_data.txt", 10, (char) ('a' + i));
+ File dataFile = createDataFile("test_data.txt", 1, (char) ('a' + i));
final DriftFileBits driftFile = new DriftFileBits();
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
commit b5cbc3b24e932325ba55dafac974d3a7b4dab5b9
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 22 13:22:56 2011 -0400
Adding support for generating snapshot diffs
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
new file mode 100644
index 0000000..89f3286
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.enterprise.server.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
index 2efc8d8..5dc18fa 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -1,12 +1,13 @@
package org.rhq.enterprise.server.drift;
import java.io.Serializable;
-import java.util.Comparator;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftFile;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -16,30 +17,56 @@ public class Snapshot implements Serializable {
private int version;
- private Set<Drift> entries = new TreeSet<Drift>(new Comparator<Drift>() {
- @Override
- public int compare(Drift d1, Drift d2) {
- return d1.getPath().compareTo(d2.getPath());
- }
- });
+ private Map<String, Drift> entries = new TreeMap<String, Drift>();
public int getVersion() {
return version;
}
- public Set<Drift> getEntries() {
- return entries;
+ public Collection<Drift> getEntries() {
+ return entries.values();
}
public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry);
+ entries.remove(entry.getPath());
if (entry.getCategory() != FILE_REMOVED) {
- entries.add(entry);
+ entries.put(entry.getPath(), entry);
}
}
version = changeSet.getVersion();
return this;
}
+ public DiffReport diff(Snapshot right) {
+ Snapshot left = this;
+ DiffReport<Drift> diff = new DiffReport<Drift>();
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ Drift rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
index b646b19..47dbb73 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
@@ -12,6 +12,7 @@ import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
+import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -87,6 +88,60 @@ public class SnapshotTest {
"removed.");
}
+ @Test
+ public void diffShowsEntriesInLeftAndNotInRight() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
+ }
+
+ @Test
+ public void diffShowsEntriesInRightAndNotInLeft() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
+ "elements that are in the left but not in the right");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
+ }
+
<E> Set<E> asSet(E... elements) {
HashSet<E> set = new HashSet<E>();
for (E element : elements) {
commit 2f88f1db6226746b6c6c543db39802b884c43b1c
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 22:03:41 2011 -0400
Adding logic for removing files from a snapshot
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
index 35a4669..2efc8d8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -1,5 +1,6 @@
package org.rhq.enterprise.server.drift;
+import java.io.Serializable;
import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;
@@ -7,7 +8,11 @@ import java.util.TreeSet;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
-public class Snapshot {
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+public class Snapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
private int version;
@@ -29,7 +34,9 @@ public class Snapshot {
public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
for (Drift entry : changeSet.getDrifts()) {
entries.remove(entry);
- entries.add(entry);
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.add(entry);
+ }
}
version = changeSet.getVersion();
return this;
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
index 627bc2c..b646b19 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
@@ -14,6 +14,7 @@ import org.rhq.core.domain.drift.DriftFileStatus;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
@@ -23,7 +24,7 @@ import static org.testng.Assert.assertEquals;
public class SnapshotTest {
@Test
- public void generateSnapshotForOneChangeSet() throws Exception {
+ public void addChangeSetWithAddedFile() {
int configId = 1;
FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
@@ -37,7 +38,7 @@ public class SnapshotTest {
}
@Test
- public void generateSnapshotWithTwoChangeSetsAndFileAdded() {
+ public void addChangeSetsWithAddedFiles() {
int configId = 1;
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
@@ -54,7 +55,7 @@ public class SnapshotTest {
}
@Test
- public void generateSnapshotWithFileChanged() {
+ public void replaceFileWithChangedVersion() {
int configId = 1;
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
@@ -66,7 +67,24 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed build snapshot with file changed");
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with file changed");
+ }
+
+ @Test
+ public void deleteFileThatHasBeenRemoved() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+
+ Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file " +
+ "removed.");
}
<E> Set<E> asSet(E... elements) {
commit 7c6c2071cae2cae41db7888e37f5d4284c851c9e
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 16:45:15 2011 -0400
Disable verbose logging by default
diff --git a/modules/enterprise/server/jar/src/test/resources/default.persistence.properties b/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
index 366ecb3..8e4f317 100644
--- a/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
+++ b/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
@@ -16,7 +16,7 @@ hibernate.bytecode.use_reflection_optimizer=false
# I don't think this is honored, but EJB3Deployer uses it
hibernate.bytecode.provider=javassist
hibernate.jdbc.use_streams_for_binary=true
-hibernate.show_sql=true
+hibernate.show_sql=false
hibernate.format_sql=true
hibernate.default_batch_fetch_size=16
hibernate.jdbc.batch_size=20
diff --git a/modules/enterprise/server/jar/src/test/resources/log4j.xml b/modules/enterprise/server/jar/src/test/resources/log4j.xml
index 83c5a23..681f2af 100644
--- a/modules/enterprise/server/jar/src/test/resources/log4j.xml
+++ b/modules/enterprise/server/jar/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
- <param name="Threshold" value="DEBUG"/>
+ <param name="Threshold" value="WARN"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Messagen -->
commit d2b6c62d7894fc85f8bf0613d36d957f70b81581
Merge: fc8d638 bc3c8ab
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 19 21:08:01 2011 -0400
Merge branch 'drift' into drift-mongodb
commit bc3c8abff3baaade68753f45e0eb47a049815e5f
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 19 20:58:25 2011 -0400
More refactoring to better support criteria queries for non-JPA back ends
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
new file mode 100644
index 0000000..edc436b
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
@@ -0,0 +1,15 @@
+package org.rhq.core.domain.criteria;
+
+import org.rhq.core.domain.util.PageControl;
+
+/**
+ * Created by IntelliJ IDEA. User: jsanda Date: 7/19/11 Time: 5:30 PM To change this template use File | Settings | File
+ * Templates.
+ */
+public interface BaseCriteria {
+
+ PageControl getPageControlOverrides();
+
+ void setPageControl(PageControl pageControl);
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
index b3c4dc2..55201d8 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
@@ -40,7 +40,7 @@ import org.rhq.core.domain.util.PageList;
* @author Joseph Marques
*/
@XmlAccessorType(XmlAccessType.FIELD)
-public abstract class Criteria implements Serializable {
+public abstract class Criteria implements Serializable, BaseCriteria {
public enum Type {
FILTER, FETCH, SORT;
}
@@ -150,6 +150,7 @@ public abstract class Criteria implements Serializable {
* which is useful from a server-side calling context where the PageControl object
* will already have been created for you by the extensions at the JSF layer.
*/
+ @Override
public void setPageControl(PageControl pageControl) {
this.pageControlOverrides = pageControl;
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
new file mode 100644
index 0000000..9b39cc3
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
@@ -0,0 +1,114 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.core.domain.criteria;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSetCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private Integer filterInitial; // needs override
+ private Integer filterResourceId; // needs override
+ private String filterVersion;
+ private DriftChangeSetCategory filterCategory;
+ private boolean fetchDrifts;
+
+ private PageOrdering sortVersion;
+
+ public DriftChangeSetJPACriteria() {
+ filterOverrides.put("initial", "version = 0");
+ filterOverrides.put("resourceId", "resource.id = ?");
+ }
+
+ @Override
+ public Class<RhqDriftChangeSet> getPersistentClass() {
+ return RhqDriftChangeSet.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterVersion(String filterVersion) {
+ this.filterVersion = filterVersion;
+ }
+
+ @Override
+ public String getFilterVersion() {
+ return filterVersion;
+ }
+
+ public void addFilterResourceId(Integer filterResourceId) {
+ this.filterResourceId = filterResourceId;
+ }
+
+ @Override
+ public Integer getFilterResourceId() {
+ return filterResourceId;
+ }
+
+ public void addFilterCategory(DriftChangeSetCategory filterCategory) {
+ this.filterCategory = filterCategory;
+ }
+
+ @Override
+ public DriftChangeSetCategory getFilterCategory() {
+ return filterCategory;
+ }
+
+ public void fetchDrifts(boolean fetchDrifts) {
+ this.fetchDrifts = fetchDrifts;
+ }
+
+ @Override
+ public boolean isFetchDrifts() {
+ return fetchDrifts;
+ }
+
+ public void addSortVersion(PageOrdering sortVersion) {
+ addSortField("version");
+ this.sortVersion = sortVersion;
+ }
+
+ @Override
+ public PageOrdering getSortVersion() {
+ return sortVersion;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
index dc9764c..cdd061e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
@@ -6,7 +6,7 @@ import java.util.List;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftCriteria extends Serializable {
+public interface DriftCriteria extends BaseCriteria, Serializable {
void addFilterId(String filterId);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java
new file mode 100644
index 0000000..506cb06
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftJPACriteria.java
@@ -0,0 +1,153 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.core.domain.criteria;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.util.CriteriaUtils;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class DriftJPACriteria extends Criteria implements DriftCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
+ private Integer filterChangeSetId; // needs override
+ private String filterPath;
+ private List<Integer> filterResourceIds = new ArrayList<Integer>();
+ private Long filterStartTime; // requires overrides
+ private Long filterEndTime; // requires overrides
+
+ private boolean fetchChangeSet;
+
+ private PageOrdering sortCtime;
+
+ public DriftJPACriteria() {
+ filterOverrides.put("changeSetId", "changeSet.id = ?");
+ filterOverrides.put("categories", "category IN ( ? )");
+ filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
+ filterOverrides.put("startTime", "ctime >= ?");
+ filterOverrides.put("endTime", "ctime <= ?");
+ }
+
+ @Override
+ public Class<RhqDrift> getPersistentClass() {
+ return RhqDrift.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterCategories(DriftCategory... filterCategories) {
+ this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
+ }
+
+ @Override
+ public List<DriftCategory> getFilterCategories() {
+ return filterCategories;
+ }
+
+ public void addFilterChangeSetId(String filterChangeSetId) {
+ if (filterChangeSetId != null) {
+ this.filterChangeSetId = Integer.parseInt(filterChangeSetId);
+ }
+ }
+
+ @Override
+ public String getFilterChangeSetId() {
+ return filterChangeSetId == null ? null : filterChangeSetId.toString();
+ }
+
+ public void addFilterPath(String filterPath) {
+ this.filterPath = filterPath;
+ }
+
+ @Override
+ public String getFilterPath() {
+ return filterPath;
+ }
+
+ public void addFilterResourceIds(Integer... filterResourceIds) {
+ this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
+ }
+
+ @Override
+ public List<Integer> getFilterResourceIds() {
+ return filterResourceIds;
+ }
+
+ public void addFilterStartTime(Long filterStartTime) {
+ this.filterStartTime = filterStartTime;
+ }
+
+ @Override
+ public Long getFilterStartTime() {
+ return filterStartTime;
+ }
+
+ public void addFilterEndTime(Long filterEndTime) {
+ this.filterEndTime = filterEndTime;
+ }
+
+ @Override
+ public Long getFilterEndTime() {
+ return filterEndTime;
+ }
+
+ public void fetchChangeSet(boolean fetchChangeSet) {
+ this.fetchChangeSet = fetchChangeSet;
+ }
+
+ @Override
+ public boolean isFetchChangeSet() {
+ return fetchChangeSet;
+ }
+
+ public void addSortCtime(PageOrdering sortCtime) {
+ addSortField("ctime");
+ this.sortCtime = sortCtime;
+ }
+
+ @Override
+ public PageOrdering getSortCtime() {
+ return sortCtime;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java
deleted file mode 100644
index 7c09542..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.DriftChangeSetCategory;
-import org.rhq.core.domain.drift.RhqDriftChangeSet;
-import org.rhq.core.domain.util.PageOrdering;
-
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class RhqDriftChangeSetCriteria extends Criteria implements DriftChangeSetCriteria {
- private static final long serialVersionUID = 1L;
-
- private Integer filterId;
- private Integer filterInitial; // needs override
- private Integer filterResourceId; // needs override
- private String filterVersion;
- private DriftChangeSetCategory filterCategory;
- private boolean fetchDrifts;
-
- private PageOrdering sortVersion;
-
- public RhqDriftChangeSetCriteria() {
- filterOverrides.put("initial", "version = 0");
- filterOverrides.put("resourceId", "resource.id = ?");
- }
-
- @Override
- public Class<RhqDriftChangeSet> getPersistentClass() {
- return RhqDriftChangeSet.class;
- }
-
- public void addFilterId(String filterId) {
- if (filterId != null) {
- this.filterId = Integer.parseInt(filterId);
- }
- }
-
- @Override
- public String getFilterId() {
- return filterId == null ? null : filterId.toString();
- }
-
- public void addFilterVersion(String filterVersion) {
- this.filterVersion = filterVersion;
- }
-
- @Override
- public String getFilterVersion() {
- return filterVersion;
- }
-
- public void addFilterResourceId(Integer filterResourceId) {
- this.filterResourceId = filterResourceId;
- }
-
- @Override
- public Integer getFilterResourceId() {
- return filterResourceId;
- }
-
- public void addFilterCategory(DriftChangeSetCategory filterCategory) {
- this.filterCategory = filterCategory;
- }
-
- @Override
- public DriftChangeSetCategory getFilterCategory() {
- return filterCategory;
- }
-
- public void fetchDrifts(boolean fetchDrifts) {
- this.fetchDrifts = fetchDrifts;
- }
-
- @Override
- public boolean isFetchDrifts() {
- return fetchDrifts;
- }
-
- public void addSortVersion(PageOrdering sortVersion) {
- addSortField("version");
- this.sortVersion = sortVersion;
- }
-
- @Override
- public PageOrdering getSortVersion() {
- return sortVersion;
- }
-}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
deleted file mode 100644
index ca37104..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.drift.RhqDrift;
-import org.rhq.core.domain.util.CriteriaUtils;
-import org.rhq.core.domain.util.PageOrdering;
-
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class RhqDriftCriteria extends Criteria implements DriftCriteria {
- private static final long serialVersionUID = 1L;
-
- private Integer filterId;
- private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
- private Integer filterChangeSetId; // needs override
- private String filterPath;
- private List<Integer> filterResourceIds = new ArrayList<Integer>();
- private Long filterStartTime; // requires overrides
- private Long filterEndTime; // requires overrides
-
- private boolean fetchChangeSet;
-
- private PageOrdering sortCtime;
-
- public RhqDriftCriteria() {
- filterOverrides.put("changeSetId", "changeSet.id = ?");
- filterOverrides.put("categories", "category IN ( ? )");
- filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
- filterOverrides.put("startTime", "ctime >= ?");
- filterOverrides.put("endTime", "ctime <= ?");
- }
-
- @Override
- public Class<RhqDrift> getPersistentClass() {
- return RhqDrift.class;
- }
-
- public void addFilterId(String filterId) {
- if (filterId != null) {
- this.filterId = Integer.parseInt(filterId);
- }
- }
-
- @Override
- public String getFilterId() {
- return filterId == null ? null : filterId.toString();
- }
-
- public void addFilterCategories(DriftCategory... filterCategories) {
- this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
- }
-
- @Override
- public List<DriftCategory> getFilterCategories() {
- return filterCategories;
- }
-
- public void addFilterChangeSetId(String filterChangeSetId) {
- if (filterChangeSetId != null) {
- this.filterChangeSetId = Integer.parseInt(filterChangeSetId);
- }
- }
-
- @Override
- public String getFilterChangeSetId() {
- return filterChangeSetId == null ? null : filterChangeSetId.toString();
- }
-
- public void addFilterPath(String filterPath) {
- this.filterPath = filterPath;
- }
-
- @Override
- public String getFilterPath() {
- return filterPath;
- }
-
- public void addFilterResourceIds(Integer... filterResourceIds) {
- this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
- }
-
- @Override
- public List<Integer> getFilterResourceIds() {
- return filterResourceIds;
- }
-
- public void addFilterStartTime(Long filterStartTime) {
- this.filterStartTime = filterStartTime;
- }
-
- @Override
- public Long getFilterStartTime() {
- return filterStartTime;
- }
-
- public void addFilterEndTime(Long filterEndTime) {
- this.filterEndTime = filterEndTime;
- }
-
- @Override
- public Long getFilterEndTime() {
- return filterEndTime;
- }
-
- public void fetchChangeSet(boolean fetchChangeSet) {
- this.fetchChangeSet = fetchChangeSet;
- }
-
- @Override
- public boolean isFetchChangeSet() {
- return fetchChangeSet;
- }
-
- public void addSortCtime(PageOrdering sortCtime) {
- addSortField("ctime");
- this.sortCtime = sortCtime;
- }
-
- @Override
- public PageOrdering getSortCtime() {
- return sortCtime;
- }
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
index 59f9eb3..75967aa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
@@ -23,8 +23,7 @@ import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
@@ -356,8 +355,8 @@ public abstract class AbstractRecentDriftsPortlet extends DriftHistoryView imple
}
@Override
- protected RhqDriftCriteria getFetchCriteria(DSRequest request) {
- RhqDriftCriteria criteria = new RhqDriftCriteria();
+ protected DriftJPACriteria getFetchCriteria(DSRequest request) {
+ DriftJPACriteria criteria = new DriftJPACriteria();
// result count
String currentSetting = this.configuration.getSimpleValue(Constant.RESULT_COUNT,
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index 5c80eca..a9faf69 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -38,7 +38,7 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftCategory;
@@ -61,7 +61,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Jay Shaughnessy
* @author John Mazzitelli
*/
-public class DriftDataSource extends RPCDataSource<Drift, RhqDriftCriteria> {
+public class DriftDataSource extends RPCDataSource<Drift, DriftCriteria> {
public static final String CATEGORY_ICON_ADD = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_ADDED);
public static final String CATEGORY_ICON_CHANGE = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_CHANGED);
@@ -162,7 +162,7 @@ public class DriftDataSource extends RPCDataSource<Drift, RhqDriftCriteria> {
}
@Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final RhqDriftCriteria criteria) {
+ protected void executeFetch(final DSRequest request, final DSResponse response, final DriftCriteria criteria) {
if (criteria == null) {
// the user selected no categories in the filter - it makes sense from the UI perspective to show 0 rows
response.setTotalRows(0);
@@ -248,14 +248,14 @@ public class DriftDataSource extends RPCDataSource<Drift, RhqDriftCriteria> {
}
@Override
- protected RhqDriftCriteria getFetchCriteria(DSRequest request) {
+ protected DriftCriteria getFetchCriteria(DSRequest request) {
DriftCategory[] categoriesFilter = getArrayFilter(request, FILTER_CATEGORIES, DriftCategory.class);
if (categoriesFilter == null || categoriesFilter.length == 0) {
return null; // user didn't select any priorities - return null to indicate no data should be displayed
}
- RhqDriftCriteria criteria = new RhqDriftCriteria();
+ DriftJPACriteria criteria = new DriftJPACriteria();
criteria.fetchChangeSet(true);
criteria.addFilterCategories(categoriesFilter);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index f5ffc9c..9a5c52b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -28,7 +28,7 @@ import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
@@ -58,7 +58,7 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
}
private void show(String driftId) {
- DriftCriteria criteria = new RhqDriftCriteria();
+ DriftCriteria criteria = new DriftJPACriteria();
criteria.addFilterId(driftId);
criteria.fetchChangeSet(true);
GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
index d916075..014466b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
@@ -49,6 +49,7 @@ import com.smartgwt.client.widgets.form.validator.LengthRangeValidator;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.alert.AlertPriority;
+import org.rhq.core.domain.criteria.BaseCriteria;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.event.EventSeverity;
import org.rhq.core.domain.operation.OperationRequestStatus;
@@ -72,7 +73,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Greg Hinkle
* @author Ian Springer
*/
-public abstract class RPCDataSource<T, C extends org.rhq.core.domain.criteria.Criteria> extends DataSource {
+public abstract class RPCDataSource<T, C extends BaseCriteria> extends DataSource {
protected static final Messages MSG = CoreGUI.getMessages();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index f10c3fb..a1a7e6e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -58,8 +58,8 @@ import org.rhq.core.clientapi.agent.drift.DriftAgentService;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftConfiguration;
@@ -143,7 +143,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
try {
- RhqDriftChangeSetCriteria c = new RhqDriftChangeSetCriteria();
+ DriftChangeSetJPACriteria c = new DriftChangeSetJPACriteria();
c.addFilterResourceId(resourceId);
List<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), c);
final int version = changeSets.size();
@@ -355,7 +355,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
public int deleteDriftsByContext(Subject subject, EntityContext entityContext) throws RuntimeException {
int result = 0;
- RhqDriftCriteria criteria = new RhqDriftCriteria();
+ DriftJPACriteria criteria = new DriftJPACriteria();
switch (entityContext.getType()) {
case Resource:
@@ -457,7 +457,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, RhqDriftChangeSetCriteria criteria) {
+ public PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetJPACriteria criteria) {
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
CriteriaQueryRunner<RhqDriftChangeSet> queryRunner = new CriteriaQueryRunner<RhqDriftChangeSet>(criteria, generator,
@@ -467,7 +467,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public PageList<RhqDrift> findDriftsByCriteria(Subject subject, RhqDriftCriteria criteria) {
+ public PageList<RhqDrift> findDriftsByCriteria(Subject subject, DriftJPACriteria criteria) {
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
CriteriaQueryRunner<RhqDrift> queryRunner = new CriteriaQueryRunner<RhqDrift>(criteria, generator, entityManager);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index c052b46..de1453f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -26,8 +26,8 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.RhqDrift;
@@ -116,7 +116,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The DriftChangeSets matching the criteria
*/
- PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, RhqDriftChangeSetCriteria criteria);
+ PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetJPACriteria criteria);
/**
* Standard criteria based fetch method
@@ -124,7 +124,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The Drifts matching the criteria
*/
- PageList<RhqDrift> findDriftsByCriteria(Subject subject, RhqDriftCriteria criteria);
+ PageList<RhqDrift> findDriftsByCriteria(Subject subject, DriftJPACriteria criteria);
/**
* Get the specified drift configuration for the specified context.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index ce3c4b0..0252284 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -40,7 +40,7 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftConfiguration;
@@ -118,7 +118,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
assertTrue(changeset1.exists());
driftManager.storeChangeSet(newResource.getId(), changeset1);
- RhqDriftChangeSetCriteria c = new RhqDriftChangeSetCriteria();
+ DriftChangeSetJPACriteria c = new DriftChangeSetJPACriteria();
c.addFilterResourceId(newResource.getId());
c.fetchDrifts(true);
List<RhqDriftChangeSet> changeSets = driftManager.findDriftChangeSetsByCriteria(overlord, c);
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 67658f5..b727deb 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -27,8 +27,8 @@ import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftChangeSet;
@@ -71,7 +71,7 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
@Override
public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
- RhqDriftChangeSetCriteria rhqCriteria = new RhqDriftChangeSetCriteria();
+ DriftChangeSetJPACriteria rhqCriteria = new DriftChangeSetJPACriteria();
rhqCriteria.addFilterId(criteria.getFilterId());
rhqCriteria.addFilterResourceId(criteria.getFilterResourceId());
rhqCriteria.addFilterVersion(criteria.getFilterVersion());
@@ -85,7 +85,7 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
@Override
public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
- RhqDriftCriteria rhqCriteria = new RhqDriftCriteria();
+ DriftJPACriteria rhqCriteria = new DriftJPACriteria();
rhqCriteria.addFilterId(criteria.getFilterId());
rhqCriteria.addFilterCategories(criteria.getFilterCategories().toArray(new DriftCategory[] {}));
rhqCriteria.addFilterChangeSetId(criteria.getFilterChangeSetId());
commit 00dd47d5962a0b5a4129e4600594893b8e8ae9bf
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 19 15:08:25 2011 -0400
Cannot use java.util.Collections in criteria classes
Collections is not Serializable which was causing client-side errors in
the GWT code.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
index b5cb14e..ca37104 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
@@ -19,16 +19,15 @@
package org.rhq.core.domain.criteria;
-import java.util.Collections;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.util.CriteriaUtils;
import org.rhq.core.domain.util.PageOrdering;
@@ -42,10 +41,10 @@ public class RhqDriftCriteria extends Criteria implements DriftCriteria {
private static final long serialVersionUID = 1L;
private Integer filterId;
- private List<DriftCategory> filterCategories = Collections.emptyList();
+ private List<DriftCategory> filterCategories = new ArrayList<DriftCategory>();
private Integer filterChangeSetId; // needs override
private String filterPath;
- private List<Integer> filterResourceIds = Collections.emptyList(); // requires overrides
+ private List<Integer> filterResourceIds = new ArrayList<Integer>();
private Long filterStartTime; // requires overrides
private Long filterEndTime; // requires overrides
commit 18c8e52eecc6bb71e2f6472de108215ba47eb96a
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 19 14:03:46 2011 -0400
Removing hibernate custom type and making criteria interfaces Serializable
IntegerString is not used so it can safely be removed.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 023115d..6ba63df 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -1,9 +1,11 @@
package org.rhq.core.domain.criteria;
+import java.io.Serializable;
+
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftChangeSetCriteria {
+public interface DriftChangeSetCriteria extends Serializable {
void addFilterId(String filterId);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
index d693cb3..dc9764c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
@@ -1,11 +1,12 @@
package org.rhq.core.domain.criteria;
+import java.io.Serializable;
import java.util.List;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftCriteria {
+public interface DriftCriteria extends Serializable {
void addFilterId(String filterId);
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
index 5d027dc..b5cb14e 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
@@ -62,7 +62,7 @@ public class RhqDriftCriteria extends Criteria implements DriftCriteria {
}
@Override
- public Class<? extends Drift> getPersistentClass() {
+ public Class<RhqDrift> getPersistentClass() {
return RhqDrift.class;
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/hibernate/types/IntegerString.java b/modules/core/domain/src/main/java/org/rhq/core/domain/hibernate/types/IntegerString.java
deleted file mode 100644
index 6fa6658..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/hibernate/types/IntegerString.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.rhq.core.domain.hibernate.types;
-
-import java.io.Serializable;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.hibernate.Hibernate;
-import org.hibernate.HibernateException;
-import org.hibernate.usertype.UserType;
-
-public class IntegerString implements UserType {
-
- @Override
- public int[] sqlTypes() {
- return new int[] {Hibernate.INTEGER.sqlType()};
- }
-
- @Override
- public Class returnedClass() {
- return String.class;
- }
-
- @Override
- public boolean equals(Object x, Object y) throws HibernateException {
- if (x == y) {
- return true;
- }
- if (x == null || y == null) {
- return false;
- }
- return x.equals(y);
- }
-
- @Override
- public int hashCode(Object o) throws HibernateException {
- return o.hashCode();
- }
-
- @Override
- public Object nullSafeGet(ResultSet resultSet, String[] names, Object o) throws HibernateException, SQLException {
- int value = resultSet.getInt(names[0]);
-
- if (resultSet.wasNull()) {
- return null;
- }
- return Integer.toString(value);
- }
-
- @Override
- public void nullSafeSet(PreparedStatement stmt, Object value, int index) throws HibernateException,
- SQLException {
- if (value == null) {
- stmt.setNull(index, Hibernate.INTEGER.sqlType());
- } else {
- stmt.setInt(index, Integer.parseInt((String) value));
- }
- }
-
- @Override
- public Object deepCopy(Object value) throws HibernateException {
- return value;
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
-
- @Override
- public Serializable disassemble(Object value) throws HibernateException {
- return (Serializable) value;
- }
-
- @Override
- public Object assemble(Serializable cached, Object owner) throws HibernateException {
- return cached;
- }
-
- @Override
- public Object replace(Object original, Object target, Object owner) throws HibernateException {
- return original;
- }
-}
commit dc69b44ceb8d0eebc3d4aae3f9bab663bc7dc8a9
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 19 13:35:24 2011 -0400
Refactoring drift domain and criteria classes to make them pluggable
diff --git a/modules/core/client-api/src/main/resources/rhq-drift.xsd b/modules/core/client-api/src/main/resources/rhq-drift.xsd
index 2330c64..afc8142 100644
--- a/modules/core/client-api/src/main/resources/rhq-drift.xsd
+++ b/modules/core/client-api/src/main/resources/rhq-drift.xsd
@@ -37,7 +37,7 @@
</xs:appinfo>
</xs:annotation>
- <xs:complexType name="Drift">
+ <xs:complexType name="RhqDrift">
<xs:annotation>
<xs:appinfo>
<jaxb:class name="DriftDescriptor" />
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 355a354..023115d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -1,84 +1,32 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.util.PageOrdering;
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class DriftChangeSetCriteria extends Criteria {
- private static final long serialVersionUID = 1L;
+public interface DriftChangeSetCriteria {
+
+ void addFilterId(String filterId);
- private String filterId;
- private Integer filterInitial; // needs override
- private Integer filterResourceId; // needs override
- private String filterVersion;
- private DriftChangeSetCategory filterCategory;
+ String getFilterId();
- private boolean fetchDrifts;
+ void addFilterVersion(String filterVersion);
- private PageOrdering sortVersion;
+ String getFilterVersion();
- public DriftChangeSetCriteria() {
- filterOverrides.put("initial", "version = 0");
- filterOverrides.put("resourceId", "resource.id = ?");
- }
+ void addFilterResourceId(Integer filterResourceId);
- @Override
- public Class<DriftChangeSet> getPersistentClass() {
- return DriftChangeSet.class;
- }
+ Integer getFilterResourceId();
- public void addFilterId(String filterId) {
- this.filterId = filterId;
- }
+ void addFilterCategory(DriftChangeSetCategory filterCategory);
- public void addFilterVersion(String filterVersion) {
- this.filterVersion = filterVersion;
- }
+ DriftChangeSetCategory getFilterCategory();
- public void addFilterResourceId(Integer filterResourceId) {
- this.filterResourceId = filterResourceId;
- }
+ void fetchDrifts(boolean fetchDrifts);
- public void addFilterCategory(DriftChangeSetCategory filterCategory) {
- this.filterCategory = filterCategory;
- }
+ boolean isFetchDrifts();
- public void fetchDrifts(boolean fetchDrifts) {
- this.fetchDrifts = fetchDrifts;
- }
+ void addSortVersion(PageOrdering sortVersion);
- public void addSortVersion(PageOrdering sortVersion) {
- addSortField("version");
- this.sortVersion = sortVersion;
- }
+ PageOrdering getSortVersion();
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
index 1988410..d693cb3 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftCriteria.java
@@ -1,104 +1,48 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.core.domain.criteria;
import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.util.CriteriaUtils;
import org.rhq.core.domain.util.PageOrdering;
-/**
- * @author Jay Shaughnessy
- */
-@XmlRootElement
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@SuppressWarnings("unused")
-public class DriftCriteria extends Criteria {
- private static final long serialVersionUID = 1L;
-
- private String filterId;
- private List<DriftCategory> filterCategories;
- private String filterChangeSetId; // needs override
- private String filterPath;
- private List<Integer> filterResourceIds; // requires overrides
- private Long filterStartTime; // requires overrides
- private Long filterEndTime; // requires overrides
-
- private boolean fetchChangeSet;
-
- private PageOrdering sortCtime;
-
- public DriftCriteria() {
- filterOverrides.put("changeSetId", "changeSet.id = ?");
- filterOverrides.put("categories", "category IN ( ? )");
- filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
- filterOverrides.put("startTime", "ctime >= ?");
- filterOverrides.put("endTime", "ctime <= ?");
- }
-
- @Override
- public Class<Drift> getPersistentClass() {
- return Drift.class;
- }
-
- public void addFilterId(String filterId) {
- this.filterId = filterId;
- }
-
- public void addFilterCategories(DriftCategory... filterCategories) {
- this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
- }
-
- public void addFilterChangeSetId(String filterChangeSetId) {
- this.filterChangeSetId = filterChangeSetId;
- }
-
- public void addFilterPath(String filterPath) {
- this.filterPath = filterPath;
- }
-
- public void addFilterResourceIds(Integer... filterResourceIds) {
- this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
- }
-
- public void addFilterStartTime(Long filterStartTime) {
- this.filterStartTime = filterStartTime;
- }
-
- public void addFilterEndTime(Long filterEndTime) {
- this.filterEndTime = filterEndTime;
- }
-
- public void fetchChangeSet(boolean fetchChangeSet) {
- this.fetchChangeSet = fetchChangeSet;
- }
-
- public void addSortCtime(PageOrdering sortCtime) {
- addSortField("ctime");
- this.sortCtime = sortCtime;
- }
+public interface DriftCriteria {
+
+ void addFilterId(String filterId);
+
+ String getFilterId();
+
+ void addFilterCategories(DriftCategory... filterCategories);
+
+ List<DriftCategory> getFilterCategories();
+
+ void addFilterChangeSetId(String filterChangeSetId);
+
+ String getFilterChangeSetId();
+
+ void addFilterPath(String filterPath);
+
+ String getFilterPath();
+
+ void addFilterResourceIds(Integer... filterResourceIds);
+
+ List<Integer> getFilterResourceIds();
+
+ void addFilterStartTime(Long filterStartTime);
+
+ Long getFilterStartTime();
+
+ void addFilterEndTime(Long filterEndTime);
+
+ Long getFilterEndTime();
+
+ void fetchChangeSet(boolean fetchChangeSet);
+
+ boolean isFetchChangeSet();
+
+ void addSortCtime(PageOrdering sortCtime);
+
+ PageOrdering getSortCtime();
+
+
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java
new file mode 100644
index 0000000..7c09542
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftChangeSetCriteria.java
@@ -0,0 +1,114 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.core.domain.criteria;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class RhqDriftChangeSetCriteria extends Criteria implements DriftChangeSetCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private Integer filterInitial; // needs override
+ private Integer filterResourceId; // needs override
+ private String filterVersion;
+ private DriftChangeSetCategory filterCategory;
+ private boolean fetchDrifts;
+
+ private PageOrdering sortVersion;
+
+ public RhqDriftChangeSetCriteria() {
+ filterOverrides.put("initial", "version = 0");
+ filterOverrides.put("resourceId", "resource.id = ?");
+ }
+
+ @Override
+ public Class<RhqDriftChangeSet> getPersistentClass() {
+ return RhqDriftChangeSet.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterVersion(String filterVersion) {
+ this.filterVersion = filterVersion;
+ }
+
+ @Override
+ public String getFilterVersion() {
+ return filterVersion;
+ }
+
+ public void addFilterResourceId(Integer filterResourceId) {
+ this.filterResourceId = filterResourceId;
+ }
+
+ @Override
+ public Integer getFilterResourceId() {
+ return filterResourceId;
+ }
+
+ public void addFilterCategory(DriftChangeSetCategory filterCategory) {
+ this.filterCategory = filterCategory;
+ }
+
+ @Override
+ public DriftChangeSetCategory getFilterCategory() {
+ return filterCategory;
+ }
+
+ public void fetchDrifts(boolean fetchDrifts) {
+ this.fetchDrifts = fetchDrifts;
+ }
+
+ @Override
+ public boolean isFetchDrifts() {
+ return fetchDrifts;
+ }
+
+ public void addSortVersion(PageOrdering sortVersion) {
+ addSortField("version");
+ this.sortVersion = sortVersion;
+ }
+
+ @Override
+ public PageOrdering getSortVersion() {
+ return sortVersion;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
new file mode 100644
index 0000000..5d027dc
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/RhqDriftCriteria.java
@@ -0,0 +1,154 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.core.domain.criteria;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.util.CriteriaUtils;
+import org.rhq.core.domain.util.PageOrdering;
+
+/**
+ * @author Jay Shaughnessy
+ */
+@XmlRootElement
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@SuppressWarnings("unused")
+public class RhqDriftCriteria extends Criteria implements DriftCriteria {
+ private static final long serialVersionUID = 1L;
+
+ private Integer filterId;
+ private List<DriftCategory> filterCategories = Collections.emptyList();
+ private Integer filterChangeSetId; // needs override
+ private String filterPath;
+ private List<Integer> filterResourceIds = Collections.emptyList(); // requires overrides
+ private Long filterStartTime; // requires overrides
+ private Long filterEndTime; // requires overrides
+
+ private boolean fetchChangeSet;
+
+ private PageOrdering sortCtime;
+
+ public RhqDriftCriteria() {
+ filterOverrides.put("changeSetId", "changeSet.id = ?");
+ filterOverrides.put("categories", "category IN ( ? )");
+ filterOverrides.put("resourceIds", "changeSet.resource.id IN ( ? )");
+ filterOverrides.put("startTime", "ctime >= ?");
+ filterOverrides.put("endTime", "ctime <= ?");
+ }
+
+ @Override
+ public Class<? extends Drift> getPersistentClass() {
+ return RhqDrift.class;
+ }
+
+ public void addFilterId(String filterId) {
+ if (filterId != null) {
+ this.filterId = Integer.parseInt(filterId);
+ }
+ }
+
+ @Override
+ public String getFilterId() {
+ return filterId == null ? null : filterId.toString();
+ }
+
+ public void addFilterCategories(DriftCategory... filterCategories) {
+ this.filterCategories = CriteriaUtils.getListIgnoringNulls(filterCategories);
+ }
+
+ @Override
+ public List<DriftCategory> getFilterCategories() {
+ return filterCategories;
+ }
+
+ public void addFilterChangeSetId(String filterChangeSetId) {
+ if (filterChangeSetId != null) {
+ this.filterChangeSetId = Integer.parseInt(filterChangeSetId);
+ }
+ }
+
+ @Override
+ public String getFilterChangeSetId() {
+ return filterChangeSetId == null ? null : filterChangeSetId.toString();
+ }
+
+ public void addFilterPath(String filterPath) {
+ this.filterPath = filterPath;
+ }
+
+ @Override
+ public String getFilterPath() {
+ return filterPath;
+ }
+
+ public void addFilterResourceIds(Integer... filterResourceIds) {
+ this.filterResourceIds = CriteriaUtils.getListIgnoringNulls(filterResourceIds);
+ }
+
+ @Override
+ public List<Integer> getFilterResourceIds() {
+ return filterResourceIds;
+ }
+
+ public void addFilterStartTime(Long filterStartTime) {
+ this.filterStartTime = filterStartTime;
+ }
+
+ @Override
+ public Long getFilterStartTime() {
+ return filterStartTime;
+ }
+
+ public void addFilterEndTime(Long filterEndTime) {
+ this.filterEndTime = filterEndTime;
+ }
+
+ @Override
+ public Long getFilterEndTime() {
+ return filterEndTime;
+ }
+
+ public void fetchChangeSet(boolean fetchChangeSet) {
+ this.fetchChangeSet = fetchChangeSet;
+ }
+
+ @Override
+ public boolean isFetchChangeSet() {
+ return fetchChangeSet;
+ }
+
+ public void addSortCtime(PageOrdering sortCtime) {
+ addSortField("ctime");
+ this.sortCtime = sortCtime;
+ }
+
+ @Override
+ public PageOrdering getSortCtime() {
+ return sortCtime;
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
index a9e95e0..ef6a1ed 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Drift.java
@@ -1,171 +1,29 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
package org.rhq.core.domain.drift;
-import java.io.Serializable;
+public interface Drift {
+ String getId();
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
+ void setId(String id);
-import org.hibernate.annotations.Type;
+ Long getCtime();
-/**
- * An occurrence of drifty to be reported and managed by the user.
-
- * @author Jay Shaughnessy
- * @author John Sanda
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = Drift.QUERY_DELETE_BY_RESOURCES, query = "" //
- + "DELETE FROM Drift d " //
- + " WHERE d.changeSet IN ( SELECT dcs FROM DriftChangeSet dcs WHERE dcs.resource.id IN ( :resourceIds ) ) )") })
-@Table(name = "RHQ_DRIFT")
-@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
-public class Drift implements Serializable {
- private static final long serialVersionUID = 1L;
+ DriftChangeSet getChangeSet();
- public static final String QUERY_DELETE_BY_RESOURCES = "Drift.deleteByResources";
+ void setChangeSet(RhqDriftChangeSet changeSet);
- @Type(type = "org.rhq.core.domain.hibernate.types.IntegerString")
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
- @Id
- private String id;
+ DriftCategory getCategory();
- @Column(name = "CTIME", nullable = false)
- private Long ctime = -1L;
+ void setCategory(DriftCategory category);
- @Column(name = "CATEGORY", nullable = false)
- @Enumerated(EnumType.STRING)
- private DriftCategory category;
+ String getPath();
- @Column(name = "PATH", nullable = false)
- @Enumerated(EnumType.STRING)
- private String path;
+ void setPath(String path);
- @JoinColumn(name = "DRIFT_CHANGE_SET_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY, optional = false)
- private DriftChangeSet changeSet;
+ DriftFile getOldDriftFile();
- @JoinColumn(name = "OLD_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
- @ManyToOne(fetch = FetchType.EAGER, optional = true)
- private DriftFile oldDriftFile;
+ void setOldDriftFile(DriftFile oldDriftFile);
- @JoinColumn(name = "NEW_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
- @ManyToOne(fetch = FetchType.EAGER, optional = true)
- private DriftFile newDriftFile;
-
- protected Drift() {
- }
-
- /**
- * @param resource
- * @param category
- * @param oldDriftFile required for FILE_CHANGED and FILE_REMOVED, null for FILE_ADDED
- * @param newDriftFile required for FILE_CHANGED and FILE_ADDED, null for FILE_REMOVED
- */
- public Drift(DriftChangeSet changeSet, String path, DriftCategory category, DriftFile oldDriftFile,
- DriftFile newDriftFile) {
- this.changeSet = changeSet;
- this.path = path;
- this.category = category;
- this.oldDriftFile = oldDriftFile;
- this.newDriftFile = newDriftFile;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Long getCtime() {
- return ctime;
- }
-
- @PrePersist
- void onPersist() {
- this.ctime = System.currentTimeMillis();
- }
-
- public DriftChangeSet getChangeSet() {
- return changeSet;
- }
-
- public void setChangeSet(DriftChangeSet changeSet) {
- this.changeSet = changeSet;
- }
-
- public DriftCategory getCategory() {
- return category;
- }
-
- public void setCategory(DriftCategory category) {
- this.category = category;
- }
-
- public String getPath() {
- return path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public DriftFile getOldDriftFile() {
- return oldDriftFile;
- }
-
- public void setOldDriftFile(DriftFile oldDriftFile) {
- this.oldDriftFile = oldDriftFile;
- }
-
- public DriftFile getNewDriftFile() {
- return newDriftFile;
- }
-
- public void setNewDriftFile(DriftFile newDriftFile) {
- this.newDriftFile = newDriftFile;
- }
-
- @Override
- public String toString() {
- return "Drift [ id=" + id + ", category=" + category + ", path=" + path + ", changeSet=" + changeSet + "]";
- }
+ DriftFile getNewDriftFile();
+ void setNewDriftFile(DriftFile newDriftFile);
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
index 97a76ee..a07a95a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftChangeSet.java
@@ -1,152 +1,29 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
package org.rhq.core.domain.drift;
-import java.io.Serializable;
-import java.util.LinkedHashSet;
import java.util.Set;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.hibernate.annotations.Type;
-
import org.rhq.core.domain.resource.Resource;
-/**
- * @author Jay Shaughnessy
- * @author John Sanda
- */
-@Entity
-@NamedQueries( { @NamedQuery(name = DriftChangeSet.QUERY_DELETE_BY_RESOURCES, query = "" //
- + "DELETE FROM DriftChangeSet dcs " //
- + " WHERE dcs.resource.id IN ( :resourceIds )") })
-@Table(name = "RHQ_DRIFT_CHANGE_SET")
-@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
-public class DriftChangeSet implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String QUERY_DELETE_BY_RESOURCES = "DriftChangeSet.deleteByResources";
-
- @Type(type = "org.rhq.core.domain.hibernate.types.IntegerString")
- @Column(name = "ID", nullable = false)
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
- @Id
- private String id;
-
- @Column(name = "CTIME", nullable = false)
- private Long ctime = -1L;
-
- // 0..N
- @Column(name = "VERSION", nullable = false)
- private int version;
-
- @Column(name = "CATEGORY", nullable = false)
- @Enumerated(EnumType.STRING)
- private DriftChangeSetCategory category;
-
- @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(optional = false)
- private Resource resource;
-
- @OneToMany(mappedBy = "changeSet", cascade = { CascadeType.ALL })
- private Set<Drift> drifts = new LinkedHashSet<Drift>();
-
- protected DriftChangeSet() {
- }
-
- public DriftChangeSet(Resource resource, int version, DriftChangeSetCategory category) {
- this.resource = resource;
- this.version = version;
- this.category = category;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Long getCtime() {
- return ctime;
- }
-
- @PrePersist
- void onPersist() {
- this.ctime = System.currentTimeMillis();
- }
+public interface DriftChangeSet<D extends Drift> {
+ String getId();
- public int getVersion() {
- return version;
- }
+ void setId(String id);
- public void setVersion(int version) {
- this.version = version;
- }
+ Long getCtime();
- public DriftChangeSetCategory getCategory() {
- return category;
- }
+ int getVersion();
- public void setCategory(DriftChangeSetCategory category) {
- this.category = category;
- }
+ void setVersion(int version);
- public Resource getResource() {
- return resource;
- }
+ DriftChangeSetCategory getCategory();
- public void setResource(Resource resource) {
- this.resource = resource;
- }
+ void setCategory(DriftChangeSetCategory category);
- public Set<Drift> getDrifts() {
- return drifts;
- }
+ Resource getResource();
- public void setDrifts(Set<Drift> drifts) {
- this.drifts = drifts;
- }
+ void setResource(Resource resource);
- @Override
- public String toString() {
- return "DriftChangeSet [id=" + id + ", resource=" + resource + ", version=" + version + "]";
- }
+ Set<D> getDrifts();
+ void setDrifts(Set<D> drifts);
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java
new file mode 100644
index 0000000..d82520e
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDrift.java
@@ -0,0 +1,183 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.PrePersist;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+
+/**
+ * An occurrence of drifty to be reported and managed by the user.
+
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = RhqDrift.QUERY_DELETE_BY_RESOURCES, query = "" //
+ + "DELETE FROM RhqDrift d " //
+ + " WHERE d.changeSet IN ( SELECT dcs FROM RhqDriftChangeSet dcs WHERE dcs.resource.id IN ( :resourceIds ) ) )") })
+@Table(name = "RHQ_DRIFT")
+@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_ID_SEQ")
+public class RhqDrift implements Serializable, Drift {
+ private static final long serialVersionUID = 1L;
+
+ public static final String QUERY_DELETE_BY_RESOURCES = "RhqDrift.deleteByResources";
+
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @Id
+ private int id;
+
+ @Column(name = "CTIME", nullable = false)
+ private Long ctime = -1L;
+
+ @Column(name = "CATEGORY", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private DriftCategory category;
+
+ @Column(name = "PATH", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private String path;
+
+ @JoinColumn(name = "DRIFT_CHANGE_SET_ID", referencedColumnName = "ID", nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ private RhqDriftChangeSet changeSet;
+
+ @JoinColumn(name = "OLD_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.EAGER, optional = true)
+ private DriftFile oldDriftFile;
+
+ @JoinColumn(name = "NEW_DRIFT_FILE", referencedColumnName = "HASH_ID", nullable = true)
+ @ManyToOne(fetch = FetchType.EAGER, optional = true)
+ private DriftFile newDriftFile;
+
+ protected RhqDrift() {
+ }
+
+ /**
+ * @param resource
+ * @param category
+ * @param oldDriftFile required for FILE_CHANGED and FILE_REMOVED, null for FILE_ADDED
+ * @param newDriftFile required for FILE_CHANGED and FILE_ADDED, null for FILE_REMOVED
+ */
+ public RhqDrift(RhqDriftChangeSet changeSet, String path, DriftCategory category, DriftFile oldDriftFile,
+ DriftFile newDriftFile) {
+ this.changeSet = changeSet;
+ this.path = path;
+ this.category = category;
+ this.oldDriftFile = oldDriftFile;
+ this.newDriftFile = newDriftFile;
+ }
+
+ @Override
+ public String getId() {
+ return Integer.toString(id);
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = Integer.parseInt(id);
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @PrePersist
+ void onPersist() {
+ this.ctime = System.currentTimeMillis();
+ }
+
+ @Override
+ public DriftChangeSet getChangeSet() {
+ return changeSet;
+ }
+
+ @Override
+ public void setChangeSet(RhqDriftChangeSet changeSet) {
+ this.changeSet = changeSet;
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public DriftFile getOldDriftFile() {
+ return oldDriftFile;
+ }
+
+ @Override
+ public void setOldDriftFile(DriftFile oldDriftFile) {
+ this.oldDriftFile = oldDriftFile;
+ }
+
+ @Override
+ public DriftFile getNewDriftFile() {
+ return newDriftFile;
+ }
+
+ @Override
+ public void setNewDriftFile(DriftFile newDriftFile) {
+ this.newDriftFile = newDriftFile;
+ }
+
+ @Override
+ public String toString() {
+ return "RhqDrift [ id=" + id + ", category=" + category + ", path=" + path + ", changeSet=" + changeSet + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java
new file mode 100644
index 0000000..28ebfbb
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/RhqDriftChangeSet.java
@@ -0,0 +1,162 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToMany;
+import javax.persistence.PrePersist;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+
+import org.rhq.core.domain.resource.Resource;
+
+/**
+ * @author Jay Shaughnessy
+ * @author John Sanda
+ */
+@Entity
+@NamedQueries( { @NamedQuery(name = RhqDriftChangeSet.QUERY_DELETE_BY_RESOURCES, query = "" //
+ + "DELETE FROM RhqDriftChangeSet dcs " //
+ + " WHERE dcs.resource.id IN ( :resourceIds )") })
+@Table(name = "RHQ_DRIFT_CHANGE_SET")
+@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_DRIFT_CHANGE_SET_ID_SEQ")
+public class RhqDriftChangeSet implements Serializable, DriftChangeSet<RhqDrift> {
+ private static final long serialVersionUID = 1L;
+
+ public static final String QUERY_DELETE_BY_RESOURCES = "RhqDriftChangeSet.deleteByResources";
+
+ @Column(name = "ID", nullable = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ")
+ @Id
+ private int id;
+
+ @Column(name = "CTIME", nullable = false)
+ private Long ctime = -1L;
+
+ // 0..N
+ @Column(name = "VERSION", nullable = false)
+ private int version;
+
+ @Column(name = "CATEGORY", nullable = false)
+ @Enumerated(EnumType.STRING)
+ private DriftChangeSetCategory category;
+
+ @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "ID", nullable = false)
+ @ManyToOne(optional = false)
+ private Resource resource;
+
+ @OneToMany(mappedBy = "changeSet", cascade = { CascadeType.ALL })
+ private Set<RhqDrift> drifts = new LinkedHashSet<RhqDrift>();
+
+ protected RhqDriftChangeSet() {
+ }
+
+ public RhqDriftChangeSet(Resource resource, int version, DriftChangeSetCategory category) {
+ this.resource = resource;
+ this.version = version;
+ this.category = category;
+ }
+
+ @Override
+ public String getId() {
+ return Integer.toString(id);
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = Integer.parseInt(id);
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @PrePersist
+ void onPersist() {
+ this.ctime = System.currentTimeMillis();
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public Resource getResource() {
+ return resource;
+ }
+
+ @Override
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
+
+ @Override
+ public Set<RhqDrift> getDrifts() {
+ return drifts;
+ }
+
+ @Override
+ public void setDrifts(Set<RhqDrift> drifts) {
+ this.drifts = drifts;
+ }
+
+ @Override
+ public String toString() {
+ return "RhqDriftChangeSet [id=" + id + ", resource=" + resource + ", version=" + version + "]";
+ }
+
+}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftChangeSetTest.java
deleted file mode 100644
index b06d8a4..0000000
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftChangeSetTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.rhq.core.domain.drift;
-
-import javax.transaction.SystemException;
-
-import org.testng.annotations.BeforeGroups;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.alert.Alert;
-import org.rhq.core.domain.alert.AlertCondition;
-import org.rhq.core.domain.alert.AlertConditionLog;
-import org.rhq.core.domain.alert.AlertDampeningEvent;
-import org.rhq.core.domain.alert.AlertDefinition;
-import org.rhq.core.domain.alert.notification.AlertNotification;
-import org.rhq.core.domain.alert.notification.AlertNotificationLog;
-import org.rhq.core.domain.bundle.BundleResourceDeployment;
-import org.rhq.core.domain.bundle.BundleResourceDeploymentHistory;
-import org.rhq.core.domain.configuration.PluginConfigurationUpdate;
-import org.rhq.core.domain.configuration.ResourceConfigurationUpdate;
-import org.rhq.core.domain.content.ContentServiceRequest;
-import org.rhq.core.domain.content.InstalledPackage;
-import org.rhq.core.domain.content.InstalledPackageHistory;
-import org.rhq.core.domain.content.PackageInstallationStep;
-import org.rhq.core.domain.content.ResourceRepo;
-import org.rhq.core.domain.event.Event;
-import org.rhq.core.domain.event.EventSource;
-import org.rhq.core.domain.measurement.Availability;
-import org.rhq.core.domain.measurement.MeasurementBaseline;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.measurement.MeasurementOOB;
-import org.rhq.core.domain.measurement.MeasurementSchedule;
-import org.rhq.core.domain.measurement.calltime.CallTimeDataKey;
-import org.rhq.core.domain.measurement.calltime.CallTimeDataValue;
-import org.rhq.core.domain.operation.ResourceOperationHistory;
-import org.rhq.core.domain.operation.ResourceOperationScheduleEntity;
-import org.rhq.core.domain.resource.CreateResourceHistory;
-import org.rhq.core.domain.resource.DeleteResourceHistory;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceError;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.shared.ResourceBuilder;
-import org.rhq.core.domain.test.AbstractEJB3Test;
-
-import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
-
-public class DriftChangeSetTest extends AbstractEJB3Test {
-
- static interface TransactionCallback {
- void execute() throws Exception;
- }
-
- Resource resource;
-
- @BeforeGroups(groups = {"drift.changeset"})
- public void initResource() throws Exception {
- resource = new ResourceBuilder().createRandomServer().build();
- resource.setId(0);
-
- final ResourceType type = resource.getResourceType();
- type.setId(0);
-
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- getEntityManager().createQuery("delete from DriftChangeSet").executeUpdate();
- getEntityManager().createQuery("delete from Resource").executeUpdate();
- getEntityManager().createQuery("delete from ResourceType").executeUpdate();
- }
- });
-
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- getEntityManager().persist(type);
- getEntityManager().persist(resource);
- }
- });
- }
-
- @BeforeMethod(groups = {"drift.changeset"})
- public void setup() throws Exception {
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- getEntityManager().createQuery("delete from DriftChangeSet").executeUpdate();
- }
- });
- }
-
- @Test(groups = {"integration.ejb3", "drift.changeset"}, enabled = false)
- public void insertAndLoad() throws Exception {
- final DriftChangeSet changeSet = new DriftChangeSet();
-
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- changeSet.setCategory(COVERAGE);
- changeSet.setVersion(0);
- changeSet.setResource(resource);
-
- getEntityManager().persist(changeSet);
- }
- });
-
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- // Verify that we can both load by id and by JPQL to ensure that using a
- // custom type for the id works.
-
- DriftChangeSet actual = getEntityManager().find(DriftChangeSet.class, changeSet.getId());
- assertNotNull("Failed to load change set by id", actual);
-
- actual = (DriftChangeSet) getEntityManager().createQuery("from DriftChangeSet where id = :id")
- .setParameter("id", actual.getId())
- .getSingleResult();
- assertNotNull("Failed to load change set with JPQL query", actual);
- }
- });
- }
-
- void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
- }
-
-}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
new file mode 100644
index 0000000..26520a1
--- /dev/null
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -0,0 +1,107 @@
+package org.rhq.core.domain.drift;
+
+import javax.transaction.SystemException;
+
+import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.shared.ResourceBuilder;
+import org.rhq.core.domain.test.AbstractEJB3Test;
+
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
+
+public class RhqDriftChangeSetTest extends AbstractEJB3Test {
+
+ static interface TransactionCallback {
+ void execute() throws Exception;
+ }
+
+ Resource resource;
+
+ @BeforeGroups(groups = {"drift.changeset"})
+ public void initResource() throws Exception {
+ resource = new ResourceBuilder().createRandomServer().build();
+ resource.setId(0);
+
+ final ResourceType type = resource.getResourceType();
+ type.setId(0);
+
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
+ getEntityManager().createQuery("delete from Resource").executeUpdate();
+ getEntityManager().createQuery("delete from ResourceType").executeUpdate();
+ }
+ });
+
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ getEntityManager().persist(type);
+ getEntityManager().persist(resource);
+ }
+ });
+ }
+
+ @BeforeMethod(groups = {"drift.changeset"})
+ public void setup() throws Exception {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
+ }
+ });
+ }
+
+ @Test(groups = {"integration.ejb3", "drift.changeset"}, enabled = false)
+ public void insertAndLoad() throws Exception {
+ final RhqDriftChangeSet changeSet = new RhqDriftChangeSet();
+
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ changeSet.setCategory(COVERAGE);
+ changeSet.setVersion(0);
+ changeSet.setResource(resource);
+
+ getEntityManager().persist(changeSet);
+ }
+ });
+
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ // Verify that we can both load by id and by JPQL to ensure that using a
+ // custom type for the id works.
+
+ RhqDriftChangeSet actual = getEntityManager().find(RhqDriftChangeSet.class, changeSet.getId());
+ assertNotNull("Failed to load change set by id", actual);
+
+ actual = (RhqDriftChangeSet) getEntityManager().createQuery("from RhqDriftChangeSet where id = :id")
+ .setParameter("id", actual.getId())
+ .getSingleResult();
+ assertNotNull("Failed to load change set with JPQL query", actual);
+ }
+ });
+ }
+
+ void executeInTransaction(TransactionCallback callback) {
+ try {
+ getTransactionManager().begin();
+ callback.execute();
+ getTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ getTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
index 8e858de..59f9eb3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
@@ -24,6 +24,7 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
@@ -355,8 +356,8 @@ public abstract class AbstractRecentDriftsPortlet extends DriftHistoryView imple
}
@Override
- protected DriftCriteria getFetchCriteria(DSRequest request) {
- DriftCriteria criteria = new DriftCriteria();
+ protected RhqDriftCriteria getFetchCriteria(DSRequest request) {
+ RhqDriftCriteria criteria = new RhqDriftCriteria();
// result count
String currentSetting = this.configuration.getSimpleValue(Constant.RESULT_COUNT,
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
index eaefcfb..5c80eca 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDataSource.java
@@ -38,9 +38,10 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageList;
@@ -60,7 +61,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* @author Jay Shaughnessy
* @author John Mazzitelli
*/
-public class DriftDataSource extends RPCDataSource<Drift, DriftCriteria> {
+public class DriftDataSource extends RPCDataSource<Drift, RhqDriftCriteria> {
public static final String CATEGORY_ICON_ADD = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_ADDED);
public static final String CATEGORY_ICON_CHANGE = ImageManager.getDriftCategoryIcon(DriftCategory.FILE_CHANGED);
@@ -161,7 +162,7 @@ public class DriftDataSource extends RPCDataSource<Drift, DriftCriteria> {
}
@Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final DriftCriteria criteria) {
+ protected void executeFetch(final DSRequest request, final DSResponse response, final RhqDriftCriteria criteria) {
if (criteria == null) {
// the user selected no categories in the filter - it makes sense from the UI perspective to show 0 rows
response.setTotalRows(0);
@@ -200,7 +201,7 @@ public class DriftDataSource extends RPCDataSource<Drift, DriftCriteria> {
default:
Set<Integer> typesSet = new HashSet<Integer>();
Set<String> ancestries = new HashSet<String>();
- for (Drift drift : result) {
+ for (Drift drift : result) {
Resource resource = drift.getChangeSet().getResource();
typesSet.add(resource.getResourceType().getId());
ancestries.add(resource.getAncestry());
@@ -247,14 +248,14 @@ public class DriftDataSource extends RPCDataSource<Drift, DriftCriteria> {
}
@Override
- protected DriftCriteria getFetchCriteria(DSRequest request) {
+ protected RhqDriftCriteria getFetchCriteria(DSRequest request) {
DriftCategory[] categoriesFilter = getArrayFilter(request, FILTER_CATEGORIES, DriftCategory.class);
if (categoriesFilter == null || categoriesFilter.length == 0) {
return null; // user didn't select any priorities - return null to indicate no data should be displayed
}
- DriftCriteria criteria = new DriftCriteria();
+ RhqDriftCriteria criteria = new RhqDriftCriteria();
criteria.fetchChangeSet(true);
criteria.addFilterCategories(categoriesFilter);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index ffa7185..f5ffc9c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -28,6 +28,7 @@ import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
@@ -57,7 +58,7 @@ public class DriftDetailsView extends LocatableVLayout implements BookmarkableVi
}
private void show(String driftId) {
- DriftCriteria criteria = new DriftCriteria();
+ DriftCriteria criteria = new RhqDriftCriteria();
criteria.addFilterId(driftId);
criteria.fetchChangeSet(true);
GWTServiceLookup.getDriftService().findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
index 74531cc..a608f8f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftHistoryView.java
@@ -53,7 +53,7 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
- * A view that displays a paginated table of {@link org.rhq.core.domain.drift.Drift}s, along with the
+ * A view that displays a paginated table of {@link org.rhq.core.domain.drift.RhqDrift}s, along with the
* ability to filter those drifts, sort those drifts, double-click a row to view full details a drift, and perform
* various actions on the the drifts: delete selected, delete all from source, etc.
* This view full respects the user's authorization, and will not allow acttions on the drifts unless the user is
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index a5c0209..7767a8f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -91,12 +91,10 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(DriftChangeSetCriteria criteria)
- throws RuntimeException {
+ public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(DriftChangeSetCriteria criteria) {
try {
- PageList<DriftChangeSet> result = driftManager.findDriftChangeSetsByCriteria(getSessionSubject(),
- criteria);
- return SerialUtility.prepare(result, "DriftService.findDriftChangeSetsByCriteria");
+ PageList<DriftChangeSet> results = driftServer.findDriftChangeSetsByCriteria(getSessionSubject(), criteria);
+ return SerialUtility.prepare(results, "DriftService.findDriftChangeSetsByCriteria");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
@@ -105,8 +103,8 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
@Override
public PageList<Drift> findDriftsByCriteria(DriftCriteria criteria) throws RuntimeException {
try {
- PageList<Drift> result = driftManager.findDriftsByCriteria(getSessionSubject(), criteria);
- return SerialUtility.prepare(result, "DriftService.findDriftsByCriteria");
+ PageList<Drift> results = driftServer.findDriftsByCriteria(getSessionSubject(), criteria);
+ return SerialUtility.prepare(results, "DriftService.findDriftsByCriteria");
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 817bb13..f10c3fb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -19,8 +19,6 @@
*/
package org.rhq.enterprise.server.drift;
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
@@ -60,15 +58,16 @@ import org.rhq.core.clientapi.agent.drift.DriftAgentService;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileBits;
import org.rhq.core.domain.drift.DriftFileStatus;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
@@ -80,6 +79,8 @@ import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
+import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+
@Stateless
public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
private final Log log = LogFactory.getLog(this.getClass());
@@ -142,9 +143,9 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
try {
- DriftChangeSetCriteria c = new DriftChangeSetCriteria();
+ RhqDriftChangeSetCriteria c = new RhqDriftChangeSetCriteria();
c.addFilterResourceId(resourceId);
- List<DriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), c);
+ List<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subjectManager.getOverlord(), c);
final int version = changeSets.size();
ZipUtil.walkZipFile(changeSetZip, new ChangeSetFileVisitor() {
@@ -152,7 +153,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
public boolean visit(ZipEntry zipEntry, ZipInputStream stream) throws Exception {
List<DriftFile> emptyDriftFiles = new ArrayList<DriftFile>();
- DriftChangeSet driftChangeSet = null;
+ RhqDriftChangeSet driftChangeSet = null;
try {
ChangeSetReader reader = new ChangeSetReaderImpl(new BufferedReader(new InputStreamReader(
@@ -160,7 +161,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
// store the new change set info (not the actual blob)
DriftChangeSetCategory category = reader.getHeaders().getType();
- driftChangeSet = new DriftChangeSet(resource, version, category);
+ driftChangeSet = new RhqDriftChangeSet(resource, version, category);
entityManager.persist(driftChangeSet);
for (DirectoryEntry dir = reader.readDirectoryEntry(); null != dir; dir = reader
@@ -177,7 +178,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
// use a path with only forward slashing to ensure consistent paths across reports
String path = new File(dir.getDirectory(), entry.getFile()).getPath();
path = FileUtil.useForwardSlash(path);
- Drift drift = new Drift(driftChangeSet, path, entry.getType(), oldDriftFile,
+ Drift drift = new RhqDrift(driftChangeSet, path, entry.getType(), oldDriftFile,
newDriftFile);
entityManager.persist(drift);
}
@@ -329,7 +330,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
int result = 0;
for (String driftId : driftIds) {
- Drift doomed = entityManager.find(Drift.class, driftId);
+ Drift doomed = entityManager.find(RhqDrift.class, driftId);
if (null != doomed) {
entityManager.remove(doomed);
++result;
@@ -354,7 +355,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
public int deleteDriftsByContext(Subject subject, EntityContext entityContext) throws RuntimeException {
int result = 0;
- DriftCriteria criteria = new DriftCriteria();
+ RhqDriftCriteria criteria = new RhqDriftCriteria();
switch (entityContext.getType()) {
case Resource:
@@ -369,7 +370,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
throw new IllegalArgumentException("Entity Context Type not supported [" + entityContext + "]");
}
- List<Drift> drifts = driftManager.findDriftsByCriteria(subject, criteria);
+ List<RhqDrift> drifts = driftManager.findDriftsByCriteria(subject, criteria);
if (!drifts.isEmpty()) {
String[] driftIds = new String[drifts.size()];
int i = 0;
@@ -456,21 +457,21 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
+ public PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, RhqDriftChangeSetCriteria criteria) {
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
- CriteriaQueryRunner<DriftChangeSet> queryRunner = new CriteriaQueryRunner<DriftChangeSet>(criteria, generator,
+ CriteriaQueryRunner<RhqDriftChangeSet> queryRunner = new CriteriaQueryRunner<RhqDriftChangeSet>(criteria, generator,
entityManager);
- PageList<DriftChangeSet> result = queryRunner.execute();
+ PageList<RhqDriftChangeSet> result = queryRunner.execute();
return result;
}
@Override
- public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ public PageList<RhqDrift> findDriftsByCriteria(Subject subject, RhqDriftCriteria criteria) {
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
- CriteriaQueryRunner<Drift> queryRunner = new CriteriaQueryRunner<Drift>(criteria, generator, entityManager);
- PageList<Drift> result = queryRunner.execute();
+ CriteriaQueryRunner<RhqDrift> queryRunner = new CriteriaQueryRunner<RhqDrift>(criteria, generator, entityManager);
+ PageList<RhqDrift> result = queryRunner.execute();
return result;
}
@@ -501,7 +502,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
if (null == result) {
- throw new IllegalArgumentException("Drift Configuration Id [" + driftConfigId
+ throw new IllegalArgumentException("RhqDrift Configuration Id [" + driftConfigId
+ "] not found for entityContext [" + entityContext + "]");
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index b1bfa34..c052b46 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -26,12 +26,12 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.util.PageList;
@Local
@@ -91,7 +91,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
*
* @return the number of Drift records deleted
*/
- int deleteDriftsByContext(Subject subject, EntityContext entityContext) throws RuntimeException;
+ int deleteDriftsByContext(Subject subject, EntityContext entityContext);
/**
* Remove the provided driftConfig (identified by name) on the specified entityContext.
@@ -116,7 +116,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The DriftChangeSets matching the criteria
*/
- PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+ PageList<RhqDriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, RhqDriftChangeSetCriteria criteria);
/**
* Standard criteria based fetch method
@@ -124,7 +124,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param criteria
* @return The Drifts matching the criteria
*/
- PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
+ PageList<RhqDrift> findDriftsByCriteria(Subject subject, RhqDriftCriteria criteria);
/**
* Get the specified drift configuration for the specified context.
@@ -134,8 +134,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @return The drift configuration
* @throws RuntimeException, IllegalArgumentException if entity or driftConfig not found.
*/
- DriftConfiguration getDriftConfiguration(Subject subject, EntityContext entityContext, int driftConfigId)
- throws RuntimeException;
+ DriftConfiguration getDriftConfiguration(Subject subject, EntityContext entityContext, int driftConfigId);
/**
* This method stores the provided change-set file for the resource. The version will be incremented based
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 3814288..8cef2a7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -18,8 +18,13 @@ import org.rhq.core.clientapi.agent.drift.DriftAgentService;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.agentclient.AgentClient;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
@@ -47,6 +52,18 @@ public class DriftServerBean implements DriftServerLocal {
private AgentManagerLocal agentMgr;
@Override
+ public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
+ DriftServerPluginFacet driftServerPlugin = getServerPlugin();
+ return driftServerPlugin.findDriftChangeSetsByCriteria(subject, criteria);
+ }
+
+ @Override
+ public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ DriftServerPluginFacet driftServerPlugin = getServerPlugin();
+ return driftServerPlugin.findDriftsByCriteria(subject, criteria);
+ }
+
+ @Override
@TransactionAttribute(NOT_SUPPORTED)
public void saveChangeSet(int resourceId, File changeSetZip) throws Exception {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
index 014a5a8..e24ef5e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
@@ -6,7 +6,12 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.util.PageList;
@Local
public interface DriftServerLocal {
@@ -21,4 +26,8 @@ public interface DriftServerLocal {
void detectDrift(Subject subject, EntityContext context, DriftConfiguration driftConfig);
+ PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+
+ PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
+
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index c5423c6..02375b7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -21,7 +21,12 @@ package org.rhq.enterprise.server.plugin.pc.drift;
import java.io.File;
-import org.rhq.core.domain.drift.DriftFile;
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
/**
@@ -32,6 +37,10 @@ import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
*/
public interface DriftServerPluginFacet extends ServerPluginComponent {
+ PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria);
+
+ PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria);
+
void saveChangeSet(int resourceId, File changeSetZip) throws Exception;
void saveChangeSetFiles(File changeSetFilesZip) throws Exception;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 9792fad..53ec93e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -69,8 +69,8 @@ import org.rhq.core.domain.content.PackageInstallationStep;
import org.rhq.core.domain.content.ResourceRepo;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.event.Event;
import org.rhq.core.domain.event.EventSource;
import org.rhq.core.domain.measurement.Availability;
@@ -503,8 +503,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
AlertDampeningEvent.QUERY_DELETE_BY_RESOURCES, // alert-
AlertNotification.QUERY_DELETE_BY_RESOURCES, // related
AlertDefinition.QUERY_DELETE_BY_RESOURCES, // deletes
- Drift.QUERY_DELETE_BY_RESOURCES, // drift before changeset
- DriftChangeSet.QUERY_DELETE_BY_RESOURCES };
+ RhqDrift.QUERY_DELETE_BY_RESOURCES, // drift before changeset
+ RhqDriftChangeSet.QUERY_DELETE_BY_RESOURCES };
List<Integer> resourceIds = new ArrayList<Integer>();
resourceIds.add(resourceId);
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index eef7aba..ce3c4b0 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -40,15 +40,15 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
-import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
import org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext;
+import org.rhq.core.domain.drift.RhqDrift;
+import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
@@ -118,12 +118,12 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
assertTrue(changeset1.exists());
driftManager.storeChangeSet(newResource.getId(), changeset1);
- DriftChangeSetCriteria c = new DriftChangeSetCriteria();
+ RhqDriftChangeSetCriteria c = new RhqDriftChangeSetCriteria();
c.addFilterResourceId(newResource.getId());
c.fetchDrifts(true);
- List<DriftChangeSet> changeSets = driftManager.findDriftChangeSetsByCriteria(overlord, c);
+ List<RhqDriftChangeSet> changeSets = driftManager.findDriftChangeSetsByCriteria(overlord, c);
assertEquals(1, changeSets.size());
- DriftChangeSet changeSet = changeSets.get(0);
+ RhqDriftChangeSet changeSet = changeSets.get(0);
assertEquals(0, changeSet.getVersion());
assertEquals(0, changeSet.getDrifts().size());
@@ -144,7 +144,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
changeSet = changeSets.get(1);
assertEquals(1, changeSet.getVersion());
assertEquals(1, changeSet.getDrifts().size());
- Drift drift = changeSet.getDrifts().iterator().next();
+ RhqDrift drift = changeSet.getDrifts().iterator().next();
assertEquals("dir/filename.ext", drift.getPath());
assertEquals("aaaaa", drift.getOldDriftFile().getHashId());
assertEquals("bbbbb", drift.getNewDriftFile().getHashId());
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index f6e657a..67658f5 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -24,15 +24,18 @@ import java.io.File;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.drift.DriftFile;
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.RhqDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.RhqDriftCriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftCategory;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.drift.DriftManagerLocal;
-import org.rhq.enterprise.server.plugin.pc.ControlFacet;
-import org.rhq.enterprise.server.plugin.pc.ControlResults;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
-import org.rhq.enterprise.server.util.LookupUtil;
import static org.rhq.enterprise.server.util.LookupUtil.getDriftManager;
@@ -67,6 +70,37 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
}
@Override
+ public PageList<DriftChangeSet> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria) {
+ RhqDriftChangeSetCriteria rhqCriteria = new RhqDriftChangeSetCriteria();
+ rhqCriteria.addFilterId(criteria.getFilterId());
+ rhqCriteria.addFilterResourceId(criteria.getFilterResourceId());
+ rhqCriteria.addFilterVersion(criteria.getFilterVersion());
+ rhqCriteria.addFilterCategory(criteria.getFilterCategory());
+ rhqCriteria.fetchDrifts(criteria.isFetchDrifts());
+
+ PageList<? extends DriftChangeSet> results = getDriftManager().findDriftChangeSetsByCriteria(subject,
+ rhqCriteria);
+ return (PageList<DriftChangeSet>) results;
+ }
+
+ @Override
+ public PageList<Drift> findDriftsByCriteria(Subject subject, DriftCriteria criteria) {
+ RhqDriftCriteria rhqCriteria = new RhqDriftCriteria();
+ rhqCriteria.addFilterId(criteria.getFilterId());
+ rhqCriteria.addFilterCategories(criteria.getFilterCategories().toArray(new DriftCategory[] {}));
+ rhqCriteria.addFilterChangeSetId(criteria.getFilterChangeSetId());
+ rhqCriteria.addFilterEndTime(criteria.getFilterEndTime());
+ rhqCriteria.addFilterPath(criteria.getFilterPath());
+ rhqCriteria.addFilterResourceIds(criteria.getFilterResourceIds().toArray(new Integer[] {}));
+ rhqCriteria.addFilterStartTime(criteria.getFilterStartTime());
+ rhqCriteria.fetchChangeSet(criteria.isFetchChangeSet());
+ rhqCriteria.addSortCtime(criteria.getSortCtime());
+
+ PageList<? extends Drift> results = getDriftManager().findDriftsByCriteria(subject, rhqCriteria);
+ return (PageList<Drift>) results;
+ }
+
+ @Override
public void saveChangeSet(int resourceId, File changeSetZip) throws Exception {
DriftManagerLocal driftMgr = getDriftManager();
driftMgr.storeChangeSet(resourceId, changeSetZip);
commit fc8d638828caaf235ddeff2bbe3dfd19dcbbf0a5
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Jul 18 13:25:26 2011 -0400
Initial commit for drift mongodb server plugin
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
new file mode 100644
index 0000000..8721db7
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -0,0 +1,249 @@
+<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-plugins-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.rhq</groupId>
+ <artifactId>drift-mongodb-serverplugin</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Drift Server MongoDB Plugin</name>
+ <description>Server side plugin providing MongoDB Backend for drift management</description>
+
+ <scm>
+ <connection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/modules/enterprise/server/...</connection>
+ <developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/modules/enterprise/server/...</developerConnection>
+ </scm>
+
+ <properties>
+ <scm.module.path>modules/enterprise/server/plugins/drift-mongodb/</scm.module.path>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-domain</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongo-java-driver</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.morphia</groupId>
+ <artifactId>morphia</artifactId>
+ <version>1.00-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>com.thoughtworks.proxytoys</groupId>
+ <artifactId>proxytoys</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <!--
+ <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
+ -->
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <id>morphia-repo</id>
+ <name>Morphia Repo</name>
+ <url>http://morphia.googlecode.com/svn/mavenrepo/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repositories>
+
+ <profiles>
+
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <rhq.rootDir>../../../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset>
+ <include name="META-INF/**" />
+ </patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>cobertura-plugins</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.cobertura</groupId>
+ <artifactId>cobertura</artifactId>
+ <version>${cobertura.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>cobertura-instrument</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <!-- prepare directory structure for cobertura-->
+ <mkdir dir="target/cobertura" />
+ <mkdir dir="target/cobertura/backup" />
+ <!-- backup all classes so that we can instrument the original classes-->
+ <copy toDir="target/cobertura/backup" verbose="true" overwrite="true">
+ <fileset dir="target/classes">
+ <include name="**/*.class" />
+ </fileset>
+ </copy>
+ <!-- create a properties file and save there location of cobertura data file-->
+ <touch file="target/classes/cobertura.properties" />
+ <echo file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
+ <taskdef classpathref="maven.plugin.classpath" resource="tasks.properties" />
+ <!-- instrument all classes in target/classes directory -->
+ <cobertura-instrument datafile="${project.build.directory}/cobertura/cobertura.ser" todir="${project.build.directory}/classes">
+ <fileset dir="${project.build.directory}/classes">
+ <include name="**/*.class" />
+ </fileset>
+ </cobertura-instrument>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>cobertura-report</id>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <tasks>
+ <taskdef classpathref="maven.plugin.classpath" resource="tasks.properties" />
+ <!-- prepare directory structure for cobertura-->
+ <mkdir dir="target/cobertura" />
+ <mkdir dir="target/site/cobertura" />
+ <!-- restore classes from backup folder to classes folder -->
+ <copy toDir="target/classes" verbose="true" overwrite="true">
+ <fileset dir="target/cobertura/backup">
+ <include name="**/*.class" />
+ </fileset>
+ </copy>
+ <!-- delete backup folder-->
+ <delete dir="target/cobertura/backup" />
+ <!-- create a code coverage report -->
+ <cobertura-report format="html" datafile="${project.build.directory}/cobertura/cobertura.ser" destdir="${project.build.directory}/site/cobertura">
+ <fileset dir="${basedir}/src/main/java">
+ <include name="**/*.java" />
+ </fileset>
+ </cobertura-report>
+ <!-- delete cobertura.properties file -->
+ <delete file="target/classes/cobertura.properties" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
new file mode 100644
index 0000000..d7c7202
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -0,0 +1,40 @@
+package org.rhq.enterprise.server.plugins.drift.mongodb;
+
+import java.io.File;
+
+import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
+
+public class MongoDBDriftServer implements DriftServerPluginFacet {
+
+ @Override
+ public void start() {
+
+ }
+
+ @Override
+ public void stop() {
+
+ }
+
+ @Override
+ public void shutdown() {
+
+ }
+
+ @Override
+ public void saveChangeSet(int resourceId, File changeSetZip) throws Exception {
+
+ }
+
+ @Override
+ public void saveChangeSetFiles(File changeSetFilesZip) throws Exception {
+
+ }
+
+ @Override
+ public void initialize(ServerPluginContext context) throws Exception {
+
+ }
+
+}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml
new file mode 100644
index 0000000..e1894d0
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<drift-plugin
+ version="1.0"
+ apiVersion="1.0"
+ description="The Drift Management MongoDB Persistence Store"
+ displayName="Drift:RHQ"
+ name="drift-mongodb"
+ package="org.rhq.enterprise.server.plugins.drift.MorphiaTest"
+ xmlns="urn:xmlns:rhq-serverplugin.drift"
+ xmlns:serverplugin="urn:xmlns:rhq-serverplugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <serverplugin:help><![CDATA[
+ Provides back-end store and retrieve for drift files.
+ ]]></serverplugin:help>
+
+ <serverplugin:plugin-component class="MongoDBDriftServer"/>
+
+ <drift diff-support="false" />
+
+</drift-plugin>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java
new file mode 100644
index 0000000..c88432e
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/MorphiaTest.java
@@ -0,0 +1,28 @@
+package org.rhq.enterprise.server.plugins.drift;
+
+import com.google.code.morphia.Datastore;
+import com.google.code.morphia.Morphia;
+import com.mongodb.DB;
+import com.mongodb.Mongo;
+
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.drift.DriftChangeSet;
+
+public class MorphiaTest {
+
+ @Test
+ public void connectToMongoDB() throws Exception {
+ Mongo connection = new Mongo("localhost");
+ DB db = connection.getDB("test");
+
+ Morphia morphia = new Morphia();
+ morphia.map(DriftChangeSet.class);
+
+ Datastore ds = morphia.createDatastore(connection, "test");
+
+// DriftChangeSet changeSet = new DriftChangeSet(null, 1, COVERAGE);
+// ds.save(changeSet);
+ }
+
+}
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index f3362ef..abf3f43 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -84,6 +84,7 @@
<module>alert-log4j</module>
<module>cobbler</module>
<module>drift-rhq</module>
+ <module>drift-mongodb</module>
<module>filetemplate-bundle</module>
<module>ant-bundle</module>
<module>validate-all-serverplugins</module>
12 years, 10 months
[rhq] Branch 'as7plugin' - 5 commits - modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java | 123 +++-------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DatasourceComponent.java | 21 -
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java | 3
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java | 11
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/LoggerComponent.java | 3
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java | 10
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java | 5
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java | 16 -
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java | 9
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java | 77 +++++-
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Attribute.java | 86 ------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/CompositeOperation.java | 4
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Domain.java | 53 ----
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/NetworkInterface.java | 45 ---
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java | 68 ++---
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/OperationDescription.java | 80 ------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadAttribute.java | 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenNames.java | 7
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenResources.java | 4
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadResource.java | 4
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Remove.java | 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/SocketBindingGroup.java | 47 ---
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Subsystem.java | 67 -----
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Tuple.java | 35 --
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Type.java | 50 ----
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/TypeModelValue.java | 39 ---
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 4
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/CompositeOperationTest.java | 29 --
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java | 6
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java | 23 -
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java | 78 ------
modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java | 9
32 files changed, 220 insertions(+), 808 deletions(-)
New commits:
commit fbdf7dc461b8b7f4d23dcbaec516cbd9c00e8eb5
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 21:35:16 2011 +0200
Get rid of the usage of List<PROPERTY_VALUE> and use Address uniformly. Also remove some unused classes.
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 9aa9db0..b2e1919 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
@@ -58,6 +58,7 @@ import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.ReadAttribute;
import org.rhq.modules.plugins.jbossas7.json.ReadChildrenNames;
import org.rhq.modules.plugins.jbossas7.json.ReadResource;
+import org.rhq.modules.plugins.jbossas7.json.Remove;
import org.rhq.modules.plugins.jbossas7.json.Result;
import java.io.OutputStream;
@@ -66,7 +67,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -85,6 +85,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
String myServerName;
ASConnection connection;
String path;
+ Address address;
String key;
String host;
int port;
@@ -96,7 +97,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
*/
public AvailabilityType getAvailability() {
- ReadResource op = new ReadResource(pathToAddress(path));
+ ReadResource op = new ReadResource(address);
Result res = connection.execute(op);
return res.isSuccess()? AvailabilityType.UP: AvailabilityType.DOWN;
@@ -122,6 +123,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
path = pluginConfiguration.getSimpleValue("path", null);
+ Address address = new Address(path);
key = context.getResourceKey();
myServerName = context.getResourceKey().substring(context.getResourceKey().lastIndexOf("/")+1);
@@ -156,7 +158,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
else {
// Metrics from the application server
- Operation op = new ReadAttribute(pathToAddress(path),req.getName()); // TODO batching
+ Operation op = new ReadAttribute(address,req.getName()); // TODO batching
Result res = connection.execute(op, false);
if (!res.isSuccess())
continue;
@@ -222,68 +224,25 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
public Configuration loadResourceConfiguration() throws Exception {
- List<PROPERTY_VALUE> address = pathToAddress(path);
ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef,connection,new Address(address));
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef,connection,address);
return delegate.loadResourceConfiguration();
}
public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- List<PROPERTY_VALUE> address = pathToAddress(path);
ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
- ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef,connection,new Address(address));
+ ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef,connection,address);
delegate.updateResourceConfiguration(report);
}
- /**
- * Convert a path in the form key=value,key=value... to a List of properties.
- * @param path Path to translate
- * @return List of properties
- */
- public List<PROPERTY_VALUE> pathToAddress(String path) {
- if (path==null || path.isEmpty())
- return Collections.emptyList();
-
- List<PROPERTY_VALUE> result = new ArrayList<PROPERTY_VALUE>();
- String[] components = path.split(",");
- for (String component : components) {
- String tmp = component.trim();
-
- if (tmp.contains("=")) {
- // strip / from the start of the key if it happens to be there
- if (tmp.startsWith("/"))
- tmp = tmp.substring(1);
-
- String[] pair = tmp.split("=");
- PROPERTY_VALUE valuePair = new PROPERTY_VALUE(pair[0], pair[1]);
- result.add(valuePair);
- }
- }
-
- return result;
- }
-
- public String addressToPath(List<PROPERTY_VALUE> address)
- {
- StringBuilder builder = new StringBuilder();
- Iterator<PROPERTY_VALUE> iter = address.iterator();
- while (iter.hasNext()) {
- PROPERTY_VALUE val = iter.next();
- builder.append(val.getKey()).append('=').append(val.getValue());
- if (iter.hasNext())
- builder.append(',');
- }
- return builder.toString();
- }
@Override
public void deleteResource() throws Exception {
log.info("delete resource: " + path + " ...");
- List<PROPERTY_VALUE> address = pathToAddress(path);
- Operation op = new Operation("remove", address);
+ Operation op = new Remove(address);
ComplexResult res = connection.executeComplex(op);
if (!res.isSuccess())
throw new IllegalArgumentException("Delete for [" + path + "] failed: " + res.getFailureDescription());
@@ -393,14 +352,13 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
result = connection.execute(cop);
- resourceKey = addressToPath(step1.getAddress());
+ resourceKey = step1.getAddress().getPath();
}
else {
- List<PROPERTY_VALUE> serverGroupAddress = new ArrayList<PROPERTY_VALUE>();
- serverGroupAddress.addAll(pathToAddress(context.getResourceKey()));
- serverGroupAddress.add(new PROPERTY_VALUE("deployment", deploymentName));
+ Address serverGroupAddress = new Address(context.getResourceKey());
+ serverGroupAddress.add("deployment", deploymentName);
Operation step2 = new Operation("add",serverGroupAddress);
cop.addStep(step2);
@@ -408,7 +366,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
Operation step3 = new Operation("deploy",serverGroupAddress);
cop.addStep(step3);
- resourceKey = addressToPath(serverGroupAddress);
+ resourceKey = serverGroupAddress.getPath();
if (verbose)
log.info("Deploy operation: " + cop);
@@ -447,26 +405,27 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
String op = name.substring(colonPos+1);
Operation operation=null;
- List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>();
+ Address theAddress = new Address();
if (what.equals("server-group")) {
String groupName = parameters.getSimpleValue("name","");
String profile = parameters.getSimpleValue("profile","default");
- address.add(new PROPERTY_VALUE("server-group",groupName));
+ theAddress.add("server-group", groupName);
- operation = new Operation(op,address,"profile",profile);
+ operation = new Operation(op,theAddress);
+ operation.addAdditionalProperty("profile",profile);
} else if (what.equals("server")) {
if (context.getResourceType().getName().equals("JBossAS-Managed")) {
String host = pluginConfiguration.getSimpleValue("domainHost","local");
- address.add(new PROPERTY_VALUE("host",host));
- address.add(new PROPERTY_VALUE("server-config",myServerName));
- operation = new Operation(op,address);
+ theAddress.add("host", host);
+ theAddress.add("server-config", myServerName);
+ operation = new Operation(op,theAddress);
}
else if (context.getResourceType().getName().equals("Host")) {
- address.addAll(pathToAddress(getPath()));
+ theAddress.add(address);
String serverName = parameters.getSimpleValue("name",null);
- address.add(new PROPERTY_VALUE("server-config",serverName));
+ theAddress.add("server-config", serverName);
Map<String,Object> props = new HashMap<String, Object>();
String serverGroup = parameters.getSimpleValue("group",null);
props.put("group",serverGroup);
@@ -477,16 +436,16 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
// TODO put more properties in
}
- operation = new Operation(op,address,props);
+ operation = new Operation(op,theAddress,props);
}
else {
- operation = new Operation(op,address);
+ operation = new Operation(op,theAddress);
}
} else if (what.equals("destination")) {
- address.addAll(pathToAddress(getPath()));
+ theAddress.add(address);
String newName = parameters.getSimpleValue("name","");
String type = parameters.getSimpleValue("type","jms-queue").toLowerCase();
- address.add(new PROPERTY_VALUE(type,newName));
+ theAddress.add(type, newName);
PropertyList jndiNamesProp = parameters.getList("entries");
if (jndiNamesProp==null || jndiNamesProp.getList().isEmpty()) {
OperationResult fail = new OperationResult();
@@ -499,7 +458,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
jndiNames.add(ps.getStringValue());
}
- operation = new Operation(op,address);
+ operation = new Operation(op,theAddress);
operation.addAdditionalProperty("entries",jndiNames);
if (type.equals("jms-queue")) {
PropertySimple ps = (PropertySimple) parameters.get("durable");
@@ -509,7 +468,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
String selector = parameters.getSimpleValue("selector","");
if (!selector.isEmpty())
- operation.addAdditionalProperty("selector",selector);
+ operation.addAdditionalProperty("selector", selector);
}
@@ -523,8 +482,8 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
String autostartS = parameters.getSimpleValue("auto-start","false");
boolean autoStart = Boolean.getBoolean(autostartS);
- address.add(new PROPERTY_VALUE("host", chost));
- address.add(new PROPERTY_VALUE("server-config",serverName));
+ theAddress.add("host", chost);
+ theAddress.add("server-config", serverName);
Map<String,Object> props = new HashMap<String, Object>();
props.put("name",serverName);
props.put("group",serverGroup);
@@ -532,9 +491,9 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
props.put("socket-binding-port-offset",port);
props.put("auto-start",autoStart);
- operation = new Operation(op,address,props);
+ operation = new Operation(op,theAddress,props);
} else if (what.equals("domain")) {
- operation = new Operation(op,Collections.<PROPERTY_VALUE>emptyList());
+ operation = new Operation(op,new Address());
} else if (what.equals("domain-deployment")) {
if (op.equals("promote")) {
String serverGroup = parameters.getSimpleValue("server-group","-not set-");
@@ -557,18 +516,19 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
operation = new CompositeOperation();
for (String theGroup : serverGroups) {
- address = new ArrayList<PROPERTY_VALUE>();
- address.add(new PROPERTY_VALUE("server-group",theGroup));
+ theAddress = new Address();
+ theAddress.add("server-group",theGroup);
- address.add(new PROPERTY_VALUE("deployment", resourceKey));
- Operation step = new Operation("add",address,"enabled",enabled);
+ theAddress.add("deployment", resourceKey);
+ Operation step = new Operation("add",theAddress);
+ step.addAdditionalProperty("enabled",enabled);
((CompositeOperation)operation).addStep(step);
}
}
} else if (what.equals("naming")) {
if (op.equals("jndi-view")) {
- address.addAll(pathToAddress(getPath()));
- operation = new Operation("jndi-view",address);
+ theAddress.add(address);
+ operation = new Operation("jndi-view",theAddress);
}
}
@@ -597,7 +557,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
@SuppressWarnings("unchecked")
private Collection<String> getServerGroups() {
- Operation op = new ReadChildrenNames(Collections.<PROPERTY_VALUE>emptyList(),"server-group");
+ Operation op = new ReadChildrenNames(new Address(),"server-group");
Result res = connection.execute(op);
return (Collection<String>) res.getResult();
@@ -633,7 +593,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
public void setPath(String path) {
this.path = path;
+ this.address = new Address(path);
}
+ public Address getAddress() {
+ return address;
+ }
+
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DatasourceComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DatasourceComponent.java
index 91f2875..1a44230 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DatasourceComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DatasourceComponent.java
@@ -11,6 +11,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.Result;
@@ -36,10 +37,11 @@ public class DatasourceComponent extends BaseComponent implements OperationFacet
String drivername = parameters.getSimpleValue("driver-name", NOTSET);
- List<PROPERTY_VALUE> address = pathToAddress(getPath());
- address.add(new PROPERTY_VALUE("jdbc-driver",drivername));
+ Address theAddress = new Address(address);
+ theAddress.add("jdbc-driver", drivername);
- op = new Operation("add",address,"driver-name",drivername);
+ op = new Operation("add",theAddress);
+ op.addAdditionalProperty("driver-name",drivername);
op.addAdditionalProperty("deployment-name",parameters.getSimpleValue("deployment-name", NOTSET));
op.addAdditionalProperty("driver-class-name",parameters.getSimpleValue("driver-class-name", NOTSET));
@@ -48,9 +50,9 @@ public class DatasourceComponent extends BaseComponent implements OperationFacet
else if (operationName.equals("addDatasource")) {
String name = parameters.getSimpleValue("name",NOTSET);
- List<PROPERTY_VALUE> address = pathToAddress(getPath());
- address.add(new PROPERTY_VALUE("data-source",name));
- op = new Operation("add",address);
+ Address theAddress = new Address(address);
+ theAddress.add("data-source", name);
+ op = new Operation("add",theAddress);
addRequiredToOp(op,parameters,"driver-name");
addRequiredToOp(op,parameters,"jndi-name");
addRequiredToOp(op, parameters, "pool-name");
@@ -61,9 +63,9 @@ public class DatasourceComponent extends BaseComponent implements OperationFacet
else if (operationName.equals("addXADatasource")) {
String name = parameters.getSimpleValue("name",NOTSET);
- List<PROPERTY_VALUE> address = pathToAddress(getPath());
- address.add(new PROPERTY_VALUE("xa-data-source",name));
- op = new Operation("add",address);
+ Address theAddress = new Address(address);
+ theAddress.add("xa-data-source",name);
+ op = new Operation("add",theAddress);
addRequiredToOp(op,parameters,"driver-name");
addRequiredToOp(op,parameters,"jndi-name");
addRequiredToOp(op,parameters,"pool-name");
@@ -81,7 +83,6 @@ public class DatasourceComponent extends BaseComponent implements OperationFacet
/*
* This is a catch all for operations that are not explicitly treated above.
*/
- List<PROPERTY_VALUE> address = pathToAddress(getPath());
op = new Operation(operationName,address);
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
index f2ca5e2..df5362c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
@@ -23,6 +23,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -76,7 +77,7 @@ public class Domain2Descriptor {
ASConnection conn = new ASConnection("localhost",9990);
- List<PROPERTY_VALUE> address = pathToAddress(path);
+ Address address = new Address(path);
Operation op = new Operation("read-resource-description",address);
op.addAdditionalProperty("recursive","true");
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
index 951430c..ec51a16 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
@@ -34,6 +34,7 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -56,11 +57,11 @@ public class JmsComponent extends BaseComponent {
String type = pConf.getSimpleValue("path", "");
- List<PROPERTY_VALUE> address = pathToAddress(getPath());
- address.add(new PROPERTY_VALUE(type,report.getUserSpecifiedResourceName()));
- Operation op = new Operation("add",address);
+ Address theAddress = new Address(address);
+ theAddress.add(type, report.getUserSpecifiedResourceName());
+ Operation op = new Operation("add",theAddress);
- // Loop over the properties from the config and add them as properties to the op
+ // Loop over the properties from the config and add them as properties to the op TODO make generally available ?
for (Map.Entry<String, Property> entry: resConf.getAllProperties().entrySet()) {
Property value = entry.getValue();
if (value !=null) {
@@ -93,7 +94,7 @@ public class JmsComponent extends BaseComponent {
report.setStatus(CreateResourceStatus.FAILURE);
} else {
report.setStatus(CreateResourceStatus.SUCCESS);
- report.setResourceKey(address.toString());
+ report.setResourceKey(theAddress.toString());
report.setResourceName(report.getUserSpecifiedResourceName());
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/LoggerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/LoggerComponent.java
index f0d5e89..67df4d9 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/LoggerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/LoggerComponent.java
@@ -22,7 +22,6 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.tools.ant.taskdefs.Sleep;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.Property;
@@ -43,7 +42,7 @@ public class LoggerComponent extends BaseComponent {
public OperationResult invokeOperation(String name,
Configuration parameters) throws InterruptedException, Exception {
- Operation op = new Operation(name,pathToAddress(getPath()));
+ Operation op = new Operation(name,address);
Map<String,Property> propertyMap = parameters.getAllProperties();
for (Map.Entry<String,Property> entry : propertyMap.entrySet()) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
index 64ac2b6..77668dc 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
@@ -22,8 +22,10 @@ import java.util.ArrayList;
import java.util.List;
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
+import org.rhq.modules.plugins.jbossas7.json.ReadAttribute;
import org.rhq.modules.plugins.jbossas7.json.Result;
/**
@@ -43,11 +45,11 @@ public class ManagedASComponent extends BaseComponent {
public AvailabilityType getAvailability() {
if (context.getResourceType().getName().equals("JBossAS-Managed")) {
- List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(2);
+ Address theAddress = new Address();
String host = pluginConfiguration.getSimpleValue("domainHost","local");
- address.add(new PROPERTY_VALUE("host",host));
- address.add(new PROPERTY_VALUE("server-config",myServerName));
- Operation getStatus = new Operation("read-attribute",address,"name","status");
+ theAddress.add("host",host);
+ theAddress.add("server-config", myServerName);
+ Operation getStatus = new ReadAttribute(theAddress,"status");
Result result = null;
try {
result = connection.execute(getStatus);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 287cec7..7764e63 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -37,6 +37,7 @@ import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.system.ProcessInfo;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -123,8 +124,8 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
private ServerInfo getBindingsFromDC(HostPort domainController, String serverGroup) {
ASConnection dcConnection = new ASConnection(domainController.host, domainController.port);
List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>();
- address.add(new PROPERTY_VALUE("server-group", serverGroup));
- Operation op = new ReadResource(address);
+ Address theAddress = new Address("server-group", serverGroup);
+ Operation op = new ReadResource(theAddress);
ComplexResult res = (ComplexResult) dcConnection.execute(op, true);
if (res.isSuccess()) {
if (res.getResult().containsKey("socket-binding-group")) {
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 750743b..c703635 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
@@ -29,8 +29,6 @@ import java.util.Set;
import org.codehaus.jackson.JsonNode;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.content.PackageDetailsKey;
import org.rhq.core.domain.content.PackageType;
import org.rhq.core.domain.content.transfer.ContentResponseResult;
@@ -39,12 +37,10 @@ import org.rhq.core.domain.content.transfer.DeployPackageStep;
import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.content.ContentContext;
import org.rhq.core.pluginapi.content.ContentFacet;
import org.rhq.core.pluginapi.content.ContentServices;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
@@ -90,8 +86,8 @@ public class ServerGroupComponent extends ManagedASComponent implements ContentF
String hash = resultNode.get("BYTES_VALUE").getTextValue();
ASConnection connection = getASConnection();
- List<PROPERTY_VALUE> deploymentsAddress = new ArrayList<PROPERTY_VALUE>(1);
- deploymentsAddress.add(new PROPERTY_VALUE("deployment", fileName));
+ Address deploymentsAddress = new Address();
+ deploymentsAddress.add("deployment", fileName);
Operation step1 = new Operation("add",deploymentsAddress);
// step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
List<Object> content = new ArrayList<Object>(1);
@@ -102,9 +98,8 @@ public class ServerGroupComponent extends ManagedASComponent implements ContentF
step1.addAdditionalProperty("name", fileName);
- List<PROPERTY_VALUE> serverGroupAddress = new ArrayList<PROPERTY_VALUE>(1);
- serverGroupAddress.addAll(pathToAddress(context.getResourceKey()));
- serverGroupAddress.add(new PROPERTY_VALUE("deployment", fileName));
+ Address serverGroupAddress = new Address(context.getResourceKey());
+ serverGroupAddress.add("deployment", fileName);
Operation step2 = new Operation("add",serverGroupAddress);
Operation step3 = new Operation("deploy",serverGroupAddress);
@@ -144,9 +139,8 @@ public class ServerGroupComponent extends ManagedASComponent implements ContentF
@Override
public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
- List<PROPERTY_VALUE> serverGroupAddress = pathToAddress(path);
- Operation op = new ReadChildrenNames(serverGroupAddress,"deployment"); // TODO read full packages not only names
+ Operation op = new ReadChildrenNames(address,"deployment"); // TODO read full packages not only names
Result node = connection.execute(op);
if (!node.isSuccess())
return null;
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
index f202029..bc7e341 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
@@ -23,7 +23,7 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ReadChildrenNames;
import org.rhq.modules.plugins.jbossas7.json.ReadResource;
import org.rhq.modules.plugins.jbossas7.json.Result;
@@ -31,13 +31,11 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
@@ -108,10 +106,9 @@ public class SubsystemDiscovery implements ResourceDiscoveryComponent<BaseCompon
Result result ;
if (!recursive)
- result = connection.execute(new ReadResource(parentComponent.pathToAddress(path)));
+ result = connection.execute(new ReadResource(parentComponent.getAddress()));
else {
- List<PROPERTY_VALUE> addr ;
- addr = parentComponent.pathToAddress(parentPath);
+ Address addr = new Address(parentPath);
result = connection.execute(new ReadChildrenNames(addr, childType));
}
if (result.isSuccess()) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index cb63263..c0a9196 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -19,38 +19,60 @@
package org.rhq.modules.plugins.jbossas7.json;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
/**
* An address in AS7
* @author Heiko W. Rupp
*/
public class Address {
+ /** List of individual path components */
List<PROPERTY_VALUE> path;
+
+ /** Create an empty address */
public Address() {
path = new ArrayList<PROPERTY_VALUE>();
}
+ /**
+ * Create an Address with an intial path element
+ * @param key key part of the path
+ * @param value value part of the path
+ */
public Address(String key, String value) {
this();
add(key,value);
}
+ /**
+ * Construct an Addres by cloning another
+ * @param other Address to clone
+ */
public Address(Address other) {
this();
if (other!=null && other.path!=null)
path.addAll(other.path);
}
- public Address(List<PROPERTY_VALUE> other) {
+ /**
+ * Construct an address from the passed list of path segments of property values. Should not be used
+ * outside the json package
+ * @param property_values list of values, each describing a key-value pair of a path
+ */
+ Address(List<PROPERTY_VALUE> property_values) {
this();
- if (other!=null)
- path.addAll(other);
+ if (property_values!=null)
+ path.addAll(property_values);
}
+ /**
+ * Construct an Address from a path in the form (key=value)?(,key=value)*
+ * @param path Path string to parse
+ */
public Address(String path) {
this();
if (path==null || path.isEmpty())
@@ -72,6 +94,11 @@ public class Address {
}
+ /**
+ * Add a key value pair to the path
+ * @param key Key part of this path element
+ * @param value Value part of this path element
+ */
public void add(String key, String value) {
path.add(new PROPERTY_VALUE(key,value));
}
@@ -97,6 +124,11 @@ public class Address {
return builder.toString();
}
+ /**
+ * Returns the Address as a string
+ * @return list of key value pairs for this path
+ */
+ @JsonIgnore
public String getPath() {
StringBuilder builder = new StringBuilder();
Iterator<PROPERTY_VALUE> iter = path.iterator();
@@ -109,4 +141,41 @@ public class Address {
return builder.toString();
}
+
+ /**
+ * Add a whole address to the given path
+ * @param address Other address
+ * @see #Address(Address)
+ */
+ public void add(Address address) {
+ if (address!=null && address.path!=null)
+ this.path.addAll(address.path);
+ }
+
+ /**
+ * Indicates if this Address has path elements
+ * @return true if the address has no path elements
+ */
+ @JsonIgnore
+ public boolean isEmpty() {
+ return path.isEmpty();
+ }
+
+ /**
+ * Returns the number of path elements of this address
+ * @return the number of path elements of this address
+ */
+ public int size() {
+ return path.size();
+ }
+
+ /**
+ * Returns the n'th path element of the address
+ * @param n Number of the wanted path element
+ * @return A string representation of the wanted element
+ */
+ public String get(int n) {
+ PROPERTY_VALUE property_value = path.get(n);
+ return property_value.getKey() + "=" + property_value.getValue();
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Attribute.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Attribute.java
deleted file mode 100644
index 02dbb5d..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Attribute.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * @author Heiko W. Rupp
- */
-public class Attribute {
-
- public String name;
- public String description;
- public boolean required;
- public boolean nillable;
- @JsonProperty("access-type")
- public AccessType accessType;
- public Storage storage;
- public Type type;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("Attribute");
- sb.append("{name='").append(name).append('\'');
- sb.append(", description='").append(description).append('\'');
- sb.append(", required=").append(required);
- sb.append(", nillable=").append(nillable);
- sb.append(", accessType='").append(accessType).append('\'');
- sb.append(", storage='").append(storage).append('\'');
- sb.append(", type=").append(type);
- sb.append('}');
- return sb.toString();
- }
-
-
- public enum AccessType {
- METRIC("metric"),
- READ_ONLY("read-only")
- ;
-
- String jsonName;
-
- AccessType(String jsonName) {
- this.jsonName = jsonName;
- }
-
- @Override
- public String toString() {
- return jsonName;
- }
- }
-
- public enum Storage {
- CONFIGURATION("configuration"),
- RUNTIME("runtime")
- ;
-
- String jsonName;
-
- Storage(String jsonName) {
- this.jsonName =jsonName;
- }
-
- @Override
- public String toString() {
- return jsonName;
- }
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/CompositeOperation.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/CompositeOperation.java
index b01e15d..d6ecef0 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/CompositeOperation.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/CompositeOperation.java
@@ -39,12 +39,12 @@ public class CompositeOperation extends Operation {
OperationHeaders operationHeaders;
public CompositeOperation(List<Operation> steps) {
- super("composite",new ArrayList<PROPERTY_VALUE>());
+ super("composite",new Address());
this.steps = steps;
}
public CompositeOperation() {
- super("composite",new ArrayList<PROPERTY_VALUE>());
+ super("composite",new Address());
}
public void addStep(Operation step) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Domain.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Domain.java
deleted file mode 100644
index 8600c15..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Domain.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * @author Heiko W. Rupp
- */
-public class Domain {
-
-
- public String name;
- @JsonProperty("management-interfaces") Map<String,String> managementInterfaces;
- @JsonProperty("profile-name") String profileName;
- public Map<String,String> path;
- public Map<String,String> subsystem;
- @JsonProperty("interface")
- public Map<String,String> interfaces;
- @JsonProperty("socket-binding-group")
- public Map<String,String> socketBindingGroup;
-
- @Override
- public String toString() {
- return "Domain{" +
- "name='" + name + '\'' +
- ", managementInterfaces=" + managementInterfaces +
- ", profileName='" + profileName + '\'' +
- ", path=" + path +
- ", subsystem=" + subsystem +
- ", interfaces=" + interfaces +
- ", socketBindingGroup=" + socketBindingGroup +
- '}';
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/NetworkInterface.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/NetworkInterface.java
deleted file mode 100644
index 0af6ed1..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/NetworkInterface.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * @author Heiko W. Rupp
- */
-public class NetworkInterface {
-
- public String name;
- public String description;
- @JsonProperty("attributes")
- public
- Map<String,Attribute> attributes;
-
-
- @Override
- public String toString() {
- return "NetworkInterface{" +
- "name='" + name + '\'' +
- ", description='" + description + '\'' +
- ", attributes=" + attributes +
- '}';
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
index 4fedcd5..0517ee1 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
@@ -18,7 +18,6 @@
*/
package org.rhq.modules.plugins.jbossas7.json;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -35,43 +34,34 @@ import org.codehaus.jackson.annotate.JsonProperty;
*/
public class Operation {
- private String operation;
@JsonProperty
- private List<PROPERTY_VALUE> address = Collections.emptyList();
+ private String operation;
+ @JsonProperty(value = "address")
+ private List<PROPERTY_VALUE> _address ;
+ @JsonIgnore
+ Address address ;
private Map<String,Object> additionalProperties;
- public Operation(String operation, List<PROPERTY_VALUE> address, Map<String,Object> payload) {
- this.operation = operation;
- this.address = address;
- this.additionalProperties = payload;
- }
-
- public Operation(String operation, List<PROPERTY_VALUE> address, String key, Object value) {
- this.operation = operation;
- this.address = address;
- additionalProperties = new HashMap<String,Object>(1);
- additionalProperties.put(key,value);
-
- }
-
- public Operation(String operation, List<PROPERTY_VALUE> address) {
- this.operation = operation;
- this.address = address;
-
- }
-
public Operation(String operation, String addressKey, String addressValue) {
this.operation = operation;
- List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(1);
- address.add(new PROPERTY_VALUE(addressKey, addressValue));
- this.address = address;
+ this.address = new Address(addressKey,addressValue);
+ this._address = address.path;
}
public Operation(String operation, Address address) {
this.operation = operation;
- if (address!=null)
- this.address = address.path;
+ if (address!=null && address.path!=null) {
+ this.address = address;
+ this._address = address.path;
+ } else {
+ _address = Collections.emptyList();
+ }
+ }
+
+ public Operation(String operation, Address address, Map<String, Object> additionalProperties) {
+ this(operation,address);
+ this.additionalProperties = additionalProperties;
}
public Operation() {
@@ -85,6 +75,7 @@ public class Operation {
additionalProperties.put(key,value);
}
+ @SuppressWarnings("unused")
public void setAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
}
@@ -111,28 +102,19 @@ public class Operation {
return null;
}
+ @JsonProperty
public String getOperation() {
return operation;
}
- public void setOperation(String operation) {
- this.operation = operation;
- }
-
- public List<PROPERTY_VALUE> getAddress() {
+ @JsonIgnore
+ public Address getAddress() {
+ if (address==null) {
+ address = new Address(_address);
+ }
return address;
}
- public void setAddress(List<PROPERTY_VALUE> address) {
- this.address = address;
- }
-
- public List<PROPERTY_VALUE> addToAddress(PROPERTY_VALUE component) {
- if (address==null)
- address = new ArrayList<PROPERTY_VALUE>();
- address.add(component);
- return address;
- }
@Override
public String toString() {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/OperationDescription.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/OperationDescription.java
deleted file mode 100644
index 18b3a40..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/OperationDescription.java
+++ /dev/null
@@ -1,80 +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.modules.plugins.jbossas7.json;
-
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * // TODO: Document this
- * @author Heiko W. Rupp
- */
-public class OperationDescription {
- @JsonProperty("operation-name")
- public String operationName;
- public String description;
- @JsonProperty("request-properties")
- public Map<String,As7RequestProperty> requestProperties;
-// @JsonProperty("reply-properties")
-// public ArrayList<As7ReplyProperty> replyProperties;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("OperationDescription");
- sb.append("{operationName='").append(operationName).append('\'');
- sb.append(", description='").append(description).append('\'');
- sb.append(", requestProperties=").append(requestProperties);
-// sb.append(", replyProperties=").append(replyProperties);
- sb.append('}');
- return sb.toString();
- }
-
- public static class As7RequestProperty {
- public String description;
- public boolean required;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("As7RequestProperty");
- sb.append("{description='").append(description).append('\'');
- sb.append(", required=").append(required);
- sb.append('}');
- return sb.toString();
- }
- }
-
- public static class As7ReplyProperty {
- @JsonProperty("value-type")
- public String valueType;
- public String description;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("As7ReplyProperty");
- sb.append("{valueType='").append(valueType).append('\'');
- sb.append(", description='").append(description).append('\'');
- sb.append('}');
- return sb.toString();
- }
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadAttribute.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadAttribute.java
index 3f85c78..94da97d 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadAttribute.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadAttribute.java
@@ -18,18 +18,12 @@
*/
package org.rhq.modules.plugins.jbossas7.json;
-import java.util.List;
-
/**
* Read Attribute operation
* @author Heiko W. Rupp
*/
public class ReadAttribute extends Operation {
- public ReadAttribute(List<PROPERTY_VALUE> address, String name) {
- super("read-attribute",address,"name",name);
- }
-
public ReadAttribute(Address address, String name) {
super("read-attribute",address);
addAdditionalProperty("name",name);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenNames.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenNames.java
index e521e83..514767e 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenNames.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenNames.java
@@ -18,8 +18,6 @@
*/
package org.rhq.modules.plugins.jbossas7.json;
-import java.util.List;
-
/**
* Operation that reads names of children of a given type from an address
* @author Heiko W. Rupp
@@ -31,7 +29,8 @@ public class ReadChildrenNames extends Operation {
* @param address Address to look at e.g. /profile/default/subsystem/messaging
* @param childType e.g. queue
*/
- public ReadChildrenNames(List<PROPERTY_VALUE> address, String childType) {
- super("read-children-names",address,"child-type",childType);
+ public ReadChildrenNames(Address address, String childType) {
+ super("read-children-names",address);
+ addAdditionalProperty("child-type",childType);
}
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenResources.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenResources.java
index 524bfc9..fbb8187 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenResources.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadChildrenResources.java
@@ -31,10 +31,6 @@ public class ReadChildrenResources extends Operation {
* @param address Address to look at e.g. /profile/default/subsystem/messaging
* @param childType e.g. queue
*/
- public ReadChildrenResources(List<PROPERTY_VALUE> address, String childType) {
- super("read-children-resources",address,"child-type",childType);
- }
-
public ReadChildrenResources(Address address, String childType) {
super("read-children-resources",address);
addAdditionalProperty("child-type",childType);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadResource.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadResource.java
index c81a653..5cd5aa3 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadResource.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/ReadResource.java
@@ -28,10 +28,6 @@ public class ReadResource extends Operation {
private static final String READ_RESOURCE = "read-resource";
- public ReadResource(List<PROPERTY_VALUE> address) {
- super(READ_RESOURCE, address);
- }
-
public ReadResource(String resourceType,String typeValue) {
super(READ_RESOURCE,resourceType,typeValue);
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Remove.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Remove.java
index 09a5cfb..2d1eb79 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Remove.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Remove.java
@@ -18,8 +18,6 @@
*/
package org.rhq.modules.plugins.jbossas7.json;
-import java.util.List;
-
/**
* The :remove operation
* @author Heiko W. Rupp
@@ -32,10 +30,6 @@ public class Remove extends Operation{
super("remove",address);
}
- public Remove(List<PROPERTY_VALUE> address) {
- super(REMOVE,address);
- }
-
public Remove(String key, String value) {
super(REMOVE,key,value);
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/SocketBindingGroup.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/SocketBindingGroup.java
deleted file mode 100644
index 5d2b6ee..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/SocketBindingGroup.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * One Socket binding group of a domain
- * @author Heiko W. Rupp
- */
-public class SocketBindingGroup {
-
-
- public String name;
- @JsonProperty("default-interface") public String defaultInterface;
- @JsonProperty("port-offset") public int portOffset;
- @JsonProperty("socket-binding") public Map<String,Binding> bindings;
-
-
- public static class Binding {
- public String name;
- @JsonProperty("interface") public String iFace;
- public int port;
- @JsonProperty("fixed-port") public Integer fixedPort;
- @JsonProperty("multicast-address") public String mcastAddress;
- @JsonProperty("multicast-port") public Integer mcastPort;
-
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Subsystem.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Subsystem.java
deleted file mode 100644
index 7774cd3..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Subsystem.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * @author Heiko W. Rupp
- */
-public class Subsystem {
-
- String subsystemName;
-
- @JsonProperty("head-comment-allowed") boolean headCommentAllowed;
- @JsonProperty("tail-comment-allowed") boolean tailCommentAllowed;
-// public DataType type;
- public String description;
- @JsonProperty("attributes") Map <String,Attribute> attributes;
- @JsonProperty("model-description")
- Subsystem modelDescription;
- @JsonProperty("operations") Map<String,OperationDescription> operations = new HashMap<String, OperationDescription>();
- public Map<String,Subsystem> children;
-
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("Subsystem");
- sb.append("{headCommentAllowed=").append(headCommentAllowed);
- sb.append(", tailCommentAllowed=").append(tailCommentAllowed);
-// sb.append(", type=").append(type).append('\n');
- sb.append(", description='").append(description).append('\'').append('\n');
- sb.append(", attributes=\n");
- if (attributes!=null) {
- for (Map.Entry<String,Attribute> attr : attributes.entrySet())
- sb.append(" ").append(attr).append('\n');
- }
- sb.append(", model-description=").append(modelDescription).append('\n');
- sb.append("\n, operations=");
- if (operations!=null) {
- for (Map.Entry<String,OperationDescription> ops : operations.entrySet())
- sb.append(" ").append(ops).append('\n');
- }
- sb.append(", children=").append(children).append('\n');
- sb.append("\n}");
- return sb.toString();
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Tuple.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Tuple.java
deleted file mode 100644
index 01e31d3..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Tuple.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-/**
- * @author Heiko W. Rupp
- */
-public class Tuple {
- String key;
- String value;
-
- @Override
- public String toString() {
- return "Tuple{" +
- "key='" + key + '\'' +
- ", value='" + value + '\'' +
- '}';
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Type.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Type.java
deleted file mode 100644
index 0ad1fe8..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Type.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-/**
- * // TODO: Document this
- * @author Heiko W. Rupp
- */
-public class Type {
-
- @JsonProperty("TYPE_MODEL_VALUE")
- public DataType modelValue;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("Type");
- sb.append("{modelValue='").append(modelValue).append('\'');
- sb.append('}');
- return sb.toString();
- }
-
- public enum DataType {
- STRING,
- INT,
- BOOLEAN,
- OBJECT,
- LIST
-
- ;
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/TypeModelValue.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/TypeModelValue.java
deleted file mode 100644
index 6856adb..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/TypeModelValue.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7.json;
-
-/**
- * // TODO: Document this
- * @author Heiko W. Rupp
- */
-public class TypeModelValue {
-
- public String TYPE_MODEL_VALUE;
- public String value;
-
- @Override
- public String toString() {
- final StringBuilder sb = new StringBuilder();
- sb.append("TypeModelValue");
- sb.append("{TYPE_MODEL_VALUE='").append(TYPE_MODEL_VALUE).append('\'');
- sb.append(", value='").append(value).append('\'');
- sb.append('}');
- return sb.toString();
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/CompositeOperationTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/CompositeOperationTest.java
index dddbe51..d0ead25 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/CompositeOperationTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/CompositeOperationTest.java
@@ -18,14 +18,11 @@
*/
package org.rhq.modules.plugins.jbossas7;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.testng.annotations.Test;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -39,13 +36,10 @@ public class CompositeOperationTest {
public void serializationTest() throws Exception {
- List<PROPERTY_VALUE> address=new ArrayList<PROPERTY_VALUE>(3);
- PROPERTY_VALUE part = new PROPERTY_VALUE("subsystem","web");
- address.add(part);
- part = new PROPERTY_VALUE("connector","http");
- address.add(part);
- part = new PROPERTY_VALUE("profile","default");
- address.add(part);
+ Address address= new Address();
+ address.add("subsystem","web");
+ address.add("connector","http");
+ address.add("profile","default");
CompositeOperation op = new CompositeOperation();
@@ -68,18 +62,19 @@ public class CompositeOperationTest {
public void serializationTest2() throws Exception {
- List<PROPERTY_VALUE> deploymentsAddress = new ArrayList<PROPERTY_VALUE>(1);
+ Address deploymentsAddress = new Address();
String TEST_WAR = "test.war";
- deploymentsAddress.add(new PROPERTY_VALUE("deployment", TEST_WAR));
+ deploymentsAddress.add("deployment", TEST_WAR);
Operation step1 = new Operation("add",deploymentsAddress);
String bytes_value = "123";
step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", bytes_value));
step1.addAdditionalProperty("name", TEST_WAR);
- List<PROPERTY_VALUE> serverGroupAddress = new ArrayList<PROPERTY_VALUE>(1);
- serverGroupAddress.add(new PROPERTY_VALUE("server-group","main-server-group"));
- serverGroupAddress.add(new PROPERTY_VALUE("deployment", TEST_WAR));
- Operation step2 = new Operation("add",serverGroupAddress,"enabled","true");
+ Address serverGroupAddress = new Address();
+ serverGroupAddress.add("server-group","main-server-group");
+ serverGroupAddress.add("deployment", TEST_WAR);
+ Operation step2 = new Operation("add",serverGroupAddress);
+ step2.addAdditionalProperty("enabled","true");
Operation step3 = new Operation("remove",serverGroupAddress);
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
index 3510b71..1551d43 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
@@ -261,9 +261,7 @@ public class ConfigurationUpdatingTest extends AbstractConfigurationHandlingTest
assert step3.getAdditionalProperties().get("name").equals("fixed-port");
assert step3.getAdditionalProperties().get("value").equals("false");
- assert step2.getAddress().get(0).getKey().equals("socket-binding");
- assert step2.getAddress().get(0).getValue().equals("http");
- assert step3.getAddress().get(0).getKey().equals("socket-binding");
- assert step3.getAddress().get(0).getValue().equals("http");
+ assert step2.getAddress().get(0).equals("socket-binding=http");
+ assert step3.getAddress().get(0).equals("socket-binding=http");
}
}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
index a066657..354ab8d 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
@@ -45,20 +45,19 @@ public class OperationJsonTest {
public void operationSerDeserTest() throws Exception{
- List<PROPERTY_VALUE> address=new ArrayList<PROPERTY_VALUE>(2);
- PROPERTY_VALUE part = new PROPERTY_VALUE("subsystem","web");
- address.add(part);
- part = new PROPERTY_VALUE("connector","http");
- address.add(part);
+ Address address= new Address();
+ address.add("subsystem","web");
+ address.add("connector","http");
- Operation operation = new WriteAttribute(new Address(address),"socket-binding","jndi");
+ Operation operation = new WriteAttribute(address,"socket-binding","jndi");
ObjectMapper mapper = new ObjectMapper();
String result = mapper.writeValueAsString(operation);
-
Operation op = mapper.readValue(result,Operation.class);
+ assert op!=null;
+ assert op.getOperation()!=null : "op.operation was null!";
assert op.getOperation().equals(operation.getOperation()) : "Operation is " + op.getOperation();
assert op.getName().equals("socket-binding") : "attribute name is " + op.getName();
assert op.getValue().equals("jndi") : "attribute value is " + op.getValue();
@@ -80,9 +79,8 @@ public class OperationJsonTest {
public void anyPayloadTest() throws Exception {
- List<PROPERTY_VALUE> address=new ArrayList<PROPERTY_VALUE>(2);
- PROPERTY_VALUE part = new PROPERTY_VALUE("/server-group","newOne");
- address.add(part);
+ Address address= new Address();
+ address.add("/server-group","newOne");
Map<String,Object> props = new HashMap<String, Object>();
props.put("profile","default");
@@ -108,9 +106,8 @@ public class OperationJsonTest {
}
public void addPropsTest() throws Exception {
- List<PROPERTY_VALUE> address=new ArrayList<PROPERTY_VALUE>(2);
- PROPERTY_VALUE part = new PROPERTY_VALUE("/server-group","newOne");
- address.add(part);
+ Address address= new Address();
+ address.add("/server-group","newOne");
Operation operation = new Operation("add",address);
operation.addAdditionalProperty("foo","bar");
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
index 100abbd..113bc53 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
@@ -18,12 +18,9 @@
*/
package org.rhq.modules.plugins.jbossas7;
-import java.util.List;
-
import org.testng.annotations.Test;
import org.rhq.modules.plugins.jbossas7.json.Address;
-import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
/**
* Test handling of path elements.
@@ -34,77 +31,6 @@ import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@Test
public class PathHandlingTest {
- public void buildPath1() throws Exception {
-
- String path = "/subsystem=jms,profile=default,queue=foo";
-
- BaseComponent bc = new BaseComponent();
- List<PROPERTY_VALUE> list = bc.pathToAddress(path);
-
- int found = 0;
- for (PROPERTY_VALUE p : list) {
- if (p.getKey().equals("subsystem")) {
- assert p.getValue().equals("jms");
- found++;
- }
- if (p.getKey().equals("queue")) {
- found++;
- assert p.getValue().equals("foo");
- }
- }
- assert found == 2 : "did not find both keys, but " + found;
- }
-
- public void buildPath2() throws Exception {
-
- String path = "/subsystem=jms,profile=default,queue=java:/foo";
-
- BaseComponent bc = new BaseComponent();
- List<PROPERTY_VALUE> list = bc.pathToAddress(path);
-
- assert list.size()==3 : "We don't have 3 components, but " + list.size();
- for (PROPERTY_VALUE p : list) {
- if (p.getKey().equals("subsystem"))
- assert p.getValue().equals("jms");
- if (p.getKey().equals("queue"))
- assert p.getValue().equals("java:/foo") : "Queue value is wrong: " + p.getValue();
-
- }
- }
-
- public void buildIncomplete() throws Exception {
-
- String path = "/subsystem=jms,profile=default,queue=java:/foo,topic";
-
- BaseComponent bc = new BaseComponent();
- List<PROPERTY_VALUE> list = bc.pathToAddress(path);
-
- assert list.size()==3 : "We don't have 3 components, but " + list.size();
- int found = 0;
- for (PROPERTY_VALUE p : list) {
- if (p.getKey().equals("subsystem")) {
- assert p.getValue().equals("jms");
- found++;
- }
- if (p.getKey().equals("queue")) {
- assert p.getValue().equals("java:/foo") : "Queue value is wrong: " + p.getValue();
- found++;
- }
- }
- assert found == 2 : "did not find both keys, but " + found;
- }
-
- public void addr2path() throws Exception {
-
- String path = "subsystem=jms,profile=default,queue=java:/foo";
-
- BaseComponent bc = new BaseComponent();
- List<PROPERTY_VALUE> list = bc.pathToAddress(path);
-
- String path2 = bc.addressToPath(list);
- assert path.equals(path2);
- }
-
public void emptyAddress() throws Exception {
Address a = new Address();
@@ -117,6 +43,8 @@ public class PathHandlingTest {
Address a = new Address((String)null);
assert a.getPath() != null;
assert a.getPath().isEmpty();
+ assert a.isEmpty();
+ assert a.size()==0;
}
public void addressPath1() throws Exception {
@@ -129,5 +57,7 @@ public class PathHandlingTest {
String path = "subsystem=jms,profile=default,queue=foo";
Address a = new Address(path);
assert a.getPath().equals(path);
+ assert a.size()==3 : "Size was not 3, but "+ a.size();
+ assert !a.isEmpty();
}
}
commit b0348c9a0685dd860b9d9eb26ec44a59a639dd3e
Merge: 6cdc362 3d58037
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 21:29:33 2011 +0200
Merge branch 'master' into as7plugin
commit 3d580371accb4ba1e92769994174682f11332ca0
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 21:23:53 2011 +0200
Socket-binding is read-only
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c636e1e..e06d814 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -745,8 +745,8 @@
<resource-configuration>
<c:simple-property name="protocol" required="true" type="string" readOnly="true" description="The web connector protocol."/>
- <c:simple-property name="socket-binding" required="true" type="string" readOnly="false"
- description="The web connector socket-binding reference, this connector should be bound to."> <!-- TODO read-only -->
+ <c:simple-property name="socket-binding" required="true" type="string" readOnly="true"
+ description="The web connector socket-binding reference, this connector should be bound to.">
<c:option-source target="configuration" expression="socket-binding=name:type=SocketBindingGroup"/>
</c:simple-property>
<c:simple-property name="scheme" type="string" readOnly="true" default="http" description="The web connector scheme."/>
commit 24c7ecba9364d41dab28a5a4c25f28839bd85d4e
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 2 12:59:34 2011 -0400
fix bug in test that was causing an NPE
diff --git a/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java b/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
index a10e8b4..791a578 100644
--- a/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
+++ b/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -33,6 +33,8 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+
+import org.rhq.core.domain.configuration.Configuration;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
@@ -207,7 +209,8 @@ public class JMXPluginTest {
ResourceComponent serviceComponent = PluginContainer.getInstance().getInventoryManager()
.getResourceComponent(service);
- Object result = ((OperationFacet) serviceComponent).invokeOperation("findMonitorDeadlockedThreads", null);
+ Object result = ((OperationFacet) serviceComponent).invokeOperation("findMonitorDeadlockedThreads",
+ new Configuration());
System.out.println("Result of operation test was: " + result);
}
}
@@ -275,7 +278,7 @@ public class JMXPluginTest {
long started = System.currentTimeMillis();
public static void main(String[] args) {
- System.out.println("Test Program Running");
+ System.out.println("Test program running...");
TestProgram tp = new TestProgram();
tp.run();
}
commit eb3c1ba0922e1c4348deedc1a158e64ed08ec260
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 17:57:37 2011 +0200
Better display names for host & domain config.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c70d01f..c636e1e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -86,8 +86,8 @@
<c:simple-property name="port" default="9990" type="integer" required="true" description="Port of the domain API"/>
<c:simple-property name="user" type="string" description="Management user for a secured Host controller" required="false"/>
<c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
- <c:simple-property name="domainConfig" type="string" default="domain.xml" description="Running configuration (domain part)" displayName="Configuration"/>
- <c:simple-property name="hostConfig" type="string" default="host.xml" description="Running configuration (host part)" displayName="Configuration"/>
+ <c:simple-property name="domainConfig" type="string" default="domain.xml" description="Running configuration (domain part)" displayName="Domain Configuration"/>
+ <c:simple-property name="hostConfig" type="string" default="host.xml" description="Running configuration (host part)" displayName="Host Configuration"/>
<c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
<c:simple-property name="startScript" type="file" default="bin/domain.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
<c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
12 years, 10 months
[rhq] modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 3d580371accb4ba1e92769994174682f11332ca0
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 21:23:53 2011 +0200
Socket-binding is read-only
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c636e1e..e06d814 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -745,8 +745,8 @@
<resource-configuration>
<c:simple-property name="protocol" required="true" type="string" readOnly="true" description="The web connector protocol."/>
- <c:simple-property name="socket-binding" required="true" type="string" readOnly="false"
- description="The web connector socket-binding reference, this connector should be bound to."> <!-- TODO read-only -->
+ <c:simple-property name="socket-binding" required="true" type="string" readOnly="true"
+ description="The web connector socket-binding reference, this connector should be bound to.">
<c:option-source target="configuration" expression="socket-binding=name:type=SocketBindingGroup"/>
</c:simple-property>
<c:simple-property name="scheme" type="string" readOnly="true" default="http" description="The web connector scheme."/>
12 years, 10 months
[rhq] Branch 'drift' - 214 commits - .classpath modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/plugins modules/test-utils pom.xml
by John Sanda
.classpath | 11
modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/BackupAndReplaceFileActionHandler.java | 8
modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java | 16
modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/HandlerUtils.java | 9
modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java | 6
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/i18n/PropertiesGenerator.java | 53
modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java | 5
modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java | 2
modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java | 24
modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java | 13
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryFile.java | 10
modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginClassLoader.java | 12
modules/core/util/src/main/java/org/rhq/core/util/file/JarContentFileInfo.java | 1
modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java | 16
modules/core/util/src/test/java/org/rhq/core/util/ZipUtilTest.java | 4
modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfiguration.java | 8
modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/Version.java | 6
modules/enterprise/agentupdate/src/main/java/org/rhq/enterprise/agent/update/AgentUpdate.java | 10
modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/util/DumpBytes.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java | 65
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java | 50
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java | 55
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java | 31
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleFileUploadServlet.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/PackageVersionFileUploadServlet.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java | 14
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 1422 ++++------
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 3
modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/Version.java | 6
modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/commands/ScriptCommand.java | 42
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertNotificationManagerBean.java | 63
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/util/ConfigurationMaskingUtility.java | 7
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java | 63
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginClassLoader.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java | 58
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java | 10
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java | 13
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java | 76
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java | 4
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java | 2
modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/ServerGroupTest.java | 89
modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java | 85
modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java | 210 +
modules/plugins/byteman/src/main/java/org/rhq/plugins/byteman/BytemanRuleComponent.java | 2
modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableComponent.java | 16
modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableRowDiscoveryComponent.java | 6
modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISServerDiscoveryComponent.java | 4
modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostComponent.java | 4
modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostDiscoveryComponent.java | 4
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java | 105
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AS7Mode.java | 64
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java | 131
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java | 64
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java | 91
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java | 209 +
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java | 166 +
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java | 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java | 72
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java | 113
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java | 3
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java | 70
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java | 79
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java | 6
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java | 40
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java | 34
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 371 +-
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java | 27
modules/plugins/jboss-cache/src/main/java/org/rhq/plugins/jbosscache/JBossCacheComponent.java | 6
modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java | 92
modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java | 9
modules/plugins/mod-cluster/pom.xml | 271 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java | 102
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java | 118
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java | 45
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java | 310 ++
modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml | 132
modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java | 80
modules/plugins/mod-cluster/src/test/resources/log4j.xml | 51
modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt | 13
modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt | 16
modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt | 1
modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java | 46
modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java | 3
modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceComponent.java | 4
modules/plugins/oracle/src/main/java/org/rhq/plugins/oracle/OracleDiscoveryComponent.java | 7
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java | 4
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java | 1
modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/YumServer.java | 21
modules/plugins/pom.xml | 3
modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java | 48
modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresUserComponent.java | 3
modules/plugins/rhq-agent/src/main/java/org/rhq/plugins/agent/AgentSnapshotReport.java | 9
modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java | 49
modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java | 8
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java | 9
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatGroupComponent.java | 3
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatUserComponent.java | 3
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatVHostComponent.java | 3
modules/plugins/virt/src/main/java/org/rhq/plugins/virt/LibVirtConnection.java | 264 +
modules/plugins/virt/src/main/java/org/rhq/plugins/virt/VirtualizationDomainComponent.java | 5
modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java | 16
pom.xml | 46
107 files changed, 4377 insertions(+), 1763 deletions(-)
New commits:
commit 0f7fc0f283c9c382f45881c84fe99caa16246439
Merge: 7e6fa99 24c7ecb
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 2 14:58:52 2011 -0400
Merge branch 'master' into drift
Conflicts:
modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
commit 24c7ecba9364d41dab28a5a4c25f28839bd85d4e
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 2 12:59:34 2011 -0400
fix bug in test that was causing an NPE
diff --git a/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java b/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
index a10e8b4..791a578 100644
--- a/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
+++ b/modules/plugins/jmx/src/test/java/org/rhq/plugins/jmx/test/JMXPluginTest.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -33,6 +33,8 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+
+import org.rhq.core.domain.configuration.Configuration;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
@@ -207,7 +209,8 @@ public class JMXPluginTest {
ResourceComponent serviceComponent = PluginContainer.getInstance().getInventoryManager()
.getResourceComponent(service);
- Object result = ((OperationFacet) serviceComponent).invokeOperation("findMonitorDeadlockedThreads", null);
+ Object result = ((OperationFacet) serviceComponent).invokeOperation("findMonitorDeadlockedThreads",
+ new Configuration());
System.out.println("Result of operation test was: " + result);
}
}
@@ -275,7 +278,7 @@ public class JMXPluginTest {
long started = System.currentTimeMillis();
public static void main(String[] args) {
- System.out.println("Test Program Running");
+ System.out.println("Test program running...");
TestProgram tp = new TestProgram();
tp.run();
}
commit eb3c1ba0922e1c4348deedc1a158e64ed08ec260
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 17:57:37 2011 +0200
Better display names for host & domain config.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c70d01f..c636e1e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -86,8 +86,8 @@
<c:simple-property name="port" default="9990" type="integer" required="true" description="Port of the domain API"/>
<c:simple-property name="user" type="string" description="Management user for a secured Host controller" required="false"/>
<c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
- <c:simple-property name="domainConfig" type="string" default="domain.xml" description="Running configuration (domain part)" displayName="Configuration"/>
- <c:simple-property name="hostConfig" type="string" default="host.xml" description="Running configuration (host part)" displayName="Configuration"/>
+ <c:simple-property name="domainConfig" type="string" default="domain.xml" description="Running configuration (domain part)" displayName="Domain Configuration"/>
+ <c:simple-property name="hostConfig" type="string" default="host.xml" description="Running configuration (host part)" displayName="Host Configuration"/>
<c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
<c:simple-property name="startScript" type="file" default="bin/domain.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
<c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
commit cb11e1847161719d751ac36e19e36b288841521d
Merge: d10512a 01c6586
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 15:44:39 2011 +0200
Merge branch 'as7plugin'
commit d10512ab4e749364ff873ef92d155fcd9824cc53
Merge: a063002 e4fa39a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 13:59:15 2011 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit a063002f38625a32ea125c3253b82c01ba97c874
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 2 13:57:51 2011 +0200
Do some developer and contributor housekeeping.
diff --git a/pom.xml b/pom.xml
index 549e0d0..28bec8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,7 +158,7 @@
host name changes are/should be uncommon in a typical deployment, they
are more common in a cloud deployment such as EC2. And in a cloud
deployment like EC2, we want to turn this behavior on to ensure that
- the server endpoint accurately reflects the current machine address.
+ the server endpoint accurately reflects the current machine address.
-->
<rhq.sync.endpoint-address>false</rhq.sync.endpoint-address>
@@ -849,7 +849,7 @@
</plugin>
<!-- As of v1.0 of the buildnumber plugin, the create goal doesn't work,
- and the create-timestamp goal doesn't provide a way to specify
+ and the create-timestamp goal doesn't provide a way to specify
a locale or a timezone, so comment this out for now and instead use
our own homemade mix of antrun and properties-file plugin executions
(just below this commented out block). (ips, 06/28/11)
@@ -902,11 +902,11 @@
<phase>generate-sources</phase>
<configuration>
<tasks>
- <mkdir dir="target" />
+ <mkdir dir="target" />
<tstamp>
<format property="buildTime" pattern="MM/dd/yy hh:mm aa z" locale="en,US" timezone="GMT" />
- </tstamp>
+ </tstamp>
<echo file="target/build.properties">buildTime = ${buildTime}${line.separator}</echo>
<exec executable="git" outputproperty="buildNumber" failonerror="false" failifexecutionfails="false">
@@ -947,7 +947,7 @@
</goals>
<configuration>
<files>
- <file>${project.build.directory}/build.properties</file>
+ <file>${project.build.directory}/build.properties</file>
</files>
<quiet>true</quiet>
</configuration>
@@ -1104,7 +1104,7 @@
</profile>
<!-- Set the java6.home prop to a Java6 JRE dir to enforce that only Java6 APIs are used.
- If using Java7 to run the build, this will ensure no APIs introduced in Java7 are
+ If using Java7 to run the build, this will ensure no APIs introduced in Java7 are
used. -->
<profile>
<id>check-java-api</id>
@@ -1146,7 +1146,7 @@
</build>
</profile>
- <!-- This profile should be enabled when a release is being published.
+ <!-- This profile should be enabled when a release is being published.
It will ensure that sources and javadoc jars are built and published
for each source module. -->
<profile>
@@ -1256,6 +1256,10 @@
<developers>
<developer>
+ <name>Robert Buck</name>
+ <timezone>-5</timezone>
+ </developer>
+ <developer>
<name>Charles Crouch</name>
<timezone>-6</timezone>
</developer>
@@ -1267,8 +1271,11 @@
</roles>
</developer>
<developer>
- <name>Filip Drabeck</name>
+ <name>Filip Drabek</name>
<timezone>+1</timezone>
+ <roles>
+ <role>retired</role>
+ </roles>
</developer>
<developer>
<name>Greg Hinkle</name>
@@ -1303,6 +1310,10 @@
<url>http://management-platform.blogspot.com</url>
</developer>
<developer>
+ <name>Stefan Negrea</name>
+ <timezone>-6</timezone>
+ </developer>
+ <developer>
<name>Simeon Pinder</name>
<timezone>-5</timezone>
</developer>
@@ -1347,6 +1358,25 @@
<name>Rafael Torres Coelho Soares</name>
<timezone>-7</timezone>
</contributor>
+ <contributor>
+ <name>Elias Ross</name>
+ </contributor>
+ <contributor>
+ <name>Fusayuki Minamoto</name>
+ <timezone>+6</timezone>
+ </contributor>
+ <contributor>
+ <name>Liju Jijun</name>
+ <timezone>+6</timezone>
+ </contributor>
+ <contributor>
+ <name>Zhongqianglee</name>
+ <timezone>+6</timezone>
+ </contributor>
+ <contributor>
+ <name>Frank BrÃŒseke</name>
+ <timezone>+1</timezone>
+ </contributor>
</contributors>
<mailingLists>
commit 01c65867047b04863ca399eea4ec680d8476f5c7
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Mon Aug 1 21:26:55 2011 -0400
remove process controller element and use embeddedJMX
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 3432cb6..c70d01f 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -517,22 +517,18 @@
</server>
-
- <server name="JBoss AS JVM"
- description="JVM of the standalone JBossAS"
- sourcePlugin="JMX"
- sourceType="JMX Server"
- discovery="org.rhq.plugins.jmx.LocalJMXServerDiscoveryComponent"
- class="org.rhq.plugins.jmx.JMXServerComponent"
- singleton="true"
- >
+ <server name="JBoss AS JVM"
+ description="JVM of the JBossAS"
+ sourcePlugin="JMX"
+ sourceType="JMX Server"
+ discovery="org.rhq.plugins.jmx.EmbeddedJMXServerDiscoveryComponent"
+ class="org.rhq.plugins.jmx.JMXServerComponent"
+ singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS-Managed" plugin="jboss-as-7"/>
<parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
- <parent-resource-type name="ProcessController" plugin="jboss-as-7"/>
</runs-inside>
- </server>
-
+ </server>
<server name="Messaging"
discovery="SubsystemDiscovery"
commit e4fa39acdcccd039950d5fac3c80cb5b95a0474b
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 1 17:09:35 2011 -0400
[BZ 723025] add support for operationinfos with un-named parameterinfos, which is common for standard mbeans (https://bugzilla.redhat.com/show_bug.cgi?id=723025); map RHQ operation to MBean operation with not only the same name, but also the same # of params - this allows us to support MBeans that define multiple operations with the same name but different params
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
index cb7f901..6a60a93 100644
--- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
+++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -33,6 +33,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.SortedSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -520,38 +521,72 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
public OperationResult invokeOperation(String name, Configuration parameters, EmsBean emsBean) throws Exception {
if (emsBean == null) {
throw new Exception("Can not invoke operation [" + name
- + "], as we can't connect to the bean - is it down?");
+ + "], as we can't connect to the MBean - is it down?");
}
- EmsOperation operation = emsBean.getOperation(name);
+ Map<String, PropertySimple> paramProps = parameters.getSimpleProperties();
+ SortedSet<EmsOperation> emsOperations = emsBean.getOperations();
+ EmsOperation operation = null;
+ // There could be multiple operations with the same name but different parameters. Try to find one that has
+ // the same # of parameters as the RHQ operation def.
+ for (EmsOperation emsOperation : emsOperations) {
+ if (emsOperation.getName().equals(name) && (emsOperation.getParameters().size() == paramProps.size())) {
+ operation = emsOperation;
+ break;
+ }
+ }
+ if (operation == null) {
+ // We couldn't find an operation with the expected name and # of parameters, so as as a last ditch effort,
+ // see if there's an operation that at least has the expected name.
+ operation = emsBean.getOperation(name);
+ }
if (operation == null) {
- throw new Exception("Operation [" + name + "] not found on bean [" + emsBean.getBeanName() + "]");
+ throw new Exception("Operation [" + name + "] not found on MBean [" + emsBean.getBeanName() + "].");
}
- Object[] parameterValues = new Object[operation.getParameters().size()];
+ List<EmsParameter> emsParams = operation.getParameters();
+ Map<String, Integer> emsParamIndexesByName = new HashMap<String, Integer>();
+ for (int i = 0, emsParamsSize = emsParams.size(); i < emsParamsSize; i++) {
+ EmsParameter emsParam = emsParams.get(i);
+ if (emsParam.getName() != null) {
+ emsParamIndexesByName.put(emsParam.getName(), i);
+ }
+ }
- int i = 0;
- List<EmsParameter> params = operation.getParameters();
- for (EmsParameter param : params) {
- PropertySimple ps = parameters.getSimple(param.getName());
- if (param.getType().equals(String.class.getName())) {
- parameterValues[i] = (ps == null) ? null : ps.getStringValue();
- } else if (param.getType().equals(boolean.class.getName())) {
- parameterValues[i] = (ps == null) ? null : ps.getBooleanValue();
+ Object[] paramValues = new Object[operation.getParameters().size()];
+
+ for (String propName : paramProps.keySet()) {
+ Integer paramIndex;
+ if (propName.matches("\\[\\d+\\]")) {
+ paramIndex = Integer.valueOf(propName.substring(propName.indexOf('[') + 1, propName.indexOf(']')));
+ if (paramIndex < 0 || paramIndex >= emsParams.size()) {
+ throw new IllegalStateException("Index [" + paramIndex + "] specified for parameter of operation ["
+ + name + "] on MBean [" + emsBean.getBeanName() + "] is invalid. The MBean operation takes "
+ + emsParams.size() + " parameters.");
+ }
+ } else {
+ paramIndex = emsParamIndexesByName.get(propName);
+ if (paramIndex == null) {
+ throw new IllegalStateException("Name [" + propName + "] specified for parameter of operation ["
+ + name + "] on MBean [" + emsBean.getBeanName()
+ + "] is invalid. The MBean operation does not take a parameter by that name.");
+ }
}
+ EmsParameter emsParam = emsParams.get(paramIndex);
- // TODO GH: Handle rest of types. (I think i have a mapper for this in mc4j
- i++;
+ PropertySimple paramProp = paramProps.get(propName);
+ String emsParamType = emsParam.getType();
+ Object paramValue = getPropertyValueAsType(paramProp, emsParamType);
+ paramValues[paramIndex] = paramValue;
}
- Object resultObject = operation.invoke(parameterValues);
+ Object resultObject = operation.invoke(paramValues);
boolean hasVoidReturnType = (operation.getReturnType() == null
|| Void.class.getName().equals(operation.getReturnType()) || void.class.getName().equals(
operation.getReturnType()));
OperationResult resultToReturn;
-
if (resultObject == null && hasVoidReturnType) {
resultToReturn = null;
} else {
@@ -575,4 +610,25 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
return resultToReturn;
}
+
+ private Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ Object value;
+ if (typeName.equals(String.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getStringValue();
+ } else if (typeName.equals(Boolean.class.getName()) || typeName.equals(boolean.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getBooleanValue();
+ } else if (typeName.equals(Integer.class.getName()) || typeName.equals(int.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getIntegerValue();
+ } else if (typeName.equals(Long.class.getName()) || typeName.equals(long.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getLongValue();
+ } else if (typeName.equals(Float.class.getName()) || typeName.equals(float.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getFloatValue();
+ } else if (typeName.equals(Double.class.getName()) || typeName.equals(double.class.getName())) {
+ value = (propSimple == null) ? null : propSimple.getDoubleValue();
+ } else {
+ throw new IllegalStateException("Operation parameter maps to MBean parameter with an unsupported type (" + typeName + ").");
+ }
+ // TODO GH: Handle rest of types. (I think i have a mapper for this in mc4j
+ return value;
+ }
}
commit 01c169dcd233cd9fdef4d124df5bf63cef21c828
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Mon Aug 1 16:44:53 2011 -0400
added some cleanup code for long lived http connections. Need to parse stream even on error for better pooling.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index b55fc8a..787db6b 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -29,7 +29,9 @@ import java.net.URL;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
@@ -49,6 +51,7 @@ public class ASConnection {
String urlString;
private ObjectMapper mapper;
public static boolean verbose = false; // This is a variable on purpose, so devs can switch it on in the debugger or in the agent
+ private HttpURLConnection conn;
/**
* Construct an ASConnection object. The real "physical" connection is done in
@@ -59,7 +62,7 @@ public class ASConnection {
public ASConnection(String host, int port) {
try {
- url = new URL("http",host,port, MANAGEMENT);
+ url = new URL("http", host, port, MANAGEMENT);
urlString = url.toString();
} catch (MalformedURLException e) {
@@ -87,11 +90,12 @@ public class ASConnection {
public JsonNode executeRaw(Operation operation) {
InputStream inputStream = null;
- BufferedReader br=null;
+ BufferedReader br = null;
+ InputStream es = null;
long t1 = System.currentTimeMillis();
try {
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("POST");
OutputStream out = conn.getOutputStream();
@@ -106,50 +110,63 @@ public class ASConnection {
out.close();
int responseCode = conn.getResponseCode();
- if (responseCode ==HttpURLConnection.HTTP_OK) {
+ if (responseCode == HttpURLConnection.HTTP_OK) {
inputStream = conn.getInputStream();
} else {
inputStream = conn.getErrorStream();
}
- if (inputStream!=null) {
+ if (inputStream != null) {
- br = new BufferedReader(new InputStreamReader(
- inputStream));
- String line;
- StringBuilder builder = new StringBuilder();
- while ((line = br.readLine()) != null) {
- builder.append(line);
- }
+ br = new BufferedReader(new InputStreamReader(inputStream));
+ String line;
+ StringBuilder builder = new StringBuilder();
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ }
- String outcome;
- JsonNode operationResult=null;
- if (builder !=null) {
- outcome= builder.toString();
- operationResult = mapper.readTree(outcome);
- if (verbose) {
- ObjectMapper om2 = new ObjectMapper();
- om2.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
- String tmp = om2.writeValueAsString(operationResult);
- log.info(tmp);
+ String outcome;
+ JsonNode operationResult = null;
+ if (builder.length() > 0) {
+ outcome = builder.toString();
+ operationResult = mapper.readTree(outcome);
+ if (verbose) {
+ ObjectMapper om2 = new ObjectMapper();
+ om2.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
+ String tmp = om2.writeValueAsString(operationResult);
+ log.info(tmp);
+ }
+ } else {
+ outcome = "- no response from server -";
+ Result noResult = new Result();
+ noResult.setFailureDescription(outcome);
+ noResult.setOutcome("failure");
+ operationResult = mapper.valueToTree(noResult);
}
- }
- else {
- outcome="- no response from server -";
- Result noResult = new Result();
- noResult.setFailureDescription(outcome);
- noResult.setOutcome("failure");
- operationResult = mapper.valueToTree(noResult);
- }
- return operationResult;
- }
- else {
+ return operationResult;
+ } else {
log.error("IS was null and code was " + responseCode);
}
-
} catch (IOException e) {
- log.error("Failed to get data: " + e.getMessage() );
+ log.error("Failed to get data: " + e.getMessage());
+
+ //the following code is in place to help keep-alive http connection re-use to occur.
+ if (conn != null) {//on error conditions it's still necessary to read the response so JDK knows can reuse
+ //the http connections behind the scenes.
+ es = conn.getErrorStream();
+ if (es != null) {
+ BufferedReader dr = new BufferedReader(new InputStreamReader(es));
+ String ignore = null;
+ try {
+ while ((ignore = dr.readLine()) != null) {
+ //already reported error. just empty stream.
+ }
+ es.close();
+ } catch (IOException e1) {
+ }
+ }
+ }
Result failure = new Result();
failure.setFailureDescription(e.getMessage());
@@ -160,16 +177,24 @@ public class ASConnection {
return ret;
} finally {
- if (br!=null)
+ if (br != null) {
try {
br.close();
} catch (IOException e) {
- e.printStackTrace(); // TODO: Customise this generated block
+ e.printStackTrace(); // TODO: Customise this generated block
+ }
+ }
+ if (es != null) {
+ try {
+ es.close();
+ } catch (IOException e) {
+ e.printStackTrace(); // TODO: Customise this generated block
}
+ }
long t2 = System.currentTimeMillis();
PluginStats stats = PluginStats.getInstance();
stats.incrementRequestCount();
- stats.addRequestTime(t2-t1);
+ stats.addRequestTime(t2 - t1);
}
return null;
@@ -183,7 +208,7 @@ public class ASConnection {
* @see #execute(org.rhq.modules.plugins.jbossas7.json.Operation, boolean)
*/
public Result execute(Operation op) {
- return execute(op,false);
+ return execute(op, false);
}
/**
@@ -194,7 +219,7 @@ public class ASConnection {
* @see #execute(org.rhq.modules.plugins.jbossas7.json.Operation, boolean)
*/
public ComplexResult executeComplex(Operation op) {
- return (ComplexResult) execute(op,true);
+ return (ComplexResult) execute(op, true);
}
/**
@@ -204,20 +229,38 @@ public class ASConnection {
* @param isComplex should a complex result be returned?
* @return ComplexResult of the execution
*/
- public Result execute(Operation op, boolean isComplex){
+ public Result execute(Operation op, boolean isComplex) {
JsonNode node = executeRaw(op);
try {
Result res;
if (isComplex)
- res = mapper.readValue(node,ComplexResult.class);
+ res = mapper.readValue(node, ComplexResult.class);
else
- res = mapper.readValue(node,Result.class);
+ res = mapper.readValue(node, Result.class);
return res;
} catch (IOException e) {
- e.printStackTrace(); // TODO: Customise this generated block
+ e.printStackTrace(); // TODO: Customise this generated block
return null;
}
}
+ public void writeValue(OutputStream out, Object value) throws IOException, JsonGenerationException,
+ JsonMappingException {
+ // JsonGenerator jgen = _jsonFactory.createJsonGenerator(out, JsonEncoding.UTF8);
+ // JsonGenerator jgen = mapper.createJsonGenerator(out, JsonEncoding.UTF8);
+ // JsonGenerator jgen = new Js
+ // boolean closed = false;
+ // try {
+ // writeValue(jgen, value);
+ // closed = true;
+ // jgen.close();
+ // } finally {
+ // if (!closed) {
+ // jgen.close();
+ // }
+ // }
+
+ }
+
}
commit 382f93bfed14c3b2fc2956e5ec14b83b8ac8e55b
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Mon Aug 1 16:42:47 2011 -0400
-added integration test src and removed webdav for eclipse classpath.
diff --git a/.classpath b/.classpath
index b8a0ea8..a1e9e14 100644
--- a/.classpath
+++ b/.classpath
@@ -165,7 +165,6 @@
<classpathentry kind="src" path="modules/enterprise/gui/installer-war/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/gui/base-perspective-jar/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/gui/content_http-war/src/main/java"/>
- <classpathentry kind="src" path="modules/enterprise/gui/webdav-war/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/client-api/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/remoting/client-api/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/remoting/webservices/src/main/java"/>
@@ -276,5 +275,6 @@
<classpathentry kind="src" path="modules/plugins/mod-cluster/src/test/java"/>
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/test/java"/>
+ <classpathentry kind="src" path="modules/integration-tests/jboss-as-7-plugin-test/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
commit d47438f7a5a56de5539f8635a44aed53833837dc
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 1 14:09:29 2011 -0400
[BZ 720456] fix so all child types are shown in manual-add dropdown on Inventory>Child Resources view (https://bugzilla.redhat.com/show_bug.cgi?id=720456)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
index f333ddf..de0dba6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
@@ -122,47 +122,54 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
});
if (this.parentResourceComposite.getResourcePermission().isCreateChildResources()) {
- ResourceType parentType = parentResourceComposite.getResource().getResourceType();
-
- // manual import type menu
- LinkedHashMap<String, ResourceType> importTypeValueMap = new LinkedHashMap<String, ResourceType>();
+ addImportButton();
+ }
- for (ResourceType childType : parentType.getChildResourceTypes()) {
- if (childType.isSupportsManualAdd()) {
- importTypeValueMap.put(childType.getName(), childType);
- }
- }
- addTableAction(extendLocatorId("Import"), MSG.common_button_import(), null, importTypeValueMap,
- new AbstractTableAction(TableActionEnablement.ALWAYS) {
+ super.configureTable();
+ }
- public void executeAction(ListGridRecord[] selection, Object actionValue) {
- ResourceFactoryImportWizard.showImportWizard(parentResourceComposite.getResource(),
- (ResourceType) actionValue);
- }
- });
+ private void addImportButton() {
+ ResourceType parentType = parentResourceComposite.getResource().getResourceType();
- // creatable child type menu
- LinkedHashMap<String, ResourceType> createTypeValueMap = new LinkedHashMap<String, ResourceType>();
+ // manual import type menu
+ // TODO: Use TreeMap instead, so the types will be sorted by name.
+ LinkedHashMap<String, ResourceType> importTypeValueMap = new LinkedHashMap<String, ResourceType>();
- for (ResourceType childType : parentType.getChildResourceTypes()) {
- if (childType.isCreatable()) {
- createTypeValueMap.put(childType.getName(), childType);
- }
+ for (ResourceType childType : parentType.getChildResourceTypes()) {
+ if (childType.isSupportsManualAdd()) {
+ importTypeValueMap.put(childType.getName(), childType);
}
- if (!createTypeValueMap.isEmpty()) {
- addTableAction(extendLocatorId("CreateChild"), MSG.common_button_create_child(), null,
- createTypeValueMap, new AbstractTableAction(TableActionEnablement.ALWAYS) {
+ }
+ if (!importTypeValueMap.isEmpty()) {
+ addTableAction(extendLocatorId("Import"), MSG.common_button_import(), null, importTypeValueMap,
+ new AbstractTableAction(TableActionEnablement.ALWAYS) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
- ResourceFactoryCreateWizard.showCreateWizard(parentResourceComposite.getResource(),
- (ResourceType) actionValue);
+ ResourceFactoryImportWizard.showImportWizard(parentResourceComposite.getResource(),
+ (ResourceType) actionValue);
}
});
- }
+ }
+
+ // creatable child type menu
+ // TODO: Use TreeMap instead, so the types will be sorted by name.
+ LinkedHashMap<String, ResourceType> createTypeValueMap = new LinkedHashMap<String, ResourceType>();
+ for (ResourceType childType : parentType.getChildResourceTypes()) {
+ if (childType.isCreatable()) {
+ createTypeValueMap.put(childType.getName(), childType);
+ }
}
+ if (!createTypeValueMap.isEmpty()) {
+ addTableAction(extendLocatorId("CreateChild"), MSG.common_button_create_child(), null,
+ createTypeValueMap, new AbstractTableAction(TableActionEnablement.ALWAYS) {
- super.configureTable();
+ public void executeAction(ListGridRecord[] selection, Object actionValue) {
+ ResourceFactoryCreateWizard.showCreateWizard(parentResourceComposite.getResource(),
+ (ResourceType) actionValue);
+ }
+ });
+ }
}
public ResourceComposite getParentResourceComposite() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
index 7149726..68ef419 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -60,7 +60,6 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.criteria.DashboardCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
-import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.dashboard.Dashboard;
import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.measurement.DataType;
@@ -68,7 +67,6 @@ import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.MeasurementSchedule;
import org.rhq.core.domain.operation.OperationDefinition;
import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.resource.composite.ResourceLineageComposite;
@@ -83,7 +81,6 @@ import org.rhq.enterprise.gui.coregui.client.dashboard.portlets.inventory.resour
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.InventoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGroupContextMenu;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGroupDetailView;
@@ -539,9 +536,6 @@ public class ResourceTreeView extends LocatableVLayout {
importChildSubMenu.addItem(importItem);
}
}
- if (resourceType.getCategory() == ResourceCategory.PLATFORM) {
- loadManuallyAddServersToPlatforms(importChildSubMenu, resource);
- }
importChildMenu.setSubmenu(importChildSubMenu);
manualImportEnabled = importChildSubMenu.getItems().length > 0;
@@ -550,48 +544,6 @@ public class ResourceTreeView extends LocatableVLayout {
resourceContextMenu.addItem(importChildMenu);
}
- private void loadManuallyAddServersToPlatforms(final Menu manuallyAddMenu, final Resource resource) {
- ResourceTypeGWTServiceAsync rts = GWTServiceLookup.getResourceTypeGWTService();
-
- ResourceTypeCriteria criteria = new ResourceTypeCriteria();
- criteria.addFilterSupportsManualAdd(true);
- criteria.fetchParentResourceTypes(true);
- rts.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_contextMenu_loadFailed_manualAddChildren(),
- caught);
- }
-
- public void onSuccess(PageList<ResourceType> result) {
- //sort the display items alphabetically
- TreeSet<String> ordered = new TreeSet<String>();
- Map<String, ResourceType> displayTypes = new HashMap<String, ResourceType>();
- for (ResourceType type : result) {
- displayTypes.put(type.getName(), type);
- ordered.add(type.getName());
- }
-
- int idx = 0;
- for (String displayType : ordered) {
- final ResourceType type = displayTypes.get(displayType);
- if (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty()) {
- MenuItem item = new MenuItem(type.getName());
-
- item.addClickHandler(new ClickHandler() {
-
- public void onClick(MenuItemClickEvent event) {
- ResourceFactoryImportWizard.showImportWizard(resource, type);
- }
- });
-
- manuallyAddMenu.addItem(item, idx++);
- }
- }
- }
- });
- }
-
private MenuItem buildMetricsMenu(final ResourceType type, final Resource resource) {
MenuItem measurements = new MenuItem(MSG.view_tree_common_contextMenu_measurements());
final Menu measurementsSubMenu = new Menu();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
index d1dce1f..c4630dd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -32,6 +32,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.util.PageControl;
@@ -51,6 +52,7 @@ public class ResourceTypeRepository {
private Map<Integer, ResourceType> typeCache = new HashMap<Integer, ResourceType>();
private Map<Integer, EnumSet<MetadataType>> typeCacheLevel = new HashMap<Integer, EnumSet<MetadataType>>();
+ private Set<ResourceType> topLevelServerAndServiceTypes;
private static ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
@@ -252,9 +254,46 @@ public class ResourceTypeRepository {
criteria.setPageControl(PageControl.getUnlimitedInstance());
- com.allen_sauer.gwt.log.client.Log.info("Loading " + typesNeeded.size()
+ Log.info("Loading " + typesNeeded.size()
+ ((metadataTypes != null) ? (" types: " + metadataTypes) : ""));
+ if ((topLevelServerAndServiceTypes == null) && (metadataTypes != null) &&
+ metadataTypes.contains(MetadataType.children)) {
+ // Perform a one-time load of server and service types with no parent types. These types are implicitly
+ // children of all platform types, even though they are not included in the platform types'
+ // childResourceTypes field.
+ loadTopLevelServerAndServiceTypes(callback, metadataTypes, criteria, cachedTypes);
+ } else {
+ loadRequestedTypes(callback, metadataTypes, criteria, cachedTypes);
+ }
+ }
+
+ private void loadTopLevelServerAndServiceTypes(final TypesLoadedCallback callback,
+ final EnumSet<MetadataType> metadataTypes,
+ final ResourceTypeCriteria criteria, final Map<Integer,
+ ResourceType> cachedTypes) {
+ ResourceTypeCriteria topLevelCriteria = new ResourceTypeCriteria();
+ topLevelCriteria.fetchParentResourceTypes(true);
+ resourceTypeService.findResourceTypesByCriteria(topLevelCriteria, new AsyncCallback<PageList<ResourceType>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.widget_typeCache_loadFail(), caught);
+ loadRequestedTypes(callback, metadataTypes, criteria, cachedTypes);
+ }
+
+ public void onSuccess(PageList<ResourceType> types) {
+ topLevelServerAndServiceTypes = new HashSet<ResourceType>();
+ for (ResourceType type : types) {
+ if ((type.getCategory() != ResourceCategory.PLATFORM) &&
+ (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty())) {
+ topLevelServerAndServiceTypes.add(type);
+ }
+ }
+ loadRequestedTypes(callback, metadataTypes, criteria, cachedTypes);
+ }
+ });
+ }
+
+ private void loadRequestedTypes(final TypesLoadedCallback callback, final EnumSet<MetadataType> metadataTypes, ResourceTypeCriteria criteria, final Map<Integer, ResourceType> cachedTypes) {
resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.widget_typeCache_loadFail(), caught);
@@ -268,7 +307,15 @@ public class ResourceTypeRepository {
for (MetadataType metadataType : metadataTypes) {
switch (metadataType) {
case children:
- cachedType.setChildResourceTypes(type.getChildResourceTypes());
+ Set<ResourceType> childTypes = type.getChildResourceTypes();
+ if (type.getCategory() == ResourceCategory.PLATFORM &&
+ topLevelServerAndServiceTypes != null) {
+ // Add server and service types with no parent types to the list of child types.
+ // These types are implicitly children of all platform types, even though they
+ // are not included in the platform types' childResourceTypes field.
+ childTypes.addAll(topLevelServerAndServiceTypes);
+ }
+ cachedType.setChildResourceTypes(childTypes);
break;
case content:
cachedType.setPackageTypes(type.getPackageTypes());
@@ -304,7 +351,7 @@ public class ResourceTypeRepository {
break;
default:
Log.error("ERROR: metadataType " + metadataType.name()
- + " not merged into cached ResourceType.");
+ + " not merged into cached ResourceType.");
}
}
}
commit 1307c8ddd76d5567fe7914c5b359dc8ad354cb67
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 1 11:39:38 2011 -0400
[BZ 717921] fix potential IndexOutOfBoundsException in unmaskProperty() (https://bugzilla.redhat.com/show_bug.cgi?id=717921)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/util/ConfigurationMaskingUtility.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/util/ConfigurationMaskingUtility.java
index 2059064..0884fbb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/util/ConfigurationMaskingUtility.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/util/ConfigurationMaskingUtility.java
@@ -157,10 +157,11 @@ public class ConfigurationMaskingUtility {
// properties.
if (!memberProperties.isEmpty() && memberProperties.get(0) instanceof PropertyMap) {
PropertyList unmaskedPropertyList = unmaskedParentPropertyMap.getList(propertyList.getName());
- if (unmaskedPropertyList!=null) {
- for (int i = 0; i < propertyList.getList().size(); i++) {
+ if (unmaskedPropertyList != null) {
+ List<Property> unmaskedMemberProperties = unmaskedPropertyList.getList();
+ for (int i = 0; (i < memberProperties.size()) && (i < unmaskedMemberProperties.size()); i++) {
PropertyMap propertyMap = (PropertyMap) memberProperties.get(i);
- PropertyMap unmaskedPropertyMap = (PropertyMap) unmaskedPropertyList.getList().get(i);
+ PropertyMap unmaskedPropertyMap = (PropertyMap) unmaskedMemberProperties.get(i);
unmaskPropertyMap(propertyMap, unmaskedPropertyMap);
}
}
commit ec88d4be0152d195ef769de97f43cdd289d77aeb
Merge: b38642e c4a82bc
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Aug 1 08:41:55 2011 +0200
Merge branch 'code-smell' into master
commit c4a82bca1620900e3bb2c7353ca5425a1ee4b354
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jul 29 17:20:11 2011 -0400
[BZ-726508 - Can't create alert condition on certain metrics]
Since metric def names may not be unique, they are duplicated
for the 'Per Minute' version of certain metrics, don't use them
for the value map keys in alert def drop downs.
- Also, some of these metric name lists are long, sort the
menu entries.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
index 2fd9400..44875d8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
@@ -24,9 +24,11 @@
package org.rhq.enterprise.gui.coregui.client.alert.definitions;
import java.util.ArrayList;
+import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Set;
+import java.util.TreeSet;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.form.DynamicForm;
@@ -572,7 +574,7 @@ public class NewConditionEditor extends LocatableDynamicForm {
LinkedHashMap<String, String> traitsMap = new LinkedHashMap<String, String>();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
if (def.getDataType() == DataType.TRAIT) {
- traitsMap.put(def.getName(), def.getDisplayName());
+ traitsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
@@ -703,10 +705,21 @@ public class NewConditionEditor extends LocatableDynamicForm {
private SelectItem buildMetricDropDownMenu(String itemName, boolean dynamicOnly, FormItemIfFunction ifFunc) {
LinkedHashMap<String, String> metricsMap = new LinkedHashMap<String, String>();
- for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
+ TreeSet<MeasurementDefinition> sortedDefs = new TreeSet<MeasurementDefinition>(
+ new Comparator<MeasurementDefinition>() {
+
+ @Override
+ public int compare(MeasurementDefinition o1, MeasurementDefinition o2) {
+ return o1.getDisplayName().compareTo(o2.getDisplayName());
+ }
+ });
+ sortedDefs.addAll(this.resourceType.getMetricDefinitions());
+
+ for (MeasurementDefinition def : sortedDefs) {
if (def.getDataType() == DataType.MEASUREMENT) {
if (!dynamicOnly || def.getNumericType() == NumericType.DYNAMIC) {
- metricsMap.put(def.getName(), def.getDisplayName());
+ // use id as opposed to name for key, the name is not unique when per-minute metric is also used
+ metricsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
}
@@ -726,7 +739,7 @@ public class NewConditionEditor extends LocatableDynamicForm {
LinkedHashMap<String, String> metricsMap = new LinkedHashMap<String, String>();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
if (def.getDataType() == DataType.CALLTIME) {
- metricsMap.put(def.getName(), def.getDisplayName());
+ metricsMap.put(String.valueOf(def.getId()), def.getDisplayName());
}
}
@@ -790,9 +803,10 @@ public class NewConditionEditor extends LocatableDynamicForm {
return help;
}
- private MeasurementDefinition getMeasurementDefinition(String metricName) {
+ private MeasurementDefinition getMeasurementDefinition(String metricId) {
+ int id = Integer.valueOf(metricId).intValue();
for (MeasurementDefinition def : this.resourceType.getMetricDefinitions()) {
- if (metricName.equals(def.getName())) {
+ if (id == def.getId()) {
return def;
}
}
commit e431028f07369d98a0ffc72c883a8be1c4ab39f6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Jul 29 15:03:54 2011 -0400
[BZ 710230] improve description of testConnection operation on datasources/connFactories (https://bugzilla.redhat.com/show_bug.cgi?id=710230)
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 21161fe..bbe70ea 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -37,7 +37,7 @@
</results>
</operation>
- <operation name="testConnection" displayName="Test Connection" description="Test if a connection can be obtained">
+ <operation name="testConnection" displayName="Test Connection" description="Test if a connection can be obtained - returns true if a connection was obtained, or false if not; NOTE: this operation will always return a status of Successful - the results of the operation must be inspected to see whether or not a connection was obtained">
<results>
<c:notes>Test if a connection can be obtained</c:notes>
<c:simple-property type="boolean" name="result" description="Was a connection obtained?"/>
commit e4e340d418889e7a8972c421fe002a84ff2aa187
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jul 29 13:28:33 2011 -0400
[BZ-726714 - Metric template creation generates NPE (null pointer exception)]
Fix a problem when trying to apply a metric template to a resource in a
"hidden" state like UNINVENTORIED.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
index 98110ac..03cd4bb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
@@ -498,6 +498,17 @@ public class MeasurementScheduleManagerBean implements MeasurementScheduleManage
for (Integer resourceId : reqMap.keySet()) {
Agent agent = agentManager.getAgentByResourceId(subjectManager.getOverlord(), resourceId);
+ // Ignore resources that are not actually associated with an agent. For example,
+ // those with an UNINVENTORIED status.
+ if (null == agent) {
+ if (log.isDebugEnabled()) {
+ log.debug("Ignoring measurement schedule change for non-agent-related resource ["
+ + resourceId + "]. It is probably waiting to be uninventoried.");
+ }
+
+ continue;
+ }
+
Set<ResourceMeasurementScheduleRequest> agentUpdate = agentUpdates.get(agent);
if (agentUpdate == null) {
agentUpdate = new HashSet<ResourceMeasurementScheduleRequest>();
commit 397cb79ad080285aadb93a9257318d4c1ee2c9b6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Jul 29 12:51:50 2011 -0400
some general cleanup/refactoring + improved error handling
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java
index 6314d3a..4315155 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.jbossas5.deploy;
import java.io.File;
@@ -60,14 +59,10 @@ public class ManagedComponentDeployer implements Deployer {
private static final ProfileKey FARM_PROFILE_KEY = new ProfileKey("farm");
private static final ProfileKey APPLICATIONS_PROFILE_KEY = new ProfileKey("applications");
- public static final String DEPLOYMENT_NAME_PROPERTY = "deploymentName";
private PackageDownloader downloader;
private ProfileServiceConnection profileServiceConnection;
- /**
- * @param downloader
- */
public ManagedComponentDeployer(ProfileServiceConnection profileServiceConnection, PackageDownloader downloader) {
this.downloader = downloader;
this.profileServiceConnection = profileServiceConnection;
@@ -120,9 +115,9 @@ public class ManagedComponentDeployer implements Deployer {
deploymentManager.loadProfile(FARM_PROFILE_KEY);
}
- String[] deployedArchives;
+ String[] deploymentNames;
try {
- deployedArchives = DeploymentUtils.deployArchive(deploymentManager, archiveFile, deployExploded);
+ deploymentNames = DeploymentUtils.deployArchive(deploymentManager, archiveFile, deployExploded);
} finally {
// Make sure to switch back to the 'applications' profile if we switched to the 'farm' profile above.
if (deployFarmed) {
@@ -130,62 +125,72 @@ public class ManagedComponentDeployer implements Deployer {
}
}
- //if deployed exploded, we need to store the sha of source package for correct versioning
+ if (deploymentNames == null || deploymentNames.length != 1) {
+ throw new RuntimeException("deploy operation returned invalid result: " + deploymentNames);
+ }
+
+ // e.g.: vfszip:/C:/opt/jboss-6.0.0.Final/server/default/deploy/foo.war
+ String deploymentName = deploymentNames[0];
+
+ // If deployed exploded, we need to store the SHA of source package in META-INF/MANIFEST.MF for correct
+ // versioning.
if (deployExploded) {
- for (String archive : deployedArchives) {
-
- String shaString = new MessageDigestGenerator(MessageDigestGenerator.SHA_256)
- .getDigestString(archiveFile);
-
- URI deployePackageURI = URI.create(archive);
- // e.g.: foo.war
- String path = deployePackageURI.getPath();
- File location = new File(path);
- //We've located the deployed
- if ((location != null) && (location.isDirectory())) {
- File manifestFile = new File(location, "META-INF/MANIFEST.MF");
- Manifest manifest;
- if (manifestFile.exists()) {
- FileInputStream inputStream = new FileInputStream(manifestFile);
- manifest = new Manifest(inputStream);
- inputStream.close();
- } else {
- File metaInf = new File(location, "META-INF");
- if (!metaInf.exists())
- if (!metaInf.mkdir())
- throw new Exception("Could not create directory " + location + "META-INF.");
-
- manifestFile = new File(metaInf, "MANIFEST.MF");
- manifest = new Manifest();
- }
- Attributes attribs = manifest.getMainAttributes();
- attribs.putValue("RHQ-Sha256", shaString);
- FileOutputStream outputStream = new FileOutputStream(manifestFile);
- manifest.write(outputStream);
- outputStream.close();
+ MessageDigestGenerator sha256Generator = new MessageDigestGenerator(MessageDigestGenerator.SHA_256);
+ String shaString = sha256Generator.calcDigestString(archiveFile);
+ URI deploymentURI = URI.create(deploymentName);
+ // e.g.: /C:/opt/jboss-6.0.0.Final/server/default/deploy/foo.war
+ String deploymentPath = deploymentURI.getPath();
+ File deploymentFile = new File(deploymentPath);
+ if (deploymentFile.isDirectory()) {
+ File manifestFile = new File(deploymentFile, "META-INF/MANIFEST.MF");
+ Manifest manifest;
+ if (manifestFile.exists()) {
+ FileInputStream inputStream = new FileInputStream(manifestFile);
+ manifest = new Manifest(inputStream);
+ inputStream.close();
+ } else {
+ File metaInf = new File(deploymentFile, "META-INF");
+ if (!metaInf.exists())
+ if (!metaInf.mkdir())
+ throw new Exception("Could not create directory " + deploymentFile + "META-INF.");
+
+ manifestFile = new File(metaInf, "MANIFEST.MF");
+ manifest = new Manifest();
}
+ Attributes attribs = manifest.getMainAttributes();
+ attribs.putValue("RHQ-Sha256", shaString);
+ FileOutputStream outputStream = new FileOutputStream(manifestFile);
+ manifest.write(outputStream);
+ outputStream.close();
+ } else {
+ LOG.error("Exploded deployment '" + deploymentFile
+ + "' does not exist or is not a directory - unable to add RHQ versioning metadata to META-INF/MANIFEST.MF.");
}
}
+ // Reload the management view to pickup the ManagedDeployment for the app we just deployed.
ManagementView managementView = this.profileServiceConnection.getManagementView();
managementView.load();
- for (String deployedArchive : deployedArchives) {
- ManagedDeployment managedDeployment;
- try {
- managedDeployment = managementView.getDeployment(deployedArchive);
- } catch (NoSuchDeploymentException e) {
- LOG.error("Failed to find managed deployment '" + deployedArchive + "' after deploying '"
- + archiveName + "'.");
- continue;
- }
+
+ ManagedDeployment managedDeployment = null;
+ try {
+ managedDeployment = managementView.getDeployment(deploymentName);
+ } catch (NoSuchDeploymentException e) {
+ LOG.error("Failed to find managed deployment '" + deploymentName + "' after deploying '"
+ + archiveName + "', so cannot start the application.");
+ createResourceReport.setStatus(CreateResourceStatus.INVALID_ARTIFACT);
+ createResourceReport.setErrorMessage("Unable to start application '" + deploymentName
+ + "' after deploying it, since lookup of the associated ManagedDeployment failed.");
+ }
+ if (managedDeployment != null) {
DeploymentState state = managedDeployment.getDeploymentState();
if (state != DeploymentState.STARTED) {
// The app failed to start - do not consider this a FAILURE, since it was at least deployed
// successfully. However, set the status to INVALID_ARTIFACT and set an error message, so
// the user is informed of the condition.
createResourceReport.setStatus(CreateResourceStatus.INVALID_ARTIFACT);
- createResourceReport.setErrorMessage("Failed to start application '" + deployedArchive + "' after deploying it.");
- break;
+ createResourceReport.setErrorMessage("Failed to start application '" + deploymentName
+ + "' after deploying it.");
}
}
commit 72eb1f263b479f2f79754daf4a31479c5a5af2b1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 29 17:25:38 2011 +0200
Add a test for server group creation via createResources.
diff --git a/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/ServerGroupTest.java b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/ServerGroupTest.java
new file mode 100644
index 0000000..c170211
--- /dev/null
+++ b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/ServerGroupTest.java
@@ -0,0 +1,89 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.integrationTests.jbossas7plugin;
+
+import org.testng.annotations.Test;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.modules.plugins.jbossas7.ASConnection;
+import org.rhq.modules.plugins.jbossas7.HostControllerComponent;
+import org.rhq.modules.plugins.jbossas7.json.Remove;
+
+/**
+ * Tests around server groups
+ * @author Heiko W. Rupp
+ */
+@Test
+public class ServerGroupTest extends AbstractIntegrationTest {
+
+ public void createServerGroupViaApi() throws Exception {
+
+ ASConnection connection = getASConnection();
+ HostControllerComponent hcc = new HostControllerComponent();
+ hcc.setConnection(connection);
+
+ Configuration rc = new Configuration();
+ rc.put(new PropertySimple("profile","default"));
+ rc.put(new PropertySimple("socket-binding-group","standard-sockets"));
+ ResourceType rt = new ResourceType();
+
+ String serverGroupName = "_test-sg";
+ try {
+ CreateResourceReport report = new CreateResourceReport(serverGroupName,rt,new Configuration(),rc,null);
+ report = hcc.createResource(report);
+
+ assert report != null;
+ assert report.getStatus()== CreateResourceStatus.SUCCESS : "Create was a failure : " + report.getErrorMessage();
+ } finally {
+ Remove r = new Remove("server-group", serverGroupName);
+ connection.execute(r);
+ }
+
+ }
+
+ public void badCreateServerGroupViaApi() throws Exception {
+
+ ASConnection connection = getASConnection();
+ HostControllerComponent hcc = new HostControllerComponent();
+ hcc.setConnection(connection);
+
+ Configuration rc = new Configuration();
+ rc.put(new PropertySimple("profile","luzibumpf")); // Does not exist op should fail
+ rc.put(new PropertySimple("socket-binding-group","standard-sockets"));
+ ResourceType rt = new ResourceType();
+
+ String serverGroupName = "_test-sg";
+ try {
+ CreateResourceReport report = new CreateResourceReport(serverGroupName,rt,new Configuration(),rc,null);
+ report = hcc.createResource(report);
+
+ assert report != null;
+ assert report.getStatus()== CreateResourceStatus.FAILURE : "Is AS7-1430 solved ? ";
+ assert report.getException()== null;
+ } finally {
+ Remove r = new Remove("server-group", serverGroupName);
+ connection.execute(r);
+ }
+
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
index d28d078..c35f9fe 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -106,6 +106,7 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
else {
report.setErrorMessage(res.getFailureDescription());
report.setStatus(CreateResourceStatus.FAILURE);
+ report.setException(res.getThrowable());
}
return report;
}
commit 8588f93e2b0752b38c95b50f8ad94922667ee206
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 29 15:21:29 2011 +0200
Create / delete server groups via the usual means.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
index 7b20363..d28d078 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -22,8 +22,12 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.Result;
@@ -61,4 +65,48 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
// Defer other stuff to the base component for now
return super.invokeOperation(name, parameters);
}
+
+
+ @Override
+ public CreateResourceReport createResource(CreateResourceReport report) {
+
+ // TODO check for types of children -- this is server group only at the moment.
+
+ String name = report.getUserSpecifiedResourceName();
+ Address address = new Address(path);
+ address.add("server-group",name);
+ Operation op = new Operation("add",address);
+
+ Configuration rc = report.getResourceConfiguration();
+ String profile = rc.getSimpleValue("profile","");
+ if (profile.isEmpty()) {
+ report.setErrorMessage("No profile given");
+ report.setStatus(CreateResourceStatus.FAILURE);
+ return report;
+ }
+ op.addAdditionalProperty("profile",profile);
+ String socketBindingGroup = rc.getSimpleValue("socket-binding-group","");
+ if (socketBindingGroup.isEmpty()) {
+ report.setErrorMessage("No socket-binding-group given");
+ report.setStatus(CreateResourceStatus.FAILURE);
+ return report;
+ }
+ op.addAdditionalProperty("socket-binding-group",socketBindingGroup);
+ PropertySimple offset = rc.getSimple("socket-binding-port-offset");
+ if (offset!=null && offset.getStringValue()!=null)
+ op.addAdditionalProperty("socket-binding-port-offset",offset);
+ // TODO add jvm info
+
+ Result res = getASConnection().execute(op);
+ if (res.isSuccess()) {
+ report.setResourceKey(address.getPath());
+ report.setResourceName(name);
+ report.setStatus(CreateResourceStatus.SUCCESS);
+ }
+ else {
+ report.setErrorMessage(res.getFailureDescription());
+ report.setStatus(CreateResourceStatus.FAILURE);
+ }
+ return report;
+ }
}
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 ad1109b..750743b 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
@@ -29,6 +29,8 @@ import java.util.Set;
import org.codehaus.jackson.JsonNode;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.content.PackageDetailsKey;
import org.rhq.core.domain.content.PackageType;
import org.rhq.core.domain.content.transfer.ContentResponseResult;
@@ -37,10 +39,13 @@ import org.rhq.core.domain.content.transfer.DeployPackageStep;
import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.content.ContentContext;
import org.rhq.core.pluginapi.content.ContentFacet;
import org.rhq.core.pluginapi.content.ContentServices;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index d762485..cb63263 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -53,6 +53,8 @@ public class Address {
public Address(String path) {
this();
+ if (path==null || path.isEmpty())
+ return;
String[] components = path.split(",");
for (String component : components) {
String tmp = component.trim();
@@ -94,4 +96,17 @@ public class Address {
builder.append('}');
return builder.toString();
}
+
+ public String getPath() {
+ StringBuilder builder = new StringBuilder();
+ Iterator<PROPERTY_VALUE> iter = path.iterator();
+ while (iter.hasNext()) {
+ PROPERTY_VALUE val = iter.next();
+ builder.append(val.getKey()).append('=').append(val.getValue());
+ if (iter.hasNext())
+ builder.append(',');
+ }
+ return builder.toString();
+
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 222300e..3432cb6 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -50,7 +50,7 @@
xmlns:c="urn:xmlns:rhq-configuration"
>
- <depends plugin="JMX" useClasses="true"/>
+ <depends plugin="JMX" useClasses="true"/>
<!-- TODO I think we should introduce an abstract AS7 plugin that contains some base functionality and then
@@ -137,21 +137,6 @@
</operation>
-->
- <operation name="server-group:add" displayName="Add ServerGroup" description="Add a server group to the Domain.">
- <parameters>
- <c:simple-property name="name" description="Name of Group to add"/>
- <c:simple-property name="profile" description="Profile to add this group to">
- <c:option-source target="resource" expression="type=Profile plugin=jboss-as-7"/>
- </c:simple-property>
- </parameters>
- </operation>
- <operation name="server-group:remove" displayName="Remove ServerGroup" description="Remove a server group from the Domain.">
- <parameters>
- <c:simple-property name="name" description="Name of Group to remove">
- <c:option-source target="resource" expression="type=ServerGroup"/>
- </c:simple-property>
- </parameters>
- </operation>
<operation name="managed-server:add" displayName="Add managed server" description="Add a new managed server">
<parameters>
<c:simple-property name="servername" displayName="Name of the new server" required="true"/>
@@ -245,8 +230,8 @@
description="Server groups on this domain"
discovery="SubsystemDiscovery"
class="ServerGroupComponent"
+ createDeletePolicy="both"
>
- <!-- TODO move operation to createDeletePolicy="create-only" -->
<plugin-configuration>
<c:simple-property name="path" default="server-group" readOnly="true"/>
@@ -260,7 +245,7 @@
</c:simple-property>
<c:simple-property name="socket-binding-port-offset" required="false" defaultValue="0" type="integer"
description="The default offset to be added to the port values given by the socket binding group."/>
- <c:simple-property name="jvm" required="false"/>
+ <c:simple-property name="jvm" required="false"/> <!-- TODO -->
</resource-configuration>
</server>
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
index cb10279..100abbd 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/PathHandlingTest.java
@@ -22,6 +22,7 @@ import java.util.List;
import org.testng.annotations.Test;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
/**
@@ -103,4 +104,30 @@ public class PathHandlingTest {
String path2 = bc.addressToPath(list);
assert path.equals(path2);
}
+
+ public void emptyAddress() throws Exception {
+
+ Address a = new Address();
+ assert a.getPath() != null;
+ assert a.getPath().isEmpty();
+ }
+
+ public void emptyAddress2() throws Exception {
+
+ Address a = new Address((String)null);
+ assert a.getPath() != null;
+ assert a.getPath().isEmpty();
+ }
+
+ public void addressPath1() throws Exception {
+ String path = "subsystem=jms,profile=default,queue=foo";
+ Address a = new Address("/"+path);
+ assert a.getPath().equals(path);
+ }
+
+ public void addressPath2() throws Exception {
+ String path = "subsystem=jms,profile=default,queue=foo";
+ Address a = new Address(path);
+ assert a.getPath().equals(path);
+ }
}
commit ff1fc54e0d3c744c5a66172d375eb44dca31e631
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Fri Jul 29 09:03:56 2011 -0400
BZ:726502,717526: removing deprecated content from the remote interface as duplicate but deprecated names causes non-unique message signatures which creates invalid wsdl.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java
index 0883859..d92883f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java
@@ -47,64 +47,6 @@ import org.rhq.enterprise.server.system.ServerVersion;
public interface ResourceFactoryManagerRemote {
/**
- * @Deprecated
- *
- * Use new signature with timeout parameter:
- * @{link {@link #createPackageBackedResource(Subject, int, int, String, Configuration, String, String, Integer, Configuration, byte[], Integer)}
- */
- @WebMethod
- CreateResourceHistory createResource( //
- @WebParam(name = "subject") Subject subject, //
- @WebParam(name = "parentResourceId") int parentResourceId, //
- @WebParam(name = "resourceTypeId") int resourceTypeId, //
- @WebParam(name = "resourceName") String resourceName, //
- @WebParam(name = "pluginConfiguration") Configuration pluginConfiguration, //
- @WebParam(name = "resourceConfiguration") Configuration resourceConfiguration);
-
- /**
- * @Deprecated
- *
- * Use new signature with timeout parameter:
- * @{link {@link #createPackageBackedResource(Subject, int, int, String, Configuration, String, String, Integer, Configuration, byte[], Integer)}
- */
- @WebMethod
- CreateResourceHistory createPackageBackedResource(//
- @WebParam(name = "subject") Subject subject, //
- @WebParam(name = "parentResourceId") int parentResourceId, //
- @WebParam(name = "newResourceTypeId") int newResourceTypeId, //
- @WebParam(name = "newResourceName") String newResourceName, //
- @WebParam(name = "pluginConfiguration")//
- @XmlJavaTypeAdapter(value = ConfigurationAdapter.class)//
- Configuration pluginConfiguration, //
- @WebParam(name = "packageName") String packageName, //
- @WebParam(name = "packageVersion") String packageVersion, //
- @WebParam(name = "architectureId") Integer architectureId, //
- @WebParam(name = "deploymentTimeConfiguration")//
- @XmlJavaTypeAdapter(value = ConfigurationAdapter.class)//
- Configuration deploymentTimeConfiguration, //
- @WebParam(name = "packageBits") byte[] packageBits);
-
- /**
- * @Deprecated
- *
- * Use new signature with timeout parameter:
- * @{link {@link #createPackageBackedResourceViaPackageVersion(Subject, int, int, String, Configuration, Configuration, int, Integer)
- */
- @WebMethod
- public CreateResourceHistory createPackageBackedResourceViaPackageVersion(//
- @WebParam(name = "subject") Subject subject, //
- @WebParam(name = "parentResourceId") int parentResourceId, //
- @WebParam(name = "newResourceTypeId") int newResourceTypeId, //
- @WebParam(name = "newResourceName") String newResourceName, //
- @WebParam(name = "pluginConfiguration")//
- @XmlJavaTypeAdapter(value = ConfigurationAdapter.class)//
- Configuration pluginConfiguration, //
- @WebParam(name = "deploymentTimeConfiguration")//
- @XmlJavaTypeAdapter(value = ConfigurationAdapter.class)//
- Configuration deploymentTimeConfiguration, //
- @WebParam(name = "packageVersionId") int packageVersionId);
-
- /**
* Creates a new physical resource. The resource will be created as a child of the specified parent. In other words,
* the resource component of the indicated parent will be used to create the new resource. This call should only be
* made for resource types that are defined with a create/delete policy of {@link CreateDeletePolicy#BOTH} or
commit 9b724fbe429fcd95ffadf460ccdbc176257fff47
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 29 12:51:09 2011 +0200
Support detection of running configuration for host controllers + usage of the configuration on start operation.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AS7Mode.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AS7Mode.java
new file mode 100644
index 0000000..a98e13c
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AS7Mode.java
@@ -0,0 +1,64 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+/**
+ * Various definitions for the operation modes of AS7 (HOST is strictly no mode, but fits here nicely)
+ * @author Heiko W. Rupp
+ */
+public enum AS7Mode {
+
+ STANDALONE("standalone.xml", "standalone", "--server-config", "bin/standalone.sh","config"),
+ DOMAIN("domain.xml", "domain", "--domain-config", "bin/domain.sh","domainConfig"),
+ HOST("host.xml", "domain", "--host-config", "bin/domain.sh","hostConfig");
+
+ private String defaultXmlFile;
+ private String baseDir;
+ private String configArg;
+ private String startScript;
+ private String configPropertyName;
+
+ private AS7Mode(String defaultXmlFile, String baseDir, String configArg, String startScript, String configPropertyName) {
+ this.defaultXmlFile = defaultXmlFile;
+ this.baseDir = baseDir;
+ this.configArg = configArg;
+ this.startScript = startScript;
+ this.configPropertyName = configPropertyName;
+ }
+
+ public String getDefaultXmlFile() {
+ return defaultXmlFile;
+ }
+
+ public String getBaseDir() {
+ return baseDir;
+ }
+
+ public String getConfigArg() {
+ return configArg;
+ }
+
+ public String getStartScript() {
+ return startScript;
+ }
+
+ public String getConfigPropertyName() {
+ return configPropertyName;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
index c089b79..79a4fab 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
@@ -18,6 +18,7 @@
*/
package org.rhq.modules.plugins.jbossas7;
+import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
@@ -243,14 +244,14 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
home = getHomeDirFromCommandLine(processInfo.getCommandLine());
StringBuilder builder = new StringBuilder(home);
if (isDomain)
- builder.append("/domain");
+ builder.append(File.separator).append(AS7Mode.DOMAIN.getBaseDir());
else
- builder.append("/standalone");
- builder.append("/configuration");
+ builder.append(File.separator).append(AS7Mode.STANDALONE.getBaseDir());
+ builder.append(File.separator).append("configuration");
if (isDomain)
- builder.append("/host.xml");
+ builder.append(File.separator).append(AS7Mode.HOST.getDefaultXmlFile());
else
- builder.append("/standalone.xml");
+ builder.append(File.separator).append(AS7Mode.STANDALONE.getDefaultXmlFile());
return builder.toString();
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 7042ac0..1b05ae6 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -88,23 +88,28 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
- serverName = "DomainController";
+ serverName = "DomainController"; // TODO make more unique
serverNameFull = "DomainController";
description = "Domain controller for an AS7 domain";
- } else {
- serverName = "HostController";
+ }
+ else {
+ serverName = "HostController"; // TODO make more unique
serverNameFull = "HostController";
}
String homeDir = getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine());
config.put(new PropertySimple("baseDir", homeDir));
version = homeDir.substring(homeDir.lastIndexOf("-") + 1);
- config.put(new PropertySimple("startScript", "bin/domain.sh"));
+ config.put(new PropertySimple("startScript", AS7Mode.DOMAIN.getStartScript()));
String host = findHost(psr.getProcessInfo(), true);
config.put(new PropertySimple("domainHost", host));
fillUserPassFromFile(config, "domain", homeDir);
- // TODO provide running config
+ // provide running config
+ String domainConfig = getServerConfigFromCommandLine(commandLine, AS7Mode.DOMAIN);
+ String hostConfig = getServerConfigFromCommandLine(commandLine, AS7Mode.HOST);
+ config.put(new PropertySimple("domainConfig",domainConfig));
+ config.put(new PropertySimple("hostConfig",hostConfig));
} else { // Standalone server
serverNameFull = getHomeDirFromCommandLine(commandLine);
@@ -131,9 +136,9 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
version = serverName.substring(serverName.lastIndexOf("-") + 1);
- String serverConfig = getServerConfigFromCommandLine(commandLine);
- config.put(new PropertySimple("config", serverConfig));
- config.put(new PropertySimple("startScript", "bin/standalone.sh"));
+ String serverConfig = getServerConfigFromCommandLine(commandLine, AS7Mode.STANDALONE);
+ config.put(new PropertySimple("config",serverConfig));
+ config.put(new PropertySimple("startScript",AS7Mode.STANDALONE.getStartScript()));
fillUserPassFromFile(config, "standalone", serverNameFull);
@@ -238,12 +243,19 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
return hostName;
}
- String getServerConfigFromCommandLine(String[] commandLine) {
- for (String line : commandLine) {
- if (line.startsWith(DASH_DASH_SERVER_CONFIG))
- return line.substring(DASH_DASH_SERVER_CONFIG.length());
+ /**
+ * Obtain the running configuration from the command line if it was passed via --(server,domain,host)-config
+ * @param commandLine Command line to look at
+ * @param mode mode and thus command line switch to look for
+ * @return the config or the default for the mode if no config was passed on the command line.
+ */
+ String getServerConfigFromCommandLine(String[] commandLine, AS7Mode mode) {
+ String configArg = mode.getConfigArg();
+ for (String line: commandLine) {
+ if (line.startsWith(configArg))
+ return line.substring(configArg.length()+1);
}
- return "standalone.xml";
+ return mode.getDefaultXmlFile();
}
//-Dorg.jboss.boot.log.file=/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/log/server-manager/boot.log
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
index c8703a6..328ec3c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
@@ -20,6 +20,8 @@ package org.rhq.modules.plugins.jbossas7;
import java.io.File;
import java.net.ConnectException;
+import java.util.ArrayList;
+import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -37,7 +39,6 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
*/
public class BaseServerComponent extends BaseComponent {
- private static final String STANDALONE_XML = "standalone.xml";
private static final String SEPARATOR = "\n-----------------------\n";
final Log log = LogFactory.getLog(BaseServerComponent.class);
@@ -50,7 +51,7 @@ public class BaseServerComponent extends BaseComponent {
* @return State of execution
* @throws Exception If anything goes wrong
*/
- protected OperationResult restartServer(Configuration parameters, Mode mode) throws Exception {
+ protected OperationResult restartServer(Configuration parameters, AS7Mode mode) throws Exception {
OperationResult tmp = invokeOperation("shutdown",parameters);
if (tmp.getErrorMessage()!=null) {
@@ -67,23 +68,38 @@ public class BaseServerComponent extends BaseComponent {
* @return State of Execution.
* @param mode
*/
- protected OperationResult startServer(Mode mode) {
+ protected OperationResult startServer(AS7Mode mode) {
OperationResult operationResult = new OperationResult();
- Configuration conf = context.getPluginConfiguration();
- String startScript = conf.getSimpleValue("startScript", mode.getStartScript());
- String baseDir = conf.getSimpleValue("baseDir","");
+ String startScript = pluginConfiguration.getSimpleValue("startScript", mode.getStartScript());
+ String baseDir = pluginConfiguration.getSimpleValue("baseDir","");
if (baseDir.isEmpty()) {
operationResult.setErrorMessage("No base directory provided");
return operationResult;
}
String script = baseDir + File.separator + startScript;
- String config = conf.getSimpleValue("config", mode.getXmlFile());
ProcessExecution processExecution;
processExecution = ProcessExecutionUtility.createProcessExecution(new File(script));
- if (!config.equals(mode.getXmlFile())) {
- processExecution.getArguments().add(mode.getConfigArg());
- processExecution.getArguments().add(config);
+
+ String config = pluginConfiguration.getSimpleValue(mode.getConfigPropertyName(), mode.getDefaultXmlFile());
+ List<String> arguments = processExecution.getArguments();
+ if (arguments==null) {
+ arguments = new ArrayList<String>();
+ processExecution.setArguments(arguments);
+ }
+
+ if (!config.equals(mode.getDefaultXmlFile())) {
+ arguments.add(mode.getConfigArg());
+ arguments.add(config);
+ }
+ if (mode==AS7Mode.DOMAIN) {
+ // We also need to check for host-config
+ config = pluginConfiguration.getSimpleValue(AS7Mode.HOST.getConfigPropertyName(),AS7Mode.HOST.getDefaultXmlFile());
+ if (!config.equals(AS7Mode.HOST.getDefaultXmlFile())) {
+ arguments.add(AS7Mode.HOST.getConfigArg());
+ arguments.add(config);
+
+ }
}
processExecution.setWorkingDirectory(baseDir);
processExecution.setCaptureOutput(true);
@@ -91,7 +107,6 @@ public class BaseServerComponent extends BaseComponent {
processExecution.setKillOnTimeout(false);
- long start = System.currentTimeMillis();
if (log.isDebugEnabled()) {
log.debug("About to execute the following process: [" + processExecution + "]");
}
@@ -148,37 +163,4 @@ public class BaseServerComponent extends BaseComponent {
return operationResult;
}
- enum Mode {
- STANDALONE(STANDALONE_XML,"standalone","--server-config","bin/standalone.sh"),
- DOMAIN("domain.xml","domain", "--domain-config","bin/domain.sh"),
- HOST("host.xml","domain", "--host-config","bin/domain.sh");
-
- private String xmlFile;
- private String baseDir;
- private String configArg;
- private String startScript;
-
- private Mode(String xmlFile, String baseDir, String configArg, String startScript) {
- this.xmlFile = xmlFile;
- this.baseDir = baseDir;
- this.configArg = configArg;
- this.startScript = startScript;
- }
-
- public String getXmlFile() {
- return xmlFile;
- }
-
- public String getBaseDir() {
- return baseDir;
- }
-
- public String getConfigArg() {
- return configArg;
- }
-
- public String getStartScript() {
- return startScript;
- }
- }
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
index 73eb0bb..7b20363 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -40,9 +40,9 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
Configuration parameters) throws InterruptedException, Exception {
if (name.equals("start")) {
- return startServer(Mode.DOMAIN);
+ return startServer(AS7Mode.DOMAIN);
} else if (name.equals("restart")) {
- return restartServer(parameters, Mode.DOMAIN);
+ return restartServer(parameters, AS7Mode.DOMAIN);
} else if (name.equals("shutdown")) {
// This is a bit trickier, as it needs to be executed on the level on /host=xx
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
index ebddf95..11a0e4d 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -18,8 +18,6 @@
*/
package org.rhq.modules.plugins.jbossas7;
-import java.net.ConnectException;
-
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
@@ -38,9 +36,9 @@ public class StandaloneASComponent extends BaseServerComponent implements Operat
Configuration parameters) throws Exception {
if (name.equals("start")) {
- return startServer(Mode.STANDALONE);
+ return startServer(AS7Mode.STANDALONE);
} else if (name.equals("restart")) {
- return restartServer(parameters, Mode.STANDALONE);
+ return restartServer(parameters, AS7Mode.STANDALONE);
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 737ef86..222300e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -86,7 +86,8 @@
<c:simple-property name="port" default="9990" type="integer" required="true" description="Port of the domain API"/>
<c:simple-property name="user" type="string" description="Management user for a secured Host controller" required="false"/>
<c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
- <c:simple-property name="config" type="string" default="domain.xml" description="Running configuration" displayName="Configuration"/>
+ <c:simple-property name="domainConfig" type="string" default="domain.xml" description="Running configuration (domain part)" displayName="Configuration"/>
+ <c:simple-property name="hostConfig" type="string" default="host.xml" description="Running configuration (host part)" displayName="Configuration"/>
<c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
<c:simple-property name="startScript" type="file" default="bin/domain.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
<c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
commit b38642e2f6dc7ea6ada5781440c7580336b38af6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 23:47:32 2011 -0400
[coverity] fix NPE
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertNotificationManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertNotificationManagerBean.java
index 60d6b0f..a57c686 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertNotificationManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertNotificationManagerBean.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.server.alert;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -307,24 +306,26 @@ public class AlertNotificationManagerBean implements AlertNotificationManagerLoc
public boolean finalizeNotifications(Subject subject, List<AlertNotification> notifications) {
boolean hasErrors = false;
-
+
AlertSenderPluginManager pluginManager = alertManager.getAlertPluginManager();
-
- for(AlertNotification notification : notifications) {
+
+ for (AlertNotification notification : notifications) {
AlertSender<?> sender = pluginManager.getAlertSenderForNotification(notification);
-
- AlertSenderValidationResults validation = sender.validateAndFinalizeConfiguration(subject);
-
- notification.setConfiguration(validation.getAlertParameters());
- notification.setExtraConfiguration(validation.getExtraParameters());
-
- hasErrors = hasErrors || hasErrors(validation.getAlertParameters()) ||
- hasErrors(validation.getExtraParameters());
- }
-
+
+ if (sender != null) {
+ AlertSenderValidationResults validation = sender.validateAndFinalizeConfiguration(subject);
+
+ notification.setConfiguration(validation.getAlertParameters());
+ notification.setExtraConfiguration(validation.getExtraParameters());
+
+ hasErrors = hasErrors || hasErrors(validation.getAlertParameters())
+ || hasErrors(validation.getExtraParameters());
+ }
+ }
+
return !hasErrors;
}
-
+
public int cleanseAlertNotificationBySubject(int subjectId) {
return cleanseParameterValueForAlertSender("System Users", "subjectId", String.valueOf(subjectId));
}
@@ -335,17 +336,17 @@ public class AlertNotificationManagerBean implements AlertNotificationManagerLoc
public void massReconfigure(List<Integer> alertNotificationIds, Map<String, String> newConfigurationValues) {
Query query = entityManager.createNamedQuery(AlertNotification.QUERY_UPDATE_PARAMETER_FOR_NOTIFICATIONS);
-
+
query.setParameter("alertNotificationIds", alertNotificationIds);
-
- for(Map.Entry<String, String> entry : newConfigurationValues.entrySet()) {
+
+ for (Map.Entry<String, String> entry : newConfigurationValues.entrySet()) {
query.setParameter("propertyName", entry.getKey());
query.setParameter("propertyValue", entry.getValue());
-
+
query.executeUpdate();
}
}
-
+
private int cleanseParameterValueForAlertSender(String senderName, String propertyName, String valueToCleanse) {
Query query = entityManager.createNamedQuery(AlertNotification.QUERY_CLEANSE_PARAMETER_VALUE_FOR_ALERT_SENDER);
query.setParameter("senderName", senderName);
@@ -357,43 +358,43 @@ public class AlertNotificationManagerBean implements AlertNotificationManagerLoc
private boolean hasErrors(AbstractPropertyMap configuration) {
if (configuration instanceof PropertyMap) {
- if (((PropertyMap)configuration).getErrorMessage() != null) {
+ if (((PropertyMap) configuration).getErrorMessage() != null) {
return true;
}
}
-
- for(Map.Entry<String, Property> entry : configuration.getMap().entrySet()) {
+
+ for (Map.Entry<String, Property> entry : configuration.getMap().entrySet()) {
if (hasErrors(entry.getValue())) {
return true;
}
}
-
+
return false;
}
-
+
private boolean hasErrors(PropertyList list) {
if (list.getErrorMessage() != null) {
return true;
}
-
- for(Property p : list.getList()) {
+
+ for (Property p : list.getList()) {
if (hasErrors(p)) {
return true;
}
}
-
+
return false;
}
-
+
private boolean hasErrors(Property property) {
if (property instanceof PropertySimple) {
return property.getErrorMessage() != null;
} else if (property instanceof PropertyList) {
return hasErrors((PropertyList) property);
} else if (property instanceof PropertyMap) {
- return hasErrors((AbstractPropertyMap)property);
+ return hasErrors((AbstractPropertyMap) property);
} else {
return false;
}
- }
+ }
}
commit 9537fe73100bcef9054098b2fa0f41f43b108e9d
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 23:44:09 2011 -0400
[coverity] fix NPE
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfiguration.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfiguration.java
index 3db9170..3f07f8b 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfiguration.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentConfiguration.java
@@ -661,6 +661,13 @@ public class AgentConfiguration {
long[] ret_params = isClientSenderCommandSpoolFileParamsValueValid(value);
+ // If the config was invalid, immediately fall back to our default just so we don't bomb out with a NPE later.
+ // We are guaranteed not to get a null returned if we pass in the hardcoded default params.
+ // The above method will have already logged a warning for us.
+ if (ret_params == null) {
+ ret_params = isClientSenderCommandSpoolFileParamsValueValid(AgentConfigurationConstants.DEFAULT_CLIENT_SENDER_COMMAND_SPOOL_FILE_PARAMS);
+ }
+
return ret_params;
}
@@ -1229,7 +1236,6 @@ public class AgentConfiguration {
return config;
}
-
/**
* This returns the agent's security token that it needs to send with its commands to the server. If <code>
* null</code>, it means the agent has not yet been registered with the server.
commit 7fd8a41c6bf1f3327e968611c5fb0452e6f455a4
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 23:29:58 2011 -0400
[coverity] fix NPE
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 85f5e92..5860fb6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -53,8 +53,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceT
import org.rhq.enterprise.gui.coregui.client.menu.MenuBarView;
import org.rhq.enterprise.gui.coregui.client.report.ReportTopView;
import org.rhq.enterprise.gui.coregui.client.report.tag.TaggedView;
-import org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestDataSourceResponseStatisticsView;
+import org.rhq.enterprise.gui.coregui.client.test.TestRemoteServiceStatisticsView;
import org.rhq.enterprise.gui.coregui.client.test.TestTopView;
import org.rhq.enterprise.gui.coregui.client.util.ErrorHandler;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -524,10 +524,12 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
}
}.run(); // fire the timer immediately
} else {
- if (this.currentCanvas instanceof BookmarkableView) {
- ((BookmarkableView) this.currentCanvas).renderView(viewPath.next());
- } else {
- this.currentCanvas.markForRedraw();
+ if (this.currentCanvas != null) {
+ if (this.currentCanvas instanceof BookmarkableView) {
+ ((BookmarkableView) this.currentCanvas).renderView(viewPath.next());
+ } else {
+ this.currentCanvas.markForRedraw();
+ }
}
}
}
commit 47dad6a1bae981765565df5f6b25e0e2aacbc7a3
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 23:06:00 2011 -0400
[coverity] close initial contexts
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index b385473..cff3343 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -24,8 +24,13 @@ public class JPAUtils {
public static EntityManager lookupEntityManager() {
try {
- return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
- .createEntityManager();
+ InitialContext initialContext = getInitialContext();
+ try {
+ return ((EntityManagerFactory) initialContext.lookup("java:/RHQEntityManagerFactory"))
+ .createEntityManager();
+ } finally {
+ initialContext.close();
+ }
} catch (NamingException e) {
throw new RuntimeException("Failed to load entity manager", e);
}
@@ -33,7 +38,12 @@ public class JPAUtils {
public static TransactionManager lookupTransactionManager() {
try {
- return (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
+ InitialContext initialContext = getInitialContext();
+ try {
+ return (TransactionManager) initialContext.lookup("java:/TransactionManager");
+ } finally {
+ initialContext.close();
+ }
} catch (NamingException e) {
throw new RuntimeException("Failed to load transaction manager", e);
}
commit a0dcfe490b595b9c950eff69a1d4efa9410482d9
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 23:04:17 2011 -0400
[coverity] fix NPE
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
index 38d0fa5..2321fd3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
@@ -591,8 +591,8 @@ public class ResourceGroupTreeView extends LocatableVLayout implements Bookmarka
public void renderView(ViewPath viewPath) {
currentViewId = viewPath.getCurrent();
- String currentViewIdPath = currentViewId.getPath();
if (this.currentViewId != null) {
+ String currentViewIdPath = currentViewId.getPath();
if ("AutoCluster".equals(currentViewIdPath)) {
// Move the currentViewId to the ID portion to play better with other code
currentViewId = viewPath.getNext();
commit 5cd3024ccd2ef2712864f1331a7500d5b7abe1d8
Merge: ed7aad1 da99d5b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 22:55:15 2011 -0400
Merge commit 'origin/master' into code-smell
Conflicts:
modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
commit da99d5b85bd144692afa90f158b5d09cd486f721
Merge: 01286aa b35ba5b
Author: Rafael Soares <rafaelcba(a)gmail.com>
Date: Thu Jul 28 23:16:43 2011 -0300
--ammend
diff --cc modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 26f33b9,fa86006..db58050
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@@ -393,15 -394,15 +393,15 @@@ util_rpcManager_activeRequests = {0} Re
util_userPerm_loadFailGlobal = Falha ao carregar permiss\u00F5es globais - nenhuma permiss\u00E3o concedida.
util_userPerm_loadFailGroup = Falha ao carregar suas permiss\u00F5es para o Grupo de Recursos com id [{0}] - nenhuma permiss\u00E3o concedida.
util_userPerm_loadFailResource = Falha ao carregar suas permiss\u00F5es para o Recurso com id [{0}] - nenhuma permiss\u00E3o concedida.
- util_userSession_loadFailSubject = UserSessionManager\\\\\\\\: Falha ao carregar a credencial do usu\u00E1rio
+ util_userSession_loadFailSubject = UserSessionManager: Falha ao carregar a credencial do usu\u00E1rio
util_userSession_logoutFail = Falha durante o logout.
util_widgetsField_unlimited = Ilimitado
-view_aboutBox_allRightsReserved = Todos os Direitos Reservados.~
-view_aboutBox_buildNumber = N\u00FAmero do Build:~
-view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.~
-view_aboutBox_homepage = P\u00E1gina Inicial~
-view_aboutBox_jbossByRedHat = JBoss by Red Hat~
-view_aboutBox_title = Sobre {0}~
+view_aboutBox_allRightsReserved = Todos os Direitos Reservados.
- view_aboutBox_buildNumber = N\u00FAmero do Build\\\\\\\\:
++view_aboutBox_buildNumber = N\u00FAmero do Build:
+view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.
+view_aboutBox_homepage = P\u00E1gina Inicial
+view_aboutBox_jbossByRedHat = JBoss by Red Hat
+view_aboutBox_title = Sobre {0}
view_aboutBox_version = Vers\u00E3o:
view_adminConfig_downloads = Downloads
view_adminConfig_license = Licen\u00E7a
@@@ -850,11 -851,9 +850,11 @@@ view_alerts_loadFailed = Falha ao carre
view_alerts_table_filter_priority = Filtro de Prioridade
view_alerts_table_title_group = Hist\u00F3rico de Alertas do Grupo
view_alerts_table_title_resource = Hist\u00F3rico de Alertas do Recurso
-view_autoDiscoveryQ_committed = Committed
-view_autoDiscoveryQ_confirmSelect = Also select the platform children?
-view_autoDiscoveryQ_deleted = Deleted
+view_autoDiscoveryQ_committed = Registrado
+view_autoDiscoveryQ_confirmSelect = Selecionar recursos filhos desta plataforma?
+view_autoDiscoveryQ_confirmSelectAll = Selecionar recursos filhos para cada plataforma?
- view_autoDiscoveryQ_deleted = Exclu\\\\u00EDdo
++view_autoDiscoveryQ_deleted = Exclu\u00EDdo
+view_autoDiscoveryQ_deselectAll = Desmarcar todos
view_autoDiscoveryQ_field_discoveryTime = Data e Hora da Descoberta
view_autoDiscoveryQ_field_inventoryStatus = Status do Invet\u00E1rio
view_autoDiscoveryQ_field_key = Chave do Recurso
@@@ -873,195 -870,193 +873,195 @@@ view_autoDiscoveryQ_loadFailure = Falh
view_autoDiscoveryQ_new = Novo
view_autoDiscoveryQ_newAndIgnored = Novo e Ignorado
view_autoDiscoveryQ_noItems = N\u00E3o h\u00E1 itens a serem mostrados
- view_autoDiscoveryQ_noperm = (Requer permiss\\\\u00E3o para gerenciar o Inevnt\\\\u00E1rio. Contacte o Administrador para realizar a altera\\\\u00E7\\\\u00E3o)
-view_autoDiscoveryQ_noperm = (Required manage inventory permissions missing. See Administrator to change)~
-view_autoDiscoveryQ_showStatus = Show
++view_autoDiscoveryQ_noperm = (Requer permiss\u00E3o para gerenciar o Inevnt\u00E1rio. Contacte o Administrador para realizar a altera\u00E7\u00E3o)
+view_autoDiscoveryQ_selectAll = Selecionar todos
+view_autoDiscoveryQ_showStatus = Mostrar
view_autoDiscoveryQ_title = Fila de Autodescoberta
view_autoDiscoveryQ_unignore = N\u00E3o ignorar
view_autoDiscoveryQ_unignoreFailure = Falha ao reimportar os recursos
-view_autoDiscoveryQ_unignoreSuccessful = You have successfully unignored the selected resources.~
-view_autoDiscoveryQ_uninventoried = Uninventoried
-view_bundleVersion_loadFailure = Failed to load bundle version data~
-view_bundle_bundle = Bundle~
-view_bundle_bundleDeployment = Bundle Deployment~
-view_bundle_bundleDeployments = Bundle Deployments~
-view_bundle_bundleDestinations = Bundle Destinations~
-view_bundle_bundleFiles = Bundle Files~
-view_bundle_bundleType = Bundle Type~
-view_bundle_bundleVersion = Bundle Version~
-view_bundle_bundleVersions = Bundle Versions~
-view_bundle_bundles = Bundles~
-view_bundle_createWizard_bundleDistro = Bundle Distribution~
-view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version = [{1}] - the bundle may still exist in the database~
-view_bundle_createWizard_cancelSuccessful = Canceled the creation of bundle [{0}], version = [{1}]~
-view_bundle_createWizard_clickToUploadRecipe = Click to upload a recipe file~
-view_bundle_createWizard_createFailure = Failed to create the bundle~
-view_bundle_createWizard_createSuccessful = You have successfully created a bundle named [{0}] with a version of [{1}]~
-view_bundle_createWizard_enterRecipe = Please supply a valid recipe
-view_bundle_createWizard_enterUrl = Please enter a valid URL where the bundle distribution file can be downloaded from
-view_bundle_createWizard_failedToUploadDistroFile = Failed to upload bundle distribution file~
-view_bundle_createWizard_failedToUploadFile = Failed to upload bundle file~
-view_bundle_createWizard_loadBundleFileFailure = Cannot obtain bundle file information from server~
-view_bundle_createWizard_noAdditionalFilesNeeded = No additional files need to be uploaded for this bundle~
-view_bundle_createWizard_noBundleTypesAvail = No bundle types are available~
-view_bundle_createWizard_noBundleTypesSupported = No bundle types are supported - you must deploy a valid plugin that supports bundle deployments~
-view_bundle_createWizard_provideBundleDistro = Provide a Bundle Distribution
-view_bundle_createWizard_recipeOption = Recipe~
-view_bundle_createWizard_title = Create Bundle~
-view_bundle_createWizard_uploadInProgress = Upload is in progress... This can take several minutes for large files~
-view_bundle_createWizard_uploadOption = Upload~
-view_bundle_createWizard_uploadStepName = Provide a Bundle Distribution~
-view_bundle_createWizard_urlOption = URL~
-view_bundle_createWizard_windowTitle = Bundle Creation Wizard~
-view_bundle_createWizard_youMustChooseOne = You must choose one option in order to create a bundle!
-view_bundle_deleteConfirm = Are you sure you want to delete this bundle? All versions, destinations and deployments for this bundle will also be deleted.
-view_bundle_deploy = Deploy~
-view_bundle_deployDir = Deploy Directory~
-view_bundle_deployWizard_deployStep = Deploy Bundle to Destination Platforms~
-view_bundle_deployWizard_deploying = Deploying...~
-view_bundle_deployWizard_deploymentCreated = Created Deployment...~
-view_bundle_deployWizard_deploymentCreatedDetail = Created deployment [{0}] description [{1}]~
-view_bundle_deployWizard_deploymentCreatedDetail_concise = You have created the deployment [{0}]
-view_bundle_deployWizard_deploymentScheduled = Bundle Deployment Scheduled!~
-view_bundle_deployWizard_deploymentScheduledDetail = Scheduled bundle deployment [{0}] destination group [{1}]~
-view_bundle_deployWizard_deploymentScheduledDetail_concise = You have scheduled the bundle deployment
-view_bundle_deployWizard_destinationCreatedDetail = Created destination [{0}] description [{1}]~
-view_bundle_deployWizard_destinationCreatedDetail_concise = You have created the destination [{0}]
-view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel:
-view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)~
-view_bundle_deployWizard_error_11 = Failed to find defined deployments.~
-view_bundle_deployWizard_error_12 = Failed to find defined bundles.~
-view_bundle_deployWizard_error_2 = Failed to delete new destination on Cancel:
-view_bundle_deployWizard_error_3 = Failed to Schedule Deployment!~
-view_bundle_deployWizard_error_4 = Failed to schedule deployment: {0}~
-view_bundle_deployWizard_error_5 = Failed to Create Deployment!~
-view_bundle_deployWizard_error_6 = Failed to create deployment: {0}~
-view_bundle_deployWizard_error_7 = Failed to get deployment name.~
-view_bundle_deployWizard_error_8 = You must select a valid resource group from the drop down~
-view_bundle_deployWizard_error_9 = Failed to delete new destination in nextPage:~
-##view_bundle_deployWizard_error_noBundleConfig = Failed to obtain bundle target information. Is the group you selected a valid compatible group that can be targeted for bundle deployments?
-view_bundle_deployWizard_getConfigSkip = No configuration needed for this bundle version.~
-view_bundle_deployWizard_getConfigStep = Set Deployment Configuration~
-view_bundle_deployWizard_getDestStep = New Destination~
-##view_bundle_deployWizard_getDest_deployDir = Deployment Directory
-##view_bundle_deployWizard_getDest_deployDir_help = The directory where the bundle will be deployed. This directory will be the same for all deployments on all resources but it is relative to the destination base directory location. This means that the absolute directory may have a different path on the different target resources depending on where the base location is on all the different target resources.
-##view_bundle_deployWizard_getDest_desc = Destination Description
-##view_bundle_deployWizard_getDest_destBaseDirName = Base Location
-##view_bundle_deployWizard_getDest_group_help = The group whose members will be the destination targets for all bundle deployments. Only compatible groups that contain resources that support bundle deployments are selectable.
-##view_bundle_deployWizard_getDest_name = Destination Name
-##view_bundle_deployWizard_getDest_name_help = The name of the destination, which will identify a particular group of resources and the destination directory on those resources for a particular bundle.
-view_bundle_deployWizard_getInfoStep = Provide Deployment Information~
-view_bundle_deployWizard_getInfo_clean = Clean Deployment? (wipe deploy directory on destination platform)~
-view_bundle_deployWizard_getInfo_deploymentDesc = Deployment Description~
-view_bundle_deployWizard_getInfo_deploymentName = Deployment Name~
-view_bundle_deployWizard_getOptionsStep = Deploy Options~
-view_bundle_deployWizard_getOptions_deployLater = Deploy Later~
-view_bundle_deployWizard_getOptions_deployNow = Deploy Now~
-view_bundle_deployWizard_getOptions_deployTime = Deployment Time~
-view_bundle_deployWizard_selectBundleStep = Select Deployment Bundle~
-view_bundle_deployWizard_selectBundle_single = Select only a single bundle for deployment.~
-view_bundle_deployWizard_selectVersionStep = Select Deployment Bundle Version~
-view_bundle_deployWizard_selectVersion_latest = Latest Version [{0}]~
-view_bundle_deployWizard_selectVersion_live = Live Version [{0}]~
-view_bundle_deployWizard_selectVersion_select = Select Version from List:~
-view_bundle_deployWizard_title = Bundle Deployment Wizard~
-view_bundle_deploy_action = Action~
-view_bundle_deploy_backButton = Back to Destination~
-view_bundle_deploy_clickForError = Click the icon for the error message
-view_bundle_deploy_deleteConfirm = Are you sure you want to delete this bundle deployment?
-view_bundle_deploy_deleteFailure = Failed to delete the bundle deployment [{0}]
-view_bundle_deploy_deleteSuccessful = You successfully deleted the bundle deployment [{0}]
-view_bundle_deploy_deployedBy = Deployed By
-view_bundle_deploy_deploymentPlatforms = Deployment Resource
-view_bundle_deploy_installDetails = Install Details~
-view_bundle_deploy_loadBundleFailure = Failed to find bundle~
-view_bundle_deploy_loadDeployFailure = Failed to load bundle deployments~
-view_bundle_deploy_loadFailure = Failed to load bundle deployment~
-view_bundle_deploy_name = Deployment Name~
-view_bundle_deploy_selectARow = Select a row to show installation details~
-view_bundle_deploy_tagUpdateFailure = Failed to update bundle deployment tags~
-view_bundle_deploy_tagUpdateSuccessful = You have successfully updated the bundle deployment tags~
-view_bundle_deploy_time = Deployment Time~
-view_bundle_deployed = Deployed~
-view_bundle_deployments = Deployments~
-view_bundle_dest_backToBundle = Back to Bundle~
-##view_bundle_dest_baseDirName = Base Location
-view_bundle_dest_created = Created~
-view_bundle_dest_deleteConfirm = Are you sure you want to delete this bundle destination? This only deletes it from the database; all bundle content that was deployed to this destination on remote machines will remain.
-view_bundle_dest_deleteFailure = Failed to delete the bundle destination [{0}]
-view_bundle_dest_deleteSuccessful = You successfully deleted the bundle destination [{0}]
-view_bundle_dest_deployDir = Deploy Directory~
-view_bundle_dest_group = Group~
-view_bundle_dest_lastDeployedVersion = Last Deployed Version~
-view_bundle_dest_lastDeploymentDate = Last Deployment Date~
-view_bundle_dest_lastDeploymentStatus = Last Deployment Status~
-view_bundle_dest_loadFailure = Failed to load bundle destinations~
-view_bundle_dest_loadFailureVersionInfo = Failed to load bundle destination deployed version information~
-view_bundle_dest_purgeConfirm = This will purge the bundle content from all remote machines. Are you sure you want to do this?
-view_bundle_dest_purgeFailure = Failed to purge the bundle destination [{0}] from some or all of the remote machines.
-view_bundle_dest_purgeSuccessful = You successfully purged the bundle destination [{0}] from all of the remote machines.
-view_bundle_dest_revertConfirm = This will revert all remote machines back to the previous bundle deployment. Are you sure you want to do this?
-view_bundle_dest_tagUpdateFailure = Failed to update bundle destination tags~
-view_bundle_dest_tagUpdateSuccessful = You have successfully updated the bundle destination tags~
-view_bundle_destinations = Destinations~
-view_bundle_fileListView_fileSize = File Size~
-view_bundle_fileListView_loadFailure = Failed to load bundle file data~
+view_autoDiscoveryQ_unignoreInProgress = Removendo status de recurso ignorado...
+view_autoDiscoveryQ_unignoreSuccessful = Status de recurso ignorado removido com sucesso para os recursos selecionados.
- view_autoDiscoveryQ_uninventoried = Removido do invent\\\\u00E1rio
++view_autoDiscoveryQ_uninventoried = Removido do invent\u00E1rio
+view_bundleVersion_loadFailure = Falha ao carregar dados da vers\u00E3o do bundle
+view_bundle_bundle = Bundle
- view_bundle_bundleDeployment = Implanta\\\\u00E7\\\\u00E3o do Bundle
- view_bundle_bundleDeployments = Implanta\\\\u00E7\\\\u00F5es do Bundle
- view_bundle_bundleDestinations = Destina\\\\u00E7\\\\u00E3o do Bundle
++view_bundle_bundleDeployment = Implanta\u00E7\u00E3o do Bundle
++view_bundle_bundleDeployments = Implanta\u00E7\u00F5es do Bundle
++view_bundle_bundleDestinations = Destina\u00E7\u00E3o do Bundle
+view_bundle_bundleFiles = Arquivos do Bundle
+view_bundle_bundleType = Tipo de Bundle
- view_bundle_bundleVersion = Vers\\\\u00E3o do Bundle
- view_bundle_bundleVersions = Vers\\\\u00F5es do Bundle
++view_bundle_bundleVersion = Vers\u00E3o do Bundle
++view_bundle_bundleVersions = Vers\u00F5es do Bundle
+view_bundle_bundles = Bundles
- view_bundle_createWizard_bundleDistro = Distribui\\\\u00E7\\\\u00E3o do Bundle
- view_bundle_createWizard_cancelFailure = Falha ao cancelar a cria\\\\u00E7\\\\u00E3o do bundle [{0}], vers\\\\u00E3o = [{1}] - talvez o bundle ainda esteja gravado no banco de dados
- view_bundle_createWizard_cancelSuccessful = Cria\\\\u00E7\\\\u00E3o do bundle [{0}] cancelada, vers\\\\u00E3o = [{1}]
++view_bundle_createWizard_bundleDistro = Distribui\u00E7\u00E3o do Bundle
++view_bundle_createWizard_cancelFailure = Falha ao cancelar a cria\u00E7\u00E3o do bundle [{0}], vers\u00E3o = [{1}] - talvez o bundle ainda esteja gravado no banco de dados
++view_bundle_createWizard_cancelSuccessful = Cria\u00E7\u00E3o do bundle [{0}] cancelada, vers\u00E3o = [{1}]
+view_bundle_createWizard_clickToUploadRecipe = Clique para fazer o upload do arquivo de script
+view_bundle_createWizard_createFailure = Falha ao criar o bundle
- view_bundle_createWizard_createSuccessful = Bundle [{0}] vers\\\\u00E3o [{1}] criado com sucesso
- view_bundle_createWizard_enterRecipe = Favor fornecer um script v\\\\u00E1lido
- view_bundle_createWizard_enterUrl = Favor informar uma URL v\\\\u00E1lida para download do arquivo de distribui\\\\u00E7\\\\u00E3o do bundle
- view_bundle_createWizard_failedToUploadDistroFile = Falha ao fazer o upload do arquivo de distribui\\\\u00E7\\\\u00E3o do bundle.
++view_bundle_createWizard_createSuccessful = Bundle [{0}] vers\u00E3o [{1}] criado com sucesso
++view_bundle_createWizard_enterRecipe = Favor fornecer um script v\u00E1lido
++view_bundle_createWizard_enterUrl = Favor informar uma URL v\u00E1lida para download do arquivo de distribui\u00E7\u00E3o do bundle
++view_bundle_createWizard_failedToUploadDistroFile = Falha ao fazer o upload do arquivo de distribui\u00E7\u00E3o do bundle.
+view_bundle_createWizard_failedToUploadFile = Falha ao fazer o upload do bundle
- view_bundle_createWizard_loadBundleFileFailure = N\\\\u00E3o foi poss\\\\u00EDvel obter infoma\\\\u00E7\\\\u00F5es sobre o arquivo de bundle
- view_bundle_createWizard_noAdditionalFilesNeeded = N\\\\u00E3o \\\\u00E9 necess\\\\u00E1rio fazer upload de mais arquivos para este bundle
- view_bundle_createWizard_noBundleTypesAvail = Tipos de bundle n\\\\u00E3o dispon\\\\u00EDveis
- view_bundle_createWizard_noBundleTypesSupported = N\\\\u00E3o h\\\\u00E1 suporte para tipos de bundle - voc\\\\u00EA deve fazer o deploy de um plugin v\\\\u00E1lido para este tipo de implanta\\\\u00E7\\\\u00E3o
- view_bundle_createWizard_provideBundleDistro = Forne\\\\u00E7a um pacote de distribui\\\\u00E7\\\\u00E3o para o Bundle
++view_bundle_createWizard_loadBundleFileFailure = N\u00E3o foi poss\u00EDvel obter infoma\u00E7\u00F5es sobre o arquivo de bundle
++view_bundle_createWizard_noAdditionalFilesNeeded = N\u00E3o \u00E9 necess\u00E1rio fazer upload de mais arquivos para este bundle
++view_bundle_createWizard_noBundleTypesAvail = Tipos de bundle n\u00E3o dispon\u00EDveis
++view_bundle_createWizard_noBundleTypesSupported = N\u00E3o h\u00E1 suporte para tipos de bundle - voc\u00EA deve fazer o deploy de um plugin v\u00E1lido para este tipo de implanta\u00E7\u00E3o
++view_bundle_createWizard_provideBundleDistro = Forne\u00E7a um pacote de distribui\u00E7\u00E3o para o Bundle
+view_bundle_createWizard_recipeOption = Script
+view_bundle_createWizard_title = Criar um Bundle
- view_bundle_createWizard_uploadInProgress = Realizando o upload... Esta opera\\\\u00E7\\\\u00E3o pede demorar alguns minutos para arquivos grandes
++view_bundle_createWizard_uploadInProgress = Realizando o upload... Esta opera\u00E7\u00E3o pede demorar alguns minutos para arquivos grandes
+view_bundle_createWizard_uploadOption = Upload
- view_bundle_createWizard_uploadStepName = Fa\\\\u00E7a o upload dos arquivos do Bundle
++view_bundle_createWizard_uploadStepName = Fa\u00E7a o upload dos arquivos do Bundle
+view_bundle_createWizard_urlOption = URL
- view_bundle_createWizard_windowTitle = Assistente de Cria\\\\u00E7\\\\u00E3o do Bundle
- view_bundle_createWizard_youMustChooseOne = \\\\u00C9 necess\\\\u00E1rio escolher uma op\\\\u00E7\\\\u00E3o para criar um bundle.
- view_bundle_deleteConfirm = Tem certeza que deseja excluir este bundle? Todas as vers\\\\u00F5es, destina\\\\u00E7\\\\u00F5es e implanta\\\\u00E7\\\\u00F5es para este bundle ser\\\\u00E3o exclu\\\\u00EDdas.
++view_bundle_createWizard_windowTitle = Assistente de Cria\u00E7\u00E3o do Bundle
++view_bundle_createWizard_youMustChooseOne = \u00C9 necess\u00E1rio escolher uma op\u00E7\u00E3o para criar um bundle.
++view_bundle_deleteConfirm = Tem certeza que deseja excluir este bundle? Todas as vers\u00F5es, destina\u00E7\u00F5es e implanta\u00E7\u00F5es para este bundle ser\u00E3o exclu\u00EDdas.
+view_bundle_deploy = Deploy
- view_bundle_deployDir = Diret\\\\u00F3rio de Deploy
++view_bundle_deployDir = Diret\u00F3rio de Deploy
+view_bundle_deployWizard_deployStep = Implantar o Bundle nas Plataformas de Destino
+view_bundle_deployWizard_deploying = Implantando...
- view_bundle_deployWizard_deploymentCreated = Implanta\\\\u00E7\\\\u00E3o Criada...
- view_bundle_deployWizard_deploymentCreatedDetail = Implanta\\\\u00E7\\\\u00E3o [{0}] com a descri\\\\u00E7\\\\u00E3o [{1}] criada
- view_bundle_deployWizard_deploymentCreatedDetail_concise = Implanta\\\\u00E7\\\\u00E3o [{0}] criada
- view_bundle_deployWizard_deploymentScheduled = Implanta\\\\u00E7\\\\u00E3o do Bundle Agendada!
- view_bundle_deployWizard_deploymentScheduledDetail = Implanta\\\\u00E7\\\\u00E3o do bundle [{0}] agendada para o grupo de destino [{1}]
- view_bundle_deployWizard_deploymentScheduledDetail_concise = Implanta\\\\u00E7\\\\u00E3o do bundle agendada
- view_bundle_deployWizard_destinationCreatedDetail = Destina\\\\u00E7\\\\u00E3o [{0}] criada com a descri\\\\u00E7\\\\u00E3o [{1}]
- view_bundle_deployWizard_destinationCreatedDetail_concise = Destina\\\\u00E7\\\\u00E3o [{0}] criada
- view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel\nFalha ao excluir nova implanta\\\\u00E7\\\\u00E3o durante o cancelamento
- view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)\nFalha ao criar destina\\\\u00E7\\\\u00E3o, talvez ela j\\\\u00E1 exista. (Nota: caso a destina\\\\u00E7\\\\u00E3o j\\\\u00E1 exista fa\\\\u00E7a a implanta\\\\u00E7\\\\u00E3o atrav\\\\u00E9s da vis\\\\u00E3o de Destina\\\\u00E7\\\\u00E3o)
- view_bundle_deployWizard_error_11 = Falha ao encontrar defini\\\\u00E7\\\\u00F5es de implanta\\\\u00E7\\\\u00F5es.
- view_bundle_deployWizard_error_12 = Falha ao encontrar defini\\\\u00E7\\\\u00F5es de bundles.
- view_bundle_deployWizard_error_2 = Falha ao excluir nova destina\\\\u00E7\\\\u00E3o durante o cancelamento
- view_bundle_deployWizard_error_3 = Falha ao agendar implanta\\\\u00E7\\\\u00E3o!
- view_bundle_deployWizard_error_4 = Falha ao agendar a implanta\\\\u00E7\\\\u00E3o: {0}
- view_bundle_deployWizard_error_5 = Falha ao criar a implanta\\\\u00E7\\\\u00E3o!
- view_bundle_deployWizard_error_6 = Falha ao criar a implanta\\\\u00E7\\\\u00E3o: {0}
- view_bundle_deployWizard_error_7 = Falha ao recuperar o nome da implanta\\\\u00E7\\\\u00E3o.
- view_bundle_deployWizard_error_8 = Selecione um grupo de recursos v\\\\u00E1lido da lista
- view_bundle_deployWizard_error_9 = Falha ao excluir a nova destina\\\\u00E7\\\\u00E3o
- view_bundle_deployWizard_error_noBundleConfig = Falha ao obter informa\\\\u00E7\\\\u00F5es sobre o destino do bundle. Verifique se o grupo selecionado \\\\u00E9 um grupo v\\\\u00E1lido de recursos compat\\\\u00EDveis para implanta\\\\u00E7\\\\u00E3o do bundle.
- view_bundle_deployWizard_getConfigSkip = N\\\\u00E3o \\\\u00E9 necess\\\\u00E1rio fornecer configura\\\\u00E7\\\\u00F5es para esta vers\\\\u00E3o do bundle.
- view_bundle_deployWizard_getConfigStep = Definir configura\\\\u00E7\\\\u00E3o da implanta\\\\u00E7\\\\u00E3o.
- view_bundle_deployWizard_getDestStep = Nova Destina\\u00E7\\u00E3o
- view_bundle_deployWizard_getDest_deployDir = Diret\\\\u00F3rio de Deploy
++view_bundle_deployWizard_deploymentCreated = Implanta\u00E7\u00E3o Criada...
++view_bundle_deployWizard_deploymentCreatedDetail = Implanta\u00E7\u00E3o [{0}] com a descri\u00E7\u00E3o [{1}] criada
++view_bundle_deployWizard_deploymentCreatedDetail_concise = Implanta\u00E7\u00E3o [{0}] criada
++view_bundle_deployWizard_deploymentScheduled = Implanta\u00E7\u00E3o do Bundle Agendada!
++view_bundle_deployWizard_deploymentScheduledDetail = Implanta\u00E7\u00E3o do bundle [{0}] agendada para o grupo de destino [{1}]
++view_bundle_deployWizard_deploymentScheduledDetail_concise = Implanta\u00E7\u00E3o do bundle agendada
++view_bundle_deployWizard_destinationCreatedDetail = Destina\u00E7\u00E3o [{0}] criada com a descri\u00E7\u00E3o [{1}]
++view_bundle_deployWizard_destinationCreatedDetail_concise = Destina\u00E7\u00E3o [{0}] criada
++view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel\nFalha ao excluir nova implanta\u00E7\u00E3o durante o cancelamento
++view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)\nFalha ao criar destina\u00E7\u00E3o, talvez ela j\u00E1 exista. (Nota: caso a destina\u00E7\u00E3o j\u00E1 exista fa\u00E7a a implanta\u00E7\u00E3o atrav\u00E9s da vis\u00E3o de Destina\u00E7\u00E3o)
++view_bundle_deployWizard_error_11 = Falha ao encontrar defini\u00E7\u00F5es de implanta\u00E7\u00F5es.
++view_bundle_deployWizard_error_12 = Falha ao encontrar defini\u00E7\u00F5es de bundles.
++view_bundle_deployWizard_error_2 = Falha ao excluir nova destina\u00E7\u00E3o durante o cancelamento
++view_bundle_deployWizard_error_3 = Falha ao agendar implanta\u00E7\u00E3o!
++view_bundle_deployWizard_error_4 = Falha ao agendar a implanta\u00E7\u00E3o: {0}
++view_bundle_deployWizard_error_5 = Falha ao criar a implanta\u00E7\u00E3o!
++view_bundle_deployWizard_error_6 = Falha ao criar a implanta\u00E7\u00E3o: {0}
++view_bundle_deployWizard_error_7 = Falha ao recuperar o nome da implanta\u00E7\u00E3o.
++view_bundle_deployWizard_error_8 = Selecione um grupo de recursos v\u00E1lido da lista
++view_bundle_deployWizard_error_9 = Falha ao excluir a nova destina\u00E7\u00E3o
++view_bundle_deployWizard_error_noBundleConfig = Falha ao obter informa\u00E7\u00F5es sobre o destino do bundle. Verifique se o grupo selecionado \u00E9 um grupo v\u00E1lido de recursos compat\u00EDveis para implanta\u00E7\u00E3o do bundle.
++view_bundle_deployWizard_getConfigSkip = N\u00E3o \u00E9 necess\u00E1rio fornecer configura\u00E7\u00F5es para esta vers\u00E3o do bundle.
++view_bundle_deployWizard_getConfigStep = Definir configura\u00E7\u00E3o da implanta\u00E7\u00E3o.
++view_bundle_deployWizard_getDestStep = Nova Destina\u00E7\u00E3o
++view_bundle_deployWizard_getDest_deployDir = Diret\u00F3rio de Deploy
+view_bundle_deployWizard_getDest_deployDir_help = Diret\u00F3rio onde o bundle ser\u00E1 implantado. Este diret\u00F3rio ser\u00E1 o mesmo para todas as implanta\u00E7\u00F5es em todos os recursos, mas o caminho \u00E9 relativo ao diret\u00F3rio raiz definido para a destina\u00E7\u00E3o. Isto significa que o caminho absoluto do diret\u00F3rio pode diferir dependendo do local raiz definido para cada recurso alvo.
- view_bundle_deployWizard_getDest_desc = Descri\\\\u00E7\\\\u00E3o da Destina\\\\u00E7\\\\u00E3o
++view_bundle_deployWizard_getDest_desc = Descri\u00E7\u00E3o da Destina\u00E7\u00E3o
+view_bundle_deployWizard_getDest_destBaseDirName = Local Raiz
- view_bundle_deployWizard_getDest_group_help = Grupo cujo os membros ser\\u00E3o destinos de todas as implanta\\u00E7\\u00F5es de bundle. Somente grupos de recursos compat\\u00EDveis com suporte a implanta\\u00E7\\u00F5s de bundle podem ser selecionados.
- view_bundle_deployWizard_getDest_name = Nome da Destina\\u00E7\\u00E3o
- view_bundle_deployWizard_getDest_name_help = O nome da destina\\u00E7\\u00E3o que ser\\u00E1 utilizado para identificar um grupo espec\\u00EDfico de recursos bem como o diret\\u00F3rio de destino para determinado bundle.
- view_bundle_deployWizard_getInfoStep = Forne\\u00E7a as informa\\u00E7\\u00F5es referente a implanta\\u00E7\\u00E3o
- view_bundle_deployWizard_getInfo_clean = Limpar Implanta\\u00E7\\u00E3o? (apaga o conte\\u00FAdo do diret\\u00F3rio de deploy na plataforma de destino)
- view_bundle_deployWizard_getInfo_deploymentDesc = Descri\\u00E7\\u00E3o da Implanta\\u00E7\\u00E3o
- view_bundle_deployWizard_getInfo_deploymentName = Nome da Implanta\\u00E7\\u00E3o
- view_bundle_deployWizard_getOptionsStep = Op\\u00E7\\u00F5es de Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_getDest_group_help = Grupo cujo os membros ser\u00E3o destinos de todas as implanta\u00E7\u00F5es de bundle. Somente grupos de recursos compat\u00EDveis com suporte a implanta\u00E7\u00F5s de bundle podem ser selecionados.
++view_bundle_deployWizard_getDest_name = Nome da Destina\u00E7\u00E3o
++view_bundle_deployWizard_getDest_name_help = O nome da destina\u00E7\u00E3o que ser\u00E1 utilizado para identificar um grupo espec\u00EDfico de recursos bem como o diret\u00F3rio de destino para determinado bundle.
++view_bundle_deployWizard_getInfoStep = Forne\u00E7a as informa\u00E7\u00F5es referente a implanta\u00E7\u00E3o
++view_bundle_deployWizard_getInfo_clean = Limpar Implanta\u00E7\u00E3o? (apaga o conte\u00FAdo do diret\u00F3rio de deploy na plataforma de destino)
++view_bundle_deployWizard_getInfo_deploymentDesc = Descri\u00E7\u00E3o da Implanta\u00E7\u00E3o
++view_bundle_deployWizard_getInfo_deploymentName = Nome da Implanta\u00E7\u00E3o
++view_bundle_deployWizard_getOptionsStep = Op\u00E7\u00F5es de Implanta\u00E7\u00E3o
+view_bundle_deployWizard_getOptions_deployLater = Implantar mais tarde
+view_bundle_deployWizard_getOptions_deployNow = Implantar agora
- view_bundle_deployWizard_getOptions_deployTime = Tempo de Implanta\\u00E7\\u00E3o
- view_bundle_deployWizard_selectBundleStep = Selecione o Bundle para Implanta\\u00E7\\u00E3o
- view_bundle_deployWizard_selectBundle_single = Selecione apenas um bundle para implanta\\u00E7\\u00E3o.
- view_bundle_deployWizard_selectVersionStep = Selecione a vers\\u00E3o da implanta\\u00E7\\u00E3o do Bundle
- view_bundle_deployWizard_selectVersion_latest = \\u00DAltima vers\\u00E3o [{0}]
- view_bundle_deployWizard_selectVersion_live = Vers\\u00E3o atual [{0}]
- view_bundle_deployWizard_selectVersion_select = Selecione uma vers\\u00E3o espec\\u00EDfica da lista:
- view_bundle_deployWizard_title = Assitente de Implanta\\u00E7\\u00E3o
- view_bundle_deploy_action = A\\\\u00E7\\\\u00E3o
- view_bundle_deploy_backButton = Retornar \\\\u00E0 destina\\\\u00E7\\\\u00E3o
- view_bundle_deploy_clickForError = Clique no \\\\u00EDcone para visualizar a mensagem de erro
- view_bundle_deploy_deleteConfirm = Tem certeza que deseja excluir esta implanta\\\\u00E7\\\\u00E3o do bundle?
- view_bundle_deploy_deleteFailure = Falha do excluir a implanta\\\\u00E7\\\\u00E3o do bundle [{0}]
- view_bundle_deploy_deleteSuccessful = Implanta\\\\u00E7\\\\u00E3o do bundle [{0}] exclu\\\\u00EDda com sucesso
++view_bundle_deployWizard_getOptions_deployTime = Tempo de Implanta\u00E7\u00E3o
++view_bundle_deployWizard_selectBundleStep = Selecione o Bundle para Implanta\u00E7\u00E3o
++view_bundle_deployWizard_selectBundle_single = Selecione apenas um bundle para implanta\u00E7\u00E3o.
++view_bundle_deployWizard_selectVersionStep = Selecione a vers\u00E3o da implanta\u00E7\u00E3o do Bundle
++view_bundle_deployWizard_selectVersion_latest = \u00DAltima vers\u00E3o [{0}]
++view_bundle_deployWizard_selectVersion_live = Vers\u00E3o atual [{0}]
++view_bundle_deployWizard_selectVersion_select = Selecione uma vers\u00E3o espec\u00EDfica da lista:
++view_bundle_deployWizard_title = Assitente de Implanta\u00E7\u00E3o
++view_bundle_deploy_action = A\u00E7\u00E3o
++view_bundle_deploy_backButton = Retornar \u00E0 destina\u00E7\u00E3o
++view_bundle_deploy_clickForError = Clique no \u00EDcone para visualizar a mensagem de erro
++view_bundle_deploy_deleteConfirm = Tem certeza que deseja excluir esta implanta\u00E7\u00E3o do bundle?
++view_bundle_deploy_deleteFailure = Falha do excluir a implanta\u00E7\u00E3o do bundle [{0}]
++view_bundle_deploy_deleteSuccessful = Implanta\u00E7\u00E3o do bundle [{0}] exclu\u00EDda com sucesso
+view_bundle_deploy_deployedBy = Implatando por
- view_bundle_deploy_deploymentPlatforms = Recurso de implanta\\\\u00E7\\\\u00E3o
- view_bundle_deploy_installDetails = Detalhes de instala\\\\u00E7\\\\u00E3o
++view_bundle_deploy_deploymentPlatforms = Recurso de implanta\u00E7\u00E3o
++view_bundle_deploy_installDetails = Detalhes de instala\u00E7\u00E3o
+view_bundle_deploy_loadBundleFailure = Falha ao encontrar o bundle
- view_bundle_deploy_loadDeployFailure = Falha ao carregar as implanta\\\\u00E7\\\\u00F5es do bundle
- view_bundle_deploy_loadFailure = Falha ao carregar a implanta\\\\u00E7\\\\u00E3o do bundle
- view_bundle_deploy_name = Nome da Implanta\\\\u00E7\\\\u00E3o
- view_bundle_deploy_selectARow = Selecione um linha para apresentar os detalhes da instala\\\\u00E7\\\\u00E3o
- view_bundle_deploy_tagUpdateFailure = Falha ao atualizar as tags para a implanta\\\\u00E7\\\\u00E3o do bundle
++view_bundle_deploy_loadDeployFailure = Falha ao carregar as implanta\u00E7\u00F5es do bundle
++view_bundle_deploy_loadFailure = Falha ao carregar a implanta\u00E7\u00E3o do bundle
++view_bundle_deploy_name = Nome da Implanta\u00E7\u00E3o
++view_bundle_deploy_selectARow = Selecione um linha para apresentar os detalhes da instala\u00E7\u00E3o
++view_bundle_deploy_tagUpdateFailure = Falha ao atualizar as tags para a implanta\u00E7\u00E3o do bundle
+view_bundle_deploy_tagUpdateSuccessful = Tags ataulizadas com sucesso
- view_bundle_deploy_time = Tempo de implanta\\\\u00E7\\\\u00E3o
++view_bundle_deploy_time = Tempo de implanta\u00E7\u00E3o
+view_bundle_deployed = Implantado
- view_bundle_deployments = Implanta\\u00E7\\u00F5es
++view_bundle_deployments = Implanta\u00E7\u00F5es
+view_bundle_dest_backToBundle = Retonar ao Bundle
+view_bundle_dest_baseDirName = Local Raiz
+view_bundle_dest_created = Criado
+view_bundle_dest_deleteConfirm = Tem certeza de que deseja excluir esta destina\u00E7\u00E3o? Esta opera\u00E7\u00E3o apenas exclui a destina\u00E7\u00E3o do banco de dados; todo o conte\u00FAdo implantado anteriormente atrav\u00E9s do bundle nesta destina\u00E7\u00E3o em plataformas remotas permanece inalterado.
+view_bundle_dest_deleteFailure = Falha ao excluir a destina\u00E7\u00E3o [{0}]
+view_bundle_dest_deleteSuccessful = Destina\u00E7\u00E3o [{0}] exclu\u00EDda com sucesso!
+view_bundle_dest_deployDir = Diret\u00F3rio de Deploy
+view_bundle_dest_group = Grupo
+view_bundle_dest_lastDeployedVersion = \u00DAltima vers\u00E3o implantada
+view_bundle_dest_lastDeploymentDate = \u00DAltima data de implanta\u00E7\u00E3o
+view_bundle_dest_lastDeploymentStatus = \u00DAltimo status de implanta\u00E7\u00E3o
+view_bundle_dest_loadFailure = Falha ao carregar as destina\u00E7\u00F5es de Bundle
+view_bundle_dest_loadFailureVersionInfo = Falha ao carregar as informa\u00E7o\u1EBDs sobre vers\u00F5es de destina\u00E7\u00E3o de bundle
+view_bundle_dest_purgeConfirm = Esta opera\u00E7\u00E3o remove o conte\u00FAdo do bundle de todas as m\u00E1quinas remotas. Tem certeza de deseja fazer isto?
+view_bundle_dest_purgeFailure = Falha ao tentar limpar a destina\u00E7\u00E3o [{0}] em algumas ou todas as m\u00E1quinas remotas.
+view_bundle_dest_purgeSuccessful = Limpeza da destina\u00E7\u00E3o [{0}] realizada com sucesso em todas as m\u00E1quinas remotas.
+view_bundle_dest_revertConfirm = Esta opera\u00E7\u00E3o reverte todas as m\u00E1quinas remotas para a implanta\u00E7\u00E3o anterior deste bundle. Tem certeza de que deseja fazer isto?
+view_bundle_dest_tagUpdateFailure = Falha ao atualizar as tags para esta destina\u00E7\u00E3o
+view_bundle_dest_tagUpdateSuccessful = Tags atualizadas com sucesso para esta destina\u00E7\u00E3o!
+view_bundle_destinations = Destina\u00E7\u00F5es
+view_bundle_fileListView_fileSize = Tamanho do Arquivo
+view_bundle_fileListView_loadFailure = Falha ao carregar dados do arquivo de bundle
view_bundle_fileListView_md5 = MD5
view_bundle_fileListView_sha256 = SHA256
-view_bundle_files = Files~
-view_bundle_latestVersion = Latest Version~
-view_bundle_list_backToAll = Back to All Bundles~
-view_bundle_list_deleteConfirm = Are you sure you want to delete this bundle?~
-view_bundle_list_deleteFailure = Failed to delete the bundle [{0}]~
-view_bundle_list_deleteSuccessful = You successfully deleted the bundle named [{0}]~
-view_bundle_list_deletesFailure = Failed to delete the bundles
-view_bundle_list_deletesSuccessful = You successfully deleted the bundles
-view_bundle_list_destinationsCount = Destinations Count~
-view_bundle_list_error1 = Failed to load bundle to deploy [{0}]~
-view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]~
-view_bundle_list_error3 = Failed to load bundle~
-view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]~
-view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data~
-view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]~
-view_bundle_list_tagUpdateFailure = Failed to update bundle tags~
-view_bundle_list_tagUpdateSuccessful = You have successfully updated the bundle tags~
-view_bundle_list_versionsCount = Versions Count~
-view_bundle_purge = Purge
-view_bundle_recipe = Recipe~
-view_bundle_resDeployDS_loadFailure = Failed to load bundle resource deployments~
-view_bundle_revert = Revert~
-view_bundle_revertWizard_confirmStep_confirmation = Reverting Live Deployment to Previous Deployment. Click "Next" to continue...~
-view_bundle_revertWizard_confirmStep_failedToFindLiveDeployment = Failed to find live deployment; cannot revert~
-view_bundle_revertWizard_confirmStep_liveDeployment = Live Deployment~
-view_bundle_revertWizard_confirmStep_name = Revert Deployment Confirmation~
-view_bundle_revertWizard_confirmStep_noLiveDeployment = No live deployment was found for the destination [{0}]~
-view_bundle_revertWizard_confirmStep_noLiveDeployment_concise = No live deployment was found for the destination
-view_bundle_revertWizard_confirmStep_noPriorDeployment = The live deployment [{0}] cannot be reverted because there is no prior deployment for the destination [{1}]~
-view_bundle_revertWizard_confirmStep_noPriorDeployment_concise = The live deployment cannot be reverted because there is no prior deployment
-view_bundle_revertWizard_confirmStep_prevDeployment = Previous Deployment~
-view_bundle_revertWizard_getInfoStep_cleanDeploy = Clean Deployment? (this will delete an old, existing deploy directory prior to starting the revert deployment)~
-view_bundle_revertWizard_getInfoStep_getNameFailure = Failed to get revert deployment name~
-view_bundle_revertWizard_getInfoStep_name = Provide Revert Information~
-view_bundle_revertWizard_getInfoStep_revertDeployDesc = Revert Deploy Description~
-view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From]\\n{0}\\n\\n[REVERT To]\\n{1}~
-view_bundle_revertWizard_getInfoStep_revertDeployName = Revert Deploy Name~
-view_bundle_revertWizard_revertStep_name = Deploy Bundle to Destination Platforms~
-view_bundle_revertWizard_revertStep_reverting = Reverting...~
-view_bundle_revertWizard_revertStep_scheduled = You have successfully scheduled the revert deployment!~
-view_bundle_revertWizard_revertStep_scheduledDetails = You have successfully scheduled to revert the bundle deployment [{0}] from resource group [{1}]~
-view_bundle_revertWizard_revertStep_scheduledFailure = Failed to schedule revert deployment!~
-view_bundle_revertWizard_title = Bundle Revert~
-view_bundle_revertWizard_windowTitle = Bundle Revert Wizard~
-view_bundle_tree_loadFailure = Failed to load bundle data~
-view_bundle_version_backToBundle = Back to Bundle~
-view_bundle_version_bundleVersionTagUpdateFailure = Failed to update bundle version tags~
-view_bundle_version_bundleVersionTagUpdateSuccessful = You have successfully updated the bundle version tags~
-view_bundle_version_deleteConfirm = Are you sure you want to delete this bundle version?
-view_bundle_version_deleteFailure = Failed to delete the bundle version [{0}]
-view_bundle_version_deleteSuccessful = You successfully deleted the bundle version [{0}]
-view_bundle_version_loadFailure = Failed to load bundle version~
-view_bundle_versions = Versions~
+view_bundle_files = Arquivos
+view_bundle_latestVersion = \u00DAltima Vers\u00E3o
+view_bundle_list_backToAll = Retornar todos os Bundles
+view_bundle_list_deleteConfirm = Tem certeza de que deseja excluir este Bundle?
+view_bundle_list_deleteFailure = Falha ao excluir o bundle [{0}]
+view_bundle_list_deleteSuccessful = O Bundle chamado [{0}] foi exclu\u00EDdo com sucesso!
+view_bundle_list_deletesFailure = Falha ao exlcuir os bundles
+view_bundle_list_deletesSuccessful = Bundles exclu\u00EDdos com sucesso!
+view_bundle_list_destinationsCount = Soma das Destina\u00E7\u00F5es
+view_bundle_list_error1 = Falha ao carregar bundle [{0}] para implantar
+view_bundle_list_error2 = Falha ao obter um \u00FAnico bundle [{0}] para deploy
+view_bundle_list_error3 = Falha ao carregar o bundle
+view_bundle_list_loadFailure = Falha ao carregar o bundle [{0}] para ser implantado
+view_bundle_list_loadWithLatestFailure = Falha ao carregar o bundle com os dados da \u00FAltima vers\u00E3o
+view_bundle_list_singleLoadFailure = Falha ao obter um \u00FAnico bundle [{0}] para ser implantado
+view_bundle_list_tagUpdateFailure = Falha ao atualizar as tags do bundle
+view_bundle_list_tagUpdateSuccessful = Tags do bundle atualizadas com sucesso!
+view_bundle_list_versionsCount = Soma das Vers\u00F5es
+view_bundle_purge = Limpar
+view_bundle_recipe = Script
+view_bundle_resDeployDS_loadFailure = Falha ao carregar as informa\u00E7oes sobre as implanta\u00E7\u00F5es do bundle
+view_bundle_revert = Reverter
+view_bundle_revertWizard_confirmStep_confirmation = Revertendo a implanta\u00E7\u00E3o ativa para a atenterior. Clique em "Next" para continuar...
+view_bundle_revertWizard_confirmStep_failedToFindLiveDeployment = Falha ao encontrar a implanta\u00E7\u00E3o ativa. N\u00E3o foi poss\u00EDvel realizar a revers\u00E3o.
+view_bundle_revertWizard_confirmStep_liveDeployment = Implanta\u00E7\u00E3o ativa.
+view_bundle_revertWizard_confirmStep_name = Confirma\u00E7\u00E3o de Revers\u00E3o da implanta\u00E7\u00E3o
+view_bundle_revertWizard_confirmStep_noLiveDeployment = Nenhuma implanta\u00E7\u00E3o ativa foi encontrada para destina\u00E7\u00E3o [{0}]
+view_bundle_revertWizard_confirmStep_noLiveDeployment_concise = Nenhuma implanta\u00E7\u00E3o ativa foi encontrada para esta destina\u00E7\u00E3o.
+view_bundle_revertWizard_confirmStep_noPriorDeployment = A implanta\u00E7\u00E3o ativa [{0}] n\u00E3o pode ser revertida porque n\u00E3o existe uma implanta\u00E7\u00E3o anterior para a destina\u00E7\u00E3o [{1}]
+view_bundle_revertWizard_confirmStep_noPriorDeployment_concise = A implanta\u00E7\u00E3o ativa n\u00E3o pode ser revertida porque n\u00E3o existe uma anterior
+view_bundle_revertWizard_confirmStep_prevDeployment = Implanta\u00E7\u00E3o Anterior
+view_bundle_revertWizard_getInfoStep_cleanDeploy = Limpar a Implanta\u00E7\u00E3o? (esta opera\u00E7\u00E3o excluir\u00E1 qualquer diret\u00F3rio de deploy existente antes de iniciar a revers\u00E3o da implanta\u00E7\u00E3o)
+view_bundle_revertWizard_getInfoStep_getNameFailure = Falha ao obter o nome da implanta\u00E7\u00E3o de revers\u00E3o
+view_bundle_revertWizard_getInfoStep_name = Forne\u00E7a as informes para revers\u00E3o
+view_bundle_revertWizard_getInfoStep_revertDeployDesc = Descri\u00E7\u00E3o da implanta\u00E7\u00E3o de revers\u00E3o
- view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERTER de]\\\\\\\\\n{0}\\\\\\\\\n\\\\\\\\\n[REVERTER PARA]\\\\\\\\\n{1}
++view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERTER de]\n\n{0}\n\n[REVERTER PARA]\n{1}
+view_bundle_revertWizard_getInfoStep_revertDeployName = Nome da Implanta\u00E7\u00E3o de Revers\u00E3o
+view_bundle_revertWizard_revertStep_name = Implantar Bundle nas Plataformas de Destino
+view_bundle_revertWizard_revertStep_reverting = Revertendo...
+view_bundle_revertWizard_revertStep_scheduled = Revers\u00E3o de implanta\u00E7\u00E3o agendada com sucesso!
+view_bundle_revertWizard_revertStep_scheduledDetails = Revers\u00E3o da implanta\u00E7\u00E3o [{0}] para o grupo de recursos [{1}] agendada com sucesso!
+view_bundle_revertWizard_revertStep_scheduledFailure = Falha ao agendar a revers\u00E3o da implanta\u00E7\u00E3o!
+view_bundle_revertWizard_title = Revers\u00E3o do Bundle
+view_bundle_revertWizard_windowTitle = Assistente de revers\u00E3o do Bundle
+view_bundle_tree_loadFailure = Falha ao carregar dados do Bundle
+view_bundle_version_backToBundle = Retornar ao Bundle
+view_bundle_version_bundleVersionTagUpdateFailure = Falha ao atualizar as tags da vers\u00E3o do bundle
+view_bundle_version_bundleVersionTagUpdateSuccessful = Tags da vers\u00E3o do bundle atualizadas com sucesso!
+view_bundle_version_deleteConfirm = Tem certeza de que deseja excluir est\u00E1 vers\u00E3o do bundle?
+view_bundle_version_deleteFailure = Falha ao excluir a vers\u00E3o [{0}] do bundle
+view_bundle_version_deleteSuccessful = Vers\u00E3o [{0}] do bundle exclu\u00EDda com sucesso!
+view_bundle_version_loadFailure = Falha ao carregar a vers\u00E3o do Bundle
+view_bundle_versions = Vers\u00F5es
view_configCompare_comparingConfigs = Comparando Configura\u00E7\u00F5es
view_configCompare_configCompare = Compara\u00E7\u00E3o de Configura\u00E7\u00F5es
view_configEdit_addItem = Adicionar Item \u00E0 Lista
@@@ -1083,164 -1078,168 +1083,164 @@@ view_configEdit_msg_4 = Item adicionad
view_configEdit_properties = Propriedades
view_configEdit_tooltip_1 = Remove os itens selecionados da lista.
view_configEdit_tooltip_2 = Adiciona um item \u00E0 lista.
-view_configEdit_viewRow = View Row
-view_configurationDetails_allPropertiesValid = All configuration properties have valid values, so the configuration can now be saved.~
-view_configurationDetails_configNotUpdatedDueToNoChange = Configuration was not updated, since the new configuration is equivalent to the current configuration.
-view_configurationDetails_error_updateFailure = Failed to update configuration.~
-view_configurationDetails_messageConcise = Configuration updated - current version is {0}.~
-view_configurationDetails_messageDetailed = Configuration updated to version {0} for Resource [{1}].
-view_configurationDetails_noPermission = You do not have permission to edit this Resource''s configuration.~
-view_configurationDetails_somePropertiesInvalid = The following configuration properties have invalid values: {0}. The values must be corrected before the configuration can be saved.~
-view_configurationHistoryDetails_dialogTitle = Configuration Details~
-view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.~
-view_configurationHistoryList_cannotDeleteCurrent = One of the selected history items represents the current configuration - you cannot delete it.
-view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. view_configurationHistoryList_delete_failure = Failed to delete the configuration history items.
-view_configurationHistoryList_delete_success = You successfully deleted the selected configuration history items.
-view_configurationHistoryList_itemNamePlural = configuration history items
-view_configurationHistoryList_rollback = Rollback
-view_configurationHistoryList_rollback_failure = Failed to rollback the configuration. The original configuration is still in effect.
-view_configurationHistoryList_rollback_success = You successfully rolled back the configuration to the selected past configuration.
-view_configurationHistoryList_table_clickStatusIcon = Click the status icon for full details
-view_configurationHistoryList_table_statusFailure = This configuration update failed
-view_configurationHistoryList_table_statusInprogress = This configuration update is still in progress
-view_configurationHistoryList_table_statusNochange = No changes were made to this configuration
-view_configurationHistoryList_table_statusSuccess = This configuration update was successful
-view_configurationHistoryList_title = Configuration History~
-view_connectionSettingsDetails_allPropertiesValid = All connection settings have valid values, so the settings can now be saved.~
-view_connectionSettingsDetails_error_updateFailure = Failed to update connection settings.~
-##view_connectionSettingsDetails_messageConcise_updateSuccess = Connection settings updated.~
-##view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings updated for Resource [{0}].~
-view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.~
-view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.~
-view_core_error_1 = Falha ao perquisar novos alertas~
-view_core_loggedInAs = Logado como {0}~
-view_core_loggedOut = Logged out~
-view_core_noRecentAlerts = There are no recent alerts to report
-view_core_recentAlerts = [{0}] alertas recentes~
-view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada~
-view_dashboardManager_deleteFail = Failed to delete dashboard.
-view_dashboardManager_deleted = Successfully deleted dashboard {0}~
-view_dashboardManager_error = Failed to save dashboard to server~
-view_dashboardManager_saved = Saved dashboard {0} to server~
-view_dashboardManager_success = Saved dashboard~
-view_dashboard_favorites_error1 = Failed to load favorite Resources.~
-view_dashboardsManager_error1 = Failed to add new dashboard~
-view_dashboardsManager_inventory_title = Inventory Summary~
-view_dashboardsManager_mashup_title = RHQ News~
-view_dashboardsManager_message_title = Welcome To RHQ~
-view_dashboardsManager_message_title_details = <h1>Welcome to RHQ</h1>\n<p>The RHQ project is an abstraction and plug-in based systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features. The project is designed with layered modules that provide a flexible architecture for deployment. It delivers a core user interface that delivers audited and historical management across an entire enterprise. A Server/Agent architecture provides remote management and plugins implement all specific support for managed products.</p>\n <p>This default dashboard can be edited by clicking the (edit mode) button above.</p>~
-view_dashboardsManager_tagcloud_title = Tag Cloud~
-view_dashboards_confirm1 = Are you sure you want to delete~
-view_dashboards_portlets_refresh_fail1 = Failed to update interval for portlets that auto-refresh
-view_dashboards_portlets_refresh_fail2 = Failed to disable reload for portlets that auto-refresh
-view_dashboards_portlets_refresh_multiple_min = {0} minutes
-view_dashboards_portlets_refresh_none = No Refresh
-view_dashboards_portlets_refresh_one_min = 1 minute
-view_dashboards_portlets_refresh_success1 = Updated interval for portlets that auto-refresh
-view_dashboards_portlets_refresh_success2 = Stopping reload for portlets that auto-refresh
-view_dashboards_title = Dashboard~
-##view_drift = Drift
-##view_drift_button_detectNow = Detect Now
-##view_drift_category_fileAdded = File Added
-##view_drift_category_fileChanged = File Changed
-##view_drift_category_fileRemoved = File Removed
-##view_drift_changeSets = Change Sets
-##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
-##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
-##view_drift_delete_confirm = Delete the selected drift(s)?
-##view_drift_delete_confirmAll = Delete all drifts from this source?
-##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
-##view_drift_failure_deleteAll = Failed to delete all drift targets from this source
-##view_drift_failure_detectNow = Failed to submit drift detection request
-##view_drift_failure_load = Failed to fetch drift data
-##view_drift_success_configurationUpdated = Drift configuration updated. File coverage will be updated on next detection scan.
-##view_drift_success_delete = Successfully deleted {0} drifts
-##view_drift_success_deleteConfigs = Successfully deleted {0} drift configurations
-##view_drift_success_detectNow = Successfully submitted drift detection request
-##view_drift_table_baseDir = Base Directory
-##view_drift_table_changeSet = Change Set
-##view_drift_table_newFile = New File
-##view_drift_table_oldFile = Old File
-##view_drift_table_resourceConfig = Resource Drift Configuration
-##view_drift_table_resourceHistory = Resource Drift History
-##view_drift_wizard_addConfig_failure = Failed to add new drift configuration [{0}]
-##view_drift_wizard_addConfig_infoStepName = Provide Drift Detection Information
-##view_drift_wizard_addConfig_success = Successfully added new drift configuration [{0}]. Agent(s) will be updated.
-##view_drift_wizard_addConfig_templateHelp = Each drift configuration describes a set of files for which drift detection can be performed. The configuration can be enabled and disabled, defines the detection interval, and specifies a base directory and optional file filters. For each resource type offering drift detection there will be one or more predefined templates to use a starting configuration, which can then be edited.
-##view_drift_wizard_addConfig_templatePrompt = Drift Configuration Templates
-##view_drift_wizard_addConfig_title = Add Drift Configuration for Resource of Type [{0}]
-##view_drift_wizard_addConfig_windowTitle = Drift Add Configuration Wizard
-view_dynagroup_children = DynaGroup Children~
-view_dynagroup_compatible = Compatible
-view_dynagroup_definitionAlreadyExists = A group definition already exists with this name~
-view_dynagroup_definitionCreated = You have successfully created a group definition named [{0}]~
-view_dynagroup_definitionLoadFailure = Failed to load group definitions~
-view_dynagroup_definitions = DynaGroup Definitions~
-view_dynagroup_deleteFailureSelection = Failed to delete the selected group definitions~
-view_dynagroup_deleteSuccessfulSelection = You have successfully deleted [{0}] group definitions~
-view_dynagroup_editing = Editing [{0}]~
-view_dynagroup_exprBuilder_addExpression = Add Expression
-view_dynagroup_exprBuilder_comparisonType = Comparison Type
-view_dynagroup_exprBuilder_comparisonType_contains = contains
-view_dynagroup_exprBuilder_comparisonType_endsWith = ends with
-view_dynagroup_exprBuilder_comparisonType_equals = equals
-view_dynagroup_exprBuilder_comparisonType_startsWith = starts with
-view_dynagroup_exprBuilder_comparisonType_tooltip = Comparison Type
-view_dynagroup_exprBuilder_definingPlugin = Defining Plugin
-view_dynagroup_exprBuilder_definingPlugin_tooltip = The plugin to search
-view_dynagroup_exprBuilder_expression = Expression
-view_dynagroup_exprBuilder_expressionType = Expression Type
-view_dynagroup_exprBuilder_expressionType_pluginConfig = Plugin Configuration
-view_dynagroup_exprBuilder_expressionType_resource = Resource
-view_dynagroup_exprBuilder_expressionType_resourceCategory = Resource Category
-view_dynagroup_exprBuilder_expressionType_resourceConfig = Resource Configuration
-view_dynagroup_exprBuilder_expressionType_resourceType = Resource Type
-view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on:<br/> <b>Resource</b>: A resource property such as its name or version<br/> <b>Resource Type</b>: Search for resources of a specific type<br/> <b>Resource Category</b>: Search for resources by category: platform, server, service<br/> <b>Trait</b>: Resources that have selected values for a monitored trait<br/> <b>Plugin Configuration</b>: Search by the plugin component configuration setting of the component<br/> <b>Resource Configuration</b>: Search by the configuration setting of the managed resource
-view_dynagroup_exprBuilder_expressionType_trait = Trait
-view_dynagroup_exprBuilder_expression_tooltip = This is the full expression that is represented by the selections in the form below. This text will be added to your group definition expression text when you click the "Add Expression" button.
-view_dynagroup_exprBuilder_groupBy = Group by
-view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy will cause the system to pivot on the values from the entered expressions creating a separate group for each value. For example, GroupBy on the cluster name to create a group for each cluster with all cluster members in it.
-view_dynagroup_exprBuilder_noPlugins = --No plugins--
-view_dynagroup_exprBuilder_noProperties = --No properties--
-view_dynagroup_exprBuilder_noResourceTypes = --No resource types--
-view_dynagroup_exprBuilder_pluginLoadFailure = Cannot get the list of plugins
-view_dynagroup_exprBuilder_propLoadFailure = Cannot get list of properties
-view_dynagroup_exprBuilder_propertyName = Property Name
-view_dynagroup_exprBuilder_propertyName_tooltip = The name of the property to query. This is defined by the expression type as well as the resource type.
-view_dynagroup_exprBuilder_resTypeLoadFailure = Cannot get list of resource types for plugin [{0}]
-view_dynagroup_exprBuilder_resource = Resource
-view_dynagroup_exprBuilder_resourceType = Resource Type
-view_dynagroup_exprBuilder_resourceType_tooltip = The type of resource
-view_dynagroup_exprBuilder_resource_child = Child
-view_dynagroup_exprBuilder_resource_grandparent = Grandparent
-view_dynagroup_exprBuilder_resource_greatGrandparent = GreatGrandparent
-view_dynagroup_exprBuilder_resource_greatGreatGrandparent = GreatGreatGrandparent
-view_dynagroup_exprBuilder_resource_parent = Parent
-view_dynagroup_exprBuilder_resource_resource = Resource
-view_dynagroup_exprBuilder_resource_tooltip = Choose the level of the resource you wish to select. For example, select "parent" will find resources whose parent resource matches the rest of the expression.
-##view_dynagroup_exprBuilder_savedExpression = Saved Expression
-view_dynagroup_exprBuilder_title = Expression Builder
-view_dynagroup_exprBuilder_unset = Unset
-view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the " = " operator because of how databases store and query data.
-view_dynagroup_exprBuilder_value_tooltip = The string value for the expression to query
-view_dynagroup_expression = Expression~
-view_dynagroup_expressionBuilderIconTooltip = Expression Builder...
-view_dynagroup_expressionSet = Expression Set~
-view_dynagroup_lastCalculationTime = Last Calculation Time~
-view_dynagroup_loadDefinitionFailure = Failed to load group definition [{0}]~
-view_dynagroup_loadDefinitionMissing = There is no group definition with the ID of [{0}]~
-view_dynagroup_mixed = Mixed
-view_dynagroup_newGroupDefinition = New Group Definition~
-view_dynagroup_nextCalculationTime = Next Calculation Time~
-view_dynagroup_permDenied = You do not have permission to view group definitions~
-view_dynagroup_permUnknown = Could not determine if you have the proper permissions - access is denied~
-view_dynagroup_recalcFailure = Failed to recalculated this group definition~
-view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions~
-view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition~
-view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions~
-view_dynagroup_recalculate = Recalculate~
-view_dynagroup_recalculationInterval = Recalculation Interval~
-view_dynagroup_recursive = Recursive~
-view_dynagroup_saveAndRecalculate = Save & Recalculate~
-view_dynagroup_saveFailure = Failed to save the group definition named [{0}]~
-view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]~
-view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created~
+view_configEdit_viewRow = Visualizar linha
+view_configurationDetails_allPropertiesValid = Todas as propriedades de configura\u00E7\u00E3o s\u00E3o v\u00E1lidas, portanto a configura\u00E7\u00E3o pode ser salva.
+view_configurationDetails_configNotUpdatedDueToNoChange = A configuração não foi atualizada, pois a nova configuração é equivalente à atual.
+view_configurationDetails_error_updateFailure = Falha ao atualizar a configuração.
+view_configurationDetails_messageConcise = Configuração atualizada - versão corrrente: {0}.
+view_configurationDetails_messageDetailed = Configuração do Recurso [{1}] atualizada para a versão {0}.
+view_configurationDetails_noPermission = Você não possui permisssão para editar a configuraçào do Recurso.
+view_configurationDetails_somePropertiesInvalid = As seguintes propriedades possuem valores inválidos: {0}. Os valores devem ser corrigidos antes da configuração ser salva.
+view_configurationHistoryDetails_dialogTitle = Detalhes da Configuração
+view_configurationHistoryDetails_error_loadFailure = Não foi possível carregar o histórico de configuração.
+view_configurationHistoryList_cannotDeleteCurrent = Um dos itens de histórico selecionado representa a configuração corrente. - você não pode excluí-lo.
+view_configurationHistoryList_cannotDeleteGroupItems = Um ou mais itens do histórico de configuração selecionado pertencem à uma atualização de configuração em grupo. view_configurationHistoryList_delete_failure = Falha ao excluir o histórico dos itens de configuração.
+view_configurationHistoryList_delete_failure = Falha ao excluir o histórico dos itens de configuração.
+view_configurationHistoryList_delete_success = Itens do histórico de configuração selecionados excluídos com sucesso.
+view_configurationHistoryList_rollback = Desfazer
+view_configurationHistoryList_rollback_failure = Falha ao desfazer a configuração. A configuração original ainda permanece.
+view_configurationHistoryList_rollback_success = Configuração revertida para a configuração selecionada com sucesso.
+view_configurationHistoryList_table_clickStatusIcon = Clique no ícone status para visualizar os detlahes.
+view_configurationHistoryList_table_statusFailure = Falha ao atualizar a configuração
+view_configurationHistoryList_table_statusInprogress = A atualização desta configuração ainda está em andamento.
+view_configurationHistoryList_table_statusNochange = Nenhuma mundaça foi feita nesta configuração
+view_configurationHistoryList_table_statusSuccess = Configuração atualizada com sucesso
+view_configurationHistoryList_title = Histórico de Configuração
+view_connectionSettingsDetails_allPropertiesValid = Todas a propriedades estão corretas, portanto a configuração pode ser salva agora.
+view_connectionSettingsDetails_error_updateFailure = Falha ao atualizar as propriedades de conexão.
- view_connectionSettingsDetails_messageConcise_updateSuccess = Atualização das propriedades de conexão iniciada.
- view_connectionSettingsDetails_messageDetailed_updateSuccess = Propriedades de conexão do Recurso [{0}] atualizadas
++##view_connectionSettingsDetails_messageConcise_updateSuccess = Atualização das propriedades de conexão iniciada.
++##view_connectionSettingsDetails_messageDetailed_updateSuccess = Propriedades de conexão do Recurso [{0}] atualizadas
+view_connectionSettingsDetails_noPermission = Você não possui permissão para editar as propriedades de conexão do Recurso.
+view_connectionSettingsDetails_somePropertiesInvalid = As seguintes propriedades de conexão estão incorretas: {0}. Os valores devem ser corrigidos antes de serem salvos.
+view_core_error_1 = Falha ao perquisar novos alertas
+view_core_loggedInAs = Logado como {0}
+view_core_loggedOut = Desconectado
+view_core_noRecentAlerts = Não existem alertas recentes
+view_core_recentAlerts = [{0}] alertas recentes
+view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada
+view_dashboardManager_deleteFail = Falha ao excluir o dashboard.
+view_dashboardManager_deleted = Dashboard {0} exclu\u00EDdo com sucesso!
+view_dashboardManager_error = Falha ao salvar o dashboard no servidor
+view_dashboardManager_saved = Dashboard {0} salvo no servidor
+view_dashboardManager_success = Dashboard salvo
+view_dashboard_favorites_error1 = Falha ao carregar recursos favoritos.
+view_dashboardsManager_error1 = Falha ao adicionar novo dashboad
+view_dashboardsManager_inventory_title = Sum\u00E1rio do Invent\u00E1rio
+view_dashboardsManager_mashup_title = Novidades do RHQ
+view_dashboardsManager_message_title = Bem vindo ao RHQ
+view_dashboardsManager_message_title_details = <h1>Bem vindo ao RHQ</h1>\n<p> O projeto RHQ \u00E9 uma abstra\u00E7\u00E3o e uma suite de gerenciamento de sistemas baseada em plug-ins que fornece uma solu\u00E7\u00E3o extens\u00EDvel e integrada para o gerenciamento de m\u00FAltiplas plataformas atrav\u00E9s de um conjunto de funcionalidades que faz parte de seu n\u00FAcleo. O projeto foi concebido com m\u00F3dulos em camadas que fornecem uma arquitetura flexivel para sua implanta\u00E7\u00E3o. Ele possui uma interface de usu\u00E1rio que propcia o hist\u00F3rico e a auditoria do gerenciamento de recursos por toda a empresa. Sua arquitetura baseada em Agente-Servidor permite o gerenciamento remoto atrav\u00E9s de plugins que implementam todo o suporte espec\u00EDfico aos recursos gerenciados.<p> <p>Este dashboard padr\u00E3o pode ser modificado clicando o bot\u00E3o (modo edi\u00E7\u00E3o) acima.</p>
+view_dashboardsManager_tagcloud_title = Nuvem de Tags
+view_dashboards_confirm1 = Tem certeza de que deseja excluir?
+view_dashboards_portlets_refresh_fail1 = Falha ao alterar o intervalo de atualização de portlets dinâmicos.
+view_dashboards_portlets_refresh_fail2 = Falha ao desabilitar a atualização de portlets dinâmicos.
+view_dashboards_portlets_refresh_multiple_min = {0} minutos
+view_dashboards_portlets_refresh_none = N\u00E3o atualizar
+view_dashboards_portlets_refresh_one_min = 1 minuto
+view_dashboards_portlets_refresh_success1 = Intervalo de atualiza\u00E7\u00E3o dos portlets din\u00E2micos alterado com sucesso
+view_dashboards_portlets_refresh_success2 = Parando a atualiza\u00E7\u00E3o autom\u00E1tica dos portlets din\u00E2micos
+view_dashboards_title = Dashboard
- view_drift_button_detectNow = Detectar agora
- view_drift_category_fileAdded = Arquivo adicionado
- view_drift_category_fileChanged = Arquivo alterado
- view_drift_category_fileRemoved = Arquivo removido
- view_drift_delete_confirm = Excluir drift(s) selecionado(s)?
- view_drift_delete_confirmAll = Excluir todos os drifts desta origem?
- view_drift_failure_delete = Falha ao excluir os alvos dos drifts com ids: {0}
- view_drift_failure_deleteAll = Falha ao excluir todos os alvos dos drifts desta origem
- view_drift_failure_detectNow = Falha ao submeter a requisição de detecção do drift
- view_drift_failure_load = Falha ao recuperar os dados do drift
- view_drift_success_configurationUpdated = Configuração do drift atualizada. O arquivo de cobertura será atualizado na próxima varredura de detecção.
- view_drift_success_delete = Drifts {0} excluídos com sucesso!
- view_drift_success_deleteConfigs = Configurações do drift {0} excluídas com sucesso!
- view_drift_success_detectNow = Requisição de detecção de drift submetida com sucesso.
- view_drift_table_baseDir = Diretório Base
- view_drift_table_newFile = Novo Arquivo
- view_drift_table_oldFile = Arquivo Antigo
- view_drift_table_resourceConfig = Configuração de Drift do Recurso
- view_drift_table_resourceHistory = Histórico de Drift do Recurso
- view_drift_wizard_addConfig_failure = Falha ao adicionar nova configuração de drift [{0}]
- view_drift_wizard_addConfig_infoStepName = Provide Drift Detection Information\nForneça a informação para detecção do drift
- view_drift_wizard_addConfig_nameHelp = Um nome que descreve de forma objetiva o propósito desta configuração de drift de detecção. Nomes de configuração de drift devem ser únicos para um determinado recurso.
- view_drift_wizard_addConfig_namePrompt = Novo nome para configuração do drift
- view_drift_wizard_addConfig_success = Nova configuração de drift incluída com sucesso [{0}]. O(s) agente(s) será(ão) atualizado(s).
- view_drift_wizard_addConfig_templateHelp = Cada configuração de drift define um conjunto de arquivos no qual a detecção será aplicada. A configuração pode ser habilitada ou desabilitada, define um intervalo de detecção, e especifica um diretório raiz e filtros opcionais. Para cada tipo de recurso com suporte a detecção de drift existe um ou mais templates pré-definidos para usar como ponto de partida e que podem ser editados posteriormente.
- view_drift_wizard_addConfig_templatePrompt = Templates de configuração de Drift
- view_drift_wizard_addConfig_title = Incluir Configuração de Drift para o Tipo de Recurso [{0}]
- view_drift_wizard_addConfig_windowTitle = Assistente de Configuração de Drift
++##view_drift_button_detectNow = Detectar agora
++##view_drift_category_fileAdded = Arquivo adicionado
++##view_drift_category_fileChanged = Arquivo alterado
++##view_drift_category_fileRemoved = Arquivo removido
++##view_drift_delete_confirm = Excluir drift(s) selecionado(s)?
++##view_drift_delete_confirmAll = Excluir todos os drifts desta origem?
++##view_drift_failure_delete = Falha ao excluir os alvos dos drifts com ids: {0}
++##view_drift_failure_deleteAll = Falha ao excluir todos os alvos dos drifts desta origem
++##view_drift_failure_detectNow = Falha ao submeter a requisição de detecção do drift
++##view_drift_failure_load = Falha ao recuperar os dados do drift
++##view_drift_success_configurationUpdated = Configuração do drift atualizada. O arquivo de cobertura será atualizado na próxima varredura de detecção.
++##view_drift_success_delete = Drifts {0} excluídos com sucesso!
++##view_drift_success_deleteConfigs = Configurações do drift {0} excluídas com sucesso!
++##view_drift_success_detectNow = Requisição de detecção de drift submetida com sucesso.
++##view_drift_table_baseDir = Diretório Base
++##view_drift_table_newFile = Novo Arquivo
++##view_drift_table_oldFile = Arquivo Antigo
++##view_drift_table_resourceConfig = Configuração de Drift do Recurso
++##view_drift_table_resourceHistory = Histórico de Drift do Recurso
++##view_drift_wizard_addConfig_failure = Falha ao adicionar nova configuração de drift [{0}]
++##view_drift_wizard_addConfig_infoStepName = Provide Drift Detection Information\nForneça a informação para detecção do drift
++##view_drift_wizard_addConfig_nameHelp = Um nome que descreve de forma objetiva o propósito desta configuração de drift de detecção. Nomes de configuração de drift devem ser únicos para um determinado recurso.
++##view_drift_wizard_addConfig_namePrompt = Novo nome para configuração do drift
++##view_drift_wizard_addConfig_success = Nova configuração de drift incluída com sucesso [{0}]. O(s) agente(s) será(ão) atualizado(s).
++##view_drift_wizard_addConfig_templateHelp = Cada configuração de drift define um conjunto de arquivos no qual a detecção será aplicada. A configuração pode ser habilitada ou desabilitada, define um intervalo de detecção, e especifica um diretório raiz e filtros opcionais. Para cada tipo de recurso com suporte a detecção de drift existe um ou mais templates pré-definidos para usar como ponto de partida e que podem ser editados posteriormente.
++##view_drift_wizard_addConfig_templatePrompt = Templates de configuração de Drift
++##view_drift_wizard_addConfig_title = Incluir Configuração de Drift para o Tipo de Recurso [{0}]
++##view_drift_wizard_addConfig_windowTitle = Assistente de Configuração de Drift
+view_dynagroup_children = Grupo Dinâmico Filho
+view_dynagroup_compatible = Compátivel
+view_dynagroup_definitionAlreadyExists = Já existe uma definição de grupo com este nome
+view_dynagroup_definitionCreated = Definição de grupo [{0}] criada com sucesso!
+view_dynagroup_definitionLoadFailure = Falha ao carregar as definições de grupo
+view_dynagroup_definitions = Definições de Grupos Dinâmicos
+view_dynagroup_deleteFailureSelection = Falha ao excluir as definições selecionadas
+view_dynagroup_deleteSuccessfulSelection = Definições de grupo [{0}] excluídas com sucesso!
+view_dynagroup_editing = Editando [{0}]
+view_dynagroup_exprBuilder_addExpression = Adicionar Expressão
+view_dynagroup_exprBuilder_comparisonType = Tipo de comparação
+view_dynagroup_exprBuilder_comparisonType_contains = contém
+view_dynagroup_exprBuilder_comparisonType_endsWith = Termina com
+view_dynagroup_exprBuilder_comparisonType_equals = igual
+view_dynagroup_exprBuilder_comparisonType_startsWith = inicia com
+view_dynagroup_exprBuilder_comparisonType_tooltip = Tipo de Comparação
+view_dynagroup_exprBuilder_definingPlugin = Plugin
+view_dynagroup_exprBuilder_definingPlugin_tooltip = O plugin a ser procurado
+view_dynagroup_exprBuilder_expression = Expressão
+view_dynagroup_exprBuilder_expressionType = Tipo de Expressão
+view_dynagroup_exprBuilder_expressionType_pluginConfig = Configuração do Plugin
+view_dynagroup_exprBuilder_expressionType_resource = Recurso
+view_dynagroup_exprBuilder_expressionType_resourceCategory = Categoria do Recurso
+view_dynagroup_exprBuilder_expressionType_resourceConfig = Configuração do Recurso
+view_dynagroup_exprBuilder_expressionType_resourceType = Tipo do Recurso
+view_dynagroup_exprBuilder_expressionType_tooltip = Tipo de propriedade usada por esta expressão:<br/> <b>Recurso</b>: Uma propriedade do recurso (ex: nome ou versão)<br/> <b>Tipo de Recurso</b>: Procura por recursos de um tipo específico<br/> <b>Categoria do Recurso</b>: Procura por recursos de uma categoria específica: platforma, servidor, serviço<br/> <b>Característica</b>: Recursos que possuem valores selecionados para uma característica monitorada<br/> <b>Configuração do Plugin</b>: Procurar pela configuração do componente do plugin <br/> <b>Configuração do Recurso</b>: Procurar pela configuração do recurso gerenciado
+view_dynagroup_exprBuilder_expressionType_trait = Característica
+view_dynagroup_exprBuilder_expression_tooltip = Esta é a expressão completa com base nas definições do formulário abaixo. Este texto será adicionado ao campo de expressão da definição do grupo quando você clicar o botão "Adicionar Expressão"
+view_dynagroup_exprBuilder_groupBy = Agrupado por
+view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy fará com que o resultado da busca seja agrupado de acordo com os valores informados na expressão. Por exemplo, usando GroupBy para o nome de um cluster JBossAS, o resultado criará um grupo para cada cluster e seus membros.
+view_dynagroup_exprBuilder_noPlugins = --Sem plugins--
+view_dynagroup_exprBuilder_noProperties = --Sem propriedades--
+view_dynagroup_exprBuilder_noResourceTypes = --Nehum tipo de recurso--
+view_dynagroup_exprBuilder_pluginLoadFailure = N\u00E3o foi poss\u00EDvel obter a lista de plugins
+view_dynagroup_exprBuilder_propLoadFailure = N\u00E3o foi poss\u00EDvel obter a lista de propriedades
+view_dynagroup_exprBuilder_propertyName = Nome da propriedade
+view_dynagroup_exprBuilder_propertyName_tooltip = O nome da propriedade a ser pesquisada. Isso é definido pelo tipo da expressão bem como o tipo do recurso.
+view_dynagroup_exprBuilder_resTypeLoadFailure = Não foi possível recuperar a lista de recursos para o plugin [{0}]
+view_dynagroup_exprBuilder_resource = Recurso
+view_dynagroup_exprBuilder_resourceType = Tipo de Recurso
+view_dynagroup_exprBuilder_resourceType_tooltip = O tipo do recurso
+view_dynagroup_exprBuilder_resource_child = Filho
+view_dynagroup_exprBuilder_resource_grandparent = Avô
+view_dynagroup_exprBuilder_resource_greatGrandparent = Bizavô
+view_dynagroup_exprBuilder_resource_greatGreatGrandparent = Tataravô
+view_dynagroup_exprBuilder_resource_parent = Pai
+view_dynagroup_exprBuilder_resource_resource = Recurso
+view_dynagroup_exprBuilder_resource_tooltip = Escolha o nível do recurso que deseja selecionar. Por exemplo, selecione "pai" para procurar por recursos filhos cujo recurso pai case com o resto da expressão.
+view_dynagroup_exprBuilder_savedExpression = Expressão salva
+view_dynagroup_exprBuilder_title = Construtor de expressão
+view_dynagroup_exprBuilder_unset = Não definido
+view_dynagroup_exprBuilder_unset_tooltip = Indefinido irá procurar todos os valores que possuem um valor nulo no banco de dados. Não é possível utilizar o operador "=" para valores indefinidos.
+view_dynagroup_exprBuilder_value_tooltip = A string de pesquisa da expressão
+view_dynagroup_expression = Expressão
+view_dynagroup_expressionBuilderIconTooltip = Construtor de Expressão
+view_dynagroup_expressionSet = Conjunto de Expressões
+view_dynagroup_lastCalculationTime = Último cálculo
+view_dynagroup_loadDefinitionFailure = Falha ao carregar as definições [{0}]
+view_dynagroup_loadDefinitionMissing = Não existe definição para o grupo com ID [{0}]
+view_dynagroup_mixed = Misturado
+view_dynagroup_newGroupDefinition = Nova Definição de Grupo
+view_dynagroup_nextCalculationTime = Próximo cálculo
+view_dynagroup_permDenied = Você não possui permissões para visualizar o grupo
+view_dynagroup_recalcFailure = Falha ao recalcular essa definição
+view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions
+view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition
+view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions
+view_dynagroup_recalculate = Recalculate
+view_dynagroup_recalculationInterval = Recalculation Interval
+view_dynagroup_recursive = Recursive
+view_dynagroup_saveAndRecalculate = Save & Recalculate
+view_dynagroup_saveFailure = Failed to save the group definition named [{0}]
+view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]
+view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created
view_dynagroup_template_customExpression = Custom Expression...
view_dynagroup_template_downedResources = All resources currently down
view_dynagroup_template_jbossas4_clusters = JBossAS 4 - Clusters
@@@ -1666,15 -1665,15 +1666,15 @@@ view_remoteAgentInstall_promptUser = No
view_remoteAgentInstall_result = Resultado
view_remoteAgentInstall_resultCode = ResultCode
view_remoteAgentInstall_startAgent = Iniciar Agente
- view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente\\\\\\\\: [{0}]
+ view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente: [{0}]
view_remoteAgentInstall_step = Step
view_remoteAgentInstall_stopAgent = Parar Agente
- view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente\\\\\\\\: [{0}]
+ view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente: [{0}]
view_remoteAgentInstall_success = Instala\u00E7\u00E3o do Agente finalizada
view_remoteAgentInstall_updateStatus = Status da Atualiza\u00E7\u00E3o
-view_reportsTop_description = This section provides access to global reports.~
+view_reportsTop_description = This section provides access to global reports.
view_reportsTop_title = Relat\u00F3rios
-view_reports_alertDefinitions = Defini\u00E7\u00E3o de Alertas~
+view_reports_alertDefinitions = Defini\u00E7\u00E3o de Alertas
view_reports_alertDefinitions_parentHover = Click to go to the parent alert definition
view_reports_alertDefinitions_resTypeLoadError = Cannot get the template resource type - unable to view the alert template.
view_reports_inventorySummary_failFetch = Failed to get inventory summary
@@@ -1734,67 -1733,67 +1734,67 @@@ view_selector_assigned = Associado {0
view_selector_available = Dispon\u00EDvel {0}
view_subTab_error_disabled = N\u00E3o \u00E9 poss\u00EDvel selecionar uma subTab desabilidada [{0}].
view_summaryDashboard_resetConfirm = Reset to default summary dashboard (lose local changes)?
-view_summaryOverviewForm_error_descriptionChangeFailure = Failed to change description of Resource with id {0} from [{1}] to [{2}].~
-view_summaryOverviewForm_error_locationChangeFailure = Failed to change location of Resource with id {0} from [{1}] to [{2}].~
-view_summaryOverviewForm_error_nameChangeFailure = Failed to change name of Resource with id {0} from [{1}] to [{2}].~
-view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.~
-view_summaryOverviewForm_field_description = Description~
-view_summaryOverviewForm_field_location = Location~
-view_summaryOverviewForm_field_name = Name~
-view_summaryOverviewForm_field_parent = Parent~
-view_summaryOverviewForm_field_type = Type~
-view_summaryOverviewForm_field_version = Version~
-view_summaryOverviewForm_header_summary = Summary~
+view_summaryOverviewForm_error_descriptionChangeFailure = Failed to change description of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_error_locationChangeFailure = Failed to change location of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_error_nameChangeFailure = Failed to change name of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.
+view_summaryOverviewForm_field_description = Description
+view_summaryOverviewForm_field_location = Location
+view_summaryOverviewForm_field_name = Name
+view_summaryOverviewForm_field_parent = Parent
+view_summaryOverviewForm_field_type = Type
+view_summaryOverviewForm_field_version = Version
+view_summaryOverviewForm_header_summary = Summary
view_summaryOverviewForm_label_plugin = Plugin:
view_summaryOverviewForm_label_type = Type:
-view_summaryOverviewForm_message_descriptionChangeSuccess = Description of Resource with id {0} was changed from [{1}] to [{2}].~
-view_summaryOverviewForm_message_locationChangeSuccess = Location of Resource with id {0} was changed from [{1}] to [{2}].~
-view_summaryOverviewForm_message_nameChangeSuccess = Name of Resource with id {0} was changed from [{1}] to [{2}].~
-view_summaryOverview_header_detectedErrors = Detected Errors~
-view_summaryOverview_title_errorDetailsWindow = Error Details~
-view_summaryOverview_tooltip_detectedErrors = Click on the rows to see the error details.~
+view_summaryOverviewForm_message_descriptionChangeSuccess = Description of Resource with id {0} was changed from [{1}] to [{2}].
+view_summaryOverviewForm_message_locationChangeSuccess = Location of Resource with id {0} was changed from [{1}] to [{2}].
+view_summaryOverviewForm_message_nameChangeSuccess = Name of Resource with id {0} was changed from [{1}] to [{2}].
+view_summaryOverview_header_detectedErrors = Detected Errors
+view_summaryOverview_title_errorDetailsWindow = Error Details
+view_summaryOverview_tooltip_detectedErrors = Click on the rows to see the error details.
view_tableSection_backButton = Voltar \u00E0 Lista
-view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug~
-view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.~
+view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug
+view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.
view_table_drawFail = Failed to draw Table [{0}].
view_table_matchingRows = Matching Rows: {0} (selected: {1})
- view_table_totalRows = Total de Linhas\\\\\\\\: {0} (selecionada\\\\\\\\: {1})
+ view_table_totalRows = Total de Linhas: {0} (selecionada: {1})
view_tabs_common_activity = Activity
view_tabs_common_agent = Agent
-view_tabs_common_alerts = Alerts~
-view_tabs_common_availability = Availability~
-view_tabs_common_calltime = Calltime~
-view_tabs_common_child_history = Child History~
-view_tabs_common_child_resources = Child Resources~
-view_tabs_common_configuration = Configuration~
-view_tabs_common_connectionSettings = Connection Settings~
-view_tabs_common_connectionSettingsHistory = Connection Settings History~
-view_tabs_common_content = Content~
-view_tabs_common_current = Current~
-view_tabs_common_dashboard = Dashboard~
-view_tabs_common_definitions = Definitions~
-view_tabs_common_deployed = Deployed~
+view_tabs_common_alerts = Alerts
+view_tabs_common_availability = Availability
+view_tabs_common_calltime = Calltime
+view_tabs_common_child_history = Child History
+view_tabs_common_child_resources = Child Resources
+view_tabs_common_configuration = Configuration
+view_tabs_common_connectionSettings = Connection Settings
+view_tabs_common_connectionSettingsHistory = Connection Settings History
+view_tabs_common_content = Content
+view_tabs_common_current = Current
+view_tabs_common_dashboard = Dashboard
+view_tabs_common_definitions = Definitions
+view_tabs_common_deployed = Deployed
##view_tabs_common_drift = Drift
-view_tabs_common_events = Events~
-view_tabs_common_graphs = Graphs~
+view_tabs_common_events = Events
+view_tabs_common_graphs = Graphs
view_tabs_common_group_members = Group Members
-view_tabs_common_group_membership = Group Membership~
-view_tabs_common_groups = Groups~
-view_tabs_common_history = History~
-view_tabs_common_inventory = Inventory~
-view_tabs_common_members = Members~
-view_tabs_common_monitoring = Monitoring~
-view_tabs_common_new = New~
-view_tabs_common_operations = Operations~
-view_tabs_common_overview = Overview~
+view_tabs_common_group_membership = Group Membership
+view_tabs_common_groups = Groups
+view_tabs_common_history = History
+view_tabs_common_inventory = Inventory
+view_tabs_common_members = Members
+view_tabs_common_monitoring = Monitoring
+view_tabs_common_new = New
+view_tabs_common_operations = Operations
+view_tabs_common_overview = Overview
view_tabs_common_schedule = Schedule
-view_tabs_common_scheduled = Scheduled~
-view_tabs_common_schedules = Schedules~
-view_tabs_common_subscriptions = Subscriptions~
-view_tabs_common_summary = Summary~
-view_tabs_common_tables = Tables~
-view_tabs_common_timeline = Timeline~
-view_tabs_common_traits = Traits~
+view_tabs_common_scheduled = Scheduled
+view_tabs_common_schedules = Schedules
+view_tabs_common_subscriptions = Subscriptions
+view_tabs_common_summary = Summary
+view_tabs_common_tables = Tables
+view_tabs_common_timeline = Timeline
+view_tabs_common_traits = Traits
view_tabs_invalidSubTab = Invalid subtab: {0}
view_tabs_invalidTab = Invalid tab: {0}
view_tagCloud_deleteTag = Delete Tag
@@@ -1833,49 -1832,49 +1833,49 @@@ view_tree_common_contextMenu_loadFail_c
view_tree_common_contextMenu_loadFail_dashboards = Failed to load user dashboards
view_tree_common_contextMenu_loadFail_group = Failed to load group for context menu
view_tree_common_contextMenu_loadFailed_dashboard = Failed to load user dashboards
-view_tree_common_contextMenu_loadFailed_manualAddChildren = Failed to load platform manual add children~
-view_tree_common_contextMenu_measurements = Measurements~
-view_tree_common_contextMenu_operations = Operations~
-view_tree_common_contextMenu_operations_loadFailed = Failure to start wizard for running operations~
-view_tree_common_contextMenu_pluginConfiguration = Plugin Configuration~
-view_tree_common_contextMenu_resourceConfiguration = Resource Configuration~
+view_tree_common_contextMenu_loadFailed_manualAddChildren = Failed to load platform manual add children
+view_tree_common_contextMenu_measurements = Measurements
+view_tree_common_contextMenu_operations = Operations
+view_tree_common_contextMenu_operations_loadFailed = Failure to start wizard for running operations
+view_tree_common_contextMenu_pluginConfiguration = Plugin Configuration
+view_tree_common_contextMenu_resourceConfiguration = Resource Configuration
view_tree_common_contextMenu_resourceGraph = Resource Metric Graph
-view_tree_common_contextMenu_saveChartToDashboardFailure = Failed to save the dashboard~
-view_tree_common_contextMenu_saveChartToDashboardSuccessful = You have saved dashboard [{0}]~
+view_tree_common_contextMenu_saveChartToDashboardFailure = Failed to save the dashboard
+view_tree_common_contextMenu_saveChartToDashboardSuccessful = You have saved dashboard [{0}]
view_tree_common_contextMenu_type_name_label = Type: {0}
view_tree_common_createFailed_autoCluster = Failed to create or update autocluster backing group
-view_tree_common_loadFailed_children = Failed to load children for node~
-view_tree_common_loadFailed_create = Failed to create view for this node~
-view_tree_common_loadFailed_descendants = Failed to load descendants for tree~
-view_tree_common_loadFailed_generic = Failed to load data for tree~
+view_tree_common_loadFailed_children = Failed to load children for node
+view_tree_common_loadFailed_create = Failed to create view for this node
+view_tree_common_loadFailed_descendants = Failed to load descendants for tree
+view_tree_common_loadFailed_generic = Failed to load data for tree
view_tree_common_loadFailed_group = Failed to load group with id [{0}]
view_tree_common_loadFailed_groupTree = Failed to load group tree
-view_tree_common_loadFailed_node = Failed to load data for this node~
-view_tree_common_loadFailed_root = Failed to load root for tree~
-view_tree_common_loadFailed_selection = Failed to select this node~
-view_tree_common_loadFailed_update = Failed to update view for this node~
+view_tree_common_loadFailed_node = Failed to load data for this node
+view_tree_common_loadFailed_root = Failed to load root for tree
+view_tree_common_loadFailed_selection = Failed to select this node
+view_tree_common_loadFailed_update = Failed to update view for this node
view_tree_group_error_updateAutoCluster = Failed to create or update autocluster backing group. key: [{0}]
-view_type_parentId = Parent ID~
-view_type_resourceTypes = Resource Types~
-view_type_typeTreeLoadFailure = Failed to load resource type tree data~
-view_upload_alreadyUploaded = File has already been uploaded~
-view_upload_bundleDistFile = Distribution File~
-view_upload_error_bundleDistFile = Error uploading Bundle Distribution File~
-view_upload_error_file = Error uploading file~
-view_upload_error_fileName = Error uploading file [{0}]~
-view_upload_error_fileName_2 = Error uploading file [{0}], check for invalid file path.~
-view_upload_error_packageVersionFile = Error uploading Package Version File~
-view_upload_error_results = Error uploading file, unexpected results: [{0}]~
-view_upload_inProgress = Can not submit, upload is currently in progress~
-view_upload_prompt_1 = [{0}] File to Upload~
-view_upload_prompt_2 = File to Upload~
-view_upload_success = File successfully uploaded~
-view_upload_tooltip_1 = Select a file to upload, then click Upload or Next~
+view_type_parentId = Parent ID
+view_type_resourceTypes = Resource Types
+view_type_typeTreeLoadFailure = Failed to load resource type tree data
- view_upload_alreadyUploaded = O upload do arquivo j\\u00E1 foi realizado.
- view_upload_bundleDistFile = Arquivo de Distribui\\u00E7\\u00E3o
- view_upload_error_bundleDistFile = Erro ao fazer upload do arquivo de distribui\\u00E7\\u00E3o do bundle
++view_upload_alreadyUploaded = O upload do arquivo j\u00E1 foi realizado.
++view_upload_bundleDistFile = Arquivo de Distribui\u00E7\u00E3o
++view_upload_error_bundleDistFile = Erro ao fazer upload do arquivo de distribui\u00E7\u00E3o do bundle
+view_upload_error_file = Erro ao fazer upload do arquivo
+view_upload_error_fileName = Erro ao fazer upload do arquivo [{0}]
- view_upload_error_fileName_2 = Erro ao fazer upload do arquivo [{0}], verifique se o caminho do arquivo est\\u00E1 correto.
- view_upload_error_packageVersionFile = Erro ao fazer upload da vers\\u00E3o do pacote
++view_upload_error_fileName_2 = Erro ao fazer upload do arquivo [{0}], verifique se o caminho do arquivo est\u00E1 correto.
++view_upload_error_packageVersionFile = Erro ao fazer upload da vers\u00E3o do pacote
+view_upload_error_results = Erro ao fazer upload do arquivo, resultados inexperados: [{0}]
- view_upload_inProgress = N\\u00E3o foi poss\\u00EDvel submeter, upload em andamento
++view_upload_inProgress = N\u00E3o foi poss\u00EDvel submeter, upload em andamento
+view_upload_prompt_1 = [{0}] File to Upload
+view_upload_prompt_2 = File to Upload
+view_upload_success = File successfully uploaded
+view_upload_tooltip_1 = Select a file to upload, then click Upload or Next
view_upload_tooltip_1a = Select a file to upload, then click Upload or Next
view_upload_tooltip_1b = Select a file to upload, then click Next
-view_upload_tooltip_2 = File upload had previously failed~
-view_upload_upload = Upload~
-view_upload_uploadFile = UploadFile~
+view_upload_tooltip_2 = File upload had previously failed
+view_upload_upload = Upload
+view_upload_uploadFile = UploadFile
widget_colorPicker_tooltip = Clique para selecionar uma nova cor
widget_durationItem_inputUnitLessThanTargetUnit = A unidade de entrada \u00E9 menor que a unidade final.
widget_durationItem_unitTypeNotSupported = Tipo de unidade [{0}] n\u00E3o suportada por este Item de Dura\u00E7\u00E3o.
commit 01286aab22a8626ec7a8611df95315ff61a08ed4
Merge: b0a583c 8003fa2
Author: Rafael Soares <rafaelcba(a)gmail.com>
Date: Thu Jul 28 22:48:31 2011 -0300
translating...
diff --cc modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 40add0d,d4c0af4..26f33b9
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@@ -325,16 -328,16 +327,16 @@@ dataSource_scheduledOperations_field_lo
dataSource_scheduledOperations_field_operation = Opera\u00E7\u00E3o
dataSource_scheduledOperations_field_resource = Recurso
dataSource_scheduledOperations_field_time = Data/Hora
- dataSource_schedules_disableFailure_group = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas eram\: [{2}]
- dataSource_schedules_disableFailure_resource = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas eram\: [{2}]
-dataSource_schedules_disableFailure_group = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas eram: [{2}]
-dataSource_schedules_disableFailure_resource = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas eram: [{2}]
++dataSource_schedules_disableFailure_group = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas eram\\\\\\\\: [{2}]
++dataSource_schedules_disableFailure_resource = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas eram\\\\\\\\: [{2}]
dataSource_schedules_disableSuccessful_concise = Voc\u00EA desabilitou a coleta de m\u00E9tricas de [{0}]
- dataSource_schedules_disableSuccessful_full_group = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\: [{2}]
- dataSource_schedules_disableSuccessful_full_resource = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o recurso com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\: [{2}]
- dataSource_schedules_enableFailure_group = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o grupo com ID [{1}]. As m\u00E9tricas s\u00E3o\: [{2}]
- dataSource_schedules_enableFailure_resource = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas s\u00E3o\: [{2}]
-dataSource_schedules_disableSuccessful_full_group = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o: [{2}]
-dataSource_schedules_disableSuccessful_full_resource = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o recurso com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o: [{2}]
-dataSource_schedules_enableFailure_group = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o grupo com ID [{1}]. As m\u00E9tricas s\u00E3o: [{2}]
-dataSource_schedules_enableFailure_resource = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas s\u00E3o: [{2}]
++dataSource_schedules_disableSuccessful_full_group = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\\\\\\\\: [{2}]
++dataSource_schedules_disableSuccessful_full_resource = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o recurso com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\\\\\\\\: [{2}]
++dataSource_schedules_enableFailure_group = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o grupo com ID [{1}]. As m\u00E9tricas s\u00E3o\\\\\\\\: [{2}]
++dataSource_schedules_enableFailure_resource = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas s\u00E3o\\\\\\\\: [{2}]
dataSource_schedules_enableSuccessful_concise = Voce habilitou a coleta de m\u00E9tricas de [{0}]
- dataSource_schedules_enableSuccessful_full_group = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas habilitadas foram\: [{2}]
- dataSource_schedules_enableSuccessful_full_resource = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas habilitadas foram\: [{2}]
-dataSource_schedules_enableSuccessful_full_group = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas habilitadas foram: [{2}]
-dataSource_schedules_enableSuccessful_full_resource = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas habilitadas foram: [{2}]
++dataSource_schedules_enableSuccessful_full_group = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas habilitadas foram\\\\\\\\: [{2}]
++dataSource_schedules_enableSuccessful_full_resource = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas habilitadas foram\\\\\\\\: [{2}]
dataSource_schedules_field_resourceGroupId = ID de Grupo
dataSource_schedules_loadFailed = Falha ao carregar agendamento de m\u00E9tricas
dataSource_schedules_loadFailedContext = Falha ao carregar agendamentos de m\u00E9tricas para o contexto [{0}]
@@@ -391,16 -394,16 +393,16 @@@ util_rpcManager_activeRequests = {0} Re
util_userPerm_loadFailGlobal = Falha ao carregar permiss\u00F5es globais - nenhuma permiss\u00E3o concedida.
util_userPerm_loadFailGroup = Falha ao carregar suas permiss\u00F5es para o Grupo de Recursos com id [{0}] - nenhuma permiss\u00E3o concedida.
util_userPerm_loadFailResource = Falha ao carregar suas permiss\u00F5es para o Recurso com id [{0}] - nenhuma permiss\u00E3o concedida.
- util_userSession_loadFailSubject = UserSessionManager\: Falha ao carregar a credencial do usu\u00E1rio
-util_userSession_loadFailSubject = UserSessionManager: Falha ao carregar a credencial do usu\u00E1rio
++util_userSession_loadFailSubject = UserSessionManager\\\\\\\\: Falha ao carregar a credencial do usu\u00E1rio
util_userSession_logoutFail = Falha durante o logout.
util_widgetsField_unlimited = Ilimitado
--view_aboutBox_allRightsReserved = Todos os Direitos Reservados.~
- view_aboutBox_buildNumber = N\u00FAmero do Build\:~
- view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.~
- view_aboutBox_homepage = P\u00E1gina Inicial~
- view_aboutBox_jbossByRedHat = JBoss by Red Hat~
- view_aboutBox_title = Sobre {0}~
- view_aboutBox_version = Vers\u00E3o\:
-view_aboutBox_buildNumber = N\u00FAmero do Build:~
-view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.~
-view_aboutBox_homepage = P\u00E1gina Inicial~
-view_aboutBox_jbossByRedHat = JBoss by Red Hat~
-view_aboutBox_title = Sobre {0}~
++view_aboutBox_allRightsReserved = Todos os Direitos Reservados.
++view_aboutBox_buildNumber = N\u00FAmero do Build\\\\\\\\:
++view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.
++view_aboutBox_homepage = P\u00E1gina Inicial
++view_aboutBox_jbossByRedHat = JBoss by Red Hat
++view_aboutBox_title = Sobre {0}
+ view_aboutBox_version = Vers\u00E3o:
view_adminConfig_downloads = Downloads
view_adminConfig_license = Licen\u00E7a
view_adminConfig_plugins = Plugins
@@@ -653,16 -657,16 +656,16 @@@ view_alert_common_tab_dampening_partial
view_alert_common_tab_dampening_partial_occurrences_label = Ocorr\u00EAncias
view_alert_common_tab_dampening_partial_occurrences_label_tooltip = O n\u00FAmero de vezes que o conjunto de condi\u00E7\u00F5es deve ser satisfeito durante as \u00FAltimas N verifica\u00E7\u00F5es antes do alerta ser disparado.
view_alert_common_tab_general = Propriedades Gerais
- view_alert_common_tab_invalid_condition_category = Categoria de condi\u00E7\u00E3o inv\u00E1lida - favor reportar como um bug\: {0}
- view_alert_common_tab_invalid_dampening_category = Categora de sensibilidade inv\u00E1lida - favor reportar como um bug\: {0}
- view_alert_common_tab_invalid_time_units = Unidade de tempo inv\u00E1lida - favor reportar como um bug\: {0}
-view_alert_common_tab_invalid_condition_category = Categoria de condi\u00E7\u00E3o inv\u00E1lida - favor reportar como um bug: {0}
-view_alert_common_tab_invalid_dampening_category = Categora de sensibilidade inv\u00E1lida - favor reportar como um bug: {0}
-view_alert_common_tab_invalid_time_units = Unidade de tempo inv\u00E1lida - favor reportar como um bug: {0}
++view_alert_common_tab_invalid_condition_category = Categoria de condi\u00E7\u00E3o inv\u00E1lida - favor reportar como um bug\\\\\\\\: {0}
++view_alert_common_tab_invalid_dampening_category = Categora de sensibilidade inv\u00E1lida - favor reportar como um bug\\\\\\\\: {0}
++view_alert_common_tab_invalid_time_units = Unidade de tempo inv\u00E1lida - favor reportar como um bug\\\\\\\\: {0}
view_alert_common_tab_notifications = Notifica\u00E7\u00F5es
view_alert_common_tab_notifications_all_emails = Todos os Emails
view_alert_common_tab_notifications_bad_emails = Emails recusados
view_alert_common_tab_notifications_message = Mensagem
view_alert_common_tab_notifications_sender = Remetente
view_alert_common_tab_notifications_status = Status
--view_alert_common_tab_recovery = Recupera\u00E7\u00E3o~
++view_alert_common_tab_recovery = Recupera\u00E7\u00E3o
view_alert_definition_condition_editor_avilability_option_down = INDISPON\u00CDVEL
view_alert_definition_condition_editor_avilability_option_up = DISPON\u00CDVEL
view_alert_definition_condition_editor_avilability_tooltip = Especifica a mudan\u00E7a de estado na disponibilidade do recurso que ir\u00E1 disparar a condi\u00E7\u00E3o.
@@@ -697,7 -701,7 +700,7 @@@ view_alert_definition_condition_editor_
view_alert_definition_condition_editor_metric_calltime_common_name = M\u00E9trica do tempo de chamada
view_alert_definition_condition_editor_metric_calltime_common_regex = Express\u00E3o Regular
view_alert_definition_condition_editor_metric_calltime_common_regex_tooltip = Se especificada, essa \u00E9 a express\u00E3o regular a ser satisfeita pela chamada para disparar a condi\u00E7\u00E3o.
- view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Especifica um tempo limite para a chamada que, quando alcan\u00E7ado, dispara a condi\u00E7\u00E3o. O valor especificado deve ser absoluto e com uma unidade de medida opcional. \u00C9 necess\u00E1rio especificar o tempo limite da chamada para compar\u00E1-lo ao valor\: m\u00EDnimo, m\u00E1ximo ou m\u00E9dio.
-view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Especifica um tempo limite para a chamada que, quando alcan\u00E7ado, dispara a condi\u00E7\u00E3o. O valor especificado deve ser absoluto e com uma unidade de medida opcional. \u00C9 necess\u00E1rio especificar o tempo limite da chamada para compar\u00E1-lo ao valor: m\u00EDnimo, m\u00E1ximo ou m\u00E9dio.
++view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Especifica um tempo limite para a chamada que, quando alcan\u00E7ado, dispara a condi\u00E7\u00E3o. O valor especificado deve ser absoluto e com uma unidade de medida opcional. \u00C9 necess\u00E1rio especificar o tempo limite da chamada para compar\u00E1-lo ao valor\\\\\\\\: m\u00EDnimo, m\u00E1ximo ou m\u00E9dio.
view_alert_definition_condition_editor_metric_calltime_threshold_value = Valor do tempo de chamada
view_alert_definition_condition_editor_metric_calltime_threshold_value_tooltip = O valor do limiar (<i>threshold</i>) da m\u00E9trica usado para disparar a condi\u00E7\u00E3o quando comparado ao mecanismo de compara\u00E7\u00E3o escolhido.
view_alert_definition_condition_editor_metric_change_tooltip = Especifica a m\u00E9trica cujo valor deve ser alterado para disparar a condi\u00E7\u00E3o.
@@@ -763,7 -767,7 +766,7 @@@ view_alert_definition_notification_oper
view_alert_definition_notification_operation_editor_mode_specific = Recurso Espec\u00EDfico
view_alert_definition_notification_operation_editor_mode_this = Este Recurso
view_alert_definition_notification_operation_editor_mode_title = Modo de Sele\u00E7\u00E3o do Recurso
- view_alert_definition_notification_operation_editor_mode_unknown = OP\u00C7\u00C3O INV\u00C1LIDA - BUG\!
-view_alert_definition_notification_operation_editor_mode_unknown = OP\u00C7\u00C3O INV\u00C1LIDA - BUG!
++view_alert_definition_notification_operation_editor_mode_unknown = OP\u00C7\u00C3O INV\u00C1LIDA - BUG\\\\\\\\!
view_alert_definition_notification_operation_editor_operations_loadFailed = Falha ao carregar a lista de opera\u00E7\u00F5es dispon\u00EDveis
view_alert_definition_notification_operation_editor_operations_no_parameters = Esta opera\u00E7\u00E3o n\u00E3o recebe par\u00E2metros
view_alert_definition_notification_operation_editor_relative_ancestor = Iniciar a busca a partir de
@@@ -815,12 -819,12 +818,12 @@@ view_alert_details_field_recovery_info
view_alert_details_loadFailed = Falha ao recuperar detalhes do alerta
view_alerts_ack_confirm = Confirma o(s) alerta(s) selecionado(s)?
view_alerts_ack_confirm_all = Confirma todos os alertas?
- view_alerts_ack_failure = Falha ao confirmar alertas com os seguintes IDs\: {0}
-view_alerts_ack_failure = Falha ao confirmar alertas com os seguintes IDs: {0}
++view_alerts_ack_failure = Falha ao confirmar alertas com os seguintes IDs\\\\\\\\: {0}
view_alerts_ack_failure_all = N\u00E3o foi poss\u00EDvel confirmar todos os alertas
view_alerts_ack_success = Alertas {0} confirmados com sucesso
view_alerts_delete_confirm = Excluir o(s) alerta(s) selecionado(s)?
view_alerts_delete_confirm_all = Excluir todos os alertas?
- view_alerts_delete_failure = Falha ao excluir alertas com os seguintes IDs\: {0}
-view_alerts_delete_failure = Falha ao excluir alertas com os seguintes IDs: {0}
++view_alerts_delete_failure = Falha ao excluir alertas com os seguintes IDs\\\\\\\\: {0}
view_alerts_delete_failure_all = N\u00E3o foi poss\u00EDvel excluir os alertas
view_alerts_delete_success = Alertas {0} exclu\u00EDdos com sucesso
view_alerts_field_ack_status = Status
@@@ -849,9 -851,9 +850,11 @@@ view_alerts_loadFailed = Falha ao carre
view_alerts_table_filter_priority = Filtro de Prioridade
view_alerts_table_title_group = Hist\u00F3rico de Alertas do Grupo
view_alerts_table_title_resource = Hist\u00F3rico de Alertas do Recurso
--view_autoDiscoveryQ_committed = Committed
--view_autoDiscoveryQ_confirmSelect = Also select the platform children?
--view_autoDiscoveryQ_deleted = Deleted
++view_autoDiscoveryQ_committed = Registrado
++view_autoDiscoveryQ_confirmSelect = Selecionar recursos filhos desta plataforma?
++view_autoDiscoveryQ_confirmSelectAll = Selecionar recursos filhos para cada plataforma?
++view_autoDiscoveryQ_deleted = Exclu\\\\u00EDdo
++view_autoDiscoveryQ_deselectAll = Desmarcar todos
view_autoDiscoveryQ_field_discoveryTime = Data e Hora da Descoberta
view_autoDiscoveryQ_field_inventoryStatus = Status do Invet\u00E1rio
view_autoDiscoveryQ_field_key = Chave do Recurso
@@@ -859,197 -861,202 +862,206 @@@ view_autoDiscoveryQ_field_name = Nome d
view_autoDiscoveryQ_field_parentId = ID Pai
view_autoDiscoveryQ_ignore = Ignorar
view_autoDiscoveryQ_ignoreFailure = Falha ao ignorar recursos.
++view_autoDiscoveryQ_ignoreInProgress = Ignorando recursos selecionados...
view_autoDiscoveryQ_ignoreSuccessful = Os recursos selecionados foram ignorados com sucesso.
view_autoDiscoveryQ_ignored = Ignorado
view_autoDiscoveryQ_import = Importar
view_autoDiscoveryQ_importFailure = Falha ao importar recursos
++view_autoDiscoveryQ_importInProgress = Importando recursos selecionados...
view_autoDiscoveryQ_importSuccessful = Os recursos selecionados foram importados com sucesso.
view_autoDiscoveryQ_loadFailure = Falha ao carregar a fila de descoberta do invent\u00E1rio
view_autoDiscoveryQ_new = Novo
view_autoDiscoveryQ_newAndIgnored = Novo e Ignorado
view_autoDiscoveryQ_noItems = N\u00E3o h\u00E1 itens a serem mostrados
--view_autoDiscoveryQ_noperm = (Required manage inventory permissions missing. See Administrator to change)~
--view_autoDiscoveryQ_showStatus = Show
++view_autoDiscoveryQ_noperm = (Requer permiss\\\\u00E3o para gerenciar o Inevnt\\\\u00E1rio. Contacte o Administrador para realizar a altera\\\\u00E7\\\\u00E3o)
++view_autoDiscoveryQ_selectAll = Selecionar todos
++view_autoDiscoveryQ_showStatus = Mostrar
view_autoDiscoveryQ_title = Fila de Autodescoberta
view_autoDiscoveryQ_unignore = N\u00E3o ignorar
view_autoDiscoveryQ_unignoreFailure = Falha ao reimportar os recursos
--view_autoDiscoveryQ_unignoreSuccessful = You have successfully unignored the selected resources.~
--view_autoDiscoveryQ_uninventoried = Uninventoried
--view_bundleVersion_loadFailure = Failed to load bundle version data~
--view_bundle_bundle = Bundle~
--view_bundle_bundleDeployment = Bundle Deployment~
--view_bundle_bundleDeployments = Bundle Deployments~
--view_bundle_bundleDestinations = Bundle Destinations~
--view_bundle_bundleFiles = Bundle Files~
--view_bundle_bundleType = Bundle Type~
--view_bundle_bundleVersion = Bundle Version~
--view_bundle_bundleVersions = Bundle Versions~
--view_bundle_bundles = Bundles~
--view_bundle_createWizard_bundleDistro = Bundle Distribution~
--view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version = [{1}] - the bundle may still exist in the database~
--view_bundle_createWizard_cancelSuccessful = Canceled the creation of bundle [{0}], version = [{1}]~
--view_bundle_createWizard_clickToUploadRecipe = Click to upload a recipe file~
--view_bundle_createWizard_createFailure = Failed to create the bundle~
--view_bundle_createWizard_createSuccessful = You have successfully created a bundle named [{0}] with a version of [{1}]~
--view_bundle_createWizard_enterRecipe = Please supply a valid recipe
--view_bundle_createWizard_enterUrl = Please enter a valid URL where the bundle distribution file can be downloaded from
--view_bundle_createWizard_failedToUploadDistroFile = Failed to upload bundle distribution file~
--view_bundle_createWizard_failedToUploadFile = Failed to upload bundle file~
--view_bundle_createWizard_loadBundleFileFailure = Cannot obtain bundle file information from server~
--view_bundle_createWizard_noAdditionalFilesNeeded = No additional files need to be uploaded for this bundle~
--view_bundle_createWizard_noBundleTypesAvail = No bundle types are available~
--view_bundle_createWizard_noBundleTypesSupported = No bundle types are supported - you must deploy a valid plugin that supports bundle deployments~
--view_bundle_createWizard_provideBundleDistro = Provide a Bundle Distribution
--view_bundle_createWizard_recipeOption = Recipe~
--view_bundle_createWizard_title = Create Bundle~
--view_bundle_createWizard_uploadInProgress = Upload is in progress... This can take several minutes for large files~
--view_bundle_createWizard_uploadOption = Upload~
--view_bundle_createWizard_uploadStepName = Provide a Bundle Distribution~
--view_bundle_createWizard_urlOption = URL~
--view_bundle_createWizard_windowTitle = Bundle Creation Wizard~
--view_bundle_createWizard_youMustChooseOne = You must choose one option in order to create a bundle!
--view_bundle_deleteConfirm = Are you sure you want to delete this bundle? All versions, destinations and deployments for this bundle will also be deleted.
--view_bundle_deploy = Deploy~
--view_bundle_deployDir = Deploy Directory~
--view_bundle_deployWizard_deployStep = Deploy Bundle to Destination Platforms~
--view_bundle_deployWizard_deploying = Deploying...~
--view_bundle_deployWizard_deploymentCreated = Created Deployment...~
--view_bundle_deployWizard_deploymentCreatedDetail = Created deployment [{0}] description [{1}]~
--view_bundle_deployWizard_deploymentCreatedDetail_concise = You have created the deployment [{0}]
--view_bundle_deployWizard_deploymentScheduled = Bundle Deployment Scheduled!~
--view_bundle_deployWizard_deploymentScheduledDetail = Scheduled bundle deployment [{0}] destination group [{1}]~
--view_bundle_deployWizard_deploymentScheduledDetail_concise = You have scheduled the bundle deployment
--view_bundle_deployWizard_destinationCreatedDetail = Created destination [{0}] description [{1}]~
--view_bundle_deployWizard_destinationCreatedDetail_concise = You have created the destination [{0}]
--view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel:
--view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)~
--view_bundle_deployWizard_error_11 = Failed to find defined deployments.~
--view_bundle_deployWizard_error_12 = Failed to find defined bundles.~
--view_bundle_deployWizard_error_2 = Failed to delete new destination on Cancel:
--view_bundle_deployWizard_error_3 = Failed to Schedule Deployment!~
--view_bundle_deployWizard_error_4 = Failed to schedule deployment: {0}~
--view_bundle_deployWizard_error_5 = Failed to Create Deployment!~
--view_bundle_deployWizard_error_6 = Failed to create deployment: {0}~
--view_bundle_deployWizard_error_7 = Failed to get deployment name.~
--view_bundle_deployWizard_error_8 = You must select a valid resource group from the drop down~
--view_bundle_deployWizard_error_9 = Failed to delete new destination in nextPage:~
- view_bundle_deployWizard_getConfigSkip = No configuration needed for this bundle version.~
- view_bundle_deployWizard_getConfigStep = Set Deployment Configuration~
- view_bundle_deployWizard_getDestStep = New Destination~
- view_bundle_deployWizard_getDest_deployDir = Root Deployment Directory (on destination platforms)~
- view_bundle_deployWizard_getDest_desc = Destination Description~
- view_bundle_deployWizard_getDest_name = Destination Name~
- view_bundle_deployWizard_getInfoStep = Provide Deployment Information~
- view_bundle_deployWizard_getInfo_clean = Clean Deployment? (wipe deploy directory on destination platform)~
- view_bundle_deployWizard_getInfo_deploymentDesc = Deployment Description~
- view_bundle_deployWizard_getInfo_deploymentName = Deployment Name~
- view_bundle_deployWizard_getOptionsStep = Deploy Options~
- view_bundle_deployWizard_getOptions_deployLater = Deploy Later~
- view_bundle_deployWizard_getOptions_deployNow = Deploy Now~
- view_bundle_deployWizard_getOptions_deployTime = Deployment Time~
- view_bundle_deployWizard_selectBundleStep = Select Deployment Bundle~
- view_bundle_deployWizard_selectBundle_single = Select only a single bundle for deployment.~
- view_bundle_deployWizard_selectVersionStep = Select Deployment Bundle Version~
- view_bundle_deployWizard_selectVersion_latest = Latest Version [{0}]~
- view_bundle_deployWizard_selectVersion_live = Live Version [{0}]~
- view_bundle_deployWizard_selectVersion_select = Select Version from List:~
- view_bundle_deployWizard_title = Bundle Deployment Wizard~
- view_bundle_deploy_action = Action~
- view_bundle_deploy_backButton = Back to Destination~
- view_bundle_deploy_clickForError = Click the icon for the error message
- view_bundle_deploy_deleteConfirm = Are you sure you want to delete this bundle deployment?
- view_bundle_deploy_deleteFailure = Failed to delete the bundle deployment [{0}]
- view_bundle_deploy_deleteSuccessful = You successfully deleted the bundle deployment [{0}]
- view_bundle_deploy_deployedBy = Deployed By
- view_bundle_deploy_deploymentPlatforms = Deployment Platforms~
- view_bundle_deploy_installDetails = Install Details~
- view_bundle_deploy_loadBundleFailure = Failed to find bundle~
- view_bundle_deploy_loadDeployFailure = Failed to load bundle deployments~
- view_bundle_deploy_loadFailure = Failed to load bundle deployment~
- view_bundle_deploy_name = Deployment Name~
- view_bundle_deploy_operatingSystem = Operating System~
- view_bundle_deploy_selectARow = Select a row to show installation details~
- view_bundle_deploy_tagUpdateFailure = Failed to update bundle deployment tags~
- view_bundle_deploy_tagUpdateSuccessful = You have successfully updated the bundle deployment tags~
- view_bundle_deploy_time = Deployment Time~
- view_bundle_deployed = Deployed~
- view_bundle_deployments = Deployments~
- view_bundle_dest_backToBundle = Back to Bundle~
- view_bundle_dest_created = Created~
- view_bundle_dest_deleteConfirm = Are you sure you want to delete this bundle destination? This only deletes it from the database; all bundle content that was deployed to this destination on remote machines will remain.
- view_bundle_dest_deleteFailure = Failed to delete the bundle destination [{0}]
- view_bundle_dest_deleteSuccessful = You successfully deleted the bundle destination [{0}]
- view_bundle_dest_deployDir = Deploy Directory~
- view_bundle_dest_group = Group~
- view_bundle_dest_lastDeployedVersion = Last Deployed Version~
- view_bundle_dest_lastDeploymentDate = Last Deployment Date~
- view_bundle_dest_lastDeploymentStatus = Last Deployment Status~
- view_bundle_dest_loadFailure = Failed to load bundle destinations~
- view_bundle_dest_loadFailureVersionInfo = Failed to load bundle destination deployed version information~
- view_bundle_dest_purgeConfirm = This will purge the bundle content from all remote machines. Are you sure you want to do this?
- view_bundle_dest_purgeFailure = Failed to purge the bundle destination [{0}] from some or all of the remote machines.
- view_bundle_dest_purgeSuccessful = You successfully purged the bundle destination [{0}] from all of the remote machines.
- view_bundle_dest_revertConfirm = This will revert all remote machines back to the previous bundle deployment. Are you sure you want to do this?
- view_bundle_dest_tagUpdateFailure = Failed to update bundle destination tags~
- view_bundle_dest_tagUpdateSuccessful = You have successfully updated the bundle destination tags~
- view_bundle_destinations = Destinations~
- view_bundle_fileListView_fileSize = File Size~
- view_bundle_fileListView_loadFailure = Failed to load bundle file data~
-##view_bundle_deployWizard_error_noBundleConfig = Failed to obtain bundle target information. Is the group you selected a valid compatible group that can be targeted for bundle deployments?
-view_bundle_deployWizard_getConfigSkip = No configuration needed for this bundle version.~
-view_bundle_deployWizard_getConfigStep = Set Deployment Configuration~
-view_bundle_deployWizard_getDestStep = New Destination~
-##view_bundle_deployWizard_getDest_deployDir = Deployment Directory
-##view_bundle_deployWizard_getDest_deployDir_help = The directory where the bundle will be deployed. This directory will be the same for all deployments on all resources but it is relative to the destination base directory location. This means that the absolute directory may have a different path on the different target resources depending on where the base location is on all the different target resources.
-##view_bundle_deployWizard_getDest_desc = Destination Description
-##view_bundle_deployWizard_getDest_destBaseDirName = Base Location
-##view_bundle_deployWizard_getDest_group_help = The group whose members will be the destination targets for all bundle deployments. Only compatible groups that contain resources that support bundle deployments are selectable.
-##view_bundle_deployWizard_getDest_name = Destination Name
-##view_bundle_deployWizard_getDest_name_help = The name of the destination, which will identify a particular group of resources and the destination directory on those resources for a particular bundle.
-view_bundle_deployWizard_getInfoStep = Provide Deployment Information~
-view_bundle_deployWizard_getInfo_clean = Clean Deployment? (wipe deploy directory on destination platform)~
-view_bundle_deployWizard_getInfo_deploymentDesc = Deployment Description~
-view_bundle_deployWizard_getInfo_deploymentName = Deployment Name~
-view_bundle_deployWizard_getOptionsStep = Deploy Options~
-view_bundle_deployWizard_getOptions_deployLater = Deploy Later~
-view_bundle_deployWizard_getOptions_deployNow = Deploy Now~
-view_bundle_deployWizard_getOptions_deployTime = Deployment Time~
-view_bundle_deployWizard_selectBundleStep = Select Deployment Bundle~
-view_bundle_deployWizard_selectBundle_single = Select only a single bundle for deployment.~
-view_bundle_deployWizard_selectVersionStep = Select Deployment Bundle Version~
-view_bundle_deployWizard_selectVersion_latest = Latest Version [{0}]~
-view_bundle_deployWizard_selectVersion_live = Live Version [{0}]~
-view_bundle_deployWizard_selectVersion_select = Select Version from List:~
-view_bundle_deployWizard_title = Bundle Deployment Wizard~
-view_bundle_deploy_action = Action~
-view_bundle_deploy_backButton = Back to Destination~
-view_bundle_deploy_clickForError = Click the icon for the error message
-view_bundle_deploy_deleteConfirm = Are you sure you want to delete this bundle deployment?
-view_bundle_deploy_deleteFailure = Failed to delete the bundle deployment [{0}]
-view_bundle_deploy_deleteSuccessful = You successfully deleted the bundle deployment [{0}]
-view_bundle_deploy_deployedBy = Deployed By
-view_bundle_deploy_deploymentPlatforms = Deployment Resource
-view_bundle_deploy_installDetails = Install Details~
-view_bundle_deploy_loadBundleFailure = Failed to find bundle~
-view_bundle_deploy_loadDeployFailure = Failed to load bundle deployments~
-view_bundle_deploy_loadFailure = Failed to load bundle deployment~
-view_bundle_deploy_name = Deployment Name~
-view_bundle_deploy_selectARow = Select a row to show installation details~
-view_bundle_deploy_tagUpdateFailure = Failed to update bundle deployment tags~
-view_bundle_deploy_tagUpdateSuccessful = You have successfully updated the bundle deployment tags~
-view_bundle_deploy_time = Deployment Time~
-view_bundle_deployed = Deployed~
-view_bundle_deployments = Deployments~
-view_bundle_dest_backToBundle = Back to Bundle~
-##view_bundle_dest_baseDirName = Base Location
-view_bundle_dest_created = Created~
-view_bundle_dest_deleteConfirm = Are you sure you want to delete this bundle destination? This only deletes it from the database; all bundle content that was deployed to this destination on remote machines will remain.
-view_bundle_dest_deleteFailure = Failed to delete the bundle destination [{0}]
-view_bundle_dest_deleteSuccessful = You successfully deleted the bundle destination [{0}]
-view_bundle_dest_deployDir = Deploy Directory~
-view_bundle_dest_group = Group~
-view_bundle_dest_lastDeployedVersion = Last Deployed Version~
-view_bundle_dest_lastDeploymentDate = Last Deployment Date~
-view_bundle_dest_lastDeploymentStatus = Last Deployment Status~
-view_bundle_dest_loadFailure = Failed to load bundle destinations~
-view_bundle_dest_loadFailureVersionInfo = Failed to load bundle destination deployed version information~
-view_bundle_dest_purgeConfirm = This will purge the bundle content from all remote machines. Are you sure you want to do this?
-view_bundle_dest_purgeFailure = Failed to purge the bundle destination [{0}] from some or all of the remote machines.
-view_bundle_dest_purgeSuccessful = You successfully purged the bundle destination [{0}] from all of the remote machines.
-view_bundle_dest_revertConfirm = This will revert all remote machines back to the previous bundle deployment. Are you sure you want to do this?
-view_bundle_dest_tagUpdateFailure = Failed to update bundle destination tags~
-view_bundle_dest_tagUpdateSuccessful = You have successfully updated the bundle destination tags~
-view_bundle_destinations = Destinations~
-view_bundle_fileListView_fileSize = File Size~
-view_bundle_fileListView_loadFailure = Failed to load bundle file data~
++view_autoDiscoveryQ_unignoreInProgress = Removendo status de recurso ignorado...
++view_autoDiscoveryQ_unignoreSuccessful = Status de recurso ignorado removido com sucesso para os recursos selecionados.
++view_autoDiscoveryQ_uninventoried = Removido do invent\\\\u00E1rio
++view_bundleVersion_loadFailure = Falha ao carregar dados da vers\u00E3o do bundle
++view_bundle_bundle = Bundle
++view_bundle_bundleDeployment = Implanta\\\\u00E7\\\\u00E3o do Bundle
++view_bundle_bundleDeployments = Implanta\\\\u00E7\\\\u00F5es do Bundle
++view_bundle_bundleDestinations = Destina\\\\u00E7\\\\u00E3o do Bundle
++view_bundle_bundleFiles = Arquivos do Bundle
++view_bundle_bundleType = Tipo de Bundle
++view_bundle_bundleVersion = Vers\\\\u00E3o do Bundle
++view_bundle_bundleVersions = Vers\\\\u00F5es do Bundle
++view_bundle_bundles = Bundles
++view_bundle_createWizard_bundleDistro = Distribui\\\\u00E7\\\\u00E3o do Bundle
++view_bundle_createWizard_cancelFailure = Falha ao cancelar a cria\\\\u00E7\\\\u00E3o do bundle [{0}], vers\\\\u00E3o = [{1}] - talvez o bundle ainda esteja gravado no banco de dados
++view_bundle_createWizard_cancelSuccessful = Cria\\\\u00E7\\\\u00E3o do bundle [{0}] cancelada, vers\\\\u00E3o = [{1}]
++view_bundle_createWizard_clickToUploadRecipe = Clique para fazer o upload do arquivo de script
++view_bundle_createWizard_createFailure = Falha ao criar o bundle
++view_bundle_createWizard_createSuccessful = Bundle [{0}] vers\\\\u00E3o [{1}] criado com sucesso
++view_bundle_createWizard_enterRecipe = Favor fornecer um script v\\\\u00E1lido
++view_bundle_createWizard_enterUrl = Favor informar uma URL v\\\\u00E1lida para download do arquivo de distribui\\\\u00E7\\\\u00E3o do bundle
++view_bundle_createWizard_failedToUploadDistroFile = Falha ao fazer o upload do arquivo de distribui\\\\u00E7\\\\u00E3o do bundle.
++view_bundle_createWizard_failedToUploadFile = Falha ao fazer o upload do bundle
++view_bundle_createWizard_loadBundleFileFailure = N\\\\u00E3o foi poss\\\\u00EDvel obter infoma\\\\u00E7\\\\u00F5es sobre o arquivo de bundle
++view_bundle_createWizard_noAdditionalFilesNeeded = N\\\\u00E3o \\\\u00E9 necess\\\\u00E1rio fazer upload de mais arquivos para este bundle
++view_bundle_createWizard_noBundleTypesAvail = Tipos de bundle n\\\\u00E3o dispon\\\\u00EDveis
++view_bundle_createWizard_noBundleTypesSupported = N\\\\u00E3o h\\\\u00E1 suporte para tipos de bundle - voc\\\\u00EA deve fazer o deploy de um plugin v\\\\u00E1lido para este tipo de implanta\\\\u00E7\\\\u00E3o
++view_bundle_createWizard_provideBundleDistro = Forne\\\\u00E7a um pacote de distribui\\\\u00E7\\\\u00E3o para o Bundle
++view_bundle_createWizard_recipeOption = Script
++view_bundle_createWizard_title = Criar um Bundle
++view_bundle_createWizard_uploadInProgress = Realizando o upload... Esta opera\\\\u00E7\\\\u00E3o pede demorar alguns minutos para arquivos grandes
++view_bundle_createWizard_uploadOption = Upload
++view_bundle_createWizard_uploadStepName = Fa\\\\u00E7a o upload dos arquivos do Bundle
++view_bundle_createWizard_urlOption = URL
++view_bundle_createWizard_windowTitle = Assistente de Cria\\\\u00E7\\\\u00E3o do Bundle
++view_bundle_createWizard_youMustChooseOne = \\\\u00C9 necess\\\\u00E1rio escolher uma op\\\\u00E7\\\\u00E3o para criar um bundle.
++view_bundle_deleteConfirm = Tem certeza que deseja excluir este bundle? Todas as vers\\\\u00F5es, destina\\\\u00E7\\\\u00F5es e implanta\\\\u00E7\\\\u00F5es para este bundle ser\\\\u00E3o exclu\\\\u00EDdas.
++view_bundle_deploy = Deploy
++view_bundle_deployDir = Diret\\\\u00F3rio de Deploy
++view_bundle_deployWizard_deployStep = Implantar o Bundle nas Plataformas de Destino
++view_bundle_deployWizard_deploying = Implantando...
++view_bundle_deployWizard_deploymentCreated = Implanta\\\\u00E7\\\\u00E3o Criada...
++view_bundle_deployWizard_deploymentCreatedDetail = Implanta\\\\u00E7\\\\u00E3o [{0}] com a descri\\\\u00E7\\\\u00E3o [{1}] criada
++view_bundle_deployWizard_deploymentCreatedDetail_concise = Implanta\\\\u00E7\\\\u00E3o [{0}] criada
++view_bundle_deployWizard_deploymentScheduled = Implanta\\\\u00E7\\\\u00E3o do Bundle Agendada!
++view_bundle_deployWizard_deploymentScheduledDetail = Implanta\\\\u00E7\\\\u00E3o do bundle [{0}] agendada para o grupo de destino [{1}]
++view_bundle_deployWizard_deploymentScheduledDetail_concise = Implanta\\\\u00E7\\\\u00E3o do bundle agendada
++view_bundle_deployWizard_destinationCreatedDetail = Destina\\\\u00E7\\\\u00E3o [{0}] criada com a descri\\\\u00E7\\\\u00E3o [{1}]
++view_bundle_deployWizard_destinationCreatedDetail_concise = Destina\\\\u00E7\\\\u00E3o [{0}] criada
++view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel\nFalha ao excluir nova implanta\\\\u00E7\\\\u00E3o durante o cancelamento
++view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)\nFalha ao criar destina\\\\u00E7\\\\u00E3o, talvez ela j\\\\u00E1 exista. (Nota: caso a destina\\\\u00E7\\\\u00E3o j\\\\u00E1 exista fa\\\\u00E7a a implanta\\\\u00E7\\\\u00E3o atrav\\\\u00E9s da vis\\\\u00E3o de Destina\\\\u00E7\\\\u00E3o)
++view_bundle_deployWizard_error_11 = Falha ao encontrar defini\\\\u00E7\\\\u00F5es de implanta\\\\u00E7\\\\u00F5es.
++view_bundle_deployWizard_error_12 = Falha ao encontrar defini\\\\u00E7\\\\u00F5es de bundles.
++view_bundle_deployWizard_error_2 = Falha ao excluir nova destina\\\\u00E7\\\\u00E3o durante o cancelamento
++view_bundle_deployWizard_error_3 = Falha ao agendar implanta\\\\u00E7\\\\u00E3o!
++view_bundle_deployWizard_error_4 = Falha ao agendar a implanta\\\\u00E7\\\\u00E3o: {0}
++view_bundle_deployWizard_error_5 = Falha ao criar a implanta\\\\u00E7\\\\u00E3o!
++view_bundle_deployWizard_error_6 = Falha ao criar a implanta\\\\u00E7\\\\u00E3o: {0}
++view_bundle_deployWizard_error_7 = Falha ao recuperar o nome da implanta\\\\u00E7\\\\u00E3o.
++view_bundle_deployWizard_error_8 = Selecione um grupo de recursos v\\\\u00E1lido da lista
++view_bundle_deployWizard_error_9 = Falha ao excluir a nova destina\\\\u00E7\\\\u00E3o
++view_bundle_deployWizard_error_noBundleConfig = Falha ao obter informa\\\\u00E7\\\\u00F5es sobre o destino do bundle. Verifique se o grupo selecionado \\\\u00E9 um grupo v\\\\u00E1lido de recursos compat\\\\u00EDveis para implanta\\\\u00E7\\\\u00E3o do bundle.
++view_bundle_deployWizard_getConfigSkip = N\\\\u00E3o \\\\u00E9 necess\\\\u00E1rio fornecer configura\\\\u00E7\\\\u00F5es para esta vers\\\\u00E3o do bundle.
++view_bundle_deployWizard_getConfigStep = Definir configura\\\\u00E7\\\\u00E3o da implanta\\\\u00E7\\\\u00E3o.
++view_bundle_deployWizard_getDestStep = Nova Destina\\u00E7\\u00E3o
++view_bundle_deployWizard_getDest_deployDir = Diret\\\\u00F3rio de Deploy
++view_bundle_deployWizard_getDest_deployDir_help = Diret\u00F3rio onde o bundle ser\u00E1 implantado. Este diret\u00F3rio ser\u00E1 o mesmo para todas as implanta\u00E7\u00F5es em todos os recursos, mas o caminho \u00E9 relativo ao diret\u00F3rio raiz definido para a destina\u00E7\u00E3o. Isto significa que o caminho absoluto do diret\u00F3rio pode diferir dependendo do local raiz definido para cada recurso alvo.
++view_bundle_deployWizard_getDest_desc = Descri\\\\u00E7\\\\u00E3o da Destina\\\\u00E7\\\\u00E3o
++view_bundle_deployWizard_getDest_destBaseDirName = Local Raiz
++view_bundle_deployWizard_getDest_group_help = Grupo cujo os membros ser\\u00E3o destinos de todas as implanta\\u00E7\\u00F5es de bundle. Somente grupos de recursos compat\\u00EDveis com suporte a implanta\\u00E7\\u00F5s de bundle podem ser selecionados.
++view_bundle_deployWizard_getDest_name = Nome da Destina\\u00E7\\u00E3o
++view_bundle_deployWizard_getDest_name_help = O nome da destina\\u00E7\\u00E3o que ser\\u00E1 utilizado para identificar um grupo espec\\u00EDfico de recursos bem como o diret\\u00F3rio de destino para determinado bundle.
++view_bundle_deployWizard_getInfoStep = Forne\\u00E7a as informa\\u00E7\\u00F5es referente a implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_getInfo_clean = Limpar Implanta\\u00E7\\u00E3o? (apaga o conte\\u00FAdo do diret\\u00F3rio de deploy na plataforma de destino)
++view_bundle_deployWizard_getInfo_deploymentDesc = Descri\\u00E7\\u00E3o da Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_getInfo_deploymentName = Nome da Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_getOptionsStep = Op\\u00E7\\u00F5es de Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_getOptions_deployLater = Implantar mais tarde
++view_bundle_deployWizard_getOptions_deployNow = Implantar agora
++view_bundle_deployWizard_getOptions_deployTime = Tempo de Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_selectBundleStep = Selecione o Bundle para Implanta\\u00E7\\u00E3o
++view_bundle_deployWizard_selectBundle_single = Selecione apenas um bundle para implanta\\u00E7\\u00E3o.
++view_bundle_deployWizard_selectVersionStep = Selecione a vers\\u00E3o da implanta\\u00E7\\u00E3o do Bundle
++view_bundle_deployWizard_selectVersion_latest = \\u00DAltima vers\\u00E3o [{0}]
++view_bundle_deployWizard_selectVersion_live = Vers\\u00E3o atual [{0}]
++view_bundle_deployWizard_selectVersion_select = Selecione uma vers\\u00E3o espec\\u00EDfica da lista:
++view_bundle_deployWizard_title = Assitente de Implanta\\u00E7\\u00E3o
++view_bundle_deploy_action = A\\\\u00E7\\\\u00E3o
++view_bundle_deploy_backButton = Retornar \\\\u00E0 destina\\\\u00E7\\\\u00E3o
++view_bundle_deploy_clickForError = Clique no \\\\u00EDcone para visualizar a mensagem de erro
++view_bundle_deploy_deleteConfirm = Tem certeza que deseja excluir esta implanta\\\\u00E7\\\\u00E3o do bundle?
++view_bundle_deploy_deleteFailure = Falha do excluir a implanta\\\\u00E7\\\\u00E3o do bundle [{0}]
++view_bundle_deploy_deleteSuccessful = Implanta\\\\u00E7\\\\u00E3o do bundle [{0}] exclu\\\\u00EDda com sucesso
++view_bundle_deploy_deployedBy = Implatando por
++view_bundle_deploy_deploymentPlatforms = Recurso de implanta\\\\u00E7\\\\u00E3o
++view_bundle_deploy_installDetails = Detalhes de instala\\\\u00E7\\\\u00E3o
++view_bundle_deploy_loadBundleFailure = Falha ao encontrar o bundle
++view_bundle_deploy_loadDeployFailure = Falha ao carregar as implanta\\\\u00E7\\\\u00F5es do bundle
++view_bundle_deploy_loadFailure = Falha ao carregar a implanta\\\\u00E7\\\\u00E3o do bundle
++view_bundle_deploy_name = Nome da Implanta\\\\u00E7\\\\u00E3o
++view_bundle_deploy_selectARow = Selecione um linha para apresentar os detalhes da instala\\\\u00E7\\\\u00E3o
++view_bundle_deploy_tagUpdateFailure = Falha ao atualizar as tags para a implanta\\\\u00E7\\\\u00E3o do bundle
++view_bundle_deploy_tagUpdateSuccessful = Tags ataulizadas com sucesso
++view_bundle_deploy_time = Tempo de implanta\\\\u00E7\\\\u00E3o
++view_bundle_deployed = Implantado
++view_bundle_deployments = Implanta\\u00E7\\u00F5es
++view_bundle_dest_backToBundle = Retonar ao Bundle
++view_bundle_dest_baseDirName = Local Raiz
++view_bundle_dest_created = Criado
++view_bundle_dest_deleteConfirm = Tem certeza de que deseja excluir esta destina\u00E7\u00E3o? Esta opera\u00E7\u00E3o apenas exclui a destina\u00E7\u00E3o do banco de dados; todo o conte\u00FAdo implantado anteriormente atrav\u00E9s do bundle nesta destina\u00E7\u00E3o em plataformas remotas permanece inalterado.
++view_bundle_dest_deleteFailure = Falha ao excluir a destina\u00E7\u00E3o [{0}]
++view_bundle_dest_deleteSuccessful = Destina\u00E7\u00E3o [{0}] exclu\u00EDda com sucesso!
++view_bundle_dest_deployDir = Diret\u00F3rio de Deploy
++view_bundle_dest_group = Grupo
++view_bundle_dest_lastDeployedVersion = \u00DAltima vers\u00E3o implantada
++view_bundle_dest_lastDeploymentDate = \u00DAltima data de implanta\u00E7\u00E3o
++view_bundle_dest_lastDeploymentStatus = \u00DAltimo status de implanta\u00E7\u00E3o
++view_bundle_dest_loadFailure = Falha ao carregar as destina\u00E7\u00F5es de Bundle
++view_bundle_dest_loadFailureVersionInfo = Falha ao carregar as informa\u00E7o\u1EBDs sobre vers\u00F5es de destina\u00E7\u00E3o de bundle
++view_bundle_dest_purgeConfirm = Esta opera\u00E7\u00E3o remove o conte\u00FAdo do bundle de todas as m\u00E1quinas remotas. Tem certeza de deseja fazer isto?
++view_bundle_dest_purgeFailure = Falha ao tentar limpar a destina\u00E7\u00E3o [{0}] em algumas ou todas as m\u00E1quinas remotas.
++view_bundle_dest_purgeSuccessful = Limpeza da destina\u00E7\u00E3o [{0}] realizada com sucesso em todas as m\u00E1quinas remotas.
++view_bundle_dest_revertConfirm = Esta opera\u00E7\u00E3o reverte todas as m\u00E1quinas remotas para a implanta\u00E7\u00E3o anterior deste bundle. Tem certeza de que deseja fazer isto?
++view_bundle_dest_tagUpdateFailure = Falha ao atualizar as tags para esta destina\u00E7\u00E3o
++view_bundle_dest_tagUpdateSuccessful = Tags atualizadas com sucesso para esta destina\u00E7\u00E3o!
++view_bundle_destinations = Destina\u00E7\u00F5es
++view_bundle_fileListView_fileSize = Tamanho do Arquivo
++view_bundle_fileListView_loadFailure = Falha ao carregar dados do arquivo de bundle
view_bundle_fileListView_md5 = MD5
view_bundle_fileListView_sha256 = SHA256
--view_bundle_files = Files~
--view_bundle_latestVersion = Latest Version~
--view_bundle_list_backToAll = Back to All Bundles~
--view_bundle_list_deleteConfirm = Are you sure you want to delete this bundle?~
--view_bundle_list_deleteFailure = Failed to delete the bundle [{0}]~
--view_bundle_list_deleteSuccessful = You successfully deleted the bundle named [{0}]~
--view_bundle_list_deletesFailure = Failed to delete the bundles
--view_bundle_list_deletesSuccessful = You successfully deleted the bundles
--view_bundle_list_destinationsCount = Destinations Count~
--view_bundle_list_error1 = Failed to load bundle to deploy [{0}]~
--view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]~
--view_bundle_list_error3 = Failed to load bundle~
--view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]~
--view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data~
--view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]~
--view_bundle_list_tagUpdateFailure = Failed to update bundle tags~
--view_bundle_list_tagUpdateSuccessful = You have successfully updated the bundle tags~
--view_bundle_list_versionsCount = Versions Count~
--view_bundle_purge = Purge
--view_bundle_recipe = Recipe~
--view_bundle_resDeployDS_loadFailure = Failed to load bundle resource deployments~
--view_bundle_revert = Revert~
--view_bundle_revertWizard_confirmStep_confirmation = Reverting Live Deployment to Previous Deployment. Click "Next" to continue...~
--view_bundle_revertWizard_confirmStep_failedToFindLiveDeployment = Failed to find live deployment; cannot revert~
--view_bundle_revertWizard_confirmStep_liveDeployment = Live Deployment~
--view_bundle_revertWizard_confirmStep_name = Revert Deployment Confirmation~
--view_bundle_revertWizard_confirmStep_noLiveDeployment = No live deployment was found for the destination [{0}]~
--view_bundle_revertWizard_confirmStep_noLiveDeployment_concise = No live deployment was found for the destination
--view_bundle_revertWizard_confirmStep_noPriorDeployment = The live deployment [{0}] cannot be reverted because there is no prior deployment for the destination [{1}]~
--view_bundle_revertWizard_confirmStep_noPriorDeployment_concise = The live deployment cannot be reverted because there is no prior deployment
--view_bundle_revertWizard_confirmStep_prevDeployment = Previous Deployment~
--view_bundle_revertWizard_getInfoStep_cleanDeploy = Clean Deployment? (this will delete an old, existing deploy directory prior to starting the revert deployment)~
--view_bundle_revertWizard_getInfoStep_getNameFailure = Failed to get revert deployment name~
--view_bundle_revertWizard_getInfoStep_name = Provide Revert Information~
--view_bundle_revertWizard_getInfoStep_revertDeployDesc = Revert Deploy Description~
--view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From]\\n{0}\\n\\n[REVERT To]\\n{1}~
--view_bundle_revertWizard_getInfoStep_revertDeployName = Revert Deploy Name~
--view_bundle_revertWizard_revertStep_name = Deploy Bundle to Destination Platforms~
--view_bundle_revertWizard_revertStep_reverting = Reverting...~
--view_bundle_revertWizard_revertStep_scheduled = You have successfully scheduled the revert deployment!~
--view_bundle_revertWizard_revertStep_scheduledDetails = You have successfully scheduled to revert the bundle deployment [{0}] from resource group [{1}]~
--view_bundle_revertWizard_revertStep_scheduledFailure = Failed to schedule revert deployment!~
--view_bundle_revertWizard_title = Bundle Revert~
--view_bundle_revertWizard_windowTitle = Bundle Revert Wizard~
--view_bundle_tree_loadFailure = Failed to load bundle data~
--view_bundle_version_backToBundle = Back to Bundle~
--view_bundle_version_bundleVersionTagUpdateFailure = Failed to update bundle version tags~
--view_bundle_version_bundleVersionTagUpdateSuccessful = You have successfully updated the bundle version tags~
--view_bundle_version_deleteConfirm = Are you sure you want to delete this bundle version?
--view_bundle_version_deleteFailure = Failed to delete the bundle version [{0}]
--view_bundle_version_deleteSuccessful = You successfully deleted the bundle version [{0}]
--view_bundle_version_loadFailure = Failed to load bundle version~
--view_bundle_versions = Versions~
++view_bundle_files = Arquivos
++view_bundle_latestVersion = \u00DAltima Vers\u00E3o
++view_bundle_list_backToAll = Retornar todos os Bundles
++view_bundle_list_deleteConfirm = Tem certeza de que deseja excluir este Bundle?
++view_bundle_list_deleteFailure = Falha ao excluir o bundle [{0}]
++view_bundle_list_deleteSuccessful = O Bundle chamado [{0}] foi exclu\u00EDdo com sucesso!
++view_bundle_list_deletesFailure = Falha ao exlcuir os bundles
++view_bundle_list_deletesSuccessful = Bundles exclu\u00EDdos com sucesso!
++view_bundle_list_destinationsCount = Soma das Destina\u00E7\u00F5es
++view_bundle_list_error1 = Falha ao carregar bundle [{0}] para implantar
++view_bundle_list_error2 = Falha ao obter um \u00FAnico bundle [{0}] para deploy
++view_bundle_list_error3 = Falha ao carregar o bundle
++view_bundle_list_loadFailure = Falha ao carregar o bundle [{0}] para ser implantado
++view_bundle_list_loadWithLatestFailure = Falha ao carregar o bundle com os dados da \u00FAltima vers\u00E3o
++view_bundle_list_singleLoadFailure = Falha ao obter um \u00FAnico bundle [{0}] para ser implantado
++view_bundle_list_tagUpdateFailure = Falha ao atualizar as tags do bundle
++view_bundle_list_tagUpdateSuccessful = Tags do bundle atualizadas com sucesso!
++view_bundle_list_versionsCount = Soma das Vers\u00F5es
++view_bundle_purge = Limpar
++view_bundle_recipe = Script
++view_bundle_resDeployDS_loadFailure = Falha ao carregar as informa\u00E7oes sobre as implanta\u00E7\u00F5es do bundle
++view_bundle_revert = Reverter
++view_bundle_revertWizard_confirmStep_confirmation = Revertendo a implanta\u00E7\u00E3o ativa para a atenterior. Clique em "Next" para continuar...
++view_bundle_revertWizard_confirmStep_failedToFindLiveDeployment = Falha ao encontrar a implanta\u00E7\u00E3o ativa. N\u00E3o foi poss\u00EDvel realizar a revers\u00E3o.
++view_bundle_revertWizard_confirmStep_liveDeployment = Implanta\u00E7\u00E3o ativa.
++view_bundle_revertWizard_confirmStep_name = Confirma\u00E7\u00E3o de Revers\u00E3o da implanta\u00E7\u00E3o
++view_bundle_revertWizard_confirmStep_noLiveDeployment = Nenhuma implanta\u00E7\u00E3o ativa foi encontrada para destina\u00E7\u00E3o [{0}]
++view_bundle_revertWizard_confirmStep_noLiveDeployment_concise = Nenhuma implanta\u00E7\u00E3o ativa foi encontrada para esta destina\u00E7\u00E3o.
++view_bundle_revertWizard_confirmStep_noPriorDeployment = A implanta\u00E7\u00E3o ativa [{0}] n\u00E3o pode ser revertida porque n\u00E3o existe uma implanta\u00E7\u00E3o anterior para a destina\u00E7\u00E3o [{1}]
++view_bundle_revertWizard_confirmStep_noPriorDeployment_concise = A implanta\u00E7\u00E3o ativa n\u00E3o pode ser revertida porque n\u00E3o existe uma anterior
++view_bundle_revertWizard_confirmStep_prevDeployment = Implanta\u00E7\u00E3o Anterior
++view_bundle_revertWizard_getInfoStep_cleanDeploy = Limpar a Implanta\u00E7\u00E3o? (esta opera\u00E7\u00E3o excluir\u00E1 qualquer diret\u00F3rio de deploy existente antes de iniciar a revers\u00E3o da implanta\u00E7\u00E3o)
++view_bundle_revertWizard_getInfoStep_getNameFailure = Falha ao obter o nome da implanta\u00E7\u00E3o de revers\u00E3o
++view_bundle_revertWizard_getInfoStep_name = Forne\u00E7a as informes para revers\u00E3o
++view_bundle_revertWizard_getInfoStep_revertDeployDesc = Descri\u00E7\u00E3o da implanta\u00E7\u00E3o de revers\u00E3o
++view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERTER de]\\\\\\\\\n{0}\\\\\\\\\n\\\\\\\\\n[REVERTER PARA]\\\\\\\\\n{1}
++view_bundle_revertWizard_getInfoStep_revertDeployName = Nome da Implanta\u00E7\u00E3o de Revers\u00E3o
++view_bundle_revertWizard_revertStep_name = Implantar Bundle nas Plataformas de Destino
++view_bundle_revertWizard_revertStep_reverting = Revertendo...
++view_bundle_revertWizard_revertStep_scheduled = Revers\u00E3o de implanta\u00E7\u00E3o agendada com sucesso!
++view_bundle_revertWizard_revertStep_scheduledDetails = Revers\u00E3o da implanta\u00E7\u00E3o [{0}] para o grupo de recursos [{1}] agendada com sucesso!
++view_bundle_revertWizard_revertStep_scheduledFailure = Falha ao agendar a revers\u00E3o da implanta\u00E7\u00E3o!
++view_bundle_revertWizard_title = Revers\u00E3o do Bundle
++view_bundle_revertWizard_windowTitle = Assistente de revers\u00E3o do Bundle
++view_bundle_tree_loadFailure = Falha ao carregar dados do Bundle
++view_bundle_version_backToBundle = Retornar ao Bundle
++view_bundle_version_bundleVersionTagUpdateFailure = Falha ao atualizar as tags da vers\u00E3o do bundle
++view_bundle_version_bundleVersionTagUpdateSuccessful = Tags da vers\u00E3o do bundle atualizadas com sucesso!
++view_bundle_version_deleteConfirm = Tem certeza de que deseja excluir est\u00E1 vers\u00E3o do bundle?
++view_bundle_version_deleteFailure = Falha ao excluir a vers\u00E3o [{0}] do bundle
++view_bundle_version_deleteSuccessful = Vers\u00E3o [{0}] do bundle exclu\u00EDda com sucesso!
++view_bundle_version_loadFailure = Falha ao carregar a vers\u00E3o do Bundle
++view_bundle_versions = Vers\u00F5es
view_configCompare_comparingConfigs = Comparando Configura\u00E7\u00F5es
view_configCompare_configCompare = Compara\u00E7\u00E3o de Configura\u00E7\u00F5es
view_configEdit_addItem = Adicionar Item \u00E0 Lista
@@@ -1071,137 -1078,165 +1083,164 @@@ view_configEdit_msg_4 = Item adicionad
view_configEdit_properties = Propriedades
view_configEdit_tooltip_1 = Remove os itens selecionados da lista.
view_configEdit_tooltip_2 = Adiciona um item \u00E0 lista.
--view_configEdit_viewRow = View Row
--view_configurationDetails_allPropertiesValid = All configuration properties have valid values, so the configuration can now be saved.~
--view_configurationDetails_configNotUpdatedDueToNoChange = Configuration was not updated, since the new configuration is equivalent to the current configuration.
--view_configurationDetails_error_updateFailure = Failed to update configuration.~
--view_configurationDetails_messageConcise = Configuration updated - current version is {0}.~
--view_configurationDetails_messageDetailed = Configuration updated to version {0} for Resource [{1}].
--view_configurationDetails_noPermission = You do not have permission to edit this Resource''s configuration.~
--view_configurationDetails_somePropertiesInvalid = The following configuration properties have invalid values: {0}. The values must be corrected before the configuration can be saved.~
--view_configurationHistoryDetails_dialogTitle = Configuration Details~
--view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.~
--view_configurationHistoryList_cannotDeleteCurrent = One of the selected history items represents the current configuration - you cannot delete it.
- view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. \
- view_configurationHistoryList_delete_failure = Failed to delete the configuration history items.
- view_configurationHistoryList_delete_success = You successfully deleted the selected configuration history items.
- view_configurationHistoryList_itemNamePlural = configuration history items
- view_configurationHistoryList_rollback = Rollback
- view_configurationHistoryList_rollback_failure = Failed to rollback the configuration. The original configuration is still in effect.
- view_configurationHistoryList_rollback_success = You successfully rolled back the configuration to the selected past configuration.
- view_configurationHistoryList_table_clickStatusIcon = Click the status icon for full details
- view_configurationHistoryList_table_statusFailure = This configuration update failed
- view_configurationHistoryList_table_statusInprogress = This configuration update is still in progress
- view_configurationHistoryList_table_statusNochange = No changes were made to this configuration
- view_configurationHistoryList_table_statusSuccess = This configuration update was successful
- view_configurationHistoryList_title = Configuration History~
- view_connectionSettingsDetails_allPropertiesValid = All connection settings have valid values, so the settings can now be saved.~
- view_connectionSettingsDetails_error_updateFailure = Failed to update connection settings.~
- view_connectionSettingsDetails_messageConcise_updateSuccess = Connection settings updated.~
- view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings updated for Resource [{0}].~
- view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.~
- view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.~
- view_core_error_1 = Falha ao perquisar novos alertas~
- view_core_loggedInAs = Logado como {0}~
- view_core_loggedOut = Logged out~
- view_core_noRecentAlerts = There are no recent alerts to report
- view_core_recentAlerts = [{0}] alertas recentes~
- view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada~
- view_dashboardManager_deleteFail = Failed to delete dashboard.
- view_dashboardManager_deleted = Successfully deleted dashboard {0}~
- view_dashboardManager_error = Failed to save dashboard to server~
- view_dashboardManager_saved = Saved dashboard {0} to server~
- view_dashboardManager_success = Saved dashboard~
- view_dashboard_favorites_error1 = Failed to load favorite Resources.~
- view_dashboardsManager_error1 = Failed to add new dashboard~
- view_dashboardsManager_inventory_title = Inventory Summary~
- view_dashboardsManager_mashup_title = RHQ News~
- view_dashboardsManager_message_title = Welcome To RHQ~
- view_dashboardsManager_message_title_details = <h1>Welcome to RHQ</h1>\n<p>The RHQ project is an abstraction and plug-in based systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features. The project is designed with layered modules that provide a flexible architecture for deployment. It delivers a core user interface that delivers audited and historical management across an entire enterprise. A Server/Agent architecture provides remote management and plugins implement all specific support for managed products.</p>\n <p>This default dashboard can be edited by clicking the (edit mode) button above.</p>~
- view_dashboardsManager_tagcloud_title = Tag Cloud~
- view_dashboards_confirm1 = Are you sure you want to delete~
- view_dashboards_portlets_refresh_fail1 = Failed to update interval for portlets that auto-refresh
- view_dashboards_portlets_refresh_fail2 = Failed to disable reload for portlets that auto-refresh
- view_dashboards_portlets_refresh_multiple_min = {0} minutes
- view_dashboards_portlets_refresh_none = No Refresh
- view_dashboards_portlets_refresh_one_min = 1 minute
- view_dashboards_portlets_refresh_success1 = Updated interval for portlets that auto-refresh
- view_dashboards_portlets_refresh_success2 = Stopping reload for portlets that auto-refresh
- view_dashboards_title = Dashboard~
- view_dynagroup_children = DynaGroup Children~
- view_dynagroup_compatible = Compatible
- view_dynagroup_definitionAlreadyExists = A group definition already exists with this name~
- view_dynagroup_definitionCreated = You have successfully created a group definition named [{0}]~
- view_dynagroup_definitionLoadFailure = Failed to load group definitions~
- view_dynagroup_definitions = DynaGroup Definitions~
- view_dynagroup_deleteFailureSelection = Failed to delete the selected group definitions~
- view_dynagroup_deleteSuccessfulSelection = You have successfully deleted [{0}] group definitions~
- view_dynagroup_editing = Editing [{0}]~
- view_dynagroup_exprBuilder_addExpression = Add Expression
- view_dynagroup_exprBuilder_comparisonType = Comparison Type
- view_dynagroup_exprBuilder_comparisonType_contains = contains
- view_dynagroup_exprBuilder_comparisonType_endsWith = ends with
- view_dynagroup_exprBuilder_comparisonType_equals = equals
- view_dynagroup_exprBuilder_comparisonType_startsWith = starts with
- view_dynagroup_exprBuilder_comparisonType_tooltip = Comparison Type
- view_dynagroup_exprBuilder_definingPlugin = Defining Plugin
- view_dynagroup_exprBuilder_definingPlugin_tooltip = The plugin to search
- view_dynagroup_exprBuilder_expression = Expression
- view_dynagroup_exprBuilder_expressionType = Expression Type
- view_dynagroup_exprBuilder_expressionType_pluginConfig = Plugin Configuration
- view_dynagroup_exprBuilder_expressionType_resource = Resource
- view_dynagroup_exprBuilder_expressionType_resourceCategory = Resource Category
- view_dynagroup_exprBuilder_expressionType_resourceConfig = Resource Configuration
- view_dynagroup_exprBuilder_expressionType_resourceType = Resource Type
- view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on\:<br/> <b>Resource</b>\: A resource property such as its name or version<br/> <b>Resource Type</b>\: Search for resources of a specific type<br/> <b>Resource Category</b>\: Search for resources by category\: platform, server, service<br/> <b>Trait</b>\: Resources that have selected values for a monitored trait<br/> <b>Plugin Configuration</b>\: Search by the plugin component configuration setting of the component<br/> <b>Resource Configuration</b>\: Search by the configuration setting of the managed resource
- view_dynagroup_exprBuilder_expressionType_trait = Trait
- view_dynagroup_exprBuilder_expression_tooltip = This is the full expression that is represented by the selections in the form below. This text will be added to your group definition expression text when you click the "Add Expression" button.
- view_dynagroup_exprBuilder_groupBy = Group by
- view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy will cause the system to pivot on the values from the entered expressions creating a separate group for each value. For example, GroupBy on the cluster name to create a group for each cluster with all cluster members in it.
- view_dynagroup_exprBuilder_noPlugins = --No plugins--
- view_dynagroup_exprBuilder_noProperties = --No properties--
- view_dynagroup_exprBuilder_noResourceTypes = --No resource types--
- view_dynagroup_exprBuilder_pluginLoadFailure = Cannot get the list of plugins
- view_dynagroup_exprBuilder_propLoadFailure = Cannot get list of properties
- view_dynagroup_exprBuilder_propertyName = Property Name
- view_dynagroup_exprBuilder_propertyName_tooltip = The name of the property to query. This is defined by the expression type as well as the resource type.
- view_dynagroup_exprBuilder_resTypeLoadFailure = Cannot get list of resource types for plugin [{0}]
- view_dynagroup_exprBuilder_resource = Resource
- view_dynagroup_exprBuilder_resourceType = Resource Type
- view_dynagroup_exprBuilder_resourceType_tooltip = The type of resource
- view_dynagroup_exprBuilder_resource_child = Child
- view_dynagroup_exprBuilder_resource_grandparent = Grandparent
- view_dynagroup_exprBuilder_resource_greatGrandparent = GreatGrandparent
- view_dynagroup_exprBuilder_resource_greatGreatGrandparent = GreatGreatGrandparent
- view_dynagroup_exprBuilder_resource_parent = Parent
- view_dynagroup_exprBuilder_resource_resource = Resource
- view_dynagroup_exprBuilder_resource_tooltip = Choose the level of the resource you wish to select. For example, select "parent" will find resources whose parent resource matches the rest of the expression.
- view_dynagroup_exprBuilder_title = Expression Builder
- view_dynagroup_exprBuilder_unset = Unset
- view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the " = " operator because of how databases store and query data.
- view_dynagroup_exprBuilder_value_tooltip = The string value for the expression to query
- view_dynagroup_expression = Expression~
- view_dynagroup_expressionBuilderIconTooltip = Expression Builder...
- view_dynagroup_expressionSet = Expression Set~
- view_dynagroup_lastCalculationTime = Last Calculation Time~
- view_dynagroup_loadDefinitionFailure = Failed to load group definition [{0}]~
- view_dynagroup_loadDefinitionMissing = There is no group definition with the ID of [{0}]~
- view_dynagroup_mixed = Mixed
- view_dynagroup_newGroupDefinition = New Group Definition~
- view_dynagroup_nextCalculationTime = Next Calculation Time~
- view_dynagroup_permDenied = You do not have permission to view group definitions~
- view_dynagroup_permUnknown = Could not determine if you have the proper permissions - access is denied~
- view_dynagroup_recalcFailure = Failed to recalculated this group definition~
- view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions~
- view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition~
- view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions~
- view_dynagroup_recalculate = Recalculate~
- view_dynagroup_recalculationInterval = Recalculation Interval~
- view_dynagroup_recursive = Recursive~
- view_dynagroup_saveAndRecalculate = Save & Recalculate~
- view_dynagroup_saveFailure = Failed to save the group definition named [{0}]~
- view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]~
- view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created~
-view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. view_configurationHistoryList_delete_failure = Failed to delete the configuration history items.
-view_configurationHistoryList_delete_success = You successfully deleted the selected configuration history items.
-view_configurationHistoryList_itemNamePlural = configuration history items
-view_configurationHistoryList_rollback = Rollback
-view_configurationHistoryList_rollback_failure = Failed to rollback the configuration. The original configuration is still in effect.
-view_configurationHistoryList_rollback_success = You successfully rolled back the configuration to the selected past configuration.
-view_configurationHistoryList_table_clickStatusIcon = Click the status icon for full details
-view_configurationHistoryList_table_statusFailure = This configuration update failed
-view_configurationHistoryList_table_statusInprogress = This configuration update is still in progress
-view_configurationHistoryList_table_statusNochange = No changes were made to this configuration
-view_configurationHistoryList_table_statusSuccess = This configuration update was successful
-view_configurationHistoryList_title = Configuration History~
-view_connectionSettingsDetails_allPropertiesValid = All connection settings have valid values, so the settings can now be saved.~
-view_connectionSettingsDetails_error_updateFailure = Failed to update connection settings.~
-##view_connectionSettingsDetails_messageConcise_updateSuccess = Connection settings updated.~
-##view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings updated for Resource [{0}].~
-view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.~
-view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.~
-view_core_error_1 = Falha ao perquisar novos alertas~
-view_core_loggedInAs = Logado como {0}~
-view_core_loggedOut = Logged out~
-view_core_noRecentAlerts = There are no recent alerts to report
-view_core_recentAlerts = [{0}] alertas recentes~
-view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada~
-view_dashboardManager_deleteFail = Failed to delete dashboard.
-view_dashboardManager_deleted = Successfully deleted dashboard {0}~
-view_dashboardManager_error = Failed to save dashboard to server~
-view_dashboardManager_saved = Saved dashboard {0} to server~
-view_dashboardManager_success = Saved dashboard~
-view_dashboard_favorites_error1 = Failed to load favorite Resources.~
-view_dashboardsManager_error1 = Failed to add new dashboard~
-view_dashboardsManager_inventory_title = Inventory Summary~
-view_dashboardsManager_mashup_title = RHQ News~
-view_dashboardsManager_message_title = Welcome To RHQ~
-view_dashboardsManager_message_title_details = <h1>Welcome to RHQ</h1>\n<p>The RHQ project is an abstraction and plug-in based systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features. The project is designed with layered modules that provide a flexible architecture for deployment. It delivers a core user interface that delivers audited and historical management across an entire enterprise. A Server/Agent architecture provides remote management and plugins implement all specific support for managed products.</p>\n <p>This default dashboard can be edited by clicking the (edit mode) button above.</p>~
-view_dashboardsManager_tagcloud_title = Tag Cloud~
-view_dashboards_confirm1 = Are you sure you want to delete~
-view_dashboards_portlets_refresh_fail1 = Failed to update interval for portlets that auto-refresh
-view_dashboards_portlets_refresh_fail2 = Failed to disable reload for portlets that auto-refresh
-view_dashboards_portlets_refresh_multiple_min = {0} minutes
-view_dashboards_portlets_refresh_none = No Refresh
-view_dashboards_portlets_refresh_one_min = 1 minute
-view_dashboards_portlets_refresh_success1 = Updated interval for portlets that auto-refresh
-view_dashboards_portlets_refresh_success2 = Stopping reload for portlets that auto-refresh
-view_dashboards_title = Dashboard~
-##view_drift_button_detectNow = Detect Now
-##view_drift_category_fileAdded = File Added
-##view_drift_category_fileChanged = File Changed
-##view_drift_category_fileRemoved = File Removed
-##view_drift_delete_confirm = Delete the selected drift(s)?
-##view_drift_delete_confirmAll = Delete all drifts from this source?
-##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
-##view_drift_failure_deleteAll = Failed to delete all drift targets from this source
-##view_drift_failure_detectNow = Failed to submit drift detection request
-##view_drift_failure_load = Failed to fetch drift data
-##view_drift_success_configurationUpdated = Drift configuration updated. File coverage will be updated on next detection scan.
-##view_drift_success_delete = Successfully deleted {0} drifts
-##view_drift_success_deleteConfigs = Successfully deleted {0} drift configurations
-##view_drift_success_detectNow = Successfully submitted drift detection request
-##view_drift_table_baseDir = Base Directory
-##view_drift_table_newFile = New File
-##view_drift_table_oldFile = Old File
-view_drift_table_resourceConfig = Resource Drift Configuration
-##view_drift_table_resourceHistory = Resource Drift History
-##view_drift_wizard_addConfig_failure = Failed to add new drift configuration [{0}]
-##view_drift_wizard_addConfig_infoStepName = Provide Drift Detection Information
-##view_drift_wizard_addConfig_nameHelp = A textual name briefly describing the purpose of this drift detection configuration. Drift configuration names must be unique for a resource.
-##view_drift_wizard_addConfig_namePrompt = New Drift Configuration Name
-##view_drift_wizard_addConfig_success = Successfully added new drift configuration [{0}]. Agent(s) will be updated.
-##view_drift_wizard_addConfig_templateHelp = Each drift configuration describes a set of files for which drift detection can be performed. The configuration can be enabled and disabled, defines the detection interval, and specifies a base directory and optional file filters. For each resource type offering drift detection there will be one or more predefined templates to use a starting configuration, which can then be edited.
-##view_drift_wizard_addConfig_templatePrompt = Drift Configuration Templates
-##view_drift_wizard_addConfig_title = Add Drift Configuration for Resource of Type [{0}]
-##view_drift_wizard_addConfig_windowTitle = Drift Add Configuration Wizard
-view_dynagroup_children = DynaGroup Children~
-view_dynagroup_compatible = Compatible
-view_dynagroup_definitionAlreadyExists = A group definition already exists with this name~
-view_dynagroup_definitionCreated = You have successfully created a group definition named [{0}]~
-view_dynagroup_definitionLoadFailure = Failed to load group definitions~
-view_dynagroup_definitions = DynaGroup Definitions~
-view_dynagroup_deleteFailureSelection = Failed to delete the selected group definitions~
-view_dynagroup_deleteSuccessfulSelection = You have successfully deleted [{0}] group definitions~
-view_dynagroup_editing = Editing [{0}]~
-view_dynagroup_exprBuilder_addExpression = Add Expression
-view_dynagroup_exprBuilder_comparisonType = Comparison Type
-view_dynagroup_exprBuilder_comparisonType_contains = contains
-view_dynagroup_exprBuilder_comparisonType_endsWith = ends with
-view_dynagroup_exprBuilder_comparisonType_equals = equals
-view_dynagroup_exprBuilder_comparisonType_startsWith = starts with
-view_dynagroup_exprBuilder_comparisonType_tooltip = Comparison Type
-view_dynagroup_exprBuilder_definingPlugin = Defining Plugin
-view_dynagroup_exprBuilder_definingPlugin_tooltip = The plugin to search
-view_dynagroup_exprBuilder_expression = Expression
-view_dynagroup_exprBuilder_expressionType = Expression Type
-view_dynagroup_exprBuilder_expressionType_pluginConfig = Plugin Configuration
-view_dynagroup_exprBuilder_expressionType_resource = Resource
-view_dynagroup_exprBuilder_expressionType_resourceCategory = Resource Category
-view_dynagroup_exprBuilder_expressionType_resourceConfig = Resource Configuration
-view_dynagroup_exprBuilder_expressionType_resourceType = Resource Type
-view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on:<br/> <b>Resource</b>: A resource property such as its name or version<br/> <b>Resource Type</b>: Search for resources of a specific type<br/> <b>Resource Category</b>: Search for resources by category: platform, server, service<br/> <b>Trait</b>: Resources that have selected values for a monitored trait<br/> <b>Plugin Configuration</b>: Search by the plugin component configuration setting of the component<br/> <b>Resource Configuration</b>: Search by the configuration setting of the managed resource
-view_dynagroup_exprBuilder_expressionType_trait = Trait
-view_dynagroup_exprBuilder_expression_tooltip = This is the full expression that is represented by the selections in the form below. This text will be added to your group definition expression text when you click the "Add Expression" button.
-view_dynagroup_exprBuilder_groupBy = Group by
-view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy will cause the system to pivot on the values from the entered expressions creating a separate group for each value. For example, GroupBy on the cluster name to create a group for each cluster with all cluster members in it.
-view_dynagroup_exprBuilder_noPlugins = --No plugins--
-view_dynagroup_exprBuilder_noProperties = --No properties--
-view_dynagroup_exprBuilder_noResourceTypes = --No resource types--
-view_dynagroup_exprBuilder_pluginLoadFailure = Cannot get the list of plugins
-view_dynagroup_exprBuilder_propLoadFailure = Cannot get list of properties
-view_dynagroup_exprBuilder_propertyName = Property Name
-view_dynagroup_exprBuilder_propertyName_tooltip = The name of the property to query. This is defined by the expression type as well as the resource type.
-view_dynagroup_exprBuilder_resTypeLoadFailure = Cannot get list of resource types for plugin [{0}]
-view_dynagroup_exprBuilder_resource = Resource
-view_dynagroup_exprBuilder_resourceType = Resource Type
-view_dynagroup_exprBuilder_resourceType_tooltip = The type of resource
-view_dynagroup_exprBuilder_resource_child = Child
-view_dynagroup_exprBuilder_resource_grandparent = Grandparent
-view_dynagroup_exprBuilder_resource_greatGrandparent = GreatGrandparent
-view_dynagroup_exprBuilder_resource_greatGreatGrandparent = GreatGreatGrandparent
-view_dynagroup_exprBuilder_resource_parent = Parent
-view_dynagroup_exprBuilder_resource_resource = Resource
-view_dynagroup_exprBuilder_resource_tooltip = Choose the level of the resource you wish to select. For example, select "parent" will find resources whose parent resource matches the rest of the expression.
-##view_dynagroup_exprBuilder_savedExpression = Saved Expression
-view_dynagroup_exprBuilder_title = Expression Builder
-view_dynagroup_exprBuilder_unset = Unset
-view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the " = " operator because of how databases store and query data.
-view_dynagroup_exprBuilder_value_tooltip = The string value for the expression to query
-view_dynagroup_expression = Expression~
-view_dynagroup_expressionBuilderIconTooltip = Expression Builder...
-view_dynagroup_expressionSet = Expression Set~
-view_dynagroup_lastCalculationTime = Last Calculation Time~
-view_dynagroup_loadDefinitionFailure = Failed to load group definition [{0}]~
-view_dynagroup_loadDefinitionMissing = There is no group definition with the ID of [{0}]~
-view_dynagroup_mixed = Mixed
-view_dynagroup_newGroupDefinition = New Group Definition~
-view_dynagroup_nextCalculationTime = Next Calculation Time~
-view_dynagroup_permDenied = You do not have permission to view group definitions~
-view_dynagroup_permUnknown = Could not determine if you have the proper permissions - access is denied~
-view_dynagroup_recalcFailure = Failed to recalculated this group definition~
-view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions~
-view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition~
-view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions~
-view_dynagroup_recalculate = Recalculate~
-view_dynagroup_recalculationInterval = Recalculation Interval~
-view_dynagroup_recursive = Recursive~
-view_dynagroup_saveAndRecalculate = Save & Recalculate~
-view_dynagroup_saveFailure = Failed to save the group definition named [{0}]~
-view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]~
-view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created~
++view_configEdit_viewRow = Visualizar linha
++view_configurationDetails_allPropertiesValid = Todas as propriedades de configura\u00E7\u00E3o s\u00E3o v\u00E1lidas, portanto a configura\u00E7\u00E3o pode ser salva.
++view_configurationDetails_configNotUpdatedDueToNoChange = A configuração não foi atualizada, pois a nova configuração é equivalente à atual.
++view_configurationDetails_error_updateFailure = Falha ao atualizar a configuração.
++view_configurationDetails_messageConcise = Configuração atualizada - versão corrrente: {0}.
++view_configurationDetails_messageDetailed = Configuração do Recurso [{1}] atualizada para a versão {0}.
++view_configurationDetails_noPermission = Você não possui permisssão para editar a configuraçào do Recurso.
++view_configurationDetails_somePropertiesInvalid = As seguintes propriedades possuem valores inválidos: {0}. Os valores devem ser corrigidos antes da configuração ser salva.
++view_configurationHistoryDetails_dialogTitle = Detalhes da Configuração
++view_configurationHistoryDetails_error_loadFailure = Não foi possível carregar o histórico de configuração.
++view_configurationHistoryList_cannotDeleteCurrent = Um dos itens de histórico selecionado representa a configuração corrente. - você não pode excluí-lo.
++view_configurationHistoryList_cannotDeleteGroupItems = Um ou mais itens do histórico de configuração selecionado pertencem à uma atualização de configuração em grupo. view_configurationHistoryList_delete_failure = Falha ao excluir o histórico dos itens de configuração.
++view_configurationHistoryList_delete_failure = Falha ao excluir o histórico dos itens de configuração.
++view_configurationHistoryList_delete_success = Itens do histórico de configuração selecionados excluídos com sucesso.
++view_configurationHistoryList_rollback = Desfazer
++view_configurationHistoryList_rollback_failure = Falha ao desfazer a configuração. A configuração original ainda permanece.
++view_configurationHistoryList_rollback_success = Configuração revertida para a configuração selecionada com sucesso.
++view_configurationHistoryList_table_clickStatusIcon = Clique no ícone status para visualizar os detlahes.
++view_configurationHistoryList_table_statusFailure = Falha ao atualizar a configuração
++view_configurationHistoryList_table_statusInprogress = A atualização desta configuração ainda está em andamento.
++view_configurationHistoryList_table_statusNochange = Nenhuma mundaça foi feita nesta configuração
++view_configurationHistoryList_table_statusSuccess = Configuração atualizada com sucesso
++view_configurationHistoryList_title = Histórico de Configuração
++view_connectionSettingsDetails_allPropertiesValid = Todas a propriedades estão corretas, portanto a configuração pode ser salva agora.
++view_connectionSettingsDetails_error_updateFailure = Falha ao atualizar as propriedades de conexão.
++view_connectionSettingsDetails_messageConcise_updateSuccess = Atualização das propriedades de conexão iniciada.
++view_connectionSettingsDetails_messageDetailed_updateSuccess = Propriedades de conexão do Recurso [{0}] atualizadas
++view_connectionSettingsDetails_noPermission = Você não possui permissão para editar as propriedades de conexão do Recurso.
++view_connectionSettingsDetails_somePropertiesInvalid = As seguintes propriedades de conexão estão incorretas: {0}. Os valores devem ser corrigidos antes de serem salvos.
++view_core_error_1 = Falha ao perquisar novos alertas
++view_core_loggedInAs = Logado como {0}
++view_core_loggedOut = Desconectado
++view_core_noRecentAlerts = Não existem alertas recentes
++view_core_recentAlerts = [{0}] alertas recentes
++view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada
++view_dashboardManager_deleteFail = Falha ao excluir o dashboard.
++view_dashboardManager_deleted = Dashboard {0} exclu\u00EDdo com sucesso!
++view_dashboardManager_error = Falha ao salvar o dashboard no servidor
++view_dashboardManager_saved = Dashboard {0} salvo no servidor
++view_dashboardManager_success = Dashboard salvo
++view_dashboard_favorites_error1 = Falha ao carregar recursos favoritos.
++view_dashboardsManager_error1 = Falha ao adicionar novo dashboad
++view_dashboardsManager_inventory_title = Sum\u00E1rio do Invent\u00E1rio
++view_dashboardsManager_mashup_title = Novidades do RHQ
++view_dashboardsManager_message_title = Bem vindo ao RHQ
++view_dashboardsManager_message_title_details = <h1>Bem vindo ao RHQ</h1>\n<p> O projeto RHQ \u00E9 uma abstra\u00E7\u00E3o e uma suite de gerenciamento de sistemas baseada em plug-ins que fornece uma solu\u00E7\u00E3o extens\u00EDvel e integrada para o gerenciamento de m\u00FAltiplas plataformas atrav\u00E9s de um conjunto de funcionalidades que faz parte de seu n\u00FAcleo. O projeto foi concebido com m\u00F3dulos em camadas que fornecem uma arquitetura flexivel para sua implanta\u00E7\u00E3o. Ele possui uma interface de usu\u00E1rio que propcia o hist\u00F3rico e a auditoria do gerenciamento de recursos por toda a empresa. Sua arquitetura baseada em Agente-Servidor permite o gerenciamento remoto atrav\u00E9s de plugins que implementam todo o suporte espec\u00EDfico aos recursos gerenciados.<p> <p>Este dashboard padr\u00E3o pode ser modificado clicando o bot\u00E3o (modo edi\u00E7\u00E3o) acima.</p>
++view_dashboardsManager_tagcloud_title = Nuvem de Tags
++view_dashboards_confirm1 = Tem certeza de que deseja excluir?
++view_dashboards_portlets_refresh_fail1 = Falha ao alterar o intervalo de atualização de portlets dinâmicos.
++view_dashboards_portlets_refresh_fail2 = Falha ao desabilitar a atualização de portlets dinâmicos.
++view_dashboards_portlets_refresh_multiple_min = {0} minutos
++view_dashboards_portlets_refresh_none = N\u00E3o atualizar
++view_dashboards_portlets_refresh_one_min = 1 minuto
++view_dashboards_portlets_refresh_success1 = Intervalo de atualiza\u00E7\u00E3o dos portlets din\u00E2micos alterado com sucesso
++view_dashboards_portlets_refresh_success2 = Parando a atualiza\u00E7\u00E3o autom\u00E1tica dos portlets din\u00E2micos
++view_dashboards_title = Dashboard
++view_drift_button_detectNow = Detectar agora
++view_drift_category_fileAdded = Arquivo adicionado
++view_drift_category_fileChanged = Arquivo alterado
++view_drift_category_fileRemoved = Arquivo removido
++view_drift_delete_confirm = Excluir drift(s) selecionado(s)?
++view_drift_delete_confirmAll = Excluir todos os drifts desta origem?
++view_drift_failure_delete = Falha ao excluir os alvos dos drifts com ids: {0}
++view_drift_failure_deleteAll = Falha ao excluir todos os alvos dos drifts desta origem
++view_drift_failure_detectNow = Falha ao submeter a requisição de detecção do drift
++view_drift_failure_load = Falha ao recuperar os dados do drift
++view_drift_success_configurationUpdated = Configuração do drift atualizada. O arquivo de cobertura será atualizado na próxima varredura de detecção.
++view_drift_success_delete = Drifts {0} excluídos com sucesso!
++view_drift_success_deleteConfigs = Configurações do drift {0} excluídas com sucesso!
++view_drift_success_detectNow = Requisição de detecção de drift submetida com sucesso.
++view_drift_table_baseDir = Diretório Base
++view_drift_table_newFile = Novo Arquivo
++view_drift_table_oldFile = Arquivo Antigo
++view_drift_table_resourceConfig = Configuração de Drift do Recurso
++view_drift_table_resourceHistory = Histórico de Drift do Recurso
++view_drift_wizard_addConfig_failure = Falha ao adicionar nova configuração de drift [{0}]
++view_drift_wizard_addConfig_infoStepName = Provide Drift Detection Information\nForneça a informação para detecção do drift
++view_drift_wizard_addConfig_nameHelp = Um nome que descreve de forma objetiva o propósito desta configuração de drift de detecção. Nomes de configuração de drift devem ser únicos para um determinado recurso.
++view_drift_wizard_addConfig_namePrompt = Novo nome para configuração do drift
++view_drift_wizard_addConfig_success = Nova configuração de drift incluída com sucesso [{0}]. O(s) agente(s) será(ão) atualizado(s).
++view_drift_wizard_addConfig_templateHelp = Cada configuração de drift define um conjunto de arquivos no qual a detecção será aplicada. A configuração pode ser habilitada ou desabilitada, define um intervalo de detecção, e especifica um diretório raiz e filtros opcionais. Para cada tipo de recurso com suporte a detecção de drift existe um ou mais templates pré-definidos para usar como ponto de partida e que podem ser editados posteriormente.
++view_drift_wizard_addConfig_templatePrompt = Templates de configuração de Drift
++view_drift_wizard_addConfig_title = Incluir Configuração de Drift para o Tipo de Recurso [{0}]
++view_drift_wizard_addConfig_windowTitle = Assistente de Configuração de Drift
++view_dynagroup_children = Grupo Dinâmico Filho
++view_dynagroup_compatible = Compátivel
++view_dynagroup_definitionAlreadyExists = Já existe uma definição de grupo com este nome
++view_dynagroup_definitionCreated = Definição de grupo [{0}] criada com sucesso!
++view_dynagroup_definitionLoadFailure = Falha ao carregar as definições de grupo
++view_dynagroup_definitions = Definições de Grupos Dinâmicos
++view_dynagroup_deleteFailureSelection = Falha ao excluir as definições selecionadas
++view_dynagroup_deleteSuccessfulSelection = Definições de grupo [{0}] excluídas com sucesso!
++view_dynagroup_editing = Editando [{0}]
++view_dynagroup_exprBuilder_addExpression = Adicionar Expressão
++view_dynagroup_exprBuilder_comparisonType = Tipo de comparação
++view_dynagroup_exprBuilder_comparisonType_contains = contém
++view_dynagroup_exprBuilder_comparisonType_endsWith = Termina com
++view_dynagroup_exprBuilder_comparisonType_equals = igual
++view_dynagroup_exprBuilder_comparisonType_startsWith = inicia com
++view_dynagroup_exprBuilder_comparisonType_tooltip = Tipo de Comparação
++view_dynagroup_exprBuilder_definingPlugin = Plugin
++view_dynagroup_exprBuilder_definingPlugin_tooltip = O plugin a ser procurado
++view_dynagroup_exprBuilder_expression = Expressão
++view_dynagroup_exprBuilder_expressionType = Tipo de Expressão
++view_dynagroup_exprBuilder_expressionType_pluginConfig = Configuração do Plugin
++view_dynagroup_exprBuilder_expressionType_resource = Recurso
++view_dynagroup_exprBuilder_expressionType_resourceCategory = Categoria do Recurso
++view_dynagroup_exprBuilder_expressionType_resourceConfig = Configuração do Recurso
++view_dynagroup_exprBuilder_expressionType_resourceType = Tipo do Recurso
++view_dynagroup_exprBuilder_expressionType_tooltip = Tipo de propriedade usada por esta expressão:<br/> <b>Recurso</b>: Uma propriedade do recurso (ex: nome ou versão)<br/> <b>Tipo de Recurso</b>: Procura por recursos de um tipo específico<br/> <b>Categoria do Recurso</b>: Procura por recursos de uma categoria específica: platforma, servidor, serviço<br/> <b>Característica</b>: Recursos que possuem valores selecionados para uma característica monitorada<br/> <b>Configuração do Plugin</b>: Procurar pela configuração do componente do plugin <br/> <b>Configuração do Recurso</b>: Procurar pela configuração do recurso gerenciado
++view_dynagroup_exprBuilder_expressionType_trait = Característica
++view_dynagroup_exprBuilder_expression_tooltip = Esta é a expressão completa com base nas definições do formulário abaixo. Este texto será adicionado ao campo de expressão da definição do grupo quando você clicar o botão "Adicionar Expressão"
++view_dynagroup_exprBuilder_groupBy = Agrupado por
++view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy fará com que o resultado da busca seja agrupado de acordo com os valores informados na expressão. Por exemplo, usando GroupBy para o nome de um cluster JBossAS, o resultado criará um grupo para cada cluster e seus membros.
++view_dynagroup_exprBuilder_noPlugins = --Sem plugins--
++view_dynagroup_exprBuilder_noProperties = --Sem propriedades--
++view_dynagroup_exprBuilder_noResourceTypes = --Nehum tipo de recurso--
++view_dynagroup_exprBuilder_pluginLoadFailure = N\u00E3o foi poss\u00EDvel obter a lista de plugins
++view_dynagroup_exprBuilder_propLoadFailure = N\u00E3o foi poss\u00EDvel obter a lista de propriedades
++view_dynagroup_exprBuilder_propertyName = Nome da propriedade
++view_dynagroup_exprBuilder_propertyName_tooltip = O nome da propriedade a ser pesquisada. Isso é definido pelo tipo da expressão bem como o tipo do recurso.
++view_dynagroup_exprBuilder_resTypeLoadFailure = Não foi possível recuperar a lista de recursos para o plugin [{0}]
++view_dynagroup_exprBuilder_resource = Recurso
++view_dynagroup_exprBuilder_resourceType = Tipo de Recurso
++view_dynagroup_exprBuilder_resourceType_tooltip = O tipo do recurso
++view_dynagroup_exprBuilder_resource_child = Filho
++view_dynagroup_exprBuilder_resource_grandparent = Avô
++view_dynagroup_exprBuilder_resource_greatGrandparent = Bizavô
++view_dynagroup_exprBuilder_resource_greatGreatGrandparent = Tataravô
++view_dynagroup_exprBuilder_resource_parent = Pai
++view_dynagroup_exprBuilder_resource_resource = Recurso
++view_dynagroup_exprBuilder_resource_tooltip = Escolha o nível do recurso que deseja selecionar. Por exemplo, selecione "pai" para procurar por recursos filhos cujo recurso pai case com o resto da expressão.
++view_dynagroup_exprBuilder_savedExpression = Expressão salva
++view_dynagroup_exprBuilder_title = Construtor de expressão
++view_dynagroup_exprBuilder_unset = Não definido
++view_dynagroup_exprBuilder_unset_tooltip = Indefinido irá procurar todos os valores que possuem um valor nulo no banco de dados. Não é possível utilizar o operador "=" para valores indefinidos.
++view_dynagroup_exprBuilder_value_tooltip = A string de pesquisa da expressão
++view_dynagroup_expression = Expressão
++view_dynagroup_expressionBuilderIconTooltip = Construtor de Expressão
++view_dynagroup_expressionSet = Conjunto de Expressões
++view_dynagroup_lastCalculationTime = Último cálculo
++view_dynagroup_loadDefinitionFailure = Falha ao carregar as definições [{0}]
++view_dynagroup_loadDefinitionMissing = Não existe definição para o grupo com ID [{0}]
++view_dynagroup_mixed = Misturado
++view_dynagroup_newGroupDefinition = Nova Definição de Grupo
++view_dynagroup_nextCalculationTime = Próximo cálculo
++view_dynagroup_permDenied = Você não possui permissões para visualizar o grupo
++view_dynagroup_recalcFailure = Falha ao recalcular essa definição
++view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions
++view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition
++view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions
++view_dynagroup_recalculate = Recalculate
++view_dynagroup_recalculationInterval = Recalculation Interval
++view_dynagroup_recursive = Recursive
++view_dynagroup_saveAndRecalculate = Save & Recalculate
++view_dynagroup_saveFailure = Failed to save the group definition named [{0}]
++view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]
++view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created
view_dynagroup_template_customExpression = Custom Expression...
view_dynagroup_template_downedResources = All resources currently down
view_dynagroup_template_jbossas4_clusters = JBossAS 4 - Clusters
@@@ -1214,19 -1249,19 +1253,19 @@@ view_dynagroup_template_platforms = Pla
view_dynagroup_template_uniqueResourceTypes = Unique resource types in inventory
view_groupConfigEdit_member = Membro
view_groupConfigEdit_noListProps = Lista de propriedades n\u00E3o suportada atualmente para configura\u00E7\u00F5es em grupo.
- view_groupConfigEdit_setAll = Atribuir todos os valores \u00E0\:
-view_groupConfigEdit_setAll = Atribuir todos os valores \u00E0:
++view_groupConfigEdit_setAll = Atribuir todos os valores \u00E0\\\\\\\\:
view_groupConfigEdit_tooltip_1 = Valores dos membros diferem - clique no \u00EDcone para edit\u00E1-los.
view_groupConfigEdit_unset = Remover atribui\u00E7\u00E3o
view_groupConfigEdit_valsDiff = valores dos membros diferem
view_groupConfigEdit_valsDiffForProp = Valores dos membros para a Propriedade [{0}]
--view_groupCreateWizard_createFailure = Failed to create the resource group~
--view_groupCreateWizard_createStepName = Group Settings~
--view_groupCreateWizard_createStep_recursive = Recursive~
--view_groupCreateWizard_createSuccessful_concise = You have created a new resource group. [<a href = "{0}">View Group</a>]~
--view_groupCreateWizard_createSuccessful_full = You have created a new [{0}] resource group with the name [{1}] that contains [{2}] member resources~
--view_groupCreateWizard_membersStepName = Select Members~
--view_groupCreateWizard_title = Create Group~
--view_groupCreateWizard_windowTitle = Create Group~
++view_groupCreateWizard_createFailure = Failed to create the resource group
++view_groupCreateWizard_createStepName = Group Settings
++view_groupCreateWizard_createStep_recursive = Recursive
++view_groupCreateWizard_createSuccessful_concise = You have created a new resource group. [<a href = "{0}">View Group</a>]
++view_groupCreateWizard_createSuccessful_full = You have created a new [{0}] resource group with the name [{1}] that contains [{2}] member resources
++view_groupCreateWizard_membersStepName = Select Members
++view_groupCreateWizard_title = Create Group
++view_groupCreateWizard_windowTitle = Create Group
view_groupInventoryMembers_button_updateMembership = Update Membership...
view_groupInventoryMembers_title_updateMembership = Update Membership
view_group_detail_failLoad = Failed to load group for group with ID [{0}]
@@@ -1234,56 -1269,56 +1273,56 @@@ view_group_detail_failLoadComp = Faile
view_group_detail_failRecursiveChange = Failed to update the recursive setting for group [{0}]
view_group_detail_recursiveChange = You successfully changed the recursive setting for group [{0}]
view_group_inventory_activity_no_recent_metrics = This group has no recent metrics
--view_group_meas_schedules_title = Group Metric Collection Schedules~
++view_group_meas_schedules_title = Group Metric Collection Schedules
view_group_membership_failFetch = Failed to fetch Resource Group
--view_group_membership_saveFailure = Failed to update membership of group [{0}]~
--view_group_membership_saveSuccessful = You have updated the membership of group [{0}]~
++view_group_membership_saveFailure = Failed to update membership of group [{0}]
++view_group_membership_saveSuccessful = You have updated the membership of group [{0}]
view_group_operationScheduleDetails_failedToLoadMembers = Failed to load group member Resources.
view_group_operationScheduleDetails_field_execute = Execute
view_group_operationScheduleDetails_field_haltOnFailure = Halt on Failure?
view_group_operationScheduleDetails_memberResource = Member Resource
view_group_operationScheduleDetails_value_parallel = in parallel
view_group_operationScheduleDetails_value_sequential = in the order specified below (drag and drop member Resources to change order)
--view_group_pluginConfig_edit_currentGroupProperties = Current Group Properties~
--view_group_pluginConfig_edit_invalid = The following connection setting properties have invalid values and must be corrected before the connection settings can be saved: [{0}]~
--view_group_pluginConfig_edit_noperm = You do not have permission to edit this group connection settings~
--view_group_pluginConfig_edit_saveFailure = Failed to initiate group connection setting update for [{0}] compatible group named [{1}]~
--view_group_pluginConfig_edit_saveInitiated_concise = The group connection setting updates have been initiated~
--view_group_pluginConfig_edit_saveInitiated_full = The group connection setting updates have been initiated for the [{0}] compatible group named [{1}]~
--view_group_pluginConfig_edit_saveTooltip = Update the connection settings of all group members~
--view_group_pluginConfig_edit_valid = All connection setting properties have valid values, so the connection settings can now be saved~
--view_group_pluginConfig_members_fetchFailure = Failed to get plugin config update history for members of group [{0}]~
++view_group_pluginConfig_edit_currentGroupProperties = Current Group Properties
++view_group_pluginConfig_edit_invalid = The following connection setting properties have invalid values and must be corrected before the connection settings can be saved: [{0}]
++view_group_pluginConfig_edit_noperm = You do not have permission to edit this group connection settings
++view_group_pluginConfig_edit_saveFailure = Failed to initiate group connection setting update for [{0}] compatible group named [{1}]
++view_group_pluginConfig_edit_saveInitiated_concise = The group connection setting updates have been initiated
++view_group_pluginConfig_edit_saveInitiated_full = The group connection setting updates have been initiated for the [{0}] compatible group named [{1}]
++view_group_pluginConfig_edit_saveTooltip = Update the connection settings of all group members
++view_group_pluginConfig_edit_valid = All connection setting properties have valid values, so the connection settings can now be saved
++view_group_pluginConfig_members_fetchFailure = Failed to get plugin config update history for members of group [{0}]
view_group_pluginConfig_members_fetchFailureConn = Failed to retrieve member connection settings for [{0}]
view_group_pluginConfig_members_fetchFailureConnInProgress = A group plugin configuration update is currently in progress. You must wait until the update is finished before you can view the group settings.
--view_group_pluginConfig_members_statusDetails = Status Details~
--view_group_pluginConfig_members_statusFailure = This configuration update failed for an unknown reason~
--view_group_pluginConfig_members_statusInprogress = This configuration update is still in progress~
--view_group_pluginConfig_members_statusNochange = No changes were made to this configuration~
--view_group_pluginConfig_members_statusSuccess = This configuration update was successful~
--view_group_pluginConfig_members_title = Group Connection Settings Member Histories~
--view_group_pluginConfig_table_clickStatusIcon = Click the status icon for full details~
--view_group_pluginConfig_table_deleteFailure = Failed to delete group plugin config history~
--view_group_pluginConfig_table_deleteSuccessful = You have deleted [{0}] history items~
++view_group_pluginConfig_members_statusDetails = Status Details
++view_group_pluginConfig_members_statusFailure = This configuration update failed for an unknown reason
++view_group_pluginConfig_members_statusInprogress = This configuration update is still in progress
++view_group_pluginConfig_members_statusNochange = No changes were made to this configuration
++view_group_pluginConfig_members_statusSuccess = This configuration update was successful
++view_group_pluginConfig_members_title = Group Connection Settings Member Histories
++view_group_pluginConfig_table_clickStatusIcon = Click the status icon for full details
++view_group_pluginConfig_table_deleteFailure = Failed to delete group plugin config history
++view_group_pluginConfig_table_deleteSuccessful = You have deleted [{0}] history items
view_group_pluginConfig_table_failFetch = Failed to get group plugin config history
--view_group_pluginConfig_table_msg1 = View Member History for status of each individual resource~
--view_group_pluginConfig_table_statusDetails = Status Details~
--view_group_pluginConfig_table_statusFailure = This group configuration update failed~
--view_group_pluginConfig_table_statusInprogress = This group configuration update is still in progress~
--view_group_pluginConfig_table_statusNochange = No changes were made to this group configuration~
--view_group_pluginConfig_table_statusSuccess = This group configuration update was successful~
--view_group_pluginConfig_table_title = Group Connection Settings History~
--view_group_pluginConfig_table_viewMemberHistory = View Member History~
--view_group_pluginConfig_table_viewSettings = View Settings~
--view_group_pluginConfig_view_groupProperties = Group Properties~
--view_group_pluginConfig_view_noperm = You do not have permissions to see the connection settings~
--view_group_resConfig_edit_invalid = The following configuration properties have invalid values and must be corrected before the configuration can be saved: [{0}]~
++view_group_pluginConfig_table_msg1 = View Member History for status of each individual resource
++view_group_pluginConfig_table_statusDetails = Status Details
++view_group_pluginConfig_table_statusFailure = This group configuration update failed
++view_group_pluginConfig_table_statusInprogress = This group configuration update is still in progress
++view_group_pluginConfig_table_statusNochange = No changes were made to this group configuration
++view_group_pluginConfig_table_statusSuccess = This group configuration update was successful
++view_group_pluginConfig_table_title = Group Connection Settings History
++view_group_pluginConfig_table_viewMemberHistory = View Member History
++view_group_pluginConfig_table_viewSettings = View Settings
++view_group_pluginConfig_view_groupProperties = Group Properties
++view_group_pluginConfig_view_noperm = You do not have permissions to see the connection settings
++view_group_resConfig_edit_invalid = The following configuration properties have invalid values and must be corrected before the configuration can be saved: [{0}]
view_group_resConfig_edit_loadFail = Failed to retrieve member Resource configurations for [{0}]
--view_group_resConfig_edit_noperm = You do not have permission to edit this group configuration~
--view_group_resConfig_edit_saveFailure = Failed to initiate group configuration update for [{0}] compatible group named [{1}]~
--view_group_resConfig_edit_saveInitiated_concise = The group configuration updates have been initiated~
--view_group_resConfig_edit_saveInitiated_full = The group configuration updates have been initiated for the [{0}] compatible group named [{1}]~
--view_group_resConfig_edit_saveTooltip = Update the configurations of all group members~
--view_group_resConfig_edit_valid = All configuration properties have valid values, so the configuration can now be saved~
++view_group_resConfig_edit_noperm = You do not have permission to edit this group configuration
++view_group_resConfig_edit_saveFailure = Failed to initiate group configuration update for [{0}] compatible group named [{1}]
++view_group_resConfig_edit_saveInitiated_concise = The group configuration updates have been initiated
++view_group_resConfig_edit_saveInitiated_full = The group configuration updates have been initiated for the [{0}] compatible group named [{1}]
++view_group_resConfig_edit_saveTooltip = Update the configurations of all group members
++view_group_resConfig_edit_valid = All configuration properties have valid values, so the configuration can now be saved
view_group_resConfig_members_fetchFailure = Failed to get resource config update history for members of group [{0}]
view_group_resConfig_members_fetchFailureConfig = Failed to retrieve member resource configuration settings for [{0}]
view_group_resConfig_members_fetchFailureConfigInProgress = A group resource configuration update is currently in progress. You must wait until the update is finished before you can view the group settings.
@@@ -1309,80 -1344,80 +1348,80 @@@ view_group_resConfig_table_viewSetting
view_group_resConfig_view_groupProperties = Group Properties
view_group_resConfig_view_noperm = You do not have permissions to see the resource configuration settings
view_group_summary_compatible = Compatible
--view_group_summary_descUpdateFailure = Failed to change the description of the resource group with ID [{0}]~
--view_group_summary_descUpdateSuccessful = You have changed the description of this resource group~
--view_group_summary_dynamic = Dynamic~
--view_group_summary_dynamicNote = Dynamic group names and descriptions are managed, and therefore are not editable~
--view_group_summary_groupDefinition = Group Definition~
--view_group_summary_memberCount = Member Count~
--view_group_summary_memberType = Member Type~
--view_group_summary_mixed = Mixed~
--view_group_summary_nameUpdateFailure = Failed to change the name of the resource group with ID [{0}] - could not change from [{1}] to [{2}]~
--view_group_summary_nameUpdateSuccessful = You have changed the name of the resource group with ID [{0}] from [{1}] to [{2}]~
--view_group_summary_recursive = Recursive~
++view_group_summary_descUpdateFailure = Failed to change the description of the resource group with ID [{0}]
++view_group_summary_descUpdateSuccessful = You have changed the description of this resource group
++view_group_summary_dynamic = Dynamic
++view_group_summary_dynamicNote = Dynamic group names and descriptions are managed, and therefore are not editable
++view_group_summary_groupDefinition = Group Definition
++view_group_summary_memberCount = Member Count
++view_group_summary_memberType = Member Type
++view_group_summary_mixed = Mixed
++view_group_summary_nameUpdateFailure = Failed to change the name of the resource group with ID [{0}] - could not change from [{1}] to [{2}]
++view_group_summary_nameUpdateSuccessful = You have changed the name of the resource group with ID [{0}] from [{1}] to [{2}]
++view_group_summary_recursive = Recursive
view_helpTop_description = This section provides access to documentation, tutorials, version, and other helpful information.
view_help_section_product = Product
view_help_section_product_about = About
--view_inventory_adq = Discovery Queue~
--view_inventory_allGroups = All Groups~
--view_inventory_allResources = All Resources~
--view_inventory_cannotGetGlobalPerms = Could not determine global permissions - assuming none.~
--view_inventory_collectionInterval = Collection Interval~
--view_inventory_downServers = Down Servers~
--view_inventory_dynagroupDefs = Dynagroup Definitions~
--view_inventory_eventDetails_loadFailed = An error occurred loading the event details~
--view_inventory_eventHistory_deleteFailed = Failed to deleted selected events for [{0}]~
--view_inventory_eventHistory_deleteSuccessful = You have successfully deleted [{0}] events for [{1}]~
--view_inventory_eventHistory_details = Details~
--view_inventory_eventHistory_detailsFilter = Details Filter~
--view_inventory_eventHistory_groupEventHistory = Group Event History~
--view_inventory_eventHistory_purgeFailed = Failed to purge events for [{0}]~
--view_inventory_eventHistory_purgeSuccessful = You have successfully purged [{0}] events for [{1}]~
--view_inventory_eventHistory_resourceEventHistory = Resource Event History~
--view_inventory_eventHistory_severity = Severity~
--view_inventory_eventHistory_severityFilter = Severity Filter~
--view_inventory_eventHistory_sourceFilter = Source Filter~
--view_inventory_eventHistory_sourceLocation = Source Location~
--view_inventory_eventHistory_timestamp = Timestamp~
--view_inventory_groups = Groups~
--view_inventory_groups_children = Children~
--view_inventory_groups_deleteFailed = Failed to delete the selected resource groups~
--view_inventory_groups_deleteSuccessful = You have successfully deleted the selected resource groups~
--view_inventory_groups_descendants = Descendants~
--view_inventory_groups_loadFailed = Failed to load group composite data~
--view_inventory_groups_resourceGroups = Resource Groups~
--view_inventory_mixed = mixed~
--view_inventory_platforms = Platforms~
--view_inventory_problemGroups = Problem Groups~
--view_inventory_resource_loadFailed = Resource with id [{0}] does not exist or is not accessible~
--view_inventory_resources_deleteConfirm = Are you sure you want to delete the selected resources?~
--view_inventory_resources_deleteFailed = Failed to delete the selected resources~
--view_inventory_resources_deleteSuccessful = You have successfully deleted the selected resources~
--view_inventory_resources_loadFailed = Failed to load resource composite data~
--view_inventory_resources_title = Member Resources~
--view_inventory_resources_title_children = Child Resources~
--view_inventory_resources_title_members = Member Resources~
++view_inventory_adq = Discovery Queue
++view_inventory_allGroups = All Groups
++view_inventory_allResources = All Resources
++view_inventory_cannotGetGlobalPerms = Could not determine global permissions - assuming none.
++view_inventory_collectionInterval = Collection Interval
++view_inventory_downServers = Down Servers
++view_inventory_dynagroupDefs = Dynagroup Definitions
++view_inventory_eventDetails_loadFailed = An error occurred loading the event details
++view_inventory_eventHistory_deleteFailed = Failed to deleted selected events for [{0}]
++view_inventory_eventHistory_deleteSuccessful = You have successfully deleted [{0}] events for [{1}]
++view_inventory_eventHistory_details = Details
++view_inventory_eventHistory_detailsFilter = Details Filter
++view_inventory_eventHistory_groupEventHistory = Group Event History
++view_inventory_eventHistory_purgeFailed = Failed to purge events for [{0}]
++view_inventory_eventHistory_purgeSuccessful = You have successfully purged [{0}] events for [{1}]
++view_inventory_eventHistory_resourceEventHistory = Resource Event History
++view_inventory_eventHistory_severity = Severity
++view_inventory_eventHistory_severityFilter = Severity Filter
++view_inventory_eventHistory_sourceFilter = Source Filter
++view_inventory_eventHistory_sourceLocation = Source Location
++view_inventory_eventHistory_timestamp = Timestamp
++view_inventory_groups = Groups
++view_inventory_groups_children = Children
++view_inventory_groups_deleteFailed = Failed to delete the selected resource groups
++view_inventory_groups_deleteSuccessful = You have successfully deleted the selected resource groups
++view_inventory_groups_descendants = Descendants
++view_inventory_groups_loadFailed = Failed to load group composite data
++view_inventory_groups_resourceGroups = Resource Groups
++view_inventory_mixed = mixed
++view_inventory_platforms = Platforms
++view_inventory_problemGroups = Problem Groups
++view_inventory_resource_loadFailed = Resource with id [{0}] does not exist or is not accessible
++view_inventory_resources_deleteConfirm = Are you sure you want to delete the selected resources?
++view_inventory_resources_deleteFailed = Failed to delete the selected resources
++view_inventory_resources_deleteSuccessful = You have successfully deleted the selected resources
++view_inventory_resources_loadFailed = Failed to load resource composite data
++view_inventory_resources_title = Recursos membros
++view_inventory_resources_title_children = Child Resources
++view_inventory_resources_title_members = Member Resources
view_inventory_resources_uninventoryConfirm = Are you sure you want to uninventory the selected resources? Note that if a selected resource still exists, then it will get rediscovered during its agent''s next discovery scan.
view_inventory_resources_uninventoryFailed = Failed to uninventory the selected resources
view_inventory_resources_uninventorySuccessful = You have successfully uninventoried the selected resources
--view_inventory_sectionHelp = From this section, newly discovered Resources, inventoried Resources, and Groups can be viewed and managed.~
--view_inventory_servers = Servers~
--view_inventory_services = Services~
--view_inventory_summary_agent_error1 = Failed to locate agent managing resource id~
--view_inventory_summary_agent_error2 = Failed to ping agent managing resource id~
++view_inventory_sectionHelp = From this section, newly discovered Resources, inventoried Resources, and Groups can be viewed and managed.
++view_inventory_servers = Servers
++view_inventory_services = Services
++view_inventory_summary_agent_error1 = Failed to locate agent managing resource id
++view_inventory_summary_agent_error2 = Failed to ping agent managing resource id
view_inventory_summary_agent_error3 = You do not have permission to view details for this Agent.
--view_inventory_summary_agent_fullEnpoint = Full Endpoint~
--view_inventory_summary_agent_fullEnpoint_err1 = !No remote endpoint associated with this resource!~
--view_inventory_summary_agent_last_title = Last Received Availability Report~
--view_inventory_summary_agent_status_title = Agent Communications Status~
--view_inventory_summary_agent_title = Agent Managing this Resource~
++view_inventory_summary_agent_fullEnpoint = Full Endpoint
++view_inventory_summary_agent_fullEnpoint_err1 = !No remote endpoint associated with this resource!
++view_inventory_summary_agent_last_title = Last Received Availability Report
++view_inventory_summary_agent_status_title = Agent Communications Status
++view_inventory_summary_agent_title = Agent Managing this Resource
view_inventory_unavailableServers = Unavailable Servers
view_leftNav_unknownPage = P\u00E1gina desconhecida [{0}] para a se\u00E7\u00E3o [{1}] - URL inv\u00E1lida.
view_login_invalidEmail = Endere\u00E7o de e-mail inv\u00E1lido
view_login_login = Entrar
view_login_logout = Sair
view_login_noBackend = Fonte de Dados indispon\u00EDvel.
--view_login_noLdap = Note: Optional retrieval of ldap details unsuccessful. Manual entry is required.~
++view_login_noLdap = Note: Optional retrieval of ldap details unsuccessful. Manual entry is required.
view_login_noUser = Usu\u00E1rio ou senha inv\u00E1lidos.
view_login_prompt = Favor efetuar Login
view_login_registerLater = (Sair - Concluir registro mais tarde.)
@@@ -1404,61 -1439,61 +1443,61 @@@ view_measureTable_getLive = Get Live Va
view_measureTable_getLive_failure = Cannot get live values for those metrics. Make sure the agent is running and the managed resource is up.
view_measureTable_live_title = Live Data
view_measure_nan = --dados indispon\u00EDveis--
--view_measurementOob_title = M\u00E9tricas Suspeitas~
--view_menuBar_help = Ajuda~
++view_measurementOob_title = M\u00E9tricas Suspeitas
++view_menuBar_help = Ajuda
view_menuBar_logout = Sair
--view_messageCenter_button_messages = Mensagens~
++view_messageCenter_button_messages = Mensagens
view_messageCenter_clearAllMessages = Clear All Messages
view_messageCenter_lastNMessages = Last {0} Messages
view_messageCenter_maxMessages = Max Messages
view_messageCenter_messageBarShowDetails = Show Details
--view_messageCenter_messageDetail = Detalhe~
--view_messageCenter_messageSeverity = Severidade~
--view_messageCenter_messageTime = Tempo~
--view_messageCenter_messageTitle = Centro de Mensagens~
--view_messageCenter_noRecentMessages = N\u00E3o existem Mensagens Recentes~
++view_messageCenter_messageDetail = Detalhe
++view_messageCenter_messageSeverity = Severidade
++view_messageCenter_messageTime = Tempo
++view_messageCenter_messageTitle = Centro de Mensagens
++view_messageCenter_noRecentMessages = N\u00E3o existem Mensagens Recentes
view_messageCenter_stackTraceFollows = --- STACK TRACE FOLLOWS ---
--view_metric_traits = Traits~
--view_metric_viewTraitHistory = Value History for Trait [{0}]~
--view_operationCreateWizard_button_execute = Execute~
--view_operationCreateWizard_button_executeImmediately = Execute Immediately~
--view_operationCreateWizard_error_scheduleOperationFailure = Failed to schedule operation execution.~
--view_operationCreateWizard_header = Execute {0} on {1}~
--view_operationCreateWizard_message_scheduleOperationSuccess = Schedule operation [{0}] on Resource [{1}] with cron string [{2}].~
--view_operationCreateWizard_parametersStep_name = Operation Parameters~
--view_operationCreateWizard_parametersStep_noParameters = This operation does not take any parameters.~
--view_operationCreateWizard_schedulingStep_label_daily = Daily~
--view_operationCreateWizard_schedulingStep_label_dailyAt = Daily At~
--view_operationCreateWizard_schedulingStep_label_date = Date~
--view_operationCreateWizard_schedulingStep_label_dayOfMonth = Day of Month~
--view_operationCreateWizard_schedulingStep_label_dayOfWeek = Day of Week~
--view_operationCreateWizard_schedulingStep_label_endDate = End Date~
--view_operationCreateWizard_schedulingStep_label_everyNMinutes = Every n Minutes~
--view_operationCreateWizard_schedulingStep_label_hourly = Hourly~
--view_operationCreateWizard_schedulingStep_label_hourlyAt = Hourly At~
--view_operationCreateWizard_schedulingStep_label_minuteInterval = Minute Interval~
--view_operationCreateWizard_schedulingStep_label_minuteOfHour = Minute of Hour~
--view_operationCreateWizard_schedulingStep_label_monthly = Monthly~
--view_operationCreateWizard_schedulingStep_label_monthlyOn = Monthly On~
--view_operationCreateWizard_schedulingStep_label_nMinutes = n Minutes~
--view_operationCreateWizard_schedulingStep_label_onceAt = Once At~
--view_operationCreateWizard_schedulingStep_label_recurrence = Recurrence~
--view_operationCreateWizard_schedulingStep_label_recurrenceEnd = Recurrence End~
--view_operationCreateWizard_schedulingStep_label_runAt = Run At~
--view_operationCreateWizard_schedulingStep_label_schedule = Schedule~
--view_operationCreateWizard_schedulingStep_label_start = Start~
--view_operationCreateWizard_schedulingStep_label_startDate = Start Date~
--view_operationCreateWizard_schedulingStep_label_time = Time~
--view_operationCreateWizard_schedulingStep_label_timeOfDay = Time of Day~
--view_operationCreateWizard_schedulingStep_label_timePeriod = Time Period~
--view_operationCreateWizard_schedulingStep_label_weekly = Weekly~
--view_operationCreateWizard_schedulingStep_label_weeklyOn = Weekly On~
--view_operationCreateWizard_schedulingStep_label_willExecuteImmediately = Will execute immediately~
--view_operationCreateWizard_schedulingStep_name = Schedule~
--view_operationCreateWizard_title = Operation Wizard~
++view_metric_traits = Traits
++view_metric_viewTraitHistory = Value History for Trait [{0}]
++view_operationCreateWizard_button_execute = Execute
++view_operationCreateWizard_button_executeImmediately = Execute Immediately
++view_operationCreateWizard_error_scheduleOperationFailure = Failed to schedule operation execution.
++view_operationCreateWizard_header = Execute {0} on {1}
++view_operationCreateWizard_message_scheduleOperationSuccess = Schedule operation [{0}] on Resource [{1}] with cron string [{2}].
++view_operationCreateWizard_parametersStep_name = Operation Parameters
++view_operationCreateWizard_parametersStep_noParameters = This operation does not take any parameters.
++view_operationCreateWizard_schedulingStep_label_daily = Daily
++view_operationCreateWizard_schedulingStep_label_dailyAt = Daily At
++view_operationCreateWizard_schedulingStep_label_date = Date
++view_operationCreateWizard_schedulingStep_label_dayOfMonth = Day of Month
++view_operationCreateWizard_schedulingStep_label_dayOfWeek = Day of Week
++view_operationCreateWizard_schedulingStep_label_endDate = End Date
++view_operationCreateWizard_schedulingStep_label_everyNMinutes = Every n Minutes
++view_operationCreateWizard_schedulingStep_label_hourly = Hourly
++view_operationCreateWizard_schedulingStep_label_hourlyAt = Hourly At
++view_operationCreateWizard_schedulingStep_label_minuteInterval = Minute Interval
++view_operationCreateWizard_schedulingStep_label_minuteOfHour = Minute of Hour
++view_operationCreateWizard_schedulingStep_label_monthly = Monthly
++view_operationCreateWizard_schedulingStep_label_monthlyOn = Monthly On
++view_operationCreateWizard_schedulingStep_label_nMinutes = n Minutes
++view_operationCreateWizard_schedulingStep_label_onceAt = Once At
++view_operationCreateWizard_schedulingStep_label_recurrence = Recurrence
++view_operationCreateWizard_schedulingStep_label_recurrenceEnd = Recurrence End
++view_operationCreateWizard_schedulingStep_label_runAt = Run At
++view_operationCreateWizard_schedulingStep_label_schedule = Schedule
++view_operationCreateWizard_schedulingStep_label_start = Start
++view_operationCreateWizard_schedulingStep_label_startDate = Start Date
++view_operationCreateWizard_schedulingStep_label_time = Time
++view_operationCreateWizard_schedulingStep_label_timeOfDay = Time of Day
++view_operationCreateWizard_schedulingStep_label_timePeriod = Time Period
++view_operationCreateWizard_schedulingStep_label_weekly = Weekly
++view_operationCreateWizard_schedulingStep_label_weeklyOn = Weekly On
++view_operationCreateWizard_schedulingStep_label_willExecuteImmediately = Will execute immediately
++view_operationCreateWizard_schedulingStep_name = Schedule
++view_operationCreateWizard_title = Operation Wizard
view_operationHistoryDetails_dateCompleted = Date Completed
view_operationHistoryDetails_dateSubmitted = Date Submitted
--view_operationHistoryDetails_error_fetchFailure = Failure loading operation history.~
++view_operationHistoryDetails_error_fetchFailure = Failure loading operation history.
view_operationHistoryDetails_noResults = This operation does not return any results.
view_operationHistoryDetails_operation = Operation
view_operationHistoryDetails_parameters = Parameters
@@@ -1466,9 -1501,9 +1505,9 @@@ view_operationHistoryDetails_requestor
view_operationHistoryDetails_results = Results
view_operationHistoryDetails_status = Status
view_operationHistoryList_button_forceDelete = Force Delete
--view_operationHistoryList_button_runOperation = Run Operation~
++view_operationHistoryList_button_runOperation = Run Operation
view_operationHistoryList_notYetStarted = not yet started
--view_operationHistoryList_title = Operation History~
++view_operationHistoryList_title = Operation History
view_operationScheduleDetails_enterParametersBelow = Enter parameters below...
view_operationScheduleDetails_fieldDefault_description = Select an operation to see its description.
view_operationScheduleDetails_fieldDefault_parameters = Select an operation to see its parameters.
@@@ -1479,10 -1514,10 +1518,10 @@@ view_operationScheduleDetails_field_par
view_operationScheduleDetails_field_timeout = Timeout
view_operationScheduleDetails_noParameters = This operation does not take any parameters.
view_operationScheduleDetails_operationSchedule = Operation Schedule
--view_portlet_autodiscovery_config_platform_selection = Number of platforms to display~
--view_portlet_autodiscovery_help_msg = This portlet offers the ability to import newly discovered resources into the inventory for monitoring and management or to ignore them from further action.~
++view_portlet_autodiscovery_config_platform_selection = Number of platforms to display
++view_portlet_autodiscovery_help_msg = This portlet offers the ability to import newly discovered resources into the inventory for monitoring and management or to ignore them from further action.
view_portlet_autodiscovery_setting_platforms = discovered platforms
--view_portlet_autodiscovery_title = Discovery Queue~
++view_portlet_autodiscovery_title = Discovery Queue
view_portlet_configure_definitionDesc = The configuration settings for the portlet.
view_portlet_configure_definitionTitle = Portlet Configuration
view_portlet_configure_needed = Click the Settings button to configure this portlet.
@@@ -1517,18 -1553,18 +1557,18 @@@ view_portlet_defaultName_resource_opera
view_portlet_defaultName_resource_pkg_hisory = Resource: Package History
view_portlet_defaultName_tagCloud = Tag Count
view_portlet_factory_invalidPortlet = This is an obsolete portlet that is no longer valid. Please delete it.
--view_portlet_favoriteResources_msg = This portlet displays your favorite resources~
--view_portlet_favoriteResources_title = Favorite Resources~
--view_portlet_generic_help = No help available for this portlet~
--view_portlet_generic_unconfigured = No settings available for this portlet~
--view_portlet_graph_configure_metricDefinition_graph = The metric definition id to graph~
--view_portlet_graph_configure_resource_graph = The resource to graph~
--view_portlet_graph_configure_title = Graph Config~
--view_portlet_graph_configure_title_desc = Configuration of the graph portlet~
--view_portlet_graph_help_msg = This Portlet supports the graphing of a resource metric.~
--view_portlet_graph_help_title = Graph Portlet~
--view_portlet_graph_help_unconfigured = This graph is unconfigured, click the settings button to configure.~
--view_portlet_graph_title = Resource Graph~
++view_portlet_favoriteResources_msg = This portlet displays your favorite resources
++view_portlet_favoriteResources_title = Favorite Resources
++view_portlet_generic_help = No help available for this portlet
++view_portlet_generic_unconfigured = No settings available for this portlet
++view_portlet_graph_configure_metricDefinition_graph = The metric definition id to graph
++view_portlet_graph_configure_resource_graph = The resource to graph
++view_portlet_graph_configure_title = Graph Config
++view_portlet_graph_configure_title_desc = Configuration of the graph portlet
++view_portlet_graph_help_msg = This Portlet supports the graphing of a resource metric.
++view_portlet_graph_help_title = Graph Portlet
++view_portlet_graph_help_unconfigured = This graph is unconfigured, click the settings button to configure.
++view_portlet_graph_title = Resource Graph
view_portlet_help_autodiscovery = This portlet allows import or ignore of newly discovered resources. Imported resources are added to inventory for monitoring and management. Ignored resources are not imported and are hidden from view unless explicitly unignored.
view_portlet_help_bundle_deps = This portlet shows relevant bundle deployments based on display criteria configured.
view_portlet_help_config_updates = This portlet displays recent configuration changes consistent with configuration settings.
@@@ -1550,59 -1587,59 +1591,59 @@@ view_portlet_help_problemResources = Th
view_portlet_help_recentlyAdded = This portlet displays resources that have recently been imported into inventory.
view_portlet_help_scheduledOperations = This portlet displays the next scheduled operations for the current user''s inventory.
view_portlet_help_tagCloud = This portlet displays the relative tag counts for the current user''s inventory.
--view_portlet_inventory_error1 = Failed to retrieve inventory summary~
++view_portlet_inventory_error1 = Failed to retrieve inventory summary
view_portlet_inventory_tooltip_collapse = Click to hide details for this resource.
view_portlet_inventory_tooltip_expand = Click to show more details for this resource.
--view_portlet_mashup_config_title = MashupPorlet Configuration~
--view_portlet_mashup_config_title_desc = The configuration settings for the mashup portlet.~
--view_portlet_mashup_help = This portlet can include a web page via an HTTP request into an iframe on the dashboard.~
--view_portlet_mashup_unconfigured = Page address not yet configured, click the settings button to setup this portlet.~
--view_portlet_message_config_title = MessagePortlet Configuration~
--view_portlet_message_config_title_desc = The configuration settings for the message portlet.~
--view_portlet_message_help = This portlet can display an HTML message on the dashboard.~
--view_portlet_message_title = Message~
--view_portlet_message_unconfigured = Message not yet configured, click the settings button to setup this portlet.~
--view_portlet_operations_config_completed = completed operations~
--view_portlet_operations_config_completed_enable = Whether to enable completed operations results grouping for dashboard.~
--view_portlet_operations_config_completed_maximum = Maximum number of Completed operations to display.~
--view_portlet_operations_config_scheduled_enable = Whether to enable scheduled operations results grouping for dashboard.~
--view_portlet_operations_config_scheduled_maximum = Maximum number of Scheduled operations to display.~
--view_portlet_operations_config_show_last = show Last~
--view_portlet_operations_config_show_next = show Next~
--view_portlet_operations_config_title = OperationsPortlet Configuration~
--view_portlet_operations_config_title_desc = The configuration settings for the Operations portlet.~
--view_portlet_operations_disabled = (Results currently disabled. Change settings to enable results.~
--view_portlet_operations_help_msg = This portlet displays both operations that have occurred and are scheduled to occur.~
--view_portlet_platform_help_msg = This portlet displays information about platforms in inventory.~
--view_portlet_platform_platform_error_1 = Failed to load platform metrics~
--view_portlet_platform_title = Platforms Summary~
--view_portlet_platform_type_error_1 = Could not load type data~
++view_portlet_mashup_config_title = MashupPorlet Configuration
++view_portlet_mashup_config_title_desc = The configuration settings for the mashup portlet.
++view_portlet_mashup_help = This portlet can include a web page via an HTTP request into an iframe on the dashboard.
++view_portlet_mashup_unconfigured = Page address not yet configured, click the settings button to setup this portlet.
++view_portlet_message_config_title = MessagePortlet Configuration
++view_portlet_message_config_title_desc = The configuration settings for the message portlet.
++view_portlet_message_help = This portlet can display an HTML message on the dashboard.
++view_portlet_message_title = Message
++view_portlet_message_unconfigured = Message not yet configured, click the settings button to setup this portlet.
++view_portlet_operations_config_completed = completed operations
++view_portlet_operations_config_completed_enable = Whether to enable completed operations results grouping for dashboard.
++view_portlet_operations_config_completed_maximum = Maximum number of Completed operations to display.
++view_portlet_operations_config_scheduled_enable = Whether to enable scheduled operations results grouping for dashboard.
++view_portlet_operations_config_scheduled_maximum = Maximum number of Scheduled operations to display.
++view_portlet_operations_config_show_last = show Last
++view_portlet_operations_config_show_next = show Next
++view_portlet_operations_config_title = OperationsPortlet Configuration
++view_portlet_operations_config_title_desc = The configuration settings for the Operations portlet.
++view_portlet_operations_disabled = (Results currently disabled. Change settings to enable results.
++view_portlet_operations_help_msg = This portlet displays both operations that have occurred and are scheduled to occur.
++view_portlet_platform_help_msg = This portlet displays information about platforms in inventory.
++view_portlet_platform_platform_error_1 = Failed to load platform metrics
++view_portlet_platform_title = Platforms Summary
++view_portlet_platform_type_error_1 = Could not load type data
view_portlet_problemResources_config_display_maximum = Maximum number of Problem resources to display.
view_portlet_problemResources_config_display_range = Show problem resources going back this many hours.
view_portlet_problemResources_config_display_range2 = From {0} to {1}
view_portlet_problemResources_maxDisplaySetting = maximum resources.
--view_portlet_problem_resources_config_display_maximum = Maximum number of Problem resources to display.~
--view_portlet_problem_resources_config_display_range = Show problem resources going back this many hours.~
--view_portlet_problem_resources_config_display_range2 = From {0} to {1}~
--view_portlet_problem_resources_config_problem_label = problem resources on dashboard.~
--view_portlet_problem_resources_config_title = ProblemResourcesPortlet Configuration~
--view_portlet_problem_resources_config_title_desc = The configuration settings for the Problem resources portlet.~
--view_portlet_problem_resources_help = This portlet displays resources that have reported alerts or Down availability.~
--view_portlet_problem_resources_title = Has Alerts or Currently Unavailable~
--view_portlet_recentAlerts_config_members = Select Members~
--view_portlet_recentAlerts_config_priority_label = priority Alerts,~
--view_portlet_recentAlerts_config_when = within the past~
++view_portlet_problem_resources_config_display_maximum = Maximum number of Problem resources to display.
++view_portlet_problem_resources_config_display_range = Show problem resources going back this many hours.
++view_portlet_problem_resources_config_display_range2 = From {0} to {1}
++view_portlet_problem_resources_config_problem_label = problem resources on dashboard.
++view_portlet_problem_resources_config_title = ProblemResourcesPortlet Configuration
++view_portlet_problem_resources_config_title_desc = The configuration settings for the Problem resources portlet.
++view_portlet_problem_resources_help = This portlet displays resources that have reported alerts or Down availability.
++view_portlet_problem_resources_title = Has Alerts or Currently Unavailable
++view_portlet_recentAlerts_config_members = Select Members
++view_portlet_recentAlerts_config_priority_label = priority Alerts,
++view_portlet_recentAlerts_config_when = within the past
view_portlet_recentAlerts_fail_msg = Failed to load resources assigned for alert filtering.
--view_portlet_recentAlerts_help_msg = Displays recent alerts fired on resources visible to the current user login.~
--view_portlet_recentAlerts_title = Recent Alerts~
--view_portlet_recentlyAdded_approved_platforms = recently approved platforms on dashboard.~
--view_portlet_recentlyAdded_error1 = Failed to load recently added resources~
--view_portlet_recentlyAdded_help_msg = This portlet displays resources that have recently been imported into the inventory.~
++view_portlet_recentAlerts_help_msg = Displays recent alerts fired on resources visible to the current user login.
++view_portlet_recentAlerts_title = Recent Alerts
++view_portlet_recentlyAdded_approved_platforms = recently approved platforms on dashboard.
++view_portlet_recentlyAdded_error1 = Failed to load recently added resources
++view_portlet_recentlyAdded_help_msg = This portlet displays resources that have recently been imported into the inventory.
view_portlet_recentlyAdded_setting_addedPlatforms = recently added platforms
--view_portlet_recentlyAdded_title = Recently Added Portlet~
++view_portlet_recentlyAdded_title = Recently Added Portlet
view_portlet_results_empty = No results found using specified criteria.
--view_portlet_tagCloud_help = portlet displays the relative tag counts in the system visible to the current user.~
--view_portlet_tagCloud_title = TagCloud~
++view_portlet_tagCloud_help = portlet displays the relative tag counts in the system visible to the current user.
++view_portlet_tagCloud_title = TagCloud
view_remoteAgentInstall_agentStatus = Status do Agente
view_remoteAgentInstall_agentStatusDefault = -Pressione o Bot\u00E3o Atualizar Status-
view_remoteAgentInstall_buttonFindAgent = Procurar Agente
@@@ -1625,22 -1662,22 +1666,22 @@@ view_remoteAgentInstall_promptUser = No
view_remoteAgentInstall_result = Resultado
view_remoteAgentInstall_resultCode = ResultCode
view_remoteAgentInstall_startAgent = Iniciar Agente
- view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente\: [{0}]
-view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente: [{0}]
++view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente\\\\\\\\: [{0}]
view_remoteAgentInstall_step = Step
view_remoteAgentInstall_stopAgent = Parar Agente
- view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente\: [{0}]
-view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente: [{0}]
++view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente\\\\\\\\: [{0}]
view_remoteAgentInstall_success = Instala\u00E7\u00E3o do Agente finalizada
view_remoteAgentInstall_updateStatus = Status da Atualiza\u00E7\u00E3o
--view_reportsTop_description = This section provides access to global reports.~
++view_reportsTop_description = This section provides access to global reports.
view_reportsTop_title = Relat\u00F3rios
--view_reports_alertDefinitions = Defini\u00E7\u00E3o de Alertas~
++view_reports_alertDefinitions = Defini\u00E7\u00E3o de Alertas
view_reports_alertDefinitions_parentHover = Click to go to the parent alert definition
view_reports_alertDefinitions_resTypeLoadError = Cannot get the template resource type - unable to view the alert template.
view_reports_inventorySummary_failFetch = Failed to get inventory summary
--view_reports_platforms = Utiliza\u00E7\u00E3o de Mem\u00F3ria e CPU~
--view_reports_subsystems = Subsistemas~
--view_resourceResourceGroupList_error_fetchFailure = Failed to fetch Resource''s groups.~
--view_resourceResourceGroupList_error_updateFailure = Failed to update assigned Resource groups.~
++view_reports_platforms = Utiliza\u00E7\u00E3o de Mem\u00F3ria e CPU
++view_reports_subsystems = Subsistemas
++view_resourceResourceGroupList_error_fetchFailure = Failed to fetch Resource''s groups.
++view_resourceResourceGroupList_error_updateFailure = Failed to update assigned Resource groups.
view_resourceResourceGroupList_message_updateSuccess = Group membership updated for [{0}].
view_resource_inventory_activity_changed_by = Changed by
view_resource_inventory_activity_criteria_no_recent_events = No event counts based off display criteria.
@@@ -1657,183 -1694,184 +1698,184 @@@ view_resource_inventory_childhistory_de
view_resource_inventory_childhistory_filterTitle = Past N Days
view_resource_inventory_childhistory_status_invalidArtifact = Invalid Artifact
view_resource_inventory_childhistory_status_invalidConfig = Invalid Configuration
--view_resource_monitor_availability_loadFailed = Failed to load availability history~
--view_resource_monitor_calltime_average = Average~
--view_resource_monitor_calltime_count = Count~
--view_resource_monitor_calltime_destination = Call Destination~
--view_resource_monitor_calltime_editFailed = Call time data can not be edited~
--view_resource_monitor_calltime_loadFailed = Could not load call time data~
--view_resource_monitor_calltime_lookupFailed = Could not load resource for call time~
--view_resource_monitor_calltime_maximum = Maximum~
--view_resource_monitor_calltime_minimum = Minimum~
--view_resource_monitor_calltime_title = Call Time Data~
--view_resource_monitor_calltime_total = Total~
--view_resource_monitor_detailed_graph_label = Detailed Graph~
--view_resource_monitor_graph_instructions = Point your mouse to a data point on the chart~
--view_resource_monitor_graph_live_tooltip = Click for a live graph of current values~
--view_resource_monitor_graphs_loadFailed = Failed to load graph data~
--view_resource_monitor_graphs_lookupFailed = Failed to find resource for graph~
--view_resource_monitor_graphs_noneAvailable = No graphs available~
--view_resource_monitor_schedules_title = Resource Metric Collection Schedules~
++view_resource_monitor_availability_loadFailed = Failed to load availability history
++view_resource_monitor_calltime_average = Average
++view_resource_monitor_calltime_count = Count
++view_resource_monitor_calltime_destination = Call Destination
++view_resource_monitor_calltime_editFailed = Call time data can not be edited
++view_resource_monitor_calltime_loadFailed = Could not load call time data
++view_resource_monitor_calltime_lookupFailed = Could not load resource for call time
++view_resource_monitor_calltime_maximum = Maximum
++view_resource_monitor_calltime_minimum = Minimum
++view_resource_monitor_calltime_title = Call Time Data
++view_resource_monitor_calltime_total = Total
++view_resource_monitor_detailed_graph_label = Detailed Graph
++view_resource_monitor_graph_instructions = Point your mouse to a data point on the chart
++view_resource_monitor_graph_live_tooltip = Click for a live graph of current values
++view_resource_monitor_graphs_loadFailed = Failed to load graph data
++view_resource_monitor_graphs_lookupFailed = Failed to find resource for graph
++view_resource_monitor_graphs_noneAvailable = No graphs available
++view_resource_monitor_schedules_title = Resource Metric Collection Schedules
view_resource_monitor_table_alerts = Alerts
view_resource_monitor_table_avg = Average
view_resource_monitor_table_last = Last
view_resource_monitor_table_max = Maximum
view_resource_monitor_table_min = Minimum
--view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details~
--view_resource_title_tagUpdateFailed = Failed to update resource tags~
++view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
++view_resource_title_tagUpdateFailed = Failed to update resource tags
view_searchBar_defaultPattern = definir nome para o padr\u00E3o
view_searchBar_error_selectSavedSearch = ''Erro ao selecionar a pesquisa''
view_searchBar_query = Pesquisa
view_searchBar_resourceGroups = Grupos de Recursos
view_searchBar_resources = Recursos
view_searchBar_welcomeMessage = procurar por {0}s
--view_searchGUI_loginStatus = Imposs\u00EDvel determinar o status do login, verifique o status do servidor~
++view_searchGUI_loginStatus = Imposs\u00EDvel determinar o status do login, verifique o status do servidor
view_selector_assigned = Associado {0}
view_selector_available = Dispon\u00EDvel {0}
view_subTab_error_disabled = N\u00E3o \u00E9 poss\u00EDvel selecionar uma subTab desabilidada [{0}].
view_summaryDashboard_resetConfirm = Reset to default summary dashboard (lose local changes)?
--view_summaryOverviewForm_error_descriptionChangeFailure = Failed to change description of Resource with id {0} from [{1}] to [{2}].~
--view_summaryOverviewForm_error_locationChangeFailure = Failed to change location of Resource with id {0} from [{1}] to [{2}].~
--view_summaryOverviewForm_error_nameChangeFailure = Failed to change name of Resource with id {0} from [{1}] to [{2}].~
--view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.~
--view_summaryOverviewForm_field_description = Description~
--view_summaryOverviewForm_field_location = Location~
--view_summaryOverviewForm_field_name = Name~
--view_summaryOverviewForm_field_parent = Parent~
--view_summaryOverviewForm_field_type = Type~
--view_summaryOverviewForm_field_version = Version~
--view_summaryOverviewForm_header_summary = Summary~
++view_summaryOverviewForm_error_descriptionChangeFailure = Failed to change description of Resource with id {0} from [{1}] to [{2}].
++view_summaryOverviewForm_error_locationChangeFailure = Failed to change location of Resource with id {0} from [{1}] to [{2}].
++view_summaryOverviewForm_error_nameChangeFailure = Failed to change name of Resource with id {0} from [{1}] to [{2}].
++view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.
++view_summaryOverviewForm_field_description = Description
++view_summaryOverviewForm_field_location = Location
++view_summaryOverviewForm_field_name = Name
++view_summaryOverviewForm_field_parent = Parent
++view_summaryOverviewForm_field_type = Type
++view_summaryOverviewForm_field_version = Version
++view_summaryOverviewForm_header_summary = Summary
view_summaryOverviewForm_label_plugin = Plugin:
view_summaryOverviewForm_label_type = Type:
--view_summaryOverviewForm_message_descriptionChangeSuccess = Description of Resource with id {0} was changed from [{1}] to [{2}].~
--view_summaryOverviewForm_message_locationChangeSuccess = Location of Resource with id {0} was changed from [{1}] to [{2}].~
--view_summaryOverviewForm_message_nameChangeSuccess = Name of Resource with id {0} was changed from [{1}] to [{2}].~
--view_summaryOverview_header_detectedErrors = Detected Errors~
--view_summaryOverview_title_errorDetailsWindow = Error Details~
--view_summaryOverview_tooltip_detectedErrors = Click on the rows to see the error details.~
++view_summaryOverviewForm_message_descriptionChangeSuccess = Description of Resource with id {0} was changed from [{1}] to [{2}].
++view_summaryOverviewForm_message_locationChangeSuccess = Location of Resource with id {0} was changed from [{1}] to [{2}].
++view_summaryOverviewForm_message_nameChangeSuccess = Name of Resource with id {0} was changed from [{1}] to [{2}].
++view_summaryOverview_header_detectedErrors = Detected Errors
++view_summaryOverview_title_errorDetailsWindow = Error Details
++view_summaryOverview_tooltip_detectedErrors = Click on the rows to see the error details.
view_tableSection_backButton = Voltar \u00E0 Lista
--view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug~
--view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.~
++view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug
++view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.
view_table_drawFail = Failed to draw Table [{0}].
view_table_matchingRows = Matching Rows: {0} (selected: {1})
- view_table_totalRows = Total de Linhas\: {0} (selecionada\: {1})
-view_table_totalRows = Total de Linhas: {0} (selecionada: {1})
++view_table_totalRows = Total de Linhas\\\\\\\\: {0} (selecionada\\\\\\\\: {1})
view_tabs_common_activity = Activity
view_tabs_common_agent = Agent
--view_tabs_common_alerts = Alerts~
--view_tabs_common_availability = Availability~
--view_tabs_common_calltime = Calltime~
--view_tabs_common_child_history = Child History~
--view_tabs_common_child_resources = Child Resources~
--view_tabs_common_configuration = Configuration~
--view_tabs_common_connectionSettings = Connection Settings~
--view_tabs_common_connectionSettingsHistory = Connection Settings History~
--view_tabs_common_content = Content~
--view_tabs_common_current = Current~
--view_tabs_common_dashboard = Dashboard~
--view_tabs_common_definitions = Definitions~
--view_tabs_common_deployed = Deployed~
- view_tabs_common_events = Events~
- view_tabs_common_graphs = Graphs~
++view_tabs_common_alerts = Alerts
++view_tabs_common_availability = Availability
++view_tabs_common_calltime = Calltime
++view_tabs_common_child_history = Child History
++view_tabs_common_child_resources = Child Resources
++view_tabs_common_configuration = Configuration
++view_tabs_common_connectionSettings = Connection Settings
++view_tabs_common_connectionSettingsHistory = Connection Settings History
++view_tabs_common_content = Content
++view_tabs_common_current = Current
++view_tabs_common_dashboard = Dashboard
++view_tabs_common_definitions = Definitions
++view_tabs_common_deployed = Deployed
+ ##view_tabs_common_drift = Drift
-view_tabs_common_events = Events~
-view_tabs_common_graphs = Graphs~
++view_tabs_common_events = Events
++view_tabs_common_graphs = Graphs
view_tabs_common_group_members = Group Members
--view_tabs_common_group_membership = Group Membership~
--view_tabs_common_groups = Groups~
--view_tabs_common_history = History~
--view_tabs_common_inventory = Inventory~
--view_tabs_common_members = Members~
--view_tabs_common_monitoring = Monitoring~
--view_tabs_common_new = New~
--view_tabs_common_operations = Operations~
--view_tabs_common_overview = Overview~
++view_tabs_common_group_membership = Group Membership
++view_tabs_common_groups = Groups
++view_tabs_common_history = History
++view_tabs_common_inventory = Inventory
++view_tabs_common_members = Members
++view_tabs_common_monitoring = Monitoring
++view_tabs_common_new = New
++view_tabs_common_operations = Operations
++view_tabs_common_overview = Overview
view_tabs_common_schedule = Schedule
--view_tabs_common_scheduled = Scheduled~
--view_tabs_common_schedules = Schedules~
--view_tabs_common_subscriptions = Subscriptions~
--view_tabs_common_summary = Summary~
--view_tabs_common_tables = Tables~
--view_tabs_common_timeline = Timeline~
--view_tabs_common_traits = Traits~
++view_tabs_common_scheduled = Scheduled
++view_tabs_common_schedules = Schedules
++view_tabs_common_subscriptions = Subscriptions
++view_tabs_common_summary = Summary
++view_tabs_common_tables = Tables
++view_tabs_common_timeline = Timeline
++view_tabs_common_traits = Traits
view_tabs_invalidSubTab = Invalid subtab: {0}
view_tabs_invalidTab = Invalid tab: {0}
view_tagCloud_deleteTag = Delete Tag
view_tagCloud_deleteTagFailure = Failed to delete the tag [{0}]
view_tagCloud_deleteTagSuccess = You successfully deleted the tag [{0}]
--view_tagCloud_error_fetchFailure = Falha ao carregar etiquetas (tags).~
--view_tagCloud_error_tagUsedCount = Etiqueta (tag) usada {0} vezes.~
--view_tagCloud_title = Nuvem de Tags~
--view_taggedResources_title = Recursos Etiquetados~
--view_tags_error_1 = Failed to load Tags~
--view_tags_tags = Tags~
--view_tags_title = Tags:~
--view_tags_tooltip_1 = Click to remove this Tag~
--view_tags_tooltip_2 = Click to edit Tags~
++view_tagCloud_error_fetchFailure = Falha ao carregar etiquetas (tags).
++view_tagCloud_error_tagUsedCount = Etiqueta (tag) usada {0} vezes.
++view_tagCloud_title = Nuvem de Tags
++view_taggedResources_title = Recursos Etiquetados
++view_tags_error_1 = Failed to load Tags
++view_tags_tags = Tags
++view_tags_title = Tags:
++view_tags_tooltip_1 = Click to remove this Tag
++view_tags_tooltip_2 = Click to edit Tags
view_tags_tooltip_3 = Enter a Tag in the format: (namespace:)(semantic = )tagname (e.g. it:env = QA, or owner = John)
--view_testTop_description = Esta se\u00E7\u00E3o cont\u00E9m p\u00E1ginas para realiza\u00E7\u00E3o de testes em v\u00E1rios componentes UI.~
--view_testTop_title = Teste~
--view_titleBar_common_addedFav = You have added [{0}] as a favorite~
--view_titleBar_common_addedFavFailure = Failed to add [{0}] as a favorite~
--view_titleBar_common_clickToAddFav = Click to add this as a favorite~
--view_titleBar_common_clickToRemoveFav = Click to remove this as a favorite~
--view_titleBar_common_loadTagsFailure = Failed to load the tags for [{0}]~
--view_titleBar_common_removedFav = You have removed [{0}] as one of your favorites~
--view_titleBar_common_removedFavFailure = Failed to remove [{0}] as one of your favorites~
--view_titleBar_common_updateTagsFailure = Failed to update the tags for [{0}]~
--view_titleBar_common_updateTagsSuccessful = The tags for [{0}] have been updated~
++view_testTop_description = Esta se\u00E7\u00E3o cont\u00E9m p\u00E1ginas para realiza\u00E7\u00E3o de testes em v\u00E1rios componentes UI.
++view_testTop_title = Teste
++view_titleBar_common_addedFav = You have added [{0}] as a favorite
++view_titleBar_common_addedFavFailure = Failed to add [{0}] as a favorite
++view_titleBar_common_clickToAddFav = Click to add this as a favorite
++view_titleBar_common_clickToRemoveFav = Click to remove this as a favorite
++view_titleBar_common_loadTagsFailure = Failed to load the tags for [{0}]
++view_titleBar_common_removedFav = You have removed [{0}] as one of your favorites
++view_titleBar_common_removedFavFailure = Failed to remove [{0}] as one of your favorites
++view_titleBar_common_updateTagsFailure = Failed to update the tags for [{0}]
++view_titleBar_common_updateTagsSuccessful = The tags for [{0}] have been updated
view_titleBar_group_failInfo = Failed to get general info on group [{0}] with ID [{1}]
view_titleBar_group_summary_collapsedTooltip = Click to show more details for this group
view_titleBar_group_summary_expandedTooltip = Click to hide details for this group
--view_tree_common_contextMenu_addChartToDashboard = Add chart to dashboard [{0}]~
--view_tree_common_contextMenu_chart = Chart~
--view_tree_common_contextMenu_editPluginConfiguration = Edit [{0}] Plugin Configuration~
--view_tree_common_contextMenu_editResourceConfiguration = Edit [{0}] Resource Configuration~
++view_tree_common_contextMenu_addChartToDashboard = Add chart to dashboard [{0}]
++view_tree_common_contextMenu_chart = Chart
++view_tree_common_contextMenu_editPluginConfiguration = Edit [{0}] Plugin Configuration
++view_tree_common_contextMenu_editResourceConfiguration = Edit [{0}] Resource Configuration
view_tree_common_contextMenu_groupGraph = Group Metric Graph
view_tree_common_contextMenu_loadFail_children = Failed to load platform manual add children
view_tree_common_contextMenu_loadFail_dashboards = Failed to load user dashboards
view_tree_common_contextMenu_loadFail_group = Failed to load group for context menu
view_tree_common_contextMenu_loadFailed_dashboard = Failed to load user dashboards
--view_tree_common_contextMenu_loadFailed_manualAddChildren = Failed to load platform manual add children~
--view_tree_common_contextMenu_measurements = Measurements~
--view_tree_common_contextMenu_operations = Operations~
--view_tree_common_contextMenu_operations_loadFailed = Failure to start wizard for running operations~
--view_tree_common_contextMenu_pluginConfiguration = Plugin Configuration~
--view_tree_common_contextMenu_resourceConfiguration = Resource Configuration~
++view_tree_common_contextMenu_loadFailed_manualAddChildren = Failed to load platform manual add children
++view_tree_common_contextMenu_measurements = Measurements
++view_tree_common_contextMenu_operations = Operations
++view_tree_common_contextMenu_operations_loadFailed = Failure to start wizard for running operations
++view_tree_common_contextMenu_pluginConfiguration = Plugin Configuration
++view_tree_common_contextMenu_resourceConfiguration = Resource Configuration
view_tree_common_contextMenu_resourceGraph = Resource Metric Graph
--view_tree_common_contextMenu_saveChartToDashboardFailure = Failed to save the dashboard~
--view_tree_common_contextMenu_saveChartToDashboardSuccessful = You have saved dashboard [{0}]~
++view_tree_common_contextMenu_saveChartToDashboardFailure = Failed to save the dashboard
++view_tree_common_contextMenu_saveChartToDashboardSuccessful = You have saved dashboard [{0}]
view_tree_common_contextMenu_type_name_label = Type: {0}
view_tree_common_createFailed_autoCluster = Failed to create or update autocluster backing group
--view_tree_common_loadFailed_children = Failed to load children for node~
--view_tree_common_loadFailed_create = Failed to create view for this node~
--view_tree_common_loadFailed_descendants = Failed to load descendants for tree~
--view_tree_common_loadFailed_generic = Failed to load data for tree~
++view_tree_common_loadFailed_children = Failed to load children for node
++view_tree_common_loadFailed_create = Failed to create view for this node
++view_tree_common_loadFailed_descendants = Failed to load descendants for tree
++view_tree_common_loadFailed_generic = Failed to load data for tree
view_tree_common_loadFailed_group = Failed to load group with id [{0}]
view_tree_common_loadFailed_groupTree = Failed to load group tree
--view_tree_common_loadFailed_node = Failed to load data for this node~
--view_tree_common_loadFailed_root = Failed to load root for tree~
--view_tree_common_loadFailed_selection = Failed to select this node~
--view_tree_common_loadFailed_update = Failed to update view for this node~
++view_tree_common_loadFailed_node = Failed to load data for this node
++view_tree_common_loadFailed_root = Failed to load root for tree
++view_tree_common_loadFailed_selection = Failed to select this node
++view_tree_common_loadFailed_update = Failed to update view for this node
view_tree_group_error_updateAutoCluster = Failed to create or update autocluster backing group. key: [{0}]
--view_type_parentId = Parent ID~
--view_type_resourceTypes = Resource Types~
--view_type_typeTreeLoadFailure = Failed to load resource type tree data~
--view_upload_alreadyUploaded = File has already been uploaded~
--view_upload_bundleDistFile = Distribution File~
--view_upload_error_bundleDistFile = Error uploading Bundle Distribution File~
--view_upload_error_file = Error uploading file~
--view_upload_error_fileName = Error uploading file [{0}]~
--view_upload_error_fileName_2 = Error uploading file [{0}], check for invalid file path.~
--view_upload_error_packageVersionFile = Error uploading Package Version File~
--view_upload_error_results = Error uploading file, unexpected results: [{0}]~
--view_upload_inProgress = Can not submit, upload is currently in progress~
--view_upload_prompt_1 = [{0}] File to Upload~
--view_upload_prompt_2 = File to Upload~
--view_upload_success = File successfully uploaded~
--view_upload_tooltip_1 = Select a file to upload, then click Upload or Next~
++view_type_parentId = Parent ID
++view_type_resourceTypes = Resource Types
++view_type_typeTreeLoadFailure = Failed to load resource type tree data
++view_upload_alreadyUploaded = O upload do arquivo j\\u00E1 foi realizado.
++view_upload_bundleDistFile = Arquivo de Distribui\\u00E7\\u00E3o
++view_upload_error_bundleDistFile = Erro ao fazer upload do arquivo de distribui\\u00E7\\u00E3o do bundle
++view_upload_error_file = Erro ao fazer upload do arquivo
++view_upload_error_fileName = Erro ao fazer upload do arquivo [{0}]
++view_upload_error_fileName_2 = Erro ao fazer upload do arquivo [{0}], verifique se o caminho do arquivo est\\u00E1 correto.
++view_upload_error_packageVersionFile = Erro ao fazer upload da vers\\u00E3o do pacote
++view_upload_error_results = Erro ao fazer upload do arquivo, resultados inexperados: [{0}]
++view_upload_inProgress = N\\u00E3o foi poss\\u00EDvel submeter, upload em andamento
++view_upload_prompt_1 = [{0}] File to Upload
++view_upload_prompt_2 = File to Upload
++view_upload_success = File successfully uploaded
++view_upload_tooltip_1 = Select a file to upload, then click Upload or Next
view_upload_tooltip_1a = Select a file to upload, then click Upload or Next
view_upload_tooltip_1b = Select a file to upload, then click Next
--view_upload_tooltip_2 = File upload had previously failed~
--view_upload_upload = Upload~
--view_upload_uploadFile = UploadFile~
++view_upload_tooltip_2 = File upload had previously failed
++view_upload_upload = Upload
++view_upload_uploadFile = UploadFile
widget_colorPicker_tooltip = Clique para selecionar uma nova cor
widget_durationItem_inputUnitLessThanTargetUnit = A unidade de entrada \u00E9 menor que a unidade final.
widget_durationItem_unitTypeNotSupported = Tipo de unidade [{0}] n\u00E3o suportada por este Item de Dura\u00E7\u00E3o.
@@@ -1873,7 -1911,7 +1915,7 @@@ widget_recordEditor_info_recordCreatedD
widget_recordEditor_info_recordUpdatedConcise = {0} atualizado.
widget_recordEditor_info_recordUpdatedDetailed = {0} [{1}] atualizado.
widget_recordEditor_info_recordsDeletedConcise = {0} {1} exclu\u00EDdo.
- widget_recordEditor_info_recordsDeletedDetailed = {0} {1} exclu\u00EDdo\: {2}.
-widget_recordEditor_info_recordsDeletedDetailed = {0} {1} exclu\u00EDdo: {2}.
++widget_recordEditor_info_recordsDeletedDetailed = {0} {1} exclu\u00EDdo\\\\\\\\: {2}.
widget_recordEditor_label_loading = Carregar...
widget_recordEditor_title_edit = Editar {0} [{1}]
widget_recordEditor_title_new = Criar Novo {0}
@@@ -1886,7 -1924,7 +1928,7 @@@ widget_resourceFactoryWizard_createSubm
widget_resourceFactoryWizard_createSubmitType = A requisi\u00E7\u00E3o para cria\u00E7\u00E3o de um recurso do tipo [{0}] foi submetida com sucesso.
widget_resourceFactoryWizard_createWizardTitle = Criar novo recurso do tipo [{0}]
widget_resourceFactoryWizard_createWizardWindowTitle = Assistente para Cria\u00E7\u00E3o de Recurso
- ##widget_resourceFactoryWizard_editConfigStepName = Deployment Options
-##widget_resourceFactoryWizard_editConfigStepName = Deployment Options
++widget_resourceFactoryWizard_editConfigStepName = Opções de implantação
widget_resourceFactoryWizard_execute1 = Falha ao criar novo recurso - vers\u00E3o do pacote inexistente
widget_resourceFactoryWizard_execute2 = Falha ao criar novo recurso
widget_resourceFactoryWizard_failedToDeleteVersion = Falha ao excluir a vers\u00E3o do pacote durante o cancelamento da cria\u00E7\u00E3o do recurso
@@@ -1899,7 -1937,7 +1941,7 @@@ widget_resourceFactoryWizard_infoStepNa
widget_resourceFactoryWizard_infoStep_loadFail = Falha ao recuperar Arquiteturas dispon\u00EDveis.
widget_resourceFactoryWizard_namePrompt = Novo Nome do Recurso
widget_resourceFactoryWizard_templatePrompt = Modelo de Propriedades para Conex\u00E3o
- ##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the RHQ Agent). Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
-##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the RHQ Agent). Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
++widget_resourceFactoryWizard_timeoutHelp = Duração do timeout. Se especificado irá sobrescrever o timeout padrão para criação de recursos filhos (no RHQ Agent). Útil principalmente para ações muito longas, como a implantação de uma aplição muito grande. Geralmente utilizado devido a tentativas que sofreram timeout anteriormente.
widget_resourceFactoryWizard_uploadFailure = Falha ao realizar o upload do arquivo
widget_resourceFactoryWizard_uploadFileStepName = Upload do Arquivo do Recurso
widget_resourceFactoryWizard_uploadInProgress = Upload em andamento... Esse processo pode demorar alguns minutos para ser finalizado em caso de arquivos muito grandes.
commit 1e5bcc7f18fa91f3b0923cafd332eda180e6c6f6
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Thu Jul 28 21:18:26 2011 -0400
i)Fixed a couple event log file definition issues for AS7 Managed Servers, HostController and Standalone instances.
ii)enabled Events tab for AS7 Managed Servers, HostController and Standalone
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 16b1845..7042ac0 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -79,7 +79,12 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
String description = discoveryContext.getResourceType().getDescription();
String version = null;
+ //retrieve specific boot log file. Override for Standalone as server.log is more appropriate
+ String bootLogFile = getLogFileFromCommandLine(commandLine);
+ String logFile = bootLogFile;
+
if (psName.equals("HostController")) {
+
readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
@@ -132,12 +137,10 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
fillUserPassFromFile(config, "standalone", serverNameFull);
+ //preload server.log file for event log monitoring
+ logFile = bootLogFile.substring(0, bootLogFile.lastIndexOf("/")) + File.separator + "server.log";
}
- // String logFile = getLogFileFromCommandLine(commandLine);
- //monitor the server.log instead of the boot.log
- String bootLogFile = getLogFileFromCommandLine(commandLine);
- String logFile = bootLogFile.substring(0, bootLogFile.lastIndexOf("/")) + File.separator + "server.log";
initLogEventSourcesConfigProp(logFile, config);
HostPort managmentPort = getManagementPortFromHostXml();
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index fd1b65d..287cec7 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -57,7 +57,6 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext discoveryContext) throws Exception {
Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
-
List<ProcessScanResult> scans = discoveryContext.getAutoDiscoveredProcesses();
for (ProcessScanResult psr : scans) {
@@ -74,51 +73,44 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
String hostName = findHostName();
HostPort managementHostPort = getManagementPortFromHostXml();
-
List<ServerInfo> serverNames = getServersFromHostXml();
for (ServerInfo serverInfo : serverNames) {
Configuration config = discoveryContext.getDefaultPluginConfiguration();
- config.put(new PropertySimple("domainHost",hostName));
- config.put(new PropertySimple("group",serverInfo.group));
- config.put(new PropertySimple("port",managementHostPort.port));
- config.put(new PropertySimple("hostname",managementHostPort.host));
- if (serverInfo.bindingGroup!=null) {
- config.put(new PropertySimple("socket-binding-group",serverInfo.bindingGroup));
- config.put(new PropertySimple("socket-binding-port-offset",serverInfo.portOffset));
- }
- else {
+ config.put(new PropertySimple("domainHost", hostName));
+ config.put(new PropertySimple("group", serverInfo.group));
+ config.put(new PropertySimple("port", managementHostPort.port));
+ config.put(new PropertySimple("hostname", managementHostPort.host));
+ if (serverInfo.bindingGroup != null) {
+ config.put(new PropertySimple("socket-binding-group", serverInfo.bindingGroup));
+ config.put(new PropertySimple("socket-binding-port-offset", serverInfo.portOffset));
+ } else {
HostPort dcHP = getDomainControllerFromHostXml();
if (dcHP.port == 9999)
- dcHP.port = 9990; // TODO Hack until JBAS-9306 is solved
+ dcHP.port = 9990; // TODO Hack until JBAS-9306 is solved
ServerInfo dcInfo = getBindingsFromDC(dcHP, serverInfo.group);
config.put(new PropertySimple("socket-binding-group", dcInfo.bindingGroup));
- config.put(new PropertySimple("socket-binding-port-offset",dcInfo.portOffset));
+ config.put(new PropertySimple("socket-binding-port-offset", dcInfo.portOffset));
}
- config.put(new PropertySimple("socket-binding-port-offset",serverInfo.portOffset));
+ config.put(new PropertySimple("socket-binding-port-offset", serverInfo.portOffset));
String path = "host=" + hostName + ",server-config=" + serverInfo.name;
- config.put(new PropertySimple("path",path));
-
-
+ config.put(new PropertySimple("path", path));
// TODO this fails for the downed servers.
// get from the domain or other place as soon as the domain provides it.
String homeDir = getHomeDirFromCommandLine(processInfo.getCommandLine());
initLogFile(scans, serverInfo.name, config, homeDir);
- String version = homeDir.substring(homeDir.lastIndexOf("-")+1);
+ String version = homeDir.substring(homeDir.lastIndexOf("-") + 1);
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
- discoveryContext.getResourceType(), // ResourceType
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), // ResourceType
hostName + "/" + serverInfo.name, // key
- serverInfo.name, // Name
- version, // TODO get from Domain as soon as it is provided
+ serverInfo.name, // Name
+ version, // TODO get from Domain as soon as it is provided
"Managed AS 7 instance", // Description
- config,
- null
- );
+ config, null);
// Add to return values
discoveredResources.add(detail);
@@ -129,9 +121,9 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
}
private ServerInfo getBindingsFromDC(HostPort domainController, String serverGroup) {
- ASConnection dcConnection = new ASConnection(domainController.host,domainController.port);
+ ASConnection dcConnection = new ASConnection(domainController.host, domainController.port);
List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>();
- address.add(new PROPERTY_VALUE("server-group",serverGroup));
+ address.add(new PROPERTY_VALUE("server-group", serverGroup));
Operation op = new ReadResource(address);
ComplexResult res = (ComplexResult) dcConnection.execute(op, true);
if (res.isSuccess()) {
@@ -162,10 +154,12 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
String[] commandLine = psr.getProcessInfo().getCommandLine();
- String logFile = basePath + File.separator + getLogFileFromCommandLine(commandLine);
+ //preload server.log file for event log monitoring
+ String bootLogFile = getLogFileFromCommandLine(commandLine);
+ String logFile = bootLogFile.substring(0, bootLogFile.lastIndexOf("/")) + File.separator + "server.log";
if (logFile.contains(name))
- initLogEventSourcesConfigProp(logFile,config);
+ initLogEventSourcesConfigProp(logFile, config);
}
}
@@ -173,17 +167,17 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
Element host = hostXml.getDocumentElement();
NodeList serversElement = host.getElementsByTagName("servers");
- if (serversElement ==null || serversElement.getLength()==0) {
+ if (serversElement == null || serversElement.getLength() == 0) {
log.warn("No <servers> found in host.xml");
return Collections.emptyList();
}
NodeList servers = serversElement.item(0).getChildNodes();
- if (servers==null || servers.getLength()==0) {
+ if (servers == null || servers.getLength() == 0) {
log.warn("No <server> found in host.xml");
return Collections.emptyList();
}
List<ServerInfo> result = new ArrayList<ServerInfo>();
- for (int i = 0 ; i < servers.getLength(); i++) {
+ for (int i = 0; i < servers.getLength(); i++) {
if (!(servers.item(i) instanceof Element))
continue;
@@ -192,14 +186,14 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
info.name = server.getAttribute("name");
info.group = server.getAttribute("group");
String autoStart = server.getAttribute("autoStart");
- if (autoStart==null || autoStart.isEmpty())
+ if (autoStart == null || autoStart.isEmpty())
autoStart = "false";
info.autoStart = Boolean.getBoolean(autoStart);
// Look for <socket-binding-group ref="standard-sockets" port-offset="250"/>
NodeList sbgs = server.getChildNodes();
- if (sbgs!=null) {
- for (int j = 0 ; j < sbgs.getLength(); j++) {
+ if (sbgs != null) {
+ for (int j = 0; j < sbgs.getLength(); j++) {
if (!(sbgs.item(j) instanceof Element))
continue;
@@ -209,7 +203,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
info.bindingGroup = sbg.getAttribute("ref");
String portOffset = sbg.getAttribute("port-offset");
- if (portOffset!=null && !portOffset.isEmpty())
+ if (portOffset != null && !portOffset.isEmpty())
info.portOffset = Integer.parseInt(portOffset);
}
@@ -220,13 +214,12 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
return result;
}
-
private void initLogEventSourcesConfigProp(String fileName, Configuration pluginConfiguration) {
PropertyList logEventSources = pluginConfiguration
.getList(LogFileEventResourceComponentHelper.LOG_EVENT_SOURCES_CONFIG_PROP);
- if (logEventSources==null)
+ if (logEventSources == null)
return;
File serverLogFile = new File(fileName);
@@ -250,10 +243,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
@Override
public String toString() {
- return "ServerInfo{" +
- "name='" + name + '\'' +
- ", group='" + group + '\'' +
- '}';
+ return "ServerInfo{" + "name='" + name + '\'' + ", group='" + group + '\'' + '}';
}
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 20395e0..737ef86 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -50,7 +50,7 @@
xmlns:c="urn:xmlns:rhq-configuration"
>
-<!-- <depends plugin="JMX" useClasses="true"/> -->
+ <depends plugin="JMX" useClasses="true"/>
<!-- TODO I think we should introduce an abstract AS7 plugin that contains some base functionality and then
@@ -92,6 +92,40 @@
<c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
&logSources;
+ <c:group name="event" displayName="Events">
+ <c:list-property name="logEventSources">
+ <c:map-property name="logEventSource">
+ <c:simple-property name="logFilePath" type="file" summary="true"
+ description="The absolute path to the source log file."/>
+ <c:simple-property name="enabled" type="boolean" summary="true"
+ description="A flag indicating whether of not this log Event source is currently
+ enabled (i.e. whether the associated log file should be tailed for
+ new entries)."/>
+ <c:simple-property name="dateFormat" required="false"
+ description="The date format to use when parsing the dates in log entries. The
+ format must be in the syntax defined by the Java SimpleDateFormat
+ class. If not specified, the three date formats that are predefined
+ by Log4J (ISO8601, DATE, and ABSOLUTE) will be tried."/>
+ <c:simple-property name="includesPattern" required="false"
+ description="A regular expression against which a log entry's detail is matched
+ to determine if an Event should be fired for that entry. If not
+ specified, no filtering of log entries will be done based on their
+ detail."/>
+ <c:simple-property name="minimumSeverity" required="false" default="error"
+ description="The minimum severity of Events that should be collected for this
+ source. If not specified, there is no minimum severity (i.e. all
+ events will be collected).">
+ <c:property-options>
+ <c:option name="debug" value="debug"/>
+ <c:option name="info" value="info"/>
+ <c:option name="warn" value="warn"/>
+ <c:option name="error" value="error"/>
+ <c:option name="fatal" value="fatal"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
</plugin-configuration>
<process-scan name="HostController" query="process|basename|match=^java.*,arg|org.jboss.as.host-controller|match=.*"/>
@@ -172,6 +206,7 @@
displayType="summary" measurementType="dynamic" description="Max time for a request since last metric get" units="milliseconds"
displayName="Maximum request time"/>
+ <event name="logEntry" description="an entry in a log file"/>
<resource-configuration>
<c:group name="attribute:schema-locations" displayName="Schema locations">
@@ -319,6 +354,41 @@
</c:map-property>
</c:list-property>
&logSources;
+
+ <c:group name="event" displayName="Events">
+ <c:list-property name="logEventSources">
+ <c:map-property name="logEventSource">
+ <c:simple-property name="logFilePath" type="file" summary="true"
+ description="The absolute path to the source log file."/>
+ <c:simple-property name="enabled" type="boolean" summary="true"
+ description="A flag indicating whether of not this log Event source is currently
+ enabled (i.e. whether the associated log file should be tailed for
+ new entries)."/>
+ <c:simple-property name="dateFormat" required="false"
+ description="The date format to use when parsing the dates in log entries. The
+ format must be in the syntax defined by the Java SimpleDateFormat
+ class. If not specified, the three date formats that are predefined
+ by Log4J (ISO8601, DATE, and ABSOLUTE) will be tried."/>
+ <c:simple-property name="includesPattern" required="false"
+ description="A regular expression against which a log entry's detail is matched
+ to determine if an Event should be fired for that entry. If not
+ specified, no filtering of log entries will be done based on their
+ detail."/>
+ <c:simple-property name="minimumSeverity" required="false" default="error"
+ description="The minimum severity of Events that should be collected for this
+ source. If not specified, there is no minimum severity (i.e. all
+ events will be collected).">
+ <c:property-options>
+ <c:option name="debug" value="debug"/>
+ <c:option name="info" value="info"/>
+ <c:option name="warn" value="warn"/>
+ <c:option name="error" value="error"/>
+ <c:option name="fatal" value="fatal"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
</plugin-configuration>
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
@@ -356,6 +426,7 @@
displayType="summary" measurementType="dynamic" description="Max time for a request since last metric get" units="milliseconds"
displayName="Maximum request time"/>
+ <event name="logEntry" description="an entry in a log file"/>
<resource-configuration>
@@ -396,6 +467,40 @@
<c:simple-property name="path" readOnly="true" />
&logSources;
+ <c:group name="event" displayName="Events">
+ <c:list-property name="logEventSources">
+ <c:map-property name="logEventSource">
+ <c:simple-property name="logFilePath" type="file" summary="true"
+ description="The absolute path to the source log file."/>
+ <c:simple-property name="enabled" type="boolean" summary="true"
+ description="A flag indicating whether of not this log Event source is currently
+ enabled (i.e. whether the associated log file should be tailed for
+ new entries)."/>
+ <c:simple-property name="dateFormat" required="false"
+ description="The date format to use when parsing the dates in log entries. The
+ format must be in the syntax defined by the Java SimpleDateFormat
+ class. If not specified, the three date formats that are predefined
+ by Log4J (ISO8601, DATE, and ABSOLUTE) will be tried."/>
+ <c:simple-property name="includesPattern" required="false"
+ description="A regular expression against which a log entry's detail is matched
+ to determine if an Event should be fired for that entry. If not
+ specified, no filtering of log entries will be done based on their
+ detail."/>
+ <c:simple-property name="minimumSeverity" required="false" default="error"
+ description="The minimum severity of Events that should be collected for this
+ source. If not specified, there is no minimum severity (i.e. all
+ events will be collected).">
+ <c:property-options>
+ <c:option name="debug" value="debug"/>
+ <c:option name="info" value="info"/>
+ <c:option name="warn" value="warn"/>
+ <c:option name="error" value="error"/>
+ <c:option name="fatal" value="fatal"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
</plugin-configuration>
<!-- Scan for host controller is intentional -->
@@ -421,10 +526,12 @@
<metric property="status" dataType="trait" displayName="Server state" description="Detailed server state"
displayType="summary"/>
+ <event name="logEntry" description="an entry in a log file"/>
+
</server>
-<!--
+
<server name="JBoss AS JVM"
description="JVM of the standalone JBossAS"
sourcePlugin="JMX"
@@ -439,7 +546,7 @@
<parent-resource-type name="ProcessController" plugin="jboss-as-7"/>
</runs-inside>
</server>
--->
+
<server name="Messaging"
discovery="SubsystemDiscovery"
commit 2bc8c7f203b615a1d78b624330506429162de874
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Thu Jul 28 09:21:19 2011 -0400
-removing milton dependencies form eclipse cp.
-modify standalone as7 to monitor server.log instead of boot.log for event sources.
diff --git a/.classpath b/.classpath
index f8941f4..b8a0ea8 100644
--- a/.classpath
+++ b/.classpath
@@ -82,7 +82,6 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.1.0.SP1/jboss-seam-ui-2.1.0.SP1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/hibernate/hibernate3/3.2.r14201-2/hibernate3-3.2.r14201-2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/com/ettrema/milton-api/1.4.1/milton-api-1.4.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/javassist/3.8.0.GA/javassist-3.8.0.GA.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/net/sf/opencsv/opencsv/1.8/opencsv-1.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/bouncycastle/bcpg-jdk15/140/bcpg-jdk15-140.jar"/>
@@ -117,7 +116,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-orm/3.1/unitils-orm-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-testng/3.1/unitils-testng-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar"/>
<classpathentry exported="true" kind="lib" path="modules/enterprise/remoting/webservices/target/rhq-remoting-webservices-4.1.0-SNAPSHOT/wsconsume-output"/>
<classpathentry kind="src" path="modules/common/ant-bundle/src/main/java"/>
<classpathentry kind="src" path="modules/common/drift/src/main/java"/>
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 471fd42..16b1845 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -65,7 +65,6 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext discoveryContext) throws Exception {
Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
-
List<ProcessScanResult> scans = discoveryContext.getAutoDiscoveredProcesses();
for (ProcessScanResult psr : scans) {
@@ -87,86 +86,84 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
serverName = "DomainController";
serverNameFull = "DomainController";
description = "Domain controller for an AS7 domain";
- }
- else {
+ } else {
serverName = "HostController";
serverNameFull = "HostController";
}
String homeDir = getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine());
config.put(new PropertySimple("baseDir", homeDir));
- version = homeDir.substring(homeDir.lastIndexOf("-")+1);
- config.put(new PropertySimple("startScript","bin/domain.sh"));
- String host = findHost(psr.getProcessInfo(),true);
- config.put(new PropertySimple("domainHost",host));
+ version = homeDir.substring(homeDir.lastIndexOf("-") + 1);
+ config.put(new PropertySimple("startScript", "bin/domain.sh"));
+ String host = findHost(psr.getProcessInfo(), true);
+ config.put(new PropertySimple("domainHost", host));
- fillUserPassFromFile(config,"domain",homeDir);
+ fillUserPassFromFile(config, "domain", homeDir);
// TODO provide running config
} else { // Standalone server
serverNameFull = getHomeDirFromCommandLine(commandLine);
readStandaloneOrHostXml(psr.getProcessInfo(), false);
- if (serverNameFull==null || serverNameFull.isEmpty()) {
+ if (serverNameFull == null || serverNameFull.isEmpty()) {
// Try to obtain the server name
// -Dorg.jboss.boot.log.file=domain/servers/server-one/log/boot.log
// This is a hack until I know a better way to do so.
String tmp = getLogFileFromCommandLine(commandLine);
int i = tmp.indexOf("servers/");
- tmp = tmp.substring( i + 8);
- tmp = tmp.substring(0,tmp.indexOf("/"));
+ tmp = tmp.substring(i + 8);
+ tmp = tmp.substring(0, tmp.indexOf("/"));
serverNameFull = tmp;
+
}
- String host = findHost(psr.getProcessInfo(),true);
- config.put(new PropertySimple("domainHost",host));
+ String host = findHost(psr.getProcessInfo(), true);
+ config.put(new PropertySimple("domainHost", host));
+
+ config.put(new PropertySimple("baseDir", serverNameFull));
- config.put(new PropertySimple("baseDir",serverNameFull));
serverName = findHostName();
if (serverName.isEmpty())
serverName = serverNameFull;
- version = serverName.substring(serverName.lastIndexOf("-")+1);
+ version = serverName.substring(serverName.lastIndexOf("-") + 1);
String serverConfig = getServerConfigFromCommandLine(commandLine);
- config.put(new PropertySimple("config",serverConfig));
- config.put(new PropertySimple("startScript","bin/standalone.sh"));
+ config.put(new PropertySimple("config", serverConfig));
+ config.put(new PropertySimple("startScript", "bin/standalone.sh"));
- fillUserPassFromFile(config,"standalone", serverNameFull);
+ fillUserPassFromFile(config, "standalone", serverNameFull);
}
- String logFile = getLogFileFromCommandLine(commandLine);
- initLogEventSourcesConfigProp(logFile,config);
-
- HostPort managmentPort = getManagementPortFromHostXml();
- config.put(new PropertySimple("hostname",managmentPort.host));
- config.put(new PropertySimple("port",managmentPort.port));
-
-// String javaClazz = psr.getProcessInfo().getName();
-
- /*
- * We'll connect to the discovered VM on the local host, so set the jmx connection
- * properties accordingly. This may only work on JDK6+, but then JDK5 is deprecated
- * anyway.
- */
-// config.put(new PropertySimple(JMXDiscoveryComponent.COMMAND_LINE_CONFIG_PROPERTY,
-// javaClazz));
-// config.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,
-// LocalVMTypeDescriptor.class.getName()));
-//
-// // TODO vmid will change when the detected server is bounced - how do we follow this?
-// config.put(new PropertySimple(JMXDiscoveryComponent.VMID_CONFIG_PROPERTY,psr.getProcessInfo().getPid()));
+ // String logFile = getLogFileFromCommandLine(commandLine);
+ //monitor the server.log instead of the boot.log
+ String bootLogFile = getLogFileFromCommandLine(commandLine);
+ String logFile = bootLogFile.substring(0, bootLogFile.lastIndexOf("/")) + File.separator + "server.log";
+ initLogEventSourcesConfigProp(logFile, config);
-
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
- discoveryContext.getResourceType(), // ResourceType
+ HostPort managmentPort = getManagementPortFromHostXml();
+ config.put(new PropertySimple("hostname", managmentPort.host));
+ config.put(new PropertySimple("port", managmentPort.port));
+ // String javaClazz = psr.getProcessInfo().getName();
+
+ /*
+ * We'll connect to the discovered VM on the local host, so set the jmx connection
+ * properties accordingly. This may only work on JDK6+, but then JDK5 is deprecated
+ * anyway.
+ */
+ // config.put(new PropertySimple(JMXDiscoveryComponent.COMMAND_LINE_CONFIG_PROPERTY,
+ // javaClazz));
+ // config.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,
+ // LocalVMTypeDescriptor.class.getName()));
+ //
+ // // TODO vmid will change when the detected server is bounced - how do we follow this?
+ // config.put(new PropertySimple(JMXDiscoveryComponent.VMID_CONFIG_PROPERTY,psr.getProcessInfo().getPid()));
+
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), // ResourceType
serverNameFull, // key TODO distinguish per domain?
- serverName, // Name
- version, // TODO get via API ?Á
- description, // Description
- config,
- psr.getProcessInfo()
- );
-
+ serverName, // Name
+ version, // TODO get via API ?ᅵ
+ description, // Description
+ config, psr.getProcessInfo());
// Add to return values
discoveredResources.add(detail);
@@ -175,24 +172,25 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
return discoveredResources;
- }
+ }
private void fillUserPassFromFile(Configuration config, String mode, String baseDir) {
String configDir = baseDir + File.separator + mode + File.separator + "configuration";
- File file = new File(configDir ,"mgmt-users.properties");
+ File file = new File(configDir, "mgmt-users.properties");
if (!file.exists() || !file.canRead()) {
if (log.isDebugEnabled())
- log.debug("No console user properties file found at [" + file.getAbsolutePath() + "] or file is not readable");
+ log.debug("No console user properties file found at [" + file.getAbsolutePath()
+ + "] or file is not readable");
return;
}
- BufferedReader br=null;
+ BufferedReader br = null;
try {
FileReader fileReader = new FileReader(file);
br = new BufferedReader(fileReader);
String line;
- while ((line = br.readLine())!=null) {
+ while ((line = br.readLine()) != null) {
if (line.startsWith("#"))
continue;
if (line.isEmpty())
@@ -200,16 +198,16 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
if (!line.contains("="))
continue;
// found a candidate
- String user = line.substring(0,line.indexOf("="));
- String pass = line.substring(line.indexOf("=")+1);
- config.put(new PropertySimple("user",user));
- config.put(new PropertySimple("password",pass));
+ String user = line.substring(0, line.indexOf("="));
+ String pass = line.substring(line.indexOf("=") + 1);
+ config.put(new PropertySimple("user", user));
+ config.put(new PropertySimple("password", pass));
}
} catch (IOException e) {
- e.printStackTrace(); // TODO: Customise this generated block
+ e.printStackTrace(); // TODO: Customise this generated block
} finally {
- if (br!=null)
+ if (br != null)
try {
br.close();
} catch (IOException e) {
@@ -219,7 +217,7 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
- private String findHost(ProcessInfo processInfo,boolean isDomain) {
+ private String findHost(ProcessInfo processInfo, boolean isDomain) {
String hostXmlFile = getHostXmlFileLocation(processInfo, isDomain);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
String hostName = null;
@@ -230,28 +228,27 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
hostName = document.getDocumentElement().getAttribute("name");
is.close();
} catch (Exception e) {
- e.printStackTrace(); // TODO: Customise this generated block
+ e.printStackTrace(); // TODO: Customise this generated block
}
- if (hostName==null)
- hostName="local"; // Fallback to the installation default
+ if (hostName == null)
+ hostName = "local"; // Fallback to the installation default
return hostName;
}
-
String getServerConfigFromCommandLine(String[] commandLine) {
- for (String line: commandLine) {
- if (line.startsWith(DASH_DASH_SERVER_CONFIG))
- return line.substring(DASH_DASH_SERVER_CONFIG.length());
- }
- return "standalone.xml";
+ for (String line : commandLine) {
+ if (line.startsWith(DASH_DASH_SERVER_CONFIG))
+ return line.substring(DASH_DASH_SERVER_CONFIG.length());
}
+ return "standalone.xml";
+ }
-//-Dorg.jboss.boot.log.file=/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/log/server-manager/boot.log
-//-Dlogging.configuration=file:/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/configuration/logging.properties
+ //-Dorg.jboss.boot.log.file=/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/log/server-manager/boot.log
+ //-Dlogging.configuration=file:/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/configuration/logging.properties
String getLogFileFromCommandLine(String[] commandLine) {
- for (String line: commandLine) {
+ for (String line : commandLine) {
if (line.startsWith(DORG_JBOSS_BOOT_LOG_FILE))
return line.substring(DORG_JBOSS_BOOT_LOG_FILE.length());
}
@@ -263,7 +260,7 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
PropertyList logEventSources = pluginConfiguration
.getList(LogFileEventResourceComponentHelper.LOG_EVENT_SOURCES_CONFIG_PROP);
- if (logEventSources==null)
+ if (logEventSources == null)
return;
File serverLogFile = new File(fileName);
commit 3d77201b933e62d39c2ecfdcb0e78ce32662a0b9
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Wed Jul 27 11:08:17 2011 -0400
adding new libs for eclipse as well.
diff --git a/.classpath b/.classpath
index d8c2847..f8941f4 100644
--- a/.classpath
+++ b/.classpath
@@ -116,6 +116,8 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-dbunit/3.1/unitils-dbunit-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-orm/3.1/unitils-orm-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-testng/3.1/unitils-testng-3.1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar"/>
<classpathentry exported="true" kind="lib" path="modules/enterprise/remoting/webservices/target/rhq-remoting-webservices-4.1.0-SNAPSHOT/wsconsume-output"/>
<classpathentry kind="src" path="modules/common/ant-bundle/src/main/java"/>
<classpathentry kind="src" path="modules/common/drift/src/main/java"/>
commit 4edbde9fcb5c68fb8516ef9225d8b6a775a3402d
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Wed Jul 27 10:45:15 2011 -0400
add as7 sources to eclipse cp.
diff --git a/.classpath b/.classpath
index c215ebf..d8c2847 100644
--- a/.classpath
+++ b/.classpath
@@ -112,7 +112,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/dbunit/dbunit/2.4.8/dbunit-2.4.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/poi/poi/3.7/poi-3.7.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/bsh/bsh/1.3.0/bsh-1.3.0.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-core/3.1/unitils-core-3.1.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-core/3.1/unitils-core-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-dbunit/3.1/unitils-dbunit-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-orm/3.1/unitils-orm-3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/unitils/unitils-testng/3.1/unitils-testng-3.1.jar"/>
@@ -273,5 +273,7 @@
<classpathentry excluding="**" kind="src" path="modules/enterprise/agent/src/test/resources"/>
<classpathentry kind="src" path="modules/plugins/mod-cluster/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/mod-cluster/src/test/java"/>
+ <classpathentry kind="src" path="modules/plugins/jboss-as-7/src/main/java"/>
+ <classpathentry kind="src" path="modules/plugins/jboss-as-7/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
commit ed7aad1f40f87b6d484897d72eb2075836f7ae29
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:43:23 2011 -0400
[coverity] close initial contexts
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
index e9ff990..5cd937b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
@@ -233,6 +233,7 @@ public final class LookupUtil {
try {
InitialContext context = new InitialContext();
DataSource ds = (DataSource) context.lookup(RHQConstants.DATASOURCE_JNDI_NAME);
+ context.close();
return ds;
} catch (Exception e) {
throw new RuntimeException("Failed to get the data source", e);
@@ -249,6 +250,7 @@ public final class LookupUtil {
try {
InitialContext context = new InitialContext();
TransactionManager tm = (TransactionManager) context.lookup(RHQConstants.TRANSACTION_MANAGER_JNDI_NAME);
+ context.close();
return tm;
} catch (Exception e) {
throw new RuntimeException("Failed to get the transaction manager", e);
@@ -678,7 +680,12 @@ public final class LookupUtil {
* @throws NamingException when resource not found
*/
private static Object lookup(String name) throws NamingException {
- return new InitialContext().lookup(name);
+ InitialContext initialContext = new InitialContext();
+ try {
+ return initialContext.lookup(name);
+ } finally {
+ initialContext.close();
+ }
}
public static DataAccessManagerLocal getDataAccessManager() {
commit 199940ca403f4123a2a6a753b196a12f975e207a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:24:39 2011 -0400
[coverity] close jar file
diff --git a/modules/enterprise/agentupdate/src/main/java/org/rhq/enterprise/agent/update/AgentUpdate.java b/modules/enterprise/agentupdate/src/main/java/org/rhq/enterprise/agent/update/AgentUpdate.java
index fc43008..704b48d 100644
--- a/modules/enterprise/agentupdate/src/main/java/org/rhq/enterprise/agent/update/AgentUpdate.java
+++ b/modules/enterprise/agentupdate/src/main/java/org/rhq/enterprise/agent/update/AgentUpdate.java
@@ -272,9 +272,13 @@ public class AgentUpdate {
private byte[] getJarFileContent(String filename) throws Exception {
JarFile jarFile = new JarFile(getJarFilename()); // use the jar file because user might have used --jar
- JarEntry jarFileEntry = jarFile.getJarEntry(filename);
- InputStream jarFileEntryStream = jarFile.getInputStream(jarFileEntry);
- return slurp(jarFileEntryStream);
+ try {
+ JarEntry jarFileEntry = jarFile.getJarEntry(filename);
+ InputStream jarFileEntryStream = jarFile.getInputStream(jarFileEntry);
+ return slurp(jarFileEntryStream);
+ } finally {
+ jarFile.close();
+ }
}
private void printSyntax() {
commit 9cabd191fd42b89a86d1fa6bd2290bc5ea7a16c3
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:22:35 2011 -0400
[coverity] close reader
diff --git a/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/commands/ScriptCommand.java b/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/commands/ScriptCommand.java
index 693885f..9a071b7 100644
--- a/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/commands/ScriptCommand.java
+++ b/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/commands/ScriptCommand.java
@@ -58,7 +58,7 @@ public class ScriptCommand implements ClientCommand {
private ScriptEngine jsEngine;
private StandardBindings bindings;
-
+
private final Log log = LogFactory.getLog(ScriptCommand.class);
private StringBuilder script = new StringBuilder();
@@ -85,7 +85,15 @@ public class ScriptCommand implements ClientCommand {
bindScriptArgs(scriptCmdLine);
executeUtilScripts();
- return executeScriptFile(new FileReader(scriptCmdLine.getScriptFileName()), client);
+ FileReader reader = new FileReader(scriptCmdLine.getScriptFileName());
+ try {
+ return executeScriptFile(reader, client);
+ } finally {
+ try {
+ reader.close();
+ } catch (IOException ignore) {
+ }
+ }
} catch (FileNotFoundException e) {
client.getPrintWriter().println(e.getMessage());
if (log.isDebugEnabled()) {
@@ -97,8 +105,7 @@ public class ScriptCommand implements ClientCommand {
if (log.isDebugEnabled()) {
log.debug("A parse error occurred.", e);
}
- }
- else {
+ } else {
throw new CLIScriptException(e);
}
}
@@ -143,8 +150,8 @@ public class ScriptCommand implements ClientCommand {
} catch (ScriptException e) {
String message = e.getCause() != null ? e.getCause().getMessage() : e.getMessage();
- message = message.replace("sun.org.mozilla.javascript.internal.EcmaError: ","");
- message = message.replace("(<Unknown source>#1) in <Unknown source> at line number 1","");
+ message = message.replace("sun.org.mozilla.javascript.internal.EcmaError: ", "");
+ message = message.replace("(<Unknown source>#1) in <Unknown source> at line number 1", "");
client.getPrintWriter().println(message);
client.getPrintWriter().println(script);
@@ -162,9 +169,10 @@ public class ScriptCommand implements ClientCommand {
public void initBindings(ClientMain client) {
if (jsEngine == null) {
bindings = new StandardBindings(client.getPrintWriter(), client.getRemoteClient());
-
+
try {
- jsEngine = ScriptEngineFactory.getScriptEngine("JavaScript", new PackageFinder(Arrays.asList(getLibDir())), bindings);
+ jsEngine = ScriptEngineFactory.getScriptEngine("JavaScript", new PackageFinder(Arrays
+ .asList(getLibDir())), bindings);
jsEngine.eval("1+1");
} catch (ScriptException e) {
e.printStackTrace();
@@ -172,19 +180,20 @@ public class ScriptCommand implements ClientCommand {
e.printStackTrace();
}
}
-
+
bindings.getSubject().setValue(client.getSubject());
bindings.getPretty().getValue().setWidth(client.getConsoleWidth());
bindings.getProxyFactory().setValue(new EditableResourceClientFactory(client));
-
+
//non-standard bindings
bindings.put("configurationEditor", new ConfigurationEditor(client));
bindings.put("rhq", new Controller(client));
ScriptEngineFactory.injectStandardBindings(jsEngine, bindings, false);
-
- ScriptEngineFactory.bindIndirectionMethods(jsEngine, "configurationEditor", bindings.get("configurationEditor"));
- ScriptEngineFactory.bindIndirectionMethods(jsEngine, "rhq", bindings.get("rhq"));
+
+ ScriptEngineFactory
+ .bindIndirectionMethods(jsEngine, "configurationEditor", bindings.get("configurationEditor"));
+ ScriptEngineFactory.bindIndirectionMethods(jsEngine, "rhq", bindings.get("rhq"));
}
private void executeUtilScripts() {
@@ -253,8 +262,7 @@ public class ScriptCommand implements ClientCommand {
if (client.isInteractiveMode()) {
client.getPrintWriter().println(e.getMessage());
client.getPrintWriter().println("^");
- }
- else {
+ } else {
throw new CLIScriptException(e);
}
}
@@ -270,8 +278,8 @@ public class ScriptCommand implements ClientCommand {
}
public String getDetailedHelp() {
- return "Execute a statement or a script. The following services managers are available: " +
- RhqManagers.values();
+ return "Execute a statement or a script. The following services managers are available: "
+ + RhqManagers.values();
}
public ScriptContext getContext() {
commit 19c89919315d3a13f2894f9da829f1384e710053
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:20:31 2011 -0400
close streams (didn't see a coverity alert on this - I just came across it)
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/Version.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/Version.java
index 89280d9..e7f63a4 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/Version.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/Version.java
@@ -184,7 +184,11 @@ public class Version {
Properties newProps = new Properties();
try {
- newProps.load(stream);
+ try {
+ newProps.load(stream);
+ } finally {
+ stream.close();
+ }
} catch (Exception e) {
throw new RuntimeException(e);
}
commit b7a146b5eae72b2545ceead0a45c79420355be7a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:18:49 2011 -0400
[coverity] close stream
diff --git a/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/Version.java b/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/Version.java
index 84e9ec0..0150a9c 100644
--- a/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/Version.java
+++ b/modules/enterprise/remoting/cli/src/main/java/org/rhq/enterprise/client/Version.java
@@ -190,7 +190,11 @@ public class Version {
try {
URL jarUrl = Version.class.getProtectionDomain().getCodeSource().getLocation();
JarFile jarFile = new JarFile(new File(jarUrl.toURI()));
- manifest = jarFile.getManifest();
+ try {
+ manifest = jarFile.getManifest();
+ } finally {
+ jarFile.close();
+ }
} catch (Exception e) {
return new Properties();
}
commit 2a8e27ee809f2d812b72b15fcbb5ee8a0485c653
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:15:31 2011 -0400
[converity] close stream
diff --git a/modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/util/DumpBytes.java b/modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/util/DumpBytes.java
index 8bb9865..4d5848f 100644
--- a/modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/util/DumpBytes.java
+++ b/modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/util/DumpBytes.java
@@ -167,9 +167,13 @@ public class DumpBytes {
int num_bytes;
try {
- fis = new FileInputStream(file);
file_contents = new byte[(int) file.length()];
- num_bytes = fis.read(file_contents);
+ fis = new FileInputStream(file);
+ try {
+ num_bytes = fis.read(file_contents);
+ } finally {
+ fis.close();
+ }
if (num_bytes != file_contents.length) {
throw new IllegalStateException(num_bytes + "!=" + file_contents.length);
commit 0fac1e88882631275804d98d47c910b005f1050e
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 16:11:15 2011 -0400
[coverity] close input streams
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
index 052bf11..db04c59 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTServiceImpl.java
@@ -92,7 +92,12 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
File file = agentManager.getAgentUpdateVersionFile();
Properties props = new Properties();
- props.load(new FileInputStream(file));
+ FileInputStream inStream = new FileInputStream(file);
+ try {
+ props.load(inStream);
+ } finally {
+ inStream.close();
+ }
return convertFromProperties(props);
} catch (Throwable t) {
@@ -143,7 +148,12 @@ public class SystemGWTServiceImpl extends AbstractGWTServiceImpl implements Syst
File versionFile = new File(getClientDownloadDir(), "rhq-client-version.properties");
try {
Properties p = new Properties();
- p.load(new FileInputStream(versionFile));
+ FileInputStream inStream = new FileInputStream(versionFile);
+ try {
+ p.load(inStream);
+ } finally {
+ inStream.close();
+ }
return convertFromProperties(p);
} catch (Throwable t) {
throw getExceptionToThrowToClient(t, "Unable to retrieve client version info.");
commit 2e3d2af81ea989a9dad7d9ccc5c6e551a085d879
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:53:19 2011 -0400
[coverity] close input streams
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
index 3bdafda..b339190 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
@@ -86,7 +86,12 @@ public class RetrieveContentBitsRunner implements Runnable {
InputStream is;
try {
is = contentManager.performGetPackageBits(request.getResourceId(), request.getPackageDetails());
- pkgDetails.setSHA256(new MessageDigestGenerator(MessageDigestGenerator.SHA_256).calcDigestString(is));
+ try {
+ pkgDetails.setSHA256(new MessageDigestGenerator(MessageDigestGenerator.SHA_256)
+ .calcDigestString(is));
+ } finally {
+ is.close();
+ }
} catch (Exception e) {
e.printStackTrace();
}
@@ -95,7 +100,11 @@ public class RetrieveContentBitsRunner implements Runnable {
InputStream is;
try {
is = contentManager.performGetPackageBits(request.getResourceId(), request.getPackageDetails());
- pkgDetails.setMD5((new MessageDigestGenerator(MessageDigestGenerator.MD5).calcDigestString(is)));
+ try {
+ pkgDetails.setMD5((new MessageDigestGenerator(MessageDigestGenerator.MD5).calcDigestString(is)));
+ } finally {
+ is.close();
+ }
} catch (Exception e) {
e.printStackTrace();
}
commit 302b7ee7c388f0db5f7cf926308034b5041de7ad
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:44:49 2011 -0400
[coverity] be nice and close the context. don't worry about doing it
in a try-finally - if the lookup fails, we have more important things
to worry about then not closing the context - such as we don't
have a hibernate entity manager available!
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
index b399741..e9ff990 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
@@ -266,6 +266,7 @@ public final class LookupUtil {
try {
InitialContext context = new InitialContext();
EntityManagerFactory factory = (EntityManagerFactory) context.lookup(RHQConstants.ENTITY_MANAGER_JNDI_NAME);
+ context.close();
return factory.createEntityManager();
} catch (Exception e) {
throw new RuntimeException("Failed to create an entity manager", e);
@@ -653,7 +654,8 @@ public final class LookupUtil {
localJNDIName = getLocalJNDIName(type);
return (T) lookup(localJNDIName);
} catch (NamingException e) {
- throw new RuntimeException("Failed to lookup local interface to EJB " + type + ", localJNDI=[" + localJNDIName + "]", e);
+ throw new RuntimeException("Failed to lookup local interface to EJB " + type + ", localJNDI=["
+ + localJNDIName + "]", e);
}
}
commit 796ac12453e260f24228add540934d9a128804bf
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:40:00 2011 -0400
[coverity] close the initial context
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 85fb5b8..a2bdaa9 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -109,12 +109,20 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
public EntityManager getEntityManager() {
+ InitialContext initialContext = null;
try {
- return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
+ initialContext = getInitialContext();
+ return ((EntityManagerFactory) initialContext.lookup("java:/RHQEntityManagerFactory"))
.createEntityManager();
} catch (NamingException e) {
e.printStackTrace();
throw new RuntimeException("Failed to load entity manager", e);
+ } finally {
+ try {
+ initialContext.close();
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to close the initial context - why did this happen?", e);
+ }
}
}
commit a07dc82e8347ce2f1e7e42f9520fb3d4d5f7f3b6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:33:05 2011 -0400
[coverity] closing the initial context explicitly
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 57ec318..85fb5b8 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -35,15 +35,13 @@ import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterGroups;
-import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeGroups;
-import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
public abstract class AbstractEJB3Test extends AssertJUnit {
-// @BeforeSuite(groups = "integration.ejb3")
+ // @BeforeSuite(groups = "integration.ejb3")
@BeforeGroups(groups = "integration.ejb3")
public static void startupEmbeddedJboss() {
System.out.println("Starting ejb3...");
@@ -84,7 +82,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
}
-// @AfterSuite
+ // @AfterSuite
@AfterGroups(groups = "integration.ejb3")
public static void shutdownEmbeddedJboss() {
EJB3StandaloneBootstrap.shutdown();
@@ -93,12 +91,20 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
private TransactionManager tm;
public TransactionManager getTransactionManager() {
+ InitialContext initialContext = null;
try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
+ initialContext = getInitialContext();
+ tm = (TransactionManager) initialContext.lookup("java:/TransactionManager");
return tm;
} catch (NamingException e) {
e.printStackTrace();
throw new RuntimeException("Failed to load transaction manager", e);
+ } finally {
+ try {
+ initialContext.close();
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to close the initial context - why did this happen?", e);
+ }
}
}
commit e0bb9de07efb271a80e98f53a4c09e75c9b1d73e
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:23:01 2011 -0400
[coverity] close the jar file for the test
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java
index 2e3374f..714d9b5 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java
@@ -311,7 +311,7 @@ public class PluginTransformerTest {
JarFile jarFile = new JarFile(pluginJarFile);
Manifest manifest = jarFile.getManifest();
Attributes attributes = manifest.getMainAttributes();
-
+ jarFile.close();
return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
}
commit 59a739e6a77f05d48ede89e5dc416ea670ad478c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:13:36 2011 -0400
[coverity] this isn't used anywhere, but we may revive it later. close the input stream properly.
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/i18n/PropertiesGenerator.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/i18n/PropertiesGenerator.java
index 93a9c56..3c9d64f 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/i18n/PropertiesGenerator.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/i18n/PropertiesGenerator.java
@@ -1,25 +1,25 @@
- /*
- * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
package org.rhq.core.clientapi.agent.metadata.i18n;
import java.io.File;
@@ -34,9 +34,11 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
+
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -106,7 +108,12 @@ public class PropertiesGenerator {
if (update) {
// First load into properties we can check for existence
previousProperties = new Properties();
- previousProperties.load(new FileInputStream(propertiesFile));
+ FileInputStream is = new FileInputStream(propertiesFile);
+ try {
+ previousProperties.load(is);
+ } finally {
+ is.close();
+ }
this.contentWriter.println("\n\n# Contents added " + new Date() + "\n\n");
}
commit 2300051a18838bb45b6f33ca4a15ffba8f076c2a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 15:08:43 2011 -0400
[coverity] make sure we close the jar file
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/file/JarContentFileInfo.java b/modules/core/util/src/main/java/org/rhq/core/util/file/JarContentFileInfo.java
index c24fb54..529f317 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/file/JarContentFileInfo.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/file/JarContentFileInfo.java
@@ -168,6 +168,7 @@ public class JarContentFileInfo extends ContentFileInfo {
JarFile jarFile = new JarFile(file);
if (null != jarFile) {
manifest = jarFile.getManifest();
+ jarFile.close();
}
} else {
File manifestFile = new File(file, "/META-INF/MANIFEST.MF");
commit f816103dfd72e5108772459d4673eb6226cf0a19
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 14:56:55 2011 -0400
[coverity] close the pid file
diff --git a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
index e4d7575..325ed20 100644
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
@@ -18,18 +18,6 @@
*/
package org.rhq.plugins.mysql;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.util.jdbc.JDBCUtil;
-import org.rhq.plugins.database.DatabaseComponent;
-
import java.io.File;
import java.io.FileReader;
import java.sql.Connection;
@@ -43,8 +31,19 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.system.AggregateProcessInfo;
import org.rhq.core.system.ProcessInfo;
+import org.rhq.plugins.database.DatabaseComponent;
import org.rhq.plugins.database.DatabaseQueryUtility;
/**
@@ -129,7 +128,7 @@ public class MySqlComponent implements DatabaseComponent, ResourceComponent, Mea
} else if ("Process.aggregateMemory.size".equals(requestName)) {
long value = aggregateProcessInfo.getAggregateMemory().getSize();
report.addData(new MeasurementDataNumeric(request, new Double((double) value)));
- }else if ("Process.aggregateMemory.pageFaults".equals(requestName)) {
+ } else if ("Process.aggregateMemory.pageFaults".equals(requestName)) {
long value = aggregateProcessInfo.getAggregateMemory().getPageFaults();
report.addData(new MeasurementDataNumeric(request, new Double((double) value)));
} else if ("Process.aggregateCpu.user".equals(requestName)) {
@@ -141,12 +140,12 @@ public class MySqlComponent implements DatabaseComponent, ResourceComponent, Mea
} else if ("Process.aggregateCpu.percent".equals(requestName)) {
double value = aggregateProcessInfo.getAggregateCpu().getPercent();
report.addData(new MeasurementDataNumeric(request, new Double(value)));
- } else if ("Process.aggregateCpu.total".equals(requestName)) {
+ } else if ("Process.aggregateCpu.total".equals(requestName)) {
long value = aggregateProcessInfo.getAggregateCpu().getTotal();
- report.addData(new MeasurementDataNumeric(request, new Double((double)value)));
- }else if ("Process.aggregateFileDescriptor.total".equals(requestName)) {
+ report.addData(new MeasurementDataNumeric(request, new Double((double) value)));
+ } else if ("Process.aggregateFileDescriptor.total".equals(requestName)) {
long value = aggregateProcessInfo.getAggregateFileDescriptor().getTotal();
- report.addData(new MeasurementDataNumeric(request, new Double((double)value)));
+ report.addData(new MeasurementDataNumeric(request, new Double((double) value)));
}
} else {
if (request.getDataType() == DataType.MEASUREMENT) {
@@ -202,11 +201,15 @@ public class MySqlComponent implements DatabaseComponent, ResourceComponent, Mea
if (file.canRead()) {
try {
FileReader pidFileReader = new FileReader(file);
- char pidData[] = new char[(int)file.length()];
- pidFileReader.read(pidData);
- String pidString = new String(pidData);
- pidString = pidString.trim();
- result = Long.valueOf(pidString);
+ try {
+ char pidData[] = new char[(int) file.length()];
+ pidFileReader.read(pidData);
+ String pidString = new String(pidData);
+ pidString = pidString.trim();
+ result = Long.valueOf(pidString);
+ } finally {
+ pidFileReader.close();
+ }
} catch (Exception ex) {
log.warn("Unable to read MySQL pid file " + pidFile);
}
commit bd2129db2d7f4e76efc938986674d24beebd1b4f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 14:28:47 2011 -0400
[coverity] not really necessary I don't think - seems like Bundle Manager Bean closes the stream for us. but just in case...
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleFileUploadServlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleFileUploadServlet.java
index 71ff5f4..3081883 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleFileUploadServlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/BundleFileUploadServlet.java
@@ -58,11 +58,14 @@ public class BundleFileUploadServlet extends FileUploadServlet {
String version = getFormField(formFields, "version", Integer.toString(bundleVersionId));
Architecture architecture = new Architecture(getFormField(formFields, "arch", "noarch"));
InputStream fileStream = new FileInputStream(file);
-
- BundleManagerLocal bundleManager = LookupUtil.getBundleManager();
- BundleFile bundleFile = bundleManager.addBundleFile(subject, bundleVersionId, name, version, architecture,
- fileStream);
- successMsg = "success [" + bundleFile.getId() + "]";
+ try {
+ BundleManagerLocal bundleManager = LookupUtil.getBundleManager();
+ BundleFile bundleFile = bundleManager.addBundleFile(subject, bundleVersionId, name, version,
+ architecture, fileStream);
+ successMsg = "success [" + bundleFile.getId() + "]";
+ } finally {
+ fileStream.close(); // I don't think this is necessary (seems BundleManager closes it for us) but do it anyway just in case
+ }
} catch (Exception e) {
writeExceptionResponse(response, "Failed to upload bundle file", e); // clients will look for this string!
return;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/PackageVersionFileUploadServlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/PackageVersionFileUploadServlet.java
index 9aed016..0795914 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/PackageVersionFileUploadServlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/PackageVersionFileUploadServlet.java
@@ -32,7 +32,6 @@ import javax.servlet.http.HttpServletResponse;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.content.PackageVersion;
import org.rhq.enterprise.server.content.ContentManagerLocal;
-import org.rhq.enterprise.server.content.RepoManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -73,8 +72,6 @@ public class PackageVersionFileUploadServlet extends FileUploadServlet {
if (repoIdS != null) {
repoId = Integer.parseInt(repoIdS);
}
-
- InputStream fileStream = new FileInputStream(file);
//use getUploadedPackageVersion instead of createPackageVersion here
//because createPackageVersion successfully returns an already existing
@@ -84,10 +81,15 @@ public class PackageVersionFileUploadServlet extends FileUploadServlet {
Map<String, String> metaData = new HashMap<String, String>();
metaData.put(ContentManagerLocal.UPLOAD_FILE_INSTALL_DATE, Long.toString(file.lastModified()));
metaData.put(ContentManagerLocal.UPLOAD_FILE_NAME, packageName);
- PackageVersion packageVersion = contentManager.getUploadedPackageVersion(subject, packageName,
- packageTypeId, version, architectureId, fileStream, metaData, repoId);
-
- successMsg = "success [packageVersionId=" + packageVersion.getId() + ",packageId=" + packageVersion.getGeneralPackage().getId() + "]";
+ InputStream fileStream = new FileInputStream(file);
+ try {
+ PackageVersion packageVersion = contentManager.getUploadedPackageVersion(subject, packageName,
+ packageTypeId, version, architectureId, fileStream, metaData, repoId);
+ successMsg = "success [packageVersionId=" + packageVersion.getId() + ",packageId="
+ + packageVersion.getGeneralPackage().getId() + "]";
+ } finally {
+ fileStream.close();
+ }
} catch (Exception e) {
writeExceptionResponse(response, "Failed to upload file", e); // clients will look for this string!
return;
commit c59a821e4bc8ee18d19262f4c5887af6545eb5de
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 14:19:06 2011 -0400
[coverity] make sure we close the input stream
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
index d4c055f..9a0c91b 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
@@ -20,6 +20,7 @@ package org.rhq.core.db.ant.dbupgrade;
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -28,9 +29,12 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+
import mazz.i18n.Msg;
+
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
+
import org.rhq.core.db.DatabaseType;
import org.rhq.core.db.DatabaseTypeFactory;
import org.rhq.core.db.DbUtil;
@@ -70,16 +74,16 @@ public class DBUpgrader extends Task {
private Connection connection;
private boolean doCloseConnection;
-
+
public DBUpgrader() {
doCloseConnection = true;
}
-
+
public DBUpgrader(Connection connection) {
this.connection = connection;
doCloseConnection = false;
}
-
+
/**
* The URL to the database that is to be upgraded.
*
@@ -339,12 +343,20 @@ public class DBUpgrader extends Task {
if (typeMapFile == null) {
typeMaps = TypeMap.loadKnownTypeMaps();
} else {
+ FileInputStream fis = null;
try {
- FileInputStream fis = new FileInputStream(typeMapFile);
+ fis = new FileInputStream(typeMapFile);
typeMaps = TypeMap.loadTypeMapsFromStream(fis);
} catch (Exception e) {
throw new BuildException(MSG.getMsg(DbAntI18NResourceKeys.DBUPGRADE_TYPE_MAP_FILE_ERROR, typeMapFile
.getAbsolutePath(), e), e);
+ } finally {
+ if (fis != null) {
+ try {
+ fis.close();
+ } catch (IOException e) {
+ }
+ }
}
}
@@ -461,7 +473,7 @@ public class DBUpgrader extends Task {
if (connection == null) {
connection = DbUtil.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
}
- return connection;
+ return connection;
}
/**
@@ -474,7 +486,7 @@ public class DBUpgrader extends Task {
this.connection = connection;
doCloseConnection = connection == null;
}
-
+
/**
* Returns the type of database that is being upgraded.
*
commit fb8f4905912ba0bbc63d1aabc8dae84e10619b32
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 14:12:13 2011 -0400
[coverity] just a test class, but it should still close the stream to be a good citizen
diff --git a/modules/core/util/src/test/java/org/rhq/core/util/ZipUtilTest.java b/modules/core/util/src/test/java/org/rhq/core/util/ZipUtilTest.java
index 4bada6d..8ddcf1e 100644
--- a/modules/core/util/src/test/java/org/rhq/core/util/ZipUtilTest.java
+++ b/modules/core/util/src/test/java/org/rhq/core/util/ZipUtilTest.java
@@ -74,7 +74,9 @@ public class ZipUtilTest {
destFile.mkdirs();
} else {
destFile.getParentFile().mkdirs();
- StreamUtil.copy(stream, new FileOutputStream(destFile), false);
+ FileOutputStream fos = new FileOutputStream(destFile);
+ StreamUtil.copy(stream, fos, false);
+ fos.close();
}
return true;
}
commit 7db43fdbd624ec1227a1d7745b67b59f39a9fe1e
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 14:07:38 2011 -0400
[coverity] paranoia - just make sure we always close the file stream, avoiding the possibility that Buffered stream constructor bombs would leave the file stream open
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginClassLoader.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginClassLoader.java
index 25be7de..a9b07f2 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginClassLoader.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginClassLoader.java
@@ -205,21 +205,24 @@ public class PluginClassLoader extends URLClassLoader {
}
}
- BufferedOutputStream outputStream;
+ FileOutputStream fileOutputStream;
try {
- outputStream = new BufferedOutputStream(new FileOutputStream(file));
+ fileOutputStream = new FileOutputStream(file);
} catch (FileNotFoundException ex) {
if (file.exists() && (file.length() > 0)) {
// e.g. on win32, agent running w/ dll loaded PluginDumper cannot overwrite file inuse.
continue;
}
-
throw ex;
}
+ BufferedOutputStream outputStream = new BufferedOutputStream(fileOutputStream);
try {
file.deleteOnExit();
+ // do NOT close this inputStream since it is buffering the ZipInputStream
+ // and we are going to still process that input stream later. We close
+ // this ZipInputStream down below in the outer most try-finally block.
BufferedInputStream inputStream = new BufferedInputStream(zis);
int count;
@@ -229,13 +232,12 @@ public class PluginClassLoader extends URLClassLoader {
}
} finally {
outputStream.flush();
- outputStream.close();
+ outputStream.close(); // this also closes the fileOutputStream
}
} catch (IOException ioe) {
if (file != null) {
file.delete();
}
-
throw ioe;
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginClassLoader.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginClassLoader.java
index fa26970..90e2117 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginClassLoader.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/ServerPluginClassLoader.java
@@ -133,37 +133,39 @@ public class ServerPluginClassLoader extends URLClassLoader {
}
}
- BufferedOutputStream outputStream;
+ FileOutputStream fileOutputStream;
try {
- outputStream = new BufferedOutputStream(new FileOutputStream(file));
+ fileOutputStream = new FileOutputStream(file);
} catch (FileNotFoundException ex) {
if (file.exists() && (file.length() > 0)) {
// e.g. on win32, agent running w/ dll loaded PluginDumper cannot overwrite file inuse.
continue;
}
-
throw ex;
}
+ BufferedOutputStream outputStream = new BufferedOutputStream(fileOutputStream);
try {
file.deleteOnExit();
+ // do NOT close this inputStream since it is buffering the ZipInputStream
+ // and we are going to still process that input stream later. We close
+ // this ZipInputStream down below in the outer most try-finally block.
BufferedInputStream inputStream = new BufferedInputStream(zis);
- int count = 0;
+ int count;
byte[] b = new byte[8192];
while ((count = inputStream.read(b)) > -1) {
outputStream.write(b, 0, count);
}
} finally {
outputStream.flush();
- outputStream.close();
+ outputStream.close(); // this also closes the fileOutputStream
}
} catch (IOException ioe) {
if (file != null) {
file.delete();
}
-
throw ioe;
}
}
commit 2f53d69eccc94ffa068ed1483ca3d7d6db9d776e
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 13:00:09 2011 -0400
opps, fix comment
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
index e2fc414..5697374 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
@@ -939,7 +939,7 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
return server_configuration;
} finally {
- // we know this isn't non-null; if it was, we would have thrown the IOException earlier.
+ // we know this is not null; if it was, we would have thrown the IOException earlier.
config_file_input_stream.close();
}
}
commit b09ab768bc1d84ab27476536237f28e09506387f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 12:58:59 2011 -0400
[coverity] close the config file input stream
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
index 29116d8..e2fc414 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerCommunicationsService.java
@@ -439,12 +439,12 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
try {
ClientCommandSenderConfiguration sender_config = getSenderConfiguration(agent);
if (sender_config.commandSpoolFileName != null) {
- spool_file = new File(sender_config.dataDirectory, sender_config.commandSpoolFileName);
- if (spool_file.exists()) {
- // first truncate it, in case Windows is locking it; then try to delete
- new FileOutputStream(spool_file, false).close();
- spool_file.delete();
- }
+ spool_file = new File(sender_config.dataDirectory, sender_config.commandSpoolFileName);
+ if (spool_file.exists()) {
+ // first truncate it, in case Windows is locking it; then try to delete
+ new FileOutputStream(spool_file, false).close();
+ spool_file.delete();
+ }
}
} catch (Exception e) {
LOG.warn("Failed to truncate/delete spool for deleted agent [" + agent + "]"
@@ -907,36 +907,41 @@ public class ServerCommunicationsService implements ServerCommunicationsServiceM
// But first we need to backup these original preferences in case the config file fails to load -
// we'll restore the original values in that case.
- Preferences preferences_node = getPreferencesNode();
- ByteArrayOutputStream backup = new ByteArrayOutputStream();
- preferences_node.exportSubtree(backup);
- preferences_node.clear();
-
- // now load in the preferences
try {
- Preferences.importPreferences(config_file_input_stream);
+ Preferences preferences_node = getPreferencesNode();
+ ByteArrayOutputStream backup = new ByteArrayOutputStream();
+ preferences_node.exportSubtree(backup);
+ preferences_node.clear();
- if (new ServerConfiguration(preferences_node).getServerConfigurationVersion() == 0) {
- throw new IllegalArgumentException(LOG.getMsgString(
- ServerI18NResourceKeys.BAD_NODE_NAME_IN_CONFIG_FILE, file_name, preferences_node_name));
- }
- } catch (Exception e) {
- // a problem occurred importing the config file; let's restore our original values
+ // now load in the preferences
try {
- Preferences.importPreferences(new ByteArrayInputStream(backup.toByteArray()));
- } catch (Exception e1) {
- // its conceivable the same problem occurred here as with the original exception (backing store problem?)
- // let's throw the original exception, not this one
- }
+ Preferences.importPreferences(config_file_input_stream);
- throw e;
- }
+ if (new ServerConfiguration(preferences_node).getServerConfigurationVersion() == 0) {
+ throw new IllegalArgumentException(LOG.getMsgString(
+ ServerI18NResourceKeys.BAD_NODE_NAME_IN_CONFIG_FILE, file_name, preferences_node_name));
+ }
+ } catch (Exception e) {
+ // a problem occurred importing the config file; let's restore our original values
+ try {
+ Preferences.importPreferences(new ByteArrayInputStream(backup.toByteArray()));
+ } catch (Exception e1) {
+ // its conceivable the same problem occurred here as with the original exception (backing store problem?)
+ // let's throw the original exception, not this one
+ }
- ServerConfiguration server_configuration = new ServerConfiguration(preferences_node);
+ throw e;
+ }
- LOG.debug(ServerI18NResourceKeys.LOADED_CONFIG_FILE, file_name);
+ ServerConfiguration server_configuration = new ServerConfiguration(preferences_node);
- return server_configuration;
+ LOG.debug(ServerI18NResourceKeys.LOADED_CONFIG_FILE, file_name);
+
+ return server_configuration;
+ } finally {
+ // we know this isn't non-null; if it was, we would have thrown the IOException earlier.
+ config_file_input_stream.close();
+ }
}
/**
commit 4b3e3a6e01e2f599af8a21a14c37debc92060cc1
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 12:37:04 2011 -0400
[coverity] close the context - no need to keep it open since we just create it to see that no exceptions occurred.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
index be7a0ab..a4124ca 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CustomJaasDeploymentService.java
@@ -209,7 +209,7 @@ public class CustomJaasDeploymentService implements CustomJaasDeploymentServiceM
}
log.debug("Validating LDAP with environment=" + env);
- new InitialLdapContext(env, null);
+ new InitialLdapContext(env, null).close();
return;
}
commit 0329aa66eaea0e3a53b4c7682e9e49d3a28d0750
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 12:17:21 2011 -0400
[coverity] make sure to close the file
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryFile.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryFile.java
index 7a8e1e5..ea5e7fd 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryFile.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryFile.java
@@ -103,8 +103,9 @@ public class InventoryFile {
* inventory
*/
public void loadInventory() throws PluginContainerException {
+ FileInputStream fis = null;
try {
- FileInputStream fis = new FileInputStream(inventoryFile);
+ fis = new FileInputStream(inventoryFile);
ObjectInputStream ois = new ObjectInputStream(fis);
// this list will contain UUIDs of resources that we should ignore usually due to disabled plugins
@@ -126,6 +127,13 @@ public class InventoryFile {
return;
} catch (Exception e) {
throw new PluginContainerException("Cannot load inventory file: " + inventoryFile, e);
+ } finally {
+ if (fis != null) {
+ try {
+ fis.close();
+ } catch (Exception e) {
+ }
+ }
}
}
commit 203bb4b9b7d4107d7332754709b6bc9ec5851771
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 12:12:05 2011 -0400
[coverity] make sure we close the printwriter in finally block
diff --git a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/YumServer.java b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/YumServer.java
index dc92a61..3524b9b 100644
--- a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/YumServer.java
+++ b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/content/yum/YumServer.java
@@ -178,15 +178,18 @@ public class YumServer {
File file = new File(yumconf);
try {
PrintWriter writer = new PrintWriter(file);
- writer.println("[rhq]");
- writer.println("name=RHQ");
- writer.printf("baseurl=%s\n", context.baseurl());
- writer.printf("metadata_expire=%d\n", context.getMetadataCacheTimeout());
- writer.println("enabled=1");
- writer.println("gpgcheck=0");
- writer.println("keepalive=0");
- writer.println("timeout=90");
- writer.close();
+ try {
+ writer.println("[rhq]");
+ writer.println("name=RHQ");
+ writer.printf("baseurl=%s\n", context.baseurl());
+ writer.printf("metadata_expire=%d\n", context.getMetadataCacheTimeout());
+ writer.println("enabled=1");
+ writer.println("gpgcheck=0");
+ writer.println("keepalive=0");
+ writer.println("timeout=90");
+ } finally {
+ writer.close();
+ }
} catch (Exception e) {
String msg = "The yum repo configuration file '" + file + "' could not be created/updated!";
log.error(msg, e);
commit 3a558fe5559b55707cb861e72a3d307a6a24b2a6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 11:42:07 2011 -0400
[coverity] this should have been an assert - and if it was, this unit test would have failed only because the casting was incorrect.
the code it was testing actually worked. I'm fixing the test so this actually asserts the correct thing.
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
index 3d9fb10..06fc087 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
@@ -37,6 +37,7 @@ import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
import org.rhq.core.clientapi.descriptor.AgentPluginDescriptorUtil;
import org.rhq.core.clientapi.descriptor.DescriptorPackages;
import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
@@ -130,7 +131,9 @@ public class ExtensionModelTest {
assert !def1.isRequired();
assert def1 instanceof PropertyDefinitionSimple;
assert ((PropertyDefinitionSimple) def1).getType().equals(PropertySimpleType.BOOLEAN);
- def1.getConfigurationDefinition().getDefaultTemplate().getConfiguration().get("force").equals("false");
+ PropertySimple prop = (PropertySimple) def1.getConfigurationDefinition().getDefaultTemplate()
+ .getConfiguration().get("force");
+ assert prop.getBooleanValue().booleanValue() == false;
assert stopOp.getResultsConfigurationDefinition() != null;
ConfigurationDefinition results = stopOp.getResultsConfigurationDefinition();
commit d85516841d7bead784f587535c1364d47185b7a9
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 11:23:34 2011 -0400
[coverity] the if-stmt looks bad, but anyway, this handler doesn't do anything anyway, the main code inside it was commented out.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
index cce560c..007f908 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
@@ -38,9 +38,6 @@ import com.google.gwt.event.logical.shared.CloseEvent;
import com.google.gwt.event.logical.shared.CloseHandler;
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.Event.NativePreviewEvent;
-import com.google.gwt.user.client.Event.NativePreviewHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
@@ -129,17 +126,23 @@ public class SearchBar extends AbstractSearchBar {
String searchButtonId = searchBarElement.getAttribute("searchButtonId");
searchButton = DOM.getElementById(searchButtonId);
- Event.addNativePreviewHandler(new NativePreviewHandler() {
- public void onPreviewNativeEvent(NativePreviewEvent event) {
- if (event.getNativeEvent() != null && event.getNativeEvent().getEventTarget() != null) {
-
- if (event.getNativeEvent().getEventTarget().equals(searchButton)
- && event.getTypeInt() == Event.ONMOUSEDOWN) {
- //prepareSearchExecution();
- }
- }
- }
- });
+ // Don't know what this originally was going to be used for, but if you notice,
+ // after all the if-stmts are evaluated true, the only piece of code to be invoked
+ // (prepareSearchExecution()) has been commented out. So this is a no-op. In addition
+ // the second if-stmt (getEventTarget().equals(searchButton) doesn't look correct and
+ // may not ever evaluate to true anyway. Commenting this out, in case something like this
+ // is needed in the future, but we'll havee to probably fix that if-stmt first.
+
+ // Event.addNativePreviewHandler(new NativePreviewHandler() {
+ // public void onPreviewNativeEvent(NativePreviewEvent event) {
+ // if (event.getNativeEvent() != null && event.getNativeEvent().getEventTarget() != null) {
+ // if (event.getNativeEvent().getEventTarget().equals(searchButton)
+ // && event.getTypeInt() == Event.ONMOUSEDOWN) {
+ // //prepareSearchExecution();
+ // }
+ // }
+ // }
+ // });
String searchSubsystem = searchBarElement.getAttribute("searchSubsystem");
setSearchSubsystem(SearchSubsystem.valueOf(searchSubsystem.toUpperCase()));
commit e7bcd08184a293f0fa745e4fe8a1167dd552bb68
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Jul 28 11:15:21 2011 -0400
[coverity] fix NPE
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
index 71f5ec5..047f5af 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
@@ -296,7 +296,8 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
SubTab subTab = tab.getDefaultSubTab();
if (subTab == null || tab.getLayout().isSubTabDisabled(subTab)) {
- CoreGUI.getErrorHandler().handleError(MSG.view_tabs_invalidSubTab(subTab.getName()));
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_tabs_invalidSubTab((subTab != null ? subTab.getName() : "null")));
subTab = tab.getLayout().getDefaultSubTab();
}
commit b35ba5b025f995e7658bd1f56a8e002f5b05e84b
Merge: 47451f9 f1b3ecd
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 28 15:48:01 2011 +0200
Merge branch 'as7plugin' of ssh://git.fedorahosted.org/git/rhq/rhq into as7plugin
commit 47451f90a8383fe368a398e45e5e4d75d0efd256
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 28 15:44:35 2011 +0200
BZ 726378 - management port settings on AS7 were not honored.
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 322e453..9aa9db0 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
@@ -111,12 +111,15 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
this.context = context;
pluginConfiguration = context.getPluginConfiguration();
- String typeName = context.getResourceType().getName();
- // TODO can we use parent's connection and only set this up for top level base component?
- host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
- String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
- port = Integer.parseInt(portString);
- connection = new ASConnection(host,port);
+ if (!(context.getParentResourceComponent() instanceof BaseComponent)) {
+ host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
+ String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
+ port = Integer.parseInt(portString);
+ connection = new ASConnection(host,port);
+ }
+ else {
+ connection = ((BaseComponent)context.getParentResourceComponent()).getASConnection();
+ }
path = pluginConfiguration.getSimpleValue("path", null);
key = context.getResourceKey();
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 475fd62..471fd42 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -79,11 +79,8 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
String psName = psr.getProcessScan().getName();
String description = discoveryContext.getResourceType().getDescription();
String version = null;
- String startScript;
- if (psName.equals("ProcessController")) {
- serverNameFull = "ProcessController";
- serverName = "ProcessController";
- } else if (psName.equals("HostController")) {
+
+ if (psName.equals("HostController")) {
readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
@@ -118,11 +115,10 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
tmp = tmp.substring( i + 8);
tmp = tmp.substring(0,tmp.indexOf("/"));
serverNameFull = tmp;
-
- String host = findHost(psr.getProcessInfo(),true);
- config.put(new PropertySimple("domainHost",host));
-
}
+ String host = findHost(psr.getProcessInfo(),true);
+ config.put(new PropertySimple("domainHost",host));
+
config.put(new PropertySimple("baseDir",serverNameFull));
serverName = findHostName();
if (serverName.isEmpty())
@@ -139,6 +135,11 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
String logFile = getLogFileFromCommandLine(commandLine);
initLogEventSourcesConfigProp(logFile,config);
+
+ HostPort managmentPort = getManagementPortFromHostXml();
+ config.put(new PropertySimple("hostname",managmentPort.host));
+ config.put(new PropertySimple("port",managmentPort.port));
+
// String javaClazz = psr.getProcessInfo().getName();
commit b160369e4999f327871e961fb75fe74f470d6914
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 28 13:17:00 2011 +0200
Initial support for messaging (JMS)
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 776e5ef..322e453 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
@@ -23,6 +23,8 @@ import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.JsonNode;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
@@ -480,12 +482,34 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
} else if (what.equals("destination")) {
address.addAll(pathToAddress(getPath()));
String newName = parameters.getSimpleValue("name","");
-// String type = parameters.getSimpleValue("type","Queue").toLowerCase();
-// address.add(new PROPERTY_VALUE(type,newName));
- String queueName = parameters.getSimpleValue("queue-address","");
- Map<String,Object> props = new HashMap<String, Object>();
- props.put("queue-address",queueName);
+ String type = parameters.getSimpleValue("type","jms-queue").toLowerCase();
+ address.add(new PROPERTY_VALUE(type,newName));
+ PropertyList jndiNamesProp = parameters.getList("entries");
+ if (jndiNamesProp==null || jndiNamesProp.getList().isEmpty()) {
+ OperationResult fail = new OperationResult();
+ fail.setErrorMessage("No jndi bindings given");
+ return fail;
+ }
+ List<String> jndiNames = new ArrayList<String>();
+ for (Property p : jndiNamesProp.getList()) {
+ PropertySimple ps = (PropertySimple) p;
+ jndiNames.add(ps.getStringValue());
+ }
+
operation = new Operation(op,address);
+ operation.addAdditionalProperty("entries",jndiNames);
+ if (type.equals("jms-queue")) {
+ PropertySimple ps = (PropertySimple) parameters.get("durable");
+ if (ps!=null) {
+ boolean durable = ps.getBooleanValue();
+ operation.addAdditionalProperty("durable",durable);
+ }
+ String selector = parameters.getSimpleValue("selector","");
+ if (!selector.isEmpty())
+ operation.addAdditionalProperty("selector",selector);
+ }
+
+
} else if (what.equals("managed-server")) {
String chost = parameters.getSimpleValue("hostname","");
String serverName = parameters.getSimpleValue("servername","");
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 6a8698e..20395e0 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -444,7 +444,7 @@
<server name="Messaging"
discovery="SubsystemDiscovery"
class="BaseComponent"
- description="The underlying HornetQ based messaging subsystem"
+ description="The HornetQ based messaging subsystem"
singleton="true"
>
<runs-inside>
@@ -459,15 +459,16 @@
<operation name="destination:add" displayName="Add destination" description="Add a Queue or Topic">
<parameters>
<c:simple-property name="name" description="Name of the Destination" required="true"/>
- <c:simple-property name="queue-address" description="The queue address defines what address is used for routing messages." required="true"/>
+ <c:list-property name="entries" description="The JNDI names the destination should be bound to." required="true">
+ <c:simple-property name="entry" description="A single JNDI name. Note, this is relative to java:jboss/jms/"/>
+ </c:list-property>
<c:simple-property name="type" description="Type of Destination to create" default="Queue">
<c:property-options>
- <c:option value="Queue"/>
- <c:option value="Topic"/>
+ <c:option value="jms-queue" name="Queue"/>
+ <c:option value="jms-topic" name="Topic"/>
</c:property-options>
</c:simple-property>
- <c:simple-property name="filter" description="The queue message filter definition."/>
- <c:simple-property name="durable" description="Defines whether the queue is durable." type="boolean" default="false"/>
+ <c:simple-property name="durable" description="Defines whether the queue is durable (for Queues only)." type="boolean" default="false"/>
</parameters>
<results>
<c:simple-property name="operationResult"/>
@@ -487,73 +488,23 @@
<c:simple-property name="journal-type" />
</resource-configuration>
- <!-- this is no child resource TODO
-
- <service name="Acceptor"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="acceptor"/>
- </plugin-configuration>
- </service>
- <service name="MessagingConnector"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="connector"/>
- </plugin-configuration>
- </service>
- <service name="HQueue"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="queue"/>
- </plugin-configuration>
- <resource-configuration>
- <c:simple-property name="queue-address" required="true"/>
- <c:simple-property name="filter" />
- <c:simple-property name="durable" type="boolean"/>
- </resource-configuration>
-
- </service>
--->
- </server>
-
- <server name="JMS"
- discovery="SubsystemDiscovery"
- class="JmsComponent"
- description="The JMS messaging subsystem"
- singleton="true"
- >
- <runs-inside>
- <parent-resource-type name="Profile" plugin="jboss-as-7"/>
- <parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
- </runs-inside>
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="subsystem=jms"/>
- </plugin-configuration>
-
- <service name="Queue"
+ <service name="JMS Queue"
discovery="SubsystemDiscovery"
class="JmsComponent"
- createDeletePolicy="both"
+ createDeletePolicy="delete-only"
>
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="queue"/>
+ <c:simple-property name="path" readOnly="true" default="jms-queue"/>
</plugin-configuration>
<resource-configuration> <!-- See BZ 705713 TODO -->
- <c:simple-property name="durable" required="false" type="boolean" readOnly="false" default="false"
+ <c:simple-property name="durable" required="false" type="boolean" readOnly="true" default="false"
description="Whether the queue is durable or not."/>
- <c:list-property name="entries" required="false" readOnly="false"
+ <c:list-property name="entries" required="false" readOnly="true"
description="The jndi names the queue will be bound to.">
<c:simple-property name="entries" type="string"/>
</c:list-property>
- <c:simple-property name="selector" required="false" type="string" readOnly="false" description="The queue selector."/>
+ <c:simple-property name="selector" required="false" type="string" readOnly="true" description="The queue selector."/>
<c:template name="add" description="Properties when adding a new queue" >
<c:simple-property name="durable" required="false" type="boolean" default="false"
description="Whether the queue is durable or not."/>
@@ -565,16 +516,16 @@
</c:template>
</resource-configuration>
</service>
- <service name="Topic"
+ <service name="JMS Topic"
discovery="SubsystemDiscovery"
class="JmsComponent"
- createDeletePolicy="both"
+ createDeletePolicy="delete-only"
>
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="topic"/>
+ <c:simple-property name="path" readOnly="true" default="jms-topic"/>
</plugin-configuration>
<resource-configuration> <!-- See BZ 705713 TODO -->
- <c:list-property name="entries" required="false" readOnly="false"
+ <c:list-property name="entries" required="false" readOnly="true"
description="The jndi names the queue will be bound to.">
<c:simple-property name="entries" type="string"/>
</c:list-property>
commit d3f942a14e0497b7bcbd6561c495f391513cdb29
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jul 26 22:29:16 2011 +0200
Add more properties for JBossWeb. Unfortunately they are read-only in AS7
Follow :read-resource output, as the resource description from AS7 is not up to date.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index d9f79d1..6a8698e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -614,6 +614,78 @@
<c:simple-property name="path" readOnly="true" default="subsystem=web"/>
</plugin-configuration>
+ <resource-configuration>
+ <c:simple-property name="default-virtual-server" required="false" type="string" readOnly="true" defaultValue="localhost"
+ description="The web container's default virtual server."/>
+ <c:simple-property name="native" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Add the native initialization listener to the web container."/>
+ <c:map-property name="configuration" description="The common web container configuration." >
+ <c:map-property name="static-resources" description="Configuration for static resources" >
+ <c:simple-property name="listings" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable folder listings."/>
+ <c:simple-property name="sendfile" required="false" type="integer" readOnly="true" defaultValue="49152"
+ description="Enable sendfile if possible, for files bigger than the specified byte size."/>
+ <c:simple-property name="read-only" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Allow write HTTP methods (PUT, DELETE)."/>
+ <c:simple-property name="webdav" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable WebDAV functionality."/>
+ <c:simple-property name="secret" required="false" type="string" readOnly="true" description="Secret for WebDAV locking operations."/>
+ <c:simple-property name="max-depth" required="false" type="integer" readOnly="true" defaultValue="3"
+ description="Maximum recursion for PROPFIND."/>
+ <c:simple-property name="disabled" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable the JSP container."/>
+ </c:map-property>
+ <c:map-property name="jsp-configuration" description="JSP container configuration">
+ <c:simple-property name="development" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable the development mode, which gives more information when an error occurs."/>
+ <c:simple-property name="file-encoding" required="false" type="string" readOnly="true" description="Force a file encoding."/>
+ <c:simple-property name="keep-generated" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Keep the generated Servlets."/>
+ <c:simple-property name="trim-spaces" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Trim some spaces from the generated Servlet."/>
+ <c:simple-property name="tag-pooling" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Enable tag pooling."/>
+ <c:simple-property name="mapped-file" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Map to the JSP source."/>
+ <c:simple-property name="check-interval" required="false" type="integer" readOnly="true" defaultValue="0"
+ description="Check interval for JSP updates using a background thread."/>
+ <c:simple-property name="modification-test-interval" required="false" type="integer" readOnly="true" defaultValue="4"
+ description="Minimum amount of time between two tests for updates, in seconds."/>
+ <c:simple-property name="recompile-on-fail" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Retry failed JSP compilations on each request."/>
+ <c:simple-property name="smap" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable SMAP."/>
+ <c:simple-property name="dump-smap" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Write SMAP data to a file."/>
+ <c:simple-property name="generate-strings-as-char-arrays" required="false" type="boolean" readOnly="true"
+ defaultValue="false"
+ description="Generate String constants as char arrays."/>
+ <c:simple-property name="error-on-use-bean-invalid-class-attribute" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable errors when using a bad class in useBean."/>
+ <c:simple-property name="scratch-dir" required="false" type="string" readOnly="true" description="Specify a different work directory."/>
+ <c:simple-property name="source-vm" required="false" type="string" readOnly="true" defaultValue="1.5"
+ description="Source VM level for compilation."/>
+ <c:simple-property name="target-vm" required="false" type="string" readOnly="true" defaultValue="1.5"
+ description="Target VM level for compilation."/>
+ <c:simple-property name="java-encoding" required="false" type="string" readOnly="true" defaultValue="UTF-8"
+ description="Specify the encoding used for Java sources."/>
+ <c:simple-property name="x-powered-by" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Enable advertising the JSP engine in x-powered-by."/>
+ <c:simple-property name="display-source-fragment" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="When a runtime error occurs, attempts to display corresponding JSP source fragment."/>
+ </c:map-property>
+ <c:list-property name="mime-mapping" description="A mime-mapping definition." >
+ <c:map-property name="mime-mapping" >
+ <c:simple-property name="name" description="A MIME mapping name"/>
+ <c:simple-property name="value" description="A MIME mapping value"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="welcome-file" description="A welcome file declaration." >
+ <c:simple-property name="welcome-file" />
+ </c:list-property>
+ </c:map-property>
+ </resource-configuration>
+
<service name="Connector"
discovery="SubsystemDiscovery"
class="BaseComponent"
commit 8cf10dd720219a5b1a03e825eae5ca2ccd978a5f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Jul 27 09:18:58 2011 +0200
Get rid of the explicit version number and let maven do the magic.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 0927693..d9f79d1 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -48,7 +48,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration"
- version="4.0.0-SNAPSHOT"
>
<!-- <depends plugin="JMX" useClasses="true"/> -->
commit 9b8876e0032bf4c94568bd784ac44b38198f4731
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Jul 27 11:18:39 2011 +0200
Log the property being null and don't pollute stdout.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
index e978962..c999be6 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
@@ -269,8 +269,10 @@ public class ConfigurationLoadDelegate implements ConfigurationFacet {
if (property!=null)
propertyMap.put(property);
- else
- System.out.println("Property " + key + " was null");
+ else {
+ if (log.isDebugEnabled())
+ log.debug("Property " + key + " was null");
+ }
}
commit 8de2372999f6778ac2c41d7f4d80fcea239e4e2d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 18:00:50 2011 +0200
Provide more connection properties for standalone servers as well as the version. Add start and restart operations for standalone servers.
Read the running instance name (i.e. standalone server name) from standalone.xml
Allow to start a domain/host controller.
Allow to shut down hosts in a domain.
Allow to shut down host controllers. Revert the ability to shutdown hosts - this needs to be done at HC level.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
index 63a4e45..c089b79 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
@@ -46,9 +46,15 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
protected Document hostXml;
protected final Log log = LogFactory.getLog(this.getClass());
-// private final Log log = LogFactory.getLog(AbstractBaseDiscovery.class);
- protected void readHostXml(ProcessInfo processInfo,boolean isDomainMode) {
+ /**
+ * Read the host.xml or standalone.xml file depending on isDomainMode. If isDomainMode is true,
+ * host.xml is read, otherwise standalone.xml.
+ * The xml file content is stored in the variable hostXml for future use.
+ * @param processInfo Process info to determine the base file location
+ * @param isDomainMode Indiates if host.xml should be read (true) or standalone.xml (false)
+ */
+ protected void readStandaloneOrHostXml(ProcessInfo processInfo, boolean isDomainMode) {
String hostXmlFile = getHostXmlFileLocation(processInfo,isDomainMode);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
@@ -61,7 +67,11 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
}
}
-
+ /**
+ * Determine the server home (=base) directory by parsing the passed command line
+ * @param commandLine command line arguments of the process
+ * @return The home dir if found or empty string otherwise
+ */
String getHomeDirFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
if (line.startsWith(DJBOSS_SERVER_HOME_DIR))
@@ -70,6 +80,11 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return "";
}
+ /**
+ * Determine the location of the boot log file of the server by parsing the command line
+ * @param commandLine command line arguments of the process
+ * @return The log file location or empty string otherwise
+ */
String getLogFileFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
@@ -79,7 +94,14 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return "";
}
+ /**
+ * Try to obtain the management IP and port from the already parsed host.xml or standalone.xml
+ * @return an Object containing host and port
+ * @see #readStandaloneOrHostXml(org.rhq.core.system.ProcessInfo, boolean) on how to obtain the parsed xml
+ */
protected HostPort getManagementPortFromHostXml() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
Element host = hostXml.getDocumentElement();
NodeList interfaceParent = host.getElementsByTagName("management-interfaces");
if (interfaceParent ==null || interfaceParent.getLength()==0) {
@@ -112,7 +134,15 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return new HostPort();
}
+ /**
+ * Try to obtain the management interface IP from the host/standalone.xml files
+ * @param nIf Interface to look for
+ * @return IP address to use
+ */
private String getInterface(String nIf) {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
+
Element host = hostXml.getDocumentElement();
NodeList interfaceParent = host.getElementsByTagName("interfaces");
if (interfaceParent ==null || interfaceParent.getLength()==0) {
@@ -155,12 +185,26 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return null; // TODO: Customise this generated block
}
+ /**
+ * Try to determine the host name - that is the name of a standalone server or a
+ * host in domain mode by looking at the standalone/host.xml files
+ * @return server name
+ */
protected String findHostName() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
+
String hostName = hostXml.getDocumentElement().getAttribute("name");
return hostName;
}
+ /**
+ * Try to obtain the domain controller's location from looking at host.xml
+ * @return host and port of the domain controller
+ */
protected HostPort getDomainControllerFromHostXml() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
Element host = hostXml.getDocumentElement();
NodeList dcParent = host.getElementsByTagName("domain-controller");
@@ -211,6 +255,9 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
}
+ /**
+ * Helper class that holds information about the host,port tuple
+ */
protected static class HostPort {
String host;
int port;
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 8851706..776e5ef 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
@@ -79,7 +79,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
final Log log = LogFactory.getLog(this.getClass());
ResourceContext context;
- Configuration conf;
+ Configuration pluginConfiguration;
String myServerName;
ASConnection connection;
String path;
@@ -107,16 +107,16 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
*/
public void start(ResourceContext context) throws InvalidPluginConfigurationException, Exception {
this.context = context;
- conf = context.getPluginConfiguration();
+ pluginConfiguration = context.getPluginConfiguration();
String typeName = context.getResourceType().getName();
// TODO can we use parent's connection and only set this up for top level base component?
- host = conf.getSimpleValue("hostname", LOCALHOST);
- String portString = conf.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
+ host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
+ String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
port = Integer.parseInt(portString);
connection = new ASConnection(host,port);
- path = conf.getSimpleValue("path", null);
+ path = pluginConfiguration.getSimpleValue("path", null);
key = context.getResourceKey();
myServerName = context.getResourceKey().substring(context.getResourceKey().lastIndexOf("/")+1);
@@ -445,16 +445,15 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>();
if (what.equals("server-group")) {
- String groupName = parameters.getSimpleValue("name",null);
+ String groupName = parameters.getSimpleValue("name","");
String profile = parameters.getSimpleValue("profile","default");
address.add(new PROPERTY_VALUE("server-group",groupName));
operation = new Operation(op,address,"profile",profile);
} else if (what.equals("server")) {
-
if (context.getResourceType().getName().equals("JBossAS-Managed")) {
- String host = conf.getSimpleValue("domainHost","local");
+ String host = pluginConfiguration.getSimpleValue("domainHost","local");
address.add(new PROPERTY_VALUE("host",host));
address.add(new PROPERTY_VALUE("server-config",myServerName));
operation = new Operation(op,address);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 2f71edb..475fd62 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -18,8 +18,11 @@
*/
package org.rhq.modules.plugins.jbossas7;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.List;
@@ -30,7 +33,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.support.metadata.LocalVMTypeDescriptor;
import org.w3c.dom.Document;
import org.rhq.core.domain.configuration.Configuration;
@@ -43,8 +45,6 @@ import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.system.ProcessInfo;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
/**
* Discovery class
@@ -53,9 +53,10 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
{
- static final String DJBOSS_SERVER_BASE_DIR = "-Djboss.server.base.dir=";
+ static final String DJBOSS_HOME_DIR = "-Djboss.home.dir=";
static final String DORG_JBOSS_BOOT_LOG_FILE = "-Dorg.jboss.boot.log.file=";
static final String DLOGGING_CONFIGURATION = "-Dlogging.configuration=";
+ static final String DASH_DASH_SERVER_CONFIG = "--server-config=";
private final Log log = LogFactory.getLog(this.getClass());
/**
@@ -77,11 +78,13 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
String serverName;
String psName = psr.getProcessScan().getName();
String description = discoveryContext.getResourceType().getDescription();
+ String version = null;
+ String startScript;
if (psName.equals("ProcessController")) {
serverNameFull = "ProcessController";
serverName = "ProcessController";
} else if (psName.equals("HostController")) {
- readHostXml(psr.getProcessInfo(),true);
+ readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
serverName = "DomainController";
@@ -92,11 +95,20 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
serverName = "HostController";
serverNameFull = "HostController";
}
- config.put(new PropertySimple("homedir",getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine())));
- // TODO add the start script
+ String homeDir = getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine());
+ config.put(new PropertySimple("baseDir", homeDir));
+ version = homeDir.substring(homeDir.lastIndexOf("-")+1);
+ config.put(new PropertySimple("startScript","bin/domain.sh"));
+ String host = findHost(psr.getProcessInfo(),true);
+ config.put(new PropertySimple("domainHost",host));
+
+ fillUserPassFromFile(config,"domain",homeDir);
+
+ // TODO provide running config
- } else {
- serverNameFull = getBaseDirFromCommandLine(commandLine);
+ } else { // Standalone server
+ serverNameFull = getHomeDirFromCommandLine(commandLine);
+ readStandaloneOrHostXml(psr.getProcessInfo(), false);
if (serverNameFull==null || serverNameFull.isEmpty()) {
// Try to obtain the server name
// -Dorg.jboss.boot.log.file=domain/servers/server-one/log/boot.log
@@ -111,10 +123,19 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
config.put(new PropertySimple("domainHost",host));
}
- serverName = serverNameFull.substring(serverNameFull.lastIndexOf("/")+1);
+ config.put(new PropertySimple("baseDir",serverNameFull));
+ serverName = findHostName();
if (serverName.isEmpty())
serverName = serverNameFull;
+ version = serverName.substring(serverName.lastIndexOf("-")+1);
+
+ String serverConfig = getServerConfigFromCommandLine(commandLine);
+ config.put(new PropertySimple("config",serverConfig));
+ config.put(new PropertySimple("startScript","bin/standalone.sh"));
+
+ fillUserPassFromFile(config,"standalone", serverNameFull);
+
}
String logFile = getLogFileFromCommandLine(commandLine);
initLogEventSourcesConfigProp(logFile,config);
@@ -139,7 +160,7 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
discoveryContext.getResourceType(), // ResourceType
serverNameFull, // key TODO distinguish per domain?
serverName, // Name
- null, // TODO real version ?
+ version, // TODO get via API ?Á
description, // Description
config,
psr.getProcessInfo()
@@ -155,6 +176,48 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
+ private void fillUserPassFromFile(Configuration config, String mode, String baseDir) {
+
+ String configDir = baseDir + File.separator + mode + File.separator + "configuration";
+
+ File file = new File(configDir ,"mgmt-users.properties");
+ if (!file.exists() || !file.canRead()) {
+ if (log.isDebugEnabled())
+ log.debug("No console user properties file found at [" + file.getAbsolutePath() + "] or file is not readable");
+ return;
+ }
+ BufferedReader br=null;
+ try {
+ FileReader fileReader = new FileReader(file);
+ br = new BufferedReader(fileReader);
+ String line;
+ while ((line = br.readLine())!=null) {
+ if (line.startsWith("#"))
+ continue;
+ if (line.isEmpty())
+ continue;
+ if (!line.contains("="))
+ continue;
+ // found a candidate
+ String user = line.substring(0,line.indexOf("="));
+ String pass = line.substring(line.indexOf("=")+1);
+ config.put(new PropertySimple("user",user));
+ config.put(new PropertySimple("password",pass));
+
+ }
+ } catch (IOException e) {
+ e.printStackTrace(); // TODO: Customise this generated block
+ } finally {
+ if (br!=null)
+ try {
+ br.close();
+ } catch (IOException e) {
+ // empty
+ }
+ }
+
+ }
+
private String findHost(ProcessInfo processInfo,boolean isDomain) {
String hostXmlFile = getHostXmlFileLocation(processInfo, isDomain);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -173,12 +236,13 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
return hostName;
}
- String getBaseDirFromCommandLine(String[] commandLine) {
+
+ String getServerConfigFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
- if (line.startsWith(DJBOSS_SERVER_BASE_DIR))
- return line.substring(DJBOSS_SERVER_BASE_DIR.length());
+ if (line.startsWith(DASH_DASH_SERVER_CONFIG))
+ return line.substring(DASH_DASH_SERVER_CONFIG.length());
}
- return "";
+ return "standalone.xml";
}
//-Dorg.jboss.boot.log.file=/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/log/server-manager/boot.log
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
new file mode 100644
index 0000000..c8703a6
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
@@ -0,0 +1,184 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.io.File;
+import java.net.ConnectException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.core.pluginapi.util.ProcessExecutionUtility;
+import org.rhq.core.system.ProcessExecution;
+import org.rhq.core.system.ProcessExecutionResults;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Base component for functionality that is common to Standalone AS and HostControllers
+ * @author Heiko W. Rupp
+ */
+public class BaseServerComponent extends BaseComponent {
+
+ private static final String STANDALONE_XML = "standalone.xml";
+ private static final String SEPARATOR = "\n-----------------------\n";
+ final Log log = LogFactory.getLog(BaseServerComponent.class);
+
+ /**
+ * Restart the server by first executing a 'shutdown' operation via its API. Then call
+ * the #startServer method to start it again.
+ *
+ * @param parameters Parameters to pass to the (recursive) invocation of #invokeOperation
+ * @param mode
+ * @return State of execution
+ * @throws Exception If anything goes wrong
+ */
+ protected OperationResult restartServer(Configuration parameters, Mode mode) throws Exception {
+ OperationResult tmp = invokeOperation("shutdown",parameters);
+
+ if (tmp.getErrorMessage()!=null) {
+ tmp.setErrorMessage("Restart failed while failing to shut down: " + tmp.getErrorMessage());
+ return tmp;
+ }
+ Thread.sleep(500); // Wait 0.5s -- this is plenty
+ return startServer(mode);
+ }
+
+ /**
+ * Start the server by calling the start script listed in the plugin configuration. If a different
+ * config is given, this is passed via --server-config
+ * @return State of Execution.
+ * @param mode
+ */
+ protected OperationResult startServer(Mode mode) {
+ OperationResult operationResult = new OperationResult();
+ Configuration conf = context.getPluginConfiguration();
+ String startScript = conf.getSimpleValue("startScript", mode.getStartScript());
+ String baseDir = conf.getSimpleValue("baseDir","");
+ if (baseDir.isEmpty()) {
+ operationResult.setErrorMessage("No base directory provided");
+ return operationResult;
+ }
+ String script = baseDir + File.separator + startScript;
+ String config = conf.getSimpleValue("config", mode.getXmlFile());
+
+ ProcessExecution processExecution;
+ processExecution = ProcessExecutionUtility.createProcessExecution(new File(script));
+ if (!config.equals(mode.getXmlFile())) {
+ processExecution.getArguments().add(mode.getConfigArg());
+ processExecution.getArguments().add(config);
+ }
+ processExecution.setWorkingDirectory(baseDir);
+ processExecution.setCaptureOutput(true);
+ processExecution.setWaitForCompletion(2000L); // 2 seconds // TODO: Should we wait longer than two seconds?
+ processExecution.setKillOnTimeout(false);
+
+
+ long start = System.currentTimeMillis();
+ if (log.isDebugEnabled()) {
+ log.debug("About to execute the following process: [" + processExecution + "]");
+ }
+ ProcessExecutionResults results = context.getSystemInformation().executeProcess(processExecution);
+ logExecutionResults(results);
+ if (results.getError()!=null) {
+ operationResult.setErrorMessage(results.getError().getMessage());
+ } else {
+ operationResult.setSimpleResult("Success");
+ }
+
+ return operationResult;
+
+ }
+
+ private void logExecutionResults(ProcessExecutionResults results) {
+ // Always log the output at info level. On Unix we could switch depending on a exitCode being !=0, but ...
+ log.info("Exit code from process execution: " + results.getExitCode());
+ log.info("Output from process execution: " + SEPARATOR + results.getCapturedOutput() + SEPARATOR);
+ }
+
+ /**
+ * Do some post processing of the Result - especially the 'shutdown' operation needs a special
+ * treatment.
+ * @param name Name of the operation
+ * @param res Result of the operation vs. AS7
+ * @return OperationResult filled in from values of res
+ */
+ protected OperationResult postProcessResult(String name, Result res) {
+ OperationResult operationResult = new OperationResult();
+ if (name.equals("shutdown")) {
+ /*
+ * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
+ * the server connection is closed and we can't read from it. So if we get connection refused for
+ * reading, this is a good sign.
+ */
+ if (!res.isSuccess()) {
+ if (res.getThrowable()!=null && (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused")))
+ operationResult.setSimpleResult("Success");
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ }
+ else {
+ if (res.isSuccess()) {
+ if (res.getResult()!=null)
+ operationResult.setSimpleResult(res.getResult().toString());
+ else
+ operationResult.setSimpleResult("-None provided by server-");
+ }
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ return operationResult;
+ }
+
+ enum Mode {
+ STANDALONE(STANDALONE_XML,"standalone","--server-config","bin/standalone.sh"),
+ DOMAIN("domain.xml","domain", "--domain-config","bin/domain.sh"),
+ HOST("host.xml","domain", "--host-config","bin/domain.sh");
+
+ private String xmlFile;
+ private String baseDir;
+ private String configArg;
+ private String startScript;
+
+ private Mode(String xmlFile, String baseDir, String configArg, String startScript) {
+ this.xmlFile = xmlFile;
+ this.baseDir = baseDir;
+ this.configArg = configArg;
+ this.startScript = startScript;
+ }
+
+ public String getXmlFile() {
+ return xmlFile;
+ }
+
+ public String getBaseDir() {
+ return baseDir;
+ }
+
+ public String getConfigArg() {
+ return configArg;
+ }
+
+ public String getStartScript() {
+ return startScript;
+ }
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java
deleted file mode 100644
index c25fe88..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.modules.plugins.jbossas7.json.Operation;
-import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
-import org.rhq.modules.plugins.jbossas7.json.Result;
-
-/**
- * Common stuff for the Domain
- * @author Heiko W. Rupp
- */
-@SuppressWarnings("unused")
-public class DomainComponent extends BaseComponent implements OperationFacet{
-
- @Override
- public AvailabilityType getAvailability() {
-
- if (context.getResourceType().getName().equals("JBossAS-Managed")) {
- List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(2);
- String host = conf.getSimpleValue("domainHost","local");
- address.add(new PROPERTY_VALUE("host",host));
- address.add(new PROPERTY_VALUE("server-config",myServerName));
- Operation getStatus = new Operation("read-attribute",address,"name","status");
- Result result = null;
- try {
- result = connection.execute(getStatus);
- } catch (Exception e) {
- log.warn(e.getMessage());
- return AvailabilityType.DOWN;
- }
- if (!result.isSuccess())
- return AvailabilityType.DOWN;
-
- String msg = result.getResult().toString();
- if (msg.contains("STARTED"))
- return AvailabilityType.UP;
- else
- return AvailabilityType.DOWN;
- }
-
- return super.getAvailability(); // TODO: Customise this generated block
- }
-
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
new file mode 100644
index 0000000..73eb0bb
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -0,0 +1,64 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Component class for host- and domain controller
+ * @author Heiko W. Rupp
+ */
+public class HostControllerComponent extends BaseServerComponent implements OperationFacet {
+
+ private final Log log = LogFactory.getLog(HostControllerComponent.class);
+
+ @Override
+ public OperationResult invokeOperation(String name,
+ Configuration parameters) throws InterruptedException, Exception {
+
+ if (name.equals("start")) {
+ return startServer(Mode.DOMAIN);
+ } else if (name.equals("restart")) {
+ return restartServer(parameters, Mode.DOMAIN);
+
+ } else if (name.equals("shutdown")) {
+ // This is a bit trickier, as it needs to be executed on the level on /host=xx
+ String domainHost = pluginConfiguration.getSimpleValue("domainHost","");
+ if (domainHost.isEmpty()) {
+ OperationResult result = new OperationResult();
+ result.setErrorMessage("No domain host found - can not continue");
+ return result;
+ }
+ Operation op = new Operation("shutdown","host",domainHost);
+ Result res = getASConnection().execute(op);
+
+ postProcessResult(name,res);
+ }
+
+ // Defer other stuff to the base component for now
+ return super.invokeOperation(name, parameters);
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
index d0d3eee..951430c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
@@ -32,7 +32,6 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
@@ -43,7 +42,7 @@ import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
* Component class for the JMS subsystem
* @author Heiko W. Rupp
*/
-public class JmsComponent extends DomainComponent {
+public class JmsComponent extends BaseComponent {
private final Log log = LogFactory.getLog(JmsComponent.class);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
new file mode 100644
index 0000000..64ac2b6
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Common stuff for the Domain
+ * @author Heiko W. Rupp
+ */
+@SuppressWarnings("unused")
+public class ManagedASComponent extends BaseComponent {
+
+ /**
+ * Get the availability of the managed AS server. We can't just check if
+ * a connection succeeds, as the check runs against the API/HostController
+ * and the managed server may still be down even if the connection succeeds.
+ * @return Availability of the managed AS instance.
+ */
+ @Override
+ public AvailabilityType getAvailability() {
+
+ if (context.getResourceType().getName().equals("JBossAS-Managed")) {
+ List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(2);
+ String host = pluginConfiguration.getSimpleValue("domainHost","local");
+ address.add(new PROPERTY_VALUE("host",host));
+ address.add(new PROPERTY_VALUE("server-config",myServerName));
+ Operation getStatus = new Operation("read-attribute",address,"name","status");
+ Result result = null;
+ try {
+ result = connection.execute(getStatus);
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ return AvailabilityType.DOWN;
+ }
+ if (!result.isSuccess())
+ return AvailabilityType.DOWN;
+
+ String msg = result.getResult().toString();
+ if (msg.contains("STARTED"))
+ return AvailabilityType.UP;
+ else
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 3946dbe..fd1b65d 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -70,7 +70,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
// Now we have the host controller, lets get the host.xml file
// and obtain the servers from there.
ProcessInfo processInfo = psr.getProcessInfo();
- readHostXml(processInfo,true);
+ readStandaloneOrHostXml(processInfo, true);
String hostName = findHostName();
HostPort managementHostPort = getManagementPortFromHostXml();
@@ -105,13 +105,16 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
// TODO this fails for the downed servers.
// get from the domain or other place as soon as the domain provides it.
- initLogFile(scans, serverInfo.name, config, getHomeDirFromCommandLine(processInfo.getCommandLine()));
+ String homeDir = getHomeDirFromCommandLine(processInfo.getCommandLine());
+ initLogFile(scans, serverInfo.name, config, homeDir);
+
+ String version = homeDir.substring(homeDir.lastIndexOf("-")+1);
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
discoveryContext.getResourceType(), // ResourceType
hostName + "/" + serverInfo.name, // key
serverInfo.name, // Name
- null, // TODO real version - get from Domain as soon as it is provided
+ version, // TODO get from Domain as soon as it is provided
"Managed AS 7 instance", // Description
config,
null
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 15cb5d3..ad1109b 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
@@ -23,7 +23,6 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -38,12 +37,10 @@ import org.rhq.core.domain.content.transfer.DeployPackageStep;
import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.content.ContentContext;
import org.rhq.core.pluginapi.content.ContentFacet;
import org.rhq.core.pluginapi.content.ContentServices;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -55,7 +52,7 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
* @author Heiko W. Rupp
*/
@SuppressWarnings("unused")
-public class ServerGroupComponent extends DomainComponent implements ContentFacet, CreateChildResourceFacet {
+public class ServerGroupComponent extends ManagedASComponent implements ContentFacet, CreateChildResourceFacet {
private static final String SUCCESS = "success";
private static final String OUTCOME = "outcome";
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
index 0281279..ebddf95 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -31,41 +31,25 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
* Component class for standalone AS7 servers
* @author Heiko W. Rupp
*/
-public class StandaloneASComponent extends BaseComponent implements OperationFacet {
-
+public class StandaloneASComponent extends BaseServerComponent implements OperationFacet {
@Override
public OperationResult invokeOperation(String name,
Configuration parameters) throws Exception {
- // reload, shutdown
+ if (name.equals("start")) {
+ return startServer(Mode.STANDALONE);
+ } else if (name.equals("restart")) {
+ return restartServer(parameters, Mode.STANDALONE);
+
+ }
+
+ // reload, shutdown go to the remote server
Operation op = new Operation(name,new Address());
Result res = getASConnection().execute(op);
- OperationResult operationResult = new OperationResult();
- if (name.equals("shutdown")) {
- /*
- * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
- * the server connection is closed and we can't read from it. So if we get connection refused for
- * reading, this is a good sign.
- */
- if (!res.isSuccess()) {
- if (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused"))
- operationResult.setSimpleResult("Success");
- else
- operationResult.setErrorMessage(res.getFailureDescription());
- }
- }
- else {
- if (res.isSuccess()) {
- if (res.getResult()!=null)
- operationResult.setSimpleResult(res.getResult().toString());
- else
- operationResult.setSimpleResult("-None provided by server-");
- }
- else
- operationResult.setErrorMessage(res.getFailureDescription());
- }
+ OperationResult operationResult = postProcessResult(name, res);
return operationResult;
}
+
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index ad91dac..d762485 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -51,6 +51,25 @@ public class Address {
path.addAll(other);
}
+ public Address(String path) {
+ this();
+ String[] components = path.split(",");
+ for (String component : components) {
+ String tmp = component.trim();
+
+ if (tmp.contains("=")) {
+ // strip / from the start of the key if it happens to be there
+ if (tmp.startsWith("/"))
+ tmp = tmp.substring(1);
+
+ String[] pair = tmp.split("=");
+ PROPERTY_VALUE valuePair = new PROPERTY_VALUE(pair[0], pair[1]);
+ this.path.add(valuePair);
+ }
+ }
+
+ }
+
public void add(String key, String value) {
path.add(new PROPERTY_VALUE(key,value));
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c0e364d..0927693 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -58,6 +58,7 @@
~~ additional 'Personalities' for the kinds of servers (PM, SM, Standalone AS, Managed AS)
-->
+ <!-- TODO do we want to show the process controller at all? We have no benefit from it
<server name="ProcessController"
discovery="BaseProcessDiscovery"
class="BaseComponent"
@@ -68,27 +69,28 @@
<c:simple-property name="hostname" default="localhost" required="true"/>
<c:simple-property name="port" default="9990" type="integer" required="true"/>
- &logSources;
</plugin-configuration>
<process-scan name="ProcessController" query="process|basename|match=^java.*,arg|org.jboss.as.process-controller|match=.*"/>
- <operation name="dummyOperation">
- <!-- TODO supply parameters and return values -->
- </operation>
-
-
</server>
+ -->
<server name="HostController"
discovery="BaseProcessDiscovery"
- class="BaseComponent"
+ class="HostControllerComponent"
description="Domain controller (delegate) for this host"
>
<plugin-configuration>
- <c:simple-property name="hostname" default="localhost" required="true"/>
- <c:simple-property name="port" default="9990" type="integer" required="true"/>
+ <c:simple-property name="hostname" default="localhost" required="true" description="Host name of the domain API"/>
+ <c:simple-property name="port" default="9990" type="integer" required="true" description="Port of the domain API"/>
+ <c:simple-property name="user" type="string" description="Management user for a secured Host controller" required="false"/>
+ <c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
+ <c:simple-property name="config" type="string" default="domain.xml" description="Running configuration" displayName="Configuration"/>
+ <c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
+ <c:simple-property name="startScript" type="file" default="bin/domain.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
+ <c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
&logSources;
</plugin-configuration>
@@ -96,8 +98,10 @@
<process-scan name="HostController" query="process|basename|match=^java.*,arg|org.jboss.as.host-controller|match=.*"/>
+<!-- Currently not provided by AS7
<operation name="domain:shutdown" displayName="Shutdown Domain" description="Shut this Host-/Domaincontroller down with all managed servers.">
</operation>
+-->
<operation name="server-group:add" displayName="Add ServerGroup" description="Add a server group to the Domain.">
<parameters>
@@ -146,6 +150,17 @@
</operation>
+ <operation name="start" description="Start this Host-/Domaincontroller" displayName="Start this host controller">
+ <results>
+ <c:simple-property name="operationResult" description="Outcome of the start operation"/>
+ </results>
+ </operation>
+ <operation name="shutdown" description="Stop this Host-/Domaincontroller" displayName="Shut down this host controller">
+ <results>
+ <c:simple-property name="operationResult" description="Outcome of the stop operation"/>
+ </results>
+ </operation>
+
<metric property="_internal:mgmtRequests" category="performance" dataType="measurement" defaultInterval="120000"
displayType="summary" measurementType="trendsup" description="Number of requests sent to the controller"
@@ -206,7 +221,7 @@
<resource-configuration>
<c:simple-property name="profile" description="The profile name" required="true"/>
<c:simple-property name="socket-binding-group" readOnly="false" required="true">
- <c:option-source target="resource" expression="type=SocketBindingGroup"/>
+ <c:option-source target="resource" expression="type=SocketBindingGroupDomain"/>
</c:simple-property>
<c:simple-property name="socket-binding-port-offset" required="false" defaultValue="0" type="integer"
description="The default offset to be added to the port values given by the socket binding group."/>
@@ -217,7 +232,7 @@
<server name="Host"
description="Host involved in this domain"
discovery="SubsystemDiscovery"
- class="DomainComponent"
+ class="BaseComponent"
>
<plugin-configuration>
<c:simple-property name="path" default="host" readOnly="true"/>
@@ -287,11 +302,17 @@
<server name="JBossAS7-Standalone"
discovery="BaseProcessDiscovery"
class="StandaloneASComponent"
+ description="Standalone AS7 server"
>
<plugin-configuration>
<c:simple-property name="hostname" default="localhost" required="true"/>
<c:simple-property name="port" default="9990" type="integer" required="true"/>
+ <c:simple-property name="user" type="string" description="Management user for a secured AS" required="false"/>
+ <c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
+ <c:simple-property name="config" type="string" default="standalone.xml" description="Running configuration" displayName="Configuration"/>
+ <c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
+ <c:simple-property name="startScript" type="file" default="bin/standalone.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
<c:list-property name="system-properties">
<c:map-property name="system-property">
<c:simple-property name="key" readOnly="true"/>
@@ -303,7 +324,18 @@
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
- <operation name="reload" description="Make the server load the (changed) configuration." displayName="Reload">
+
+ <operation name="reload" description="Make the server re-load the (changed) configuration. To load a different startup config use 'restart'" displayName="Reload">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="start" description="Start the server by invoking its start script">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="restart" description="Restart the server by shutting it down and invoking its start script">
<results>
<c:simple-property name="operationResult"/>
</results>
@@ -353,14 +385,14 @@
<server name="JBossAS-Managed"
discovery="ManagedASDiscovery"
- class="DomainComponent"
+ class="ManagedASComponent"
>
<plugin-configuration>
<c:simple-property name="hostname" default="localhost" displayName="Management host" required="true"/>
<c:simple-property name="port" default="9990" type="integer" displayName="Management port" required="true"/>
<c:simple-property name="domainHost" readOnly="true" description="Hostname in the domain"/>
<c:simple-property name="group" readOnly="true" displayName="Server Group" description="Server Group this instance belongs to."/>
- <c:simple-property name="socket-binding-group" readOnly="true" displayName="Socket binding group" description="Socket bindngs to use"/>
+ <c:simple-property name="socket-binding-group" readOnly="true" displayName="Socket binding group" description="Socket bindings to use"/>
<c:simple-property name="socket-binding-port-offset" readOnly="true" displayName="Port Offset" type="integer" default="0" description="Offset to the base ports"/>
<c:simple-property name="path" readOnly="true" />
@@ -412,7 +444,7 @@
<server name="Messaging"
discovery="SubsystemDiscovery"
- class="DomainComponent"
+ class="BaseComponent"
description="The underlying HornetQ based messaging subsystem"
singleton="true"
>
@@ -1792,8 +1824,8 @@ working area for individual server instances</li></ul>"/>
<c:list-property name="includes" required="false">
<c:simple-property name="includes" displayName="Included bindings" description="Other bindings that are included in this one (only needed in Domain Mode)"/>
</c:list-property>
- <c:group name="children:socket.binding">
- <c:list-property name="socket-binding">
+ <c:group name="children:socket-binding:name" displayName="Individual socket bindings">
+ <c:list-property name="*">
<c:map-property name="binding">
<c:simple-property name="name" description="The name of the socket. Services which need to access the socket configuration information will find it using this name." readOnly="true"/>
<c:simple-property name="interface" description="Name of the interface to which the socket should be bound, or, for multicast sockets, the interface on which it should listen. This should be one of the declared interfaces."
commit ae90811cb167e8e8c20cb4677fe1e7580714db51
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 17:25:23 2011 +0200
BZ 725417 - if the 'default' attribute is missing on a required property, throw a descriptive exception instead of a NPE.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
index 9b2d1db..3963f9d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
@@ -106,8 +106,14 @@ public class PluginConfigurationMetadataManagerBean implements PluginConfigurati
for (PropertyDefinition propertyDef : updateReport.getNewPropertyDefinitions()) {
if (propertyDef.isRequired()) {
Property templateProperty = templateConfiguration.get(propertyDef.getName());
- pluginConfiguration.put(templateProperty.deepCopy(false));
- modified = true;
+ if (templateProperty==null) {
+ throw new IllegalArgumentException("The property [" + propertyDef.getName()
+ + "] marked as required in the configuration definition of [" + propertyDef.getConfigurationDefinition().getName()
+ + "] has no attribute 'default'");
+ } else {
+ pluginConfiguration.put(templateProperty.deepCopy(false));
+ modified = true;
+ }
}
}
commit e194ab53e5b63d1c17e67d370a65c29fb8b17efe
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 07:54:06 2011 +0200
Extract the deploy-to-server-magic from createChild() and add tests to use this extracted code to deploy to domain and server-group.
diff --git a/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
index 8581ada..2010640 100644
--- a/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
+++ b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
@@ -26,7 +26,17 @@ import java.util.Map;
import org.codehaus.jackson.JsonNode;
import org.testng.annotations.Test;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.modules.plugins.jbossas7.ASConnection;
+import org.rhq.modules.plugins.jbossas7.BaseComponent;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -292,7 +302,7 @@ public class UploadAndDeployTest extends AbstractIntegrationTest {
/**
* Test uploading to domain only, but not to a server group
- * @throws Exception
+ * @throws Exception if anything goes wrong.
*/
@Test(timeOut = 60*1000L,enabled = isEnabled)
public void testUploadComposite2() throws Exception {
@@ -346,4 +356,77 @@ public class UploadAndDeployTest extends AbstractIntegrationTest {
}
+ /**
+ * Test the real API code for uploading - case 1: just upload to /deployment
+ * @throws Exception if anything goes wrong.
+ */
+ @Test
+ public void testUploadViaCreateChild1() throws Exception {
+
+ BaseComponent bc = new BaseComponent();
+ bc.setConnection(getASConnection());
+ bc.setPath("");
+ ResourceType rt = new ResourceType();
+ rt.setName("Deployment");
+ Resource resource = new Resource("deployment="+TEST_WAR,TEST_WAR,rt); // TODO resource key?
+ ResourceContext context = new ResourceContext(resource,null,null,null,null,null,null,null,null,null,null,null);
+ bc.start(context);
+
+ String bytes_value = uploadToAs(TEST_WAR);
+
+ ResourcePackageDetails details = new ResourcePackageDetails(new PackageDetailsKey(TEST_WAR,"1.0","deployment","all"));
+ CreateResourceReport report = new CreateResourceReport(TEST_WAR,rt,new Configuration(), new Configuration(),details);
+ try {
+ report = bc.runDeploymentMagicOnServer(report,TEST_WAR,TEST_WAR,bytes_value);
+ assert report != null;
+ assert report.getErrorMessage()==null: "Report contained an unexpected error: " + report.getErrorMessage();
+ assert report.getStatus()!=null : "Report did not contain a status";
+ assert report.getStatus()== CreateResourceStatus.SUCCESS : "Status was no success";
+ assert report.getResourceName().equals(TEST_WAR);
+ assert report.getResourceKey().equals("deployment=" + TEST_WAR);
+ } finally {
+ Remove r =new Remove("deployment",TEST_WAR);
+ getASConnection().execute(r);
+ }
+
+ }
+
+ /**
+ * Test the real API code for uploading - case 2: upload to /deployment and a server group
+ * @throws Exception if anything goes wrong.
+ */
+ @Test
+ public void testUploadViaCreateChild2() throws Exception {
+
+ BaseComponent bc = new BaseComponent();
+ bc.setConnection(getASConnection());
+ bc.setPath("server-group=main-server-group");
+ ResourceType rt = new ResourceType();
+ rt.setName("Deployment");
+ Resource resource = new Resource("server-group=main-server-group",TEST_WAR,rt);
+ ResourceContext context = new ResourceContext(resource,null,null,null,null,null,null,null,null,null,null,null);
+ bc.start(context);
+
+ String bytes_value = uploadToAs(TEST_WAR);
+
+ ResourcePackageDetails details = new ResourcePackageDetails(new PackageDetailsKey(TEST_WAR,"1.0","deployment","all"));
+ CreateResourceReport report = new CreateResourceReport(TEST_WAR,rt,new Configuration(), new Configuration(),details);
+ try {
+ report = bc.runDeploymentMagicOnServer(report,TEST_WAR,TEST_WAR,bytes_value);
+ assert report != null;
+ assert report.getErrorMessage()==null: "Report contained an unexpected error: " + report.getErrorMessage();
+ assert report.getStatus()!=null : "Report did not contain a status";
+ assert report.getStatus()== CreateResourceStatus.SUCCESS : "Status was no success";
+ assert report.getResourceName().equals(TEST_WAR);
+ assert report.getResourceKey().equals("server-group=main-server-group,deployment=" + TEST_WAR) : "Resource key was wrong";
+ } finally {
+ Address sgd = new Address("server-group","main-server-group");
+ sgd.add("deployment", TEST_WAR);
+ Remove r =new Remove(sgd);
+ getASConnection().execute(r);
+ r =new Remove("deployment",TEST_WAR);
+ getASConnection().execute(r);
+ }
+
+ }
}
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 83b221b..8851706 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
@@ -331,18 +331,34 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
fileName=fileName.substring("C:\\fakepath\\".length());
}
- boolean toServerGroup = context.getResourceKey().contains("server-group=");
- log.info("Deploying [" + fileName + "] to domain only= " + !toServerGroup + " ...");
String tmpName = fileName; // TODO figure out the tmp-name biz with the AS guys
JsonNode resultNode = uploadResult.get("result");
String hash = resultNode.get("BYTES_VALUE").getTextValue();
+ return runDeploymentMagicOnServer(report, fileName, tmpName, hash);
+
+ }
+
+ /**
+ * Do the actual fumbling with the domain api to deploy the uploaded content
+ * @param report CreateResourceReport to report the result
+ * @param runtimeName File name to use as runtime name
+ * @param deploymentName Name of the deployment
+ * @param hash Hash of the content bytes
+ * @return the passed report with success or failure settings
+ */
+ public CreateResourceReport runDeploymentMagicOnServer(CreateResourceReport report, String runtimeName,
+ String deploymentName, String hash) {
+
+ boolean toServerGroup = context.getResourceKey().contains("server-group=");
+ log.info("Deploying [" + runtimeName + "] to domain only= " + !toServerGroup + " ...");
+
ASConnection connection = getASConnection();
- Operation step1 = new Operation("add","deployment",tmpName);
+ Operation step1 = new Operation("add","deployment",deploymentName);
// step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
List<Object> content = new ArrayList<Object>(1);
Map<String,Object> contentValues = new HashMap<String,Object>();
@@ -350,8 +366,8 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
content.add(contentValues);
step1.addAdditionalProperty("content",content);
- step1.addAdditionalProperty("name", tmpName);
- step1.addAdditionalProperty("runtime-name", fileName);
+ step1.addAdditionalProperty("name", deploymentName);
+ step1.addAdditionalProperty("runtime-name", runtimeName);
String resourceKey;
Result result ;
@@ -379,7 +395,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
List<PROPERTY_VALUE> serverGroupAddress = new ArrayList<PROPERTY_VALUE>();
serverGroupAddress.addAll(pathToAddress(context.getResourceKey()));
- serverGroupAddress.add(new PROPERTY_VALUE("deployment", tmpName));
+ serverGroupAddress.add(new PROPERTY_VALUE("deployment", deploymentName));
Operation step2 = new Operation("add",serverGroupAddress);
cop.addStep(step2);
@@ -403,13 +419,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
else {
report.setStatus(CreateResourceStatus.SUCCESS);
- report.setResourceName(fileName);
+ report.setResourceName(runtimeName);
report.setResourceKey(resourceKey);
log.info(" ... with success and key [" + resourceKey + "]" );
}
return report;
-
}
@Override
commit f1b3ecdcd88a1dca8e39236caca260f51a100311
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 28 15:44:35 2011 +0200
BZ 726378 - management port settings on AS7 were not honored.
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 322e453..9aa9db0 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
@@ -111,12 +111,15 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
this.context = context;
pluginConfiguration = context.getPluginConfiguration();
- String typeName = context.getResourceType().getName();
- // TODO can we use parent's connection and only set this up for top level base component?
- host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
- String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
- port = Integer.parseInt(portString);
- connection = new ASConnection(host,port);
+ if (!(context.getParentResourceComponent() instanceof BaseComponent)) {
+ host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
+ String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
+ port = Integer.parseInt(portString);
+ connection = new ASConnection(host,port);
+ }
+ else {
+ connection = ((BaseComponent)context.getParentResourceComponent()).getASConnection();
+ }
path = pluginConfiguration.getSimpleValue("path", null);
key = context.getResourceKey();
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 475fd62..471fd42 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -79,11 +79,8 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
String psName = psr.getProcessScan().getName();
String description = discoveryContext.getResourceType().getDescription();
String version = null;
- String startScript;
- if (psName.equals("ProcessController")) {
- serverNameFull = "ProcessController";
- serverName = "ProcessController";
- } else if (psName.equals("HostController")) {
+
+ if (psName.equals("HostController")) {
readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
@@ -118,11 +115,10 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
tmp = tmp.substring( i + 8);
tmp = tmp.substring(0,tmp.indexOf("/"));
serverNameFull = tmp;
-
- String host = findHost(psr.getProcessInfo(),true);
- config.put(new PropertySimple("domainHost",host));
-
}
+ String host = findHost(psr.getProcessInfo(),true);
+ config.put(new PropertySimple("domainHost",host));
+
config.put(new PropertySimple("baseDir",serverNameFull));
serverName = findHostName();
if (serverName.isEmpty())
@@ -139,6 +135,11 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
String logFile = getLogFileFromCommandLine(commandLine);
initLogEventSourcesConfigProp(logFile,config);
+
+ HostPort managmentPort = getManagementPortFromHostXml();
+ config.put(new PropertySimple("hostname",managmentPort.host));
+ config.put(new PropertySimple("port",managmentPort.port));
+
// String javaClazz = psr.getProcessInfo().getName();
commit d46c2fc9b284b6c4d8d1ef50d098f495a4ae9a50
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 28 13:17:00 2011 +0200
Initial support for messaging (JMS)
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 776e5ef..322e453 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
@@ -23,6 +23,8 @@ import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.JsonNode;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
@@ -480,12 +482,34 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
} else if (what.equals("destination")) {
address.addAll(pathToAddress(getPath()));
String newName = parameters.getSimpleValue("name","");
-// String type = parameters.getSimpleValue("type","Queue").toLowerCase();
-// address.add(new PROPERTY_VALUE(type,newName));
- String queueName = parameters.getSimpleValue("queue-address","");
- Map<String,Object> props = new HashMap<String, Object>();
- props.put("queue-address",queueName);
+ String type = parameters.getSimpleValue("type","jms-queue").toLowerCase();
+ address.add(new PROPERTY_VALUE(type,newName));
+ PropertyList jndiNamesProp = parameters.getList("entries");
+ if (jndiNamesProp==null || jndiNamesProp.getList().isEmpty()) {
+ OperationResult fail = new OperationResult();
+ fail.setErrorMessage("No jndi bindings given");
+ return fail;
+ }
+ List<String> jndiNames = new ArrayList<String>();
+ for (Property p : jndiNamesProp.getList()) {
+ PropertySimple ps = (PropertySimple) p;
+ jndiNames.add(ps.getStringValue());
+ }
+
operation = new Operation(op,address);
+ operation.addAdditionalProperty("entries",jndiNames);
+ if (type.equals("jms-queue")) {
+ PropertySimple ps = (PropertySimple) parameters.get("durable");
+ if (ps!=null) {
+ boolean durable = ps.getBooleanValue();
+ operation.addAdditionalProperty("durable",durable);
+ }
+ String selector = parameters.getSimpleValue("selector","");
+ if (!selector.isEmpty())
+ operation.addAdditionalProperty("selector",selector);
+ }
+
+
} else if (what.equals("managed-server")) {
String chost = parameters.getSimpleValue("hostname","");
String serverName = parameters.getSimpleValue("servername","");
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 6a8698e..20395e0 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -444,7 +444,7 @@
<server name="Messaging"
discovery="SubsystemDiscovery"
class="BaseComponent"
- description="The underlying HornetQ based messaging subsystem"
+ description="The HornetQ based messaging subsystem"
singleton="true"
>
<runs-inside>
@@ -459,15 +459,16 @@
<operation name="destination:add" displayName="Add destination" description="Add a Queue or Topic">
<parameters>
<c:simple-property name="name" description="Name of the Destination" required="true"/>
- <c:simple-property name="queue-address" description="The queue address defines what address is used for routing messages." required="true"/>
+ <c:list-property name="entries" description="The JNDI names the destination should be bound to." required="true">
+ <c:simple-property name="entry" description="A single JNDI name. Note, this is relative to java:jboss/jms/"/>
+ </c:list-property>
<c:simple-property name="type" description="Type of Destination to create" default="Queue">
<c:property-options>
- <c:option value="Queue"/>
- <c:option value="Topic"/>
+ <c:option value="jms-queue" name="Queue"/>
+ <c:option value="jms-topic" name="Topic"/>
</c:property-options>
</c:simple-property>
- <c:simple-property name="filter" description="The queue message filter definition."/>
- <c:simple-property name="durable" description="Defines whether the queue is durable." type="boolean" default="false"/>
+ <c:simple-property name="durable" description="Defines whether the queue is durable (for Queues only)." type="boolean" default="false"/>
</parameters>
<results>
<c:simple-property name="operationResult"/>
@@ -487,73 +488,23 @@
<c:simple-property name="journal-type" />
</resource-configuration>
- <!-- this is no child resource TODO
-
- <service name="Acceptor"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="acceptor"/>
- </plugin-configuration>
- </service>
- <service name="MessagingConnector"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="connector"/>
- </plugin-configuration>
- </service>
- <service name="HQueue"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- >
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="queue"/>
- </plugin-configuration>
- <resource-configuration>
- <c:simple-property name="queue-address" required="true"/>
- <c:simple-property name="filter" />
- <c:simple-property name="durable" type="boolean"/>
- </resource-configuration>
-
- </service>
--->
- </server>
-
- <server name="JMS"
- discovery="SubsystemDiscovery"
- class="JmsComponent"
- description="The JMS messaging subsystem"
- singleton="true"
- >
- <runs-inside>
- <parent-resource-type name="Profile" plugin="jboss-as-7"/>
- <parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
- </runs-inside>
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="subsystem=jms"/>
- </plugin-configuration>
-
- <service name="Queue"
+ <service name="JMS Queue"
discovery="SubsystemDiscovery"
class="JmsComponent"
- createDeletePolicy="both"
+ createDeletePolicy="delete-only"
>
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="queue"/>
+ <c:simple-property name="path" readOnly="true" default="jms-queue"/>
</plugin-configuration>
<resource-configuration> <!-- See BZ 705713 TODO -->
- <c:simple-property name="durable" required="false" type="boolean" readOnly="false" default="false"
+ <c:simple-property name="durable" required="false" type="boolean" readOnly="true" default="false"
description="Whether the queue is durable or not."/>
- <c:list-property name="entries" required="false" readOnly="false"
+ <c:list-property name="entries" required="false" readOnly="true"
description="The jndi names the queue will be bound to.">
<c:simple-property name="entries" type="string"/>
</c:list-property>
- <c:simple-property name="selector" required="false" type="string" readOnly="false" description="The queue selector."/>
+ <c:simple-property name="selector" required="false" type="string" readOnly="true" description="The queue selector."/>
<c:template name="add" description="Properties when adding a new queue" >
<c:simple-property name="durable" required="false" type="boolean" default="false"
description="Whether the queue is durable or not."/>
@@ -565,16 +516,16 @@
</c:template>
</resource-configuration>
</service>
- <service name="Topic"
+ <service name="JMS Topic"
discovery="SubsystemDiscovery"
class="JmsComponent"
- createDeletePolicy="both"
+ createDeletePolicy="delete-only"
>
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="topic"/>
+ <c:simple-property name="path" readOnly="true" default="jms-topic"/>
</plugin-configuration>
<resource-configuration> <!-- See BZ 705713 TODO -->
- <c:list-property name="entries" required="false" readOnly="false"
+ <c:list-property name="entries" required="false" readOnly="true"
description="The jndi names the queue will be bound to.">
<c:simple-property name="entries" type="string"/>
</c:list-property>
commit 60c8260da5440b889746aac23e7bb3c347a09c81
Merge: 0890ce0 462e94c
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 23:11:59 2011 -0500
Merge branch 'mod_cluster_plugin'
commit 462e94c290eeb017427f6a1925f254d859d31140
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 23:07:42 2011 -0500
Move mod_cluster integration tests in the correct integration folder.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
new file mode 100644
index 0000000..0f644fc
--- /dev/null
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -0,0 +1,210 @@
+/*
+ * 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.plugins.modcluster.test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.plugin.FileSystemPluginFinder;
+import org.rhq.core.pc.plugin.PluginEnvironment;
+import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+@Test(groups = "modcluster-plugin")
+public class ModclusterPluginTest {
+ private Log log = LogFactory.getLog(this.getClass());
+ private static final String PLUGIN_NAME = "mod_cluster";
+
+ @BeforeSuite
+ public void start() {
+ try {
+ File pluginDir = new File("target/testsetup/plugins");
+ PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
+ pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
+ pcConfig.setPluginDirectory(pluginDir);
+
+ pcConfig.setInsideAgent(false);
+ PluginContainer.getInstance().setConfiguration(pcConfig);
+ PluginContainer.getInstance().initialize();
+ log.info("PC started.");
+ for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
+ log.info("...Loaded plugin: " + plugin);
+ }
+ } catch (Exception e) {
+ log.info("Error initializing the context", e);
+ }
+ }
+
+ @AfterSuite
+ public void stop() {
+ PluginContainer.getInstance().shutdown();
+ }
+
+ @Test
+ public void testPluginLoad() {
+ PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
+ PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
+ assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
+ assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+ }
+
+ @Test(dependsOnMethods = "testPluginLoad")
+ public void testDiscovery() throws Exception {
+ InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Thread.sleep(1000);
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ List<String> typeNames = new ArrayList<String>() {
+ private static final long serialVersionUID = 1L;
+
+ {
+ add(PLUGIN_NAME);
+ add(PLUGIN_NAME + " Webapp Context");
+ }
+ };
+
+ Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
+ typeNames);
+ log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
+
+ assert (resources.size() != 0) : "No mod_cluster or related instances found.";
+
+ if (resources.size() != 0) {
+ for (Object objectResource : resources.toArray()) {
+ Resource resource = (Resource) objectResource;
+ if (resource.getResourceType().getName().equals("mod_cluster")) {
+ testResourceMeasurement(resource);
+ } else {
+ testContextOperations(resource);
+ }
+ }
+ }
+ }
+
+ private void testResourceMeasurement(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ if (resourceComponent instanceof MeasurementFacet) {
+ for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
+ Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
+ metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
+ MeasurementReport report = new MeasurementReport();
+ ((MeasurementFacet) resourceComponent).getValues(report, metricList);
+
+ MeasurementData data = report.getTraitData().iterator().next();
+ assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
+ log.info("Measurement: " + def.getName() + "=" + data.getValue());
+ }
+ }
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
+ log.info("Result of operation test was: " + result);
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ log.info("Result of operation test was: " + result.getSimpleResult());
+ }
+ }
+
+ private void testContextOperations(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ try {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("timeout", "1000"));
+ config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
+ result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation enableContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
+ log.info("Result of operation disableContext was: " + result.getSimpleResult());
+
+ } catch (Exception e) {
+ log.info("Operation failed. ", e);
+ }
+
+ }
+ }
+
+ private Set<Resource> findResource(Resource parent, List<String> typeNames) {
+ Set<Resource> found = new HashSet<Resource>();
+
+ Queue<Resource> discoveryQueue = new LinkedList<Resource>();
+ discoveryQueue.add(parent);
+
+ while (!discoveryQueue.isEmpty()) {
+ Resource currentResource = discoveryQueue.poll();
+
+ log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
+ if (typeNames.contains(currentResource.getResourceType().getName())) {
+ found.add(currentResource);
+ }
+
+ if (currentResource.getChildResources() != null) {
+ for (Resource child : currentResource.getChildResources()) {
+ discoveryQueue.add(child);
+ }
+ }
+ }
+
+ return found;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
deleted file mode 100644
index 0f644fc..0000000
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ /dev/null
@@ -1,210 +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.plugins.modcluster.test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
-
-import org.rhq.core.clientapi.server.discovery.InventoryReport;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.MeasurementData;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.pc.PluginContainer;
-import org.rhq.core.pc.PluginContainerConfiguration;
-import org.rhq.core.pc.plugin.FileSystemPluginFinder;
-import org.rhq.core.pc.plugin.PluginEnvironment;
-import org.rhq.core.pc.plugin.PluginManager;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * @author Stefan Negrea
- */
-@SuppressWarnings("rawtypes")
-@Test(groups = "modcluster-plugin")
-public class ModclusterPluginTest {
- private Log log = LogFactory.getLog(this.getClass());
- private static final String PLUGIN_NAME = "mod_cluster";
-
- @BeforeSuite
- public void start() {
- try {
- File pluginDir = new File("target/testsetup/plugins");
- PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
- pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
- pcConfig.setPluginDirectory(pluginDir);
-
- pcConfig.setInsideAgent(false);
- PluginContainer.getInstance().setConfiguration(pcConfig);
- PluginContainer.getInstance().initialize();
- log.info("PC started.");
- for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
- log.info("...Loaded plugin: " + plugin);
- }
- } catch (Exception e) {
- log.info("Error initializing the context", e);
- }
- }
-
- @AfterSuite
- public void stop() {
- PluginContainer.getInstance().shutdown();
- }
-
- @Test
- public void testPluginLoad() {
- PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
- PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
- assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
- assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
- }
-
- @Test(dependsOnMethods = "testPluginLoad")
- public void testDiscovery() throws Exception {
- InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- Thread.sleep(1000);
-
- report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- List<String> typeNames = new ArrayList<String>() {
- private static final long serialVersionUID = 1L;
-
- {
- add(PLUGIN_NAME);
- add(PLUGIN_NAME + " Webapp Context");
- }
- };
-
- Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- typeNames);
- log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
-
- assert (resources.size() != 0) : "No mod_cluster or related instances found.";
-
- if (resources.size() != 0) {
- for (Object objectResource : resources.toArray()) {
- Resource resource = (Resource) objectResource;
- if (resource.getResourceType().getName().equals("mod_cluster")) {
- testResourceMeasurement(resource);
- } else {
- testContextOperations(resource);
- }
- }
- }
- }
-
- private void testResourceMeasurement(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
- if (resourceComponent instanceof MeasurementFacet) {
- for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
- Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
- metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
- MeasurementReport report = new MeasurementReport();
- ((MeasurementFacet) resourceComponent).getValues(report, metricList);
-
- MeasurementData data = report.getTraitData().iterator().next();
- assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
- log.info("Measurement: " + def.getName() + "=" + data.getValue());
- }
- }
-
- if (resourceComponent instanceof OperationFacet) {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
- log.info("Result of operation test was: " + result);
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
- log.info("Result of operation test was: " + result.getSimpleResult());
- }
- }
-
- private void testContextOperations(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
-
- if (resourceComponent instanceof OperationFacet) {
- try {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
-
- Configuration config = new Configuration();
- config.put(new PropertySimple("timeout", "1000"));
- config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
- result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
- log.info("Result of operation stopContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation enableContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
- log.info("Result of operation disableContext was: " + result.getSimpleResult());
-
- } catch (Exception e) {
- log.info("Operation failed. ", e);
- }
-
- }
- }
-
- private Set<Resource> findResource(Resource parent, List<String> typeNames) {
- Set<Resource> found = new HashSet<Resource>();
-
- Queue<Resource> discoveryQueue = new LinkedList<Resource>();
- discoveryQueue.add(parent);
-
- while (!discoveryQueue.isEmpty()) {
- Resource currentResource = discoveryQueue.poll();
-
- log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
- if (typeNames.contains(currentResource.getResourceType().getName())) {
- found.add(currentResource);
- }
-
- if (currentResource.getChildResources() != null) {
- for (Resource child : currentResource.getChildResources()) {
- discoveryQueue.add(child);
- }
- }
- }
-
- return found;
- }
-}
commit d5d01cb8c70fd39febb46b8418e2e972ae871b60
Merge: aac766a b13a351
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 22:46:02 2011 -0500
Merge branch 'mod_cluster_plugin' of ssh://git.fedorahosted.org/git/rhq/rhq into mod_cluster_plugin
commit aac766a243e3aed738184a5563d9ceaeea2f9a38
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 22:42:04 2011 -0500
Make the error message useful by adding the name of the attribute that failed to set.
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
index 2e1ae41..cb7f901 100644
--- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
+++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
@@ -503,7 +503,7 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
property.setErrorMessage(ThrowableUtil.getStackAsString(e));
report
.setErrorMessage("Failed setting resource configuration - see property error messages for details");
- log.info("Failure setting MBean Resource configuration value", e);
+ log.info("Failure setting MBean Resource configuration value for " + key, e);
}
}
}
commit 2c7893abae2d8472490f6eb65305ca91e9b61f74
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 22:41:13 2011 -0500
Final touches for mod_cluster plugin configuration. Updated a couple of the plugin settings to match mod_cluster specifications.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 5c9c3fd..3d03715 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -42,9 +42,9 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
@SuppressWarnings("rawtypes")
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
- private final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private final String PROXY_INFO_PROPERTY = "proxyInfo";
- private final String ADDITIONAL_CONFIG_BEAN_PROPERTY = "additionalConfigurationObjectName";
+ private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private static final String PROXY_INFO_PROPERTY = "proxyInfo";
+ private static final String ENGINE_OBJECT_NAME = "engineObjectName";
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
@@ -76,8 +76,8 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
*/
private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
- String objectName = pluginConfig.getSimple(ADDITIONAL_CONFIG_BEAN_PROPERTY).getStringValue();
- EmsBean engineBean = this.loadBean(objectName, context.getParentResourceComponent());
+ String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
+ EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 591fef6..70898ef 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -25,7 +25,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
* @author Stefan Negrea
*
*/
-@SuppressWarnings("rawtypes")
+@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 992c5b0..29b334f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -25,9 +25,7 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
- <c:simple-property name="jvmRoute" readOnly="false"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
</plugin-configuration>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
@@ -76,12 +74,12 @@
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
<resource-configuration>
<c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
- <!-- c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/-->
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
@@ -89,7 +87,6 @@
<c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
<c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
<c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
<c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
commit 34ee85b04b0ad8592caf75511eb7dbc1fec8f857
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 26 16:11:50 2011 -0500
Fully enable jvmRoute for context identification and discovery. Also, addressed all the compiler warnings in the plugin code.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 23d7d62..3545fa5 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -32,6 +32,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
* @author Stefan Negrea
*/
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
@Override
protected EmsBean loadBean() {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 35ecf30..5c9c3fd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -57,10 +57,12 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context", null,
- null);
- entities.add(detail);
+ if (availableContext.getJvmRoute().equals(jvmRoute)) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context",
+ null, null);
+ entities.add(detail);
+ }
}
return entities;
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 4cca539..8614402 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -54,9 +54,9 @@ public class ProxyInfo {
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
String jvmRoute = nodePieces[1];
- jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':')).trim();
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
- availableNodes.put(jvmRoute, new Node(jvmRoute, identifier));
+ availableNodes.put(identifier, new Node(jvmRoute, identifier));
}
}
@@ -90,13 +90,18 @@ public class ProxyInfo {
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+ String nodeIdentifier = contextPieces[0];
+ nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
+ nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
+ String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
+
String rawIsEnabled = contextPieces[2];
rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
Vhost relatedVhost = availableVhosts.get(identifier);
- availableContexts.add(new Context("", relatedVhost.getHost(), actualContext, isEnabled));
+ availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
}
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 3c01b30..992c5b0 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -18,12 +18,12 @@
description="mod_cluster plugin"
singleton="true">
- <runs-inside>
+ <runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
<parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
</runs-inside>
- <plugin-configuration>
+ <plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
<c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
<c:simple-property name="jvmRoute" readOnly="false"/>
@@ -34,12 +34,14 @@
<parameters>
<c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
<c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
<c:option value="MILLISECONDS" name="MILLISECONDS"/>
<c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- </c:property-options>
+ <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="HOURS" name="HOURS"/>
+ <c:option value="DAYS" name="DAYS"/>
+ </c:property-options>
</c:simple-property>
</parameters>
<results>
@@ -56,7 +58,7 @@
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
- </operation>
+ </operation>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
<results>
@@ -71,7 +73,6 @@
</operation>
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
-
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
@@ -87,7 +88,7 @@
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
<c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
@@ -130,6 +131,5 @@
</operation>
</service>
-
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 57aed4d..0f644fc 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -53,6 +53,7 @@ import org.rhq.core.pluginapi.operation.OperationResult;
/**
* @author Stefan Negrea
*/
+@SuppressWarnings("rawtypes")
@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
private Log log = LogFactory.getLog(this.getClass());
@@ -104,6 +105,8 @@ public class ModclusterPluginTest {
log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
List<String> typeNames = new ArrayList<String>() {
+ private static final long serialVersionUID = 1L;
+
{
add(PLUGIN_NAME);
add(PLUGIN_NAME + " Webapp Context");
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index df7d222..625d8d4 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -21,8 +21,6 @@ package org.rhq.plugins.modcluster.test;
import java.io.IOException;
import java.io.InputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.testng.annotations.Test;
import org.rhq.plugins.modcluster.ProxyInfo;
@@ -32,7 +30,6 @@ import org.rhq.plugins.modcluster.ProxyInfo;
*/
@Test(groups = "modcluster-plugin")
public class ProxyInfoTest {
- private Log log = LogFactory.getLog(this.getClass());
@Test
public void testProxyInfo() throws Exception {
commit d8c6f150e4e80fa19842708e1adf65ddbb9499fa
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 26 15:08:59 2011 -0500
Adding jvmRoute in the mix for webapp context identification. jvmRoute uniquely identifies nodes in a cluster and will be used to decide which contexts run on the node monitored by RHQ.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 7cefa46..35ecf30 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -25,8 +25,10 @@ package org.rhq.plugins.modcluster;
import java.util.HashSet;
import java.util.Set;
+import org.mc4j.ems.connection.EmsConnection;
import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
@@ -37,26 +39,78 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
* @author Stefan Negrea
*/
+@SuppressWarnings("rawtypes")
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+ private final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private final String PROXY_INFO_PROPERTY = "proxyInfo";
+ private final String ADDITIONAL_CONFIG_BEAN_PROPERTY = "additionalConfigurationObjectName";
+
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
*/
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+ String jvmRoute = this.getJvmRoute(context);
+ String rawProxyInfo = this.getRawProxyInfo(context);
- EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
-
- String rawProxyInfo = (String) statsBean.getAttribute("proxyInfo").refresh().toString();
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.toString(), availableContext.toString(), null, "mod_cluster Webapp Context", null,
+ availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context", null,
null);
entities.add(detail);
}
return entities;
}
+
+ /**
+ * Retrieves the jvm route for the node from the parent context.
+ *
+ * @param context the discovery context
+ * @return node's jvm route
+ */
+ private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
+ String objectName = pluginConfig.getSimple(ADDITIONAL_CONFIG_BEAN_PROPERTY).getStringValue();
+ EmsBean engineBean = this.loadBean(objectName, context.getParentResourceComponent());
+
+ return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Retrieves raw proxy configuration from the parent context.
+ *
+ * @param context the discovery context
+ * @return raw proxy configuration
+ */
+ private String getRawProxyInfo(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
+ return (String) statsBean.getAttribute(PROXY_INFO_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
+ EmsConnection emsConnection = context.getEmsConnection();
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 52dd287..591fef6 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -25,6 +25,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
* @author Stefan Negrea
*
*/
+@SuppressWarnings("rawtypes")
public class ModclusterServerComponent extends MBeanResourceComponent {
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 36f490d..4cca539 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -33,11 +33,35 @@ import java.util.regex.Pattern;
*/
public class ProxyInfo {
- private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+ private Map<String, Node> availableNodes = new HashMap<String, Node>();
private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
public ProxyInfo(String rawProxyInfo) {
- Pattern vhostPattern = Pattern.compile("Vhost.*\n");
+ parseNodes(rawProxyInfo);
+ parseVhosts(rawProxyInfo);
+ parseContexts(rawProxyInfo);
+ }
+
+ private void parseNodes(String rawProxyInfo) {
+ Pattern nodePattern = Pattern.compile("Node:.*\n");
+ Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
+ while (nodeMatcher.find()) {
+ String rawNode = nodeMatcher.group();
+ String[] nodePieces = rawNode.split(",");
+
+ String identifier = nodePieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+
+ String jvmRoute = nodePieces[1];
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':')).trim();
+
+ availableNodes.put(jvmRoute, new Node(jvmRoute, identifier));
+ }
+ }
+
+ private void parseVhosts(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
while (vhostMatcher.find()) {
String rawVhost = vhostMatcher.group();
@@ -52,8 +76,10 @@ public class ProxyInfo {
availableVhosts.put(identifier, new Vhost(identifier, host));
}
+ }
- Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
+ private void parseContexts(String rawProxyInfo) {
+ Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
while (contextMatcher.find()) {
String rawContext = contextMatcher.group();
@@ -70,7 +96,7 @@ public class ProxyInfo {
Vhost relatedVhost = availableVhosts.get(identifier);
- availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
+ availableContexts.add(new Context("", relatedVhost.getHost(), actualContext, isEnabled));
}
}
@@ -82,7 +108,60 @@ public class ProxyInfo {
return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
}
- private static class Vhost {
+ public List<Node> getAvailableNodes() {
+ return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
+ }
+
+ public static class Node {
+ private String jvmRoute;
+ private String nodeId;
+
+ public Node(String jvmRoute, String nodeId) {
+ this.jvmRoute = jvmRoute;
+ this.nodeId = nodeId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Node other = (Node) obj;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (nodeId == null) {
+ if (other.nodeId != null)
+ return false;
+ } else if (!nodeId.equals(other.nodeId))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Vhost {
private String identifier;
private String host;
@@ -99,20 +178,52 @@ public class ProxyInfo {
return host;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Vhost other = (Vhost) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (identifier == null) {
+ if (other.identifier != null)
+ return false;
+ } else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
}
public static class Context {
private String path;
private String host;
+ private String jvmRoute;
private boolean isEnabled;
- public Context(String host, String path) {
- this(path, host, false);
+ public Context(String jvmRoute, String host, String path) {
+ this(jvmRoute, host, path, false);
}
- public Context(String host, String path, boolean isEnabled) {
- this.path = path;
+ public Context(String jvmRoute, String host, String path, boolean isEnabled) {
+ this.jvmRoute = jvmRoute;
this.host = host;
+ this.path = path;
this.isEnabled = isEnabled;
}
@@ -124,13 +235,25 @@ public class ProxyInfo {
return host;
}
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
public boolean isEnabled() {
return isEnabled;
}
+ public String createKey() {
+ return jvmRoute + ":" + host + ":" + path;
+ }
+
+ public String createName() {
+ return host + ":" + path;
+ }
+
@Override
public String toString() {
- return host + ":" + path;
+ return createKey();
}
@Override
@@ -138,6 +261,7 @@ public class ProxyInfo {
final int prime = 31;
int result = 1;
result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
result = prime * result + ((path == null) ? 0 : path.hashCode());
return result;
}
@@ -156,6 +280,11 @@ public class ProxyInfo {
return false;
} else if (!host.equals(other.host))
return false;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
if (path == null) {
if (other.path != null)
return false;
@@ -164,9 +293,13 @@ public class ProxyInfo {
return true;
}
- public static Context fromString(String stringRepresentation) {
- String part[] = stringRepresentation.trim().split(":");
- return new Context(part[1], part[0]);
+ public static Context fromString(String stringRepresentation) throws Exception {
+ String parts[] = stringRepresentation.trim().split(":");
+ if (parts.length < 3) {
+ throw new Exception("Parsing error. Not enough information to create a context.");
+ }
+
+ return new Context(parts[0], parts[1], parts[2]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b1a0f51..3c01b30 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -25,7 +25,9 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
+ <c:simple-property name="jvmRoute" readOnly="false"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
@@ -129,6 +131,5 @@
</service>
-
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 8c8c6f4..df7d222 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -35,7 +35,7 @@ public class ProxyInfoTest {
private Log log = LogFactory.getLog(this.getClass());
@Test
- public void testProxyInfo() throws IOException {
+ public void testProxyInfo() throws Exception {
String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
for (String testConfigurationFile : availableFiles) {
commit 7d68fefbc54053c19fb5b4bc423599fc7f5b3055
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 22 14:31:38 2011 -0500
Added support for stopContext operation for webapp contexts. Updated service description. Added more complex integration tests for webapp context service.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 42a1d6e..23d7d62 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -18,6 +18,8 @@
*/
package org.rhq.plugins.modcluster;
+import java.util.concurrent.TimeUnit;
+
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
@@ -75,11 +77,14 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
Object[] configuration = null;
if ("stopContext".equals(name)) {
configuration = new Object[] { context.getHost(), context.getPath(),
- parameters.getSimple("timeout").getLongValue(), parameters.getSimple("unit").getStringValue() };
+ parameters.getSimple("timeout").getLongValue(),
+ TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
} else {
configuration = new Object[] { context.getHost(), context.getPath() };
}
+ log.info(name + " - " + context.getHost() + " " + context.getPath());
+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 4b3adcd..7cefa46 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -52,7 +52,8 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.toString(), availableContext.toString(), null, "mod_cluster Context", null, null);
+ availableContext.toString(), availableContext.toString(), null, "mod_cluster Webapp Context", null,
+ null);
entities.add(detail);
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 70a9f2b..b1a0f51 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -2,6 +2,7 @@
<plugin name="mod_cluster"
displayName="mod_cluster"
+ description="Monitoring and management of mod_cluster plugin."
version="1.0"
package="org.rhq.plugins.modcluster"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -77,7 +78,7 @@
<c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
- <c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
+ <!-- c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/-->
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
@@ -95,7 +96,7 @@
<service name="mod_cluster Webapp Context"
discovery="ContextDiscoveryComponent"
class="ContextComponent"
- description="A mod_cluster context">
+ description="mod_cluster webapp context">
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
@@ -110,7 +111,9 @@
<c:option value="MICROSECONDS" name="MICROSECONDS"/>
<c:option value="MILLISECONDS" name="MILLISECONDS"/>
<c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="HOURS" name="HOURS"/>
+ <c:option value="DAYS" name="DAYS"/>
</c:property-options>
</c:simple-property>
</parameters>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 8bead55..57aed4d 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -33,6 +33,8 @@ import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.MeasurementData;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.MeasurementReport;
@@ -159,11 +161,23 @@ public class ModclusterPluginTest {
try {
OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("timeout", "1000"));
+ config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
+ result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation enableContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
+ log.info("Result of operation disableContext was: " + result.getSimpleResult());
+
} catch (Exception e) {
- log.info("Operation failed");
+ log.info("Operation failed. ", e);
}
- /*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
- log.info("Result of operation test was: " + result.getSimpleResult());*/
+
}
}
commit 0963aa55fe898cab3f6a16eb6d595421abe61d76
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 19 23:16:19 2011 -0500
Returning back to simple availability methods (no availability collectors) after getting clarifications from the mod_cluster team with regards to JMX attributes and node refresh operations.
The simple method to get availability now works correctly for mod_cluster resources.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 8512ed5..42a1d6e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -42,15 +42,19 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
- ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(
- proxyInfo.getAvailableContexts().indexOf(context));
+ int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
+
+ if (indexOfCurrentContext != -1) {
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
- if (currentContext.isEnabled()) {
- return AvailabilityType.UP;
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
}
return AvailabilityType.DOWN;
@@ -68,12 +72,18 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+ Object[] configuration = null;
+ if ("stopContext".equals(name)) {
+ configuration = new Object[] { context.getHost(), context.getPath(),
+ parameters.getSimple("timeout").getLongValue(), parameters.getSimple("unit").getStringValue() };
+ } else {
+ configuration = new Object[] { context.getHost(), context.getPath() };
+ }
+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
-
- Object resultObject = getEmsBean().getOperation(name).invoke(
- new Object[] { context.getHost(), context.getPath() });
+ Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
return new OperationResult(String.valueOf(resultObject));
} finally {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index e6495a1..52dd287 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,13 +18,7 @@
*/
package org.rhq.plugins.modcluster;
-import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
-import org.rhq.core.pluginapi.availability.AvailabilityFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -33,66 +27,18 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
- private AvailabilityCollectorRunnable availabilityCollector;
-
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
- */
- @Override
- public void start(ResourceContext context) {
-
- availabilityCollector = context.createAvailabilityCollectorRunnable(new AvailabilityFacet() {
- public AvailabilityType getAvailability() {
- try {
- OperationResult result = ModclusterServerComponent.this.invokeOperation("refresh",
- new Configuration());
-
- int numberOfAttempts = 0;
-
- //The configuration should be loaded in less than 20 attempts.
- //Only in extraneous cases (like network overload or a huge list webapp contexts)
- //it can take more than this.
- while (numberOfAttempts < 20) {
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
-
- if (proxyInfo.getAvailableContexts().size() != 0) {
- break;
- }
-
- numberOfAttempts++;
- Thread.sleep(2000);
- }
- } catch (Exception e) {
- log.info("mod_cluster availability update failed. Node configuration could not be refreshed.", e);
- return AvailabilityType.DOWN;
- }
-
- return ModclusterServerComponent.super.getAvailability();
- }
- }, 60000L); // 1 minute - the minimum interval allowed
-
- // Now that you've created your availability collector, you must start it. Once started,
- // it is assigned a thread in a thread pool and begins periodically collecting availability.
- availabilityCollector.start();
-
- super.start(context);
- }
-
- /**
- * Cleans the old resource context and the old MBean.
- * @see ResourceComponent#stop()
- */
- public void stop() {
- availabilityCollector.stop();
- super.stop();
- }
-
/* (non-Javadoc)
* @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
*/
@Override
public AvailabilityType getAvailability() {
- return availabilityCollector.getLastKnownAvailability();
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ if (proxyInfo.getAvailableContexts().size() == 0) {
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index c517364..36f490d 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -34,7 +34,7 @@ import java.util.regex.Pattern;
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
- private Map<String, Vhost> availableVHosts = new HashMap<String, Vhost>();
+ private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
public ProxyInfo(String rawProxyInfo) {
Pattern vhostPattern = Pattern.compile("Vhost.*\n");
@@ -50,7 +50,7 @@ public class ProxyInfo {
String host = vhostPieces[1].trim();
host = host.substring(host.indexOf(":") + 1).trim();
- availableVHosts.put(identifier, new Vhost(identifier, host));
+ availableVhosts.put(identifier, new Vhost(identifier, host));
}
Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
@@ -68,7 +68,7 @@ public class ProxyInfo {
rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
- Vhost relatedVhost = availableVHosts.get(identifier);
+ Vhost relatedVhost = availableVhosts.get(identifier);
availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
}
@@ -78,6 +78,10 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
+ public List<Vhost> getAvailableVhosts() {
+ return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
+ }
+
private static class Vhost {
private String identifier;
private String host;
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index b7322bd..8bead55 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -72,7 +72,7 @@ public class ModclusterPluginTest {
log.info("...Loaded plugin: " + plugin);
}
} catch (Exception e) {
- e.printStackTrace();
+ log.info("Error initializing the context", e);
}
}
@@ -93,19 +93,13 @@ public class ModclusterPluginTest {
public void testDiscovery() throws Exception {
InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
- Thread.sleep(10000);
+ Thread.sleep(1000);
report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- Thread.sleep(10000);
-
- report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
- assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
List<String> typeNames = new ArrayList<String>() {
{
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index fb1ccba..8c8c6f4 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -50,10 +50,21 @@ public class ProxyInfoTest {
+ ProxyInfo.Context.class.getCanonicalName();
}
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed to parse application contexts!";
+ assert (proxyInfo.getAvailableVhosts().size() != 0) : "Raw proxy info parsing failed to parse vhosts!";
}
}
+ @Test
+ public void testProxyInfoWithEmptyConfig() throws IOException {
+ String testConfigurationFile = "/proxy_config/proxy_config_empty.txt";
+ String testConfiguration = readConfigFile(testConfigurationFile);
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+
+ assert (proxyInfo.getAvailableContexts().size() == 0) : "Raw proxy info parsing failed to parse an empty proxy config.";
+ assert (proxyInfo.getAvailableVhosts().size() == 0) : "Raw proxy info parsing failed to parse an empty proxy config.";
+ }
+
private String readConfigFile(String filePath) throws IOException {
StringBuffer tempBuffer = new StringBuffer();
byte[] readBuffer = new byte[1024];
commit 3de9b2c6b6d5fd3bb20104221cfb15c31a0c5207
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 15 15:40:54 2011 -0500
Implemented getAvailability using the async collector because there is no guarantee when node full refreshes its configuration. The configuration is read from the httpd proxy and parsed; so network latency and number of loaded contexts influence the reload time.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index ef13143..e6495a1 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -20,6 +20,10 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
+import org.rhq.core.pluginapi.availability.AvailabilityFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
@@ -29,14 +33,66 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+ private AvailabilityCollectorRunnable availabilityCollector;
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
+ */
@Override
- public AvailabilityType getAvailability() {
- try {
- OperationResult result = this.invokeOperation("refresh", new Configuration());
- } catch (Exception e) {
- log.info(e);
- }
+ public void start(ResourceContext context) {
+
+ availabilityCollector = context.createAvailabilityCollectorRunnable(new AvailabilityFacet() {
+ public AvailabilityType getAvailability() {
+ try {
+ OperationResult result = ModclusterServerComponent.this.invokeOperation("refresh",
+ new Configuration());
+
+ int numberOfAttempts = 0;
+
+ //The configuration should be loaded in less than 20 attempts.
+ //Only in extraneous cases (like network overload or a huge list webapp contexts)
+ //it can take more than this.
+ while (numberOfAttempts < 20) {
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ if (proxyInfo.getAvailableContexts().size() != 0) {
+ break;
+ }
+
+ numberOfAttempts++;
+ Thread.sleep(2000);
+ }
+ } catch (Exception e) {
+ log.info("mod_cluster availability update failed. Node configuration could not be refreshed.", e);
+ return AvailabilityType.DOWN;
+ }
+
+ return ModclusterServerComponent.super.getAvailability();
+ }
+ }, 60000L); // 1 minute - the minimum interval allowed
- return super.getAvailability();
+ // Now that you've created your availability collector, you must start it. Once started,
+ // it is assigned a thread in a thread pool and begins periodically collecting availability.
+ availabilityCollector.start();
+
+ super.start(context);
+ }
+
+ /**
+ * Cleans the old resource context and the old MBean.
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ availabilityCollector.stop();
+ super.stop();
+ }
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
+ */
+ @Override
+ public AvailabilityType getAvailability() {
+ return availabilityCollector.getLastKnownAvailability();
}
}
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 874011a..b7322bd 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -87,7 +87,6 @@ public class ModclusterPluginTest {
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
-
}
@Test(dependsOnMethods = "testPluginLoad")
@@ -96,6 +95,14 @@ public class ModclusterPluginTest {
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ Thread.sleep(10000);
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Thread.sleep(10000);
+
report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
@@ -103,7 +110,7 @@ public class ModclusterPluginTest {
List<String> typeNames = new ArrayList<String>() {
{
add(PLUGIN_NAME);
- add(PLUGIN_NAME + "_context");
+ add(PLUGIN_NAME + " Webapp Context");
}
};
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt
new file mode 100644
index 0000000..815b8a4
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt
@@ -0,0 +1 @@
+{192.168.0.101/192.168.0.101:6666=null}
commit c6cf04fe0acc2d3f05a7bc028bae794b6cb34801
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 15:33:59 2011 -0500
A couple of small configuration and test corrections.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index cf12b89..70a9f2b 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -60,7 +60,7 @@
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="refreshProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
<c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 41bf26a..fb1ccba 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -36,7 +36,6 @@ public class ProxyInfoTest {
@Test
public void testProxyInfo() throws IOException {
-
String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
for (String testConfigurationFile : availableFiles) {
@@ -44,10 +43,6 @@ public class ProxyInfoTest {
ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString() + " - " + context.isEnabled());
-
- log.info(proxyInfo.getAvailableContexts().indexOf(context));
-
assert (proxyInfo.getAvailableContexts().indexOf(context) != -1) : "Equals and hash functions not implemented correctly for "
+ ProxyInfo.Context.class.getCanonicalName();
commit 5c794ba6bc45e518200acc7d78f1fec86869becb
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 15:33:39 2011 -0500
The configuration needs to be refreshed before computing availability on all the contexts. Attempt to correctly invoke the operation.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 783f579..ef13143 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,6 +18,9 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -25,4 +28,15 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+
+ @Override
+ public AvailabilityType getAvailability() {
+ try {
+ OperationResult result = this.invokeOperation("refresh", new Configuration());
+ } catch (Exception e) {
+ log.info(e);
+ }
+
+ return super.getAvailability();
+ }
}
commit f4c3e963d2d00b2f02986ba8ea593c1aa2c02893
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 13:23:22 2011 -0500
Added availability attribute for contexts. Also improved unit test and coverage.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 922197a..8512ed5 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -21,6 +21,7 @@ package org.rhq.plugins.modcluster;
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
@@ -36,18 +37,43 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
}
@Override
+ public AvailabilityType getAvailability() {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(
+ proxyInfo.getAvailableContexts().indexOf(context));
+
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
+
+ return AvailabilityType.DOWN;
+ } catch (Exception e) {
+ log.info(e);
+ return AvailabilityType.DOWN;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ @Override
public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
- System.out.println(context.toString());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
Object resultObject = getEmsBean().getOperation(name).invoke(
- new Object[] { context.host, context.path });
+ new Object[] { context.getHost(), context.getPath() });
return new OperationResult(String.valueOf(resultObject));
} finally {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 40b24f9..c517364 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -50,9 +50,7 @@ public class ProxyInfo {
String host = vhostPieces[1].trim();
host = host.substring(host.indexOf(":") + 1).trim();
- System.out.println(identifier + "--" + host);
availableVHosts.put(identifier, new Vhost(identifier, host));
-
}
Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
@@ -65,9 +63,14 @@ public class ProxyInfo {
String identifier = contextPieces[0];
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String rawIsEnabled = contextPieces[2];
+ rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
+ boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
+
Vhost relatedVhost = availableVHosts.get(identifier);
- availableContexts.add(new Context(relatedVhost.getHost(), actualContext));
+ availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
}
}
@@ -95,12 +98,18 @@ public class ProxyInfo {
}
public static class Context {
- String path;
- String host;
+ private String path;
+ private String host;
+ private boolean isEnabled;
public Context(String host, String path) {
+ this(path, host, false);
+ }
+
+ public Context(String host, String path, boolean isEnabled) {
this.path = path;
this.host = host;
+ this.isEnabled = isEnabled;
}
public String getPath() {
@@ -111,14 +120,49 @@ public class ProxyInfo {
return host;
}
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
@Override
public String toString() {
return host + ":" + path;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Context other = (Context) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+
public static Context fromString(String stringRepresentation) {
String part[] = stringRepresentation.trim().split(":");
- return new Context(part[0], part[1]);
+ return new Context(part[1], part[0]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index be5e987..41bf26a 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -37,15 +37,26 @@ public class ProxyInfoTest {
@Test
public void testProxyInfo() throws IOException {
- String testConfiguration = readConfigFile("/proxy_config/proxy_config_1.txt");
+ String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
- ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+ for (String testConfigurationFile : availableFiles) {
+ String testConfiguration = readConfigFile(testConfigurationFile);
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
- for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString());
- }
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString() + " - " + context.isEnabled());
+
+ log.info(proxyInfo.getAvailableContexts().indexOf(context));
+
+ assert (proxyInfo.getAvailableContexts().indexOf(context) != -1) : "Equals and hash functions not implemented correctly for "
+ + ProxyInfo.Context.class.getCanonicalName();
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ assert (context.equals(ProxyInfo.Context.fromString(context.toString())) == true) : "fromString and toString are not equivalent for:"
+ + ProxyInfo.Context.class.getCanonicalName();
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
}
private String readConfigFile(String filePath) throws IOException {
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt
new file mode 100644
index 0000000..573967a
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt
@@ -0,0 +1,16 @@
+{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3690,Read: 27864911,Transfered: 0,Connected: 0,Load: 100
+Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 148,Read: 57994,Transfered: 0,Connected: 0,Load: 100
+Vhost: [1:1:1], Alias: test-agent-1
+Vhost: [2:1:2], Alias: remote-agent-2
+Context: [1:1:1], Context: /invoker, Status: DISABLED
+Context: [1:1:2], Context: /loaddemo, Status: DISABLED
+Context: [1:1:3], Context: /jbossws, Status: DISABLED
+Context: [1:1:4], Context: /juddi, Status: DISABLED
+Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED
+Context: [1:1:6], Context: /web-console, Status: DISABLED
+Context: [1:1:7], Context: /jmx-console, Status: DISABLED
+Context: [1:1:8], Context: /, Status: DISABLED
+Context: [2:1:9], Context: /, Status: ENABLED
+Context: [2:1:10], Context: /loaddemo, Status: ENABLED
+Context: [2:1:11], Context: /juddi, Status: ENABLED
+Context: [2:1:12], Context: /invoker, Status: ENABLED}
\ No newline at end of file
commit 066d08cc62c780b42ea8650c046eaa30efb6c9a7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 16:37:41 2011 -0500
Created separate unit test suite for proxy info parser. Also, the code now parses the vhost from the actual config property.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index f2af2bc..40b24f9 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -20,7 +20,9 @@ package org.rhq.plugins.modcluster;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -32,17 +34,40 @@ import java.util.regex.Pattern;
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+ private Map<String, Vhost> availableVHosts = new HashMap<String, Vhost>();
public ProxyInfo(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost.*\n");
+ Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
+ while (vhostMatcher.find()) {
+ String rawVhost = vhostMatcher.group();
+ String[] vhostPieces = rawVhost.split(",");
- Pattern test = Pattern.compile("Context.*\n");
- Matcher m = test.matcher(rawProxyInfo);
- while (m.find()) {
- String rawContext = m.group();
+ String identifier = vhostPieces[0].trim();
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String host = vhostPieces[1].trim();
+ host = host.substring(host.indexOf(":") + 1).trim();
+
+ System.out.println(identifier + "--" + host);
+ availableVHosts.put(identifier, new Vhost(identifier, host));
+
+ }
+
+ Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
+ Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
+ while (contextMatcher.find()) {
+ String rawContext = contextMatcher.group();
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context("localhost", actualContext));
+ String identifier = contextPieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+ Vhost relatedVhost = availableVHosts.get(identifier);
+
+ availableContexts.add(new Context(relatedVhost.getHost(), actualContext));
}
}
@@ -50,6 +75,25 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
+ private static class Vhost {
+ private String identifier;
+ private String host;
+
+ public Vhost(String identifier, String host) {
+ this.identifier = identifier;
+ this.host = host;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ }
+
public static class Context {
String path;
String host;
@@ -63,18 +107,10 @@ public class ProxyInfo {
return path;
}
- public void setPath(String path) {
- this.path = path;
- }
-
public String getHost() {
return host;
}
- public void setHost(String host) {
- this.host = host;
- }
-
@Override
public String toString() {
return host + ":" + path;
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0d16e92..874011a 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -47,10 +47,9 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.modcluster.ProxyInfo;
/**
- * @author Fady Matar
+ * @author Stefan Negrea
*/
@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
@@ -83,31 +82,6 @@ public class ModclusterPluginTest {
}
@Test
- public void testProxyInfo() {
- String test = "{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100\n"
- + "Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99\n"
- + "Vhost: [1:1:1], Alias: localhost\n"
- + "Vhost: [2:1:2], Alias: localhost\n"
- + "Context: [1:1:1], Context: /invoker, Status: DISABLED\n"
- + "Context: [1:1:2], Context: /loaddemo, Status: DISABLED\n"
- + "Context: [1:1:3], Context: /jbossws, Status: DISABLED\n"
- + "Context: [1:1:4], Context: /juddi, Status: DISABLED\n"
- + "Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED\n"
- + "Context: [1:1:6], Context: /web-console, Status: DISABLED\n"
- + "Context: [1:1:7], Context: /jmx-console, Status: DISABLED\n"
- + "Context: [1:1:8], Context: /, Status: DISABLED\n"
- + "Context: [2:1:9], Context: /loaddemo, Status: ENABLED\n" + "}";
-
- ProxyInfo proxyInfo = new ProxyInfo(test);
-
- for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString());
- }
-
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
- }
-
- @Test
public void testPluginLoad() {
PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
new file mode 100644
index 0000000..be5e987
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.plugins.modcluster.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.Test;
+
+import org.rhq.plugins.modcluster.ProxyInfo;
+
+/**
+ * @author Stefan Negrea
+ */
+@Test(groups = "modcluster-plugin")
+public class ProxyInfoTest {
+ private Log log = LogFactory.getLog(this.getClass());
+
+ @Test
+ public void testProxyInfo() throws IOException {
+
+ String testConfiguration = readConfigFile("/proxy_config/proxy_config_1.txt");
+
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString());
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
+
+ private String readConfigFile(String filePath) throws IOException {
+ StringBuffer tempBuffer = new StringBuffer();
+ byte[] readBuffer = new byte[1024];
+ int bytesRead = 0;
+
+ InputStream resourceStream = getClass().getResourceAsStream(filePath);
+
+ while ((bytesRead = resourceStream.read(readBuffer)) != -1) {
+ tempBuffer.append(new String(readBuffer, 0, bytesRead));
+ }
+
+ resourceStream.close();
+
+ return tempBuffer.toString();
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt
new file mode 100644
index 0000000..c99edd3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt
@@ -0,0 +1,13 @@
+{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100
+Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99
+Vhost: [1:1:1], Alias: localhost
+Vhost: [2:1:2], Alias: localhost
+Context: [1:1:1], Context: /invoker, Status: DISABLED
+Context: [1:1:2], Context: /loaddemo, Status: DISABLED
+Context: [1:1:3], Context: /jbossws, Status: DISABLED
+Context: [1:1:4], Context: /juddi, Status: DISABLED
+Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED
+Context: [1:1:6], Context: /web-console, Status: DISABLED
+Context: [1:1:7], Context: /jmx-console, Status: DISABLED
+Context: [1:1:8], Context: /, Status: DISABLED
+Context: [2:1:9], Context: /loaddemo, Status: ENABLED}
\ No newline at end of file
commit a6eeb51869e48dc230cd206d7f25eb815538b2bf
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 13:27:01 2011 -0600
Fine tunning the plugin based on UI testing.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index fb72b5f..f2af2bc 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -77,7 +77,7 @@ public class ProxyInfo {
@Override
public String toString() {
- return path + ":" + host;
+ return host + ":" + path;
}
public static Context fromString(String stringRepresentation) {
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 88357db..cf12b89 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -80,15 +80,14 @@
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
- <c:simple-property name="balancer" type="string" description="Name of the balancer."/>
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="containerName" type="string" description="Object name of the container."/>
- <c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
- <c:simple-property name="advertisePort" type="integer" description="Multicast port for discovery" />
- <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
+ <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
<c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
<c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
</resource-configuration>
commit c294e9ec57a4be4d969d8fa453e353f1f39fda8a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 10:38:53 2011 -0600
Changed the name of context objects to the proposed short notation.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 9cb6b86..fb72b5f 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -42,7 +42,7 @@ public class ProxyInfo {
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context(actualContext, "localhost"));
+ availableContexts.add(new Context("localhost", actualContext));
}
}
@@ -54,7 +54,7 @@ public class ProxyInfo {
String path;
String host;
- public Context(String path, String host) {
+ public Context(String host, String path) {
this.path = path;
this.host = host;
}
@@ -77,25 +77,12 @@ public class ProxyInfo {
@Override
public String toString() {
- return "Context [path=" + path + ", host=" + host + "]";
+ return path + ":" + host;
}
public static Context fromString(String stringRepresentation) {
- stringRepresentation = stringRepresentation.substring(stringRepresentation.indexOf('[') + 1);
- stringRepresentation = stringRepresentation.substring(0, stringRepresentation.indexOf(']'));
- stringRepresentation = stringRepresentation.trim();
-
- String host = null;
- String path = null;
- for (String part : stringRepresentation.split(",")) {
- part = part.trim();
- if (part.startsWith("path=")) {
- path = part.substring(5).trim();
- } else if (part.startsWith("host=")) {
- host = part.substring(5).trim();
- }
- }
- return new Context(path, host);
+ String part[] = stringRepresentation.trim().split(":");
+ return new Context(part[0], part[1]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index ad23d34..88357db 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -74,7 +74,7 @@
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
@@ -83,7 +83,7 @@
<c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" description="Name of the balancer."/>
- <c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
+ <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
<c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="containerName" type="string" description="Object name of the container."/>
<c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
commit 70f87fe4818e8a4b6dbef2c479aacf992bb71df7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 10:23:06 2011 -0600
Added support for all the mod_cluster available operations.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 17a4267..ad23d34 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,41 +27,70 @@
<c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
- <operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
- <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:option value="MILLISECONDS" name="MILLISECONDS"/>
+ <c:option value="NANOSECONDS" name="NANOSECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
+ </parameters>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
- </operation>
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines">
+ </operation>
+ <operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
+ <operation name="refreshProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
+ </parameters>
+ </operation>
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="int" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)"
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
- <c:simple-property name="smax" type="int" description="Maximum time on seconds for idle connections above smax."/>
- <c:simple-property name="maxAttempts" type="int" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="int" description="Security key for discovery."/>
+ <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
+ <c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="int" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="containerName" type="string" description="Object name of the container."/>
<c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
- <c:simple-property name="advertisePort" type="int" description="Multicast port for discovery" />
+ <c:simple-property name="advertisePort" type="integer" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
- <c:simple-property name="flushWait" type="int" description="Time in ms to wait before flushing packets."/>
- <c:simple-property name="ping" type="int" description="Time in s to wait for a pong answer to a ping"/>
+ <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
+ <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
</resource-configuration>
<service name="mod_cluster Webapp Context"
@@ -69,19 +98,30 @@
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp">
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="result" type="boolean" description="The result of the operation."/>
</results>
</operation>
- <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp">
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout"/>
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:option value="MILLISECONDS" name="MILLISECONDS"/>
+ <c:option value="NANOSECONDS" name="NANOSECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
commit 2342ca9a222b3aae20a890d084a7855ce4ff02fd
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 09:49:10 2011 -0600
Added all the properties available through the JMX interface to the plugin configuration.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b2179c3..17a4267 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -45,9 +45,23 @@
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ <c:simple-property name="workerTimeout" type="int" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
+ <c:simple-property name="smax" type="int" description="Maximum time on seconds for idle connections above smax."/>
+ <c:simple-property name="maxAttempts" type="int" description="Maximum number of attempts to send the request to the backend server."/>
+ <c:simple-property name="advertiseSecurityKey" type="int" description="Security key for discovery."/>
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
+ <c:simple-property name="balancer" type="string" description="Name of the balancer."/>
+ <c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
+ <c:simple-property name="socketTimeout" type="int" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="containerName" type="string" description="Object name of the container."/>
+ <c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
+ <c:simple-property name="advertisePort" type="int" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
+ <c:simple-property name="flushWait" type="int" description="Time in ms to wait before flushing packets."/>
+ <c:simple-property name="ping" type="int" description="Time in s to wait for a pong answer to a ping"/>
</resource-configuration>
<service name="mod_cluster Webapp Context"
@@ -55,17 +69,17 @@
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable the webapp">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="disableContext" displayName="Disable webpapp" description="Disable the webapp">
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops the webapp">
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
commit 526d7241227292380f1ccd644d5f3e0b41eda7d3
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 15:28:48 2011 -0500
A couple more tweaks to make the user interface for mod_cluster display correct and proper text.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index cdfa7fb..b2179c3 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -24,7 +24,7 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="nameTemplate" default="{application}"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
@@ -50,22 +50,22 @@
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
</resource-configuration>
- <service name="mod_cluster_context"
+ <service name="mod_cluster Webapp Context"
discovery="ContextDiscoveryComponent"
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable a single webapp">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="disableContext" displayName="Disable webpapp" description="Disable a single webapp">
+ <operation name="disableContext" displayName="Disable webpapp" description="Disable the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops a single webapp">
+ <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
commit 4a6bb37c939ba001b3be6774cf89d1ec409f2827
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 13:19:07 2011 -0500
Fine tuning the plugin configuration based other plugin configuration and test deployment issues.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 74defeb..4536125 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -12,7 +12,7 @@
<artifactId>modcluster-plugin</artifactId>
<packaging>jar</packaging>
- <name>mod_cluster RHQ Plugin</name>
+ <name>RHQ mod_cluster Plugin</name>
<description>mod_cluster RHQ Agent plugin</description>
<dependencies>
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index be4b25b..cdfa7fb 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -14,11 +14,12 @@
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="ModclusterServerComponent"
supportsManualAdd="true"
- description="mod_cluster plugin">
+ description="mod_cluster plugin"
+ singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
- <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
+ <parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
</runs-inside>
<plugin-configuration>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 02f6584..f32159e 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -125,10 +125,11 @@
<module>augeas</module>
<module>apache</module>
<module>tomcat</module>
- <module>jboss-as</module>
<module>hibernate</module>
+ <module>mod-cluster</module>
<module>rhq-server</module>
<module>jboss-cache</module>
+ <module>jboss-as</module>
<module>jboss-as-5</module>
<module>jboss-as-7</module>
<module>jboss-cache-v3</module>
commit 20f0f36e49fa935deafed1fc2ac057f7e480dd9a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 10:00:21 2011 -0500
Added dev profile for plugin deployment in the local plugin repo.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index a19dfc0..74defeb 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -190,6 +190,82 @@
</plugins>
</build>
</profile>
+
+
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset><include name="META-INF/**" /></patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>
commit 4ee3094d6e29330d68730729edaa04e4a85cc81d
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 23:31:24 2011 -0500
All the context dependent operations are now passed for execution to the parent MBean. The operation arguments are parsed from the proxyInfo MBean property.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index f73a151..922197a 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -1,24 +1,20 @@
/*
- * Jopr Management Platform
+ * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
+ * 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 and the GNU Lesser General Public License
- * for more details.
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.rhq.plugins.modcluster;
@@ -29,10 +25,9 @@ import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * Manages a Hibernate Entity.
+ * Manages a mod_cluster context entity.
*
- * @author Greg Hinkle
- * @author John Mazzitelli
+ * @author Stefan Negrea
*/
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
@Override
@@ -42,46 +37,24 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
@Override
public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if ("enableContext".equals(name)) {
- //String[] queryStrings = (String[]) getEmsBean().getAttribute("Queries").refresh();
- OperationResult result = new OperationResult();
- result.setSimpleResult("This works!");
- /*PropertyList queries = new PropertyList("queries");
- result.getComplexResults().put(queries);*/
+ if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+ System.out.println(context.toString());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
- /*Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- for (String queryString : queryStrings) {
- Object queryStatistics = getEmsBean().getOperation("getQueryStatistics").invoke(
- new Object[] { queryString });
-
- Long executionCount = (Long) queryStatistics.getClass().getMethod("getExecutionCount")
- .invoke(queryStatistics);
- Long executionRowCount = (Long) queryStatistics.getClass().getMethod("getExecutionRowCount")
- .invoke(queryStatistics);
- Long executionMinTime = (Long) queryStatistics.getClass().getMethod("getExecutionMinTime")
- .invoke(queryStatistics);
- Long executionMaxTime = (Long) queryStatistics.getClass().getMethod("getExecutionMaxTime")
- .invoke(queryStatistics);
- Long executionAvgTime = (Long) queryStatistics.getClass().getMethod("getExecutionAvgTime")
- .invoke(queryStatistics);
-
- PropertyMap query = new PropertyMap("query", new PropertySimple("query", queryString),
- new PropertySimple("executionCount", executionCount), new PropertySimple("executionRowCount",
- executionRowCount), new PropertySimple("executionMinTime", executionMinTime),
- new PropertySimple("executionMaxTime", executionMaxTime), new PropertySimple(
- "executionAvgTime", executionAvgTime));
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- queries.add(query);
- }*/
+ Object resultObject = getEmsBean().getOperation(name).invoke(
+ new Object[] { context.host, context.path });
- return result;
+ return new OperationResult(String.valueOf(resultObject));
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
- return super.invokeOperation(name, parameters);
+ throw new Exception("Operation " + name + " not available mod_cluster_context service");
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 90e5c6b..4b3adcd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -33,11 +33,15 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * Discovers hibernate entities from a hibernate stats mbean
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
*
- * @author Greg Hinkle
+ * @author Stefan Negrea
*/
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+
+ /* (non-Javadoc)
+ * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
+ */
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 15a9a68..9cb6b86 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.modcluster;
import java.util.ArrayList;
@@ -25,16 +24,17 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+/**
+ * Simple parser for the raw proxy information provided by mod_cluster.
+ *
+ * @author Stefan Negrea
+ */
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
public ProxyInfo(String rawProxyInfo) {
- System.out.println("--------------------------------------");
- System.out.println(rawProxyInfo);
- System.out.println("--------------------------------------");
-
Pattern test = Pattern.compile("Context.*\n");
Matcher m = test.matcher(rawProxyInfo);
while (m.find()) {
@@ -42,7 +42,7 @@ public class ProxyInfo {
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context(actualContext, "localHost"));
+ availableContexts.add(new Context(actualContext, "localhost"));
}
}
@@ -50,12 +50,11 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
- public class Context {
+ public static class Context {
String path;
String host;
public Context(String path, String host) {
- super();
this.path = path;
this.host = host;
}
@@ -80,5 +79,23 @@ public class ProxyInfo {
public String toString() {
return "Context [path=" + path + ", host=" + host + "]";
}
+
+ public static Context fromString(String stringRepresentation) {
+ stringRepresentation = stringRepresentation.substring(stringRepresentation.indexOf('[') + 1);
+ stringRepresentation = stringRepresentation.substring(0, stringRepresentation.indexOf(']'));
+ stringRepresentation = stringRepresentation.trim();
+
+ String host = null;
+ String path = null;
+ for (String part : stringRepresentation.split(",")) {
+ part = part.trim();
+ if (part.startsWith("path=")) {
+ path = part.substring(5).trim();
+ } else if (part.startsWith("host=")) {
+ host = part.substring(5).trim();
+ }
+ }
+ return new Context(path, host);
+ }
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 084165e..be4b25b 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -45,6 +45,8 @@
<resource-configuration>
<c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
+ <c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
</resource-configuration>
<service name="mod_cluster_context"
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index deceb70..0d16e92 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -140,8 +140,14 @@ public class ModclusterPluginTest {
assert (resources.size() != 0) : "No mod_cluster or related instances found.";
if (resources.size() != 0) {
- testResourceMeasurement((Resource) resources.toArray()[0]);
- testContextOperations((Resource) resources.toArray()[1]);
+ for (Object objectResource : resources.toArray()) {
+ Resource resource = (Resource) objectResource;
+ if (resource.getResourceType().getName().equals("mod_cluster")) {
+ testResourceMeasurement(resource);
+ } else {
+ testContextOperations(resource);
+ }
+ }
}
}
@@ -175,9 +181,12 @@ public class ModclusterPluginTest {
.getResourceComponent(resource);
if (resourceComponent instanceof OperationFacet) {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
-
+ try {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+ } catch (Exception e) {
+ log.info("Operation failed");
+ }
/*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
log.info("Result of operation test was: " + result.getSimpleResult());*/
}
commit 821df1aa30368c6d97eacad1401a52295e6d2181
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 18:43:06 2011 -0500
Added individual contexts as sub services to mod_cluster service.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
new file mode 100644
index 0000000..f73a151
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -0,0 +1,87 @@
+/*
+ * Jopr 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Manages a Hibernate Entity.
+ *
+ * @author Greg Hinkle
+ * @author John Mazzitelli
+ */
+public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+ @Override
+ protected EmsBean loadBean() {
+ return getResourceContext().getParentResourceComponent().getEmsBean();
+ }
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if ("enableContext".equals(name)) {
+ //String[] queryStrings = (String[]) getEmsBean().getAttribute("Queries").refresh();
+ OperationResult result = new OperationResult();
+ result.setSimpleResult("This works!");
+ /*PropertyList queries = new PropertyList("queries");
+ result.getComplexResults().put(queries);*/
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ /*Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ for (String queryString : queryStrings) {
+ Object queryStatistics = getEmsBean().getOperation("getQueryStatistics").invoke(
+ new Object[] { queryString });
+
+ Long executionCount = (Long) queryStatistics.getClass().getMethod("getExecutionCount")
+ .invoke(queryStatistics);
+ Long executionRowCount = (Long) queryStatistics.getClass().getMethod("getExecutionRowCount")
+ .invoke(queryStatistics);
+ Long executionMinTime = (Long) queryStatistics.getClass().getMethod("getExecutionMinTime")
+ .invoke(queryStatistics);
+ Long executionMaxTime = (Long) queryStatistics.getClass().getMethod("getExecutionMaxTime")
+ .invoke(queryStatistics);
+ Long executionAvgTime = (Long) queryStatistics.getClass().getMethod("getExecutionAvgTime")
+ .invoke(queryStatistics);
+
+ PropertyMap query = new PropertyMap("query", new PropertySimple("query", queryString),
+ new PropertySimple("executionCount", executionCount), new PropertySimple("executionRowCount",
+ executionRowCount), new PropertySimple("executionMinTime", executionMinTime),
+ new PropertySimple("executionMaxTime", executionMaxTime), new PropertySimple(
+ "executionAvgTime", executionAvgTime));
+
+ queries.add(query);
+ }*/
+
+ return result;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
new file mode 100644
index 0000000..90e5c6b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -0,0 +1,57 @@
+/*
+ * Jopr 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Discovers hibernate entities from a hibernate stats mbean
+ *
+ * @author Greg Hinkle
+ */
+public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+
+ EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
+
+ String rawProxyInfo = (String) statsBean.getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.toString(), availableContext.toString(), null, "mod_cluster Context", null, null);
+ entities.add(detail);
+ }
+
+ return entities;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index a98792e..783f579 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,9 +18,6 @@
*/
package org.rhq.plugins.modcluster;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -28,16 +25,4 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
-
- /**
- * Stores the context and loads the MBean.
- * @see ResourceComponent#start(ResourceContext)
- */
- @Override
- public void start(ResourceContext context) {
- super.start(context);
-
- OperationDefinition test = new OperationDefinition(context.getResourceType(), "Text");
- context.getResourceType().addOperationDefinition(test);
- }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
new file mode 100644
index 0000000..15a9a68
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -0,0 +1,84 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class ProxyInfo {
+
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+
+ public ProxyInfo(String rawProxyInfo) {
+
+ System.out.println("--------------------------------------");
+ System.out.println(rawProxyInfo);
+ System.out.println("--------------------------------------");
+
+ Pattern test = Pattern.compile("Context.*\n");
+ Matcher m = test.matcher(rawProxyInfo);
+ while (m.find()) {
+ String rawContext = m.group();
+ String[] contextPieces = rawContext.split(",");
+ String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
+
+ availableContexts.add(new Context(actualContext, "localHost"));
+ }
+ }
+
+ public List<Context> getAvailableContexts() {
+ return Collections.unmodifiableList(availableContexts);
+ }
+
+ public class Context {
+ String path;
+ String host;
+
+ public Context(String path, String host) {
+ super();
+ this.path = path;
+ this.host = host;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ @Override
+ public String toString() {
+ return "Context [path=" + path + ", host=" + host + "]";
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b8d7249..084165e 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -47,5 +47,29 @@
<c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
</resource-configuration>
+ <service name="mod_cluster_context"
+ discovery="ContextDiscoveryComponent"
+ class="ContextComponent"
+ description="A mod_cluster context">
+
+ <operation name="enableContext" displayName="Enable webapp" description="Enable a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="disableContext" displayName="Disable webpapp" description="Disable a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ </service>
+
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index da0303e..deceb70 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -19,8 +19,10 @@
package org.rhq.plugins.modcluster.test;
import java.io.File;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
+import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -45,6 +47,7 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.modcluster.ProxyInfo;
/**
* @author Fady Matar
@@ -80,6 +83,31 @@ public class ModclusterPluginTest {
}
@Test
+ public void testProxyInfo() {
+ String test = "{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100\n"
+ + "Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99\n"
+ + "Vhost: [1:1:1], Alias: localhost\n"
+ + "Vhost: [2:1:2], Alias: localhost\n"
+ + "Context: [1:1:1], Context: /invoker, Status: DISABLED\n"
+ + "Context: [1:1:2], Context: /loaddemo, Status: DISABLED\n"
+ + "Context: [1:1:3], Context: /jbossws, Status: DISABLED\n"
+ + "Context: [1:1:4], Context: /juddi, Status: DISABLED\n"
+ + "Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED\n"
+ + "Context: [1:1:6], Context: /web-console, Status: DISABLED\n"
+ + "Context: [1:1:7], Context: /jmx-console, Status: DISABLED\n"
+ + "Context: [1:1:8], Context: /, Status: DISABLED\n"
+ + "Context: [2:1:9], Context: /loaddemo, Status: ENABLED\n" + "}";
+
+ ProxyInfo proxyInfo = new ProxyInfo(test);
+
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString());
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
+
+ @Test
public void testPluginLoad() {
PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
@@ -98,12 +126,22 @@ public class ModclusterPluginTest {
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ List<String> typeNames = new ArrayList<String>() {
+ {
+ add(PLUGIN_NAME);
+ add(PLUGIN_NAME + "_context");
+ }
+ };
+
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- PLUGIN_NAME);
- log.info("Found " + resources.size() + " mod_cluster instance(s).");
+ typeNames);
+ log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
+
+ assert (resources.size() != 0) : "No mod_cluster or related instances found.";
if (resources.size() != 0) {
testResourceMeasurement((Resource) resources.toArray()[0]);
+ testContextOperations((Resource) resources.toArray()[1]);
}
}
@@ -132,7 +170,20 @@ public class ModclusterPluginTest {
}
}
- private Set<Resource> findResource(Resource parent, String typeName) {
+ private void testContextOperations(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ /*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ log.info("Result of operation test was: " + result.getSimpleResult());*/
+ }
+ }
+
+ private Set<Resource> findResource(Resource parent, List<String> typeNames) {
Set<Resource> found = new HashSet<Resource>();
Queue<Resource> discoveryQueue = new LinkedList<Resource>();
@@ -142,7 +193,7 @@ public class ModclusterPluginTest {
Resource currentResource = discoveryQueue.poll();
log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
- if (currentResource.getResourceType().getName().equals(typeName)) {
+ if (typeNames.contains(currentResource.getResourceType().getName())) {
found.add(currentResource);
}
commit d2b8d0f801936bfc318be141737aa237bc7d7b74
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 15:46:03 2011 -0500
Attempt to manually manipulate the operations list for mod_cluster to dynamically load the contexts.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index c70f53b..a98792e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,6 +18,9 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.operation.OperationDefinition;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -26,4 +29,15 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+ /**
+ * Stores the context and loads the MBean.
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ @Override
+ public void start(ResourceContext context) {
+ super.start(context);
+
+ OperationDefinition test = new OperationDefinition(context.getResourceType(), "Text");
+ context.getResourceType().addOperationDefinition(test);
+ }
}
commit 384ac9ada9f59a2f2f1cbd52088c81044ba2038c
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 15:45:23 2011 -0500
Added simple operations to the list of operations supported by the plugin. Complex operations to follow....
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
deleted file mode 100644
index fa807a3..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
+++ /dev/null
@@ -1,116 +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.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ManualAddFacet;
-import org.rhq.core.pluginapi.inventory.ProcessScanResult;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-
-/**
- * This can be the start of your own custom plugin's discovery component. Review the javadoc for
- * {@link ResourceDiscoveryComponent}.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class ModclusterDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
- private final Log log = LogFactory.getLog(ModclusterDiscoveryComponent.class);
-
- /**
- * This discovery method is the way the plugin supports "manual-add" capability. The plugin
- * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
- * If that attribute is false, this method will never be used since it will not be possible to manually
- * add an instance of the resource.
- *
- * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
- */
- @Override
- public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
- ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
-
- // pluginConfiguration contains information on a resource that was manually added by the user.
- // take it and build a details object that represents that resource.
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Manually Added Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, pluginConfiguration, null);
-
- return resource;
- }
-
- /**
- * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
- */
- @Override
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
- log.info("Discovering my custom plugin's resources");
-
- // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
- // auto-discovered processes using those process scan definitions. Process all those that were found.
- List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
- for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
- // determine if you want to include the result in this method's returned set of discovered resources
- }
-
- // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
- // create a details object that describe the resource that you discovered.
- HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, null, null);
-
- set.add(resource);
-
- return set;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index c924753..b8d7249 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,10 +27,25 @@
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <resource-configuration>
+ <c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ </resource-configuration>
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 5f68989..da0303e 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -43,6 +43,8 @@ import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
/**
* @author Fady Matar
@@ -115,13 +117,19 @@ public class ModclusterPluginTest {
MeasurementReport report = new MeasurementReport();
((MeasurementFacet) resourceComponent).getValues(report, metricList);
- /*assert report.getNumericData().size() > 0 : "Measurement " + def.getName() + " not collected from "
- + resource;*/
MeasurementData data = report.getTraitData().iterator().next();
assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
log.info("Measurement: " + def.getName() + "=" + data.getValue());
}
}
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
+ log.info("Result of operation test was: " + result);
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ log.info("Result of operation test was: " + result.getSimpleResult());
+ }
}
private Set<Resource> findResource(Resource parent, String typeName) {
commit 53efc864c9d00bae1a7c8ed66ea0f25baed05b65
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 1 16:12:13 2011 -0500
Remove unused file.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
deleted file mode 100644
index 1223508..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.plugins.modcluster;
-
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-public class LoadMetric extends MBeanResourceComponent {
-
-}
commit 30737d3a2d1e3fc85111416203cafdf4d47b70a2
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 1 15:11:36 2011 -0600
Added all the metrics proposed in the design document to the plugin with complete unit tests.
Also, corrected the cumbersome find resource code. No reason to have recursion when a simple queue can do the job more efficiently.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 869a25e..a19dfc0 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -69,6 +69,8 @@
<fileset dir="${settings.localRepository}/">
<include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
<include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
</fileset>
<fileset dir="${rhq.deploymentDir}">
<include name="${project.artifactId}-${project.version}.jar" />
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 6d6998a..c70f53b 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2009 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -18,151 +18,12 @@
*/
package org.rhq.plugins.modcluster;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
- * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
- * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
- * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
- * implementations that that facet required.
- *
- * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
- * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
- * will need to know.</p>
+ * @author Stefan Negrea
*
- * @author John Mazzitelli
*/
-public class ModclusterServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
- ConfigurationFacet {
- private final Log log = LogFactory.getLog(ModclusterServerComponent.class);
-
- /**
- * Represents the resource configuration of the custom product being managed.
- */
- private Configuration resourceConfiguration;
-
- /**
- * All AMPS plugins are stateful - this context contains information that your resource component can use when
- * performing its processing.
- */
- private ResourceContext resourceContext;
-
- /**
- * This is called when your component has been started with the given context. You normally initialize some internal
- * state of your component as well as attempt to make a stateful connection to your managed resource.
- *
- * @see ResourceComponent#start(ResourceContext)
- */
- public void start(ResourceContext context) {
- resourceContext = context;
- }
-
- /**
- * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
- * perform some cleanup here; though normally not much needs to be done here.
- *
- * @see ResourceComponent#stop()
- */
- public void stop() {
- }
-
- /**
- * All resource components must be able to tell the plugin container if the managed resource is available or not.
- * This method is called by the plugin container when it needs to know if the managed resource is actually up and
- * available.
- *
- * @see ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- // TODO: here you normally make some type of connection attempt to the managed resource
- // to determine if it is really up and running.
- return AvailabilityType.UP;
- }
-
- /**
- * The plugin container will call this method when your resource component has been scheduled to collect some
- * measurements now. It is within this method that you actually talk to the managed resource and collect the
- * measurement data that is has emitted.
- *
- * @see MeasurementFacet#getValues(MeasurementReport, Set)
- */
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
- for (MeasurementScheduleRequest request : requests) {
- String name = request.getName();
-
- // TODO: based on the request information, you must collect the requested measurement(s)
- // you can use the name of the measurement to determine what you actually need to collect
- try {
- Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
- report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
- } catch (Exception e) {
- log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
- }
- }
-
- return;
- }
-
- /**
- * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
- * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
- *
- * @see OperationFacet#invokeOperation(String, Configuration)
- */
- public OperationResult invokeOperation(String name, Configuration configuration) {
- return null;
- }
-
- /**
- * The plugin container will call this method and it needs to obtain the current configuration of the managed
- * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
- * returned Configuration object with the managed resource's configuration property values.
- *
- * @see ConfigurationFacet#loadResourceConfiguration()
- */
- public Configuration loadResourceConfiguration() {
- // here we simulate the loading of the managed resource's configuration
-
- if (resourceConfiguration == null) {
- // for this example, we will create a simple dummy configuration to start with.
- // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
- resourceConfiguration = new Configuration();
- }
-
- Configuration config = resourceConfiguration;
-
- return config;
- }
-
- /**
- * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
- * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
- * of the given configuration.
- *
- * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
- */
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- // this simulates the plugin taking the new configuration and reconfiguring the managed resource
- resourceConfiguration = report.getConfiguration().deepCopy();
+public class ModclusterServerComponent extends MBeanResourceComponent {
- report.setStatus(ConfigurationUpdateStatus.SUCCESS);
- }
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index fe6d1b3..c924753 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -12,21 +12,25 @@
<service name="mod_cluster"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
- class="LoadMetric"
+ class="ModclusterServerComponent"
supportsManualAdd="true"
description="mod_cluster plugin">
- <!-- runs-inside>
- <parent-resource-type name="JMX Server" plugin="JMX"/>
- </runs-inside-->
- <runs-inside>
- <parent-resource-type name="JMX Server" plugin="JMX"/>
- </runs-inside>
+ <runs-inside>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
+ </runs-inside>
- <plugin-configuration>
- <c:simple-property name="connectorAddress" default="http://192.168.1.56:6666"/>
- <c:simple-property name="objectName" readOnly="true" default="ModClusterServiceMBean"/>
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
+ <c:simple-property name="nameTemplate" default="{application}"/>
</plugin-configuration>
-
+
+ <operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
+
+ <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
+ <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 971ccb1..5f68989 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -20,6 +20,8 @@ package org.rhq.plugins.modcluster.test;
import java.io.File;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -29,12 +31,18 @@ import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.pc.PluginContainer;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
/**
* @author Fady Matar
@@ -90,23 +98,53 @@ public class ModclusterPluginTest {
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
PLUGIN_NAME);
- log.info("Found " + resources.size() + "mod_cluster instance(s).");
+ log.info("Found " + resources.size() + " mod_cluster instance(s).");
+
+ if (resources.size() != 0) {
+ testResourceMeasurement((Resource) resources.toArray()[0]);
+ }
+ }
+
+ private void testResourceMeasurement(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ if (resourceComponent instanceof MeasurementFacet) {
+ for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
+ Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
+ metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
+ MeasurementReport report = new MeasurementReport();
+ ((MeasurementFacet) resourceComponent).getValues(report, metricList);
+
+ /*assert report.getNumericData().size() > 0 : "Measurement " + def.getName() + " not collected from "
+ + resource;*/
+ MeasurementData data = report.getTraitData().iterator().next();
+ assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
+ log.info("Measurement: " + def.getName() + "=" + data.getValue());
+ }
+ }
}
private Set<Resource> findResource(Resource parent, String typeName) {
Set<Resource> found = new HashSet<Resource>();
- Resource platform = parent;
- for (Resource resource : platform.getChildResources()) {
- log.info("Discovered resource of type: " + resource.getResourceType().getName());
- if (resource.getResourceType().getName().equals(typeName)) {
- found.add(resource);
+
+ Queue<Resource> discoveryQueue = new LinkedList<Resource>();
+ discoveryQueue.add(parent);
+
+ while (!discoveryQueue.isEmpty()) {
+ Resource currentResource = discoveryQueue.poll();
+
+ log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
+ if (currentResource.getResourceType().getName().equals(typeName)) {
+ found.add(currentResource);
}
- if (resource.getChildResources() != null) {
- for (Resource child : found) {
- found.addAll(findResource(child, typeName));
+
+ if (currentResource.getChildResources() != null) {
+ for (Resource child : currentResource.getChildResources()) {
+ discoveryQueue.add(child);
}
}
}
+
return found;
}
}
commit e12cc04174250dcabd6dd81ca7f97e998ca801fb
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 28 09:21:49 2011 -0500
Attempts to make mod_cluster a simple derivation from JMX plugin.
diff --git a/.classpath b/.classpath
index d5bec34..c215ebf 100644
--- a/.classpath
+++ b/.classpath
@@ -271,5 +271,7 @@
<classpathentry excluding="**" kind="src" path="modules/enterprise/comm/src/test/resources"/>
<classpathentry excluding="**" kind="src" path="modules/enterprise/agent/src/main/resources"/>
<classpathentry excluding="**" kind="src" path="modules/enterprise/agent/src/test/resources"/>
+ <classpathentry kind="src" path="modules/plugins/mod-cluster/src/main/java"/>
+ <classpathentry kind="src" path="modules/plugins/mod-cluster/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index e22efc7..869a25e 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -12,16 +10,11 @@
<groupId>org.rhq.plugins.modcluster</groupId>
<artifactId>modcluster-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mod_cluster RHQ Plugin</name>
<description>mod_cluster RHQ Agent plugin</description>
- <!--properties>
- <rhq.version>4.1.0-SNAPSHOT</rhq.version>
- </properties-->
-
<dependencies>
<dependency>
@@ -31,220 +24,170 @@
<scope>provided</scope>
</dependency>
- <!-- Below are the core modules that are required dependencies of all plugins -->
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>hibernate-annotations</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.2.1.GA</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!--
- Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
- All three are provided to your plugin by the agent/plugin-container.
- -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
-
-
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
-
- <!--
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>1.0.9</version>
- <scope>provided</scope>
- </dependency>
- -->
-
- <!-- Define any third-party dependencies your plugin has here. -->
- <!--
- <dependency>
- <groupId>group-id-of-dependency-goes-here</groupId>
- <artifactId>artifact-id-of-dependency-goes-here</artifactId>
- <version>version-of-dependency-goes-here</version>
- </dependency>
- -->
</dependencies>
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <!--
- If your plugin has third-party jar dependencies that are not already available when deployed in the plugin
- container, you can package these jars in your plugin. They go in your plugin jar's "lib" directory.
- Uncomment the maven plugin definition below and define one or more jar files (aka "artifactItem" elements)
- that you want to include in your plugin jar.
- -->
- <!--
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>your-third-party-dep-group</groupId>
- <artifactId>your-third-party-dep-artifact</artifactId>
- <version>your-third-party-dep-version</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
-
- </plugins>
- </build>
-
<profiles>
+
<profile>
- <id>dev</id>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>maven.test.skip</name>
+ <value>!true</value>
+ </property>
+ </activation>
+
<properties>
- <!-- define the location of your RHQ root directory - typically rhq.rootDir is overridden in Maven's settings.xml -->
- <rhq.rootDir>/rhq/trunk</rhq.rootDir>
- <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
+ <rhq.rootDir>../../..</rhq.rootDir>
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
- <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
</properties>
+
<build>
<plugins>
+
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
- <id>deploy</id>
- <phase>compile</phase>
+ <phase>process-test-resources</phase>
<configuration>
<tasks>
- <mkdir dir="${rhq.deploymentDir}" />
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Updating ${deployment.file}...</echo>
- <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ <echo>Setting up plugin dependencies...</echo>
+ <property name="settings.localRepository" location="${user.home}/.m2/repository" />
+ <mkdir dir="target/testsetup" />
+
+ <mkdir dir="target/testsetup/plugins" />
+ <copy toDir="target/testsetup/plugins" flatten="true">
+ <fileset dir="${settings.localRepository}/">
+ <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
+ <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ </fileset>
+ <fileset dir="${rhq.deploymentDir}">
+ <include name="${project.artifactId}-${project.version}.jar" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="target/testsetup/lib" />
+ <unzip dest="target/testsetup/lib">
+ <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
+ <patternset>
+ <include name="**/lib/sigar.jar" />
+ <include name="**/lib/bcel*.jar" />
+ <include name="**/lib/*.so" />
+ <include name="**/lib/*.sl" />
+ <include name="**/lib/*.dll" />
+ <include name="**/lib/*.dylib" />
+ </patternset>
+ </unzip>
+ <move todir="target/testsetup/lib" flatten="true">
+ <fileset dir="target/testsetup/lib">
+ <include name="**/lib/*" />
+ </fileset>
+ </move>
+ <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
<execution>
<id>deploy-jar-meta-inf</id>
<phase>package</phase>
<configuration>
- <tasks>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
- <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
- <patternset>
- <include name="META-INF/**" />
- </patternset>
- </unjar>
- <jar destfile="${deployment.file}"
- manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
- update="true">
- </jar>
- </tasks>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset><include name="META-INF/**" /></patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
</configuration>
<goals>
- <goal>run</goal>
+ <goal>run</goal>
</goals>
</execution>
+
<execution>
<id>undeploy</id>
<phase>clean</phase>
<configuration>
- <tasks>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Deleting ${deployment.file}...</echo>
- <delete file="${deployment.file}" />
- </tasks>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
</configuration>
<goals>
- <goal>run</goal>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
</goals>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <systemProperties>
+ <property>
+ <name>project.artifactId</name>
+ <value>${project.artifactId}</value>
+ </property>
+ <property>
+ <name>project.version</name>
+ <value>${project.version}</value>
+ </property>
+ </systemProperties>
+ </configuration>
</execution>
</executions>
</plugin>
+
</plugins>
</build>
</profile>
</profiles>
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
</project>
-
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
new file mode 100644
index 0000000..1223508
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
@@ -0,0 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.plugins.modcluster;
+
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class LoadMetric extends MBeanResourceComponent {
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
new file mode 100644
index 0000000..fa807a3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
@@ -0,0 +1,116 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ManualAddFacet;
+import org.rhq.core.pluginapi.inventory.ProcessScanResult;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+/**
+ * This can be the start of your own custom plugin's discovery component. Review the javadoc for
+ * {@link ResourceDiscoveryComponent}.
+ *
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class ModclusterDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
+ private final Log log = LogFactory.getLog(ModclusterDiscoveryComponent.class);
+
+ /**
+ * This discovery method is the way the plugin supports "manual-add" capability. The plugin
+ * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
+ * If that attribute is false, this method will never be used since it will not be possible to manually
+ * add an instance of the resource.
+ *
+ * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
+ */
+ @Override
+ public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
+ ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
+
+ // pluginConfiguration contains information on a resource that was manually added by the user.
+ // take it and build a details object that represents that resource.
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Manually Added Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, pluginConfiguration, null);
+
+ return resource;
+ }
+
+ /**
+ * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ log.info("Discovering my custom plugin's resources");
+
+ // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
+ // auto-discovered processes using those process scan definitions. Process all those that were found.
+ List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
+ for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
+ // determine if you want to include the result in this method's returned set of discovered resources
+ }
+
+ // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
+ // create a details object that describe the resource that you discovered.
+ HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, null, null);
+
+ set.add(resource);
+
+ return set;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
new file mode 100644
index 0000000..6d6998a
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -0,0 +1,168 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
+ * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
+ * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
+ * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
+ * implementations that that facet required.
+ *
+ * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
+ * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
+ * will need to know.</p>
+ *
+ * @author John Mazzitelli
+ */
+public class ModclusterServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
+ ConfigurationFacet {
+ private final Log log = LogFactory.getLog(ModclusterServerComponent.class);
+
+ /**
+ * Represents the resource configuration of the custom product being managed.
+ */
+ private Configuration resourceConfiguration;
+
+ /**
+ * All AMPS plugins are stateful - this context contains information that your resource component can use when
+ * performing its processing.
+ */
+ private ResourceContext resourceContext;
+
+ /**
+ * This is called when your component has been started with the given context. You normally initialize some internal
+ * state of your component as well as attempt to make a stateful connection to your managed resource.
+ *
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ public void start(ResourceContext context) {
+ resourceContext = context;
+ }
+
+ /**
+ * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
+ * perform some cleanup here; though normally not much needs to be done here.
+ *
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ }
+
+ /**
+ * All resource components must be able to tell the plugin container if the managed resource is available or not.
+ * This method is called by the plugin container when it needs to know if the managed resource is actually up and
+ * available.
+ *
+ * @see ResourceComponent#getAvailability()
+ */
+ public AvailabilityType getAvailability() {
+ // TODO: here you normally make some type of connection attempt to the managed resource
+ // to determine if it is really up and running.
+ return AvailabilityType.UP;
+ }
+
+ /**
+ * The plugin container will call this method when your resource component has been scheduled to collect some
+ * measurements now. It is within this method that you actually talk to the managed resource and collect the
+ * measurement data that is has emitted.
+ *
+ * @see MeasurementFacet#getValues(MeasurementReport, Set)
+ */
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
+ for (MeasurementScheduleRequest request : requests) {
+ String name = request.getName();
+
+ // TODO: based on the request information, you must collect the requested measurement(s)
+ // you can use the name of the measurement to determine what you actually need to collect
+ try {
+ Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
+ report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
+ } catch (Exception e) {
+ log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
+ * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
+ *
+ * @see OperationFacet#invokeOperation(String, Configuration)
+ */
+ public OperationResult invokeOperation(String name, Configuration configuration) {
+ return null;
+ }
+
+ /**
+ * The plugin container will call this method and it needs to obtain the current configuration of the managed
+ * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
+ * returned Configuration object with the managed resource's configuration property values.
+ *
+ * @see ConfigurationFacet#loadResourceConfiguration()
+ */
+ public Configuration loadResourceConfiguration() {
+ // here we simulate the loading of the managed resource's configuration
+
+ if (resourceConfiguration == null) {
+ // for this example, we will create a simple dummy configuration to start with.
+ // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
+ resourceConfiguration = new Configuration();
+ }
+
+ Configuration config = resourceConfiguration;
+
+ return config;
+ }
+
+ /**
+ * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
+ * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
+ * of the given configuration.
+ *
+ * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
+ */
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ // this simulates the plugin taking the new configuration and reconfiguring the managed resource
+ resourceConfiguration = report.getConfiguration().deepCopy();
+
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
deleted file mode 100644
index 2abd0ea..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
+++ /dev/null
@@ -1,116 +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.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ManualAddFacet;
-import org.rhq.core.pluginapi.inventory.ProcessScanResult;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-
-/**
- * This can be the start of your own custom plugin's discovery component. Review the javadoc for
- * {@link ResourceDiscoveryComponent}.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
- private final Log log = LogFactory.getLog(SamplePluginDiscoveryComponent.class);
-
- /**
- * This discovery method is the way the plugin supports "manual-add" capability. The plugin
- * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
- * If that attribute is false, this method will never be used since it will not be possible to manually
- * add an instance of the resource.
- *
- * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
- */
- @Override
- public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
- ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
-
- // pluginConfiguration contains information on a resource that was manually added by the user.
- // take it and build a details object that represents that resource.
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Manually Added Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, pluginConfiguration, null);
-
- return resource;
- }
-
- /**
- * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
- */
- @Override
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
- log.info("Discovering my custom plugin's resources");
-
- // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
- // auto-discovered processes using those process scan definitions. Process all those that were found.
- List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
- for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
- // determine if you want to include the result in this method's returned set of discovered resources
- }
-
- // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
- // create a details object that describe the resource that you discovered.
- HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, null, null);
-
- set.add(resource);
-
- return set;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
deleted file mode 100644
index 0236532..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
+++ /dev/null
@@ -1,245 +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.plugins.modcluster;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
-import org.rhq.core.domain.content.PackageType;
-import org.rhq.core.domain.content.transfer.DeployPackageStep;
-import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
-import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
-import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.content.ContentFacet;
-import org.rhq.core.pluginapi.content.ContentServices;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
- * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
- * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
- * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
- * implementations that that facet required.
- *
- * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
- * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
- * will need to know.</p>
- *
- * @author John Mazzitelli
- */
-public class SamplePluginServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
- ConfigurationFacet, ContentFacet, DeleteResourceFacet, CreateChildResourceFacet {
- private final Log log = LogFactory.getLog(SamplePluginServerComponent.class);
-
- /**
- * Represents the resource configuration of the custom product being managed.
- */
- private Configuration resourceConfiguration;
-
- /**
- * All AMPS plugins are stateful - this context contains information that your resource component can use when
- * performing its processing.
- */
- private ResourceContext resourceContext;
-
- /**
- * This is called when your component has been started with the given context. You normally initialize some internal
- * state of your component as well as attempt to make a stateful connection to your managed resource.
- *
- * @see ResourceComponent#start(ResourceContext)
- */
- public void start(ResourceContext context) {
- resourceContext = context;
- }
-
- /**
- * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
- * perform some cleanup here; though normally not much needs to be done here.
- *
- * @see ResourceComponent#stop()
- */
- public void stop() {
- }
-
- /**
- * All resource components must be able to tell the plugin container if the managed resource is available or not.
- * This method is called by the plugin container when it needs to know if the managed resource is actually up and
- * available.
- *
- * @see ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- // TODO: here you normally make some type of connection attempt to the managed resource
- // to determine if it is really up and running.
- return AvailabilityType.UP;
- }
-
- /**
- * The plugin container will call this method when your resource component has been scheduled to collect some
- * measurements now. It is within this method that you actually talk to the managed resource and collect the
- * measurement data that is has emitted.
- *
- * @see MeasurementFacet#getValues(MeasurementReport, Set)
- */
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
- for (MeasurementScheduleRequest request : requests) {
- String name = request.getName();
-
- // TODO: based on the request information, you must collect the requested measurement(s)
- // you can use the name of the measurement to determine what you actually need to collect
- try {
- Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
- report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
- } catch (Exception e) {
- log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
- }
- }
-
- return;
- }
-
- /**
- * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
- * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
- *
- * @see OperationFacet#invokeOperation(String, Configuration)
- */
- public OperationResult invokeOperation(String name, Configuration configuration) {
- return null;
- }
-
- /**
- * The plugin container will call this method and it needs to obtain the current configuration of the managed
- * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
- * returned Configuration object with the managed resource's configuration property values.
- *
- * @see ConfigurationFacet#loadResourceConfiguration()
- */
- public Configuration loadResourceConfiguration() {
- // here we simulate the loading of the managed resource's configuration
-
- if (resourceConfiguration == null) {
- // for this example, we will create a simple dummy configuration to start with.
- // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
- resourceConfiguration = new Configuration();
- }
-
- Configuration config = resourceConfiguration;
-
- return config;
- }
-
- /**
- * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
- * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
- * of the given configuration.
- *
- * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
- */
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- // this simulates the plugin taking the new configuration and reconfiguring the managed resource
- resourceConfiguration = report.getConfiguration().deepCopy();
-
- report.setStatus(ConfigurationUpdateStatus.SUCCESS);
- }
-
- /**
- * When this is called, the plugin is responsible for scanning its managed resource and look for content that need
- * to be managed for that resource. This method should only discover packages of the given package type.
- *
- * @see ContentFacet#discoverDeployedPackages(PackageType)
- */
- public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
- return null;
- }
-
- /**
- * The plugin container calls this method when new packages need to be deployed/installed on resources.
- *
- * @see ContentFacet#deployPackages(Set, ContentServices)
- */
- public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices) {
- return null;
- }
-
- /**
- * When a remote client wants to see the actual data content for an installed package, this method will be called.
- * This method must return a stream of data containing the full content of the package.
- *
- * @see ContentFacet#retrievePackageBits(ResourcePackageDetails)
- */
- public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
- return null;
- }
-
- /**
- * This is the method that is used when the component has to create the installation steps and their results.
- *
- * @see ContentFacet#generateInstallationSteps(ResourcePackageDetails)
- */
- public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails) {
- return null;
- }
-
- /**
- * This is called when the actual content of packages should be deleted from the managed resource.
- *
- * @see ContentFacet#removePackages(Set)
- */
- public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
- return null;
- }
-
- /**
- * When called, the plugin container is asking the plugin to create a new managed resource. The new resource's
- * details need to be added to the given report.
- *
- * @see CreateChildResourceFacet#createResource(CreateResourceReport)
- */
- public CreateResourceReport createResource(CreateResourceReport report) {
- return null;
- }
-
- /**
- * When called, the plugin container is asking the plugin to delete a managed resource.
- *
- * @see DeleteResourceFacet#deleteResource()
- */
- public void deleteResource() {
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 1a99bf7..fe6d1b3 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -10,97 +10,23 @@
<depends plugin="JMX" />
- <!--
- CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
- be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
- defined at this level.
- -->
- <server name="mod_cluster"
- discovery="SamplePluginDiscoveryComponent"
- class="SamplePluginServerComponent"
+ <service name="mod_cluster"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="LoadMetric"
supportsManualAdd="true"
description="mod_cluster plugin">
-
- <!--
- CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
- related child resources. Categories defined at this level can carry metadata on the category itself,
- such as a display name and description.
- -->
- <subcategories>
- <subcategory name="Category1" displayName="Sample Category 1"
- description="This is a sample category that should be removed."/>
- <subcategory name="Category2" >
- <subcategory name="ChildCategory2a" />
- </subcategory>
- </subcategories>
-
- <!--
- CHANGE: The entire plugin configuration is optional. If there are properties specific to handling how the
- resource component will connect to the resource, they should be added here. If the plugin-configuration
- entity is specified, at least one property must be provided.
- -->
- <plugin-configuration>
- <c:simple-property name="SamplePluginProperty" displayName="Sample Plugin Property" default="Value" />
+
+ <!-- runs-inside>
+ <parent-resource-type name="JMX Server" plugin="JMX"/>
+ </runs-inside-->
+ <runs-inside>
+ <parent-resource-type name="JMX Server" plugin="JMX"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="connectorAddress" default="http://192.168.1.56:6666"/>
+ <c:simple-property name="objectName" readOnly="true" default="ModClusterServiceMBean"/>
</plugin-configuration>
- <!--
- CHANGE: The process-scan element requests the plugin container provide the discovery component for
- this resource type with the results of scanning the machine for running processes. If there is
- no use for this in a given resource type, this entry may be omitted.
- -->
- <process-scan name="ScanIdentifier" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
-
- <!--
- CHANGE: An operation element is added for each operation that may be executed against resources of this type.
- The parameters element is optional; properties defined within will be displayed to the user when
- invoking the operation. If the resource has no applicable operations, these elements may be omitted.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the OperationFacet interface
- if any operations are specified.
- -->
- <operation name="testSimple"
- description="Test simple-property configuration element for a resource operation">
- <parameters>
- <c:group name="required" displayName="Required Parameters" hiddenByDefault="false">
- <c:description>All of these properties are required</c:description>
- <c:simple-property name="aNumber" type="integer" required="true" default="42" displayName="A Number" description="A number between 1 and 100, inclusive">
- <c:constraint>
- <c:integer-constraint minimum="1" maximum="100"/>
- </c:constraint>
- </c:simple-property>
- </c:group>
- </parameters>
- <results>
- <c:simple-property name="results" />
- </results>
- </operation>
-
- <!--
- CHANGE: For each measurement that should be collected for resources of this type, a metric element is added.
- In addition to identifying the metric, a default collection interval and whether or not the
- metric is even collected by default are indicated. If the resource has no measurements to be
- collected, these elements may be omitted.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the MeasurementFacet interface
- if any metrics are specified.
- -->
- <metric property="MeasurementName"
- displayName="The Measurement Name"
- description="Describes what this measurement is actually telling you"
- defaultOn="true"
- defaultInterval="300000"
- category="performance" />
-
- <!--
- CHANGE: Resource configuration properties are used to configure resources themselves, as compared to the plugin
- configuration which refers to the connection to a resource. If the resource-configuration
- entity is specified, at least one property must be provided.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the ConfigurationFacet
- interface if a resource-configuration element is supplied.
- -->
- <resource-configuration>
- <c:simple-property name="port" type="integer" displayName="Port on which to listen" />
- </resource-configuration>
- </server>
+ </service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index bada521..971ccb1 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -24,6 +24,9 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.resource.Resource;
@@ -32,22 +35,19 @@ import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
/**
* @author Fady Matar
*/
-@Test(groups = "tomcat-plugin")
+@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
private Log log = LogFactory.getLog(this.getClass());
- private static final String PLUGIN_NAME = "Tomcat";
+ private static final String PLUGIN_NAME = "mod_cluster";
@BeforeSuite
public void start() {
try {
- File pluginDir = new File("target/itest/plugins");
+ File pluginDir = new File("target/testsetup/plugins");
PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
pcConfig.setPluginDirectory(pluginDir);
@@ -75,16 +75,22 @@ public class ModclusterPluginTest {
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+
}
@Test(dependsOnMethods = "testPluginLoad")
public void testDiscovery() throws Exception {
InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- "Tomcat");
- log.info("Found " + resources.size() + " ews / apache tomcat instance(s).");
+ PLUGIN_NAME);
+ log.info("Found " + resources.size() + "mod_cluster instance(s).");
}
private Set<Resource> findResource(Resource parent, String typeName) {
commit 288af403c3c181cb3915b2fbe067bb23937f1e39
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jun 23 11:09:56 2011 -0500
A couple of updates to modcluster plugin based on tomcat plugin (modified the initial template commit).
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index b72c93d..e22efc7 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -1,25 +1,36 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.rhq.sample.skeletonplugin</groupId>
- <artifactId>skeleton-plugin</artifactId>
+ <parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-plugins-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.rhq.plugins.modcluster</groupId>
+ <artifactId>modcluster-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Skeleton RHQ Plugin Template</name>
- <description>A template for building a custom RHQ Agent plugin</description>
+ <name>mod_cluster RHQ Plugin</name>
+ <description>mod_cluster RHQ Agent plugin</description>
- <properties>
+ <!--properties>
<rhq.version>4.1.0-SNAPSHOT</rhq.version>
- </properties>
+ </properties-->
<dependencies>
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Below are the core modules that are required dependencies of all plugins -->
<dependency>
<groupId>org.rhq</groupId>
@@ -77,15 +88,14 @@
<scope>provided</scope>
</dependency>
- <!--
+
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
- -->
-
+
<!--
<dependency>
<groupId>i18nlog</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
index 2bb46e6..2abd0ea 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-package org.rhq.sample.skeletonplugin;
+package org.rhq.plugins.modcluster;
import java.util.HashSet;
import java.util.List;
@@ -113,4 +113,4 @@ public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponen
return set;
}
-}
\ No newline at end of file
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
index 701afb0..0236532 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-package org.rhq.sample.skeletonplugin;
+package org.rhq.plugins.modcluster;
import java.io.InputStream;
import java.util.List;
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 2547af7..1a99bf7 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -1,36 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- See the rhq-plugin.xsd file for detailed documentatoin on the schema. The notes in this file are to
- facilitate using this file as a base plugin descriptor.
--->
-
-<!--
- CHANGE: The name (and optional displayName) should be changed to reflect the plugin being developed. Keep in mind
- the value for name must be unique across all other plugins that are deployed.
-
- The package attribute should be changed to reflect the package in which all of the component classes
- are built.
--->
-<plugin name="SkeletonPlugin"
- displayName="Skeleton Plugin"
+<plugin name="mod_cluster"
+ displayName="mod_cluster"
version="1.0"
- package="org.rhq.sample.skeletonplugin"
+ package="org.rhq.plugins.modcluster"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
+ <depends plugin="JMX" />
- <!--
+ <!--
CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
defined at this level.
-->
- <server name="Sample Plugin Server"
+ <server name="mod_cluster"
discovery="SamplePluginDiscoveryComponent"
class="SamplePluginServerComponent"
supportsManualAdd="true"
- description="This is a sample resource type and should be removed.">
+ description="mod_cluster plugin">
<!--
CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
new file mode 100644
index 0000000..bada521
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -0,0 +1,106 @@
+/*
+ * 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.plugins.modcluster.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.plugin.FileSystemPluginFinder;
+import org.rhq.core.pc.plugin.PluginEnvironment;
+import org.rhq.core.pc.plugin.PluginManager;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+/**
+ * @author Fady Matar
+ */
+@Test(groups = "tomcat-plugin")
+public class ModclusterPluginTest {
+ private Log log = LogFactory.getLog(this.getClass());
+ private static final String PLUGIN_NAME = "Tomcat";
+
+ @BeforeSuite
+ public void start() {
+ try {
+ File pluginDir = new File("target/itest/plugins");
+ PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
+ pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
+ pcConfig.setPluginDirectory(pluginDir);
+
+ pcConfig.setInsideAgent(false);
+ PluginContainer.getInstance().setConfiguration(pcConfig);
+ PluginContainer.getInstance().initialize();
+ log.info("PC started.");
+ for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
+ log.info("...Loaded plugin: " + plugin);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AfterSuite
+ public void stop() {
+ PluginContainer.getInstance().shutdown();
+ }
+
+ @Test
+ public void testPluginLoad() {
+ PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
+ PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
+ assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
+ assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+ }
+
+ @Test(dependsOnMethods = "testPluginLoad")
+ public void testDiscovery() throws Exception {
+ InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
+ "Tomcat");
+ log.info("Found " + resources.size() + " ews / apache tomcat instance(s).");
+ }
+
+ private Set<Resource> findResource(Resource parent, String typeName) {
+ Set<Resource> found = new HashSet<Resource>();
+ Resource platform = parent;
+ for (Resource resource : platform.getChildResources()) {
+ log.info("Discovered resource of type: " + resource.getResourceType().getName());
+ if (resource.getResourceType().getName().equals(typeName)) {
+ found.add(resource);
+ }
+ if (resource.getChildResources() != null) {
+ for (Resource child : found) {
+ found.addAll(findResource(child, typeName));
+ }
+ }
+ }
+ return found;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/test/resources/log4j.xml b/modules/plugins/mod-cluster/src/test/resources/log4j.xml
new file mode 100644
index 0000000..9ac1be8
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/log4j.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 9973 2008-05-08 00:57:31Z ispringer $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Messagen -->
+
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+
+ <!--<param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>-->
+ </layout>
+ </appender>
+
+ <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="false"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Messagen -->
+ <!--
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ -->
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
commit f5d95830a0ef0c23f58af2f60e34375a2b9273b9
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jun 22 15:52:27 2011 -0500
Start for mod_cluster plugin from skeleton-plugin template.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
new file mode 100644
index 0000000..b72c93d
--- /dev/null
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -0,0 +1,240 @@
+<?xml version="1.0"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.rhq.sample.skeletonplugin</groupId>
+ <artifactId>skeleton-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>Skeleton RHQ Plugin Template</name>
+ <description>A template for building a custom RHQ Agent plugin</description>
+
+ <properties>
+ <rhq.version>4.1.0-SNAPSHOT</rhq.version>
+ </properties>
+
+ <dependencies>
+
+ <!-- Below are the core modules that are required dependencies of all plugins -->
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-domain</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-plugin-api</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-native-system</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>hibernate-annotations</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.GA</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!--
+ Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
+ All three are provided to your plugin by the agent/plugin-container.
+ -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!--
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+ -->
+
+ <!--
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ <version>1.0.9</version>
+ <scope>provided</scope>
+ </dependency>
+ -->
+
+ <!-- Define any third-party dependencies your plugin has here. -->
+ <!--
+ <dependency>
+ <groupId>group-id-of-dependency-goes-here</groupId>
+ <artifactId>artifact-id-of-dependency-goes-here</artifactId>
+ <version>version-of-dependency-goes-here</version>
+ </dependency>
+ -->
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <!--
+ If your plugin has third-party jar dependencies that are not already available when deployed in the plugin
+ container, you can package these jars in your plugin. They go in your plugin jar's "lib" directory.
+ Uncomment the maven plugin definition below and define one or more jar files (aka "artifactItem" elements)
+ that you want to include in your plugin jar.
+ -->
+ <!--
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>your-third-party-dep-group</groupId>
+ <artifactId>your-third-party-dep-artifact</artifactId>
+ <version>your-third-party-dep-version</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>dev</id>
+ <properties>
+ <!-- define the location of your RHQ root directory - typically rhq.rootDir is overridden in Maven's settings.xml -->
+ <rhq.rootDir>/rhq/trunk</rhq.rootDir>
+ <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset>
+ <include name="META-INF/**" />
+ </patternset>
+ </unjar>
+ <jar destfile="${deployment.file}"
+ manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
+ update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+</project>
+
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
new file mode 100644
index 0000000..2bb46e6
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
@@ -0,0 +1,116 @@
+/*
+ * 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.sample.skeletonplugin;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ManualAddFacet;
+import org.rhq.core.pluginapi.inventory.ProcessScanResult;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+/**
+ * This can be the start of your own custom plugin's discovery component. Review the javadoc for
+ * {@link ResourceDiscoveryComponent}.
+ *
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
+ private final Log log = LogFactory.getLog(SamplePluginDiscoveryComponent.class);
+
+ /**
+ * This discovery method is the way the plugin supports "manual-add" capability. The plugin
+ * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
+ * If that attribute is false, this method will never be used since it will not be possible to manually
+ * add an instance of the resource.
+ *
+ * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
+ */
+ @Override
+ public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
+ ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
+
+ // pluginConfiguration contains information on a resource that was manually added by the user.
+ // take it and build a details object that represents that resource.
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Manually Added Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, pluginConfiguration, null);
+
+ return resource;
+ }
+
+ /**
+ * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ log.info("Discovering my custom plugin's resources");
+
+ // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
+ // auto-discovered processes using those process scan definitions. Process all those that were found.
+ List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
+ for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
+ // determine if you want to include the result in this method's returned set of discovered resources
+ }
+
+ // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
+ // create a details object that describe the resource that you discovered.
+ HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, null, null);
+
+ set.add(resource);
+
+ return set;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
new file mode 100644
index 0000000..701afb0
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
@@ -0,0 +1,245 @@
+/*
+ * 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.sample.skeletonplugin;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.DeployPackageStep;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.content.ContentFacet;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
+ * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
+ * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
+ * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
+ * implementations that that facet required.
+ *
+ * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
+ * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
+ * will need to know.</p>
+ *
+ * @author John Mazzitelli
+ */
+public class SamplePluginServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
+ ConfigurationFacet, ContentFacet, DeleteResourceFacet, CreateChildResourceFacet {
+ private final Log log = LogFactory.getLog(SamplePluginServerComponent.class);
+
+ /**
+ * Represents the resource configuration of the custom product being managed.
+ */
+ private Configuration resourceConfiguration;
+
+ /**
+ * All AMPS plugins are stateful - this context contains information that your resource component can use when
+ * performing its processing.
+ */
+ private ResourceContext resourceContext;
+
+ /**
+ * This is called when your component has been started with the given context. You normally initialize some internal
+ * state of your component as well as attempt to make a stateful connection to your managed resource.
+ *
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ public void start(ResourceContext context) {
+ resourceContext = context;
+ }
+
+ /**
+ * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
+ * perform some cleanup here; though normally not much needs to be done here.
+ *
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ }
+
+ /**
+ * All resource components must be able to tell the plugin container if the managed resource is available or not.
+ * This method is called by the plugin container when it needs to know if the managed resource is actually up and
+ * available.
+ *
+ * @see ResourceComponent#getAvailability()
+ */
+ public AvailabilityType getAvailability() {
+ // TODO: here you normally make some type of connection attempt to the managed resource
+ // to determine if it is really up and running.
+ return AvailabilityType.UP;
+ }
+
+ /**
+ * The plugin container will call this method when your resource component has been scheduled to collect some
+ * measurements now. It is within this method that you actually talk to the managed resource and collect the
+ * measurement data that is has emitted.
+ *
+ * @see MeasurementFacet#getValues(MeasurementReport, Set)
+ */
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
+ for (MeasurementScheduleRequest request : requests) {
+ String name = request.getName();
+
+ // TODO: based on the request information, you must collect the requested measurement(s)
+ // you can use the name of the measurement to determine what you actually need to collect
+ try {
+ Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
+ report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
+ } catch (Exception e) {
+ log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
+ * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
+ *
+ * @see OperationFacet#invokeOperation(String, Configuration)
+ */
+ public OperationResult invokeOperation(String name, Configuration configuration) {
+ return null;
+ }
+
+ /**
+ * The plugin container will call this method and it needs to obtain the current configuration of the managed
+ * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
+ * returned Configuration object with the managed resource's configuration property values.
+ *
+ * @see ConfigurationFacet#loadResourceConfiguration()
+ */
+ public Configuration loadResourceConfiguration() {
+ // here we simulate the loading of the managed resource's configuration
+
+ if (resourceConfiguration == null) {
+ // for this example, we will create a simple dummy configuration to start with.
+ // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
+ resourceConfiguration = new Configuration();
+ }
+
+ Configuration config = resourceConfiguration;
+
+ return config;
+ }
+
+ /**
+ * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
+ * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
+ * of the given configuration.
+ *
+ * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
+ */
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ // this simulates the plugin taking the new configuration and reconfiguring the managed resource
+ resourceConfiguration = report.getConfiguration().deepCopy();
+
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+ }
+
+ /**
+ * When this is called, the plugin is responsible for scanning its managed resource and look for content that need
+ * to be managed for that resource. This method should only discover packages of the given package type.
+ *
+ * @see ContentFacet#discoverDeployedPackages(PackageType)
+ */
+ public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+ return null;
+ }
+
+ /**
+ * The plugin container calls this method when new packages need to be deployed/installed on resources.
+ *
+ * @see ContentFacet#deployPackages(Set, ContentServices)
+ */
+ public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices) {
+ return null;
+ }
+
+ /**
+ * When a remote client wants to see the actual data content for an installed package, this method will be called.
+ * This method must return a stream of data containing the full content of the package.
+ *
+ * @see ContentFacet#retrievePackageBits(ResourcePackageDetails)
+ */
+ public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ /**
+ * This is the method that is used when the component has to create the installation steps and their results.
+ *
+ * @see ContentFacet#generateInstallationSteps(ResourcePackageDetails)
+ */
+ public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ /**
+ * This is called when the actual content of packages should be deleted from the managed resource.
+ *
+ * @see ContentFacet#removePackages(Set)
+ */
+ public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
+ return null;
+ }
+
+ /**
+ * When called, the plugin container is asking the plugin to create a new managed resource. The new resource's
+ * details need to be added to the given report.
+ *
+ * @see CreateChildResourceFacet#createResource(CreateResourceReport)
+ */
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ return null;
+ }
+
+ /**
+ * When called, the plugin container is asking the plugin to delete a managed resource.
+ *
+ * @see DeleteResourceFacet#deleteResource()
+ */
+ public void deleteResource() {
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
new file mode 100644
index 0000000..2547af7
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ See the rhq-plugin.xsd file for detailed documentatoin on the schema. The notes in this file are to
+ facilitate using this file as a base plugin descriptor.
+-->
+
+<!--
+ CHANGE: The name (and optional displayName) should be changed to reflect the plugin being developed. Keep in mind
+ the value for name must be unique across all other plugins that are deployed.
+
+ The package attribute should be changed to reflect the package in which all of the component classes
+ are built.
+-->
+<plugin name="SkeletonPlugin"
+ displayName="Skeleton Plugin"
+ version="1.0"
+ package="org.rhq.sample.skeletonplugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+
+ <!--
+ CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
+ be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
+ defined at this level.
+ -->
+ <server name="Sample Plugin Server"
+ discovery="SamplePluginDiscoveryComponent"
+ class="SamplePluginServerComponent"
+ supportsManualAdd="true"
+ description="This is a sample resource type and should be removed.">
+
+ <!--
+ CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
+ related child resources. Categories defined at this level can carry metadata on the category itself,
+ such as a display name and description.
+ -->
+ <subcategories>
+ <subcategory name="Category1" displayName="Sample Category 1"
+ description="This is a sample category that should be removed."/>
+ <subcategory name="Category2" >
+ <subcategory name="ChildCategory2a" />
+ </subcategory>
+ </subcategories>
+
+ <!--
+ CHANGE: The entire plugin configuration is optional. If there are properties specific to handling how the
+ resource component will connect to the resource, they should be added here. If the plugin-configuration
+ entity is specified, at least one property must be provided.
+ -->
+ <plugin-configuration>
+ <c:simple-property name="SamplePluginProperty" displayName="Sample Plugin Property" default="Value" />
+ </plugin-configuration>
+
+ <!--
+ CHANGE: The process-scan element requests the plugin container provide the discovery component for
+ this resource type with the results of scanning the machine for running processes. If there is
+ no use for this in a given resource type, this entry may be omitted.
+ -->
+ <process-scan name="ScanIdentifier" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
+
+ <!--
+ CHANGE: An operation element is added for each operation that may be executed against resources of this type.
+ The parameters element is optional; properties defined within will be displayed to the user when
+ invoking the operation. If the resource has no applicable operations, these elements may be omitted.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the OperationFacet interface
+ if any operations are specified.
+ -->
+ <operation name="testSimple"
+ description="Test simple-property configuration element for a resource operation">
+ <parameters>
+ <c:group name="required" displayName="Required Parameters" hiddenByDefault="false">
+ <c:description>All of these properties are required</c:description>
+ <c:simple-property name="aNumber" type="integer" required="true" default="42" displayName="A Number" description="A number between 1 and 100, inclusive">
+ <c:constraint>
+ <c:integer-constraint minimum="1" maximum="100"/>
+ </c:constraint>
+ </c:simple-property>
+ </c:group>
+ </parameters>
+ <results>
+ <c:simple-property name="results" />
+ </results>
+ </operation>
+
+ <!--
+ CHANGE: For each measurement that should be collected for resources of this type, a metric element is added.
+ In addition to identifying the metric, a default collection interval and whether or not the
+ metric is even collected by default are indicated. If the resource has no measurements to be
+ collected, these elements may be omitted.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the MeasurementFacet interface
+ if any metrics are specified.
+ -->
+ <metric property="MeasurementName"
+ displayName="The Measurement Name"
+ description="Describes what this measurement is actually telling you"
+ defaultOn="true"
+ defaultInterval="300000"
+ category="performance" />
+
+ <!--
+ CHANGE: Resource configuration properties are used to configure resources themselves, as compared to the plugin
+ configuration which refers to the connection to a resource. If the resource-configuration
+ entity is specified, at least one property must be provided.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the ConfigurationFacet
+ interface if a resource-configuration element is supplied.
+ -->
+ <resource-configuration>
+ <c:simple-property name="port" type="integer" displayName="Port on which to listen" />
+ </resource-configuration>
+ </server>
+</plugin>
commit b13a3515a996de937f8345fa287f044f90454d41
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 22:42:04 2011 -0500
Make the error message useful by adding the name of the attribute that failed to set.
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
index 2e1ae41..cb7f901 100644
--- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
+++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
@@ -503,7 +503,7 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
property.setErrorMessage(ThrowableUtil.getStackAsString(e));
report
.setErrorMessage("Failed setting resource configuration - see property error messages for details");
- log.info("Failure setting MBean Resource configuration value", e);
+ log.info("Failure setting MBean Resource configuration value for " + key, e);
}
}
}
commit 7e0f49de3b2da3b4b4d1987eb3fe53e42abbbf68
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 27 22:41:13 2011 -0500
Final touches for mod_cluster plugin configuration. Updated a couple of the plugin settings to match mod_cluster specifications.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 5c9c3fd..3d03715 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -42,9 +42,9 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
@SuppressWarnings("rawtypes")
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
- private final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private final String PROXY_INFO_PROPERTY = "proxyInfo";
- private final String ADDITIONAL_CONFIG_BEAN_PROPERTY = "additionalConfigurationObjectName";
+ private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private static final String PROXY_INFO_PROPERTY = "proxyInfo";
+ private static final String ENGINE_OBJECT_NAME = "engineObjectName";
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
@@ -76,8 +76,8 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
*/
private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
- String objectName = pluginConfig.getSimple(ADDITIONAL_CONFIG_BEAN_PROPERTY).getStringValue();
- EmsBean engineBean = this.loadBean(objectName, context.getParentResourceComponent());
+ String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
+ EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 591fef6..70898ef 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -25,7 +25,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
* @author Stefan Negrea
*
*/
-@SuppressWarnings("rawtypes")
+@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 992c5b0..29b334f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -25,9 +25,7 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
- <c:simple-property name="jvmRoute" readOnly="false"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
</plugin-configuration>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
@@ -76,12 +74,12 @@
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
<resource-configuration>
<c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
- <!-- c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/-->
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
@@ -89,7 +87,6 @@
<c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
<c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
<c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
<c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
commit 0890ce0e4f2e6331d3bcca15c799eecba8a15f38
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Jul 27 16:10:09 2011 -0400
[BZ-726202 - alerts not firing despite valid baseline values and alert conditions templates for some agents]
The issue here was that user created baseline did not properly trigger a
measurement condition cache reload for the affected agent. This was due
to the new Baseline not committed/visible to the trans executing the
agent status update.
- also, removed unused findBaselineForResourceAndMeasurementDefinition as
opposed to changing it for this fix.
- made a local public method private and removed some dead commented code
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
index 282ae1a..286a75e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerBean.java
@@ -355,9 +355,25 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
+ @TransactionAttribute(TransactionAttributeType.NEVER)
public MeasurementBaseline calculateAutoBaseline(Subject subject, Integer measurementScheduleId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+ MeasurementBaseline result = measurementBaselineManager.calculateAutoBaselineInNewTransaction(subject,
+ measurementScheduleId, startDate, endDate, save);
+
+ if (save) {
+ // note, this executes in a new transaction so the baseline must already be committed to the database
+ agentStatusManager.updateByMeasurementBaseline(result.getId());
+ }
+
+ return result;
+ }
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ public MeasurementBaseline calculateAutoBaselineInNewTransaction(Subject subject, Integer measurementScheduleId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+
MeasurementBaseline baseline;
MeasurementSchedule sched = entityManager.find(MeasurementSchedule.class, measurementScheduleId);
@@ -391,13 +407,26 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
- //calculateAutoBaseline(LookupUtil.getSubjectManager().getOverlord(),
- //chartForm.getGroupId(), chartForm.getM()[0], chartForm.getStartDate().getTime(), chartForm
- //.getEndDate().getTime(), false);
-
+ @TransactionAttribute(TransactionAttributeType.NEVER)
public MeasurementBaseline calculateAutoBaseline(Subject subject, int groupId, int definitionId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException {
+ MeasurementBaseline result = measurementBaselineManager.calculateAutoBaselineForGroupInNewTransaction(subject,
+ groupId, definitionId, startDate, endDate, save);
+
+ if (save) {
+ // note, this executes in a new transaction so the baseline must already be committed to the database
+ agentStatusManager.updateByMeasurementBaseline(result.getId());
+ }
+
+ return result;
+ }
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ public MeasurementBaseline calculateAutoBaselineForGroupInNewTransaction(Subject subject, int groupId,
+ int definitionId, long startDate, long endDate, boolean save) throws BaselineCreationException,
+ MeasurementNotFoundException {
+
if (save && !authorizationManager.hasGroupPermission(subject, Permission.MANAGE_MEASUREMENTS, groupId)) {
throw new PermissionException("User[" + subject.getName()
+ "] does not have permission to calculate and set baselines for group[id=" + groupId + "]");
@@ -405,7 +434,7 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
MeasurementBaseline baseline;
try {
- baseline = calculateBaseline(groupId, definitionId, true, startDate, endDate, save);
+ baseline = calculateBaselineForGroup(groupId, definitionId, true, startDate, endDate, save);
if (save) {
// We have changed the baseline information for the schedule, so remove the now outdated OOB info.
oobManager.removeOOBsForGroupAndDefinition(subject, groupId, definitionId);
@@ -435,43 +464,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
}
}
- public MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resourceId,
- Integer measurementDefinitionId) {
- if (!authorizationManager.canViewResource(subject, resourceId)) {
- throw new PermissionException("Cannot view the baseline for resourceId=" + resourceId
- + "] - you do not have permission");
- }
-
- List<MeasurementBaseline> baselines = getBaselinesForResourcesAndDefinitionIds(new Integer[] { resourceId },
- new Integer[] { measurementDefinitionId });
- if ((baselines != null) && (baselines.size() > 0)) {
- return baselines.get(0);
- }
-
- Subject overlord = subjectManager.getOverlord();
- try {
- MeasurementSchedule schedule = measurementScheduleManager.getSchedule(overlord, resourceId,
- measurementDefinitionId, true);
-
- /*
- * Use all available data from the epoch until now to calculate the baseline (we don't need to start from
- * the epoch, because the baseline should have been auto-calculated after a few days, but it's a catch-all)
- */
- MeasurementBaseline baseline = calculateAutoBaseline(overlord, schedule.getId(), 0, System
- .currentTimeMillis(), true);
-
- return baseline;
- } catch (MeasurementNotFoundException mnfe) {
- log.error("Could not find measurement schedule for " + "resourceId=" + resourceId + ", "
- + "measurementDefinitionId=" + measurementDefinitionId, mnfe);
- } catch (BaselineCreationException bce) {
- log.error("Could not calculate baseline for " + "resourceId=" + resourceId + ", "
- + "measurementDefinitionId=" + measurementDefinitionId, bce);
- }
-
- return null;
- }
-
@SuppressWarnings("unchecked")
private List<MeasurementBaseline> getBaselinesForResourcesAndDefinitionIds(Integer[] resourceIds,
Integer[] definitionIds) {
@@ -531,15 +523,13 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
if (save) {
entityManager.persist(baseline);
entityManager.merge(schedule);
-
- notifyAlertConditionCacheManager("calculateBaseline", baseline);
}
return baseline;
}
- public MeasurementBaseline calculateBaseline(int groupId, int definitionId, boolean userEntered, long startDate,
- long endDate, boolean save) throws DataNotAvailableException, BaselineCreationException {
+ private MeasurementBaseline calculateBaselineForGroup(int groupId, int definitionId, boolean userEntered,
+ long startDate, long endDate, boolean save) throws DataNotAvailableException, BaselineCreationException {
MeasurementAggregate agg = dataManager.getAggregate(subjectManager.getOverlord(), groupId, definitionId,
startDate, endDate);
@@ -583,8 +573,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
if (save) {
entityManager.persist(baseline);
entityManager.merge(schedule);
-
- notifyAlertConditionCacheManager("calculateBaseline", baseline);
}
}
@@ -592,12 +580,6 @@ public class MeasurementBaselineManagerBean implements MeasurementBaselineManage
return baseline;
}
- private void notifyAlertConditionCacheManager(String callingMethod, MeasurementBaseline baseline) {
- agentStatusManager.updateByMeasurementBaseline(baseline.getId());
-
- log.debug("Invoking... " + callingMethod);
- }
-
@SuppressWarnings("unchecked")
public List<MeasurementBaseline> findBaselinesForResource(Subject subject, int resourceId) {
if (authorizationManager.canViewResource(subject, resourceId) == false) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
index 88d8e94..7f7655a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementBaselineManagerLocal.java
@@ -92,9 +92,17 @@ public interface MeasurementBaselineManagerLocal {
MeasurementBaseline calculateAutoBaseline(Subject subject, Integer measurementScheduleId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+ // internal use only for transactioning reasons
+ MeasurementBaseline calculateAutoBaselineInNewTransaction(Subject subject, Integer measurementScheduleId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+
MeasurementBaseline calculateAutoBaseline(Subject subject, int groupId, int definitionId, long startDate,
long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+ // internal use only for transactioning reasons
+ MeasurementBaseline calculateAutoBaselineForGroupInNewTransaction(Subject subject, int groupId, int definitionId,
+ long startDate, long endDate, boolean save) throws BaselineCreationException, MeasurementNotFoundException;
+
/**
* Unset the {@link MeasurementBaseline#setUserEntered(boolean) user-entered} property in baselines so that we can
* do autobaselines on it again.
@@ -105,19 +113,6 @@ public interface MeasurementBaselineManagerLocal {
*/
void enableAutoBaselineCalculation(Subject subject, Integer[] resourceIds, Integer[] definitionIds);
- /**
- * Returns the baseline for a measurement identified by its measurement definition and the resource whose
- * measurement it is.
- *
- * @param subject
- * @param resource
- * @param measurementDefinitionId
- *
- * @return baseline of the resource's measurement with the given definition
- */
- MeasurementBaseline findBaselineForResourceAndMeasurementDefinition(Subject subject, Integer resource,
- Integer measurementDefinitionId);
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// The following are shared with the Remote Interface
commit 85e65e6a60f04e58e33d1cd32ebaee32a9610b7b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Jul 27 15:17:52 2011 -0400
context menu on change set node
multiple select tree nodes
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 6085af1..8203361 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -47,7 +47,6 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -67,7 +66,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// fetch the top nodes at the inital onDraw()
setAutoFetchData(true);
setAnimateFolders(false);
- setSelectionType(SelectionStyle.SINGLE);
+ setSelectionType(SelectionStyle.MULTIPLE);
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
@@ -96,9 +95,10 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
TreeNode eventNode = event.getNode();
if (eventNode instanceof ChangeSetTreeNode) {
- CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ Menu menu = buildChangeSetTreeNodeContextMenu((ChangeSetTreeNode) eventNode);
+ menu.showContextMenu();
} else if (eventNode instanceof DriftTreeNode) {
- Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ Menu menu = buildDriftTreeNodeContextMenu((DriftTreeNode) eventNode);
menu.showContextMenu();
}
}
@@ -171,12 +171,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @param node the drift node whose menu is to be displayed
* @return the context menu to display
*/
- protected Menu buildContextMenu(final DriftTreeNode node) {
+ protected Menu buildDriftTreeNodeContextMenu(final DriftTreeNode node) {
Menu contextMenu = new Menu();
// title
- String titleName = node.getName();
+ String titleName = node.getTitle();
if (titleName.length() > 50) {
// make sure the title isn't really long so the menu is not abnormally wide
titleName = "..." + titleName.substring(titleName.length() - 50);
@@ -204,6 +204,36 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
}
/**
+ * Builds the right-mouse-click context menu for the given change set node
+ * @param node the change set node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildChangeSetTreeNodeContextMenu(final ChangeSetTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getTitle();
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem deleteItem = new MenuItem(MSG.common_button_delete());
+ deleteItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ // TODO: delete the change set
+ }
+ });
+ contextMenu.addItem(deleteItem);
+
+ return contextMenu;
+ }
+
+ /**
* We override this because we know all of our nodes will have titles. Without this,
* I could not get the title of change set nodes to show - it always fell back to using
* the name. This way is at least faster, since we don't do any conditional checking,
commit 19cf0266ba2d7b78c07c584512c1b0bb7813f3a7
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Jul 27 14:50:44 2011 -0400
Making the active drift server plugin configurable via system settings
When a drift serer plugin is loaded or unloaded, it is added to or
removed from the systems settings. When the DriftServerBean (SLSB
layers) asks for the drift plugin, the DriftServerPlugin queries the
system settings to find the active drift server plugin. The drift-rhq
plugin is active by default.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 39f0798..e2a599d 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.111</db.schema.version>
+ <db.schema.version>2.112</db.schema.version>
</properties>
<dependencies>
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
index 121e971..6d0e80a 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup/sysconfig-data.xml
@@ -125,6 +125,12 @@
<data ID="56" PROPERTY_KEY="RESOURCE_GENERIC_PROPERTIES_UPGRADE" PROPERTY_VALUE="false"
DEFAULT_PROPERTY_VALUE="false" FREAD_ONLY="FALSE"/>
+ <!-- default drift server plugin settings -->
+ <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
+ DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]" FREAD_ONLY="FALSE"/>
+ <data ID="58" PROPERTY_KEY="DRIFT_PLUGINS" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="[drift-rhq$$Drift:RHQ]"
+ FREAD_ONLY="FALSE"/>
+
</table>
</dbsetup>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 7e38d96..2b1097d 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3586,6 +3586,22 @@
</schema-directSQL>
</schemaSpec>
+ <schemaSpec version="2.112">
+ <schema-directSQL>
+ <statement desc="Adding drift server plugin active plugin system configuration property">
+ INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
+ VALUES (57, 'ACTIVE_DRIFT_PLUGIN', '[drift-rhq$$Drift:RHQ]', '[drift-rhq$$Drift:RHQ]')
+ </statement>
+ </schema-directSQL>
+
+ <schema-directSQL>
+ <statement desc="Adding drift server plugin plugins system configuration property">
+ INSERT INTO rhq_system_config (id, property_key, property_value, default_property_value)
+ VALUES (58, 'DRIFT_PLUGINS', '', '[drift-rhq$$Drift:RHQ]')
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
</dbupgrade>
</target>
</project>
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
index 5e83850..ac861b0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/SystemSettingsView.java
@@ -19,8 +19,10 @@
package org.rhq.enterprise.gui.coregui.client.admin;
+import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -38,6 +40,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionEnumeration;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.domain.configuration.definition.PropertyGroupDefinition;
import org.rhq.core.domain.configuration.definition.PropertySimpleType;
@@ -99,6 +102,9 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
String LDAPBaseDN = "CAM_LDAP_BASE_DN";
String LDAPBindDN = "CAM_LDAP_BIND_DN";
String LDAPBindPW = "CAM_LDAP_BIND_PW";
+
+ String ACTIVE_DRIFT_PLUGIN = "ACTIVE_DRIFT_PLUGIN";
+ String DRIFT_PLUGINS = "DRIFT_PLUGINS";
}
public SystemSettingsView(String locatorId) {
@@ -128,6 +134,7 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
canvas.addMember(getServerDetails());
Configuration config = new Configuration();
+ String[] driftPlugins = null;
for (Map.Entry<String, String> entry : result.entrySet()) {
String name = entry.getKey();
String value = (entry.getValue() == null) ? "" : entry.getValue();
@@ -166,6 +173,9 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
if (value.trim().length() == 0) {
value = "true";
}
+ } else if (Constant.DRIFT_PLUGINS.equals(name)) {
+ driftPlugins = value.split(",");
+ continue;
}
PropertySimple prop = new PropertySimple(name, value);
@@ -173,8 +183,8 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
}
// build our config definition and populate our config editor
- editor = new ConfigurationEditor(extendLocatorId("configEditor"), getSystemSettingsDefinition(config),
- config);
+ editor = new ConfigurationEditor(extendLocatorId("configEditor"), getSystemSettingsDefinition(config,
+ driftPlugins), config);
editor.addPropertyValueChangeListener(SystemSettingsView.this);
canvas.addMember(editor);
@@ -305,7 +315,7 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
*
* @return system settings config def
*/
- private ConfigurationDefinition getSystemSettingsDefinition(Configuration config) {
+ private ConfigurationDefinition getSystemSettingsDefinition(Configuration config, String[] driftPlugins) {
ConfigurationDefinition def = new ConfigurationDefinition("sysset", MSG.view_adminConfig_systemSettings());
///////////////////////////////////
@@ -519,6 +529,31 @@ public class SystemSettingsView extends LocatableVLayout implements PropertyValu
ldapBindPW.setDefaultValue("");
def.put(ldapBindPW);
+ ///////////////////////////////////////////
+ // Drift Server Configuration Properties //
+ ///////////////////////////////////////////
+ PropertyGroupDefinition driftGroup = new PropertyGroupDefinition("drift server");
+ driftGroup.setDisplayName("Drift Server Configuration Settings");
+ driftGroup.setOrder(4);
+ driftGroup.setDefaultHidden(false);
+
+ PropertyDefinitionSimple activeDriftServer = new PropertyDefinitionSimple("ACTIVE_DRIFT_PLUGIN",
+ "The drift server plugin that manages the persistence of drift-related entities and content", true,
+ PropertySimpleType.STRING);
+ activeDriftServer.setDisplayName("Active Drift Server Plugin");
+ activeDriftServer.setPropertyGroupDefinition(driftGroup);
+
+ List<PropertyDefinitionEnumeration> options = new ArrayList<PropertyDefinitionEnumeration>();
+ for (String plugin : driftPlugins) {
+ // plugin is of the form, [plugin_name$$plugin_display_name]]
+ String pluginName = plugin.substring(1, plugin.indexOf("$$"));
+ String pluginDisplayName = plugin.substring(pluginName.length() + 3, plugin.indexOf("]"));
+ options.add(new PropertyDefinitionEnumeration(pluginDisplayName, plugin));
+ }
+ activeDriftServer.setEnumeratedValues(options, false);
+
+ def.put(activeDriftServer);
+
//
// if the config is missing any properties for which we have defaults, set them to their defaults
//
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
index e992271..63037c1 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/RHQConstants.java
@@ -49,6 +49,10 @@ public class RHQConstants {
public static final String LDAPBindDN = "CAM_LDAP_BIND_DN";
public static final String LDAPBindPW = "CAM_LDAP_BIND_PW";
+ // DRIFT Server properties
+ public static final String ACTIVE_DRIFT_PLUGIN = "ACTIVE_DRIFT_PLUGIN";
+ public static final String DRIFT_PLUGINS = "DRIFT_PLUGINS";
+
// Base URL for the application - (i think this is only used for alert emails)
public static final String BaseURL = "CAM_BASE_URL";
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
index 8e00b0c..9e405ec 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginManager.java
@@ -18,11 +18,23 @@
*/
package org.rhq.enterprise.server.plugin.pc.drift;
+import java.util.List;
+import java.util.Properties;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
+import org.rhq.enterprise.server.system.SystemManagerLocal;
+import org.rhq.enterprise.server.util.LookupUtil;
+import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginDescriptorType;
+
+import static org.rhq.core.domain.util.StringUtils.getListAsString;
+import static org.rhq.core.domain.util.StringUtils.getStringAsList;
+import static org.rhq.enterprise.server.RHQConstants.ACTIVE_DRIFT_PLUGIN;
+import static org.rhq.enterprise.server.RHQConstants.DRIFT_PLUGINS;
/**
* This loads in all drift server plugins that can be found. You can obtain a loaded plugin's
@@ -32,6 +44,7 @@ import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
* @author John Sanda
*/
public class DriftServerPluginManager extends ServerPluginManager {
+
private final Log log = LogFactory.getLog(this.getClass());
public DriftServerPluginManager(DriftServerPluginContainer pc) {
@@ -39,7 +52,76 @@ public class DriftServerPluginManager extends ServerPluginManager {
}
public DriftServerPluginFacet getDriftServerPluginComponent() {
- // TODO The name of the drift server plugin probably will need to be obtained from the system config
- return (DriftServerPluginFacet) getServerPluginComponent("drift-rhq");
+ Properties sysConfig = getSysConfig();
+ String value = sysConfig.getProperty(ACTIVE_DRIFT_PLUGIN);
+
+ if (value == null) {
+ throw new RuntimeException(ACTIVE_DRIFT_PLUGIN + " system configuration property is not set.");
+ }
+
+ return (DriftServerPluginFacet) getServerPluginComponent(value.substring(1, value.indexOf("$$")));
+ }
+
+ @Override
+ protected void loadPlugin(ServerPluginEnvironment env, boolean enabled) throws Exception {
+ super.loadPlugin(env, enabled);
+
+ String pluginName = env.getPluginKey().getPluginName();
+ List<String> plugins = getDriftPlugins();
+
+ int index = findPluginIndex(plugins, pluginName);
+ if (index == -1) {
+ plugins.add("[" + pluginName + "$$" + env.getPluginDescriptor().getDisplayName() + "]");
+ saveDriftPlugins(plugins);
+ }
+
+ }
+
+ @Override
+ protected void unloadPlugin(String pluginName) throws Exception {
+ super.unloadPlugin(pluginName);
+
+ List<String> plugins = getDriftPlugins();
+ int index = findPluginIndex(plugins, pluginName);
+
+ if (index != -1) {
+ plugins.remove(index);
+ saveDriftPlugins(plugins);
+ }
+ }
+
+ private List<String> getDriftPlugins() {
+ Properties sysConfig = getSysConfig();
+ return getStringAsList(sysConfig.getProperty(DRIFT_PLUGINS, ""), ",", true);
}
+
+ private void saveDriftPlugins(List<String> plugins) throws Exception {
+ SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
+ SystemManagerLocal systemMgr = LookupUtil.getSystemManager();
+
+ Properties sysConfig = systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
+ sysConfig.put(DRIFT_PLUGINS, getListAsString(plugins, ","));
+ systemMgr.setSystemConfiguration(subjectMgr.getOverlord(), sysConfig, false);
+ }
+
+ private Properties getSysConfig() {
+ SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
+ SystemManagerLocal systemMgr = LookupUtil.getSystemManager();
+
+ return systemMgr.getSystemConfiguration(subjectMgr.getOverlord());
+ }
+
+ private int findPluginIndex(List<String> plugins, String name) {
+ int i = 0;
+ for (String value : plugins) {
+ // value is of the form, [plugin_name$$plugin_display_name]
+ if (name.equals(value.substring(1, value.indexOf("$$")))) {
+ return i;
+ }
+ ++i;
+ }
+ return -1;
+ }
+
+
}
\ No newline at end of file
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
index 349b84c..b385473 100644
--- a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -143,7 +143,7 @@ public class JPAUtils {
em.createNativeQuery("delete from rhq_measurement_sched");
em.createNativeQuery("delete from rhq_measurement_def");
em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56, 57, 58)");
em.createNativeQuery("delete from rhq_alert_notification");
em.createNativeQuery("delete from rhq_alert_condition_log");
em.createNativeQuery("delete from rhq_alert");
commit d064e0516c87a1aa44d1f9f2231907279e9582dd
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 21:22:19 2011 -0400
Persist drift detection schedule across agent restarts
This commit add functionality for persisting drift detection schedules
across restarts. When the agent is shutting down and the inventory is
persisted to disk, the schedules are now written out to disk along with
the rest of the inventory.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
index fe42744..ab5bac3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
@@ -1,8 +1,12 @@
package org.rhq.core.pc.drift;
+import java.io.Serializable;
+
import org.rhq.core.domain.drift.DriftConfiguration;
-public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule> {
+public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule>, Serializable {
+
+ private static final long serialVersionUID = 1L;
private int resourceId;
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index f499697..879ceca 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -67,11 +67,36 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
driftDetector.setChangeSetManager(changeSetMgr);
driftDetector.setDriftClient(this);
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ initSchedules(inventoryMgr.getPlatform(), inventoryMgr);
+
driftThreadPool = new ScheduledThreadPoolExecutor(5);
// TODO Make the drift detection rate configurable
driftThreadPool.scheduleAtFixedRate(driftDetector, 30, 60, TimeUnit.SECONDS);
}
+ private void initSchedules(Resource r, InventoryManager inventoryMgr) {
+ if (r.getId() == 0) {
+ log.debug("Will not reschedule drift detection schedules for " + r + ". It is not sync'ed yet.");
+ return;
+ }
+
+ ResourceContainer container = inventoryMgr.getResourceContainer(r.getId());
+ if (container == null) {
+ log.debug("No resource container found for " + r + ". Unable to reschedule drift detection schedules.");
+ return;
+ }
+
+ log.debug("Rescheduling drift detection schedules for " + r);
+ for (DriftDetectionSchedule schedule : container.getDriftSchedules()) {
+ schedulesQueue.addSchedule(schedule);
+ }
+
+ for (Resource child : r.getChildResources()) {
+ initSchedules(child, inventoryMgr);
+ }
+ }
+
@Override
public void shutdown() {
driftThreadPool.shutdown();
@@ -164,8 +189,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
- return false;
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
+ return schedule;
}
@Override
@@ -208,9 +233,16 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
- if (!updated) {
- schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
+ if (updatedSchedule == null) {
+ updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
+ schedulesQueue.addSchedule(updatedSchedule);
+ }
+
+ InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
+ ResourceContainer container = inventoryMgr.getResourceContainer(resourceId);
+ if (container != null) {
+ container.getDriftSchedules().add(updatedSchedule);
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index ca7edc5..374e27e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -38,7 +38,7 @@ public interface ScheduleQueue {
* Adds a schedule to the queue for processing by the drift detector
*
* @param schedule A {@link DriftDetectionSchedule} object
- * @return true if the schedule is added, falsed otherwise
+ * @return true if the schedule is added, false otherwise
*/
boolean addSchedule(DriftDetectionSchedule schedule);
@@ -52,9 +52,9 @@ public interface ScheduleQueue {
*
* @param resourceId The resource id
* @param config A {@link DriftConfiguration} belonging the resource with the specified id
- * @return true if the schedule is updated, false otherwise.
+ * @return A copy of the updated schedule or null if no update was performed
*/
- boolean update(int resourceId, DriftConfiguration config);
+ DriftDetectionSchedule update(int resourceId, DriftConfiguration config);
/**
* Removes the schedule identified by the resource id and the drift configuration. More
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 499ad91..b4a2f00 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -112,20 +112,26 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
- public boolean update(int resourceId, DriftConfiguration config) {
+ public DriftDetectionSchedule update(int resourceId, DriftConfiguration config) {
try {
lock.writeLock().lock();
if (isActiveSchedule(resourceId, config)) {
update(activeSchedule, config);
- } else {
- DriftDetectionSchedule schedule = remove(resourceId, config);
- if (schedule == null) {
- return false;
- }
- update(schedule, config);
- queue.offer(schedule);
+ return activeSchedule.copy();
+ }
+
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return null;
}
- return true;
+
+ update(schedule, config);
+
+ if (queue.offer(schedule)) {
+ return schedule.copy();
+ }
+
+ return null;
} finally {
lock.writeLock().unlock();
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
index ab8d30e..fcf1aea 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/ResourceContainer.java
@@ -52,6 +52,7 @@ import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.drift.DriftDetectionSchedule;
import org.rhq.core.pc.util.FacetLockType;
import org.rhq.core.pc.util.LoggingThreadFactory;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
@@ -88,6 +89,7 @@ public class ResourceContainer implements Serializable {
private SynchronizationState synchronizationState = SynchronizationState.NEW;
private Set<MeasurementScheduleRequest> measurementSchedule = new HashSet<MeasurementScheduleRequest>();
private Set<ResourcePackageDetails> installedPackages = new HashSet<ResourcePackageDetails>();
+ private Set<DriftDetectionSchedule> driftSchedules = new HashSet<DriftDetectionSchedule>();
// transient fields
private transient ResourceComponent resourceComponent;
@@ -242,6 +244,16 @@ public class ResourceContainer implements Serializable {
}
}
+ public Set<DriftDetectionSchedule> getDriftSchedules() {
+ synchronized (this) {
+ return driftSchedules;
+ }
+ }
+
+ public void setDriftSchedules(Set<DriftDetectionSchedule> schedules) {
+ driftSchedules = schedules;
+ }
+
public ResourceComponentState getResourceComponentState() {
synchronized (this) {
return this.resourceComponentState;
commit d6e42c6a12a2a630a37fd3151fadb64848c24a30
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 18:31:39 2011 -0400
tweek folder icons for drift
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
index fdda214..e728bc8 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
index 358cf61..1ca204f 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit 5024b757bdcf0b842d4c49fe58ca45890450e670
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 16:14:26 2011 -0400
Adding support for updating drift configs
When the server sends a request to the agent to update a drift
configuration, that config is attached to a schedule which is in one of
two places. It is either on the schedule queue or it is "active"
schedule currently being processed by the drift detector. The config
update will be applied such that the next time the drift detector
processes the schedule the update will take effect.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
index a767b99..fe42744 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetectionSchedule.java
@@ -32,6 +32,13 @@ public class DriftDetectionSchedule implements Comparable<DriftDetectionSchedule
nextScan = System.currentTimeMillis() + (driftConfig.getInterval() * 1000);
}
+ public DriftDetectionSchedule copy() {
+ DriftDetectionSchedule copy = new DriftDetectionSchedule(resourceId,
+ new DriftConfiguration(driftConfig.getConfiguration().deepCopyWithoutProxies()));
+ copy.nextScan = nextScan;
+ return copy;
+ }
+
@Override
public int compareTo(DriftDetectionSchedule other) {
if (this.nextScan < other.nextScan) {
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index b92dd7c..153e5a9 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -47,52 +47,44 @@ public class DriftDetector implements Runnable {
@Override
public void run() {
- DriftDetectionSchedule schedule = scheduleQueue.dequeue();
+ DriftDetectionSchedule schedule = scheduleQueue.getNextSchedule();
if (schedule == null) {
return;
}
- if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- if (!schedule.getDriftConfiguration().getEnabled()) {
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
- // TODO should we grab the schedule from the queue?
- // Maybe we should continue pulling schedules off the queue until
- // we find one that is ready to be processed.
- return;
- }
-
- DriftConfiguration driftConfig = schedule.getDriftConfiguration();
- int resourceId = schedule.getResourceId();
- DriftChangeSetCategory changeSetType = null;
- int changes = 0;
-
try {
- if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
- basedir(resourceId, driftConfig), COVERAGE))) {
- changeSetType = DRIFT;
- changes = generateDriftChangeSet(schedule);
- } else {
- changeSetType = COVERAGE;
- generateCoverageChangeSet(schedule);
+ if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
+ return;
}
- } catch (IOException e) {
- // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
- log.error("An error occurred while scanning for drift", e);
- }
- schedule.updateShedule();
- scheduleQueue.enqueue(schedule);
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ return;
+ }
- if (changeSetType == COVERAGE || changes > 0) {
- driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ DriftConfiguration driftConfig = schedule.getDriftConfiguration();
+ int resourceId = schedule.getResourceId();
+ DriftChangeSetCategory changeSetType = null;
+ int changes = 0;
+
+ try {
+ if (changeSetMgr.changeSetExists(schedule.getResourceId(), new Headers(driftConfig.getName(),
+ basedir(resourceId, driftConfig), COVERAGE))) {
+ changeSetType = DRIFT;
+ changes = generateDriftChangeSet(schedule);
+ } else {
+ changeSetType = COVERAGE;
+ generateCoverageChangeSet(schedule);
+ }
+ } catch (IOException e) {
+ // TODO Call ChangeSetManager here to rollback any thing that was written to disk.
+ log.error("An error occurred while scanning for drift", e);
+ }
+
+ if (changeSetType == COVERAGE || changes > 0) {
+ driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
+ }
+ } finally {
+ scheduleQueue.deactivateSchedule();
}
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index b688154..f499697 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -141,14 +141,14 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
DriftDetectionSchedule schedule;
@Override
- public DriftDetectionSchedule dequeue() {
+ public DriftDetectionSchedule getNextSchedule() {
DriftDetectionSchedule removedSchedule = schedule;
schedule = null;
return removedSchedule;
}
@Override
- public boolean enqueue(DriftDetectionSchedule schedule) {
+ public boolean addSchedule(DriftDetectionSchedule schedule) {
this.schedule = schedule;
return true;
}
@@ -157,8 +157,23 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
public void clear() {
schedule = null;
}
+
+ @Override
+ public void deactivateSchedule() {
+ schedule = null;
+ }
+
+ @Override
+ public boolean update(int resourceId, DriftConfiguration config) {
+ return false;
+ }
+
+ @Override
+ public DriftDetectionSchedule remove(int resourceId, DriftConfiguration config) {
+ return null;
+ }
};
- queue.enqueue(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ queue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
DriftDetector driftDetector = new DriftDetector();
driftDetector.setChangeSetManager(changeSetMgr);
@@ -170,7 +185,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void scheduleDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- schedulesQueue.enqueue(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
}
@Override
@@ -193,6 +208,10 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
+ boolean updated = schedulesQueue.update(resourceId, driftConfiguration);
+ if (!updated) {
+ schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ }
}
/**
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index 09b0aa5..ca7edc5 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -1,11 +1,79 @@
package org.rhq.core.pc.drift;
+import org.rhq.core.domain.drift.DriftConfiguration;
+
+/**
+ * Manages the drift detection schedules that are processed by the drift detector. The
+ * queue has a concept of the currently "active" schedule. This is identified simply as
+ * the schedule returned from {@link #getNextSchedule()} which is the previous head of the
+ * queue. A reference to the active schedule needs to be maintained because at any point in
+ * time the server can send a request to update the drift configuration that is attached to
+ * a schedule. That schedule will either be on the queue waiting to be processed or in the
+ * "active" state meaning it is currently being processed by the drift detector.
+ */
public interface ScheduleQueue {
- DriftDetectionSchedule dequeue();
+ /**
+ * Removes the head of the queue and returns a copy of the schedule that was removed.
+ * That schedule is also marked as the active schedule.
+ *
+ * @return A copy of the schedule that is removed from the head of the queue.
+ *
+ * @see DriftDetectionSchedule
+ *
+ * @throws IllegalStateException if there is already an active schedule. The active
+ * schedule must be deactivated before getting the next schedule.
+ */
+ DriftDetectionSchedule getNextSchedule();
+
+ /**
+ * This method does two things. First it updates the active schedule's nextScan
+ * property. Then it adds the schedule back onto the queue, allowing the next schedule
+ * at the head of the queue to become active. If there is no active schedule this
+ * method simply does nothing and returns.
+ */
+ void deactivateSchedule();
+
+ /**
+ * Adds a schedule to the queue for processing by the drift detector
+ *
+ * @param schedule A {@link DriftDetectionSchedule} object
+ * @return true if the schedule is added, falsed otherwise
+ */
+ boolean addSchedule(DriftDetectionSchedule schedule);
+
+ /**
+ * This method attempts to update the schedule identified by the resource id the and
+ * the drift configuration. More specifically, the schedule is identified by a
+ * combination of resource id and drift configuraiton name. If the schedule to be
+ * updated is the active schedule, it is immediately updated and then placed back on
+ * the queue the next time {@link #deactivateSchedule()} is called. If the schedule
+ * is on the queue, it is removed, updated, and then added back onto the queue.
+ *
+ * @param resourceId The resource id
+ * @param config A {@link DriftConfiguration} belonging the resource with the specified id
+ * @return true if the schedule is updated, false otherwise.
+ */
+ boolean update(int resourceId, DriftConfiguration config);
- boolean enqueue(DriftDetectionSchedule schedule);
+ /**
+ * Removes the schedule identified by the resource id and the drift configuration. More
+ * specifically, the schedule is identified by a combination of resource id drift
+ * configuration name. This method can remove either the active schedule or a schedule
+ * on the queue.
+ *
+ * @param resourceId The resource id
+ *
+ * @param config A {@link DriftConfiguration} belonging the resource with the specified id
+ *
+ * @return The {@link DriftDetectionSchedule} that is removed or null if no matching
+ * schedule is found.
+ */
+ DriftDetectionSchedule remove(int resourceId, DriftConfiguration config);
+ /**
+ * Removes all elements from the queue and deactivates the active schedule.
+ */
void clear();
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 7934c2d..499ad91 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -3,24 +3,54 @@ package org.rhq.core.pc.drift;
import java.util.PriorityQueue;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import org.rhq.core.domain.drift.DriftConfiguration;
+
public class ScheduleQueueImpl implements ScheduleQueue {
private PriorityQueue<DriftDetectionSchedule> queue = new PriorityQueue<DriftDetectionSchedule>();
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+ private DriftDetectionSchedule activeSchedule;
+
@Override
- public DriftDetectionSchedule dequeue() {
+ public DriftDetectionSchedule getNextSchedule() {
try {
lock.writeLock().lock();
- return queue.poll();
+ if (activeSchedule != null) {
+ throw new IllegalStateException("There is already an active schedule that must be deactivated " +
+ "before getting the next schedule.");
+ }
+ activeSchedule = queue.poll();
+ return activeSchedule == null ? null : activeSchedule.copy();
} finally {
lock.writeLock().unlock();
}
}
+ private boolean isActiveSchedule(int resourceId, DriftConfiguration config) {
+ return activeSchedule != null && activeSchedule.getResourceId() == resourceId &&
+ activeSchedule.getDriftConfiguration().getName().equals(config.getName());
+
+ }
+
@Override
- public boolean enqueue(DriftDetectionSchedule schedule) {
+ public void deactivateSchedule() {
+ try {
+ lock.writeLock().lock();
+ if (activeSchedule == null) {
+ return;
+ }
+ activeSchedule.updateShedule();
+ queue.offer(activeSchedule);
+ activeSchedule = null;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ @Override
+ public boolean addSchedule(DriftDetectionSchedule schedule) {
boolean inserted = false;
try {
lock.writeLock().lock();
@@ -32,9 +62,85 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
+ public DriftDetectionSchedule remove(int resourceId, DriftConfiguration config) {
+ DriftDetectionSchedule scheduleToRemove = null;
+ try {
+ lock.readLock().lock();
+ if (isActiveSchedule(resourceId, config)) {
+ // The schedule to be removed is the currently active schedule so "upgrade"
+ // to the write lock and return the schedule while removing it from the queue
+ // at the same time.
+ try {
+ lock.writeLock().lock();
+ DriftDetectionSchedule removedSchedule = activeSchedule;
+ activeSchedule = null;
+ return removedSchedule;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ for (DriftDetectionSchedule s : queue) {
+ if (s.getResourceId() == resourceId &&
+ s.getDriftConfiguration().getName().equals(config.getName())) {
+ scheduleToRemove = s;
+ break;
+ }
+ }
+
+ // The schedule was not found in the queue so we can simply return null without
+ // any additional processing.
+ if (scheduleToRemove == null) {
+ return null;
+ }
+
+ boolean removed = false;
+ // At this point, we found the target schedule in the queue. We "upgrade" to
+ // the write lock and remove it from the queue. If the schedule was successfully
+ // removed we return it; otherwise, return null.
+ try {
+ lock.writeLock().lock();
+ removed = queue.remove(scheduleToRemove);
+ } finally {
+ lock.writeLock().unlock();
+ }
+
+ return removed ? scheduleToRemove : null;
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ @Override
+ public boolean update(int resourceId, DriftConfiguration config) {
+ try {
+ lock.writeLock().lock();
+ if (isActiveSchedule(resourceId, config)) {
+ update(activeSchedule, config);
+ } else {
+ DriftDetectionSchedule schedule = remove(resourceId, config);
+ if (schedule == null) {
+ return false;
+ }
+ update(schedule, config);
+ queue.offer(schedule);
+ }
+ return true;
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
+ private void update(DriftDetectionSchedule schedule, DriftConfiguration config) {
+ schedule.getDriftConfiguration().setEnabled(config.getEnabled());
+ schedule.getDriftConfiguration().setInterval(config.getInterval());
+ }
+
+ @Override
public void clear() {
try {
lock.writeLock().lock();
+ activeSchedule = null;
queue.clear();
} finally {
lock.writeLock().unlock();
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 9b62422..49dab54 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -58,7 +58,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("coverage-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
File changeSet = changeSet(driftConfig.getName(), COVERAGE);
@@ -77,12 +77,12 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration driftConfig = driftConfiguration("basedir-entry-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), driftConfig));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), driftConfig));
detector.run();
DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId(), driftConfig);
- scheduleQueue.enqueue(schedule);
+ scheduleQueue.addSchedule(schedule);
detector.run();
assertChangeSetContainsDirEntry(changeSet(driftConfig.getName(), COVERAGE),
@@ -102,7 +102,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("multiple-files-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -127,7 +127,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("sibling-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -153,7 +153,7 @@ public class DriftDetectorTest extends DriftTest {
DriftConfiguration config = driftConfiguration("nested-dirs-test", resourceDir.getAbsolutePath());
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File changeSet = changeSet(config.getName(), COVERAGE);
@@ -188,7 +188,7 @@ public class DriftDetectorTest extends DriftTest {
File server1Conf = new File(confDir, "server-1.conf");
touch(server1Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
}
@@ -217,7 +217,7 @@ public class DriftDetectorTest extends DriftTest {
File server2Conf = new File(confDir, "server-2.conf");
touch(server2Conf);
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
@@ -266,7 +266,7 @@ public class DriftDetectorTest extends DriftTest {
// create some drift
server2Conf.delete();
- scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ scheduleQueue.addSchedule(new DriftDetectionSchedule(resourceId(), config));
detector.run();
File driftChangeSet = changeSet(config.getName(), DRIFT);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 276c8b9..9de0966 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -145,7 +145,7 @@ public class DriftServerBean implements DriftServerLocal {
AgentClient agentClient = agentMgr.getAgentClient(subjectMgr.getOverlord(), resourceId);
DriftAgentService service = agentClient.getDriftAgentService();
try {
- service.scheduleDriftDetection(resourceId, driftConfig);
+ service.updateDriftDetection(resourceId, driftConfig);
} catch (Exception e) {
log.warn(" Unable to inform agent of unscheduled drift detection [" + driftConfig + "]", e);
}
commit f0ae8b1ff4a879e22116df404f51a526d0ca7583
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 16:05:42 2011 -0400
add sort direction
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 2d7205d..6085af1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -26,6 +26,7 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
@@ -70,6 +71,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setShowRollOver(false);
setShowHeader(false);
setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
+ setSortDirection(SortDirection.DESCENDING);
}
@Override
commit 061059a61f26ba172a6c5c0df837e8850ab1bf39
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 15:58:32 2011 -0400
sort the tree and provide a refresh button
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 7778084..2d7205d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -24,7 +24,9 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
+import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
import com.smartgwt.client.widgets.menu.Menu;
@@ -67,6 +69,7 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
+ setSortField(AbstractDriftChangeSetsTreeDataSource.ATTR_NAME);
}
@Override
@@ -198,6 +201,17 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
return contextMenu;
}
+ /**
+ * We override this because we know all of our nodes will have titles. Without this,
+ * I could not get the title of change set nodes to show - it always fell back to using
+ * the name. This way is at least faster, since we don't do any conditional checking,
+ * we always immediately use the getTitle results.
+ */
+ @Override
+ protected String getNodeTitle(Record node, int recordNum, ListGridField field) {
+ return ((TreeNode) node).getTitle();
+ }
+
@SuppressWarnings("unchecked")
static class ChangeSetTreeNode extends TreeNode {
public ChangeSetTreeNode(DriftChangeSet changeset) {
@@ -205,7 +219,8 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setIcon("subsystems/drift/ChangeSet_16.png");
setShowOpenIcon(true);
setID(changeset.getId());
- setName(buildDriftChangeSetNodeName(changeset));
+ setName(padWithZeroes(changeset.getVersion())); // we sort on this column, hence we make sure the version # is padded
+ setTitle(buildDriftChangeSetNodeName(changeset));
}
private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
@@ -219,6 +234,14 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
str.append(')');
return str.toString();
}
+
+ private String padWithZeroes(int numberToPad) {
+ String stringToPad = String.valueOf(numberToPad);
+ char[] zeroes = new char[10 - stringToPad.length()];
+ for (int i = 0; i < zeroes.length; i++)
+ zeroes[i] = '0';
+ return new String(zeroes) + stringToPad;
+ }
}
@SuppressWarnings("unchecked")
@@ -229,7 +252,12 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
String parentID = drift.getChangeSet().getId();
setParentID(parentID);
setID(parentID + '_' + drift.getId());
- setName(drift.getPath());
+ setName(drift.getPath()); // we sort on this column
+ }
+
+ @Override
+ public String getTitle() {
+ return super.getName();
}
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index 48f5bc8..56b4aa2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -19,7 +19,14 @@
*/
package org.rhq.enterprise.gui.coregui.client.drift;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.toolbar.ToolStrip;
+
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIButton;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableToolStrip;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
@@ -42,7 +49,23 @@ public class DriftChangeSetsView extends LocatableVLayout {
protected void onDraw() {
super.onDraw();
- addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ final ResourceDriftChangeSetsTreeView tree = new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"),
+ this.hasWriteAccess, this.context);
+ addMember(tree);
+
+ ToolStrip toolStrip = new LocatableToolStrip(extendLocatorId("toolstrip"));
+ toolStrip.setBackgroundImage(null);
+ toolStrip.setWidth100();
+ toolStrip.setMembersMargin(3);
+ toolStrip.setPadding(3);
+ IButton refreshButton = new LocatableIButton(extendLocatorId("refreshButton"), MSG.common_button_refresh());
+ refreshButton.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ tree.refresh();
+ }
+ });
+ toolStrip.addMember(refreshButton);
+ addMember(toolStrip);
}
public EntityContext getContext() {
commit c09f53eb056db2db67bbac77138806e3240aea3a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 26 13:34:42 2011 -0400
refactor so we can later put in group classes but still support indiv resources
fix query so we filter on resource ID for resource view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..50b4634
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeDataSource.java
@@ -0,0 +1,266 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceTextField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public abstract class AbstractDriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
+
+ public static final String ATTR_PARENT_ID = "parentId";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+
+ private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
+ private final boolean canManageDrift;
+
+ public AbstractDriftChangeSetsTreeDataSource(boolean canManageDrift) {
+ super();
+ this.canManageDrift = canManageDrift;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+
+ DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
+ idDataField.setPrimaryKey(true);
+ fields.add(idDataField);
+
+ DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
+ nameDataField.setCanEdit(false);
+ fields.add(nameDataField);
+
+ DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
+ parentIdField.setForeignKey(ATTR_ID);
+ fields.add(parentIdField);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
+
+ String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
+
+ if (parentId == null) {
+
+ // There is no parent - we are at the root of the tree.
+ // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
+ // We will lazily load drifts when the these changeset tree nodes are opened
+ DriftChangeSetCriteria criteria = getDriftChangeSetCriteria(request);
+
+ driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
+ public void onSuccess(PageList<DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ } else {
+ String changesetId = parentId;
+ DriftCriteria criteria = new DriftJPACriteria();
+ criteria.addFilterChangeSetId(changesetId);
+
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Drift> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
+
+ /*
+ * I am leaving this code commented for future reference. Because today the drit change set tree only
+ * shows simple changeset->drift tree, we don't need this. But if we need to have
+ * multiple types of child nodes, we'll need something like below to query
+ * for the different child node data. For example, we'd need this if we have a tree like:
+ * ChangeSet
+ * |____Resources
+ * | |____ My resource 1
+ * | |____ ...
+ * |_____Drifts
+ * |___ Drift #1
+ * |___ Drift #2
+ * |___ ...
+ * Today we only have Drifts child nodes, so we don't need to have that intermediate
+ * "Drifts" node. If we later want to introduce different node types (like Resources)
+ * we need additional code like below.
+ *
+
+ // we are at an inner node, being asked to get the children of it
+ if (p.endsWith("_drifts")) {
+ // ...load drift items like above in the real code...
+ } else if (p.endsWith("_resources")) {
+ // ...load resource items and put those nodes in the tree...
+ } else {
+ // This is an unknown type of node, so just log an error.
+ // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
+ // we'll add more if-else statements above to process those different nodes.
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
+ }
+
+ *
+ */
+ }
+
+ return;
+ }
+
+ /**
+ * Returns a criteria that will be used to obtain the root nodes for the tree - that is,
+ * the top level change set entries.
+ *
+ * Subclasses can override this method, or modify the returned criteria to further
+ * filter the change sets that are to be returned.
+ *
+ * @param request the request being made of the tree
+ *
+ * @return the criteria to use when querying for change setss
+ */
+ protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addSortVersion(PageOrdering.DESC);
+ criteria.setPageControl(getPageControl(request));
+ return criteria;
+ }
+
+ @Override
+ protected BaseCriteria getFetchCriteria(DSRequest request) {
+ // our executeFetch will determine on its own what criteria to use based on what is to be fetched
+ // thus we don't return anything here and let the executeFetch do everything
+ return null;
+ }
+
+ @Override
+ public Object copyValues(Record from) {
+ return null; // don't need this method.
+ }
+
+ @Override
+ public ListGridRecord[] buildRecords(Collection dataObjects) {
+ return buildRecordsForKnownChangeSets(dataObjects, null);
+ }
+
+ public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
+ if (dataObjects == null) {
+ return null;
+ }
+
+ final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
+
+ for (Object item : dataObjects) {
+
+ // the resultant item is a direct node to build
+ records.add(copyValues(item));
+
+ // now build the children of the node
+ /*
+ * We do not have the need for building any intermeidate nodes today.
+ * There is nothing to do, but if in the future we have differnet node types,
+ * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
+ * for an example of where this is already done. Commenting this out just as an
+ * example of how this can be done.
+
+ if (item instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) item;
+
+ // each bundle has two direct children - the versions and destinations folders
+ TreeNode versionNode = new TreeNode(MSG.view_drift());
+ versionNode.setID(changeset.getId() + "_drifts");
+ versionNode.setParentID(changeset.getId());
+ versionNode.setName(MSG.view_drift());
+ versionNode.setAttribute("name", MSG.view_drift());
+ records.add(versionNode);
+ } else if (item instanceof Drift) {
+ if (canManageDrift) {
+ records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
+ }
+ }
+
+ *
+ */
+ }
+
+ return records.toArray(new ListGridRecord[records.size()]);
+ }
+
+ @Override
+ public ListGridRecord copyValues(Object from) {
+ return copyValuesForKnownDriftChangeSet(from, null);
+ }
+
+ public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
+ TreeNode node;
+ if (from instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) from;
+ node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
+ } else if (from instanceof Drift) {
+ Drift drift = (Drift) from;
+ node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
+ } else {
+ throw new IllegalArgumentException("please report this bug - bad value: " + from);
+ }
+ // if, in the future, we add more node types, we'll add more else-if statements here
+
+ return node;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 50d787d..7778084 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -67,8 +67,6 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
setShowHeader(false);
-
- setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
deleted file mode 100644
index c6e9e65..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.drift;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.data.DSRequest;
-import com.smartgwt.client.data.DSResponse;
-import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.Record;
-import com.smartgwt.client.data.fields.DataSourceTextField;
-import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.tree.TreeNode;
-
-import org.rhq.core.domain.criteria.BaseCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
-import org.rhq.core.domain.criteria.DriftCriteria;
-import org.rhq.core.domain.criteria.DriftJPACriteria;
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-
-/**
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
-
- private static final String ATTR_PARENT_ID = "parentId";
- public static final String ATTR_ID = "id";
- public static final String ATTR_NAME = "name";
-
- private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
- private final boolean canManageDrift;
-
- public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
- super();
- this.canManageDrift = canManageDrift;
- List<DataSourceField> fields = addDataSourceFields();
- addFields(fields);
- }
-
- @Override
- protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
-
- DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
- idDataField.setPrimaryKey(true);
- fields.add(idDataField);
-
- DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
- nameDataField.setCanEdit(false);
- fields.add(nameDataField);
-
- DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
- parentIdField.setForeignKey(ATTR_ID);
- fields.add(parentIdField);
-
- return fields;
- }
-
- @Override
- protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
-
- String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
-
- if (parentId == null) {
-
- // There is no parent - we are at the root of the tree.
- // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
- // We will lazily load drifts when the these changeset tree nodes are opened
- DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.DESC);
- criteria.setPageControl(getPageControl(request));
-
- driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
- public void onSuccess(PageList<DriftChangeSet> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
- });
- } else {
- String changesetId = parentId;
- DriftCriteria criteria = new DriftJPACriteria();
- criteria.addFilterChangeSetId(changesetId);
-
- driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
- response.setStatus(DSResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
-
- public void onSuccess(PageList<Drift> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
- });
-
- /*
- * I am leaving this code commented for future reference. Because today the drit change set tree only
- * shows simple changeset->drift tree, we don't need this. But if we need to have
- * multiple types of child nodes, we'll need something like below to query
- * for the different child node data. For example, we'd need this if we have a tree like:
- * ChangeSet
- * |____Resources
- * | |____ My resource 1
- * | |____ ...
- * |_____Drifts
- * |___ Drift #1
- * |___ Drift #2
- * |___ ...
- * Today we only have Drifts child nodes, so we don't need to have that intermediate
- * "Drifts" node. If we later want to introduce different node types (like Resources)
- * we need additional code like below.
- *
-
- // we are at an inner node, being asked to get the children of it
- if (p.endsWith("_drifts")) {
- // ...load drift items like above in the real code...
- } else if (p.endsWith("_resources")) {
- // ...load resource items and put those nodes in the tree...
- } else {
- // This is an unknown type of node, so just log an error.
- // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
- // we'll add more if-else statements above to process those different nodes.
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
- }
-
- *
- */
- }
-
- return;
- }
-
- @Override
- protected BaseCriteria getFetchCriteria(DSRequest request) {
- // our executeFetch will determine on its own what criteria to use based on what is to be fetched
- // thus we don't return anything here and let the executeFetch do everything
- return null;
- }
-
- @Override
- public Object copyValues(Record from) {
- return null; // don't need this method.
- }
-
- @Override
- public ListGridRecord[] buildRecords(Collection dataObjects) {
- return buildRecordsForKnownChangeSets(dataObjects, null);
- }
-
- public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
- if (dataObjects == null) {
- return null;
- }
-
- final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
-
- for (Object item : dataObjects) {
-
- // the resultant item is a direct node to build
- records.add(copyValues(item));
-
- // now build the children of the node
- /*
- * We do not have the need for building any intermeidate nodes today.
- * There is nothing to do, but if in the future we have differnet node types,
- * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
- * for an example of where this is already done. Commenting this out just as an
- * example of how this can be done.
-
- if (item instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) item;
-
- // each bundle has two direct children - the versions and destinations folders
- TreeNode versionNode = new TreeNode(MSG.view_drift());
- versionNode.setID(changeset.getId() + "_drifts");
- versionNode.setParentID(changeset.getId());
- versionNode.setName(MSG.view_drift());
- versionNode.setAttribute("name", MSG.view_drift());
- records.add(versionNode);
- } else if (item instanceof Drift) {
- if (canManageDrift) {
- records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
- }
- }
-
- *
- */
- }
-
- return records.toArray(new ListGridRecord[records.size()]);
- }
-
- @Override
- public ListGridRecord copyValues(Object from) {
- return copyValuesForKnownDriftChangeSet(from, null);
- }
-
- public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- TreeNode node;
- if (from instanceof DriftChangeSet) {
- DriftChangeSet changeset = (DriftChangeSet) from;
- node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
- } else if (from instanceof Drift) {
- Drift drift = (Drift) from;
- node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
- } else {
- throw new IllegalArgumentException("please report this bug - bad value: " + from);
- }
- // if, in the future, we add more node types, we'll add more else-if statements here
-
- return node;
- }
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..f5341e2
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeDataSource.java
@@ -0,0 +1,51 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import com.smartgwt.client.data.DSRequest;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsTreeDataSource extends AbstractDriftChangeSetsTreeDataSource {
+
+ private final EntityContext context;
+
+ public ResourceDriftChangeSetsTreeDataSource(boolean canManageDrift, EntityContext context) {
+ super(canManageDrift);
+
+ if (context.type != EntityContext.Type.Resource) {
+ throw new IllegalArgumentException("wrong context: " + context);
+ }
+
+ this.context = context;
+ }
+
+ @Override
+ protected DriftChangeSetCriteria getDriftChangeSetCriteria(final DSRequest request) {
+ DriftChangeSetCriteria criteria = super.getDriftChangeSetCriteria(request);
+ criteria.addFilterResourceId(this.context.resourceId);
+ return criteria;
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index 3e368d5..3ee0b5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -40,11 +40,13 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
this.context = context;
+
+ setDataSource(new ResourceDriftChangeSetsTreeDataSource(canManageDrift, context));
}
protected String getNodeTargetLink(TreeNode node) {
if (node instanceof DriftTreeNode) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String driftIdStr = node.getAttribute(AbstractDriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
return path;
}
commit 3796f35c8250ffc3b798ff7cb3dcd5b2f4204596
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Jul 26 09:22:15 2011 -0400
Adding logic to check the enabled flag during drift detection
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index f2883b9..b92dd7c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -54,6 +54,18 @@ public class DriftDetector implements Runnable {
if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
+ return;
+ }
+
+ if (!schedule.getDriftConfiguration().getEnabled()) {
+ schedule.updateShedule();
+ scheduleQueue.enqueue(schedule);
+ // TODO should we grab the schedule from the queue?
+ // Maybe we should continue pulling schedules off the queue until
+ // we find one that is ready to be processed.
return;
}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index fe15677..7934c2d 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -1,7 +1,6 @@
package org.rhq.core.pc.drift;
import java.util.PriorityQueue;
-import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
public class ScheduleQueueImpl implements ScheduleQueue {
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
index 4f27974..9b62422 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftDetectorTest.java
@@ -16,6 +16,7 @@ import org.rhq.common.drift.ChangeSetReaderImpl;
import org.rhq.common.drift.DirectoryEntry;
import org.rhq.common.drift.FileEntry;
import org.rhq.common.drift.Headers;
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftConfiguration;
import static org.apache.commons.io.FileUtils.touch;
@@ -167,6 +168,32 @@ public class DriftDetectorTest extends DriftTest {
@SuppressWarnings("unchecked")
@Test
+ public void skipScheduledThatHasConfigDisabled() throws Exception {
+ detector.setDriftClient(new DriftClientTestStub() {
+ {
+ setBaseDir(resourceDir);
+ }
+
+ @Override
+ public void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration,
+ DriftChangeSetCategory type) {
+ throw new RuntimeException("Should not invoke drift client when drift configuration is disabled");
+ }
+ });
+
+ DriftConfiguration config = driftConfiguration("disabled-config-test", resourceDir.getAbsolutePath());
+ config.setEnabled(false);
+
+ File confDir = mkdir(resourceDir, "conf");
+ File server1Conf = new File(confDir, "server-1.conf");
+ touch(server1Conf);
+
+ scheduleQueue.enqueue(new DriftDetectionSchedule(resourceId(), config));
+ detector.run();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
public void includeAddedFileInDriftChangeSet() throws Exception {
DriftConfiguration config = driftConfiguration("file-added-drift-test", resourceDir.getAbsolutePath());
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
index 97bfa45..98c421e 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
@@ -81,6 +81,12 @@ public class DriftTest {
*/
protected File resourceDir;
+ /**
+ * The default interval assigned to drift configurations created using
+ * {@link #driftConfiguration(String, String)}
+ */
+ protected long defaultInterval = 1800L; // 30 minutes;
+
private MessageDigestGenerator digestGenerator;
/**
@@ -180,6 +186,7 @@ public class DriftTest {
/**
* Creates a {@link DriftConfiguration} with the specified basedir. The file system is
* used as the context for the basedir which means the path specified is used as is.
+ * The interval property is set to {@link #defaultInterval}.
*
* @param name The configuration name
* @param basedir An absolute path of the base directory
@@ -189,6 +196,8 @@ public class DriftTest {
DriftConfiguration config = new DriftConfiguration(new Configuration());
config.setName(name);
config.setBasedir(new DriftConfiguration.BaseDirectory(fileSystem, basedir));
+ config.setEnabled(true);
+ config.setInterval(defaultInterval);
return config;
}
commit 70fbc22e07246b5dd161c32877cfaf0cea4458ff
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:45 2011 -0400
sort the query in desc order, though the tree currently ignores this and has its own sorting.
need to fix that later
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index fe8586a..c6e9e65 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -95,7 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
- criteria.addSortVersion(PageOrdering.ASC);
+ criteria.addSortVersion(PageOrdering.DESC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
commit ce318c437ea1a985679610191a0ceb6d3ebe5195
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:53:03 2011 -0400
default subtab view for drift is the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 4efc189..0e63d8e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -243,13 +243,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
driftTab = new TwoLevelTab(getTabSet().extendLocatorId(Tab.DRIFT), new ViewName(Tab.DRIFT, MSG
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
- this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
- MSG.view_tabs_common_history()), null);
this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
+ this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
+ MSG.view_tabs_common_history()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
+ driftTab.registerSubTabs(driftChangeSets, driftHistory, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -519,17 +519,17 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
ResourcePermission resourcePermissions, Set<ResourceTypeFacet> facets) {
if (updateTab(this.driftTab, facets.contains(ResourceTypeFacet.DRIFT), resourcePermissions.isDrift())) {
- updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
}
});
- updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ updateSubTab(this.driftTab, this.driftHistory, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ return ResourceDriftHistoryView.get(driftHistory.extendLocatorId("View"), resourceComposite);
}
});
commit 14da4c241edb1bb8116eaf1657ddda6746f258fb
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 17:49:19 2011 -0400
initial start of the context menu for the change set tree
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
index 521d7b2..50d787d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -27,14 +27,24 @@ import com.google.gwt.core.client.RunAsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
+import com.smartgwt.client.widgets.menu.Menu;
+import com.smartgwt.client.widgets.menu.MenuItem;
+import com.smartgwt.client.widgets.menu.MenuItemSeparator;
+import com.smartgwt.client.widgets.menu.events.ClickHandler;
+import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeNode;
-import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
-import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeContextClickHandler;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -56,18 +66,9 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
setAnimateFolders(false);
setSelectionType(SelectionStyle.SINGLE);
setShowRollOver(false);
- setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
setShowHeader(false);
setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
-
- addNodeClickHandler(new NodeClickHandler() {
- public void onNodeClick(NodeClickEvent event) {
- TreeNode node = event.getNode();
- String link = getNodeTargetLink(node);
- CoreGUI.goToView(link);
- }
- });
}
@Override
@@ -76,13 +77,30 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
// We may need to wait for tree data to be fetched before we can complete processing the selected path.
// When the datasource pulls data keep processing the selectedPath if necessary.
- this.addDataArrivedHandler(new DataArrivedHandler() {
+ addDataArrivedHandler(new DataArrivedHandler() {
public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
if (null != pendingPath) {
selectPath(pendingPath);
}
}
});
+
+ addNodeContextClickHandler(new NodeContextClickHandler() {
+ public void onNodeContextClick(final NodeContextClickEvent event) {
+ // stop the browser right-click menu
+ event.cancel();
+
+ TreeNode eventNode = event.getNode();
+
+ if (eventNode instanceof ChangeSetTreeNode) {
+ CoreGUI.getMessageCenter().notify(new Message("TODO [this will popup the changeset menu]"));
+ } else if (eventNode instanceof DriftTreeNode) {
+ Menu menu = buildContextMenu((DriftTreeNode) eventNode);
+ menu.showContextMenu();
+ }
+ }
+ });
+
}
public void selectPath(ViewPath viewPath) {
@@ -144,4 +162,76 @@ public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid
* @return the node's link
*/
protected abstract String getNodeTargetLink(TreeNode node);
+
+ /**
+ * Builds the right-mouse-click context menu for the given drift node
+ * @param node the drift node whose menu is to be displayed
+ * @return the context menu to display
+ */
+ protected Menu buildContextMenu(final DriftTreeNode node) {
+
+ Menu contextMenu = new Menu();
+
+ // title
+ String titleName = node.getName();
+ if (titleName.length() > 50) {
+ // make sure the title isn't really long so the menu is not abnormally wide
+ titleName = "..." + titleName.substring(titleName.length() - 50);
+ }
+ MenuItem titleItem = new MenuItem(titleName);
+ titleItem.setEnabled(false);
+ contextMenu.setItems(titleItem);
+
+ // separator
+ contextMenu.addItem(new MenuItemSeparator());
+
+ // item that links to the history details
+ MenuItem detailsItem = new MenuItem(MSG.common_title_details());
+ detailsItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent event) {
+ String link = getNodeTargetLink(node);
+ if (link != null) {
+ CoreGUI.goToView(link);
+ }
+ }
+ });
+ contextMenu.addItem(detailsItem);
+
+ return contextMenu;
+ }
+
+ @SuppressWarnings("unchecked")
+ static class ChangeSetTreeNode extends TreeNode {
+ public ChangeSetTreeNode(DriftChangeSet changeset) {
+ setIsFolder(true);
+ setIcon("subsystems/drift/ChangeSet_16.png");
+ setShowOpenIcon(true);
+ setID(changeset.getId());
+ setName(buildDriftChangeSetNodeName(changeset));
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(),
+ TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ static class DriftTreeNode extends TreeNode {
+ public DriftTreeNode(Drift drift) {
+ setIsFolder(false);
+ setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ String parentID = drift.getChangeSet().getId();
+ setParentID(parentID);
+ setID(parentID + '_' + drift.getId());
+ setName(drift.getPath());
+ }
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
index c609a1e..fe8586a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -39,9 +39,8 @@ import org.rhq.core.domain.criteria.DriftJPACriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.util.PageList;
+import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ImageManager;
-import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
@@ -96,6 +95,7 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
// Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
// We will lazily load drifts when the these changeset tree nodes are opened
DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.addSortVersion(PageOrdering.ASC);
criteria.setPageControl(getPageControl(request));
driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
@@ -233,38 +233,18 @@ public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCri
}
public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
- String parentID;
- TreeNode node = new TreeNode();
+ TreeNode node;
if (from instanceof DriftChangeSet) {
DriftChangeSet changeset = (DriftChangeSet) from;
- node.setIsFolder(true);
- node.setIcon("subsystems/drift/ChangeSet_16.png");
- node.setShowOpenIcon(true);
- node.setID(changeset.getId());
- node.setName(buildDriftChangeSetNodeName(changeset));
-
+ node = new AbstractDriftChangeSetsTreeView.ChangeSetTreeNode(changeset);
} else if (from instanceof Drift) {
Drift drift = (Drift) from;
- node.setIsFolder(false);
- node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
- parentID = drift.getChangeSet().getId();
- node.setParentID(parentID);
- node.setID(parentID + '_' + drift.getId());
- node.setName(drift.getPath());
+ node = new AbstractDriftChangeSetsTreeView.DriftTreeNode(drift);
+ } else {
+ throw new IllegalArgumentException("please report this bug - bad value: " + from);
}
// if, in the future, we add more node types, we'll add more else-if statements here
return node;
}
-
- private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
- StringBuilder str = new StringBuilder();
- str.append(MSG.common_title_version());
- str.append(' ');
- str.append(changeset.getVersion());
- str.append(" (");
- str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
- str.append(')');
- return str.toString();
- }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
index dc2a22d..3e368d5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -43,9 +43,12 @@ public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTree
}
protected String getNodeTargetLink(TreeNode node) {
- String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
- String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
- return path;
+ if (node instanceof DriftTreeNode) {
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
+ }
+ return null;
}
}
commit 50215a85fb2c91627be9fb8c350c5222c3d57350
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 16:37:56 2011 -0400
the initial start of the drift change set tree view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
index 30523b3..10c15e4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LinkManager.java
@@ -458,4 +458,8 @@ public class LinkManager {
public static String getBundleDeploymentLink(int bundleId, int bundleDeploymentId) {
return "#Bundles/Bundle/" + bundleId + "/deployments/" + bundleDeploymentId;
}
+
+ public static String getDriftHistoryLink(int resourceId, int driftId) {
+ return "#Resource/" + resourceId + "/Drift/History/" + driftId;
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
new file mode 100644
index 0000000..521d7b2
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/AbstractDriftChangeSetsTreeView.java
@@ -0,0 +1,147 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.drift;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
+import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
+import com.smartgwt.client.widgets.tree.Tree;
+import com.smartgwt.client.widgets.tree.TreeNode;
+import com.smartgwt.client.widgets.tree.events.NodeClickEvent;
+import com.smartgwt.client.widgets.tree.events.NodeClickHandler;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ViewId;
+import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
+
+/**
+ * @author John Mazzitelli
+ */
+public abstract class AbstractDriftChangeSetsTreeView extends LocatableTreeGrid {
+
+ // We may need to wait for tree data to be fetched before we can complete processing the selected path.
+ // If so, hold it here and retry after the datasource pulls the data.
+ private ViewPath pendingPath = null;
+
+ public AbstractDriftChangeSetsTreeView(String locatorId, boolean canManageDrift) {
+ super(locatorId);
+ setWidth100();
+ setHeight100();
+ setLeaveScrollbarGap(false);
+ // fetch the top nodes at the inital onDraw()
+ setAutoFetchData(true);
+ setAnimateFolders(false);
+ setSelectionType(SelectionStyle.SINGLE);
+ setShowRollOver(false);
+ setSortField(DriftChangeSetsTreeDataSource.ATTR_NAME);
+ setShowHeader(false);
+
+ setDataSource(new DriftChangeSetsTreeDataSource(canManageDrift));
+
+ addNodeClickHandler(new NodeClickHandler() {
+ public void onNodeClick(NodeClickEvent event) {
+ TreeNode node = event.getNode();
+ String link = getNodeTargetLink(node);
+ CoreGUI.goToView(link);
+ }
+ });
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ // We may need to wait for tree data to be fetched before we can complete processing the selected path.
+ // When the datasource pulls data keep processing the selectedPath if necessary.
+ this.addDataArrivedHandler(new DataArrivedHandler() {
+ public void onDataArrived(DataArrivedEvent dataArrivedEvent) {
+ if (null != pendingPath) {
+ selectPath(pendingPath);
+ }
+ }
+ });
+ }
+
+ public void selectPath(ViewPath viewPath) {
+ Tree theTree = getTree();
+
+ if (viewPath.viewsLeft() > 0) {
+ String key = "";
+ for (ViewId view : viewPath.getViewPath().subList(2, viewPath.getViewPath().size())) {
+ if (key.length() > 0) {
+ key += "_";
+ }
+
+ key += view.getPath();
+
+ TreeNode node = theTree.findById(key);
+
+ if (node != null) {
+ // open the node, this will force a fetch of child data if necessary
+ theTree.openFolder(node);
+ } else {
+ // wait for data to get loaded...
+ pendingPath = new ViewPath(viewPath.toString());
+ return;
+ }
+ }
+
+ // we found the node, so keep going
+ pendingPath = null;
+
+ final String finalKey = key;
+ GWT.runAsync(new RunAsyncCallback() {
+ public void onFailure(Throwable reason) {
+ }
+
+ public void onSuccess() {
+ TreeNode node = getTree().findById(finalKey);
+ if (node != null) {
+ deselectAllRecords();
+ selectRecord(node);
+ }
+ }
+ });
+ } else {
+ deselectAllRecords();
+ if (getTotalRows() > 0)
+ selectRecord(0);
+ }
+ }
+
+ public void refresh() {
+ invalidateCache();
+ }
+
+ /**
+ * Returns the link (as a string) that the client should be redirected to
+ * if the given node is clicked.
+ *
+ * @param node the node whose target link is to be returned
+ * @return the node's link
+ */
+ protected abstract String getNodeTargetLink(TreeNode node);
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
new file mode 100644
index 0000000..c609a1e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsTreeDataSource.java
@@ -0,0 +1,270 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.data.DSResponse;
+import com.smartgwt.client.data.DataSourceField;
+import com.smartgwt.client.data.Record;
+import com.smartgwt.client.data.fields.DataSourceTextField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.criteria.BaseCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
+import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.DriftJPACriteria;
+import org.rhq.core.domain.drift.Drift;
+import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+
+/**
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class DriftChangeSetsTreeDataSource extends RPCDataSource<Object, BaseCriteria> {
+
+ private static final String ATTR_PARENT_ID = "parentId";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+
+ private DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
+ private final boolean canManageDrift;
+
+ public DriftChangeSetsTreeDataSource(boolean canManageDrift) {
+ super();
+ this.canManageDrift = canManageDrift;
+ List<DataSourceField> fields = addDataSourceFields();
+ addFields(fields);
+ }
+
+ @Override
+ protected List<DataSourceField> addDataSourceFields() {
+ List<DataSourceField> fields = super.addDataSourceFields();
+
+ DataSourceField idDataField = new DataSourceTextField(ATTR_ID, MSG.common_title_id());
+ idDataField.setPrimaryKey(true);
+ fields.add(idDataField);
+
+ DataSourceTextField nameDataField = new DataSourceTextField(ATTR_NAME, MSG.common_title_name());
+ nameDataField.setCanEdit(false);
+ fields.add(nameDataField);
+
+ DataSourceTextField parentIdField = new DataSourceTextField(ATTR_PARENT_ID, MSG.common_title_id_parent());
+ parentIdField.setForeignKey(ATTR_ID);
+ fields.add(parentIdField);
+
+ return fields;
+ }
+
+ @Override
+ protected void executeFetch(final DSRequest request, final DSResponse response, final BaseCriteria unused) {
+
+ String parentId = request.getCriteria().getAttribute(ATTR_PARENT_ID);
+
+ if (parentId == null) {
+
+ // There is no parent - we are at the root of the tree.
+ // Get the top nodes (the change sets) but to be as fast as possible don't load their drifts.
+ // We will lazily load drifts when the these changeset tree nodes are opened
+ DriftChangeSetCriteria criteria = new DriftChangeSetJPACriteria();
+ criteria.setPageControl(getPageControl(request));
+
+ driftService.findDriftChangeSetsByCriteria(criteria, new AsyncCallback<PageList<DriftChangeSet>>() {
+ public void onSuccess(PageList<DriftChangeSet> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ });
+ } else {
+ String changesetId = parentId;
+ DriftCriteria criteria = new DriftJPACriteria();
+ criteria.addFilterChangeSetId(changesetId);
+
+ driftService.findDriftsByCriteria(criteria, new AsyncCallback<PageList<Drift>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure(), caught);
+ response.setStatus(DSResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Drift> result) {
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
+
+ /*
+ * I am leaving this code commented for future reference. Because today the drit change set tree only
+ * shows simple changeset->drift tree, we don't need this. But if we need to have
+ * multiple types of child nodes, we'll need something like below to query
+ * for the different child node data. For example, we'd need this if we have a tree like:
+ * ChangeSet
+ * |____Resources
+ * | |____ My resource 1
+ * | |____ ...
+ * |_____Drifts
+ * |___ Drift #1
+ * |___ Drift #2
+ * |___ ...
+ * Today we only have Drifts child nodes, so we don't need to have that intermediate
+ * "Drifts" node. If we later want to introduce different node types (like Resources)
+ * we need additional code like below.
+ *
+
+ // we are at an inner node, being asked to get the children of it
+ if (p.endsWith("_drifts")) {
+ // ...load drift items like above in the real code...
+ } else if (p.endsWith("_resources")) {
+ // ...load resource items and put those nodes in the tree...
+ } else {
+ // This is an unknown type of node, so just log an error.
+ // Note that if, in the future, we have other types of nodes (like maybe resource nodes for group change sets?)
+ // we'll add more if-else statements above to process those different nodes.
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_changeset_tree_loadFailure());
+ }
+
+ *
+ */
+ }
+
+ return;
+ }
+
+ @Override
+ protected BaseCriteria getFetchCriteria(DSRequest request) {
+ // our executeFetch will determine on its own what criteria to use based on what is to be fetched
+ // thus we don't return anything here and let the executeFetch do everything
+ return null;
+ }
+
+ @Override
+ public Object copyValues(Record from) {
+ return null; // don't need this method.
+ }
+
+ @Override
+ public ListGridRecord[] buildRecords(Collection dataObjects) {
+ return buildRecordsForKnownChangeSets(dataObjects, null);
+ }
+
+ public ListGridRecord[] buildRecordsForKnownChangeSets(Collection dataObjects, Integer changeSetId) {
+ if (dataObjects == null) {
+ return null;
+ }
+
+ final List<ListGridRecord> records = new ArrayList<ListGridRecord>();
+
+ for (Object item : dataObjects) {
+
+ // the resultant item is a direct node to build
+ records.add(copyValues(item));
+
+ // now build the children of the node
+ /*
+ * We do not have the need for building any intermeidate nodes today.
+ * There is nothing to do, but if in the future we have differnet node types,
+ * we'll probably want intermediate nodes that we create here. See BundleTreeDataSource
+ * for an example of where this is already done. Commenting this out just as an
+ * example of how this can be done.
+
+ if (item instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) item;
+
+ // each bundle has two direct children - the versions and destinations folders
+ TreeNode versionNode = new TreeNode(MSG.view_drift());
+ versionNode.setID(changeset.getId() + "_drifts");
+ versionNode.setParentID(changeset.getId());
+ versionNode.setName(MSG.view_drift());
+ versionNode.setAttribute("name", MSG.view_drift());
+ records.add(versionNode);
+ } else if (item instanceof Drift) {
+ if (canManageDrift) {
+ records.add(copyValuesForKnownDriftChangeSet(driftItem, changeSetId));
+ }
+ }
+
+ *
+ */
+ }
+
+ return records.toArray(new ListGridRecord[records.size()]);
+ }
+
+ @Override
+ public ListGridRecord copyValues(Object from) {
+ return copyValuesForKnownDriftChangeSet(from, null);
+ }
+
+ public ListGridRecord copyValuesForKnownDriftChangeSet(Object from, Integer changeSetId) {
+ String parentID;
+ TreeNode node = new TreeNode();
+ if (from instanceof DriftChangeSet) {
+ DriftChangeSet changeset = (DriftChangeSet) from;
+ node.setIsFolder(true);
+ node.setIcon("subsystems/drift/ChangeSet_16.png");
+ node.setShowOpenIcon(true);
+ node.setID(changeset.getId());
+ node.setName(buildDriftChangeSetNodeName(changeset));
+
+ } else if (from instanceof Drift) {
+ Drift drift = (Drift) from;
+ node.setIsFolder(false);
+ node.setIcon(ImageManager.getDriftCategoryIcon(drift.getCategory()));
+ parentID = drift.getChangeSet().getId();
+ node.setParentID(parentID);
+ node.setID(parentID + '_' + drift.getId());
+ node.setName(drift.getPath());
+ }
+ // if, in the future, we add more node types, we'll add more else-if statements here
+
+ return node;
+ }
+
+ private String buildDriftChangeSetNodeName(DriftChangeSet changeset) {
+ StringBuilder str = new StringBuilder();
+ str.append(MSG.common_title_version());
+ str.append(' ');
+ str.append(changeset.getVersion());
+ str.append(" (");
+ str.append(TimestampCellFormatter.format(changeset.getCtime(), TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
+ str.append(')');
+ return str.toString();
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
index f610b8b..48f5bc8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -38,6 +38,13 @@ public class DriftChangeSetsView extends LocatableVLayout {
this.hasWriteAccess = hasWriteAccess;
}
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+
+ addMember(new ResourceDriftChangeSetsTreeView(extendLocatorId("Tree"), this.hasWriteAccess, this.context));
+ }
+
public EntityContext getContext() {
return context;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
new file mode 100644
index 0000000..dc2a22d
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsTreeView.java
@@ -0,0 +1,51 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.drift;
+
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.LinkManager;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsTreeView extends AbstractDriftChangeSetsTreeView {
+
+ private final EntityContext context;
+
+ public ResourceDriftChangeSetsTreeView(String locatorId, boolean canManageDrift, EntityContext context) {
+
+ super(locatorId, canManageDrift);
+
+ if (context.type != EntityContext.Type.Resource) {
+ throw new IllegalArgumentException("wrong context: " + context);
+ }
+
+ this.context = context;
+ }
+
+ protected String getNodeTargetLink(TreeNode node) {
+ String driftIdStr = node.getAttribute(DriftChangeSetsTreeDataSource.ATTR_ID).split("_")[1];
+ String path = LinkManager.getDriftHistoryLink(this.context.resourceId, Integer.valueOf(driftIdStr));
+ return path;
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index c7d6f91..ea8c956 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1123,6 +1123,7 @@ view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
view_drift_changeSets = Change Sets
view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 5fe14aa..a07568a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -941,6 +941,7 @@ view_dashboards_title = Dashboard
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 6bce847..6e68cff 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1106,6 +1106,7 @@ view_dashboards_title = ããã·ã¥ããŒã
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index bd2b6fb..fa86006 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1141,6 +1141,7 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileRemoved = File Removed
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 9fa9115..79816c5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1115,6 +1115,7 @@ view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
##view_drift_changeSets = Change Sets
##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
+##view_drift_changeset_tree_loadFailure = Failed to load drift change set tree.
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png
new file mode 100644
index 0000000..fdda214
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png
new file mode 100644
index 0000000..358cf61
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/drift/ChangeSet_16_open.png differ
commit abb0a2caa37e9258b97957f4ac2acd78a6c13638
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jul 25 12:12:31 2011 -0400
drift change set criteria needs to support paging like everyone else.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
index edc436b..f377ade 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BaseCriteria.java
@@ -3,8 +3,11 @@ package org.rhq.core.domain.criteria;
import org.rhq.core.domain.util.PageControl;
/**
- * Created by IntelliJ IDEA. User: jsanda Date: 7/19/11 Time: 5:30 PM To change this template use File | Settings | File
- * Templates.
+ * All criteria, regardless of the backend storage that will be queried with this criteria, needs
+ * to support certain base functionality (like paging).
+ * This base interface provides that common API.
+ *
+ * @author John Sanda
*/
public interface BaseCriteria {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 1b3effc..b5f71b2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -5,7 +5,7 @@ import java.io.Serializable;
import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.util.PageOrdering;
-public interface DriftChangeSetCriteria extends Serializable {
+public interface DriftChangeSetCriteria extends BaseCriteria, Serializable {
void addFilterId(String filterId);
commit bd1fd799e79a43d006f82d6e7ad5817a42486b8f
Author: John Sanda <jsanda(a)redhat.com>
Date: Sun Jul 24 21:13:24 2011 -0400
Adding createSnapshot method to drift server api
Also moving Snapshot and DiffReport classes to core/domain to make them
accessible to coregui.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
new file mode 100644
index 0000000..e0659d9
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.core.domain.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
new file mode 100644
index 0000000..91e5f50
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/Snapshot.java
@@ -0,0 +1,68 @@
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+public class Snapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private int version;
+
+ private Map<String, Drift> entries = new TreeMap<String, Drift>();
+
+ public int getVersion() {
+ return version;
+ }
+
+ public Collection<Drift> getEntries() {
+ return entries.values();
+ }
+
+ public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
+ for (Drift entry : changeSet.getDrifts()) {
+ entries.remove(entry.getPath());
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.put(entry.getPath(), entry);
+ }
+ }
+ version = changeSet.getVersion();
+ return this;
+ }
+
+ public DiffReport diff(Snapshot right) {
+ Snapshot left = this;
+ DiffReport<Drift> diff = new DiffReport<Drift>();
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ Drift rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
+}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
new file mode 100644
index 0000000..93653b3
--- /dev/null
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/SnapshotTest.java
@@ -0,0 +1,383 @@
+package org.rhq.core.domain.drift;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+
+import static java.util.Arrays.asList;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
+import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
+import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
+import static org.testng.Assert.assertEquals;
+
+public class SnapshotTest {
+
+ @Test
+ public void addChangeSetWithAddedFile() {
+ int configId = 1;
+
+ FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
+ .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
+
+ Snapshot snapshot = new Snapshot().add(changeSet);
+
+ assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
+ "a snapshot that contains a single change set");
+ assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
+ }
+
+ @Test
+ public void addChangeSetsWithAddedFiles() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
+ "with two change sets and file added in second change set");
+ assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
+ }
+
+ @Test
+ public void replaceFileWithChangedVersion() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+
+ Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
+ new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
+ "Failed to build snapshot with file changed");
+ }
+
+ @Test
+ public void deleteFileThatHasBeenRemoved() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+
+ Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(),
+ "Failed to build snapshot with a file " +
+ "removed.");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndNotInRight() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
+ }
+
+ @Test
+ public void diffShowsEntriesInRightAndNotInLeft() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(),
+ "Diff report does not contain " +
+ "elements that are in the left but not in the right");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(),
+ "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
+ }
+
+ <E> Set<E> asSet(E... elements) {
+ HashSet<E> set = new HashSet<E>();
+ for (E element : elements) {
+ set.add(element);
+ }
+ return set;
+ }
+
+ static class FakeDriftChangeSet implements DriftChangeSet {
+
+ private String id;
+ private int version;
+ private DriftChangeSetCategory category;
+ private int configId;
+ private Set<Drift> drifts = new HashSet<Drift>();
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDriftChangeSet() {
+ }
+
+ public FakeDriftChangeSet(int version, DriftChangeSetCategory category, int configId) {
+ this.version = version;
+ this.category = category;
+ this.configId = configId;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public int getVersion() {
+ return version;
+ }
+
+ @Override
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ @Override
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public int getDriftConfigurationId() {
+ return configId;
+ }
+
+ @Override
+ public void setDriftConfigurationId(int id) {
+ configId = id;
+ }
+
+ @Override
+ public int getResourceId() {
+ return 0;
+ }
+
+ @Override
+ public Set getDrifts() {
+ return drifts;
+ }
+
+ @Override
+ public void setDrifts(Set drifts) {
+ this.drifts = drifts;
+ }
+
+ public FakeDriftChangeSet add(Drift drift) {
+ drifts.add(drift);
+ return this;
+ }
+ }
+
+ static class FakeDrift implements Drift {
+
+ private String id;
+ private DriftCategory category;
+ private String path;
+ private DriftFile oldFile;
+ private DriftFile newFile;
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDrift() {
+ }
+
+ public FakeDrift(DriftCategory category, DriftFile oldFile, DriftFile newFile, String path) {
+ this.category = category;
+ this.oldFile = oldFile;
+ this.newFile = newFile;
+ this.path = path;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public DriftChangeSet getChangeSet() {
+ return null;
+ }
+
+ @Override
+ public void setChangeSet(DriftChangeSet changeSet) {
+
+ }
+
+ @Override
+ public DriftCategory getCategory() {
+ return category;
+ }
+
+ @Override
+ public void setCategory(DriftCategory category) {
+ this.category = category;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public DriftFile getOldDriftFile() {
+ return oldFile;
+ }
+
+ @Override
+ public void setOldDriftFile(DriftFile oldDriftFile) {
+ this.oldFile = oldDriftFile;
+ }
+
+ @Override
+ public DriftFile getNewDriftFile() {
+ return newFile;
+ }
+
+ @Override
+ public void setNewDriftFile(DriftFile newDriftFile) {
+ newFile = newDriftFile;
+ }
+
+ @Override
+ public String toString() {
+ return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
+ ", path: " + path + "]";
+ }
+ }
+
+ static class FakeDriftFile implements DriftFile {
+
+ private String hash;
+ private long size;
+ private DriftFileStatus status;
+ private long ctime = System.currentTimeMillis();
+
+ public FakeDriftFile() {
+ }
+
+ public FakeDriftFile(String hash, long size, DriftFileStatus status) {
+ this.hash = hash;
+ this.size = size;
+ this.status = status;
+ }
+
+ @Override
+ public String getHashId() {
+ return hash;
+ }
+
+ @Override
+ public void setHashId(String hashId) {
+ hash = hashId;
+ }
+
+ @Override
+ public Long getCtime() {
+ return ctime;
+ }
+
+ @Override
+ public Long getDataSize() {
+ return size;
+ }
+
+ @Override
+ public void setDataSize(Long size) {
+ this.size = size;
+ }
+
+ @Override
+ public DriftFileStatus getStatus() {
+ return status;
+ }
+
+ @Override
+ public void setStatus(DriftFileStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "DriftFile[hashId: " + hash + ", dataSize: " + size + ", status: " + status.ordinal() + "]";
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index f69195d..10f72f5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -20,13 +20,16 @@ package org.rhq.enterprise.gui.coregui.client.gwt;
import com.google.gwt.user.client.rpc.RemoteService;
+import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
/**
@@ -115,6 +118,8 @@ public interface DriftGWTService extends RemoteService {
PageList<DriftComposite> findDriftCompositesByCriteria(DriftCriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+
/**
* Get the specified drift configuration for the specified context.
*
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index 8d5beb9..b440ffd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -18,13 +18,16 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
+import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
@@ -122,6 +125,15 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ try {
+ return driftServer.createSnapshot(subject, criteria);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public DriftConfiguration getDriftConfiguration(EntityContext entityContext, int driftConfigId)
throws RuntimeException {
try {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
deleted file mode 100644
index 89f3286..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class DiffReport<T> {
-
- private List<T> notInLeft = new ArrayList<T>();
-
- private List<T> notInRight = new ArrayList<T>();
-
- private List<T> conflicts = new ArrayList<T>();
-
- public List<T> getElementsNotInLeft() {
- return notInLeft;
- }
-
- public void elementNotInLeft(T element) {
- notInLeft.add(element);
- }
-
- public List<T> getElementsNotInRight() {
- return notInRight;
- }
-
- public void elementNotInRight(T element) {
- notInRight.add(element);
- }
-
- public List<T> getElementsInConflict() {
- return conflicts;
- }
-
- public void elementInConflict(T element) {
- conflicts.add(element);
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 4c669e7..54eda95 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -71,6 +71,7 @@ import org.rhq.core.domain.drift.DriftFileBits;
import org.rhq.core.domain.drift.DriftFileStatus;
import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.RhqDriftChangeSet;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.ZipUtil;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 0fb077d..6939c7c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.RhqDrift;
import org.rhq.core.domain.drift.RhqDriftChangeSet;
import org.rhq.core.domain.drift.RhqDriftFile;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
@Local
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
index 0dd2aa8..276c8b9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerBean.java
@@ -19,11 +19,13 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
@@ -41,6 +43,13 @@ import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
@Stateless
public class DriftServerBean implements DriftServerLocal {
+ // TODO Should security checks be handled here instead of delegating to the drift plugin?
+ // Currently any security checks that need to be performed are delegated to the plugin.
+ // This is fine *so far* since the only plugin is the default which is our existing SLSB
+ // layer backed by the RHQ database. If the plugins are only supposed to be responsible
+ // for persistence management of drift entities and content, then they should not be
+ // responsible for other concerns like security.
+
private Log log = LogFactory.getLog(DriftServerBean.class);
@PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
@@ -87,6 +96,13 @@ public class DriftServerBean implements DriftServerLocal {
driftServerPlugin.saveChangeSetFiles(changeSetFilesZip);
}
+ @Override
+ @TransactionAttribute(NOT_SUPPORTED)
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ DriftServerPluginFacet driftServerPlugin = getServerPlugin();
+ return driftServerPlugin.createSnapshot(subject, criteria);
+ }
+
DriftServerPluginFacet getServerPlugin() {
MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
if (masterPC == null) {
@@ -201,4 +217,5 @@ public class DriftServerBean implements DriftServerLocal {
throw new IllegalArgumentException("Entity Context Type not supported [" + context + "]");
}
}
+
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
index 756f135..5046e83 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftServerLocal.java
@@ -7,11 +7,13 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
@Local
@@ -33,4 +35,6 @@ public interface DriftServerLocal {
PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject, DriftCriteria criteria);
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
+
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
deleted file mode 100644
index 5dc18fa..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.DriftFile;
-
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-
-public class Snapshot implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private int version;
-
- private Map<String, Drift> entries = new TreeMap<String, Drift>();
-
- public int getVersion() {
- return version;
- }
-
- public Collection<Drift> getEntries() {
- return entries.values();
- }
-
- public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
- for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry.getPath());
- if (entry.getCategory() != FILE_REMOVED) {
- entries.put(entry.getPath(), entry);
- }
- }
- version = changeSet.getVersion();
- return this;
- }
-
- public DiffReport diff(Snapshot right) {
- Snapshot left = this;
- DiffReport<Drift> diff = new DiffReport<Drift>();
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- if (!right.entries.containsKey(entry.getKey())) {
- diff.elementNotInRight(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
- if (!left.entries.containsKey(entry.getKey())) {
- diff.elementNotInLeft(entry.getValue());
- }
- }
-
- for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
- Drift rightDrift = right.entries.get(entry.getKey());
- if (rightDrift != null) {
- DriftFile leftFile = entry.getValue().getNewDriftFile();
- DriftFile rightFile = rightDrift.getNewDriftFile();
-
- if (!leftFile.getHashId().equals(rightFile.getHashId())) {
- diff.elementInConflict(entry.getValue());
- }
- }
- }
-
- return diff;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index 890d2d8..867464d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -23,10 +23,12 @@ import java.io.File;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.DriftChangeSetJPACriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
@@ -47,4 +49,6 @@ public interface DriftServerPluginFacet extends ServerPluginComponent {
void saveChangeSet(int resourceId, File changeSetZip) throws Exception;
void saveChangeSetFiles(File changeSetFilesZip) throws Exception;
+
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
deleted file mode 100644
index 47dbb73..0000000
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ /dev/null
@@ -1,385 +0,0 @@
-package org.rhq.enterprise.server.drift;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.testng.annotations.Test;
-
-import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftCategory;
-import org.rhq.core.domain.drift.DriftChangeSet;
-import org.rhq.core.domain.drift.DriftChangeSetCategory;
-import org.rhq.core.domain.drift.DriftFile;
-import org.rhq.core.domain.drift.DriftFileStatus;
-
-import static java.util.Arrays.asList;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
-import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
-import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
-import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
-import static org.rhq.test.AssertUtils.assertCollectionMatchesNoOrder;
-import static org.testng.Assert.assertEquals;
-
-public class SnapshotTest {
-
- @Test
- public void addChangeSetWithAddedFile() {
- int configId = 1;
-
- FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
- .add(new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt"));
-
- Snapshot snapshot = new Snapshot().add(changeSet);
-
- assertCollectionMatchesNoOrder(changeSet.getDrifts(), snapshot.getEntries(), "Failed to build " +
- "a snapshot that contains a single change set");
- assertEquals(snapshot.getVersion(), changeSet.getVersion(), "Snapshot version is wrong");
- }
-
- @Test
- public void addChangeSetsWithAddedFiles() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("4a5b6c", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry1, entry2), snapshot.getEntries(), "Failed to build snapshot " +
- "with two change sets and file added in second change set");
- assertEquals(snapshot.getVersion(), changeSet2.getVersion(), "Snapshot version is wrong");
- }
-
- @Test
- public void replaceFileWithChangedVersion() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
-
- Drift entry2 = new FakeDrift(FILE_CHANGED, new FakeDriftFile("a1b2c3", 1024, LOADED),
- new FakeDriftFile("4d5e6f", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with file changed");
- }
-
- @Test
- public void deleteFileThatHasBeenRemoved() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
-
- Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
-
- Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
-
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file " +
- "removed.");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndNotInRight() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
- Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
- "elements that are in the left but not in the right.");
- }
-
- @Test
- public void diffShowsEntriesInRightAndNotInLeft() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
- "elements that are in the left but not in the right");
- }
-
- @Test
- public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
- int configId = 1;
-
- Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
- Snapshot right = new Snapshot().add(changeSet1);
-
- Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
- FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
- Snapshot left = new Snapshot().add(changeSet2);
-
- DiffReport diff = left.diff(right);
-
- assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
- "element that are in both left and right and are in conflict");
- }
-
- <E> Set<E> asSet(E... elements) {
- HashSet<E> set = new HashSet<E>();
- for (E element : elements) {
- set.add(element);
- }
- return set;
- }
-
- static class FakeDriftChangeSet implements DriftChangeSet {
-
- private String id;
- private int version;
- private DriftChangeSetCategory category;
- private int configId;
- private Set<Drift> drifts = new HashSet<Drift>();
- private long ctime = System.currentTimeMillis();
-
- public FakeDriftChangeSet() {
- }
-
- public FakeDriftChangeSet(int version, DriftChangeSetCategory category, int configId) {
- this.version = version;
- this.category = category;
- this.configId = configId;
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public int getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(int version) {
- this.version = version;
- }
-
- @Override
- public DriftChangeSetCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftChangeSetCategory category) {
- this.category = category;
- }
-
- @Override
- public int getDriftConfigurationId() {
- return configId;
- }
-
- @Override
- public void setDriftConfigurationId(int id) {
- configId = id;
- }
-
- @Override
- public int getResourceId() {
- return 0;
- }
-
- @Override
- public Set getDrifts() {
- return drifts;
- }
-
- @Override
- public void setDrifts(Set drifts) {
- this.drifts = drifts;
- }
-
- public FakeDriftChangeSet add(Drift drift) {
- drifts.add(drift);
- return this;
- }
- }
-
- static class FakeDrift implements Drift {
-
- private String id;
- private DriftCategory category;
- private String path;
- private DriftFile oldFile;
- private DriftFile newFile;
- private long ctime = System.currentTimeMillis();
-
- public FakeDrift() {
- }
-
- public FakeDrift(DriftCategory category, DriftFile oldFile, DriftFile newFile, String path) {
- this.category = category;
- this.oldFile = oldFile;
- this.newFile = newFile;
- this.path = path;
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public DriftChangeSet getChangeSet() {
- return null;
- }
-
- @Override
- public void setChangeSet(DriftChangeSet changeSet) {
-
- }
-
- @Override
- public DriftCategory getCategory() {
- return category;
- }
-
- @Override
- public void setCategory(DriftCategory category) {
- this.category = category;
- }
-
- @Override
- public String getPath() {
- return path;
- }
-
- @Override
- public void setPath(String path) {
- this.path = path;
- }
-
- @Override
- public DriftFile getOldDriftFile() {
- return oldFile;
- }
-
- @Override
- public void setOldDriftFile(DriftFile oldDriftFile) {
- this.oldFile = oldDriftFile;
- }
-
- @Override
- public DriftFile getNewDriftFile() {
- return newFile;
- }
-
- @Override
- public void setNewDriftFile(DriftFile newDriftFile) {
- newFile = newDriftFile;
- }
-
- @Override
- public String toString() {
- return "Drift[category: " + category.code() + ", oldFile: " + oldFile + ", newFile: " + newFile +
- ", path: " + path + "]";
- }
- }
-
- static class FakeDriftFile implements DriftFile {
-
- private String hash;
- private long size;
- private DriftFileStatus status;
- private long ctime = System.currentTimeMillis();
-
- public FakeDriftFile() {
- }
-
- public FakeDriftFile(String hash, long size, DriftFileStatus status) {
- this.hash = hash;
- this.size = size;
- this.status = status;
- }
-
- @Override
- public String getHashId() {
- return hash;
- }
-
- @Override
- public void setHashId(String hashId) {
- hash = hashId;
- }
-
- @Override
- public Long getCtime() {
- return ctime;
- }
-
- @Override
- public Long getDataSize() {
- return size;
- }
-
- @Override
- public void setDataSize(Long size) {
- this.size = size;
- }
-
- @Override
- public DriftFileStatus getStatus() {
- return status;
- }
-
- @Override
- public void setStatus(DriftFileStatus status) {
- this.status = status;
- }
-
- @Override
- public String toString() {
- return "DriftFile[hashId: " + hash + ", dataSize: " + size + ", status: " + status.ordinal() + "]";
- }
- }
-
-}
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
index 456c4a5..8d4cae4 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/DriftServerPluginComponent.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
+import org.rhq.core.domain.drift.Snapshot;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.drift.DriftManagerLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
@@ -107,6 +108,12 @@ public class DriftServerPluginComponent implements DriftServerPluginFacet {
driftMgr.storeFiles(changeSetFilesZip);
}
+ @Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ DriftManagerLocal driftMgr = getDriftManager();
+ return driftMgr.createSnapshot(subject, criteria);
+ }
+
private DriftJPACriteria toJPACriteria(DriftCriteria criteria) {
DriftJPACriteria jpaCriteria = new DriftJPACriteria();
jpaCriteria.addFilterId(criteria.getFilterId());
commit e0cdb9af1df636bcf0949da9a7a3eace650f7cb3
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 22:57:09 2011 -0400
First cut at createSnapshot method in DriftManagerBean
Also refactoring tests in server/jar to use the JPAUtils class for
resetting the db.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c03e3e6..bc8d26a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -38,24 +38,6 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
-// executeInTransaction(new TransactionCallback() {
-// @Override
-// public void execute() throws Exception {
-// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
-//
-// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
-// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
-// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
-// // native SQL to perform the delete on the join table rhq_drift_config_map.
-// //
-// // jsanda
-// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
-//
-// getEntityManager().createQuery("delete from Resource").executeUpdate();
-// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
-// }
-// });
-
executeInTransaction(new TransactionCallback() {
@Override
public void execute() throws Exception {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 65a6a55..4c669e7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -581,4 +581,17 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
throw new IllegalArgumentException("Entity Context Type not supported [" + context + "]");
}
}
+
+ @Override
+ public Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria) {
+ // TODO security checks
+ Snapshot snapshot = new Snapshot();
+ PageList<RhqDriftChangeSet> changeSets = findDriftChangeSetsByCriteria(subject, criteria);
+
+ for (RhqDriftChangeSet changeSet : changeSets) {
+ snapshot.add(changeSet);
+ }
+
+ return snapshot;
+ }
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 4a30952..0fb077d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -177,7 +177,7 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @return
* @throws Exception
*/
- public RhqDriftFile persistDriftFile(RhqDriftFile driftFile) throws Exception;
+ RhqDriftFile persistDriftFile(RhqDriftFile driftFile) throws Exception;
/**
* SUPPORTS DRIFT RHQ SERVER PLUGIN
@@ -185,6 +185,8 @@ public interface DriftManagerLocal extends DriftManagerRemote {
* @param data
* @throws Exception
*/
- public void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception;
+ void persistDriftFileData(RhqDriftFile driftFile, InputStream data) throws Exception;
+
+ Snapshot createSnapshot(Subject subject, DriftChangeSetJPACriteria criteria);
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index f1934d7..7ffacbf 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -1,7 +1,5 @@
package org.rhq.enterprise.server.resource.metadata;
-import static org.rhq.core.clientapi.shared.PluginDescriptorUtil.loadPluginDescriptor;
-
import java.io.File;
import java.net.URL;
import java.sql.Connection;
@@ -39,10 +37,17 @@ import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.util.LookupUtil;
+import static org.rhq.core.clientapi.shared.PluginDescriptorUtil.loadPluginDescriptor;
+
public class MetadataBeanTest extends AbstractEJB3Test {
private static List<String> plugins = new ArrayList<String>();
+ @Override
+ protected boolean isDBResetNeeded() {
+ return false;
+ }
+
@BeforeGroups(groups = { "plugin.metadata" }, dependsOnGroups = { "integration.ejb3" })
public void startMBeanServer() throws Exception {
setupDB();
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index ee2a45f..5ed329f 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -28,7 +28,6 @@ import javax.management.MBeanServerFactory;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
import javax.transaction.TransactionManager;
import org.hibernate.SessionFactory;
@@ -36,6 +35,7 @@ import org.hibernate.stat.Statistics;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
@@ -57,12 +57,28 @@ import org.rhq.enterprise.server.scheduler.SchedulerService;
import org.rhq.enterprise.server.scheduler.SchedulerServiceMBean;
import org.rhq.enterprise.server.util.LookupUtil;
+import static org.rhq.test.JPAUtils.clearDB;
+import static org.rhq.test.JPAUtils.lookupEntityManager;
+import static org.rhq.test.JPAUtils.lookupTransactionManager;
+
/**
* This is the abstract test base for server jar tests.
*
* @author Greg Hinkle
*/
public abstract class AbstractEJB3Test extends AssertJUnit {
+
+ @BeforeClass
+ public void resetDB() throws Exception {
+ if (isDBResetNeeded()) {
+ clearDB();
+ }
+ }
+
+ protected boolean isDBResetNeeded() {
+ return true;
+ }
+
//@BeforeSuite(groups = {"integration.ejb3","PERF"}) // TODO investigate again
@BeforeSuite(alwaysRun = true)
public static void startupEmbeddedJboss() throws Exception {
@@ -165,23 +181,11 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
private static Statistics stats;
public TransactionManager getTransactionManager() {
- try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
- return tm;
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load transaction manager", e);
- }
+ return lookupTransactionManager();
}
public static EntityManager getEntityManager() {
- try {
- return ((EntityManagerFactory) getInitialContext().lookup(RHQConstants.ENTITY_MANAGER_JNDI_NAME))
- .createEntityManager();
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load entity manager", e);
- }
+ return lookupEntityManager();
}
public static InitialContext getInitialContext() {
commit 20105a1abca72db2ef548f9b0a0e6a097a73024e
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 21:38:07 2011 -0400
Initial commit for JPAUtils
Refactoring some methods in AbstractEJB3Test to delegate to JPAUtils
with the intent to eliminate duplicate code in core/domain and
server/jar tests. Most importantly though, the method clearDB is now
part of JPAUtils making it accessible to any test. This provides a much
more robust way of resetting the entire database to a known, consistent
state.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index c9e61ef..c03e3e6 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -3,10 +3,6 @@ package org.rhq.core.domain.drift;
import java.util.HashSet;
import java.util.Set;
-import javax.persistence.EntityManager;
-import javax.transaction.SystemException;
-
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -16,6 +12,7 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.shared.ResourceBuilder;
import org.rhq.core.domain.test.AbstractEJB3Test;
+import org.rhq.test.TransactionCallback;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index aa6e0e0..dc5319a 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -30,8 +30,6 @@ import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
@@ -42,6 +40,13 @@ import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
+import org.rhq.test.JPAUtils;
+import org.rhq.test.TransactionCallback;
+
+import static org.rhq.test.JPAUtils.clearDB;
+import static org.rhq.test.JPAUtils.lookupEntityManager;
+import static org.rhq.test.JPAUtils.lookupTransactionManager;
+
public abstract class AbstractEJB3Test extends AssertJUnit {
@BeforeClass
@@ -96,26 +101,12 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
EJB3StandaloneBootstrap.shutdown();
}
- private TransactionManager tm;
-
public TransactionManager getTransactionManager() {
- try {
- tm = (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
- return tm;
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load transaction manager", e);
- }
+ return lookupTransactionManager();
}
public EntityManager getEntityManager() {
- try {
- return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
- .createEntityManager();
- } catch (NamingException e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to load entity manager", e);
- }
+ return lookupEntityManager();
}
public boolean isPostgres(EntityManager em) throws Exception {
@@ -148,171 +139,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
}
protected void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
+ JPAUtils.executeInTransaction(callback);
}
- void clearDB() throws Exception {
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- EntityManager em = getEntityManager();
-
- em.createNativeQuery("delete from jms_subscriptions");
- em.createNativeQuery("delete from jms_roles");
- em.createNativeQuery("delete from jms_users");
- em.createNativeQuery("delete from jms_transactions");
- em.createNativeQuery("delete from jms_messages");
- em.createNativeQuery("delete from rhq_drift_config_map");
- em.createNativeQuery("delete from rhq_drift_template_map");
- em.createNativeQuery("delete from rhq_delete_res_hist");
- em.createNativeQuery("delete from rhq_create_res_hist");
- em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
- em.createNativeQuery("delete from rhq_tagging_bundle_map");
- em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
- em.createNativeQuery("delete from rhq_bundle_res_deploy");
- em.createNativeQuery("delete from rhq_bundle_deployment");
- em.createNativeQuery("delete from rhq_bundle_destination");
- em.createNativeQuery("delete from rhq_bundle_file");
- em.createNativeQuery("delete from rhq_bundle_version_repo");
- em.createNativeQuery("delete from rhq_bundle_version");
- em.createNativeQuery("delete from rhq_bundle");
- em.createNativeQuery("delete from rhq_bundle_type");
- em.createNativeQuery("delete from rhq_repo_advisory");
- em.createNativeQuery("delete from rhq_advisory_buglist");
- em.createNativeQuery("delete from rhq_advisory_cve");
- em.createNativeQuery("delete from rhq_cve");
- em.createNativeQuery("delete from rhq_advisory_package");
- em.createNativeQuery("delete from rhq_advisory");
- em.createNativeQuery("delete from rhq_distribution_file");
- em.createNativeQuery("delete from rhq_repo_distribution");
- em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_pkg_prd_map");
- em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
- em.createNativeQuery("delete from rhq_repo_pkg_version_map");
- em.createNativeQuery("delete from rhq_repo_repo_relation_map");
- em.createNativeQuery("delete from rhq_repo_repo_group_map");
- em.createNativeQuery("delete from rhq_repo_content_src_map");
- em.createNativeQuery("delete from rhq_repo_resource_map");
- em.createNativeQuery("delete from rhq_package_inst_step");
- em.createNativeQuery("delete from rhq_repo_sync");
- em.createNativeQuery("delete from rhq_content_src_sync");
- em.createNativeQuery("delete from rhq_installed_pkg_hist");
- em.createNativeQuery("delete from rhq_installed_package");
- em.createNativeQuery("delete from rhq_content_req");
- em.createNativeQuery("delete from rhq_package_version");
- em.createNativeQuery("delete from rhq_package_bits");
- em.createNativeQuery("delete from rhq_package");
- em.createNativeQuery("delete from rhq_package_type");
- em.createNativeQuery("delete from rhq_repo_relation");
- em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_repo");
- em.createNativeQuery("delete from rhq_repo_group");
- em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
- em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
- em.createNativeQuery("delete from rhq_meas_data_num_r14");
- em.createNativeQuery("delete from rhq_meas_data_num_r13");
- em.createNativeQuery("delete from rhq_meas_data_num_r12");
- em.createNativeQuery("delete from rhq_meas_data_num_r11");
- em.createNativeQuery("delete from rhq_meas_data_num_r10");
- em.createNativeQuery("delete from rhq_meas_data_num_r09");
- em.createNativeQuery("delete from rhq_meas_data_num_r08");
- em.createNativeQuery("delete from rhq_meas_data_num_r07");
- em.createNativeQuery("delete from rhq_meas_data_num_r06");
- em.createNativeQuery("delete from rhq_meas_data_num_r05");
- em.createNativeQuery("delete from rhq_meas_data_num_r04");
- em.createNativeQuery("delete from rhq_meas_data_num_r03");
- em.createNativeQuery("delete from rhq_meas_data_num_r02");
- em.createNativeQuery("delete from rhq_meas_data_num_r01");
- em.createNativeQuery("delete from rhq_meas_data_num_r00");
- em.createNativeQuery("delete from rhq_measurement_oob_tmp");
- em.createNativeQuery("delete rhq_measurement_oob");
- em.createNativeQuery("delete rhq_resource_avail");
- em.createNativeQuery("delete from rhq_availability");
- em.createNativeQuery("delete from rhq_calltime_data_value");
- em.createNativeQuery("delete from rhq_calltime_data_key");
- em.createNativeQuery("delete from rhq_measurement_data_trait");
- em.createNativeQuery("delete from rhq_measurement_data_num_1d");
- em.createNativeQuery("delete from rhq_measurement_data_num_6h");
- em.createNativeQuery("delete from rhq_measurement_data_num_1h");
- em.createNativeQuery("delete from rhq_measurement_bline");
- em.createNativeQuery("delete from rhq_measurement_sched");
- em.createNativeQuery("delete from rhq_measurement_def");
- em.createNativeQuery("delete from rhq_plugin");
- em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
- em.createNativeQuery("delete from rhq_alert_notification");
- em.createNativeQuery("delete from rhq_alert_condition_log");
- em.createNativeQuery("delete from rhq_alert");
- em.createNativeQuery("delete from rhq_alert_condition");
- em.createNativeQuery("delete from rhq_alert_dampen_event");
- em.createNativeQuery("delete from rhq_alert_definition");
- em.createNativeQuery("delete from rhq_event");
- em.createNativeQuery("delete from rhq_event_source");
- em.createNativeQuery("delete from rhq_event_def");
- em.createNativeQuery("delete from rhq_operation_schedule");
- em.createNativeQuery("delete from rhq_operation_history");
- em.createNativeQuery("delete from rhq_operation_def");
- em.createNativeQuery("delete from rhq_dashboard_portlet");
- em.createNativeQuery("delete from rhq_dashboard");
- em.createNativeQuery("delete from rhq_saved_search");
- em.createNativeQuery("delete from rhq_subject_role_ldap_map");
- em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
- em.createNativeQuery("delete from rhq_role_ldap_group");
- em.createNativeQuery("delete from rhq_role_resource_group_map");
- em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_tagging_res_group_map");
- em.createNativeQuery("delete from rhq_tagging_resource_map");
- em.createNativeQuery("delete from rhq_tagging");
- em.createNativeQuery("delete from rhq_config_update");
- em.createNativeQuery("delete from rhq_config_group_update");
- em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
- em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
- em.createNativeQuery("delete from rhq_resource_group");
- em.createNativeQuery("delete from rhq_group_def");
- em.createNativeQuery("delete from rhq_resource_error");
- em.createNativeQuery("delete from rhq_resource");
- em.createNativeQuery("delete from rhq_prd_ver");
- em.createNativeQuery("delete from rhq_process_scan");
- em.createNativeQuery("delete from rhq_resource_type_parents");
- em.createNativeQuery("delete from rhq_resource_subcat");
- em.createNativeQuery("delete from rhq_resource_type");
- em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
- em.createNativeQuery("delete from rhq_principal where id <> 2");
- em.createNativeQuery("delete from rhq_failover_details");
- em.createNativeQuery("delete from rhq_failover_list");
- em.createNativeQuery("delete from rhq_partition_details");
- em.createNativeQuery("delete from rhq_partition_event");
- em.createNativeQuery("delete from rhq_agent");
- em.createNativeQuery("delete from rhq_server");
- em.createNativeQuery("delete from rhq_affinity_group");
- em.createNativeQuery("delete from rhq_raw_config");
- em.createNativeQuery("delete from rhq_config_template");
- em.createNativeQuery("delete from rhq_config_property");
- em.createNativeQuery("delete from rhq_config");
- em.createNativeQuery("delete from rhq_config_prop_constr");
- em.createNativeQuery("delete from rhq_conf_prop_def_enum");
- em.createNativeQuery("delete from rhq_config_pd_osrc");
- em.createNativeQuery("delete from rhq_config_prop_def");
- em.createNativeQuery("delete from rhq_config_prop_grp_def");
- em.createNativeQuery("delete from rhq_config_def");
- }
- });
- }
-
- public static interface TransactionCallback {
- void execute() throws Exception;
- }
}
\ No newline at end of file
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 3ed6856..5c6e85c 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -15,6 +15,16 @@
<dependencies>
<dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
diff --git a/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
new file mode 100644
index 0000000..349b84c
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/JPAUtils.java
@@ -0,0 +1,207 @@
+package org.rhq.test;
+
+import java.util.Hashtable;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+
+public class JPAUtils {
+
+ public static InitialContext getInitialContext() {
+ Hashtable<String, String> env = new Hashtable<String, String>();
+ env.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
+ env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ try {
+ return new InitialContext(env);
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load initial context", e);
+ }
+ }
+
+ public static EntityManager lookupEntityManager() {
+ try {
+ return ((EntityManagerFactory) getInitialContext().lookup("java:/RHQEntityManagerFactory"))
+ .createEntityManager();
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load entity manager", e);
+ }
+ }
+
+ public static TransactionManager lookupTransactionManager() {
+ try {
+ return (TransactionManager) getInitialContext().lookup("java:/TransactionManager");
+ } catch (NamingException e) {
+ throw new RuntimeException("Failed to load transaction manager", e);
+ }
+ }
+
+ public static void executeInTransaction(TransactionCallback callback) {
+ try {
+ lookupTransactionManager().begin();
+ callback.execute();
+ lookupTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ lookupTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
+ }
+
+ public static void clearDB() {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ EntityManager em = lookupEntityManager();
+
+ em.createNativeQuery("delete from jms_subscriptions");
+ em.createNativeQuery("delete from jms_roles");
+ em.createNativeQuery("delete from jms_users");
+ em.createNativeQuery("delete from jms_transactions");
+ em.createNativeQuery("delete from jms_messages");
+ em.createNativeQuery("delete from rhq_drift_config_map");
+ em.createNativeQuery("delete from rhq_drift_template_map");
+ em.createNativeQuery("delete from rhq_delete_res_hist");
+ em.createNativeQuery("delete from rhq_create_res_hist");
+ em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_map");
+ em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
+ em.createNativeQuery("delete from rhq_bundle_res_deploy");
+ em.createNativeQuery("delete from rhq_bundle_deployment");
+ em.createNativeQuery("delete from rhq_bundle_destination");
+ em.createNativeQuery("delete from rhq_bundle_file");
+ em.createNativeQuery("delete from rhq_bundle_version_repo");
+ em.createNativeQuery("delete from rhq_bundle_version");
+ em.createNativeQuery("delete from rhq_bundle");
+ em.createNativeQuery("delete from rhq_bundle_type");
+ em.createNativeQuery("delete from rhq_repo_advisory");
+ em.createNativeQuery("delete from rhq_advisory_buglist");
+ em.createNativeQuery("delete from rhq_advisory_cve");
+ em.createNativeQuery("delete from rhq_cve");
+ em.createNativeQuery("delete from rhq_advisory_package");
+ em.createNativeQuery("delete from rhq_advisory");
+ em.createNativeQuery("delete from rhq_distribution_file");
+ em.createNativeQuery("delete from rhq_repo_distribution");
+ em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_pkg_prd_map");
+ em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_pkg_version_map");
+ em.createNativeQuery("delete from rhq_repo_repo_relation_map");
+ em.createNativeQuery("delete from rhq_repo_repo_group_map");
+ em.createNativeQuery("delete from rhq_repo_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_resource_map");
+ em.createNativeQuery("delete from rhq_package_inst_step");
+ em.createNativeQuery("delete from rhq_repo_sync");
+ em.createNativeQuery("delete from rhq_content_src_sync");
+ em.createNativeQuery("delete from rhq_installed_pkg_hist");
+ em.createNativeQuery("delete from rhq_installed_package");
+ em.createNativeQuery("delete from rhq_content_req");
+ em.createNativeQuery("delete from rhq_package_version");
+ em.createNativeQuery("delete from rhq_package_bits");
+ em.createNativeQuery("delete from rhq_package");
+ em.createNativeQuery("delete from rhq_package_type");
+ em.createNativeQuery("delete from rhq_repo_relation");
+ em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_repo");
+ em.createNativeQuery("delete from rhq_repo_group");
+ em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
+ em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
+ em.createNativeQuery("delete from rhq_meas_data_num_r14");
+ em.createNativeQuery("delete from rhq_meas_data_num_r13");
+ em.createNativeQuery("delete from rhq_meas_data_num_r12");
+ em.createNativeQuery("delete from rhq_meas_data_num_r11");
+ em.createNativeQuery("delete from rhq_meas_data_num_r10");
+ em.createNativeQuery("delete from rhq_meas_data_num_r09");
+ em.createNativeQuery("delete from rhq_meas_data_num_r08");
+ em.createNativeQuery("delete from rhq_meas_data_num_r07");
+ em.createNativeQuery("delete from rhq_meas_data_num_r06");
+ em.createNativeQuery("delete from rhq_meas_data_num_r05");
+ em.createNativeQuery("delete from rhq_meas_data_num_r04");
+ em.createNativeQuery("delete from rhq_meas_data_num_r03");
+ em.createNativeQuery("delete from rhq_meas_data_num_r02");
+ em.createNativeQuery("delete from rhq_meas_data_num_r01");
+ em.createNativeQuery("delete from rhq_meas_data_num_r00");
+ em.createNativeQuery("delete from rhq_measurement_oob_tmp");
+ em.createNativeQuery("delete rhq_measurement_oob");
+ em.createNativeQuery("delete rhq_resource_avail");
+ em.createNativeQuery("delete from rhq_availability");
+ em.createNativeQuery("delete from rhq_calltime_data_value");
+ em.createNativeQuery("delete from rhq_calltime_data_key");
+ em.createNativeQuery("delete from rhq_measurement_data_trait");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1d");
+ em.createNativeQuery("delete from rhq_measurement_data_num_6h");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1h");
+ em.createNativeQuery("delete from rhq_measurement_bline");
+ em.createNativeQuery("delete from rhq_measurement_sched");
+ em.createNativeQuery("delete from rhq_measurement_def");
+ em.createNativeQuery("delete from rhq_plugin");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_alert_notification");
+ em.createNativeQuery("delete from rhq_alert_condition_log");
+ em.createNativeQuery("delete from rhq_alert");
+ em.createNativeQuery("delete from rhq_alert_condition");
+ em.createNativeQuery("delete from rhq_alert_dampen_event");
+ em.createNativeQuery("delete from rhq_alert_definition");
+ em.createNativeQuery("delete from rhq_event");
+ em.createNativeQuery("delete from rhq_event_source");
+ em.createNativeQuery("delete from rhq_event_def");
+ em.createNativeQuery("delete from rhq_operation_schedule");
+ em.createNativeQuery("delete from rhq_operation_history");
+ em.createNativeQuery("delete from rhq_operation_def");
+ em.createNativeQuery("delete from rhq_dashboard_portlet");
+ em.createNativeQuery("delete from rhq_dashboard");
+ em.createNativeQuery("delete from rhq_saved_search");
+ em.createNativeQuery("delete from rhq_subject_role_ldap_map");
+ em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_role_ldap_group");
+ em.createNativeQuery("delete from rhq_role_resource_group_map");
+ em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_tagging_res_group_map");
+ em.createNativeQuery("delete from rhq_tagging_resource_map");
+ em.createNativeQuery("delete from rhq_tagging");
+ em.createNativeQuery("delete from rhq_config_update");
+ em.createNativeQuery("delete from rhq_config_group_update");
+ em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
+ em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
+ em.createNativeQuery("delete from rhq_resource_group");
+ em.createNativeQuery("delete from rhq_group_def");
+ em.createNativeQuery("delete from rhq_resource_error");
+ em.createNativeQuery("delete from rhq_resource");
+ em.createNativeQuery("delete from rhq_prd_ver");
+ em.createNativeQuery("delete from rhq_process_scan");
+ em.createNativeQuery("delete from rhq_resource_type_parents");
+ em.createNativeQuery("delete from rhq_resource_subcat");
+ em.createNativeQuery("delete from rhq_resource_type");
+ em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_principal where id <> 2");
+ em.createNativeQuery("delete from rhq_failover_details");
+ em.createNativeQuery("delete from rhq_failover_list");
+ em.createNativeQuery("delete from rhq_partition_details");
+ em.createNativeQuery("delete from rhq_partition_event");
+ em.createNativeQuery("delete from rhq_agent");
+ em.createNativeQuery("delete from rhq_server");
+ em.createNativeQuery("delete from rhq_affinity_group");
+ em.createNativeQuery("delete from rhq_raw_config");
+ em.createNativeQuery("delete from rhq_config_template");
+ em.createNativeQuery("delete from rhq_config_property");
+ em.createNativeQuery("delete from rhq_config");
+ em.createNativeQuery("delete from rhq_config_prop_constr");
+ em.createNativeQuery("delete from rhq_conf_prop_def_enum");
+ em.createNativeQuery("delete from rhq_config_pd_osrc");
+ em.createNativeQuery("delete from rhq_config_prop_def");
+ em.createNativeQuery("delete from rhq_config_prop_grp_def");
+ em.createNativeQuery("delete from rhq_config_def");
+ }
+ });
+ }
+
+}
diff --git a/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java b/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java
new file mode 100644
index 0000000..711df43
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/TransactionCallback.java
@@ -0,0 +1,7 @@
+package org.rhq.test;
+
+public interface TransactionCallback {
+
+ void execute() throws Exception;
+
+}
commit b8cf92971d297313e8853a73aa537fddf6742e57
Author: John Sanda <jsanda(a)redhat.com>
Date: Sat Jul 23 07:09:35 2011 -0400
Adding support for version and date ranges in DriftChangeSetCriteria
Version and/or date ranges are needed in order to fetch multiple change
sets to build a snapshot. This commit also includes new set up code in
the base test class AbstractEJB3Test. It clears all database tables
which should be more robust than the approach taken with dbunit.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
index 6ba63df..1b3effc 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetCriteria.java
@@ -15,6 +15,22 @@ public interface DriftChangeSetCriteria extends Serializable {
String getFilterVersion();
+ void addFilterStartVersion(String filterStartVersion);
+
+ String getFilterStartVersion();
+
+ void addFilterEndVersion(String filterEndVersion);
+
+ String getFilterEndVersion();
+
+ void addFilterCreatedAfter(Long filterCreatedAfter);
+
+ Long getFilterCreatedAfter();
+
+ void addFilterCreatedBefore(Long filterCreatedBefore);
+
+ Long getFilterCreatedBefore();
+
void addFilterResourceId(Integer filterResourceId);
Integer getFilterResourceId();
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
index 9b39cc3..6c17877 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/DriftChangeSetJPACriteria.java
@@ -40,6 +40,10 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
private Integer filterInitial; // needs override
private Integer filterResourceId; // needs override
private String filterVersion;
+ private String filterStartVersion;
+ private String filterEndVersion;
+ private Long filterCreatedAfter;
+ private Long filterCreatedBefore;
private DriftChangeSetCategory filterCategory;
private boolean fetchDrifts;
@@ -48,6 +52,10 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
public DriftChangeSetJPACriteria() {
filterOverrides.put("initial", "version = 0");
filterOverrides.put("resourceId", "resource.id = ?");
+ filterOverrides.put("filterStartVersion", "version >= ?");
+ filterOverrides.put("filterEndVersion", "version <= ?");
+ filterOverrides.put("filterCreatedAfter", "ctime >= ?");
+ filterOverrides.put("filterCreatedBefore", "ctime <= ?");
}
@Override
@@ -75,6 +83,46 @@ public class DriftChangeSetJPACriteria extends Criteria implements DriftChangeSe
return filterVersion;
}
+ @Override
+ public void addFilterStartVersion(String filterStartVersion) {
+ this.filterStartVersion = filterStartVersion;
+ }
+
+ @Override
+ public String getFilterStartVersion() {
+ return filterStartVersion;
+ }
+
+ @Override
+ public void addFilterEndVersion(String filterEndVersion) {
+ this.filterEndVersion = filterEndVersion;
+ }
+
+ @Override
+ public String getFilterEndVersion() {
+ return filterEndVersion;
+ }
+
+ @Override
+ public void addFilterCreatedAfter(Long filterCreatedAfter) {
+ this.filterCreatedAfter = filterCreatedAfter;
+ }
+
+ @Override
+ public Long getFilterCreatedAfter() {
+ return filterCreatedAfter;
+ }
+
+ @Override
+ public void addFilterCreatedBefore(Long filterCreatedBefore) {
+ this.filterCreatedBefore = filterCreatedBefore;
+ }
+
+ @Override
+ public Long getFilterCreatedBefore() {
+ return filterCreatedBefore;
+ }
+
public void addFilterResourceId(Integer filterResourceId) {
this.filterResourceId = filterResourceId;
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
index abc300d..c9e61ef 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/RhqDriftChangeSetTest.java
@@ -1,11 +1,12 @@
package org.rhq.core.domain.drift;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
+import javax.persistence.EntityManager;
import javax.transaction.SystemException;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -20,10 +21,6 @@ import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
public class RhqDriftChangeSetTest extends AbstractEJB3Test {
- static interface TransactionCallback {
- void execute() throws Exception;
- }
-
Resource resource;
DriftConfiguration driftConfig;
@@ -44,23 +41,23 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
resource.setDriftConfigurations(driftConfigs);
- executeInTransaction(new TransactionCallback() {
- @Override
- public void execute() throws Exception {
- getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
-
- // Cascading deletes for Resource.driftConfigurations does not work, nor does it
- // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
- // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
- // native SQL to perform the delete on the join table rhq_drift_config_map.
- //
- // jsanda
- getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
-
- getEntityManager().createQuery("delete from Resource").executeUpdate();
- getEntityManager().createQuery("delete from ResourceType").executeUpdate();
- }
- });
+// executeInTransaction(new TransactionCallback() {
+// @Override
+// public void execute() throws Exception {
+// getEntityManager().createQuery("delete from RhqDriftChangeSet").executeUpdate();
+//
+// // Cascading deletes for Resource.driftConfigurations does not work, nor does it
+// // appear the orphan deletes work either. I came across https://hibernate.onjira.com/browse/HHH-1917
+// // and https://hibernate.onjira.com/browse/HHH-1917 which led me to using
+// // native SQL to perform the delete on the join table rhq_drift_config_map.
+// //
+// // jsanda
+// getEntityManager().createNativeQuery("delete from rhq_drift_config_map").executeUpdate();
+//
+// getEntityManager().createQuery("delete from Resource").executeUpdate();
+// getEntityManager().createQuery("delete from ResourceType").executeUpdate();
+// }
+// });
executeInTransaction(new TransactionCallback() {
@Override
@@ -115,19 +112,4 @@ public class RhqDriftChangeSetTest extends AbstractEJB3Test {
});
}
- void executeInTransaction(TransactionCallback callback) {
- try {
- getTransactionManager().begin();
- callback.execute();
- getTransactionManager().commit();
- } catch (Throwable t) {
- try {
- getTransactionManager().rollback();
- } catch (SystemException e) {
- throw new RuntimeException("Failed to rollback transaction", e);
- }
- throw new RuntimeException(t.getCause());
- }
- }
-
}
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
index 57ec318..aa6e0e0 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java
@@ -31,20 +31,26 @@ import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
+import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterGroups;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite;
import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
import org.jboss.ejb3.embedded.EJB3StandaloneDeployer;
public abstract class AbstractEJB3Test extends AssertJUnit {
-// @BeforeSuite(groups = "integration.ejb3")
- @BeforeGroups(groups = "integration.ejb3")
+
+ @BeforeClass
+ public void resetDB() throws Exception {
+ clearDB();
+ }
+
+ @BeforeSuite(groups = "integration.ejb3")
+ //@BeforeGroups(groups = "integration.ejb3")
public static void startupEmbeddedJboss() {
System.out.println("Starting ejb3...");
String classesDir = System.getProperty("ejbjarDirectory", "target/classes");
@@ -140,4 +146,173 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
referenceTime += offset;
return new Date(referenceTime);
}
+
+ protected void executeInTransaction(TransactionCallback callback) {
+ try {
+ getTransactionManager().begin();
+ callback.execute();
+ getTransactionManager().commit();
+ } catch (Throwable t) {
+ try {
+ getTransactionManager().rollback();
+ } catch (SystemException e) {
+ throw new RuntimeException("Failed to rollback transaction", e);
+ }
+ throw new RuntimeException(t.getCause());
+ }
+ }
+
+ void clearDB() throws Exception {
+ executeInTransaction(new TransactionCallback() {
+ @Override
+ public void execute() throws Exception {
+ EntityManager em = getEntityManager();
+
+ em.createNativeQuery("delete from jms_subscriptions");
+ em.createNativeQuery("delete from jms_roles");
+ em.createNativeQuery("delete from jms_users");
+ em.createNativeQuery("delete from jms_transactions");
+ em.createNativeQuery("delete from jms_messages");
+ em.createNativeQuery("delete from rhq_drift_config_map");
+ em.createNativeQuery("delete from rhq_drift_template_map");
+ em.createNativeQuery("delete from rhq_delete_res_hist");
+ em.createNativeQuery("delete from rhq_create_res_hist");
+ em.createNativeQuery("delete from rhq_tagging_bundle_dest_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_deploy_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_version_map");
+ em.createNativeQuery("delete from rhq_tagging_bundle_map");
+ em.createNativeQuery("delete from rhq_bundle_res_dep_hist");
+ em.createNativeQuery("delete from rhq_bundle_res_deploy");
+ em.createNativeQuery("delete from rhq_bundle_deployment");
+ em.createNativeQuery("delete from rhq_bundle_destination");
+ em.createNativeQuery("delete from rhq_bundle_file");
+ em.createNativeQuery("delete from rhq_bundle_version_repo");
+ em.createNativeQuery("delete from rhq_bundle_version");
+ em.createNativeQuery("delete from rhq_bundle");
+ em.createNativeQuery("delete from rhq_bundle_type");
+ em.createNativeQuery("delete from rhq_repo_advisory");
+ em.createNativeQuery("delete from rhq_advisory_buglist");
+ em.createNativeQuery("delete from rhq_advisory_cve");
+ em.createNativeQuery("delete from rhq_cve");
+ em.createNativeQuery("delete from rhq_advisory_package");
+ em.createNativeQuery("delete from rhq_advisory");
+ em.createNativeQuery("delete from rhq_distribution_file");
+ em.createNativeQuery("delete from rhq_repo_distribution");
+ em.createNativeQuery("delete from rhq_distribution where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_pkg_prd_map");
+ em.createNativeQuery("delete from rhq_pkg_ver_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_pkg_version_map");
+ em.createNativeQuery("delete from rhq_repo_repo_relation_map");
+ em.createNativeQuery("delete from rhq_repo_repo_group_map");
+ em.createNativeQuery("delete from rhq_repo_content_src_map");
+ em.createNativeQuery("delete from rhq_repo_resource_map");
+ em.createNativeQuery("delete from rhq_package_inst_step");
+ em.createNativeQuery("delete from rhq_repo_sync");
+ em.createNativeQuery("delete from rhq_content_src_sync");
+ em.createNativeQuery("delete from rhq_installed_pkg_hist");
+ em.createNativeQuery("delete from rhq_installed_package");
+ em.createNativeQuery("delete from rhq_content_req");
+ em.createNativeQuery("delete from rhq_package_version");
+ em.createNativeQuery("delete from rhq_package_bits");
+ em.createNativeQuery("delete from rhq_package");
+ em.createNativeQuery("delete from rhq_package_type");
+ em.createNativeQuery("delete from rhq_repo_relation");
+ em.createNativeQuery("delete from rhq_repo_relation_type where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_repo");
+ em.createNativeQuery("delete from rhq_repo_group");
+ em.createNativeQuery("delete from rhq_repo_group_type where id <> 1");
+ em.createNativeQuery("delete from rhq_archirtecture where id < 1 and id > 38");
+ em.createNativeQuery("delete from rhq_meas_data_num_r14");
+ em.createNativeQuery("delete from rhq_meas_data_num_r13");
+ em.createNativeQuery("delete from rhq_meas_data_num_r12");
+ em.createNativeQuery("delete from rhq_meas_data_num_r11");
+ em.createNativeQuery("delete from rhq_meas_data_num_r10");
+ em.createNativeQuery("delete from rhq_meas_data_num_r09");
+ em.createNativeQuery("delete from rhq_meas_data_num_r08");
+ em.createNativeQuery("delete from rhq_meas_data_num_r07");
+ em.createNativeQuery("delete from rhq_meas_data_num_r06");
+ em.createNativeQuery("delete from rhq_meas_data_num_r05");
+ em.createNativeQuery("delete from rhq_meas_data_num_r04");
+ em.createNativeQuery("delete from rhq_meas_data_num_r03");
+ em.createNativeQuery("delete from rhq_meas_data_num_r02");
+ em.createNativeQuery("delete from rhq_meas_data_num_r01");
+ em.createNativeQuery("delete from rhq_meas_data_num_r00");
+ em.createNativeQuery("delete from rhq_measurement_oob_tmp");
+ em.createNativeQuery("delete rhq_measurement_oob");
+ em.createNativeQuery("delete rhq_resource_avail");
+ em.createNativeQuery("delete from rhq_availability");
+ em.createNativeQuery("delete from rhq_calltime_data_value");
+ em.createNativeQuery("delete from rhq_calltime_data_key");
+ em.createNativeQuery("delete from rhq_measurement_data_trait");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1d");
+ em.createNativeQuery("delete from rhq_measurement_data_num_6h");
+ em.createNativeQuery("delete from rhq_measurement_data_num_1h");
+ em.createNativeQuery("delete from rhq_measurement_bline");
+ em.createNativeQuery("delete from rhq_measurement_sched");
+ em.createNativeQuery("delete from rhq_measurement_def");
+ em.createNativeQuery("delete from rhq_plugin");
+ em.createNativeQuery("delete from rhq_system_config where id not in (1, 2, 3, 4, 9, 10, 32, 34, 35, 36, 51, 52, 53, 54, 55, 56)");
+ em.createNativeQuery("delete from rhq_alert_notification");
+ em.createNativeQuery("delete from rhq_alert_condition_log");
+ em.createNativeQuery("delete from rhq_alert");
+ em.createNativeQuery("delete from rhq_alert_condition");
+ em.createNativeQuery("delete from rhq_alert_dampen_event");
+ em.createNativeQuery("delete from rhq_alert_definition");
+ em.createNativeQuery("delete from rhq_event");
+ em.createNativeQuery("delete from rhq_event_source");
+ em.createNativeQuery("delete from rhq_event_def");
+ em.createNativeQuery("delete from rhq_operation_schedule");
+ em.createNativeQuery("delete from rhq_operation_history");
+ em.createNativeQuery("delete from rhq_operation_def");
+ em.createNativeQuery("delete from rhq_dashboard_portlet");
+ em.createNativeQuery("delete from rhq_dashboard");
+ em.createNativeQuery("delete from rhq_saved_search");
+ em.createNativeQuery("delete from rhq_subject_role_ldap_map");
+ em.createNativeQuery("delete from rhq_subject_role_map where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_permission where role_id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_role_ldap_group");
+ em.createNativeQuery("delete from rhq_role_resource_group_map");
+ em.createNativeQuery("delete from rhq_role where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_tagging_res_group_map");
+ em.createNativeQuery("delete from rhq_tagging_resource_map");
+ em.createNativeQuery("delete from rhq_tagging");
+ em.createNativeQuery("delete from rhq_config_update");
+ em.createNativeQuery("delete from rhq_config_group_update");
+ em.createNativeQuery("delete from rhq_resource_group_res_exp_map");
+ em.createNativeQuery("delete from rhq_resource_group_res_imp_map");
+ em.createNativeQuery("delete from rhq_resource_group");
+ em.createNativeQuery("delete from rhq_group_def");
+ em.createNativeQuery("delete from rhq_resource_error");
+ em.createNativeQuery("delete from rhq_resource");
+ em.createNativeQuery("delete from rhq_prd_ver");
+ em.createNativeQuery("delete from rhq_process_scan");
+ em.createNativeQuery("delete from rhq_resource_type_parents");
+ em.createNativeQuery("delete from rhq_resource_subcat");
+ em.createNativeQuery("delete from rhq_resource_type");
+ em.createNativeQuery("delete from rhq_subject where id not in (1, 2)");
+ em.createNativeQuery("delete from rhq_principal where id <> 2");
+ em.createNativeQuery("delete from rhq_failover_details");
+ em.createNativeQuery("delete from rhq_failover_list");
+ em.createNativeQuery("delete from rhq_partition_details");
+ em.createNativeQuery("delete from rhq_partition_event");
+ em.createNativeQuery("delete from rhq_agent");
+ em.createNativeQuery("delete from rhq_server");
+ em.createNativeQuery("delete from rhq_affinity_group");
+ em.createNativeQuery("delete from rhq_raw_config");
+ em.createNativeQuery("delete from rhq_config_template");
+ em.createNativeQuery("delete from rhq_config_property");
+ em.createNativeQuery("delete from rhq_config");
+ em.createNativeQuery("delete from rhq_config_prop_constr");
+ em.createNativeQuery("delete from rhq_conf_prop_def_enum");
+ em.createNativeQuery("delete from rhq_config_pd_osrc");
+ em.createNativeQuery("delete from rhq_config_prop_def");
+ em.createNativeQuery("delete from rhq_config_prop_grp_def");
+ em.createNativeQuery("delete from rhq_config_def");
+ }
+ });
+ }
+
+ public static interface TransactionCallback {
+ void execute() throws Exception;
+ }
}
\ No newline at end of file
commit ae72c575c529a40462ccb7495252c7a5cff6dbb8
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 22 16:09:08 2011 -0400
stub out the new drift change sets subtab
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
new file mode 100644
index 0000000..f610b8b
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftChangeSetsView.java
@@ -0,0 +1,48 @@
+/*
+ * 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.enterprise.gui.coregui.client.drift;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * A view that displays a tree of all change sets and their related drift trails.
+ *
+ * @author John Mazzitelli
+ */
+public class DriftChangeSetsView extends LocatableVLayout {
+
+ private EntityContext context;
+ private boolean hasWriteAccess;
+
+ protected DriftChangeSetsView(String locatorId, String tableTitle, EntityContext context, boolean hasWriteAccess) {
+ super(locatorId);
+ this.context = context;
+ this.hasWriteAccess = hasWriteAccess;
+ }
+
+ public EntityContext getContext() {
+ return context;
+ }
+
+ protected boolean hasWriteAccess() {
+ return this.hasWriteAccess;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java
new file mode 100644
index 0000000..ab54e88
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/ResourceDriftChangeSetsView.java
@@ -0,0 +1,40 @@
+/*
+ * 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.enterprise.gui.coregui.client.drift;
+
+import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
+
+/**
+ * @author John Mazzitelli
+ */
+public class ResourceDriftChangeSetsView extends DriftChangeSetsView {
+ public static ResourceDriftChangeSetsView get(String locatorId, ResourceComposite composite) {
+ String tableTitle = MSG.view_drift_changeSets_resourceViewTitle();
+ EntityContext context = EntityContext.forResource(composite.getResource().getId());
+ boolean hasWriteAccess = composite.getResourcePermission().isDrift();
+ return new ResourceDriftChangeSetsView(locatorId, tableTitle, context, hasWriteAccess);
+ }
+
+ private ResourceDriftChangeSetsView(String locatorId, String tableTitle, EntityContext context,
+ boolean hasWriteAccess) {
+ super(locatorId, tableTitle, context, hasWriteAccess);
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index b8031ea..4efc189 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -50,6 +50,7 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.SubTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewFactory;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftChangeSetsView;
import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftConfigurationView;
import org.rhq.enterprise.gui.coregui.client.drift.ResourceDriftHistoryView;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -98,6 +99,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
public static class DriftSubTab {
public static final String CONFIGURATION = "Configuration";
public static final String HISTORY = "History";
+ public static final String CHANGE_SETS = "ChangeSets";
}
public static class OperationsSubTab {
@@ -143,6 +145,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
private SubTab configHistory;
private SubTab eventHistory;
private SubTab driftHistory;
+ private SubTab driftChangeSets;
private SubTab driftConfig;
private SubTab contentDeployed;
private SubTab contentNew;
@@ -242,9 +245,11 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
.view_tabs_common_drift()), "subsystems/drift/Drift_16.png");
this.driftHistory = new SubTab(driftTab.extendLocatorId(DriftSubTab.HISTORY), new ViewName(DriftSubTab.HISTORY,
MSG.view_tabs_common_history()), null);
+ this.driftChangeSets = new SubTab(driftTab.extendLocatorId(DriftSubTab.CHANGE_SETS), new ViewName(
+ DriftSubTab.CHANGE_SETS, MSG.view_drift_changeSets()), null);
this.driftConfig = new SubTab(driftTab.extendLocatorId(DriftSubTab.CONFIGURATION), new ViewName(
DriftSubTab.CONFIGURATION, MSG.view_tabs_common_configuration()), null);
- driftTab.registerSubTabs(driftHistory, driftConfig);
+ driftTab.registerSubTabs(driftHistory, driftChangeSets, driftConfig);
tabs.add(driftTab);
contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
@@ -521,6 +526,13 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
}
});
+ updateSubTab(this.driftTab, this.driftChangeSets, true, true, new ViewFactory() {
+ @Override
+ public Canvas createView() {
+ return ResourceDriftChangeSetsView.get(driftChangeSets.extendLocatorId("View"), resourceComposite);
+ }
+ });
+
updateSubTab(this.driftTab, this.driftConfig, true, true, new ViewFactory() {
@Override
public Canvas createView() {
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 354e504..c7d6f91 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1121,6 +1121,8 @@ view_drift_button_detectNow = Detect Now
view_drift_category_fileAdded = File Added
view_drift_category_fileChanged = File Changed
view_drift_category_fileRemoved = File Removed
+view_drift_changeSets = Change Sets
+view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
view_drift_delete_confirm = Delete the selected drift(s)?
view_drift_delete_confirmAll = Delete all drifts from this source?
view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index f117bdf..5fe14aa 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -939,6 +939,8 @@ view_dashboards_title = Dashboard
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
##view_drift_category_fileRemoved = File Removed
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index f343153..6bce847 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1104,6 +1104,8 @@ view_dashboards_portlets_refresh_success1 = ããŒãã¬ããã®èªåãªãã¬
view_dashboards_portlets_refresh_success2 = èªåãªãã¬ãã·ã¥ããããŒãã¬ããã®ãªããŒããåæ¢ããŠããŸã
view_dashboards_title = ããã·ã¥ããŒã
##view_drift = Drift
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 516f235..bd2b6fb 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1139,6 +1139,8 @@ view_dashboards_title = Dashboard~
##view_drift_category_fileAdded = File Added
##view_drift_category_fileChanged = File Changed
##view_drift_category_fileRemoved = File Removed
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_delete_confirm = Delete the selected drift(s)?
##view_drift_delete_confirmAll = Delete all drifts from this source?
##view_drift_failure_delete = Failed to delete drift targets with id''s: {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index bcac425..9fa9115 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1113,6 +1113,8 @@ view_dashboards_portlets_refresh_success1 = \u6210\u529f\u4fee\u6539portlets\u81
view_dashboards_portlets_refresh_success2 = \u6210\u529f\u505c\u7528portlets\u81ea\u52a8\u5237\u65b0\u7684\u91cd\u8f7d
view_dashboards_title = \u7edf\u8ba1\u8868\u76d8
##view_drift = Drift
+##view_drift_changeSets = Change Sets
+##view_drift_changeSets_resourceViewTitle = Resource Drift Change Sets
##view_drift_table_baseDir = Base Directory
##view_drift_table_changeSet = Change Set
##view_drift_table_newFile = New File
commit 606ae34fc2e8d3ee88db8ae6904ef4a9cc914053
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 22 13:22:56 2011 -0400
Adding support for generating snapshot diffs
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
new file mode 100644
index 0000000..89f3286
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DiffReport.java
@@ -0,0 +1,38 @@
+package org.rhq.enterprise.server.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DiffReport<T> {
+
+ private List<T> notInLeft = new ArrayList<T>();
+
+ private List<T> notInRight = new ArrayList<T>();
+
+ private List<T> conflicts = new ArrayList<T>();
+
+ public List<T> getElementsNotInLeft() {
+ return notInLeft;
+ }
+
+ public void elementNotInLeft(T element) {
+ notInLeft.add(element);
+ }
+
+ public List<T> getElementsNotInRight() {
+ return notInRight;
+ }
+
+ public void elementNotInRight(T element) {
+ notInRight.add(element);
+ }
+
+ public List<T> getElementsInConflict() {
+ return conflicts;
+ }
+
+ public void elementInConflict(T element) {
+ conflicts.add(element);
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
index 2efc8d8..5dc18fa 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -1,12 +1,13 @@
package org.rhq.enterprise.server.drift;
import java.io.Serializable;
-import java.util.Comparator;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftFile;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -16,30 +17,56 @@ public class Snapshot implements Serializable {
private int version;
- private Set<Drift> entries = new TreeSet<Drift>(new Comparator<Drift>() {
- @Override
- public int compare(Drift d1, Drift d2) {
- return d1.getPath().compareTo(d2.getPath());
- }
- });
+ private Map<String, Drift> entries = new TreeMap<String, Drift>();
public int getVersion() {
return version;
}
- public Set<Drift> getEntries() {
- return entries;
+ public Collection<Drift> getEntries() {
+ return entries.values();
}
public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
for (Drift entry : changeSet.getDrifts()) {
- entries.remove(entry);
+ entries.remove(entry.getPath());
if (entry.getCategory() != FILE_REMOVED) {
- entries.add(entry);
+ entries.put(entry.getPath(), entry);
}
}
version = changeSet.getVersion();
return this;
}
+ public DiffReport diff(Snapshot right) {
+ Snapshot left = this;
+ DiffReport<Drift> diff = new DiffReport<Drift>();
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ if (!right.entries.containsKey(entry.getKey())) {
+ diff.elementNotInRight(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : right.entries.entrySet()) {
+ if (!left.entries.containsKey(entry.getKey())) {
+ diff.elementNotInLeft(entry.getValue());
+ }
+ }
+
+ for (Map.Entry<String, Drift> entry : left.entries.entrySet()) {
+ Drift rightDrift = right.entries.get(entry.getKey());
+ if (rightDrift != null) {
+ DriftFile leftFile = entry.getValue().getNewDriftFile();
+ DriftFile rightFile = rightDrift.getNewDriftFile();
+
+ if (!leftFile.getHashId().equals(rightFile.getHashId())) {
+ diff.elementInConflict(entry.getValue());
+ }
+ }
+ }
+
+ return diff;
+ }
+
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
index b646b19..47dbb73 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
@@ -12,6 +12,7 @@ import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftFileStatus;
+import static java.util.Arrays.asList;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
@@ -87,6 +88,60 @@ public class SnapshotTest {
"removed.");
}
+ @Test
+ public void diffShowsEntriesInLeftAndNotInRight() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet1).add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsNotInRight(), "Diff report does not contain " +
+ "elements that are in the left but not in the right.");
+ }
+
+ @Test
+ public void diffShowsEntriesInRightAndNotInLeft() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a3b6c9", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry1), diff.getElementsNotInLeft(), "Diff report does not contain " +
+ "elements that are in the left but not in the right");
+ }
+
+ @Test
+ public void diffShowsEntriesInLeftAndRightThatAreInConflict() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1);
+ Snapshot right = new Snapshot().add(changeSet1);
+
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("c3b2a1", 1024, LOADED), "/drfit/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry2);
+ Snapshot left = new Snapshot().add(changeSet2);
+
+ DiffReport diff = left.diff(right);
+
+ assertCollectionMatchesNoOrder(asList(entry2), diff.getElementsInConflict(), "Diff report does not contain " +
+ "element that are in both left and right and are in conflict");
+ }
+
<E> Set<E> asSet(E... elements) {
HashSet<E> set = new HashSet<E>();
for (E element : elements) {
commit 8736df77b8eb3ff47484c6b0ca17a9a52aca8fb6
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 22:03:41 2011 -0400
Adding logic for removing files from a snapshot
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
index 35a4669..2efc8d8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/Snapshot.java
@@ -1,5 +1,6 @@
package org.rhq.enterprise.server.drift;
+import java.io.Serializable;
import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;
@@ -7,7 +8,11 @@ import java.util.TreeSet;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
-public class Snapshot {
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
+
+public class Snapshot implements Serializable {
+
+ private static final long serialVersionUID = 1L;
private int version;
@@ -29,7 +34,9 @@ public class Snapshot {
public <D extends Drift> Snapshot add(DriftChangeSet<D> changeSet) {
for (Drift entry : changeSet.getDrifts()) {
entries.remove(entry);
- entries.add(entry);
+ if (entry.getCategory() != FILE_REMOVED) {
+ entries.add(entry);
+ }
}
version = changeSet.getVersion();
return this;
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
index 627bc2c..b646b19 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/SnapshotTest.java
@@ -14,6 +14,7 @@ import org.rhq.core.domain.drift.DriftFileStatus;
import static org.rhq.core.domain.drift.DriftCategory.FILE_ADDED;
import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
+import static org.rhq.core.domain.drift.DriftCategory.FILE_REMOVED;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
@@ -23,7 +24,7 @@ import static org.testng.Assert.assertEquals;
public class SnapshotTest {
@Test
- public void generateSnapshotForOneChangeSet() throws Exception {
+ public void addChangeSetWithAddedFile() {
int configId = 1;
FakeDriftChangeSet changeSet = new FakeDriftChangeSet(0, COVERAGE, configId)
@@ -37,7 +38,7 @@ public class SnapshotTest {
}
@Test
- public void generateSnapshotWithTwoChangeSetsAndFileAdded() {
+ public void addChangeSetsWithAddedFiles() {
int configId = 1;
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
@@ -54,7 +55,7 @@ public class SnapshotTest {
}
@Test
- public void generateSnapshotWithFileChanged() {
+ public void replaceFileWithChangedVersion() {
int configId = 1;
Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
@@ -66,7 +67,24 @@ public class SnapshotTest {
Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
- assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed build snapshot with file changed");
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with file changed");
+ }
+
+ @Test
+ public void deleteFileThatHasBeenRemoved() {
+ int configId = 1;
+
+ Drift entry1 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("a1b2c3", 1024, LOADED), "/drift/1.txt");
+ Drift entry2 = new FakeDrift(FILE_ADDED, null, new FakeDriftFile("d1f2a3", 1024, LOADED), "/drift/2.txt");
+ FakeDriftChangeSet changeSet1 = new FakeDriftChangeSet(0, COVERAGE, configId).add(entry1).add(entry2);
+
+ Drift entry3 = new FakeDrift(FILE_REMOVED, new FakeDriftFile("a1b2c3", 1024, LOADED), null, "/drift/1.txt");
+ FakeDriftChangeSet changeSet2 = new FakeDriftChangeSet(1, DRIFT, configId).add(entry3);
+
+ Snapshot snapshot = new Snapshot().add(changeSet1).add(changeSet2);
+
+ assertCollectionMatchesNoOrder(asSet(entry2), snapshot.getEntries(), "Failed to build snapshot with a file " +
+ "removed.");
}
<E> Set<E> asSet(E... elements) {
commit 609a2aa1c541eb8f38b98c725d3e513c364653dc
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Jul 27 10:03:45 2011 -0400
add peer-review warning
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index ea2e29d..b1d0bb1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -91,6 +91,12 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* A tabular view of set of data records from an {@link RPCDataSource}.
*
+ * WARNING! If you make _any_ changes to this class, no matter how seemingly
+ * trivial, you must get it peer reviewed. Send out your proposed changes
+ * to the dev mailing list and ask for comments. Any problems introduced to
+ * this class are magnified because it is used in so many UI views and problems
+ * are hard to detect due to the varies ways it is used.
+ *
* @author Greg Hinkle
* @author Ian Springer
*/
commit 23f8cf9f8417f0780b4019b885f9271288ecda05
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jul 26 22:29:16 2011 +0200
Add more properties for JBossWeb. Unfortunately they are read-only in AS7
Follow :read-resource output, as the resource description from AS7 is not up to date.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index d9f79d1..6a8698e 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -614,6 +614,78 @@
<c:simple-property name="path" readOnly="true" default="subsystem=web"/>
</plugin-configuration>
+ <resource-configuration>
+ <c:simple-property name="default-virtual-server" required="false" type="string" readOnly="true" defaultValue="localhost"
+ description="The web container's default virtual server."/>
+ <c:simple-property name="native" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Add the native initialization listener to the web container."/>
+ <c:map-property name="configuration" description="The common web container configuration." >
+ <c:map-property name="static-resources" description="Configuration for static resources" >
+ <c:simple-property name="listings" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable folder listings."/>
+ <c:simple-property name="sendfile" required="false" type="integer" readOnly="true" defaultValue="49152"
+ description="Enable sendfile if possible, for files bigger than the specified byte size."/>
+ <c:simple-property name="read-only" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Allow write HTTP methods (PUT, DELETE)."/>
+ <c:simple-property name="webdav" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable WebDAV functionality."/>
+ <c:simple-property name="secret" required="false" type="string" readOnly="true" description="Secret for WebDAV locking operations."/>
+ <c:simple-property name="max-depth" required="false" type="integer" readOnly="true" defaultValue="3"
+ description="Maximum recursion for PROPFIND."/>
+ <c:simple-property name="disabled" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable the JSP container."/>
+ </c:map-property>
+ <c:map-property name="jsp-configuration" description="JSP container configuration">
+ <c:simple-property name="development" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable the development mode, which gives more information when an error occurs."/>
+ <c:simple-property name="file-encoding" required="false" type="string" readOnly="true" description="Force a file encoding."/>
+ <c:simple-property name="keep-generated" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Keep the generated Servlets."/>
+ <c:simple-property name="trim-spaces" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Trim some spaces from the generated Servlet."/>
+ <c:simple-property name="tag-pooling" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Enable tag pooling."/>
+ <c:simple-property name="mapped-file" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Map to the JSP source."/>
+ <c:simple-property name="check-interval" required="false" type="integer" readOnly="true" defaultValue="0"
+ description="Check interval for JSP updates using a background thread."/>
+ <c:simple-property name="modification-test-interval" required="false" type="integer" readOnly="true" defaultValue="4"
+ description="Minimum amount of time between two tests for updates, in seconds."/>
+ <c:simple-property name="recompile-on-fail" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Retry failed JSP compilations on each request."/>
+ <c:simple-property name="smap" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable SMAP."/>
+ <c:simple-property name="dump-smap" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Write SMAP data to a file."/>
+ <c:simple-property name="generate-strings-as-char-arrays" required="false" type="boolean" readOnly="true"
+ defaultValue="false"
+ description="Generate String constants as char arrays."/>
+ <c:simple-property name="error-on-use-bean-invalid-class-attribute" required="false" type="boolean" readOnly="true" defaultValue="false"
+ description="Enable errors when using a bad class in useBean."/>
+ <c:simple-property name="scratch-dir" required="false" type="string" readOnly="true" description="Specify a different work directory."/>
+ <c:simple-property name="source-vm" required="false" type="string" readOnly="true" defaultValue="1.5"
+ description="Source VM level for compilation."/>
+ <c:simple-property name="target-vm" required="false" type="string" readOnly="true" defaultValue="1.5"
+ description="Target VM level for compilation."/>
+ <c:simple-property name="java-encoding" required="false" type="string" readOnly="true" defaultValue="UTF-8"
+ description="Specify the encoding used for Java sources."/>
+ <c:simple-property name="x-powered-by" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="Enable advertising the JSP engine in x-powered-by."/>
+ <c:simple-property name="display-source-fragment" required="false" type="boolean" readOnly="true" defaultValue="true"
+ description="When a runtime error occurs, attempts to display corresponding JSP source fragment."/>
+ </c:map-property>
+ <c:list-property name="mime-mapping" description="A mime-mapping definition." >
+ <c:map-property name="mime-mapping" >
+ <c:simple-property name="name" description="A MIME mapping name"/>
+ <c:simple-property name="value" description="A MIME mapping value"/>
+ </c:map-property>
+ </c:list-property>
+ <c:list-property name="welcome-file" description="A welcome file declaration." >
+ <c:simple-property name="welcome-file" />
+ </c:list-property>
+ </c:map-property>
+ </resource-configuration>
+
<service name="Connector"
discovery="SubsystemDiscovery"
class="BaseComponent"
commit 13e821f0b60a26e6a4ea55cd8bacd523968d90f6
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Jul 27 09:18:58 2011 +0200
Get rid of the explicit version number and let maven do the magic.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 0927693..d9f79d1 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -48,7 +48,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration"
- version="4.0.0-SNAPSHOT"
>
<!-- <depends plugin="JMX" useClasses="true"/> -->
commit 0eb50dd5314086d110af46d614e3f607c1c1aac3
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Jul 27 11:18:39 2011 +0200
Log the property being null and don't pollute stdout.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
index e978962..c999be6 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadDelegate.java
@@ -269,8 +269,10 @@ public class ConfigurationLoadDelegate implements ConfigurationFacet {
if (property!=null)
propertyMap.put(property);
- else
- System.out.println("Property " + key + " was null");
+ else {
+ if (log.isDebugEnabled())
+ log.debug("Property " + key + " was null");
+ }
}
commit 43a1577fe5b8de22132fc2dbe3d2f58fb92a06d2
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 18:00:50 2011 +0200
Provide more connection properties for standalone servers as well as the version. Add start and restart operations for standalone servers.
Read the running instance name (i.e. standalone server name) from standalone.xml
Allow to start a domain/host controller.
Allow to shut down hosts in a domain.
Allow to shut down host controllers. Revert the ability to shutdown hosts - this needs to be done at HC level.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
index 63a4e45..c089b79 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
@@ -46,9 +46,15 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
protected Document hostXml;
protected final Log log = LogFactory.getLog(this.getClass());
-// private final Log log = LogFactory.getLog(AbstractBaseDiscovery.class);
- protected void readHostXml(ProcessInfo processInfo,boolean isDomainMode) {
+ /**
+ * Read the host.xml or standalone.xml file depending on isDomainMode. If isDomainMode is true,
+ * host.xml is read, otherwise standalone.xml.
+ * The xml file content is stored in the variable hostXml for future use.
+ * @param processInfo Process info to determine the base file location
+ * @param isDomainMode Indiates if host.xml should be read (true) or standalone.xml (false)
+ */
+ protected void readStandaloneOrHostXml(ProcessInfo processInfo, boolean isDomainMode) {
String hostXmlFile = getHostXmlFileLocation(processInfo,isDomainMode);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
@@ -61,7 +67,11 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
}
}
-
+ /**
+ * Determine the server home (=base) directory by parsing the passed command line
+ * @param commandLine command line arguments of the process
+ * @return The home dir if found or empty string otherwise
+ */
String getHomeDirFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
if (line.startsWith(DJBOSS_SERVER_HOME_DIR))
@@ -70,6 +80,11 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return "";
}
+ /**
+ * Determine the location of the boot log file of the server by parsing the command line
+ * @param commandLine command line arguments of the process
+ * @return The log file location or empty string otherwise
+ */
String getLogFileFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
@@ -79,7 +94,14 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return "";
}
+ /**
+ * Try to obtain the management IP and port from the already parsed host.xml or standalone.xml
+ * @return an Object containing host and port
+ * @see #readStandaloneOrHostXml(org.rhq.core.system.ProcessInfo, boolean) on how to obtain the parsed xml
+ */
protected HostPort getManagementPortFromHostXml() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
Element host = hostXml.getDocumentElement();
NodeList interfaceParent = host.getElementsByTagName("management-interfaces");
if (interfaceParent ==null || interfaceParent.getLength()==0) {
@@ -112,7 +134,15 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return new HostPort();
}
+ /**
+ * Try to obtain the management interface IP from the host/standalone.xml files
+ * @param nIf Interface to look for
+ * @return IP address to use
+ */
private String getInterface(String nIf) {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
+
Element host = hostXml.getDocumentElement();
NodeList interfaceParent = host.getElementsByTagName("interfaces");
if (interfaceParent ==null || interfaceParent.getLength()==0) {
@@ -155,12 +185,26 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
return null; // TODO: Customise this generated block
}
+ /**
+ * Try to determine the host name - that is the name of a standalone server or a
+ * host in domain mode by looking at the standalone/host.xml files
+ * @return server name
+ */
protected String findHostName() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
+
String hostName = hostXml.getDocumentElement().getAttribute("name");
return hostName;
}
+ /**
+ * Try to obtain the domain controller's location from looking at host.xml
+ * @return host and port of the domain controller
+ */
protected HostPort getDomainControllerFromHostXml() {
+ if (hostXml==null)
+ throw new IllegalArgumentException("hostXml is null. You need to call 'readStandaloneOrHostXml' first.");
Element host = hostXml.getDocumentElement();
NodeList dcParent = host.getElementsByTagName("domain-controller");
@@ -211,6 +255,9 @@ public abstract class AbstractBaseDiscovery<T extends ResourceComponent> impleme
}
+ /**
+ * Helper class that holds information about the host,port tuple
+ */
protected static class HostPort {
String host;
int port;
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 8851706..776e5ef 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
@@ -79,7 +79,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
final Log log = LogFactory.getLog(this.getClass());
ResourceContext context;
- Configuration conf;
+ Configuration pluginConfiguration;
String myServerName;
ASConnection connection;
String path;
@@ -107,16 +107,16 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
*/
public void start(ResourceContext context) throws InvalidPluginConfigurationException, Exception {
this.context = context;
- conf = context.getPluginConfiguration();
+ pluginConfiguration = context.getPluginConfiguration();
String typeName = context.getResourceType().getName();
// TODO can we use parent's connection and only set this up for top level base component?
- host = conf.getSimpleValue("hostname", LOCALHOST);
- String portString = conf.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
+ host = pluginConfiguration.getSimpleValue("hostname", LOCALHOST);
+ String portString = pluginConfiguration.getSimpleValue("port", DEFAULT_HTTP_MANAGEMENT_PORT);
port = Integer.parseInt(portString);
connection = new ASConnection(host,port);
- path = conf.getSimpleValue("path", null);
+ path = pluginConfiguration.getSimpleValue("path", null);
key = context.getResourceKey();
myServerName = context.getResourceKey().substring(context.getResourceKey().lastIndexOf("/")+1);
@@ -445,16 +445,15 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>();
if (what.equals("server-group")) {
- String groupName = parameters.getSimpleValue("name",null);
+ String groupName = parameters.getSimpleValue("name","");
String profile = parameters.getSimpleValue("profile","default");
address.add(new PROPERTY_VALUE("server-group",groupName));
operation = new Operation(op,address,"profile",profile);
} else if (what.equals("server")) {
-
if (context.getResourceType().getName().equals("JBossAS-Managed")) {
- String host = conf.getSimpleValue("domainHost","local");
+ String host = pluginConfiguration.getSimpleValue("domainHost","local");
address.add(new PROPERTY_VALUE("host",host));
address.add(new PROPERTY_VALUE("server-config",myServerName));
operation = new Operation(op,address);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index 2f71edb..475fd62 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -18,8 +18,11 @@
*/
package org.rhq.modules.plugins.jbossas7;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.List;
@@ -30,7 +33,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.support.metadata.LocalVMTypeDescriptor;
import org.w3c.dom.Document;
import org.rhq.core.domain.configuration.Configuration;
@@ -43,8 +45,6 @@ import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.system.ProcessInfo;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
-
/**
* Discovery class
@@ -53,9 +53,10 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
{
- static final String DJBOSS_SERVER_BASE_DIR = "-Djboss.server.base.dir=";
+ static final String DJBOSS_HOME_DIR = "-Djboss.home.dir=";
static final String DORG_JBOSS_BOOT_LOG_FILE = "-Dorg.jboss.boot.log.file=";
static final String DLOGGING_CONFIGURATION = "-Dlogging.configuration=";
+ static final String DASH_DASH_SERVER_CONFIG = "--server-config=";
private final Log log = LogFactory.getLog(this.getClass());
/**
@@ -77,11 +78,13 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
String serverName;
String psName = psr.getProcessScan().getName();
String description = discoveryContext.getResourceType().getDescription();
+ String version = null;
+ String startScript;
if (psName.equals("ProcessController")) {
serverNameFull = "ProcessController";
serverName = "ProcessController";
} else if (psName.equals("HostController")) {
- readHostXml(psr.getProcessInfo(),true);
+ readStandaloneOrHostXml(psr.getProcessInfo(), true);
HostPort hp = getDomainControllerFromHostXml();
if (hp.isLocal) {
serverName = "DomainController";
@@ -92,11 +95,20 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
serverName = "HostController";
serverNameFull = "HostController";
}
- config.put(new PropertySimple("homedir",getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine())));
- // TODO add the start script
+ String homeDir = getHomeDirFromCommandLine(psr.getProcessInfo().getCommandLine());
+ config.put(new PropertySimple("baseDir", homeDir));
+ version = homeDir.substring(homeDir.lastIndexOf("-")+1);
+ config.put(new PropertySimple("startScript","bin/domain.sh"));
+ String host = findHost(psr.getProcessInfo(),true);
+ config.put(new PropertySimple("domainHost",host));
+
+ fillUserPassFromFile(config,"domain",homeDir);
+
+ // TODO provide running config
- } else {
- serverNameFull = getBaseDirFromCommandLine(commandLine);
+ } else { // Standalone server
+ serverNameFull = getHomeDirFromCommandLine(commandLine);
+ readStandaloneOrHostXml(psr.getProcessInfo(), false);
if (serverNameFull==null || serverNameFull.isEmpty()) {
// Try to obtain the server name
// -Dorg.jboss.boot.log.file=domain/servers/server-one/log/boot.log
@@ -111,10 +123,19 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
config.put(new PropertySimple("domainHost",host));
}
- serverName = serverNameFull.substring(serverNameFull.lastIndexOf("/")+1);
+ config.put(new PropertySimple("baseDir",serverNameFull));
+ serverName = findHostName();
if (serverName.isEmpty())
serverName = serverNameFull;
+ version = serverName.substring(serverName.lastIndexOf("-")+1);
+
+ String serverConfig = getServerConfigFromCommandLine(commandLine);
+ config.put(new PropertySimple("config",serverConfig));
+ config.put(new PropertySimple("startScript","bin/standalone.sh"));
+
+ fillUserPassFromFile(config,"standalone", serverNameFull);
+
}
String logFile = getLogFileFromCommandLine(commandLine);
initLogEventSourcesConfigProp(logFile,config);
@@ -139,7 +160,7 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
discoveryContext.getResourceType(), // ResourceType
serverNameFull, // key TODO distinguish per domain?
serverName, // Name
- null, // TODO real version ?
+ version, // TODO get via API ?Á
description, // Description
config,
psr.getProcessInfo()
@@ -155,6 +176,48 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
+ private void fillUserPassFromFile(Configuration config, String mode, String baseDir) {
+
+ String configDir = baseDir + File.separator + mode + File.separator + "configuration";
+
+ File file = new File(configDir ,"mgmt-users.properties");
+ if (!file.exists() || !file.canRead()) {
+ if (log.isDebugEnabled())
+ log.debug("No console user properties file found at [" + file.getAbsolutePath() + "] or file is not readable");
+ return;
+ }
+ BufferedReader br=null;
+ try {
+ FileReader fileReader = new FileReader(file);
+ br = new BufferedReader(fileReader);
+ String line;
+ while ((line = br.readLine())!=null) {
+ if (line.startsWith("#"))
+ continue;
+ if (line.isEmpty())
+ continue;
+ if (!line.contains("="))
+ continue;
+ // found a candidate
+ String user = line.substring(0,line.indexOf("="));
+ String pass = line.substring(line.indexOf("=")+1);
+ config.put(new PropertySimple("user",user));
+ config.put(new PropertySimple("password",pass));
+
+ }
+ } catch (IOException e) {
+ e.printStackTrace(); // TODO: Customise this generated block
+ } finally {
+ if (br!=null)
+ try {
+ br.close();
+ } catch (IOException e) {
+ // empty
+ }
+ }
+
+ }
+
private String findHost(ProcessInfo processInfo,boolean isDomain) {
String hostXmlFile = getHostXmlFileLocation(processInfo, isDomain);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -173,12 +236,13 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
return hostName;
}
- String getBaseDirFromCommandLine(String[] commandLine) {
+
+ String getServerConfigFromCommandLine(String[] commandLine) {
for (String line: commandLine) {
- if (line.startsWith(DJBOSS_SERVER_BASE_DIR))
- return line.substring(DJBOSS_SERVER_BASE_DIR.length());
+ if (line.startsWith(DASH_DASH_SERVER_CONFIG))
+ return line.substring(DASH_DASH_SERVER_CONFIG.length());
}
- return "";
+ return "standalone.xml";
}
//-Dorg.jboss.boot.log.file=/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Alpha2/domain/log/server-manager/boot.log
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
new file mode 100644
index 0000000..c8703a6
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
@@ -0,0 +1,184 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.io.File;
+import java.net.ConnectException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.core.pluginapi.util.ProcessExecutionUtility;
+import org.rhq.core.system.ProcessExecution;
+import org.rhq.core.system.ProcessExecutionResults;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Base component for functionality that is common to Standalone AS and HostControllers
+ * @author Heiko W. Rupp
+ */
+public class BaseServerComponent extends BaseComponent {
+
+ private static final String STANDALONE_XML = "standalone.xml";
+ private static final String SEPARATOR = "\n-----------------------\n";
+ final Log log = LogFactory.getLog(BaseServerComponent.class);
+
+ /**
+ * Restart the server by first executing a 'shutdown' operation via its API. Then call
+ * the #startServer method to start it again.
+ *
+ * @param parameters Parameters to pass to the (recursive) invocation of #invokeOperation
+ * @param mode
+ * @return State of execution
+ * @throws Exception If anything goes wrong
+ */
+ protected OperationResult restartServer(Configuration parameters, Mode mode) throws Exception {
+ OperationResult tmp = invokeOperation("shutdown",parameters);
+
+ if (tmp.getErrorMessage()!=null) {
+ tmp.setErrorMessage("Restart failed while failing to shut down: " + tmp.getErrorMessage());
+ return tmp;
+ }
+ Thread.sleep(500); // Wait 0.5s -- this is plenty
+ return startServer(mode);
+ }
+
+ /**
+ * Start the server by calling the start script listed in the plugin configuration. If a different
+ * config is given, this is passed via --server-config
+ * @return State of Execution.
+ * @param mode
+ */
+ protected OperationResult startServer(Mode mode) {
+ OperationResult operationResult = new OperationResult();
+ Configuration conf = context.getPluginConfiguration();
+ String startScript = conf.getSimpleValue("startScript", mode.getStartScript());
+ String baseDir = conf.getSimpleValue("baseDir","");
+ if (baseDir.isEmpty()) {
+ operationResult.setErrorMessage("No base directory provided");
+ return operationResult;
+ }
+ String script = baseDir + File.separator + startScript;
+ String config = conf.getSimpleValue("config", mode.getXmlFile());
+
+ ProcessExecution processExecution;
+ processExecution = ProcessExecutionUtility.createProcessExecution(new File(script));
+ if (!config.equals(mode.getXmlFile())) {
+ processExecution.getArguments().add(mode.getConfigArg());
+ processExecution.getArguments().add(config);
+ }
+ processExecution.setWorkingDirectory(baseDir);
+ processExecution.setCaptureOutput(true);
+ processExecution.setWaitForCompletion(2000L); // 2 seconds // TODO: Should we wait longer than two seconds?
+ processExecution.setKillOnTimeout(false);
+
+
+ long start = System.currentTimeMillis();
+ if (log.isDebugEnabled()) {
+ log.debug("About to execute the following process: [" + processExecution + "]");
+ }
+ ProcessExecutionResults results = context.getSystemInformation().executeProcess(processExecution);
+ logExecutionResults(results);
+ if (results.getError()!=null) {
+ operationResult.setErrorMessage(results.getError().getMessage());
+ } else {
+ operationResult.setSimpleResult("Success");
+ }
+
+ return operationResult;
+
+ }
+
+ private void logExecutionResults(ProcessExecutionResults results) {
+ // Always log the output at info level. On Unix we could switch depending on a exitCode being !=0, but ...
+ log.info("Exit code from process execution: " + results.getExitCode());
+ log.info("Output from process execution: " + SEPARATOR + results.getCapturedOutput() + SEPARATOR);
+ }
+
+ /**
+ * Do some post processing of the Result - especially the 'shutdown' operation needs a special
+ * treatment.
+ * @param name Name of the operation
+ * @param res Result of the operation vs. AS7
+ * @return OperationResult filled in from values of res
+ */
+ protected OperationResult postProcessResult(String name, Result res) {
+ OperationResult operationResult = new OperationResult();
+ if (name.equals("shutdown")) {
+ /*
+ * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
+ * the server connection is closed and we can't read from it. So if we get connection refused for
+ * reading, this is a good sign.
+ */
+ if (!res.isSuccess()) {
+ if (res.getThrowable()!=null && (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused")))
+ operationResult.setSimpleResult("Success");
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ }
+ else {
+ if (res.isSuccess()) {
+ if (res.getResult()!=null)
+ operationResult.setSimpleResult(res.getResult().toString());
+ else
+ operationResult.setSimpleResult("-None provided by server-");
+ }
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ return operationResult;
+ }
+
+ enum Mode {
+ STANDALONE(STANDALONE_XML,"standalone","--server-config","bin/standalone.sh"),
+ DOMAIN("domain.xml","domain", "--domain-config","bin/domain.sh"),
+ HOST("host.xml","domain", "--host-config","bin/domain.sh");
+
+ private String xmlFile;
+ private String baseDir;
+ private String configArg;
+ private String startScript;
+
+ private Mode(String xmlFile, String baseDir, String configArg, String startScript) {
+ this.xmlFile = xmlFile;
+ this.baseDir = baseDir;
+ this.configArg = configArg;
+ this.startScript = startScript;
+ }
+
+ public String getXmlFile() {
+ return xmlFile;
+ }
+
+ public String getBaseDir() {
+ return baseDir;
+ }
+
+ public String getConfigArg() {
+ return configArg;
+ }
+
+ public String getStartScript() {
+ return startScript;
+ }
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java
deleted file mode 100644
index c25fe88..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainComponent.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.modules.plugins.jbossas7.json.Operation;
-import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
-import org.rhq.modules.plugins.jbossas7.json.Result;
-
-/**
- * Common stuff for the Domain
- * @author Heiko W. Rupp
- */
-@SuppressWarnings("unused")
-public class DomainComponent extends BaseComponent implements OperationFacet{
-
- @Override
- public AvailabilityType getAvailability() {
-
- if (context.getResourceType().getName().equals("JBossAS-Managed")) {
- List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(2);
- String host = conf.getSimpleValue("domainHost","local");
- address.add(new PROPERTY_VALUE("host",host));
- address.add(new PROPERTY_VALUE("server-config",myServerName));
- Operation getStatus = new Operation("read-attribute",address,"name","status");
- Result result = null;
- try {
- result = connection.execute(getStatus);
- } catch (Exception e) {
- log.warn(e.getMessage());
- return AvailabilityType.DOWN;
- }
- if (!result.isSuccess())
- return AvailabilityType.DOWN;
-
- String msg = result.getResult().toString();
- if (msg.contains("STARTED"))
- return AvailabilityType.UP;
- else
- return AvailabilityType.DOWN;
- }
-
- return super.getAvailability(); // TODO: Customise this generated block
- }
-
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
new file mode 100644
index 0000000..73eb0bb
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -0,0 +1,64 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Component class for host- and domain controller
+ * @author Heiko W. Rupp
+ */
+public class HostControllerComponent extends BaseServerComponent implements OperationFacet {
+
+ private final Log log = LogFactory.getLog(HostControllerComponent.class);
+
+ @Override
+ public OperationResult invokeOperation(String name,
+ Configuration parameters) throws InterruptedException, Exception {
+
+ if (name.equals("start")) {
+ return startServer(Mode.DOMAIN);
+ } else if (name.equals("restart")) {
+ return restartServer(parameters, Mode.DOMAIN);
+
+ } else if (name.equals("shutdown")) {
+ // This is a bit trickier, as it needs to be executed on the level on /host=xx
+ String domainHost = pluginConfiguration.getSimpleValue("domainHost","");
+ if (domainHost.isEmpty()) {
+ OperationResult result = new OperationResult();
+ result.setErrorMessage("No domain host found - can not continue");
+ return result;
+ }
+ Operation op = new Operation("shutdown","host",domainHost);
+ Result res = getASConnection().execute(op);
+
+ postProcessResult(name,res);
+ }
+
+ // Defer other stuff to the base component for now
+ return super.invokeOperation(name, parameters);
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
index d0d3eee..951430c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/JmsComponent.java
@@ -32,7 +32,6 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionList;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
-import org.rhq.core.domain.configuration.definition.PropertySimpleType;
import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
@@ -43,7 +42,7 @@ import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
* Component class for the JMS subsystem
* @author Heiko W. Rupp
*/
-public class JmsComponent extends DomainComponent {
+public class JmsComponent extends BaseComponent {
private final Log log = LogFactory.getLog(JmsComponent.class);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
new file mode 100644
index 0000000..64ac2b6
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASComponent.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Common stuff for the Domain
+ * @author Heiko W. Rupp
+ */
+@SuppressWarnings("unused")
+public class ManagedASComponent extends BaseComponent {
+
+ /**
+ * Get the availability of the managed AS server. We can't just check if
+ * a connection succeeds, as the check runs against the API/HostController
+ * and the managed server may still be down even if the connection succeeds.
+ * @return Availability of the managed AS instance.
+ */
+ @Override
+ public AvailabilityType getAvailability() {
+
+ if (context.getResourceType().getName().equals("JBossAS-Managed")) {
+ List<PROPERTY_VALUE> address = new ArrayList<PROPERTY_VALUE>(2);
+ String host = pluginConfiguration.getSimpleValue("domainHost","local");
+ address.add(new PROPERTY_VALUE("host",host));
+ address.add(new PROPERTY_VALUE("server-config",myServerName));
+ Operation getStatus = new Operation("read-attribute",address,"name","status");
+ Result result = null;
+ try {
+ result = connection.execute(getStatus);
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ return AvailabilityType.DOWN;
+ }
+ if (!result.isSuccess())
+ return AvailabilityType.DOWN;
+
+ String msg = result.getResult().toString();
+ if (msg.contains("STARTED"))
+ return AvailabilityType.UP;
+ else
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 3946dbe..fd1b65d 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -70,7 +70,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
// Now we have the host controller, lets get the host.xml file
// and obtain the servers from there.
ProcessInfo processInfo = psr.getProcessInfo();
- readHostXml(processInfo,true);
+ readStandaloneOrHostXml(processInfo, true);
String hostName = findHostName();
HostPort managementHostPort = getManagementPortFromHostXml();
@@ -105,13 +105,16 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery
// TODO this fails for the downed servers.
// get from the domain or other place as soon as the domain provides it.
- initLogFile(scans, serverInfo.name, config, getHomeDirFromCommandLine(processInfo.getCommandLine()));
+ String homeDir = getHomeDirFromCommandLine(processInfo.getCommandLine());
+ initLogFile(scans, serverInfo.name, config, homeDir);
+
+ String version = homeDir.substring(homeDir.lastIndexOf("-")+1);
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
discoveryContext.getResourceType(), // ResourceType
hostName + "/" + serverInfo.name, // key
serverInfo.name, // Name
- null, // TODO real version - get from Domain as soon as it is provided
+ version, // TODO get from Domain as soon as it is provided
"Managed AS 7 instance", // Description
config,
null
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 15cb5d3..ad1109b 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
@@ -23,7 +23,6 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -38,12 +37,10 @@ import org.rhq.core.domain.content.transfer.DeployPackageStep;
import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.pluginapi.content.ContentContext;
import org.rhq.core.pluginapi.content.ContentFacet;
import org.rhq.core.pluginapi.content.ContentServices;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -55,7 +52,7 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
* @author Heiko W. Rupp
*/
@SuppressWarnings("unused")
-public class ServerGroupComponent extends DomainComponent implements ContentFacet, CreateChildResourceFacet {
+public class ServerGroupComponent extends ManagedASComponent implements ContentFacet, CreateChildResourceFacet {
private static final String SUCCESS = "success";
private static final String OUTCOME = "outcome";
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
index 0281279..ebddf95 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -31,41 +31,25 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
* Component class for standalone AS7 servers
* @author Heiko W. Rupp
*/
-public class StandaloneASComponent extends BaseComponent implements OperationFacet {
-
+public class StandaloneASComponent extends BaseServerComponent implements OperationFacet {
@Override
public OperationResult invokeOperation(String name,
Configuration parameters) throws Exception {
- // reload, shutdown
+ if (name.equals("start")) {
+ return startServer(Mode.STANDALONE);
+ } else if (name.equals("restart")) {
+ return restartServer(parameters, Mode.STANDALONE);
+
+ }
+
+ // reload, shutdown go to the remote server
Operation op = new Operation(name,new Address());
Result res = getASConnection().execute(op);
- OperationResult operationResult = new OperationResult();
- if (name.equals("shutdown")) {
- /*
- * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
- * the server connection is closed and we can't read from it. So if we get connection refused for
- * reading, this is a good sign.
- */
- if (!res.isSuccess()) {
- if (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused"))
- operationResult.setSimpleResult("Success");
- else
- operationResult.setErrorMessage(res.getFailureDescription());
- }
- }
- else {
- if (res.isSuccess()) {
- if (res.getResult()!=null)
- operationResult.setSimpleResult(res.getResult().toString());
- else
- operationResult.setSimpleResult("-None provided by server-");
- }
- else
- operationResult.setErrorMessage(res.getFailureDescription());
- }
+ OperationResult operationResult = postProcessResult(name, res);
return operationResult;
}
+
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index ad91dac..d762485 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -51,6 +51,25 @@ public class Address {
path.addAll(other);
}
+ public Address(String path) {
+ this();
+ String[] components = path.split(",");
+ for (String component : components) {
+ String tmp = component.trim();
+
+ if (tmp.contains("=")) {
+ // strip / from the start of the key if it happens to be there
+ if (tmp.startsWith("/"))
+ tmp = tmp.substring(1);
+
+ String[] pair = tmp.split("=");
+ PROPERTY_VALUE valuePair = new PROPERTY_VALUE(pair[0], pair[1]);
+ this.path.add(valuePair);
+ }
+ }
+
+ }
+
public void add(String key, String value) {
path.add(new PROPERTY_VALUE(key,value));
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index c0e364d..0927693 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -58,6 +58,7 @@
~~ additional 'Personalities' for the kinds of servers (PM, SM, Standalone AS, Managed AS)
-->
+ <!-- TODO do we want to show the process controller at all? We have no benefit from it
<server name="ProcessController"
discovery="BaseProcessDiscovery"
class="BaseComponent"
@@ -68,27 +69,28 @@
<c:simple-property name="hostname" default="localhost" required="true"/>
<c:simple-property name="port" default="9990" type="integer" required="true"/>
- &logSources;
</plugin-configuration>
<process-scan name="ProcessController" query="process|basename|match=^java.*,arg|org.jboss.as.process-controller|match=.*"/>
- <operation name="dummyOperation">
- <!-- TODO supply parameters and return values -->
- </operation>
-
-
</server>
+ -->
<server name="HostController"
discovery="BaseProcessDiscovery"
- class="BaseComponent"
+ class="HostControllerComponent"
description="Domain controller (delegate) for this host"
>
<plugin-configuration>
- <c:simple-property name="hostname" default="localhost" required="true"/>
- <c:simple-property name="port" default="9990" type="integer" required="true"/>
+ <c:simple-property name="hostname" default="localhost" required="true" description="Host name of the domain API"/>
+ <c:simple-property name="port" default="9990" type="integer" required="true" description="Port of the domain API"/>
+ <c:simple-property name="user" type="string" description="Management user for a secured Host controller" required="false"/>
+ <c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
+ <c:simple-property name="config" type="string" default="domain.xml" description="Running configuration" displayName="Configuration"/>
+ <c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
+ <c:simple-property name="startScript" type="file" default="bin/domain.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
+ <c:simple-property name="domainHost" type="string" readOnly="true" required="false" description="Host name within the AS7 domain"/>
&logSources;
</plugin-configuration>
@@ -96,8 +98,10 @@
<process-scan name="HostController" query="process|basename|match=^java.*,arg|org.jboss.as.host-controller|match=.*"/>
+<!-- Currently not provided by AS7
<operation name="domain:shutdown" displayName="Shutdown Domain" description="Shut this Host-/Domaincontroller down with all managed servers.">
</operation>
+-->
<operation name="server-group:add" displayName="Add ServerGroup" description="Add a server group to the Domain.">
<parameters>
@@ -146,6 +150,17 @@
</operation>
+ <operation name="start" description="Start this Host-/Domaincontroller" displayName="Start this host controller">
+ <results>
+ <c:simple-property name="operationResult" description="Outcome of the start operation"/>
+ </results>
+ </operation>
+ <operation name="shutdown" description="Stop this Host-/Domaincontroller" displayName="Shut down this host controller">
+ <results>
+ <c:simple-property name="operationResult" description="Outcome of the stop operation"/>
+ </results>
+ </operation>
+
<metric property="_internal:mgmtRequests" category="performance" dataType="measurement" defaultInterval="120000"
displayType="summary" measurementType="trendsup" description="Number of requests sent to the controller"
@@ -206,7 +221,7 @@
<resource-configuration>
<c:simple-property name="profile" description="The profile name" required="true"/>
<c:simple-property name="socket-binding-group" readOnly="false" required="true">
- <c:option-source target="resource" expression="type=SocketBindingGroup"/>
+ <c:option-source target="resource" expression="type=SocketBindingGroupDomain"/>
</c:simple-property>
<c:simple-property name="socket-binding-port-offset" required="false" defaultValue="0" type="integer"
description="The default offset to be added to the port values given by the socket binding group."/>
@@ -217,7 +232,7 @@
<server name="Host"
description="Host involved in this domain"
discovery="SubsystemDiscovery"
- class="DomainComponent"
+ class="BaseComponent"
>
<plugin-configuration>
<c:simple-property name="path" default="host" readOnly="true"/>
@@ -287,11 +302,17 @@
<server name="JBossAS7-Standalone"
discovery="BaseProcessDiscovery"
class="StandaloneASComponent"
+ description="Standalone AS7 server"
>
<plugin-configuration>
<c:simple-property name="hostname" default="localhost" required="true"/>
<c:simple-property name="port" default="9990" type="integer" required="true"/>
+ <c:simple-property name="user" type="string" description="Management user for a secured AS" required="false"/>
+ <c:simple-property name="password" type="password" description="Password for the management user" required="false"/>
+ <c:simple-property name="config" type="string" default="standalone.xml" description="Running configuration" displayName="Configuration"/>
+ <c:simple-property name="baseDir" type="file" description="Base directory of the server installation" displayName="Base directory" readOnly="true" required="false"/>
+ <c:simple-property name="startScript" type="file" default="bin/standalone.sh" description="Script used to start the server. If the path is not absolute, it is relative to the base directory"/>
<c:list-property name="system-properties">
<c:map-property name="system-property">
<c:simple-property name="key" readOnly="true"/>
@@ -303,7 +324,18 @@
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
- <operation name="reload" description="Make the server load the (changed) configuration." displayName="Reload">
+
+ <operation name="reload" description="Make the server re-load the (changed) configuration. To load a different startup config use 'restart'" displayName="Reload">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="start" description="Start the server by invoking its start script">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="restart" description="Restart the server by shutting it down and invoking its start script">
<results>
<c:simple-property name="operationResult"/>
</results>
@@ -353,14 +385,14 @@
<server name="JBossAS-Managed"
discovery="ManagedASDiscovery"
- class="DomainComponent"
+ class="ManagedASComponent"
>
<plugin-configuration>
<c:simple-property name="hostname" default="localhost" displayName="Management host" required="true"/>
<c:simple-property name="port" default="9990" type="integer" displayName="Management port" required="true"/>
<c:simple-property name="domainHost" readOnly="true" description="Hostname in the domain"/>
<c:simple-property name="group" readOnly="true" displayName="Server Group" description="Server Group this instance belongs to."/>
- <c:simple-property name="socket-binding-group" readOnly="true" displayName="Socket binding group" description="Socket bindngs to use"/>
+ <c:simple-property name="socket-binding-group" readOnly="true" displayName="Socket binding group" description="Socket bindings to use"/>
<c:simple-property name="socket-binding-port-offset" readOnly="true" displayName="Port Offset" type="integer" default="0" description="Offset to the base ports"/>
<c:simple-property name="path" readOnly="true" />
@@ -412,7 +444,7 @@
<server name="Messaging"
discovery="SubsystemDiscovery"
- class="DomainComponent"
+ class="BaseComponent"
description="The underlying HornetQ based messaging subsystem"
singleton="true"
>
@@ -1792,8 +1824,8 @@ working area for individual server instances</li></ul>"/>
<c:list-property name="includes" required="false">
<c:simple-property name="includes" displayName="Included bindings" description="Other bindings that are included in this one (only needed in Domain Mode)"/>
</c:list-property>
- <c:group name="children:socket.binding">
- <c:list-property name="socket-binding">
+ <c:group name="children:socket-binding:name" displayName="Individual socket bindings">
+ <c:list-property name="*">
<c:map-property name="binding">
<c:simple-property name="name" description="The name of the socket. Services which need to access the socket configuration information will find it using this name." readOnly="true"/>
<c:simple-property name="interface" description="Name of the interface to which the socket should be bound, or, for multicast sockets, the interface on which it should listen. This should be one of the declared interfaces."
commit 668586aa9445d9aee9f63fc8991da4477bb4031d
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 26 16:11:50 2011 -0500
Fully enable jvmRoute for context identification and discovery. Also, addressed all the compiler warnings in the plugin code.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 23d7d62..3545fa5 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -32,6 +32,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
* @author Stefan Negrea
*/
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
@Override
protected EmsBean loadBean() {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 35ecf30..5c9c3fd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -57,10 +57,12 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context", null,
- null);
- entities.add(detail);
+ if (availableContext.getJvmRoute().equals(jvmRoute)) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context",
+ null, null);
+ entities.add(detail);
+ }
}
return entities;
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 4cca539..8614402 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -54,9 +54,9 @@ public class ProxyInfo {
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
String jvmRoute = nodePieces[1];
- jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':')).trim();
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
- availableNodes.put(jvmRoute, new Node(jvmRoute, identifier));
+ availableNodes.put(identifier, new Node(jvmRoute, identifier));
}
}
@@ -90,13 +90,18 @@ public class ProxyInfo {
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+ String nodeIdentifier = contextPieces[0];
+ nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
+ nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
+ String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
+
String rawIsEnabled = contextPieces[2];
rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
Vhost relatedVhost = availableVhosts.get(identifier);
- availableContexts.add(new Context("", relatedVhost.getHost(), actualContext, isEnabled));
+ availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
}
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 3c01b30..992c5b0 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -18,12 +18,12 @@
description="mod_cluster plugin"
singleton="true">
- <runs-inside>
+ <runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
<parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
</runs-inside>
- <plugin-configuration>
+ <plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
<c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
<c:simple-property name="jvmRoute" readOnly="false"/>
@@ -34,12 +34,14 @@
<parameters>
<c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
<c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
<c:option value="MILLISECONDS" name="MILLISECONDS"/>
<c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- </c:property-options>
+ <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="HOURS" name="HOURS"/>
+ <c:option value="DAYS" name="DAYS"/>
+ </c:property-options>
</c:simple-property>
</parameters>
<results>
@@ -56,7 +58,7 @@
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
- </operation>
+ </operation>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
<results>
@@ -71,7 +73,6 @@
</operation>
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
-
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
@@ -87,7 +88,7 @@
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
<c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
@@ -130,6 +131,5 @@
</operation>
</service>
-
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 57aed4d..0f644fc 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -53,6 +53,7 @@ import org.rhq.core.pluginapi.operation.OperationResult;
/**
* @author Stefan Negrea
*/
+@SuppressWarnings("rawtypes")
@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
private Log log = LogFactory.getLog(this.getClass());
@@ -104,6 +105,8 @@ public class ModclusterPluginTest {
log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
List<String> typeNames = new ArrayList<String>() {
+ private static final long serialVersionUID = 1L;
+
{
add(PLUGIN_NAME);
add(PLUGIN_NAME + " Webapp Context");
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index df7d222..625d8d4 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -21,8 +21,6 @@ package org.rhq.plugins.modcluster.test;
import java.io.IOException;
import java.io.InputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.testng.annotations.Test;
import org.rhq.plugins.modcluster.ProxyInfo;
@@ -32,7 +30,6 @@ import org.rhq.plugins.modcluster.ProxyInfo;
*/
@Test(groups = "modcluster-plugin")
public class ProxyInfoTest {
- private Log log = LogFactory.getLog(this.getClass());
@Test
public void testProxyInfo() throws Exception {
commit d1fe493616de40914e8708fa7497bcfac5b32498
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 26 15:08:59 2011 -0500
Adding jvmRoute in the mix for webapp context identification. jvmRoute uniquely identifies nodes in a cluster and will be used to decide which contexts run on the node monitored by RHQ.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 7cefa46..35ecf30 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -25,8 +25,10 @@ package org.rhq.plugins.modcluster;
import java.util.HashSet;
import java.util.Set;
+import org.mc4j.ems.connection.EmsConnection;
import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
@@ -37,26 +39,78 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
* @author Stefan Negrea
*/
+@SuppressWarnings("rawtypes")
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+ private final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private final String PROXY_INFO_PROPERTY = "proxyInfo";
+ private final String ADDITIONAL_CONFIG_BEAN_PROPERTY = "additionalConfigurationObjectName";
+
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
*/
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+ String jvmRoute = this.getJvmRoute(context);
+ String rawProxyInfo = this.getRawProxyInfo(context);
- EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
-
- String rawProxyInfo = (String) statsBean.getAttribute("proxyInfo").refresh().toString();
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.toString(), availableContext.toString(), null, "mod_cluster Webapp Context", null,
+ availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context", null,
null);
entities.add(detail);
}
return entities;
}
+
+ /**
+ * Retrieves the jvm route for the node from the parent context.
+ *
+ * @param context the discovery context
+ * @return node's jvm route
+ */
+ private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
+ String objectName = pluginConfig.getSimple(ADDITIONAL_CONFIG_BEAN_PROPERTY).getStringValue();
+ EmsBean engineBean = this.loadBean(objectName, context.getParentResourceComponent());
+
+ return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Retrieves raw proxy configuration from the parent context.
+ *
+ * @param context the discovery context
+ * @return raw proxy configuration
+ */
+ private String getRawProxyInfo(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
+ return (String) statsBean.getAttribute(PROXY_INFO_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
+ EmsConnection emsConnection = context.getEmsConnection();
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 52dd287..591fef6 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -25,6 +25,7 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
* @author Stefan Negrea
*
*/
+@SuppressWarnings("rawtypes")
public class ModclusterServerComponent extends MBeanResourceComponent {
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 36f490d..4cca539 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -33,11 +33,35 @@ import java.util.regex.Pattern;
*/
public class ProxyInfo {
- private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+ private Map<String, Node> availableNodes = new HashMap<String, Node>();
private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
public ProxyInfo(String rawProxyInfo) {
- Pattern vhostPattern = Pattern.compile("Vhost.*\n");
+ parseNodes(rawProxyInfo);
+ parseVhosts(rawProxyInfo);
+ parseContexts(rawProxyInfo);
+ }
+
+ private void parseNodes(String rawProxyInfo) {
+ Pattern nodePattern = Pattern.compile("Node:.*\n");
+ Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
+ while (nodeMatcher.find()) {
+ String rawNode = nodeMatcher.group();
+ String[] nodePieces = rawNode.split(",");
+
+ String identifier = nodePieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+
+ String jvmRoute = nodePieces[1];
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':')).trim();
+
+ availableNodes.put(jvmRoute, new Node(jvmRoute, identifier));
+ }
+ }
+
+ private void parseVhosts(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
while (vhostMatcher.find()) {
String rawVhost = vhostMatcher.group();
@@ -52,8 +76,10 @@ public class ProxyInfo {
availableVhosts.put(identifier, new Vhost(identifier, host));
}
+ }
- Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
+ private void parseContexts(String rawProxyInfo) {
+ Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
while (contextMatcher.find()) {
String rawContext = contextMatcher.group();
@@ -70,7 +96,7 @@ public class ProxyInfo {
Vhost relatedVhost = availableVhosts.get(identifier);
- availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
+ availableContexts.add(new Context("", relatedVhost.getHost(), actualContext, isEnabled));
}
}
@@ -82,7 +108,60 @@ public class ProxyInfo {
return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
}
- private static class Vhost {
+ public List<Node> getAvailableNodes() {
+ return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
+ }
+
+ public static class Node {
+ private String jvmRoute;
+ private String nodeId;
+
+ public Node(String jvmRoute, String nodeId) {
+ this.jvmRoute = jvmRoute;
+ this.nodeId = nodeId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Node other = (Node) obj;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (nodeId == null) {
+ if (other.nodeId != null)
+ return false;
+ } else if (!nodeId.equals(other.nodeId))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Vhost {
private String identifier;
private String host;
@@ -99,20 +178,52 @@ public class ProxyInfo {
return host;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Vhost other = (Vhost) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (identifier == null) {
+ if (other.identifier != null)
+ return false;
+ } else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
}
public static class Context {
private String path;
private String host;
+ private String jvmRoute;
private boolean isEnabled;
- public Context(String host, String path) {
- this(path, host, false);
+ public Context(String jvmRoute, String host, String path) {
+ this(jvmRoute, host, path, false);
}
- public Context(String host, String path, boolean isEnabled) {
- this.path = path;
+ public Context(String jvmRoute, String host, String path, boolean isEnabled) {
+ this.jvmRoute = jvmRoute;
this.host = host;
+ this.path = path;
this.isEnabled = isEnabled;
}
@@ -124,13 +235,25 @@ public class ProxyInfo {
return host;
}
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
public boolean isEnabled() {
return isEnabled;
}
+ public String createKey() {
+ return jvmRoute + ":" + host + ":" + path;
+ }
+
+ public String createName() {
+ return host + ":" + path;
+ }
+
@Override
public String toString() {
- return host + ":" + path;
+ return createKey();
}
@Override
@@ -138,6 +261,7 @@ public class ProxyInfo {
final int prime = 31;
int result = 1;
result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
result = prime * result + ((path == null) ? 0 : path.hashCode());
return result;
}
@@ -156,6 +280,11 @@ public class ProxyInfo {
return false;
} else if (!host.equals(other.host))
return false;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
if (path == null) {
if (other.path != null)
return false;
@@ -164,9 +293,13 @@ public class ProxyInfo {
return true;
}
- public static Context fromString(String stringRepresentation) {
- String part[] = stringRepresentation.trim().split(":");
- return new Context(part[1], part[0]);
+ public static Context fromString(String stringRepresentation) throws Exception {
+ String parts[] = stringRepresentation.trim().split(":");
+ if (parts.length < 3) {
+ throw new Exception("Parsing error. Not enough information to create a context.");
+ }
+
+ return new Context(parts[0], parts[1], parts[2]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b1a0f51..3c01b30 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -25,7 +25,9 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="additionalConfigurationObjectName" readOnly="true" default="jboss.web:type=Engine"/>
+ <c:simple-property name="jvmRoute" readOnly="false"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
@@ -129,6 +131,5 @@
</service>
-
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 8c8c6f4..df7d222 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -35,7 +35,7 @@ public class ProxyInfoTest {
private Log log = LogFactory.getLog(this.getClass());
@Test
- public void testProxyInfo() throws IOException {
+ public void testProxyInfo() throws Exception {
String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
for (String testConfigurationFile : availableFiles) {
commit 9933f0e155e2274864458e042614ae8216768f5e
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 17:25:23 2011 +0200
BZ 725417 - if the 'default' attribute is missing on a required property, throw a descriptive exception instead of a NPE.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
index 9b2d1db..3963f9d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginConfigurationMetadataManagerBean.java
@@ -106,8 +106,14 @@ public class PluginConfigurationMetadataManagerBean implements PluginConfigurati
for (PropertyDefinition propertyDef : updateReport.getNewPropertyDefinitions()) {
if (propertyDef.isRequired()) {
Property templateProperty = templateConfiguration.get(propertyDef.getName());
- pluginConfiguration.put(templateProperty.deepCopy(false));
- modified = true;
+ if (templateProperty==null) {
+ throw new IllegalArgumentException("The property [" + propertyDef.getName()
+ + "] marked as required in the configuration definition of [" + propertyDef.getConfigurationDefinition().getName()
+ + "] has no attribute 'default'");
+ } else {
+ pluginConfiguration.put(templateProperty.deepCopy(false));
+ modified = true;
+ }
}
}
commit 98365fa7de2d2859473dd0e3bbd68004b837ee57
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 25 07:54:06 2011 +0200
Extract the deploy-to-server-magic from createChild() and add tests to use this extracted code to deploy to domain and server-group.
diff --git a/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
index 8581ada..2010640 100644
--- a/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
+++ b/modules/integration-tests/jboss-as-7-plugin-test/src/test/java/org/rhq/modules/integrationTests/jbossas7plugin/UploadAndDeployTest.java
@@ -26,7 +26,17 @@ import java.util.Map;
import org.codehaus.jackson.JsonNode;
import org.testng.annotations.Test;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.modules.plugins.jbossas7.ASConnection;
+import org.rhq.modules.plugins.jbossas7.BaseComponent;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
@@ -292,7 +302,7 @@ public class UploadAndDeployTest extends AbstractIntegrationTest {
/**
* Test uploading to domain only, but not to a server group
- * @throws Exception
+ * @throws Exception if anything goes wrong.
*/
@Test(timeOut = 60*1000L,enabled = isEnabled)
public void testUploadComposite2() throws Exception {
@@ -346,4 +356,77 @@ public class UploadAndDeployTest extends AbstractIntegrationTest {
}
+ /**
+ * Test the real API code for uploading - case 1: just upload to /deployment
+ * @throws Exception if anything goes wrong.
+ */
+ @Test
+ public void testUploadViaCreateChild1() throws Exception {
+
+ BaseComponent bc = new BaseComponent();
+ bc.setConnection(getASConnection());
+ bc.setPath("");
+ ResourceType rt = new ResourceType();
+ rt.setName("Deployment");
+ Resource resource = new Resource("deployment="+TEST_WAR,TEST_WAR,rt); // TODO resource key?
+ ResourceContext context = new ResourceContext(resource,null,null,null,null,null,null,null,null,null,null,null);
+ bc.start(context);
+
+ String bytes_value = uploadToAs(TEST_WAR);
+
+ ResourcePackageDetails details = new ResourcePackageDetails(new PackageDetailsKey(TEST_WAR,"1.0","deployment","all"));
+ CreateResourceReport report = new CreateResourceReport(TEST_WAR,rt,new Configuration(), new Configuration(),details);
+ try {
+ report = bc.runDeploymentMagicOnServer(report,TEST_WAR,TEST_WAR,bytes_value);
+ assert report != null;
+ assert report.getErrorMessage()==null: "Report contained an unexpected error: " + report.getErrorMessage();
+ assert report.getStatus()!=null : "Report did not contain a status";
+ assert report.getStatus()== CreateResourceStatus.SUCCESS : "Status was no success";
+ assert report.getResourceName().equals(TEST_WAR);
+ assert report.getResourceKey().equals("deployment=" + TEST_WAR);
+ } finally {
+ Remove r =new Remove("deployment",TEST_WAR);
+ getASConnection().execute(r);
+ }
+
+ }
+
+ /**
+ * Test the real API code for uploading - case 2: upload to /deployment and a server group
+ * @throws Exception if anything goes wrong.
+ */
+ @Test
+ public void testUploadViaCreateChild2() throws Exception {
+
+ BaseComponent bc = new BaseComponent();
+ bc.setConnection(getASConnection());
+ bc.setPath("server-group=main-server-group");
+ ResourceType rt = new ResourceType();
+ rt.setName("Deployment");
+ Resource resource = new Resource("server-group=main-server-group",TEST_WAR,rt);
+ ResourceContext context = new ResourceContext(resource,null,null,null,null,null,null,null,null,null,null,null);
+ bc.start(context);
+
+ String bytes_value = uploadToAs(TEST_WAR);
+
+ ResourcePackageDetails details = new ResourcePackageDetails(new PackageDetailsKey(TEST_WAR,"1.0","deployment","all"));
+ CreateResourceReport report = new CreateResourceReport(TEST_WAR,rt,new Configuration(), new Configuration(),details);
+ try {
+ report = bc.runDeploymentMagicOnServer(report,TEST_WAR,TEST_WAR,bytes_value);
+ assert report != null;
+ assert report.getErrorMessage()==null: "Report contained an unexpected error: " + report.getErrorMessage();
+ assert report.getStatus()!=null : "Report did not contain a status";
+ assert report.getStatus()== CreateResourceStatus.SUCCESS : "Status was no success";
+ assert report.getResourceName().equals(TEST_WAR);
+ assert report.getResourceKey().equals("server-group=main-server-group,deployment=" + TEST_WAR) : "Resource key was wrong";
+ } finally {
+ Address sgd = new Address("server-group","main-server-group");
+ sgd.add("deployment", TEST_WAR);
+ Remove r =new Remove(sgd);
+ getASConnection().execute(r);
+ r =new Remove("deployment",TEST_WAR);
+ getASConnection().execute(r);
+ }
+
+ }
}
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 83b221b..8851706 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
@@ -331,18 +331,34 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
fileName=fileName.substring("C:\\fakepath\\".length());
}
- boolean toServerGroup = context.getResourceKey().contains("server-group=");
- log.info("Deploying [" + fileName + "] to domain only= " + !toServerGroup + " ...");
String tmpName = fileName; // TODO figure out the tmp-name biz with the AS guys
JsonNode resultNode = uploadResult.get("result");
String hash = resultNode.get("BYTES_VALUE").getTextValue();
+ return runDeploymentMagicOnServer(report, fileName, tmpName, hash);
+
+ }
+
+ /**
+ * Do the actual fumbling with the domain api to deploy the uploaded content
+ * @param report CreateResourceReport to report the result
+ * @param runtimeName File name to use as runtime name
+ * @param deploymentName Name of the deployment
+ * @param hash Hash of the content bytes
+ * @return the passed report with success or failure settings
+ */
+ public CreateResourceReport runDeploymentMagicOnServer(CreateResourceReport report, String runtimeName,
+ String deploymentName, String hash) {
+
+ boolean toServerGroup = context.getResourceKey().contains("server-group=");
+ log.info("Deploying [" + runtimeName + "] to domain only= " + !toServerGroup + " ...");
+
ASConnection connection = getASConnection();
- Operation step1 = new Operation("add","deployment",tmpName);
+ Operation step1 = new Operation("add","deployment",deploymentName);
// step1.addAdditionalProperty("hash", new PROPERTY_VALUE("BYTES_VALUE", hash));
List<Object> content = new ArrayList<Object>(1);
Map<String,Object> contentValues = new HashMap<String,Object>();
@@ -350,8 +366,8 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
content.add(contentValues);
step1.addAdditionalProperty("content",content);
- step1.addAdditionalProperty("name", tmpName);
- step1.addAdditionalProperty("runtime-name", fileName);
+ step1.addAdditionalProperty("name", deploymentName);
+ step1.addAdditionalProperty("runtime-name", runtimeName);
String resourceKey;
Result result ;
@@ -379,7 +395,7 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
List<PROPERTY_VALUE> serverGroupAddress = new ArrayList<PROPERTY_VALUE>();
serverGroupAddress.addAll(pathToAddress(context.getResourceKey()));
- serverGroupAddress.add(new PROPERTY_VALUE("deployment", tmpName));
+ serverGroupAddress.add(new PROPERTY_VALUE("deployment", deploymentName));
Operation step2 = new Operation("add",serverGroupAddress);
cop.addStep(step2);
@@ -403,13 +419,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
}
else {
report.setStatus(CreateResourceStatus.SUCCESS);
- report.setResourceName(fileName);
+ report.setResourceName(runtimeName);
report.setResourceKey(resourceKey);
log.info(" ... with success and key [" + resourceKey + "]" );
}
return report;
-
}
@Override
commit 707ed7b4a147918fcaa863e5fc2e4d0f64bed629
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Jul 25 14:30:15 2011 +0200
Configuration.PropertiesProxy now delegates equals(), hashCode() and toString() to the configuration properties values as it should.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
index 5182b09..e8c0bc3 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java
@@ -228,6 +228,26 @@ public class Configuration implements Serializable, Cloneable, AbstractPropertyM
public void clear() {
properties.clear();
}
+
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+
+ if (!(obj instanceof Collection)) {
+ return false;
+ }
+
+ return properties.values().equals(obj);
+ }
+
+ public int hashCode() {
+ return properties.values().hashCode();
+ }
+
+ public String toString() {
+ return properties.values().toString();
+ }
}
private transient PropertiesProxy propertiesProxy;
commit 066fa71d4b3943ae6845d40c58c160e5c0c0631a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 22 14:31:38 2011 -0500
Added support for stopContext operation for webapp contexts. Updated service description. Added more complex integration tests for webapp context service.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 42a1d6e..23d7d62 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -18,6 +18,8 @@
*/
package org.rhq.plugins.modcluster;
+import java.util.concurrent.TimeUnit;
+
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
@@ -75,11 +77,14 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
Object[] configuration = null;
if ("stopContext".equals(name)) {
configuration = new Object[] { context.getHost(), context.getPath(),
- parameters.getSimple("timeout").getLongValue(), parameters.getSimple("unit").getStringValue() };
+ parameters.getSimple("timeout").getLongValue(),
+ TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
} else {
configuration = new Object[] { context.getHost(), context.getPath() };
}
+ log.info(name + " - " + context.getHost() + " " + context.getPath());
+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 4b3adcd..7cefa46 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -52,7 +52,8 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.toString(), availableContext.toString(), null, "mod_cluster Context", null, null);
+ availableContext.toString(), availableContext.toString(), null, "mod_cluster Webapp Context", null,
+ null);
entities.add(detail);
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 70a9f2b..b1a0f51 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -2,6 +2,7 @@
<plugin name="mod_cluster"
displayName="mod_cluster"
+ description="Monitoring and management of mod_cluster plugin."
version="1.0"
package="org.rhq.plugins.modcluster"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -77,7 +78,7 @@
<c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
- <c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
+ <!-- c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/-->
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
<c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
@@ -95,7 +96,7 @@
<service name="mod_cluster Webapp Context"
discovery="ContextDiscoveryComponent"
class="ContextComponent"
- description="A mod_cluster context">
+ description="mod_cluster webapp context">
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
@@ -110,7 +111,9 @@
<c:option value="MICROSECONDS" name="MICROSECONDS"/>
<c:option value="MILLISECONDS" name="MILLISECONDS"/>
<c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ <c:option value="HOURS" name="HOURS"/>
+ <c:option value="DAYS" name="DAYS"/>
</c:property-options>
</c:simple-property>
</parameters>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 8bead55..57aed4d 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -33,6 +33,8 @@ import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.MeasurementData;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.MeasurementReport;
@@ -159,11 +161,23 @@ public class ModclusterPluginTest {
try {
OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("timeout", "1000"));
+ config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
+ result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation enableContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
+ log.info("Result of operation disableContext was: " + result.getSimpleResult());
+
} catch (Exception e) {
- log.info("Operation failed");
+ log.info("Operation failed. ", e);
}
- /*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
- log.info("Result of operation test was: " + result.getSimpleResult());*/
+
}
}
commit 6eedd25e13783a9fac64ee96f385a4a6ab8e0f87
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Jul 22 14:17:26 2011 -0400
tell eclipse that some source is now in the filtered sources location
diff --git a/.classpath b/.classpath
index c263ab4..d5bec34 100644
--- a/.classpath
+++ b/.classpath
@@ -154,6 +154,7 @@
<classpathentry kind="src" path="modules/enterprise/server/xml-schemas/target/generated-sources/xjc"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/src/test/java"/>
+ <classpathentry kind="src" path="modules/enterprise/server/jar/src/main/filtered-sources/java"/>
<classpathentry kind="src" path="modules/enterprise/server/jar/target/generated-sources/antlr3"/>
<classpathentry kind="src" path="modules/enterprise/binding/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/gui/coregui/src/main/java"/>
commit 327eca078a43e2a16dd7e17ade502c18661bfd86
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Jul 22 13:24:06 2011 -0400
Do not upload large amounts of data to the db for unit tests
We will however want to test uploading large and very large files in a
separate test suite.
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
index b22ac84..05757a7 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
@@ -96,11 +96,11 @@ public class DriftFileTest extends AbstractEJB3Test {
// running and should be moved to an integration test suite.
@Test(groups = { "integration.ejb3", "driftFile" })
public void loadMultipleDriftFilesWithoutLoadingData() throws Exception {
- int numDriftFiles = 10;
+ int numDriftFiles = 3;
final List<String> driftFileHashIds = new ArrayList<String>();
for (int i = 0; i < numDriftFiles; ++i) {
- File dataFile = createDataFile("test_data.txt", 10, (char) ('a' + i));
+ File dataFile = createDataFile("test_data.txt", 1, (char) ('a' + i));
final DriftFileBits driftFile = new DriftFileBits();
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
commit 24e34cb87e0c9e373590cd8ee38777d80ddc8ae2
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 22 17:41:52 2011 +0200
BZ 724929 - get domain deployment to work again.
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 920de9f..83b221b 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
@@ -338,6 +338,8 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
JsonNode resultNode = uploadResult.get("result");
String hash = resultNode.get("BYTES_VALUE").getTextValue();
+
+
ASConnection connection = getASConnection();
Operation step1 = new Operation("add","deployment",tmpName);
@@ -362,9 +364,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
*/
if (!toServerGroup) {
+
// if standalone, then :deploy the deployment anyway
- Operation step2 = new Operation("deploy",step1.getAddress());
- cop.addStep(step2);
+ if (context.getResourceType().getName().contains("Standalone")) {
+ Operation step2 = new Operation("deploy",step1.getAddress());
+ cop.addStep(step2);
+ }
result = connection.execute(cop);
resourceKey = addressToPath(step1.getAddress());
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
index 6911931..0281279 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -28,7 +28,7 @@ import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.Result;
/**
- * Component class for stanalone AS7 servers
+ * Component class for standalone AS7 servers
* @author Heiko W. Rupp
*/
public class StandaloneASComponent extends BaseComponent implements OperationFacet {
commit c5c562e1ef487cff1fd2ce4891f86607ea59653a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 22 16:36:33 2011 +0200
Implement :reload and :shutdown for standalone servers.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 87a0a5a..b55fc8a 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -154,6 +154,7 @@ public class ASConnection {
Result failure = new Result();
failure.setFailureDescription(e.getMessage());
failure.setOutcome("failure");
+ failure.setThrowable(e);
JsonNode ret = mapper.valueToTree(failure);
return ret;
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 389bed7..920de9f 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
@@ -455,6 +455,9 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
operation = new Operation(op,address,props);
}
+ else {
+ operation = new Operation(op,address);
+ }
} else if (what.equals("destination")) {
address.addAll(pathToAddress(getPath()));
String newName = parameters.getSimpleValue("name","");
@@ -532,7 +535,12 @@ public class BaseComponent implements ResourceComponent, MeasurementFacet, Confi
operationResult.setErrorMessage(result.getFailureDescription());
}
else {
- operationResult.setSimpleResult(result.getResult().toString());
+ String tmp;
+ if (result.getResult()==null)
+ tmp = "-none provided by the server-";
+ else
+ tmp = result.getResult().toString();
+ operationResult.setSimpleResult(tmp);
}
}
else {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
new file mode 100644
index 0000000..6911931
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/StandaloneASComponent.java
@@ -0,0 +1,71 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.modules.plugins.jbossas7;
+
+import java.net.ConnectException;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.modules.plugins.jbossas7.json.Address;
+import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
+
+/**
+ * Component class for stanalone AS7 servers
+ * @author Heiko W. Rupp
+ */
+public class StandaloneASComponent extends BaseComponent implements OperationFacet {
+
+
+ @Override
+ public OperationResult invokeOperation(String name,
+ Configuration parameters) throws Exception {
+
+ // reload, shutdown
+ Operation op = new Operation(name,new Address());
+ Result res = getASConnection().execute(op);
+
+ OperationResult operationResult = new OperationResult();
+ if (name.equals("shutdown")) {
+ /*
+ * Shutdown needs a special treatment, because after sending the operation, if shutdown suceeds,
+ * the server connection is closed and we can't read from it. So if we get connection refused for
+ * reading, this is a good sign.
+ */
+ if (!res.isSuccess()) {
+ if (res.getThrowable() instanceof ConnectException || res.getThrowable().getMessage().equals("Connection refused"))
+ operationResult.setSimpleResult("Success");
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ }
+ else {
+ if (res.isSuccess()) {
+ if (res.getResult()!=null)
+ operationResult.setSimpleResult(res.getResult().toString());
+ else
+ operationResult.setSimpleResult("-None provided by server-");
+ }
+ else
+ operationResult.setErrorMessage(res.getFailureDescription());
+ }
+ return operationResult;
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
index c8868d6..42ffee7 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
@@ -41,13 +41,16 @@ public class Result {
@JsonProperty("rolled-back")
private boolean rolledBack = false;
+ /** Record throwsables during low level processing */
+ @JsonIgnore
+ private Throwable throwable;
+
public Object getResponseHeaders() {
return responseHeaders;
}
public void setResponseHeaders(Object responseHeaders) {
this.responseHeaders = responseHeaders;
- System.err.println("Response headers: " + responseHeaders);
}
@JsonProperty("response-headers")
@@ -95,6 +98,15 @@ public class Result {
this.rolledBack = rolledBack;
}
+ public Throwable getThrowable() {
+ return throwable;
+ }
+
+ public void setThrowable(Throwable throwable) {
+ this.throwable = throwable;
+ }
+
+
@Override
public String toString() {
return "Result{" +
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index d47b24c..c0e364d 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -286,7 +286,7 @@
<server name="JBossAS7-Standalone"
discovery="BaseProcessDiscovery"
- class="BaseComponent"
+ class="StandaloneASComponent"
>
<plugin-configuration>
@@ -303,6 +303,18 @@
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
+ <operation name="reload" description="Make the server load the (changed) configuration." displayName="Reload">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+ <operation name="shutdown" description="Shut down the server." displayName="Shutdown">
+ <results>
+ <c:simple-property name="operationResult"/>
+ </results>
+ </operation>
+
+
<metric property="_internal:mgmtRequests" category="performance" dataType="measurement" defaultInterval="120000"
displayType="summary" measurementType="trendsup" description="Number of requests sent to the controller"
displayName="Number of management requests"/>
commit 7e622323fe675f703ab7aee14503efb303a91d24
Merge: 14ca408 826233b
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Jul 22 12:41:08 2011 +0200
Merge branch 'master' into as7plugin
commit 826233b0e8fc63ce35a923caef3340478c884490
Author: Elias Ross <genman(a)noderunner.net>
Date: Fri Jul 22 12:04:46 2011 +0200
BZ 723800 - support SNMP inform messages and improve testing.
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
index bdfdd84..3148d09 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/AgentPluginDescriptorUtil.java
@@ -36,6 +36,7 @@ import java.util.jar.Manifest;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventLocator;
@@ -58,6 +59,7 @@ import org.rhq.core.clientapi.descriptor.plugin.ServerDescriptor;
import org.rhq.core.clientapi.descriptor.plugin.ServiceDescriptor;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.util.exception.WrappedRemotingException;
+import org.xml.sax.SAXException;
/**
* Utilities for agent plugin descriptors.
@@ -125,7 +127,7 @@ public abstract class AgentPluginDescriptorUtil {
* is searched for an implementation version string and if one is found that is the version
* of the plugin. If the manifest entry is also not found, the plugin does not have a version
* associated with it, which causes this method to throw an exception.
- *
+ *
* @param pluginFile the plugin jar
* @param descriptor the plugin descriptor as found in the plugin jar (if <code>null</code>,
* the plugin file will be read and the descriptor parsed from it)
@@ -163,7 +165,7 @@ public abstract class AgentPluginDescriptorUtil {
* Obtains the manifest of the plugin file represented by the given deployment info.
* Use this method rather than calling deploymentInfo.getManifest()
* (workaround for https://jira.jboss.org/jira/browse/JBAS-6266).
- *
+ *
* @param pluginFile the plugin file
* @return the deployed plugin's manifest
*/
@@ -184,7 +186,7 @@ public abstract class AgentPluginDescriptorUtil {
/**
* Given an existing dependency graph and a plugin descriptor, this will add that plugin and its dependencies
* to the dependency graph.
- *
+ *
* @param dependencyGraph
* @param descriptor
*/
@@ -283,9 +285,9 @@ public abstract class AgentPluginDescriptorUtil {
/**
* Loads a plugin descriptor from the given plugin jar and returns it.
- *
+ *
* This is a static method to provide a convenience method for others to be able to use.
- *
+ *
* @param pluginJarFileUrl URL to a plugin jar file
* @return the plugin descriptor found in the given plugin jar file
* @throws PluginContainerException if failed to find or parse a descriptor file in the plugin jar
@@ -301,13 +303,6 @@ public abstract class AgentPluginDescriptorUtil {
testPluginJarIsReadable(pluginJarFileUrl);
- JAXBContext jaxbContext;
- try {
- jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
- } catch (Exception e) {
- throw new PluginContainerException("Failed to create JAXB Context.", new WrappedRemotingException(e));
- }
-
JarInputStream jis = null;
JarEntry descriptorEntry = null;
ValidationEventCollector validationEventCollector = new ValidationEventCollector();
@@ -327,18 +322,7 @@ public abstract class AgentPluginDescriptorUtil {
throw new Exception("The plugin descriptor does not exist");
}
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-
- // Enable schema validation
- URL pluginSchemaURL = AgentPluginDescriptorUtil.class.getClassLoader().getResource(PLUGIN_SCHEMA_PATH);
- Schema pluginSchema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(
- pluginSchemaURL);
- unmarshaller.setSchema(pluginSchema);
- unmarshaller.setEventHandler(validationEventCollector);
-
- PluginDescriptor pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(jis);
-
- return pluginDescriptor;
+ return parsePluginDescriptor(jis, validationEventCollector);
} catch (Exception e) {
throw new PluginContainerException("Could not successfully parse the plugin descriptor ["
+ PLUGIN_DESCRIPTOR_PATH + "] found in plugin jar at [" + pluginJarFileUrl + "].",
@@ -356,6 +340,50 @@ public abstract class AgentPluginDescriptorUtil {
}
}
+ /**
+ * Parses a descriptor from InputStream without a validator.
+ * @param is input to check
+ * @return parsed PluginDescriptor
+ * @throws PluginContainerException if validation fails
+ */
+ public static PluginDescriptor parsePluginDescriptor(InputStream is) throws PluginContainerException {
+ return parsePluginDescriptor(is, new ValidationEventCollector());
+ }
+
+ /**
+ * Parses a descriptor from InputStream without a validator.
+ * @param is input to check
+ * @return parsed PluginDescriptor
+ * @throws PluginContainerException if validation fails
+ */
+ public static PluginDescriptor parsePluginDescriptor(InputStream is,
+ ValidationEventCollector validationEventCollector) throws PluginContainerException {
+ JAXBContext jaxbContext;
+ try {
+ jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
+ } catch (Exception e) {
+ throw new PluginContainerException("Failed to create JAXB Context.", new WrappedRemotingException(e));
+ }
+
+ Unmarshaller unmarshaller;
+ try {
+ unmarshaller = jaxbContext.createUnmarshaller();
+ // Enable schema validation
+ URL pluginSchemaURL = AgentPluginDescriptorUtil.class.getClassLoader().getResource(PLUGIN_SCHEMA_PATH);
+ Schema pluginSchema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(
+ pluginSchemaURL);
+ unmarshaller.setSchema(pluginSchema);
+ unmarshaller.setEventHandler(validationEventCollector);
+
+ PluginDescriptor pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(is);
+ return pluginDescriptor;
+ } catch (JAXBException e) {
+ throw new PluginContainerException(e);
+ } catch (SAXException e) {
+ throw new PluginContainerException(e);
+ }
+ }
+
private static void logValidationEvents(URL pluginJarFileUrl, ValidationEventCollector validationEventCollector,
Log logger) {
for (ValidationEvent event : validationEventCollector.getEvents()) {
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
index 3d9fb10..9fbba96 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/ExtensionModelTest.java
@@ -313,12 +313,7 @@ public class ExtensionModelTest {
URL descriptorUrl = this.getClass().getClassLoader().getResource(file);
System.out.println("Loading plugin descriptor at: " + descriptorUrl);
- JAXBContext jaxbContext = JAXBContext.newInstance(DescriptorPackages.PC_PLUGIN);
-
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- ValidationEventCollector vec = new ValidationEventCollector();
- unmarshaller.setEventHandler(vec);
- pluginDescriptor = (PluginDescriptor) unmarshaller.unmarshal(descriptorUrl.openStream());
+ pluginDescriptor = (PluginDescriptor) AgentPluginDescriptorUtil.parsePluginDescriptor(descriptorUrl.openStream());
this.metadataManager.loadPlugin(pluginDescriptor);
@@ -360,4 +355,4 @@ public class ExtensionModelTest {
outputType(child, depth + 1);
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
index e137cd8..f9bb654 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/EventContext.java
@@ -33,8 +33,9 @@ import org.rhq.core.domain.event.Event;
public interface EventContext {
/**
* Minimum polling interval, in seconds.
+ * Used to be 1 minute, but since poll intervals are configurable it stands that 1 second will suffice.
*/
- int MINIMUM_POLLING_INTERVAL = 60; // 1 minute
+ int MINIMUM_POLLING_INTERVAL = 1; // 1 second
/**
* Publishes the specified Event. This means the Plugin Container will queue the Event to be sent to the Server.
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
index 6bc790d..15a7ce6 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapEventPoller.java
@@ -27,11 +27,15 @@ import java.util.Properties;
import java.util.Set;
import java.util.Vector;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.domain.event.Event;
+import org.rhq.core.domain.event.EventSeverity;
+import org.rhq.core.pluginapi.event.EventPoller;
import org.snmp4j.CommandResponder;
import org.snmp4j.CommandResponderEvent;
import org.snmp4j.PDU;
import org.snmp4j.PDUv1;
-import org.snmp4j.ScopedPDU;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.IpAddress;
import org.snmp4j.smi.OID;
@@ -39,10 +43,6 @@ import org.snmp4j.smi.TimeTicks;
import org.snmp4j.smi.Variable;
import org.snmp4j.smi.VariableBinding;
-import org.rhq.core.domain.event.Event;
-import org.rhq.core.domain.event.EventSeverity;
-import org.rhq.core.pluginapi.event.EventPoller;
-
/**
* Polls the individual traps
* @author Heiko W. Rupp
@@ -50,9 +50,10 @@ import org.rhq.core.pluginapi.event.EventPoller;
*/
public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
- List<Event> events = new Vector<Event>();
- OID severityOid;
- Properties translation;
+ private final List<Event> events = new Vector<Event>();
+ private OID severityOid;
+ private Properties translation;
+ private Log log = LogFactory.getLog(SnmpTrapEventPoller.class);
public SnmpTrapEventPoller() {
severityOid = null;
@@ -68,8 +69,7 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
in.close();
}
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new RuntimeException(e);
}
}
@@ -79,16 +79,10 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
severityOid = new OID(severityOidString);
}
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.event.EventPoller#getEventType()
- */
public String getEventType() {
return SnmpTrapdComponent.TRAP_TYPE;
}
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.event.EventPoller#poll()
- */
public Set<Event> poll() {
Set<Event> eventSet = new HashSet<Event>();
synchronized (events) {
@@ -103,6 +97,8 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
*/
public void processPdu(CommandResponderEvent cre) {
+ if (log.isDebugEnabled())
+ log.debug("recv: " + cre);
PDU pdu = cre.getPDU();
String sourceAddr;
Address addr = cre.getPeerAddress();
@@ -117,7 +113,6 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
}
if (pdu != null) {
StringBuffer payload = new StringBuffer();
- // System.out.println("=>PDU: " + pdu);
// SNMP v1
if (pdu instanceof PDUv1) {
PDUv1 v1pdu = (PDUv1) pdu;
@@ -127,10 +122,6 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
payload.append("Timestamp: " + new TimeTicks(timeTicks).toString());
payload.append("\n");
}
- // SNMP v3
- else if (pdu instanceof ScopedPDU) {
- ScopedPDU spdu = (ScopedPDU) pdu;
- }
SnmpTrapdComponent.trapCount++;
EventSeverity severity = EventSeverity.INFO;
@@ -168,6 +159,8 @@ public class SnmpTrapEventPoller implements EventPoller, CommandResponder {
Event event = new Event(getEventType(), sourceAddr, System.currentTimeMillis(), severity, payload
.toString());
+ if (log.isDebugEnabled())
+ log.debug("queue event " + event);
synchronized (events) {
events.add(event);
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
index f6c6df5..9e0de67 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponent.java
@@ -25,7 +25,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.snmp4j.Snmp;
-import org.snmp4j.TransportMapping;
+import org.snmp4j.log.Log4jLogFactory;
import org.snmp4j.smi.UdpAddress;
import org.snmp4j.transport.DefaultUdpTransportMapping;
@@ -57,6 +57,9 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
private Snmp snmp;
private SnmpTrapEventPoller snmpTrapEventPoller;
public static int trapCount = 0;
+ static {
+ org.snmp4j.log.LogFactory.setLogFactory(new Log4jLogFactory());
+ }
/* (non-Javadoc)
* @see org.rhq.core.pluginapi.inventory.ResourceComponent#getAvailability()
@@ -65,7 +68,7 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
return AvailabilityType.UP;
}
- /**
+ /**
* Start the event polling mechanism and the actual trap listener.
* @see org.rhq.core.pluginapi.inventory.ResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
*/
@@ -78,19 +81,22 @@ public class SnmpTrapdComponent implements ResourceComponent, MeasurementFacet {
String community = ps.getStringValue();
ps = conf.getSimple("eventSeverityOid");
String severityOid = ps.getStringValue();
+ ps = conf.getSimple("pollInterval");
+ int pollInterval = ps.getIntegerValue();
eventContext = context.getEventContext();
- snmpTrapEventPoller = new SnmpTrapEventPoller(severityOid);
- eventContext.registerEventPoller(snmpTrapEventPoller, 60);
// TODO: check if the engine is already alive
try {
UdpAddress targetAddress = new UdpAddress(port);
- TransportMapping transport = new DefaultUdpTransportMapping(targetAddress);
- snmp = new Snmp(transport);
+ // TransportMapping transport = new DefaultUdpTransportMapping(targetAddress);
+ snmp = new Snmp(new DefaultUdpTransportMapping());
+ snmpTrapEventPoller = new SnmpTrapEventPoller(severityOid);
+ eventContext.registerEventPoller(snmpTrapEventPoller, pollInterval);
// TODO set up the community here
- snmp.addCommandResponder(snmpTrapEventPoller);
- transport.listen();
+ if (!snmp.addNotificationListener(targetAddress, snmpTrapEventPoller))
+ throw new IOException("cannot attach to " + targetAddress);
+ //transport.listen();
} catch (IOException e) {
log.error("Cannot start snmp engine. Cause: " + ThrowableUtil.getAllMessages(e));
}
diff --git a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
index aab6d6e..2858082 100644
--- a/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
+++ b/modules/plugins/snmptrapd/src/main/java/org/rhq/plugins/snmptrapd/SnmpTrapdDiscovery.java
@@ -38,7 +38,7 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
public class SnmpTrapdDiscovery implements ResourceDiscoveryComponent<SnmpTrapdComponent>, ManualAddFacet<SnmpTrapdComponent> {
private static final String PORT_PROPERTY = "port";
-
+
/*
* Autodiscovery is not supported.
*/
@@ -54,7 +54,7 @@ public class SnmpTrapdDiscovery implements ResourceDiscoveryComponent<SnmpTrapdC
*/
public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
ResourceDiscoveryContext<SnmpTrapdComponent> ctx) throws InvalidPluginConfigurationException {
-
+
String port = pluginConfiguration.getSimpleValue(PORT_PROPERTY, null);
String key = "Trapd " + port;
String name = key;
diff --git a/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
index 3b5f442..1846bb7 100644
--- a/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/snmptrapd/src/main/resources/META-INF/rhq-plugin.xml
@@ -17,6 +17,9 @@
<c:simple-property name="port"
description="The port to listen on (Note: ports less than 1024 require root access on unixoids)"
required="true" default="11162" type="integer"/>
+ <c:simple-property name="pollInterval"
+ description="Number of seconds between waiting for SNMP trap events and sending them upstream"
+ required="true" default="10" type="integer"/>
<c:simple-property name="community" description="The community string for SNMP v1 and v2c"
required="false"/>
<c:simple-property name="eventSeverityOid"
diff --git a/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java
new file mode 100644
index 0000000..944b0c1
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/ComponentTest.java
@@ -0,0 +1,116 @@
+package org.rhq.plugins.snmptrapd;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Set;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
+import org.rhq.core.clientapi.descriptor.AgentPluginDescriptorUtil;
+import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.content.ContentContextImpl;
+import org.rhq.core.pc.event.EventContextImpl;
+import org.rhq.core.pc.event.EventManager;
+import org.rhq.core.pc.operation.OperationContextImpl;
+import org.rhq.core.pc.upgrade.plugins.multi.base.NothingDiscoveringDiscoveryComponent;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.event.EventContext;
+import org.rhq.core.pluginapi.inventory.PluginContainerDeployment;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.operation.OperationContext;
+import org.rhq.core.system.SystemInfo;
+import org.rhq.core.system.SystemInfoFactory;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+
+/**
+ * Base class for RHQ Component Testing.
+ * @author elias
+ */
+public abstract class ComponentTest {
+
+ protected final Log log = LogFactory.getLog(getClass());
+ private static File temp = new File(System.getProperty("java.io.tmpdir"));
+
+ protected ResourceComponent component;
+
+ /**
+ * Constructs a new component test.
+ */
+ protected ComponentTest(ResourceComponent component) {
+ this.component = component;
+ }
+
+ protected EventManager eventManager;
+ protected Configuration configuration;
+
+ @BeforeTest
+ protected void before() throws Exception {
+
+ InputStream is = getClass().getResourceAsStream("/META-INF/rhq-plugin.xml");
+ PluginDescriptor pd = AgentPluginDescriptorUtil.parsePluginDescriptor(is);
+ PluginMetadataManager pmm = new PluginMetadataManager();
+ pmm.addTestPlatformType();
+ Set<ResourceType> rts = pmm.loadPlugin(pd);
+ ResourceType resourceType = rts.iterator().next();
+ configuration = resourceType.getPluginConfigurationDefinition().getDefaultTemplate().createConfiguration();
+
+ setConfiguration();
+
+ // Speed up propagation of events by adjusting delay/period to 1 second
+ PluginContainerConfiguration pcc = new PluginContainerConfiguration();
+ pcc.setEventSenderInitialDelay(1);
+ pcc.setEventSenderPeriod(1);
+
+ PluginContainer.getInstance().setConfiguration(pcc);
+ PluginContainer.getInstance().initialize();
+ eventManager = PluginContainer.getInstance().getEventManager();
+
+ Resource resource = new Resource();
+ resource.setResourceType(resourceType);
+
+ resource.setPluginConfiguration(configuration);
+ ResourceComponent parentResourceComponent = null;
+ ResourceDiscoveryComponent resourceDiscoveryComponent = new NothingDiscoveringDiscoveryComponent();
+ SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
+ File temporaryDirectory = temp;
+ File dataDirectory = temp;
+ String pluginContainerName = "rhq";
+ EventContext eventContext = new EventContextImpl(resource);
+ OperationContext operationContext = new OperationContextImpl(0);
+ ContentContext contentContext = new ContentContextImpl(0);
+ Executor availCollectorThreadPool = Executors.newCachedThreadPool();
+ PluginContainerDeployment pluginContainerDeployment = null;
+ ResourceContext context = new ResourceContext(resource, parentResourceComponent,
+ resourceDiscoveryComponent, systemInfo, temporaryDirectory, dataDirectory,
+ pluginContainerName, eventContext, operationContext, contentContext,
+ availCollectorThreadPool, pluginContainerDeployment);
+ Assert.assertNotNull(context.getEventContext());
+ component.start(context);
+ }
+
+ /**
+ * Called before the configuration is processed; override to set specific plugin parameters.
+ * @see #configuration
+ */
+ protected void setConfiguration() {
+ }
+
+ @AfterTest
+ public void stop() {
+ component.stop();
+ PluginContainer.getInstance().shutdown();
+ }
+
+}
diff --git a/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java
new file mode 100644
index 0000000..143f8c0
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/java/org/rhq/plugins/snmptrapd/SnmpTrapdComponentTest.java
@@ -0,0 +1,116 @@
+package org.rhq.plugins.snmptrapd;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Map;
+import java.util.Set;
+
+import org.rhq.core.domain.event.Event;
+import org.rhq.core.domain.event.EventSource;
+import org.rhq.core.domain.event.transfer.EventReport;
+import org.rhq.core.pc.event.EventSenderRunner;
+import org.snmp4j.CommunityTarget;
+import org.snmp4j.PDU;
+import org.snmp4j.Snmp;
+import org.snmp4j.TransportMapping;
+import org.snmp4j.mp.SnmpConstants;
+import org.snmp4j.smi.OID;
+import org.snmp4j.smi.OctetString;
+import org.snmp4j.smi.UdpAddress;
+import org.snmp4j.smi.VariableBinding;
+import org.snmp4j.transport.DefaultUdpTransportMapping;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+
+public class SnmpTrapdComponentTest extends ComponentTest {
+
+
+ private Snmp snmp;
+ private TransportMapping peer;
+ private InetAddress address;
+ private int port;
+ public static final OctetString community = new OctetString("public");
+
+ static final OID alertName = oid("1.3.6.1.4.1.18016.2.1.1");
+ // private static final OID alertResourceName = oid("1.3.6.1.4.1.18016.2.1.2");
+ // private static final OID alertPlatformName = oid("1.3.6.1.4.1.18016.2.1.3");
+ private static final OID alertSeverity = oid("1.3.6.1.4.1.18016.2.1.5");
+ // private static final OID alertUrl = oid("1.3.6.1.4.1.18016.2.1.6");
+
+ private static OID oid(String string) {
+ return new OID(string);
+ }
+
+ public SnmpTrapdComponentTest() {
+ super(new SnmpTrapdComponent());
+ }
+
+ @BeforeTest
+ @Override
+ protected void before() throws Exception {
+ super.before();
+ port = configuration.getSimple("port").getIntegerValue();
+ try {
+ address = InetAddress.getLocalHost();
+ peer = new DefaultUdpTransportMapping(); //new UdpAddress(address, getPort()));
+ snmp = new Snmp(peer);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ protected void setConfiguration() {
+ configuration.getSimple("pollInterval").setIntegerValue(1);
+ }
+
+ private void add(PDU pdu, OID oid, Object message) {
+ String s = String.valueOf(message);
+ pdu.add(new VariableBinding(oid, new OctetString(s)));
+ }
+
+ enum Severity {
+ high, medium, info;
+ }
+
+ protected void sendTrap(String message) {
+ PDU pdu = new PDU();
+ pdu.setType(PDU.TRAP);
+ add(pdu, alertName, message);
+ add(pdu, alertSeverity, Severity.medium);
+
+ CommunityTarget target = new CommunityTarget();
+ target.setCommunity(community);
+ target.setVersion(SnmpConstants.version2c);
+ target.setAddress(new UdpAddress(address, port));
+ target.setTimeout(1000);
+ target.setRetries(2);
+
+ try {
+ snmp.send(pdu, target);
+ } catch (IOException e) {
+ log.error(e.getMessage(), e);
+ }
+ }
+
+ @Test
+ public void test() throws Exception {
+ log.info("listening");
+ sendTrap("hello, world");
+ boolean success = false;
+ for (int i = 0; i < 4; i++) {
+ Thread.sleep(500);
+ EventSenderRunner esr = new EventSenderRunner(eventManager);
+ EventReport eventReport = esr.call();
+ Map<EventSource, Set<Event>> events = eventReport.getEvents();
+ log.info("events " + events);
+ if (events.size() > 0) {
+ success = true;
+ break;
+ }
+ }
+ assertTrue("Did not get event (in time)", success);
+ }
+
+}
diff --git a/modules/plugins/snmptrapd/src/test/resources/log4j.xml b/modules/plugins/snmptrapd/src/test/resources/log4j.xml
new file mode 100644
index 0000000..69a897c
--- /dev/null
+++ b/modules/plugins/snmptrapd/src/test/resources/log4j.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- tests configuration that only dumps WARN or higher messages due to appender threadhold -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="ERROR"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t] (%c{5}) - %m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ </layout>
+ </appender>
+
+ <category name="org.jboss.on">
+ <priority value="DEBUG"/>
+ </category>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
commit c96ce2fd8564b95b21f6768b67e6079e3fbfde5a
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 16:45:15 2011 -0400
Disable verbose logging by default
diff --git a/modules/enterprise/server/jar/src/test/resources/default.persistence.properties b/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
index 366ecb3..8e4f317 100644
--- a/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
+++ b/modules/enterprise/server/jar/src/test/resources/default.persistence.properties
@@ -16,7 +16,7 @@ hibernate.bytecode.use_reflection_optimizer=false
# I don't think this is honored, but EJB3Deployer uses it
hibernate.bytecode.provider=javassist
hibernate.jdbc.use_streams_for_binary=true
-hibernate.show_sql=true
+hibernate.show_sql=false
hibernate.format_sql=true
hibernate.default_batch_fetch_size=16
hibernate.jdbc.batch_size=20
diff --git a/modules/enterprise/server/jar/src/test/resources/log4j.xml b/modules/enterprise/server/jar/src/test/resources/log4j.xml
index 83c5a23..681f2af 100644
--- a/modules/enterprise/server/jar/src/test/resources/log4j.xml
+++ b/modules/enterprise/server/jar/src/test/resources/log4j.xml
@@ -19,7 +19,7 @@
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
- <param name="Threshold" value="DEBUG"/>
+ <param name="Threshold" value="WARN"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Messagen -->
commit e4b5fade3608ca497fdbb142ab0354cf49747316
Author: John Sanda <jsanda(a)redhat.com>
Date: Thu Jul 21 15:38:59 2011 -0400
Removing scratch files that shouldn't have been included in previous commit
diff --git a/modules/core/domain/mvn.out b/modules/core/domain/mvn.out
deleted file mode 100644
index 7e78162..0000000
--- a/modules/core/domain/mvn.out
+++ /dev/null
@@ -1,194 +0,0 @@
-[INFO]
-NOTE: Maven is executing in offline mode. Any artifacts not already in your local
-repository will be inaccessible.
-
-[INFO] Scanning for projects...
-[INFO] ------------------------------------------------------------------------
-[INFO] Building RHQ Domain Model
-[INFO] task-segment: [clean, test]
-[INFO] ------------------------------------------------------------------------
-[INFO] [clean:clean {execution: default-clean}]
-[INFO] Deleting /home/jsanda/Development/redhat/rhq/modules/core/domain/target
-[INFO] [enforcer:enforce {execution: enforce-versions}]
-[INFO] [build-helper:maven-version {execution: default}]
-[WARNING] DEPRECATED [tasks]: Use target instead
-[INFO] [antrun:run {execution: write-build-properties-file}]
-[WARNING] Parameter tasks is deprecated, use target instead
-[INFO] Executing tasks
-
-main:
-[INFO] Executed tasks
-[INFO] [properties:read-project-properties {execution: read-build-properties-file}]
-[INFO] [resources:resources {execution: default-resources}]
-[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
-[INFO] Copying 393 resources
-[INFO] Copying 2 resources
-[INFO] [compiler:compile {execution: default-compile}]
-[INFO] Compiling 391 source files to /home/jsanda/Development/redhat/rhq/modules/core/domain/target/classes
-[WARNING] DEPRECATED [tasks]: Use target instead
-[INFO] [antrun:run {execution: echo-build-properties}]
-[WARNING] Parameter tasks is deprecated, use target instead
-[INFO] Executing tasks
-
-main:
-[INFO] Executed tasks
-[INFO] [resources:testResources {execution: default-testResources}]
-[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
-[INFO] Copying 13 resources
-[INFO] [compiler:testCompile {execution: default-testCompile}]
-[INFO] Compiling 54 source files to /home/jsanda/Development/redhat/rhq/modules/core/domain/target/test-classes
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/test/AbstractEJB3Test.java:[116,70] [deprecation] connection() in org.hibernate.Session has been deprecated
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/content/test/PackageVersionContentSourceTest.java:[118,71] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.content.PackageVersionContentSource>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/content/test/PackageVersionContentSourceTest.java:[157,80] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/TestUtil.java:[42,37] [unchecked] unchecked cast
-found : java.lang.Object
-required: T
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationTest.java:[198,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.Configuration>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[67,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[90,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[112,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/AgentTest.java:[117,37] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.composite.AgentLastAvailabilityReportComposite>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/test/SerializableTest.java:[177,19] [unchecked] unchecked cast
-found : java.lang.Object
-required: T
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[98,105] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[135,30] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/configuration/test/ConfigurationDefinitionTest.java:[184,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.configuration.definition.ConfigurationDefinition>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/ResourceTypeTest.java:[41,26] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.resource.ResourceType>
-[WARNING] /home/jsanda/Development/redhat/rhq/modules/core/domain/src/test/java/org/rhq/core/domain/resource/test/PluginTest.java:[332,50] [unchecked] unchecked conversion
-found : java.util.List
-required: java.util.List<org.rhq.core.domain.plugin.Plugin>
-[WARNING] DEPRECATED [systemProperties]: Use systemPropertyVariables instead.
-[INFO] [surefire:test {execution: default-test}]
-[INFO] Surefire report directory: /home/jsanda/Development/redhat/rhq/modules/core/domain/target/surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running TestSuite
-Starting ejb3...
-Loading EJB3 classes from directory: target/classes
-log4j: Threshold ="null".
-log4j: Class name: [org.apache.log4j.ConsoleAppender]
-log4j: Setting property [target] to [System.out].
-log4j: Setting property [threshold] to [WARN].
-log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
-log4j: Setting property [conversionPattern] to [%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n].
-log4j: Adding appender named [CONSOLE] to category [root].
-WARN 13-07 15:00:21,151 (Ejb3Configuration.java:addXMLEntities:422) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
-lookup
- UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
-...... embedded-jboss-beans deployed....
-...... deploying MM ejb3.....
-...... ejb3 deployed....
-...... deployer created....
-WARN 13-07 15:00:29,804 (Ejb3Configuration.java:addXMLEntities:422) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
-lookup
- UserTransaction: org.jboss.ejb3.embedded.UserTransactionImpl
-...... deployer started....
-Configuration definition: CONFIG_ENUM_VAL_TEST (test data)
- SimpleProperty[EnumeratedProperty] (Type: STRING)
-Before: [PropertyDefinitionEnumeration{id=10871, name='A', value='a', orderIndex=0}, PropertyDefinitionEnumeration{id=10872, name='B', value='b', orderIndex=1}]
-After: [PropertyDefinitionEnumeration{id=10872, name='B', value='b', orderIndex=1}, PropertyDefinitionEnumeration{id=10871, name='A', value='a', orderIndex=0}]
-Configuration definition: CONFIG_CONSTRAINT_TEST (test data)
- SimpleProperty[ConstrainedProperty] (Type: FLOAT)
-Constraint: FloatRangeConstraint[details=1.0#3.0]
-Configuration definition: TEST_CONFIG (Config definition for the thing)
- SimpleProperty[SimpleProp] (Type: STRING)
- Map Property [MapProp]
- SimpleProperty[IntInMap] (Type: INTEGER)
- SimpleProperty[ConnectionType] (Type: STRING)(Group: Basic Group)
- SimpleProperty[SimpleBool] (Type: BOOLEAN)(Group: Basic Group)
-Serialized version of config was 1367 bytes
-WARN 13-07 15:01:20,904 (JDBCExceptionReporter.java:logExceptions:77) -SQL Error: 0, SQLState: 23505
-ERROR 13-07 15:01:20,905 (JDBCExceptionReporter.java:logExceptions:78) -Batch entry 0 insert into RHQ_DRIFT_FILE (CTIME, DATA_SIZE, STATUS, DATA, HASH_ID) values ('1310583680392', '10485760', 'EMPTY', '1489397', '6486d7a1e0f8a97387e1f1f8780ea7dd1ab212a4b862bcefdfb0f1d1480f9996') was aborted. Call getNextException to see the cause.
-WARN 13-07 15:01:20,906 (JDBCExceptionReporter.java:logExceptions:77) -SQL Error: 0, SQLState: 23505
-ERROR 13-07 15:01:20,906 (JDBCExceptionReporter.java:logExceptions:78) -ERROR: duplicate key value violates unique constraint "rhq_drift_file_pkey"
-ERROR 13-07 15:01:20,907 (AbstractFlushingEventListener.java:performExecutions:301) -Could not synchronize database state with session
-org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
- at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
- at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
- at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
- at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
- at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
- at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
- at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
- at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
- at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
- at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:3074)
- at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:2632)
- at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:1194)
- at org.jboss.tm.TxManager.commit(TxManager.java:588)
- at org.rhq.core.domain.drift.DriftFileTest.executeInTransaction(DriftFileTest.java:187)
- at org.rhq.core.domain.drift.DriftFileTest.loadSameFile(DriftFileTest.java:152)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:597)
- at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:640)
- at org.testng.internal.Invoker.invokeMethod(Invoker.java:627)
- at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:798)
- at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1102)
- at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
- at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
- at org.testng.TestRunner.runWorkers(TestRunner.java:1009)
- at org.testng.TestRunner.privateRun(TestRunner.java:683)
- at org.testng.TestRunner.run(TestRunner.java:553)
- at org.testng.SuiteRunner.runTest(SuiteRunner.java:311)
- at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:306)
- at org.testng.SuiteRunner.privateRun(SuiteRunner.java:268)
- at org.testng.SuiteRunner.run(SuiteRunner.java:217)
- at org.testng.TestNG.runSuite(TestNG.java:1062)
- at org.testng.TestNG.runSuitesLocally(TestNG.java:956)
- at org.testng.TestNG.run(TestNG.java:874)
- at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:61)
- at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:144)
- at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:597)
- at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
- at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
-Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into RHQ_DRIFT_FILE (CTIME, DATA_SIZE, STATUS, DATA, HASH_ID) values ('1310583680392', '10485760', 'EMPTY', '1489397', '6486d7a1e0f8a97387e1f1f8780ea7dd1ab212a4b862bcefdfb0f1d1480f9996') was aborted. Call getNextException to see the cause.
- at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2598)
- at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
- at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)
- at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737)
- at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:518)
- at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
- at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)
- ... 42 more
-testTraitQuery ...
-testTraitQuery: found 1 item(s)
- and it is MeasurementDataTrait[value=[Hello World], MeasurementData [MeasurementDataPK: timestamp=[Wed Jul 13 15:01:21 EDT 2011], scheduleId=[12011]]] and name Fake display name
-Created resource with id 13617
-Created resource with id 13618
-Took [5092]ms to create [2000] resources
-Took [853]ms to remove [2000] resources
-Destroying 1 processes
-Destroying process..
-Destroyed 1 processes
diff --git a/modules/core/domain/snapshot.txt b/modules/core/domain/snapshot.txt
deleted file mode 100644
index 1f810c8..0000000
--- a/modules/core/domain/snapshot.txt
+++ /dev/null
@@ -1,3000 +0,0 @@
-93e92c0f415aa66a55ccd0e49d859348d27d5d54367813621979ef0d54e45f9a test1/0 0
-94fbd899459fb6e4939410ee2b0e1bc6bd53a57b2af8032b4a5c0b109d06b84e test1/1 0
-adf3039689ccebf34ec400c347703f17452a9ed9379b99624aa27c0005993731 test1/2 0
-b0879da6fe67fa0b6a9c022362924b13df977c13b25bf7d74c3738e33c398360 test1/3 0
-06656dbb054c912063afd0352d4aa72a071d1a9a4d4183e005a46a09750219de test1/4 0
-8564725d5ef522c04028c8d4ab89455b10913e59332dedd05c5bb7ed7cf80d1e test1/5 0
-251aec9aece7a45263e3f3243930006435dde5c5c0b0bdbea6c5e2304063b9f6 test1/6 0
-f4c7f75e564e53fb29af07c612dd4a5232de603e13a884e058b1e1bd0e909d3e test1/7 0
-77c4d70241d8eed431c5ad1ec4ec83eb7c4c252085aeb411308a3854ede664b2 test1/8 0
-4448f50b3b02039c6162be7ad939db59ff9f43fcd7e5a75aaa5607158d26cc77 test1/9 0
-e283683f6b3cf52ea745d0f2edb9d9dc74da0c0eee06531b5347f4ebecc44723 test1/10 0
-34b6be50f854b805c49be45268fb2ed20d11905b483f260bd9196bff1b1bfa80 test1/11 0
-2bfa9f61b309bc41df4d999e6bde2c3328576b8391421784ae652d5720b93c32 test1/12 0
-5407ab5878fc10dc5254c967b5fe3cf66299d231eb36ac27af1d75c04308162d test1/13 0
-999fc4c84b0440ef6d24c679fe9468f7af41e0875b3a5ba193f54ec824c8466d test1/14 0
-161bd4017bbb689b55d621f9ec7658a5f1f43cb18eb48a96f4b27f31f12a685b test1/15 0
-1ed8304b6f5b888b636438da8ec5134a3a8b373271ad29c55c8a65ee5fad5b8e test1/16 0
-9af92b2dc57f984a7d0f5923e480f509b9f1da52ba0c13ccddbec533104cb5a7 test1/17 0
-c714103b46f3bb4f94aacd14f974a2fd40e968b6fb95d2eba2984992e4914312 test1/18 0
-ad092783b1a1a1efb8dede88a14a83ce57dd72ef9c0220aeeec6a1c54bbf86fe test1/19 0
-ca4ef5ea3f763a7dd58e2d1450212ca8700266e288267b4b44bc07330af9fd69 test1/20 0
-09d3fb328873594a11c77e1100655c891c20aa345ebe836fa8f7f9ebd96b94c8 test1/21 0
-55b174d7c19288f5f7674ce43aa3347cb1602b7df23ea2f249eab97db76e900b test1/22 0
-9555f6f19843fe04312cf23957d408dae400eb3163002b4f1c26945470dbf8d6 test1/23 0
-c6b6c34ac0eba6ac68ce7853942f210fc9aa8702380f53b06d9f8f3eebc017c8 test1/24 0
-0be678fa48e2df02a07d358724ecd00b19ece5653c0c06103367d094815d099e test1/25 0
-d4db7b380bf91f238c03b0165616a201b4a29e70bb40fefb1cd53b1be0c6f6b0 test1/26 0
-11a342df1c98476f73b327c6f7e3e4a419edd3af467eca5180c547aeb6637e20 test1/27 0
-25979869cbf179dd7b91650804438984d53d11591514a1097241a21ce62cfee3 test1/28 0
-095d48e67dea734b4c1e390214cce1fade148df00a03a54ae25fb3ae94e6e717 test1/29 0
-6fc81ff946f393a4da640c4ffc18cc0c79c9c24da1b7a50bfa566342ba853e38 test1/30 0
-f1ace3f1502b144e2badc189bc2b5177a0dee8afe85603775516845e31b4762f test1/31 0
-15270686d4dd3baee620394e99a2b72fd573239787c7a536b0a524922e415de1 test1/32 0
-73fa027929a5eb3eb62b3e2df0e78ecf2196a3df5f2de74d1155a1d867f4eaf0 test1/33 0
-e1cdbaa01ace490fe2d1142550a390310c64e95e7f1b21b4ffd2fd35749971c1 test1/34 0
-f0fa8b8146c6c92350fd9b54a7dc8faf62d8fc4362a4286a07d28b4cb05810bf test1/35 0
-550254395e0d3b832cd0992c480018559965ff4ed2459c17aacf4ccd010e2f5a test1/36 0
-a6691b97eb734822f1c0510474e50b3a6b71ad34c486440787e583b1b47d0747 test1/37 0
-f3852cacd73f6d7b778358aba919912f74b5d473fd055523e6968c846880a68e test1/38 0
-5da6f03a018430a595536d93b439680da6d6a823f44a1623144ebca84581f353 test1/39 0
-6b2571c109ecd5b64c8f1be509c8d7fec3f8dbb422b6c407851311025468283e test1/40 0
-963c1597d2de24b553aa972914c5bd3f19d303067c0ffe38357c2199f9056986 test1/41 0
-68042243d98c62f6705bdc0020eef4ebe5ebd6b7832cf330f022498aa8dcc186 test1/42 0
-9912c7acbf6c86e256ed95e469e859ac9cc5d8fde114abf9ffd02739c8d7dbf3 test1/43 0
-1e335a18dc9d46e1545bc8916c6635f9b0327a2b12552d3b5df01bd6fe9fe7f2 test1/44 0
-497579028dc956d13b353842d4de2303e4300bf82a3107583891ad8888e85039 test1/45 0
-f82d24a260858763fc4650303cd96e8e40f4ec0aa030c9c14b6cbf2056cb44e1 test1/46 0
-4c1f7272a19fe0a3099ef6f4d91762e6a7e12449f62124cbd11d15de911714e1 test1/47 0
-38e403db8d756191973a2f1716d0a8a5e082ea583511fde6cb6f1abb078ee4f3 test1/48 0
-b6556279774a38f8938e7f334eb3633be51916f3051675b048843c8e8ecbf1b2 test1/49 0
-5766243d4d6ffbea18772d0b5926d2886d66b8cbfc6dc00ed8b0069a28a7cac6 test1/50 0
-17fa3dc16a1a190c515fafe9a26f13596dfb5a7a7c5be5ba92bb80d8c738cc21 test1/51 0
-e79c2470c6a8f4e6f59d035ae848b6bd8d941bca899f6156defd5a418a1aa91b test1/52 0
-1425c79446b2e32cc0fd1c919bb1f409844a994756d03bba38bd4669b3cbe94b test1/53 0
-470cacc611b10026a736c639ce709a61bc843c8e947ad40149c29c4384f7623b test1/54 0
-fbf74352f9ad3469810b0360f08903562bf2ee6d7660f8651d37e2f5c09a7d78 test1/55 0
-a6d051dee582e7278bf6fe8a4fd7cf97073b18bef3d5547ace46cdcfeb3b7a63 test1/56 0
-74b6dd40c4d95ef3444d82e536d5dfb3253fcb7d2831318e489881bc967712c0 test1/57 0
-594889b32d366e79a545e487f11a44102b4d4329c04e437904c01beadd1a87a6 test1/58 0
-7ad8d06191419c19a3aa868e5fd0f2ea79e1d2fa37a9ddcbfea584e98583170d test1/59 0
-00a6f54df08ae6720654bb8c4c0a2fb669f362b4d903cccb759f4c3f8b541dab test1/60 0
-c62c7ab4188c70d6b7dfe3127a0f7f1771ec075835f31215fbf74e334299eb11 test1/61 0
-77f54c9394c4d8594421eded4b592a747b346c6cc8f8fee893a7b0db62fb892b test1/62 0
-207d63144c7e3de618fe7f96f4346543d32af8fb1f370b8943da7c5b015c187d test1/63 0
-0c17895edd30ac98a9cea894d1f2ad8b23635302fa1ff0c972bb0778468db22c test1/64 0
-fbe0fc1dab31f0510e6a0da5ad46f0542145bd4efd63f1633b87f24de1aaa3e3 test1/65 0
-88be069fdb3bd08e9284a9fef1e64b828091b83672dd8a2343c369be76880957 test1/66 0
-b674ad594f54f8ef2cc4dbbb84b998f08d2076cc6e9d23591a0dc4cc609adf9b test1/67 0
-8a7c9216ac8d02a31ebd65186d06e88add4720585d408e9808f587c44cea6283 test1/68 0
-89c2acb2a6ff43f1bffb336cc33c9baf8ebc543dc73097d1fb0a9556ac410c56 test1/69 0
-2ae0a4bb528fb450ce4ca0e8208a4c50a86483281f2efc13e1da2918462680ca test1/70 0
-9afc0398b28a4d8a219ba9b4107d3e954237b7d1d80f2dd58942fda25087480a test1/71 0
-402ffa8422932a3e6b4b4ea82e3d849c9fe2d8dd6fbcd974ac6dfd67db97e816 test1/72 0
-51b336dabe9b06c6f4bf0b8ab4beb01d812b5e802d8c562003fef1feb04b5594 test1/73 0
-e3e4209781a43a0cc686d9671d1d13adc8c93a11bf3899185385db69593f1fcb test1/74 0
-ccf800357850ed899d0c20fcbd80d21885a2028de34bc16d786311ee9a9d72cd test1/75 0
-3c994225d1972baa6f97af6455161c3c726ce3b77dad02c4891c6928eb8ae825 test1/76 0
-53d40b96a7bac33f80d966898489de15967b508d60992facbfa8c46c1abad85e test1/77 0
-5383dd2af3479ea61550e0c0fc5ac8d61f6385a5ff9eb3c3a52285aa8a5e2be9 test1/78 0
-ce351ec9efb46ba40dad01e093c14905d8a5dfb1af7a129f6bb22c04fa30fac1 test1/79 0
-e4db5bd0eb3ba46dea729d9bcdc30b23b3b51a0a70847b52a7cd95f296693657 test1/80 0
-5910feacfafedb664c2877588ee39d6a77ff2a0a4ba2be0718d7446f14b64624 test1/81 0
-c8e67ee213c49a9e36da81fa0b0e46732b5ae5fa06993301b42b4acb665c5c68 test1/82 0
-422e2d7728625507190c74fbc5debf436e3214a52bfe81b112e355600dca178b test1/83 0
-ff9ba5727d94a8617a08eec78d5bbe7aff135eb494ddef63d4cab8d8311daea6 test1/84 0
-1038418d653e66633089f1dfbc69be9f92d387a90ef610dcb646f0da6eedf2bb test1/85 0
-248257e12f51227dbb52f96c287e11635f51a520d998587ba481dbe90968cc83 test1/86 0
-6080687a2defc3e4a72ed29137e0a3676395d60e8f9257f14d411eab4034ce09 test1/87 0
-e9c3fe77b8dea071ac40261c8d47270041ad4b0c3d1fc4bda5e3ccfb93318f5c test1/88 0
-b448227cb7726d8d80a9618ad2d237985f14db129816d8cb685de061ef69c197 test1/89 0
-e155e014d4a431498316277e0b8ed4b2d9ae2d581923cace35d5a01d62a7063b test1/90 0
-bd8424f48f00e2ea2a14dd879684a9c46cdd8ed47ea9884163fafbb2c3b29075 test1/91 0
-153b230dcac0bca526235389b061f0053766fb7d0ea8b61d91cee65f7b71b523 test1/92 0
-3c32fa4ee56a4cd9bc186343adea7d61be5f931bd144cd60f691cace1d49634f test1/93 0
-fe6c21de3fe5957810d88a7c5efc9c9b194c3b3a022ac2efc29d8f4af7d2d9ba test1/94 0
-277c096d5578aa103fa518463958625c5379d4bdb200d91f949f8a6f62906d07 test1/95 0
-fe8d978cfa8a5eba2a58ceb811e5e7ad9ef287b2d864e2f4bfe7c26561038785 test1/96 0
-8a2d435818a7d70d9419d0b4e7c78692d960c75376d4eeccf920f772e059edbd test1/97 0
-0180a90589f021bddb305dfa1767de34a9b60988576c6a7e061065b32d2875da test1/98 0
-791799f9931e2f0e464f037625152b7fd9b86fd3aa55aae2f36c58260a0caa1d test1/99 0
-0ddf02f95d3abd712f36e5a9fb83239538ddb461dcd192558b63110a12d9db8d test1/100 0
-770d7e0e31ecfda0a49e85e5b046758c1c620527c102a732b073312944dee44c test1/101 0
-d14b5a9a6e02051e6ffc5e9a7b7e6c8db099737ad3da005b04ae9baf90ed7961 test1/102 0
-5cadf94a6f5e1cc161b8075c676fcc6fee5f314a3496fcf3a864ddb1f2693cf0 test1/103 0
-6e4bae160b599363563699b4acec4ece274ba0f1ecefdc9c7ca6ba85b1046f39 test1/104 0
-cd0af0e0a55ebc613e454e7fd158120daf1b0ccd88238a0d7e638303b6441bf5 test1/105 0
-45b48ed72b11b51b80995659720ab53d1497561e4fb994702709e774f9bce9fb test1/106 0
-1fc332cc25fa971aacc06e498b424ba2f30bbfd5af5c2671de9939fc8be6efec test1/107 0
-da325fb1d76bda85a7bcc51408b37def38abd9cb24181933aa208e689de9b6b0 test1/108 0
-d8992471d36fbb0f6b75221ba3c28bf47e5d3724ba532057234261ed8d445c51 test1/109 0
-5872e099caa22aac444d2c0c7df36656a609bf7ff88a5f2e07ab57e8ab3e8463 test1/110 0
-17fa8d710a7932a2d85f02c19d895db6af85ef8ca09ce0ad2320938c056c1222 test1/111 0
-f90298cd8bbc7f6d9875bd7dbda303726eac9e71657b5b3b6b9ff69722c76cf1 test1/112 0
-34057cce56e528ce18d36b9f30619722041b2268d35c7632a2a60b1c820ab6a9 test1/113 0
-4a019913e772c3d19d02241c38709b1a5d678111f9626b3ff6158470e658cc34 test1/114 0
-384d91d9b6be2058e45daad7a71e8b6b86570e7f7f28f979654b263e1ed3716a test1/115 0
-383caf2e6cec05028ab202d910420ad9b685c425494e775327366292520f7464 test1/116 0
-a68c1833375189b696f757079bb0e965bef7a594749bdfe09179b8f76884cc67 test1/117 0
-33f761834cff416a2e7a9c50476d6e61a20b848b65af354b21277db4bafa79f7 test1/118 0
-cdf4c617bb008e5af0b6177ad7890745aeb7d6681b249af05e62901ff8d10312 test1/119 0
-f245f42b6abdaa9fd4989f6690078d2724569caa14f8f2901e664dafa6739b92 test1/120 0
-69db96dbca51faa3d39492366195ea8854f90365800ed83ea07cb766cbd7c6e3 test1/121 0
-ac32dee0e4bb11fb45378d206075b8aeaadb3781cf1cb9abb3ae92952dc1ddbe test1/122 0
-9da59f7b3a447ebcc335165c33a68b97764396e47b2834f2ce395538a7987b07 test1/123 0
-daa858953cdcc274947de320f347e94e5fbabd1cce8b92efbec322858eb3749d test1/124 0
-d18db683b454fb9ef6214e36de234cc727f5ffcf4dd33cf611c26ef7c114d17a test1/125 0
-f3b79bff4905ee97d05eab0706935b11e2855356fb37277664071ac87bfdb9ad test1/126 0
-8b394a7dc0d99416633f392f0e8a8928a44b4932c4d046fdac01f7fbf07de777 test1/127 0
-5cf8e7acc88ed2ece93a7ee46764da376ce276e15b381066d77654ca76fdca77 test1/128 0
-1722133bc958ed2842fa020b95cc386d10ff7bacf145f1caca65f6b17f79740c test1/129 0
-da60c35db70f29db0fcfefa17fcc014b373cb09fbec8020be0f2422874eaadee test1/130 0
-57612e7db907f0084488969c6724682a32cc016454f457718f3b72abba0d7893 test1/131 0
-c886768d92d40dce485b891db8f9aa5f89fc17d0f7f644634eef7f159ad024b5 test1/132 0
-8fb0955a700af97ec8cbc82740eae78baf0461b095dfb55ea13aa8de1011fe09 test1/133 0
-5ad5dcfe4b6c8f20892fde0f7757ae9902aada719edab50fcf2a9e15b3fd62b3 test1/134 0
-7dd7cda0e4f0ba79022c98ce81b8f813af24fcc92222032014fdc4130dcc7bc6 test1/135 0
-4b71114b12d341aaf9eaf360546fb63f92bad2101b913bf401c96a8c9d699ee4 test1/136 0
-4f8910c3ba4565454ed5e74fd55ab65e21445727734966943fe903e368b612c0 test1/137 0
-83416c194860e8da17d02195703b3d1184c7bb36de16e699e19465e4f693fdb8 test1/138 0
-ac165a46ada013f19aa5a60639f3a778c859a0ee6b259f138c7f0712e79af473 test1/139 0
-ea32e9da4de879a76c2fea22a988fe989405fcd3761a0fa424e9baf78a7391fa test1/140 0
-9bfda524db57a43177e496bc15706972702329a7b3bb1238aa8f9ade65ff32c8 test1/141 0
-f684cf1a93b5b941bbad51258888a692ac20c5297f0fa5cdf8776f72346ffeb3 test1/142 0
-ab516ab86adbcfe94b667cbbda805465bf8b5f424907c06a85966bb7ce2541c9 test1/143 0
-cb8a06068dc9ae497258cdae37761e2b1ba8805d05af0413c88cb1d16a59a46b test1/144 0
-82fed2aaa147eccb99c68a477bf3ca43972d059849bf05bbbec1b8ae18ed8ad0 test1/145 0
-6e29f3b832ff4038cd9524214d5c1820f56c8ae418ab76fd3c78143087a50c8b test1/146 0
-71d61d69f51542c2ca875191bd2d61d5ec7df1ce92dd31003cf47ef009e827a4 test1/147 0
-04290b88ec21383feaf55898062edc5d2b3c658bbee39266679c503f836c584c test1/148 0
-81dd1d834c012a3750357e5f1f3a39c749b1e18d4d64e8da0bc7363f2087d5f5 test1/149 0
-0e573b27ad926a33fafbb626b30597c04e392097842b8ef669ec417ce0d9f2e1 test1/150 0
-0b0e85aefa5254f269278dee2bcf93db170a440b40c309977ed8afc6a177e0b8 test1/151 0
-6cd0e02dfc568762301f861066909f9fab58f8fc4031eb1080203becd192ae66 test1/152 0
-3a6fbb67464fbac9a994f8dc9e9ca24ffdb54d58505ae9161ad7fd198917ce2e test1/153 0
-a8552d2203a95cb65c635e46492a5d65601d349a5beb1527233ac10da7f50948 test1/154 0
-6779dc33d4b85cfa305cbda029b1e30b4f891939b7a5d6a2a397ec13e761eece test1/155 0
-54b4359607d170039b1ae03eb4f1cc38ca6bdc69cd9beb6ea7e795b8977b19d7 test1/156 0
-0af05fe135509e38d8e2c6b86b87377ea9396af869789eb4ad5a5a8976aa588a test1/157 0
-84279e23e4e9fd2b1a88551df8a18c2d8ff5a39acc46f7d7f6c578b70f55c981 test1/158 0
-60069413fe3f3cabdf456781de01186ece1c949906f4ac942882e781ebaae52f test1/159 0
-67dc50fcedcc925248b63b9d6c721eace74bf155dac344ae713c75596c20cdbb test1/160 0
-982335f8f17cd8bd18090830b24cc42ae428b4d11d9096f95ab300d9238ceab8 test1/161 0
-39ce96539abf446780feb4a8ad9708190e8b5660f7f1d0afb76222523b2d65b3 test1/162 0
-54b8f2944628f886aa9fc2b841e2fe98dede8eeb8dde17fed40fd775e23d5811 test1/163 0
-7d3050aed86f48b5691a465829d0aa04d57ff8054c059171be94f02d103d849b test1/164 0
-93fa34cc08bbe366bb115d54f1106fd453fdfe0f6ed0e85250337292d2129f22 test1/165 0
-00c813c05a9629778e1d816d7d488dc12b392d71049812105e611e718a51bf85 test1/166 0
-454324976eddc61634d0df8fba87caa9909cb42cf2b609046f496488565baf82 test1/167 0
-c8efa92bb16ffd454fb00e27e95a0c06d88263f3fd86d95bd1c0a6792a12f755 test1/168 0
-79851af11d1df1ca3491b68bb0062816de488b3fa4f6f1d1b9fe81b85cb971dd test1/169 0
-96cff0601698066d018c84bf96d697c03d1f362e5a407a970de247881f7d0303 test1/170 0
-60b5bdab53b06c6d30f71415e95153aaa87216bc77bc2e3bce7d63199e9cc8c5 test1/171 0
-11ebf3b1eab102a5f42d1fedc90cdfb3745972e74625d1c9d5d3d98f82ca22db test1/172 0
-d302457c4892782536ea2bb3e8088329b5c7c1357b867c91be98740147f3689e test1/173 0
-8275087150cd752cb053f31283a84a8b97d599bd02d0c13c38f6a7ba38aa6d96 test1/174 0
-65e9d252536a0d6b173a8bb22e64d308e9ce4196b58e953de2947ef3e95adc12 test1/175 0
-3c99ff06797305c697787820eb233580638a96c0cbf6877610dd0e7cfa128363 test1/176 0
-e44d0d8a2163e03b1726048862e915ff835b0b3176dd05c32f4e66037dda6b51 test1/177 0
-1995d7eacf17ebcad42731682716b6b66f8ec344c5c070a3d88aa134558e656f test1/178 0
-4f53ec03261b3c38b5dc7889dd4e75836457eac7970a04325f86ecc3f54f6cc4 test1/179 0
-4af3940149a94d212dd91cb1b8e3536b9dcfa58fa533027fde2ade5be43a1285 test1/180 0
-d03494cc1b59ce51d280067998dfac92958223fc21c384bf09a10f575ce92cf2 test1/181 0
-1eab0f69a763f8188da6ab7d0096b0ae6b0607a382c8afadc9247207a0486234 test1/182 0
-018eb8a2a0a6d847b9a2dea900651705a46fbc5cd5c78011a4c4f6f52e6a2ae0 test1/183 0
-23cd6b98474be38d060491b6fe58b7cf053b7a6104669327b952e4f09aebdbd1 test1/184 0
-23cc76a6aafb07b2bfceb6ccf42f21ee20d814ddc15617bcb402f69b7688607a test1/185 0
-82844821edeca06ea5f4a64b08aee16e929c2391ad0275ca7cf28759f986dc00 test1/186 0
-940cccec4de2a2f97d295a3b19adad06594e40d613f55cb9ae5aa5ace61e083c test1/187 0
-0edcb4db3ade1cf50e18cd26d23b765f3ab1a60337b5ed99b39f1fbbe58a0dca test1/188 0
-4892e828d1c7eadf1429e51486740476f885341151a01e83093e7c923c034aaa test1/189 0
-9ed66f2564883f596d838b8b41d37630e9ca47cf8d5db1c2450f5cb8e0b346ad test1/190 0
-74fc7e95f051fa265ad1f2e84bd5e4e7ab0d827b669439f6700ae4235c0649f1 test1/191 0
-8bfc5db387157a1116eccb9993c68b093d777c217da1441e5c792e1ad981691b test1/192 0
-725d03feb739c44f326b363128eedeca6eb690d8983c50729aa9fc6b36a8afa0 test1/193 0
-a65800838a06a63d7cc37d2a7bef131f74a3da961ea6baf5885937f6de7d0f89 test1/194 0
-8aca1fb937f64450a12701b6cb3753bd411b463f20b50ccbbb78b304cb7d752a test1/195 0
-cb414ccb9c08c48972607504c99c0d86b2c65e4787921b1667a54f678a6f5c36 test1/196 0
-92cfbc0578f889690e475fea3b8a17903584e31d9feea20db7bb0bd38e5a83ac test1/197 0
-dcf9046cce111eaeb8b1ba3c608947cc3d4e34930ab101487c79c22b559c6b58 test1/198 0
-ee11c873cc9993f887b2da86962a434070ce19217b2502d72fe902d55c075f83 test1/199 0
-684b2acc5ffa90f58c1662ae6515903b43017a97697ad89fe16f24f3985ec1bb test1/200 0
-51901b446f300d0161a64cea30b38a6f9634c58d47d82390aa99c92c51b09c69 test1/201 0
-23f39e274b83f9e9f2e51de9987a4f4633255bed5209ffe45c644ffa81aaaf2a test1/202 0
-7c5d4f20d81ef4c03603acbefa71c044b76612b268cf9e0692b7a5f820c73fad test1/203 0
-d543c31d78ecdff1c6acec653f0952aebe5b35a0f4c646ebc14a8c6317036767 test1/204 0
-59779c0306fb51d7c13389ab87d89e6e4a79132df1f39a4550f81001a1b28b8d test1/205 0
-b1f1d14dbe1bc1ad593f78ae05beed534ed3356acfe4fc242b4b097ce6c047c0 test1/206 0
-b1ce7edcfd936fa33bbc2dae079d8a81c3cdb67d7146a651b9262a6dfbcaad33 test1/207 0
-c090f591cf936a9bee230f83b38638ec6ea175d5a9403b0e8ef4ade8f7c55383 test1/208 0
-527cfe0aeafa72ccfa3253063a600e1b13948f22846268015dbe435b3208e91c test1/209 0
-74238407c20c98a53e4e042d08b52fb1b3575cb226aae4c6d3021bba6d5a8343 test1/210 0
-d9cd5da16389aa1920984e72937d01657a8d7f1a3f8169104ab1eb900eb56c59 test1/211 0
-530ecbf3d591e4bae5388a293d17a7eb62ef25cc9f66e151c73f502ffb3a52ec test1/212 0
-32541fc9519ba3cc2abc9d304934bcb831b2983503281f1f667e2c10870c765d test1/213 0
-a9b81fa1fee8c597389c2499ed07fcc9eeafbaa5a0041d7d9a91a2b545728cf4 test1/214 0
-2d6e33a39655b75fcd67943e08c8c8e51160edc5de0b148408385134c3f65b02 test1/215 0
-05820e4d257b3112fd55e14c0f28163d22d692398575143de90402b693def880 test1/216 0
-d0af57caf143b7b10a31509383b949345ff9bafb78a8fc3e2c66852a2392e65c test1/217 0
-a151353f9969a97629eff1eb21c56dd5c7563a656b48a7488e8717640c854bf3 test1/218 0
-385883c6f59ec676a5a341397408864094a8c352faf140f7551b0432996d4809 test1/219 0
-5a054f41189cd4896157f7dc75f17f3b40f702a8e0d18f2179e53758be7093db test1/220 0
-90b315afcae7a39071264d2eec0294fcbff8167c3ea13d42ba76e730b41cd74a test1/221 0
-7b8dcd748eef3b385d8d013d0575ccffb09018f56ba288651ef9ff2ea48b114e test1/222 0
-13429f3587ee37a731f7d8c04f7bcb5e32b1f53dffdb970b50b0c8a937bd5d8e test1/223 0
-a27f7fd552acbb5797a9f18ccba573c95c08a61c782a381c64c794b4aba8e1f7 test1/224 0
-fde97705a3dc755ca8e8ef37233053817dc6565799cae6859e095459f1eb82e9 test1/225 0
-e0b46e6227f70ceb65c5ffcc5666d39dcbb2c4abadcc857c201ff893567754d5 test1/226 0
-8318fbefd7cb2d2883e956f325bf3de78da1ad4a6970dc6e6158d4575caf9898 test1/227 0
-0d9747eb0d1226ce7b8c67405ebf8b80497c5de69b6daeaf5083dc3d44997dbe test1/228 0
-d9d765fa97e69a14c645e5ebff5522f9fd53bb996a9143e0181c815b2857f520 test1/229 0
-3ad451cf379c4c8006ac292ff12d5493884daa5bc7a9b9ba46172aa54878dc1e test1/230 0
-3348c3bf0602f5b869f53c0c9957a80a94517c88645099291b66c792e439318a test1/231 0
-bf543efd95d944e25e6ac76ae3bc5af3f88f215d5ff0a8d504f7163c9e4ac6f5 test1/232 0
-de57bfeb7b43def7402035c670456ea018e786e2c7a7880b0768d8fc840a1150 test1/233 0
-6537a4b6649c50a0691b230072cdff3325d7a903e51c12015688516e8705aa0e test1/234 0
-a852a1e6bc44b49dcb17984ad443131fc4ffe2d661939578b11cd67c48b7db22 test1/235 0
-b05deba4c8922ba21631bef140a286484aa691f15308758f458841513c88913e test1/236 0
-f2201eb7dfb00362ed8d4712abc1ed9b73323c46e1911c56e7d2c2c35aacf381 test1/237 0
-28ff52b5666e5974af2df51445eca3f5a37f5bf67218305b8bf6ddb5337cf245 test1/238 0
-e1fe35146d3a36763646b5cf7c91aa7725aea507128c70f56ec2bb4a0207ef65 test1/239 0
-5b91f0790e0c58e102f528f3568c4bd1e9c253b0af7f70c78dba4c2d55c20c44 test1/240 0
-ad793a544dcc74c1d7122692312d7321be0a40347138a9a3d5cf81326486afec test1/241 0
-c16dc1e017f5e8bf20418c7370395a805c78b058149903b36c481302df1a2b33 test1/242 0
-37ea7110bf4f151c9b6490d6e69e03c2679c88cabc700422d1e2a9331bbfe2a6 test1/243 0
-c400a6b6560e46dd48159a8b2268a42784bdb4a730cfad9552077ac83377c6ef test1/244 0
-c705bb491cad1d0b2df518ce07c99df006a1083e5316c3db6ace5dee3cf58c6a test1/245 0
-96ec71d9070d5d70049d10ab788936f539987e6c6fe51ea368df0c74988b536e test1/246 0
-4e89cc8390901451b84a8c31bf00656c05b2bcc2c088ffca0efcfecb3f86f900 test1/247 0
-35f9ea26d5d80cf319e5155125b056b935d83dc1ccfae8d6497e49c6cb5c391e test1/248 0
-0d5d224abf69d50155ffea82f921c5d31fbb8a464376d852684216c8c161c4f6 test1/249 0
-d84efa203e1b7dc194f8f5c34ccbfa113e0d939ce91589bc00fa41e6eae2c36b test1/250 0
-00131158266a252f1e6ba89f1781df1ebb456ee4caf54bfd8b45c7f598ec8114 test1/251 0
-2cfbba4e46922afcae35a7bca5e2f69cdb82e84fba32f6e4ac6ff7d49ee5fc04 test1/252 0
-b03d290c6c16ba06d12dd9a3653a35cc44828a2f54f6dfeb8b3e85aebfef95c2 test1/253 0
-7030e6997946b4f9e1c960e7a2e9b39cde64f9a13aed52b3f6b67e229beccfec test1/254 0
-902339529ca71b9017aa732d215d7745597fb8a03aaa209faabe9f248c18d505 test1/255 0
-84666f8c171facec0339181ef1ddb63e1536fe6774b0245bae8f27a6a750d2ec test1/256 0
-56d270e5ddd17a2f18624d5b824e92cd2ca192a8bb5e8775e2863a9264f1616f test1/257 0
-a19f26b29a37805689c0eb32bd65a4f6f19aa00563faa6b1101bd3d342dcfe6e test1/258 0
-06e874ea0fbf7b3bcc55fd8d1f6b5009dbd6cfbe2f8731519d01b0819e7dbc93 test1/259 0
-e669ba7053fc4acea8ddc4e3192b512e85236f8f09455087e73d968e79a163f8 test1/260 0
-1f47704f57c6bf16116fb341c110eb68b8df2d334415c642c5ff9cbb04ca886c test1/261 0
-de7b7a259fa981fffe1d366a463e54107b64c74847ce13f54098823215de8c09 test1/262 0
-a2e67d4b28b5b6e6cd0ac98f45839d59e3909ca664db822304a2dad94ce430a1 test1/263 0
-411b148139d235469139eab1e3edef142faf76b9fda81a0665599a6a305e0b9b test1/264 0
-f2b10ee09207f01e74a93431bc293a5d833d214254587001f351f11828cf1a6a test1/265 0
-ff0c2f2e88c5bdc31e524fe05dcb4f33ab4a725f8bea6d71ebf48719c1a87728 test1/266 0
-8701191d7a6ba17032aeea57dd89fa08f191ef40cc6cb8fa247452f41c9b3864 test1/267 0
-a6f27b7dd81c319d830c0c44c20aa71f1dc58144c8a476c3b254ca199f3483eb test1/268 0
-38c6d602bb215dc695b7d7b10845b6fc5ccdb1b91467509679d84d0ce8f13ff2 test1/269 0
-6d97f1daf76f2018914da7673d0beb8ad17657d74676c7f5405a14cd64cfc609 test1/270 0
-c7246b0540ed67a36cd4334f34a192932d30ddab470072ccce8ac13070752af8 test1/271 0
-7f3b2432a8a6d3f14ef45ffd6f59db2d5435d85bc97da0ac721e4a07a57f98af test1/272 0
-f361e33dc6b3868045b08a45cdf5580d39e3b178ffdd6748f33e19c05f6c5f16 test1/273 0
-a83292a76edc4dc392666367c674780ee113e9c63801960b8b5f012b8bfbbfff test1/274 0
-39f7f4eb1b7daa3c6ce96182a3a0c2e341c42364b011e680e414999692138bb0 test1/275 0
-202f29fb93567c3946b1e8e37dc5f9090cb46e29311aa570ad82a46505dd7138 test1/276 0
-5cfce21a501faaf353036d66f8af69d924a2f56d850967242aa1b469805c821a test1/277 0
-e94eb1e20a56f2f3110285629998a6716b582faf4ba85bb45db0c97c9f702343 test1/278 0
-306e4b3c970ff6bed8997bb9ca3efd9d72c621a7ad6507474345a5109d02edd5 test1/279 0
-73375ca05ee267bae48fb96ef001e37c6bf64f4ad20f03b5f23fc74c3edbf289 test1/280 0
-2aa9e71cd488cb1e07d32277095726a965fd2adc1e0ae5fc24a22580960ec712 test1/281 0
-ba970b44ad9a2bc0875c01adfd01c147951c82b6a264f9bf8bae522a97795a5b test1/282 0
-d3e2333ec5abec1550f124ee6cb3cceaaf5c8e89037d31984eebd69738d8720f test1/283 0
-b7f4c82bdc02b1ed1777726983809d6bab128dc9a7871f1da663a11d05779b67 test1/284 0
-4d7191b579657cbc396f67b92934469291d43144a2ec6cefec9a48b1dd7e0ffc test1/285 0
-a76bac4b9b4750d9e78d0e4b8471738563d009e48c4f26993ff681c7ac97e4b7 test1/286 0
-c75a6137986a0e5c9ba67f14d31784791e082a62ddd54226b29ad95c386d0887 test1/287 0
-75f761587e28759223410b402b6b381c0b6d20e1c36735d026b95109d3c48c0a test1/288 0
-0169c7602293314eded31f10f8f25e54bdf82e3e083e52c308deaf0bbf148781 test1/289 0
-95a9f1ca86d4e84a6acaf1278ab749735752941d085bd4e7c3c96d6487c6c9bb test1/290 0
-be38afdcabd7b1c1c6ecdaea03b55264b43fcbf08ebc57d98dc2215c5a9de046 test1/291 0
-a2bdd93e7d8f1e557b3db395072128b74dc76b8d3ae1ca49c26435aefa46526d test1/292 0
-712ed4f936672d1c4a6ebdd68ecbcd335291fde8e881ac96a56090ccdb389117 test1/293 0
-cfdc1eec3ab1b78c4ba548c673b4465f048da83bc62691b00bf47b53f4075483 test1/294 0
-5b6dc0cfc2fbe1c954d8167e34858c4569c034975ac034584e1b86dfd55270ac test1/295 0
-eda796f4f1ff71b81c78db79b9b97f543e91437ae19269d0761703ad50260e73 test1/296 0
-d197fd3bf891f51c2b9abe54965eb13b044597d05f1a14e0bb2a38222109f5ce test1/297 0
-3c536320f63057722a2e40db4077d1148bb4fa471b85f887809326e59053b339 test1/298 0
-442c2e6b539fe81fca5a358a5d3b0ef4fc99285d3d36c45c8ff0ad2ab6ab6583 test1/299 0
-2351a94ce525382f5d82a5b0535c4a33ccd4a13474dfa56e515c99fa8c64aaf0 test1/300 0
-9d84d46e39d2565b5c0bead466d5b41257dc4706ea8e91ff51c0dd5278ad98d1 test1/301 0
-753cf0af7209b4c4204fb392daa5f471d19378e4453f3f151febc8beaa7b0896 test1/302 0
-b4ac34a73520a01857c472b346fccf1a3b7c83b7f3b022b9dab1b2579a3cd303 test1/303 0
-8695c9c0379029795157d83b6370458f35e4487852f63279a4b4b35b3e635740 test1/304 0
-c0594f71741e25f9d938d904a2956e71a3f1ad97b311cc580ba73718d74d33e7 test1/305 0
-eca4b309e2375d5faa5a1f571deaebbf27442c7f71274acc4eb7555341017952 test1/306 0
-613aff2c4e6c1a42e98ebccacc5e709118e34447e1090e977d5a6d013d087a8c test1/307 0
-066d0787cebc539ee8af45e904403d0e256ec3c275bb422d55f820a96ee62fa9 test1/308 0
-cfd7796101cdb382ccad79238e0fc0213094b18ed6f9a977fd3fb828cdbbb585 test1/309 0
-f15c21cf62872373c6ae822d5c4117e3372b6c72882013be58f611c988c340eb test1/310 0
-bf71160902e4c4ef75e70d06ea0bdf64ed4f9e47620cb0f284aea284b66b66f9 test1/311 0
-8922211f9c4b277fe23ed1275a7217a856bb8c9c1b878ff42c9d2ef73caa1ae2 test1/312 0
-9e8953a822fc89c84a1946d72f81494ac97408d5c747883cb76835e6d93cdc94 test1/313 0
-d103b9fb0b396b9e629e980a4c1db48baa02ec2052c63182a1fc46741783853c test1/314 0
-30089ac20ab6922024c7344cdbc2388feac545406dea3927607191b2287dac40 test1/315 0
-0af133327ee01fa05d9e8f2ca6e297067214521e9d7b1ea289444d06ae7f855d test1/316 0
-8e1e611320d2483b344b4aabcf5b5712ab79a833911e951ff8ff40fe1fa8def7 test1/317 0
-f52c50ed7b66dc6b0a07a23ffb871f8df60ef5d7b117d3d25f985c9d07bb6189 test1/318 0
-d86a333161165f77d89f436ffd10318000e29a27f6ff6f0cbb457353356fe295 test1/319 0
-53d9c8b5a49e50798bbc9066a877b45143716767e391ad18848bc221ecbcfda7 test1/320 0
-78834b1036a57fdc0ef30465371e8b2620e7b3a4caa3ef34a71fbffe1eecc4c5 test1/321 0
-9ceb0ff15f372d01680cb7ee28acd02c5d6731660fa5fad8724997d7c4884f53 test1/322 0
-e6419cc523eca3fad3616a6952afbaee4bd8a856d25e12b0db50fdcebc91b734 test1/323 0
-6679328ff16a96aded463dfac30ce00edf3342f40973bc741fdc9ecf4a83083a test1/324 0
-dfdb929839749f6ab4f0f4641fdcc8eaaddf9bd5ca698f86e2b2f729a48042fa test1/325 0
-0d4b2edb22037bdaa668a22d904fce3e9154f2a712d6d2bd59616ef0e3840c3f test1/326 0
-f05d1d5cab51b012f529724a6786234a83d70779941897167b8ae6d4138d3250 test1/327 0
-e476cabf2d06a0ace700063664f52e967e859bb28478c29b9867c47841a9910c test1/328 0
-14fb583a38c545bd5d76f337366f7231b3bf30372a9661bf9adb1d37ed7d7436 test1/329 0
-dbb8348cac4dc1734ce75beaa7340d90386be6dc82516915e8b29c55e2e58c68 test1/330 0
-c98eb705ef5130b99b4ee8507826645263edb353187385d57308be31a3dd8433 test1/331 0
-2a3ca6493f8b95449966f5a4644f588ea0b3a462d53d75f889751f2e3dfe5326 test1/332 0
-570bdaa2596d14017fe34b0da2a461eb911f6f991cc85258f2f5512c291acfd5 test1/333 0
-0c1650e727431fbbf1e8c8888135e7dbea5ee3324aaf0266c57e22f89564c0c5 test1/334 0
-3e5b370ed29e1b31aea2dfb0c5b9d69829590c248478a550c386c2a152a9325b test1/335 0
-062f8b0d6c8df91b0268d73aed7ecb54b282190583b485b69f9a929f41098ea9 test1/336 0
-cb400a609c0d1bdb107b1ed5f19d8c2810e6073328b3a55e77fc54243cb3b3fe test1/337 0
-3fb594c0f31786c2f3c68a00dad342ea96c5b9fe54c968b278353b0d7e4bf1bb test1/338 0
-7d5c9d6ce5c2dd1e9e3a06a5cb33e552de63d8d67b1ba5a942d64b458eef86df test1/339 0
-4088231c65b4872cec53f038dd490df6393603e78f6f3675a3be2789ff3f25c7 test1/340 0
-3458d73435b807eac03118dd13a643ae256b0871fb2ee59283fea62eea5085bf test1/341 0
-274dad9b5bda82921bde7c6e8f75127878f5ae213d1b35d625cf04f5ffcf9f32 test1/342 0
-c2985cae86bba3fffc7bee7eeff99acda6ef7c197745bcecf023e8e40f4962ab test1/343 0
-988d71d71ec75923221a140f33b995c663d994828a119a510285a37e92eca30e test1/344 0
-cb092b261a0f9c614b5fd1b465dce38bc80e629d917841a0ec70969faa1faa2f test1/345 0
-846dd105c0b5b8ffad1cedc991994f94f3b0b6642d98f8e406e719b5ee293c2e test1/346 0
-20581dcbad4b0d43ca8884f027e7c055a97527cd1057bf1e0af82d5959c1c98a test1/347 0
-316386885985a759c9418aeee6f47879035af63aae2b755ef2ee4df0ea897cba test1/348 0
-9d21d1e6e1a8c3ca458174a798987c2177d2f4044bc4a7942ef14d608d0357c2 test1/349 0
-2c24c1a8556deec0334bab02601c988db56cad3ef7dfbe603043bba82745164c test1/350 0
-184026503a166c498960d0ada7da533efc9df74f7deea6142b6047cf03db8000 test1/351 0
-1d76c356f8ba580b45397adfb7bcfa5291d86701baba3199ebe2673af9e7931b test1/352 0
-65cc650f92aacddde4e3c950b5e056c2e119d9a54fdba944d19a4254402230ad test1/353 0
-6a7fdc3031d46d17feff57d26402023d723bf6574cfcc0fe4d8a2ecf70ca7aae test1/354 0
-aabeac13bbdeaa56796942635a57dbda65955ef42b54b381ebdc824cef419b7a test1/355 0
-cb7e0c337bf6117c9e31fa61772f39b4a25e89db11480d5f1266c2be5de5248c test1/356 0
-040a482deb9d11a1a9095bec64dcf6c1b20ce3b3ff1db4d17759d95f1f7711ae test1/357 0
-f0ddbc0607f574f6218c09ddd38c50e98c4a576010a4402acc730090d74e4dd9 test1/358 0
-9c9ee7ebfc9c0c7850ac352b6b24e9c899e3e64648aebdf58a06c4afa9186932 test1/359 0
-b82fa41e27eb5dbf03643e4cc0838b5c1cf2071686b92814c5cfad719fb61994 test1/360 0
-73c4b7e130244268fde7fb3df4f186db4d5b2f0474545e3edbf198e9fdf095c0 test1/361 0
-9eb0fc18a7432b389a066b6b3ae2ccf514b993ce23603800cf417539570a1387 test1/362 0
-248de4278686d75bb53caeded3737bbf3b6c8daee1939c350eb7804e35d9616e test1/363 0
-7ec756671cfbf0047c806ae7196104f18785b4da9b4c21468d00c61e602167a3 test1/364 0
-216c0341188ce2d6fe5c298b9e21940acafa6cf9260ec509f32af46ba8d61dc5 test1/365 0
-75ee1bf4464487a684f86bc129b636a09b3e04ff471145710e6125fee6429ae5 test1/366 0
-0edc533721d12945e037484b7be911d001e8a16ec60e114bf95ddee2548ecfa8 test1/367 0
-3cfa4e929f7336ae8b1b73cd373d03c6a3775a26e807c6a96e3fc6d9ce8656df test1/368 0
-d1add6c0468708807249b7a5ef975978dfb97cb8e477e1ac5b04a723d9aa8d22 test1/369 0
-5a17642581b658f53bb07594954a4e6cbbcfa847529059bd927bd2f1ee36f33f test1/370 0
-f549c72c1b440bb0bcf53f5bd5fc9fc11729d720da28da1a2f54be35f15040c2 test1/371 0
-7a6af70f159a14abfa38b1cdb3cd77a2879a223f56fa4c361e8facce9c7c563d test1/372 0
-2973c6c4fc20e448c27dc1c25fe5134b06aa596f7eacc1ae75110a6659c84b3a test1/373 0
-3be688148a3bc7b0dfcd7096ff20c422442b4da005268e92676756c8bbc8cf8f test1/374 0
-2f8d02b663f01de203f17a85562e9ba3e1e73760114a694f636f2389caf9924b test1/375 0
-88f725d0902a165e49a16379340e0d9ad522604200b734b8b2483714745ee006 test1/376 0
-ea7f141f1e6c197aa5760c2b17be56b64eb1fcb0013ba11dfa6a1e3ba03c9ca2 test1/377 0
-6955290f2751465172034e9bbb612bd0d4a59eeaca9d9d97a23ddd258ec585e2 test1/378 0
-ace05d1883480a1188e123fdd9b1631fb829d01e4cc1c09b5b24b5f2ec9ced7d test1/379 0
-4ae2fc3fcbad24e2392c9f9862a9041ecbe390635dce8a55ca3dc7a31d114616 test1/380 0
-31db7d925f03c26b52727449713f1aaa0bf63e991295c1ca79bca1197e3e3ca8 test1/381 0
-47c6c230d305ea92da956b48ed825a8018d8192f165befdbac73aab2ebe344ed test1/382 0
-547bcf9cf5212cf2d97696ef7f0c6cfe1d32693a8b7602a64b742657d1cc1b2a test1/383 0
-fdea6074514194f47712cf998613aeee1f6d112743cfbd15c3c57320da60f281 test1/384 0
-055befcd3b6edb5929f1da67261c56df6f5b17d47e60abb6f7f660ed07d03f10 test1/385 0
-985668e90c560521f0f5bf4288dbe50f722390a3d5d09d654f6768fec067c238 test1/386 0
-c0a1b9a650ad9b8fb5cc8b8e30463b16e2c10c31b4815b3a93b59517547b319d test1/387 0
-8161899d45b88e029369025b1837c91fd23b159c34c6b67b51282469cef76a91 test1/388 0
-1aa6ec0176eb5069e4b45c61c1c91b9d7f93f85006127dbb1a772536a1ee6a4c test1/389 0
-4ca4ab9b9fb1174a7abfd85b1690d9113ba2eccc40f70166674c971c0bacedc2 test1/390 0
-8a255ad12d3b9cba5de3b4b8aad3603729b503b36de07ff96ec9a141aafb4709 test1/391 0
-f83bef82c3811cde4913f6ab2f6038be91d3071b866e7eba127b3f38e56c435a test1/392 0
-92721b3dfd0ced1ef80db31e261ca946c2b1cf459a353a5677f9f7a52cc58627 test1/393 0
-10c95c6ad1af2d228f70830e7f498e7a6cbcc03188b4953c3d79550aa2a7371d test1/394 0
-c09a62446b9fc0af75a14ae9896781293db4e92d097acd6fa5889b16926e232b test1/395 0
-7cbf3b31d4cf3a40d40e4b558e26fedaaf8ee08c0140a8a1624766984cf23c8b test1/396 0
-ae582fd36c3d1ef27a3606318627aa0df48f11dca3bb2291fd648397b492d873 test1/397 0
-071a040edad8dceabbc69df52f57f232e696b50b76d58d5793b9580b7dc80c14 test1/398 0
-48c2d25c71c0ff82d408833907a425179f161af0b7a5483f792f6dce592ae7ce test1/399 0
-ea5a3a1c3ea12edc5740b0b25bc4df9596b39e0d62ea4c0bd7166b85e936fa89 test1/400 0
-3c21d72558cb594ab6ea458b1462bed66390b9eac44fc47005b9464488b966b0 test1/401 0
-c6f561f0394814f53f2c5020e9ba1320a248a306dc6b383019f91b02f261cb3f test1/402 0
-d03479f014756ac8f1918a0c72055f3e74fd58ceac301c48389c4a5b12cd886d test1/403 0
-a74c4437449250f892e76efe22e396130fbada34470be233d9400c72e914dea8 test1/404 0
-b90fce3b327825bd7c13326f61f159fb9be77cd6762256835cd5e17b49e3f8a9 test1/405 0
-d051405dc58a35af00658b0e8d2c00d263ecf2f5fb37a354ee1522709213e726 test1/406 0
-93b9b28739e690c74b767d7bee37f89320d75ed53e8d1fd2b8f14954f5fefd3f test1/407 0
-a6707c063ae2e3a1b2051716126937c48b8f86a9e9dabb2ea3fcb5bceb0a9fca test1/408 0
-652b39c5511ac2c700cf8c36e28b214fa965cd287c76a7b01f7aaa58db674098 test1/409 0
-6bf7d4dd1867fc7d60cce3ccc702f7856975f45275b53c7e165495006476ccc1 test1/410 0
-07a7d35badf5e4783e769be16598ec7746fd5fc3e2f3532206e3520c6c1fd460 test1/411 0
-3b0b4e5045521ad89fd10254553bb07a82eb46fcaabe77bf2c402568b8c415cf test1/412 0
-37486c0c87bfb34f479b619ce19fb00fd4521275b9eab8ec4925e4cc167f51c0 test1/413 0
-e1be95bf97dab89ba0d6c5f9ca88dabb6d85558c83741132c285a70a22bd0b83 test1/414 0
-cc1b11248247c0b7853237386a6c15ebbc97fe13efdbeeece50afdc0052ed10f test1/415 0
-05c61917f3bdb4d25cb109bbad895a72966825aa3afbaa4a0858d6f3989e775c test1/416 0
-86d8da5ac89e37772b4c7a1cefd6af779ffe209ee96f3288628224907cacfc1e test1/417 0
-46e0e05de4ce0543e222f712324adc9002648bb64a2d434cdec252fa50acab15 test1/418 0
-38713d08a5fd56b39f24b32896c70f4ae16e3e9b889e0b02a60ca5d25e7d4182 test1/419 0
-f6489e52a938e6b18b605f749c93b9ae297db3e2d531ca42f674274b5c5e5bb5 test1/420 0
-2cadcc4f341ceffef5ac0f413bdbe1382380bf59d9ce4b17db531a402cfdf52b test1/421 0
-3047e4441ff2c0da119116a2f952786fcbbb9f845696297adfd6d5317b645588 test1/422 0
-7843747e05ec0ea8dfb8b0bdc27d4a06d3ed6b569dab0b1af8cb4bb13f026a4c test1/423 0
-3a95acbf27884860d057a436d29f2e0fc8974f1a03398e0627faa6483875fb60 test1/424 0
-0b0fe35de0c91cadf85e0e5c36fc1a1d3af12c1ffee93cbe8e7e1fe4ed327464 test1/425 0
-bac8e3aa6a880a8a0866c5074a2d11b1530952890a8748028ecfedd9881f37db test1/426 0
-8c86c1d05a96a41b45e71bd6395d0791f1d7425708b1687a86d6b68b17946438 test1/427 0
-3a11175239220d704dbe7718aa07930821b52d377ebfc6c7b6d9be07f3c495ef test1/428 0
-6f757f68f259ee6ec0702dd4a6a86541c7fce54d586dda2333a55bfdccee7edf test1/429 0
-bdb683547287702789e64b437a8255fe89cb58414cab25daa031244cac97d40a test1/430 0
-5e80e76fa21b52373370a02550a9bb7091f7a67a1d9b90406bdedddc337e1397 test1/431 0
-cba7b7c57ec8b9816c22781cda36836ade12f79a24c284cda64ab1ddc534645e test1/432 0
-87b60f281bb9e990496c93062b7ae3991dcedd08c251c58de3780d2fcb8c551b test1/433 0
-0d4d2dfdff9a5e69cd97fca305a0c4ec5444f1b0ed4fb4ace54b2089016df222 test1/434 0
-15805734cb1953a639e576aee695c66100ed0017d8e21b1cceffa53ee3ea5f41 test1/435 0
-b31d21080c47ccb84e35f7dac599e5eaf10251ad33c2801e7869ece911b39809 test1/436 0
-cdecbe7084544381e81d9e5acd80f8bbbd50758b3beef575b28dcf26c5b32e63 test1/437 0
-e45dd819eae60c21039c93c6887fe013f81fe0eb10933fcebc633148e6548c76 test1/438 0
-267a902cd89ed61e3e746995a28f6a684324434af52c0dc894639cba3e736428 test1/439 0
-bb4e75150c8b6cc667b00e1e922868a2bd30d73398d3d4048f1f0d12541eee06 test1/440 0
-b79bcc25ec98192129950622804276e63048b7ff270475954941c452a32fb091 test1/441 0
-8eb8949990691f97567e698d32678632519ee9e871be8d7868fff3ca8a0af0aa test1/442 0
-1e087804ea134e658d208cad9134f345f45137ead6b636189f4d6d89f288802d test1/443 0
-cf9fad7bc3555b2f37f416217b88fe8bb3c84f51cd372d0e547c5e0082aca728 test1/444 0
-2695482158d069afdd9e6006abf1a9149c011e95eb1489933a523f0044575c3b test1/445 0
-d9cdcc5dd250a070a0fd844ed994579a12deb4f6ea4d4d51e03c1853e3bfa6bf test1/446 0
-cb1c0427f6b874af03f4e2e151c70034c91f59d69abbc9b2bcf205718c0bf958 test1/447 0
-786fa44e7cd8564a96d5c5bdd1f460a04d4e712fbfabac81e086924dbde5e1da test1/448 0
-7b1eb65e82cef9d7bc9d5e1c0652a4e305265068621e3bc8e09eea618d6ef832 test1/449 0
-5af9e74a61605b88c3049199e6aab8f174a4273e211d76053dea5878db9149d1 test1/450 0
-57ab0c5102cbb95a95a89bb3992745926228f0c9a910c5f54b907ec17a222584 test1/451 0
-a79837c820987895ca236c61c7c29103a3d20b42f253618333d8d6f1a860b767 test1/452 0
-369ffbcbfee3b361f0796f5fe670864cae41815a3da5c3a32de27154d06e28f1 test1/453 0
-ff1c006b631e53d6d7ddefc3ea7ae28c4024f3810085f75a7ab8ecf9ce3fc1cf test1/454 0
-7d02eebce2d153525c0c3758add22ba75afac29b7a5446d04810baa9f47b1084 test1/455 0
-26009641d0a8fcca6eba691d7fc284084ff06cdf4a466e0ad4ec4a0fc146ba2b test1/456 0
-60e208f94a35a11fe0cf857d104485461cfb84df65c583b7553a2927260e9e37 test1/457 0
-e52188a9646889e1444a8b1203b0609997b3e2eb8bd0c92356b3251d97fb110f test1/458 0
-4a624726bee3a76da7709af0ce228c0355bd6dca921a50d0844f2db18bbfe455 test1/459 0
-d917cb3c78f449434afcb21bd9ffbe5594b2ed9e34c254e40a981656352503f2 test1/460 0
-f0f5f8781638f703ddfe3e66db01265a2710a52eaeb0c0a41fe0b9e3cfdb349e test1/461 0
-125380f75fc8119a6c9c219cd1546b74f2113f36a94884a71365cb2e7d9240df test1/462 0
-2a27ca0707f3ea676123f052b386f19b7757892f3de58b5b00b53f41f1b9882d test1/463 0
-0bbc654de15becb7a8d6e02e1fa6f1add8cd445bc9137fa63907c3f6663bdefe test1/464 0
-9aada2dc2e05020837b9ddcf2749c73d87531fb7bda7fa2d262029b49ece1106 test1/465 0
-81cc1123390fdcaaaca7015a30d2a64ae7ee54c111fda4715a674557507d7762 test1/466 0
-efdeda2601d6872cbc20d340a39b18e13e9b1cf306f212d76d1e4aac7ffe1447 test1/467 0
-c77a1fae105f5ed5485b35f2295ecdfa89050f4663b78d1a02392edf937d9b15 test1/468 0
-dfcfc0bf9b64a1b44f795c459a965aec032453a812d693aed8298dcc711a70f3 test1/469 0
-134405275c2091b63374dfa903271f0a93878acb3e9f17063013193ae66aec70 test1/470 0
-634a7206ab6c204b11f49e67910e6e439b5274f00785916fe459bbd1bbc053cc test1/471 0
-85a5b5846aaba30a578ec445893fc688433066abef0a6f16f08f3ca4cb553a30 test1/472 0
-e30fd385345e1900783973913d865f80aa056f421c7a2ad9b91d96d82fbe87d1 test1/473 0
-42751fc328cc4d5da826aa20b4b412acc445bbae352a3679537c8b6c2af01332 test1/474 0
-9f3cb99b06921de4dea2c49aac935f85a500e72dce01dc6dbc7b668ea64ce6d8 test1/475 0
-f403f0cd92bf77a9fed63bf4160d0fb4ab8c8559a3a9e31dc820665c72d2df43 test1/476 0
-a1784653a210f5c700caacba07f48c55af34c77aa27a2e2a6e61b2cbe30e0699 test1/477 0
-771446592de6e481f97b420e341aaffb76cf4e922df67466923d6f02b5524453 test1/478 0
-59e178a497cc2ad3e19a22d0f9a6adf1d6cbdd44c79e864dbb03a015b747a410 test1/479 0
-12a25610aa08b833cb929ef33e3ec1e822394594999f75640d7269abcf8e616f test1/480 0
-aa5e75732bb87a197970352bf8f1a011ca3e9d1205850332fffb5fe1593fe420 test1/481 0
-1163fcf62cb2011d75b16c686b01297a211244e91557b7569272e5ebd57dc48f test1/482 0
-5a8498b0b8141b8477620d59e99ae67f33aba8ea7ba4165df805c331b1837a6e test1/483 0
-38ff4392851dc6208e207dd562acb2f32ea1e14a7e555ee45561b3a34c15378c test1/484 0
-2034cb697bec724a5d0606f6c76073cb2d239b64e0bfc6811aa9d882ac6372a9 test1/485 0
-d3f199cad7ae5dccd44bc028aa0d2927e004dc1524b69af14a7c9bd11d477f6c test1/486 0
-3ef4640e48af1bfb4334c7e049fe91d59ce98eeeab779ecf4bbb44b2b11f48e4 test1/487 0
-42f8e33028070018f00908a0e82eef7bd6e47a79e4b35aaf2e4aa0f4139a94ab test1/488 0
-4c337f5fbafc7744ab9a0aedaaa10470cf1baef807d3838c8647d3e063e7b504 test1/489 0
-fdc3bdf0ef8a15d2ed0fa0ca0858a877f38700385416673930b22234bb5f24ae test1/490 0
-6e61464a3fbd6a41d2486e2fa7ada9aab21f4c59e6a0e103bb7f7c7dfbd243ba test1/491 0
-5c05e4892cf18c5edd1b355eea329d0bf65432a73ffb7229a7329c5c9b83c5a1 test1/492 0
-bb152622b87c5a2f653940e9ec0370acf8b2b4ca3c59c8cfd8e32637ce33b74b test1/493 0
-6356da68f52c6136de776e72ab821fe501455e1036fec305d1c3385508379360 test1/494 0
-c51330d35c30394a5ac86452ab8d46f2e3d8ec8e950263e910b9f1d6dc2b0943 test1/495 0
-9b1787096ef897aa2c6a673e99eb0ad00c108ff1da77cdc2a59ab55a4e51867d test1/496 0
-accf2527bd51439651dd6efa1e58d4753c71ee5409a8f4eea31e33cf1ed28633 test1/497 0
-8d7003273bf256fc6fe0d6a7e29ac4dd076793686ede306810d7ea847c34192f test1/498 0
-5ce1f2861f337eb1164065b1183ba66533946b7bcb7bb1b71daa516b6350bff9 test1/499 0
-99faf192d9602ef426f97fc62a8074a9bd3f935b0de553569919158aed765332 test1/500 0
-9bc8752eef4199d0154420db1c8d1d33821277be011541d040c6db8a003e5691 test1/501 0
-06ab5524febb3866b5ac9b53c092ba1d555ad24273c6c376f563f99f67db3263 test1/502 0
-d5d3df3310eac34d52559d0e4c3837080eeb0200d9eb89c57ba60574476eeeaf test1/503 0
-265d1c08e6bc4495c5e940afa216a79e6889e52405887ec58b6f78a6c9d266c2 test1/504 0
-d10e1b107173a1081a5df7e54393c12439737892064e22538a0ef78ec30b0ed5 test1/505 0
-3711c236244da1715d67fb5f90266494b21f59cc6dbf0b8cdc97392e265fa1b9 test1/506 0
-3de00a809d5c97fcd31d7a587ac23c759504764687307695179c9337d7f78ab9 test1/507 0
-06cb2a1672ef72c92785733de750549f67599133385a71265501e559e323c513 test1/508 0
-ce1175146bba8770b0034c7fb3bb938f5e47b3e9d4636d4d0d22903f4fcf2277 test1/509 0
-f52272ce4b0d9ca958cf483cbfb5406820de750db97c3e8d809a32e1f1ef5fa7 test1/510 0
-c33fbe0688e569d19a2a5f6cccd2d5b887b22caa410fe4a2c8790f31bb907f1e test1/511 0
-b2b3e4adec1da175d3085d52f02e99c3e86b47abab60cb0dcac070044ebac775 test1/512 0
-7fe8799cebc13c3db8be9595df041d6043e3b2dd0f349b5f4e52d6e798acd286 test1/513 0
-9024a152b84a458e08d13ab422d4977dfa1b4a7ba69c010d0bda0c92d3a7a8c7 test1/514 0
-57688ca17700b42fc35845ecef3969cf0f75c86724325075a565dad0cf4429a6 test1/515 0
-0a5f035ac810ff68919d03a81795f3f40d240dbe0388c9e68d6d07a8b4fc9de1 test1/516 0
-cbb04fa890cc68d5e57a49d91b0e931991f673e38ba08bc63aeb3807c5e70bbd test1/517 0
-a422f4592446ac6bd5a3cba91fb12150843caed2b3027ec167a22042a640e3b2 test1/518 0
-19a24d9b9590f8a42f8ad85cbdca7c99be559097b82e7cb8a50d2adadb3a3b88 test1/519 0
-497eb09bd567e2c85b383ae6d58449b06e82d3634f81b61ae1844d2df89581ca test1/520 0
-8c1acc6f962b8ba0b3e0e884e5c779df664dfec0aafe879edfa7ed70da64f7c3 test1/521 0
-ebc5430c7b1495706f79cf836d95111c29a6d1881d4421c61f987c130b9dd7a4 test1/522 0
-9783aeaac9272ad26888c540d6bf3af93b010272a97d1e61dedb2fe94c9fb784 test1/523 0
-cb0906d5d12cee7f2b2e615f5c50a2ddd00a6f2c7f95204d52f7b6d1f65787e1 test1/524 0
-745075a3e59affac081f05c1ccf1aa832a8cab641dc7ca9b6bde80c14f9c7805 test1/525 0
-a818821765a67a23392bb293c3dc79fb99bb1c4303fed6d6ff5c9bd51d388a48 test1/526 0
-43abdd0aa8ee5ec8850b26be7aa95645e65b75a4c41391b11839e6f032e18608 test1/527 0
-f1f970e8dbd00329246322659a3946f542db588761cf7fc2702df2fd6ad325e9 test1/528 0
-43953f0a8488cacb611b4079c847e3bece4e0eb8908ac7cfe1902eafdcf94bf4 test1/529 0
-7a32d469da9591471052bac1307fb74488f28a555e9b328fbf671922b2e85c03 test1/530 0
-45eb32f682814393ed3487ee5f610f5fac344d4fa56ce111071e5596bcddb44e test1/531 0
-c9d1e01328bce57a878e85afcd9dfdc109d75af6f19e469276b2cf6d6c4a26cb test1/532 0
-25239e3822d53cd8490f24407fa10518b79b270db5b1a090f03769aa9d399be1 test1/533 0
-7f1b2dd8dc594a9679209225e516d280cfb5ba8f94f56b2e10e2f195ff828d69 test1/534 0
-6fbe5a0f3f0c95023a60f505f7f8c011d30d695172a37bcc6dc77ae6925cc04d test1/535 0
-a1e20874db952a63f38a5758719a9b0c5c501645296f9636e6aa520c195a7587 test1/536 0
-7e5db79598346a3bd77249b9ab46532b426465c815897bbb0cbf21b4004a6788 test1/537 0
-11a7fdff7237d13e975c6a999d7a08cff58f0a7e4936c7d4431dc5a61e2c8c4f test1/538 0
-b39f50273db250af58808d566f53c09d000b8e7eee3a76aadf0d825057e48f2f test1/539 0
-20e0e01ff6d6847704a5c30ae7cc4324ad4fdc567d976c7f040e368a4dd22490 test1/540 0
-1725685148ef54508ac8bab44c9235e0caca651b1c7253bd532d191325625e54 test1/541 0
-51ee82409a9ff9cbc6828a6ad8c643dbff49fdfa42118b5f5516f6c4bd5259f4 test1/542 0
-2b97d88684e2b6bae5b4a9fb6bc607698df6e259599ca9f2c7b8bd4db7e3b4af test1/543 0
-4f2b8d32bd474ea9a9cae40d90ffe14c5651ba27d09fbf0eee267d9080be062f test1/544 0
-bed219c39e7bf60463d22bc4b7dedb542cdaf78a67f330f0ec7948ce9c19e6e5 test1/545 0
-2cd826ae0b681e7a08a997c6ca3c5f1c91af3dbba24aa8e9fb52ae450608c0ab test1/546 0
-eb129c3bf22048339142ad4f6e3a0728a5d95720577bb03012bffe0ba1717afb test1/547 0
-c363f6f0db57910e8f665f82c5e6e427739dc2ef7f6f3c5a1ad0a438c89fb4fa test1/548 0
-6bfc1e5d98c90877d2175b9f4c0a1fd21b0dcf3f528d254bb44a2c8086c63143 test1/549 0
-2e478151393e5c7fa5d85104cc85425049afd61981111bea60986f4cb8501509 test1/550 0
-ca3fb813759a14f2cc4e46b40823f1fd3248df9b53a3ea07113c2a5285ee73af test1/551 0
-551f29aa39139add5cb8f6ed7831dbc6c8c017133284e358123e3d507ad719c0 test1/552 0
-184c6ad9a16b102399fdaae54efd42ecd4b41ea0121b1066339cfae1b6cba980 test1/553 0
-278f0a2417c8c93a52a6b99c452865bcbc375c5f44be1f2ed870d96d4a41e008 test1/554 0
-fcb90b4404b0db7a8f3228222283eb46b7d0b26fc88b8e0946d7d32a709857d5 test1/555 0
-a1894ef1b329498a60aebff25f2d46713bcb43e5ff1448a48ff746b928a121f1 test1/556 0
-3c7ffe66c48e0db4337366ac58928fa7e7ea5db1bab6bdaa02b8ed4aea1ebdd4 test1/557 0
-c3ffc4dc78bc3bfdf2b9074c8d14d2d94aea6581dced00a954d2ec5a340bea0f test1/558 0
-d8f06948b68be28ff8bd2ff83056411f5676f9d9444c89f14f57bcab03f7304c test1/559 0
-1b418ead01346808aceba27216a516070f5da3c2074c729e2aa0e97a3486729a test1/560 0
-37d8fad8e00d664612c54eb4189dcfc15d77e7dfa706b041886c3c34c89bf107 test1/561 0
-189a9b7eb27ac923ccec29d51c47caec92757b2594f5469f73983909615674ee test1/562 0
-431be88ac4e67a6237a688016154a41566afe70cc3091115efdb62a2f320623c test1/563 0
-a6b442f2c169414ee0e1c367f82da09d92a0a6d098fb01076c4395ab37ae1488 test1/564 0
-93b79ae2ee1bcba61f1205d388e1b24f8da13ca73919139dfaaa8989171bcaf5 test1/565 0
-73fb66a6bb6afde0fd28da92df2dc3e91d519146d50ccf0116563caede819147 test1/566 0
-e0c6ebeb43f10d4d1955c27ccb56916f45439b33284f4b8cf15a53ab6bbb6102 test1/567 0
-fb544896dd80805e90be4a69a37380b2d60942d8761d03a681de8ea10cddba4d test1/568 0
-023859a3dfd98b211fa663bb099832eeafdb5ea787f16d52564c824375e64fff test1/569 0
-503d524f408b709791766fc42311854e7e87cc6b6eb370128b0e9eb159334be9 test1/570 0
-a2d42b10420c1a947430603c91af2e5339d41bcc43975207ca24106637c47e15 test1/571 0
-92f55001db15d5c1692408b2d543e3e0fc0ac3b257f8081bcb9ee26fb2b56fb9 test1/572 0
-5035106e79744468d177457f5a22a6e9d3db914f3b09fbc599281422d5755140 test1/573 0
-051ebc7b0acc01ea5fc2c81b6ead1241cddecedd88e5c3331706b7f87b6d4139 test1/574 0
-fb72968c5ab91c357b153ee56360933941e7549055b8b6cd75be8b4539079781 test1/575 0
-0e9e45f5bac0fb5332a0dc4e0bcbbbb04afb49c24dc4c27b252f34414262db92 test1/576 0
-96c1c2eabe397c9e029b0464fe21e896cec917bd299d2424b967f40a78eb89a5 test1/577 0
-b5aaf10a9ce27e2e9947d161cbab2151afb2343d5c2baa043f00f4a45d6faf3d test1/578 0
-f271698dcb33763b4efb8b99e60425e95382cd348d1b7e200239d1c22e573df0 test1/579 0
-7553677cc946ff5123f657933a4dba2700cc593cf2a88bbba7c67e37e4babf0f test1/580 0
-19f8427e6049c049e329c38c38b0e750618750c55b1fbce131ce6def9dfd2807 test1/581 0
-02691f69542348d21da7b1207320559c5a72e8a59232266214aedb8f16335ddb test1/582 0
-dacc4544821a465c5fda9750ceddd104b3db58be2cec48775ba22434fb714602 test1/583 0
-9daeabf60a246297b71b30e294b79d695876b345edae46b38bbae5bab737be41 test1/584 0
-bc3002b7548a038b320b72ef818a2aefe568a866795517637769788781e6bd4e test1/585 0
-4d74b803c720e4f4b5e2d127a1ddfa1d58a1a24b072d36a2aa228d327aa2f7e3 test1/586 0
-ee5e5ab42c307951567b4db4a71f382a37013e4db4f99193b99d6506150c0bb5 test1/587 0
-2b3ed7e25574a4001484a5d738ebc33bba4358430b9307adc90035527a45e58b test1/588 0
-038b96624a4d80316dc52672d65790a0f2ef17430dfcc9bb624d3dbbc56c526c test1/589 0
-ee82698e9734d114651a9953b2f3e7e5dfa33038ed2ffce7ebfaebdf948aaecc test1/590 0
-310126601a6ec8b46b28af666b64a3a513d63ab6931995266a948d412b30b4cc test1/591 0
-a88b648ef30197101bb817b3e68942d3fe492adc8ab2f6bc84b04048597d2e9c test1/592 0
-f91fa554dc0ba2c273a9c74115a671164b5f1384aa95a87a456c189306ba9405 test1/593 0
-f0c918bce32571c2261e4778128852da8e0d276a901edab27373d18c0a04c841 test1/594 0
-50664d4d93bd4a555a62c2cd27fcef4eeba24b5296d4fe4d77fdfa907f1ed191 test1/595 0
-f8ac7b7fdcefd8daaacc0fa566c58a66365194cf891dbf45e8c2293b885f0385 test1/596 0
-3e05978da3beaef54cfe2e572482b706f57c7cbe2db12391468074e65af54926 test1/597 0
-b7c43a706ed88cb6c6864f0623f348cd095d3cbcc5fc6634c3b6ea77d84692f4 test1/598 0
-ad632e5cbc06a2bfd6f23695ff13e0e513ad8119e6b25aa1301a2f7dd115ed7a test1/599 0
-5c213db2b5ac423f8816b5c7f3ab24e8f9054ddc9a61bf9a357d49d622e4bc94 test1/600 0
-a1d89bcd8db8e1254ef05f25aae594f466158412782433db9ec6b4f918a7f75e test1/601 0
-660b5a97b58648fb0ed3d491879e9bdcebe30d55f929de18a944c270eab8b16c test1/602 0
-72353b829a13c431b0def97f11be3cf02d3bbdca4abd3ef455ab90bc4e3a0687 test1/603 0
-3c244be5994062923b6467be1f50a41bc722d38fde3bf796d8e0770b77b5ed7a test1/604 0
-dd2ba34cf843fa8d0027c8d8b8cc0a2fab15128880cad9b23b6ff3128ba848a3 test1/605 0
-2d6050e1e4201d5376ee592791996d5a7b0d2e9321e3dd76163565a110f7c9f5 test1/606 0
-8e34b0353f968149bd5e4833fc2f3519d8a3fd58212c8652250d16157a47a2b0 test1/607 0
-bc19ccf937ea25f9b4fc770cd7f0fe8784d92f2dc2061d3c3587ba02f7d3bf1c test1/608 0
-fd5b0756cce8252d011776b0f78ab8dd3fa666e20a7e80a4543f2820920738f1 test1/609 0
-c634686adfc3cbf017711174c28620ad3e1c9e52b68890e61e439db8623d1f38 test1/610 0
-790e2dd20d31280219ee7d5b5d642cde8f73265c314c7e5e1be593b3630b24f8 test1/611 0
-d4ccc5f8a8333fcb5e6d6ad9ad6c73d121fa54badb2a2698b2ab250d1458195e test1/612 0
-eeb5f85699d1d69d0042dc821f7872ead1a34be7ac96606b38725cc464256db2 test1/613 0
-e214803afff199fc978afe1960abd1fd6309effd8fc8c45d58936a3fd4fa2e7f test1/614 0
-1824d601644fbdd78f35f9aa68ddfce7332409f2bf9048b0eb51fd95936e89b6 test1/615 0
-b5cd988115f9ddd4b4fc9356a0b2e3de4ca9171842e2a3f90cf55cafe4758c33 test1/616 0
-1d7c9402adadfd73e29c519d9e3402f208c4f4dca764a830401cc6cd202a9476 test1/617 0
-38218ef197dd4d615e402e247f9cd9f40110a231008da580cdc0a87e16a66834 test1/618 0
-37908be1e5b0006b10a37ecb59a82a61df8ee3dce6f9c268862dca2cffa6455a test1/619 0
-c476b3ec7ab5e83f383f6cd15fec5998e394587dd49c970f553622163cf18c77 test1/620 0
-d7703e33a81a951b271c00168fc91962f915e24aed9d1860806d9d08572add5b test1/621 0
-04cb7b53a6bd906df38a9bcab348aa3271a1aef5cf42331f9e61f5ed81963618 test1/622 0
-c56e85e4005f3d961c2006e36bdd7f37546d4fba6d3761aa123cb556226d1895 test1/623 0
-cabe5810e9c4d17bfee8b41ba465d2cf2e8e435972c0f78de1e89ec71b6707f3 test1/624 0
-2d35be2f4334d1356e153bc27cb21afdf587f67178fec84c635b0bfe95c71cec test1/625 0
-23e80e6224e5b0aeb5cf3143670f71f7c2e6a3e5cf06fb5d995cec02916e7b76 test1/626 0
-a52d6320677e76f45b461f2ddc7d75b31e847ee846320c256e35c2c4ed222614 test1/627 0
-d430693ccffd53000aeae4b23bd3b01bf8983c7d87bd1e4cfdbade7b40b60b55 test1/628 0
-bf97de1f95d716898b255d2f01d8ad4c68d25a27d4f5a5e7ec12ab75a5de4035 test1/629 0
-7b44ab86d817bd51e6bb197db2ff1497a7708901362d50999127009de930538a test1/630 0
-9166610cfd404d2de2ef5c513c39d301bb622dc93c8d1051f42f3c04481cb8cf test1/631 0
-dc5e86bf83e6bf307d74a774cb2ed7c9e7f999ac5377e877f646431b061bd9e5 test1/632 0
-3942e90e330c3d2cbb90f6dc6c6cea90e8ef7e647d3d7c48437b929ac5fe2474 test1/633 0
-6271588af5689099296c752e946db1d1c5f61db469629b6b47172c65f7822fa7 test1/634 0
-1bd2e8690fe3bc11e7e960caee8d752b49442c4a8624df8d0f3f231deeac7b6f test1/635 0
-ddb8b363938fb4ef92ac995dfa8e7480891a42733c917e7626a504cd20ab8c6b test1/636 0
-4fdf4a2e7e02da689074363a7cc791a7efcdb51c3e0127d81e9fba9609de6431 test1/637 0
-9802b11d09f747c545f53c46da02edb83de0ee8029b65ce1c81c4574d7372126 test1/638 0
-e910be00aec2863d85cc7d5a94580a75a5122a710ec305b5cb8297607e2cc628 test1/639 0
-fd62f4325a31ceb1aaadd318fb6333f8174896d911eb924ea167dc0b91cb20b6 test1/640 0
-295673b7feb51275c704065fc887794ca3911b1014b1c9f2a89dfbddb5b2e477 test1/641 0
-8039b1832488c8b241b4fa57b0b4024c423f0c6b9e9df0023dc36cc9bd930651 test1/642 0
-4ba213a60b77610b260c1e1f97c2c7d6925262e3899b20d09c17d85be6976f78 test1/643 0
-0e376572c980b6dabd80d80bfa74265e69f907d040015b05fe012ed2b7eac939 test1/644 0
-5d61b2a58f7a801b060a9cb6f909250340379db7a070781bc6209b8e1f931edd test1/645 0
-b6ca7c52ef10f7d1f1efd5adcd020ddbd455cabb8e7473a053b46cf76de17f25 test1/646 0
-28f9ce90a93b6289c25fcd4cc4420155c7010111e959f59e16321f6c0c1a4301 test1/647 0
-28e38647097a5af37d5bfed2eca849df9a63a28ef09b041be04ac767a8f11c75 test1/648 0
-08b7abff70be25e851375d06d75d1bbdbe316812ac95a48778971008ef58d329 test1/649 0
-517b660a5398678c6367404442b6c06a08c3b889f593e807f796d2be378e3f32 test1/650 0
-855a30c83ef2cdfb05a326c07265beb87b9f5551f2a8d877fe9719f7ba93a57e test1/651 0
-6390e890d7d63b36aaa4f619248091ce1e3ed615eaa2d924cd93cb87f38836af test1/652 0
-740254753e5a22152b9864e9f224dc6e16b1352c8b0910d94239c7cc8ef14cd0 test1/653 0
-c92fcc0a7d2f6cf6c22a56ecd0893968538e6566ee07c1b469b9b2969e4d627d test1/654 0
-a3fe2a9a7027a3bc1cbf7d97be678fd2855c8441f6dfb278b044b433b75159af test1/655 0
-11280946d9f6fbb0cccfb21f93827782395c4961e3e4b805f93eb25b19b17c57 test1/656 0
-1a9e236eaed6fdaf851620fc860687eca30c50fc19277a6297623c5dafd403af test1/657 0
-5daaa394c941772d5af2eed5b60057b4ec2383a68bcc4d1395212e6474b0394f test1/658 0
-37ac3b0ea262b5787e3ef50f6aefe841ef54b10ea98c07e4e67e0e2b340d579e test1/659 0
-4fcc747787e3ebc16ce912730fd0af7666d2066ee516c8d544d28782de468b60 test1/660 0
-4827bca363e8191e8d936e0a1a47a47f85cbe5525fd651ea2a3ce191a45a294f test1/661 0
-a4356d8b84cc8c6afd06fb76e3bfe4de012e717b851cf9391d12e4c6384a1edd test1/662 0
-200c6bcadb44b5e426034eeafdbe30b454ab447962d1063c0ca3ea3a27406dd5 test1/663 0
-c0fffb44d9beec5292a52f27fa701154fb12acf82e2dbf71660a6b6519c2c37e test1/664 0
-80da1008f8ad9d5e5aff17ad141e84d2499997cb9af6f3bfc33f789e81adcaa9 test1/665 0
-00843f3ac4a6cd52d1fc0513a887321229b40d5c801f94a7b54613f7f376c04e test1/666 0
-2a2815b9c8cc8a348c679ffe74cee401ebb02c011f0c4873eefdc416ee217582 test1/667 0
-f1f9adc27210da769bb64d2425d32a83a51abc62bafb2c4ffbdc7296ae67579a test1/668 0
-fc87e46da6bc96e6e2f59586b3ca52544b4792157920ef09f05c420ae0799622 test1/669 0
-356ef03f9ef7675f5b72133ee16cfe402a43f4ed55f7fcac309b4a1b51793835 test1/670 0
-23ccd4b56036582d90d2d8240a4db6cc4ff52681328700a97c86e2b4bbf59b84 test1/671 0
-bd256fe976a9f8eb6cf19e8bcea22e22da341f3a1a3524b332bafe0484680ed1 test1/672 0
-23627aad82bb6354435f258cdc319c68f56e39652b69e63873ecf6e06edd7b1d test1/673 0
-380ecf19e28f9eec5388adda6b2e3b3880087531e418dd19a71c88d16c654646 test1/674 0
-74c3fcede66191e1f6f9a2bc4775bb8b5684194cea39c97d7c151e472621f846 test1/675 0
-38b74487e520f2976e79081dc534946cc26c361f310b7a5f50aabb9ee3c472d6 test1/676 0
-61ec3fb74d990e303a67c6deebb7110e286eba30654cdd29ae2bf40fa3c5bf9b test1/677 0
-3dbe8108c7bcd01354ef5b6db60527858b45fb07bdf594737d0052da1ea5b9d7 test1/678 0
-0233b20a0737da97e8aa77eb085d3e470381e5e332c1c05b5dcd10d6370521c8 test1/679 0
-17f38a26179ade384e33d50b0a772ce912bb6f9031e57a6fadbb22c5bddaa53e test1/680 0
-0bdd1248b74b81461b0038838decc005411c62d11054f8283f0c28d33eb3dc16 test1/681 0
-0b9c92dba83ba8c2daf10052159af316776d1a4d04bd865184966bc1b26b6290 test1/682 0
-25307469d74364427d7693ebbcf28b5843de134693966dc7d67456c73c0df2f6 test1/683 0
-2d5dcd85b584f9cebe511168ad17dfc5731adc7bc9dfd868967e752fe6a3c8f9 test1/684 0
-94a97ea9143c6d280c15a8fb356edd6f2078613c47309e162067183eb9ef5e52 test1/685 0
-3b3bc20d193143f9b6ed4cf7da30b1dbcb91f8af4d473debf626c59bc5d6c0d9 test1/686 0
-6bd4963d1d6591acee7d65878cdf5307062cd338ebabf53365da473c6bffc05d test1/687 0
-748e278b9968ef59e47618cd432b78e7c96a36ccd3bbb79c4344f6bc14df16a9 test1/688 0
-05febe274a53dcff3e16f47c65965ecdcf4b7a0f5b36dd72888ed0b5e48198fa test1/689 0
-837980d21aeeaa8b758085ae1f672e696f66dbeeaed17fce3800eb4ea96b38ea test1/690 0
-197e6ed5064124c7bbdf520b42ec87c539e6ad449f56ea1f64c166f21514419d test1/691 0
-04bd43bc0bde11e6d57bafd836e3ad404bbd63012d11f52334a21cbb298aeffb test1/692 0
-728ed44971d5cab517dfe06d8d354d82d79677535ed957417cf5c5f794b4ea47 test1/693 0
-f663a97e5ae55456d0dabf66714d824a9d6b765d0d18cf44a21dcb297550b629 test1/694 0
-5d2b18cffaba1e00cf91195ff85627b2a67ac35367fa98292a548cda41c1ee3c test1/695 0
-3fe4c99ed2571a3b90549ec9fe9415fa53a2c5d6f5caed165597767302662994 test1/696 0
-f3708530765def56d155da53daac64af7c0b3e225864c4e71c30004030904000 test1/697 0
-4d52ce0059a2ae6d28ae335a429e2ab775cd78ad4bd857c3749b40084b94229c test1/698 0
-325c9c5ef0e88e633fc4ab84f064831bffa1f9f77339d4a6a5f7fe1c52e4eaeb test1/699 0
-87ae6ea5dff2323d56a3d474740aae298a507f6124c73a3a0d5a96a82f7019ba test1/700 0
-a5b430b746e182fab095f9b71f22fe30d36083a72e64c39c0108ff19a45c67bd test1/701 0
-b3f878a9fe25cfdb88ab0c0486b6fe20a69020ce354f7d2c30855342e640be65 test1/702 0
-bccba8d1dc8a5172c89b27e111a0b7e465b0ddbe6c25a8f75b203d4aa0817794 test1/703 0
-5756819d56824e6662e5b7ffa564b4f709183e8d7d399b1ef7f25cd8b338b7be test1/704 0
-2be1bd4b48e6f4cae6e97a7a4d4625b3d9f170832f74538969d88836bd944a20 test1/705 0
-da836ea4bb98c828562eae30139b0057154c9ff37740c38794e390d6f740bcc2 test1/706 0
-42de3aa86f575c8244a8383aae253127c5bb330c8d3ee70b3465f34e695ef4e7 test1/707 0
-4460e11116970577d2ae2f4b9ed0ab915beaa6884b860adf22f9cc7a420d658a test1/708 0
-d8c5ff360784e6eb6f25912e46c3d0020f4bd2cdf4184e3e5bf6f178d00157bc test1/709 0
-2a9ce289a14d9a7355f9ac3ef7133ae38ba51178024501a82f9b0fee1fe52db5 test1/710 0
-6e20670c7497ec4104b1477387b83d8787863148f157b13e680c01adfc75b6ee test1/711 0
-1c1af21e5e5554caff5ec45d227b0cd7cbdae77c9112f54efeb151853376cc6f test1/712 0
-a326bc91116897d0442677fc109e4b898f929ce8676b3d1ddde995fafba92632 test1/713 0
-e7184a3aef754be39f3a46e40b3958dd9ca649ed2f7fd16a5d4e36aba99e3011 test1/714 0
-26a6e57ecaf9e61804205482147ca7a54aaaec7b8ac266bd8efb39952dce9e2b test1/715 0
-b73daac85e4660bc280147560eff04487259a6a273651951fe1e1257f0e2dad6 test1/716 0
-50b71f46b4e43784d9fdb849bde02ef5f21435b76e2670ce2bbf92655cc9115b test1/717 0
-79f07e464ec075ca220d082429fa4327688b4ca551be188482a3d21eb17d36ca test1/718 0
-06437546b0751a0514d729ece433f51d74d72abc00b7be8b74959ca78377163f test1/719 0
-6a8e941b1fa55b8b5fabf953cc915fb0a39bf436a3cce9c6d6f8d3582ce6cd11 test1/720 0
-499c3bd7bdcb1f47806bebea0d67a36a0e2437851a3309b0f8da10407ac8052e test1/721 0
-1c9eafeb6e35ce785771ba1d560c66ab7f6bc392d752a17fffc45c756243a15e test1/722 0
-64521261c51d22ffc26da060e03c5bbf998f135e2fda2c4e7352cb7771019636 test1/723 0
-8a028be24d0dcc4fe415976522f31afda78a97795ba77b5fee28009d75a3d484 test1/724 0
-6fe553aecc8b628284c8a678713a6f996c995a8c6d960d4c7a7e7562eeeb4ca4 test1/725 0
-61c14a02b445d666f14b0f4e9bc091eb62ff6f66220a7c56d62bacc6a63d830b test1/726 0
-251a9e2bd4c58e4f2014628d456ceb308f12dd847b8f614df8c85ba5640b7159 test1/727 0
-b9b7f1604233e46c190d994931fa9634576c6c90de579a520827962b95acad68 test1/728 0
-e4b15ad8f7276557788e5ca39946d8a7d36418dd617724251e9a8f33e3a43743 test1/729 0
-ab2c301f32447db2c269660b08669eec182982efa0916e0fae3267eb4dd4f86e test1/730 0
-55ad4fed3f558b4d5fb28c2b666e311b181f86b7950f9b56462dadbf41d86c90 test1/731 0
-a7ee16a740be1141c86c0cc57189783f3b32faa89ee6b1b914bd14b0cf2be6b5 test1/732 0
-c33f82f8438f8dd2758564648e7339dcc49e09ea62e9ca6e2aff27c0c5fc0f20 test1/733 0
-3db77f4f06cf07e8df1df5a233bba01ac54f05bc714ffcb6c2112a3ba4b9c386 test1/734 0
-d3b84cfb82a94f76bc25093947b4562ba915e9b83719b2fda44b49a94b45f666 test1/735 0
-f9843f2e1cfb282a2822aff486a540c9b724f876ce9183c818c6f14619315961 test1/736 0
-dbad7733d39b670ed5efccf3595881e75d6c48de73fcbb80d988f33b5ca21d76 test1/737 0
-ea918c07cf4b1c8f3828c291d4ed06c13e002bc4652c8abe9f27a23272ed8c90 test1/738 0
-76a3024c75dc97ea3dada72781033081e7b70356b00fd36a2c217180043a1f5a test1/739 0
-a89344f72b86d4cae723015dc760456d06405ba1e8f46bf4f2ceb922b872bbc2 test1/740 0
-ad29b9d34218824453eaed7d104968465950fbacc7edf00ea0f28ad0dc8b3b42 test1/741 0
-f251a76a9196e7b3e6a125da2a9ea79c700e75ec61ecff491fa54dd93195a2a9 test1/742 0
-44758aacb401717fafdf9b02eb495d14089caf15552bf2c208b17a0c50b1efb5 test1/743 0
-da6af1c6672f86e9f709e1a1b59d670f4c35489ede3df1ef492340dc6da7ed4d test1/744 0
-6f9776fba5d20bc980360b5041d1b64911dbe667db68f4549472deeedc1458eb test1/745 0
-4f5ed0808a5ae55799b88816e4c56d82e4d2504edd8a876a34930275a0ea806c test1/746 0
-ade4d53d50a2d4a4d8db150d61ca85338eb3675eae85cbfb0c9614595b33a084 test1/747 0
-80010bcf79ea468bd398313d10252cd4882abe9c38d46e1ed49e07fabb05df46 test1/748 0
-999d2dad264823b5d5141ea1c5a6d2cc19cbcffdfb28501652eb01f9380cdc66 test1/749 0
-4e10d4c739ec8fe046a128e1c4f74042933b6b2acedd0bee111ae08322a891fe test1/750 0
-5921de6ac57c3f327858928954279871a682baf974dc0d3151321078cc5ffb0b test1/751 0
-2b95e864a4d85d55bc4c7179cbf3a5b2db3bf0ef44700a83e458132a46f75b23 test1/752 0
-7c83e5a0dd52bdc3649d7f697c2d92f0e4cbdfc98e67c4921f7a3ae0fe3bfd7e test1/753 0
-b84aaf77b44497811ce9f312a44c1f70a78ca81762fcecd68b3ed2ee66192fa9 test1/754 0
-8a4723b1dabd232e1970470789695f53f1e3429deac3b6e2409866b2f9310084 test1/755 0
-0822cdbaa990d38c63aef91ca55abcdf898041043b5e79ec6bd99a4d61f2db3f test1/756 0
-c3c43e5118a99e44b6eb189ac9ac9fc727505f69de6e399246fe1750974edffd test1/757 0
-3f5091cfab8d43a2c51ba68f6041e7b649d455d01fce5feca18587ae42c9d0c8 test1/758 0
-a47bb78172fa36d7299ad9b38ddb5eb9e056a8365d80dca2098e578d692a3163 test1/759 0
-753dab26e0c8b0e98f6356c901cd24b6f310058997ef8da8ba382c1e714217ff test1/760 0
-372729d30008aa1e1326486453f5fc2b1eaaba220ca03f63d23e9e17b3ddfa36 test1/761 0
-f2fe7c8b23ecc445047dedb584f23a159b93cdb70d99e9f5bc2be7394d4d0b23 test1/762 0
-afb008f8dcac59c3e386d008c2bd1b0e7f584aee8e941a1fa33d66ebaa097104 test1/763 0
-b8a3ae30a8ff5234c1fe268d4e4d740154b35dc20d7236fef714dd27f1036246 test1/764 0
-04eddeb48112c2bc34bc032c56503fca373cbba9e8cdf1c59dd19ad6890b2730 test1/765 0
-0ffa6b31796107fb5ba384eda13a4baaace7af42dce549fd58bf8b0f55cba65e test1/766 0
-f156e009e85ffbc4f4e0637046d2f913f83ede991be70dff615082878bf45e70 test1/767 0
-774393d55e3bae28d8a58e91c3ad532464dfc20d9648cba58624672741c248ea test1/768 0
-dc4a1a9f034679a1640c58b1d5c519f1841901e29a4eb2e7d360de4b69cb08ef test1/769 0
-1b5c66e31ecfb92232ba59eb3d4c42ccc28315c174f8c0be105df762e54e7fc9 test1/770 0
-53776b9062a6bc86015f7b5a2896dbe9305a0e6f991bbb2e56396d4b6c5439be test1/771 0
-4197248b0e5d07df4187fbeebf335ae8525779fc00b5282578e34472b3b7e28f test1/772 0
-5965a56db632146439c5c0b75fc2424f5143868dc4860574d81944f47fd6eb3d test1/773 0
-4b9243d811aa8720958c1fb4d6484f82d65edac4f4fb60d118cabcfd11666461 test1/774 0
-6a7acfd37ed13554b45984aac2e565bbd22c69a6094474b1bf27c013c29515c4 test1/775 0
-6859cac4fc4d13bb217583603ad09e17e8558790e114f704ca3d73242c995109 test1/776 0
-59d193a7f23b38023d8f2795b20283b7f270fa464d655bd59c607881778432e0 test1/777 0
-93ab24b4d02a6c8d580ddeefc7fd89f631d7f3d655aa58c34a865712d1d59f5d test1/778 0
-9d80acce029d132d3017caee92d5cb1e015055afc3fb206d6e81263c6868347f test1/779 0
-c2a6dfb343e25fdd88cda7de430270434d4dce11ed57ed01699dd39476846b8f test1/780 0
-0c898c68e18d054cd6ea4e6a5aa25ef57419410d6ebaa97762c6f0ff160f9142 test1/781 0
-b5b2564ab1d462898e72866def5a23c1a9cc55d1ec83b7efa972ef12e1b6cf83 test1/782 0
-bd64dc532fe2798d0c37417a5bdd1234b567b9aa681f437ce117ac0739bac4bf test1/783 0
-e1f1661507607b255845f592d79b9e2085db7c10759ff21e8dd8afbddadae74d test1/784 0
-da4509bb842eecda020bbe08f1b8bfa283ed25a162a54d8e0e7329644b6702b2 test1/785 0
-8bdaa5abd3294c0ebc20731ef7e7da9f5409ae05b54ea84df0209890e3962cec test1/786 0
-954f11c612e3f1e23ac8a9d1c1260c28f1ed52cf59ac1f4d6c886f7170d9c865 test1/787 0
-ef95e95a595a2a2e67f32d1637e7223ee8003c127e803a60faaa6b5b205e5f3b test1/788 0
-5ffb660930c1ec1c4f3393cadb4e7dd0a286ee77fc628e1452a6a55c4b1d3efe test1/789 0
-340911241768236de6595b808cba8c47dfb9d69ee902f5edf93eb7ee3d932d23 test1/790 0
-770a1a07c5ae4488ebe08750d8e66129b562d9fda66e7a96f82e655e48687088 test1/791 0
-c057eb441663955358d26574dbbb8b7fe2f86c67e89ab8df20e47089e4af01f4 test1/792 0
-33d8ea3c1a85796f423fecde8929d8f5d21ec9c9108a6543521fb3623cf10a1c test1/793 0
-d18623ac4fe75fd03b338b48c214a033dd2aa49a03ce85f873d5afe9bb601fb1 test1/794 0
-33b1c07ff7c98e53fd4da9f4dee838a3b1897bbd4ce38ee0f04b265733687e20 test1/795 0
-5fe8262bc78b6270142a5fc8bbd7ce5b2da2f67d38a4acea89451951c62500f3 test1/796 0
-d181d66e976f9f8d9b9137f6e70fda90d8cc607c3453c8022ac9609b1c8c458e test1/797 0
-1e9807ae3170d04710cc5f1edf5970e75e170ff88f5a362a5780db29a29c6356 test1/798 0
-2eae1482b8111990595b112f5f9b0ec7aa117a11dd63e67db0ee6b09ee2294e0 test1/799 0
-e1ce48a5b47a6fbe1f316992929853735bc8cd41eca49fa96b4c0aad87ccdc10 test1/800 0
-70a93e9c567fea572dda42c20471938ec7658b79eaecc82594877f1af14d8165 test1/801 0
-36a702919591ba29ef2c93bd8be9baa0d5a57597f1dfdbb7539830c9fb9f638e test1/802 0
-16780f7190dbdde5f18bf3ad7b6232ad5db70c0353e675dc320f46aeaa8022dd test1/803 0
-0481a1ede79240e84fa4b885b3190fa61407eb5ddfa0c2af5e6b6a4129fc368f test1/804 0
-82000e92787a94d7482d85cf257a5b0d06d0daf53e742911e7ddc173011406ee test1/805 0
-5eb8fa70692cd00e836d034294c6dc84724982b968c8c82a36cffae3656a1d55 test1/806 0
-842f67a9036316f00872a8e4b142673733c070b4d56c9489f0dab22bcceb8621 test1/807 0
-b69908946aaa468ad2c25ddd3de95dfb8391c3f0d9c191121459aa414d1ded2c test1/808 0
-48aee682850086a1d37c5f8b4c94667ff4a61627a70b9ee57b49b332c30d6058 test1/809 0
-b00ec3b9ca3b95dc9db743558cc53cbce9f520eb7c129c0ad9babdb5e058cd7c test1/810 0
-63ec907cefabe52eb686f2bf7c541e877644776bd7c539e884c321bc58de5970 test1/811 0
-ab78adef75ea92bad305892391ae74576de83051d418736ad423494198ae05b6 test1/812 0
-4c76cfa27a67d0d6849df72030fd4be0db42fa80cbefbe817105b71ffcaeeedc test1/813 0
-7d8442cca7f5a78a00d673b50fdf08a61893aef1c5a9b5c98411964033adf961 test1/814 0
-d304db740820e34015bbe4785bd203fd9057628ff3d74ddc11158352af36306f test1/815 0
-ec340bfba18fd92963d1a3ee230138784fcdf4e60ce1d43dd14d6646d9ad1571 test1/816 0
-8312c6518d44cc21db9502f6d0ab78dd4804b459ffdd84a30cd46d23452b356d test1/817 0
-00402b5da7c961ee537785a32e625103b50d86620b31233fa9694db6998e3668 test1/818 0
-293c6c125b80e5375ad1fb03f690416e0ff057c5b5916deb0b7126b71795c263 test1/819 0
-4ec401a62bce0c60cb76f1688003f520a0e6f440e441a5c58913c8237ee95dd3 test1/820 0
-63d637ecfaaeeca4f3482c07bd607b1e54eba1a269637a258729c5eebace5a64 test1/821 0
-393cfebe5cbc091f1f9ebaf870da5bffd3374d4dbb8dca1687a0f03434506456 test1/822 0
-278b809894a5a12425f73234379e92763ec02e7df44c1da92dfdcc3f214367ab test1/823 0
-495d2ca3a2cb15c8cb1c9aed0f8c6933985365b2c4163f05073ecd589e721e15 test1/824 0
-98890e1db80bcb6cb5dd6f40d05c32b0104f18c5d644e1f8c3149d257701a6e1 test1/825 0
-e3390f6cc1b5bca016cf1f1fce058e885282f8b4f01bd6dbdb39506e34be71df test1/826 0
-bcba752cbcc095320becf6b98c1752cbdb987721310d207584f3993384cceb40 test1/827 0
-503c26e27a16d1c4ea7b0feefa61762de8f39a5549f7344b98788501be2a5bff test1/828 0
-0d0d5666285a9c6d33a935b215753f3cc967dc7edc052cb214de8a695ed7448b test1/829 0
-ee7a5b14b7ded9d44ca98b1867351fa71268ac2e88175c82bd84d5179d06ccc3 test1/830 0
-0aecc460c83133c297051796b9e17e536c33ac0517c11badc294128557f7bd1f test1/831 0
-431010caaba4ad817291f75240380912b62cfaef1ebf6e85fb6e15032da90174 test1/832 0
-21b5ee719c2c2df4fcb510edd747c6bdab66a34266c9d5173060fa4b6b83f2ee test1/833 0
-3035f5446b4f2702448594a70970edd76c040e153f761adf27fd30e1dfba1f8e test1/834 0
-739c2be39060ae0677f694f80de6996886838d629fd9b43af477291ad803d944 test1/835 0
-1020185a0a5c570b95eefd1e1d3e3ef22aa5e86df8d3057e13c697e0be0ac631 test1/836 0
-e9dfac81c75101cbe6f2f36d381467336ce4108a2bfc191a145296e9ac4a975b test1/837 0
-1888923ca06b4ee8c1d4e279208f18c8d8a7d21949e1edc62a0094975439b139 test1/838 0
-22148d77711be0268b4ca607b75bf7d972b09c73d546e99426fccc75617fad0f test1/839 0
-70ab0fd162bccde605319904797f62376f09ba056b206fd9a50ae72f6fcec5d4 test1/840 0
-e7fa35130840b68d919222dbeb361cb9119e99c3cb69140a38bdc4c4a3630603 test1/841 0
-0d67fbc1aecb496a9da9ea7408b27734a78fe5634abffddaf4fc9409902bbfca test1/842 0
-e473b8cce99598d4342607b3bd2eab39f2c7fae325a915e72cd3776ea44c8ba2 test1/843 0
-c873608a150ca310bda42b0920afe3d7498e1ee986bf89189fe42b8bc4a8121f test1/844 0
-288b079c21168d6e33aa52b731300e602ccec57ff9ef5abae967aee6ea5ac74f test1/845 0
-d9bac38b31d37fc6924527c73ffa4e032c4ad968c8d788e505d5b3c547a09271 test1/846 0
-358ae02992946b3d98cfb9e922ef785a1ce2b7d75e411b6d456b99d3f1351a2d test1/847 0
-35caa024a36c89f9a0328dae8ce3842763f1d9ed1a99edbb01c28f73096117b3 test1/848 0
-9489936a6b3d3a0c283564b7d1d04b4c4a56d9db18c138aab3bb5349cb61b925 test1/849 0
-e529d305f5fc3f51711b6ad9bc488a29539b4706830711f7ecf0066dca7b6daa test1/850 0
-ee4be7668aa7d2217ba3140b9d587593c4954b192b80f411506110f37c7e503c test1/851 0
-4abb1f62635cabb6b6a9b26f768b5e382a374f00c6cc6c5632905581268c4e14 test1/852 0
-df30d010a8077d3911c6928ffa620924bc62d34c6ae264369de9e7922f6ae445 test1/853 0
-b12c3bb791f94e2fea005ca4e94ad1e5b3ef9df65a14afd0c339edc049f48c8e test1/854 0
-80c7cdae300c065de1b85308f50d3e64db640de127d1f3ff06b5a3388aea4f77 test1/855 0
-5196688c8362e328404cd292ed8889e6098591bf2eb37c868048a4dbbe4cee3a test1/856 0
-9570ada06479ced96792842ffc9c69f26c7872a96a07033e420aa18ca2bbb585 test1/857 0
-4f05b489b7f890984ec182b1b08297e6b4909203b98d03feca13e0cb53abee79 test1/858 0
-949696d89d21ed4956e40cd6b4810c0d7c5b2950e07fccaf3ad07cc98a1bd52c test1/859 0
-03e776e62eb63fd3ef84d4eb3fea885ee092c9c45a8bccdaa1c54d50fb8f6f17 test1/860 0
-d24a0358e2485aa527e674acad1858bd932d40128341788cfe1dff26fe55a074 test1/861 0
-325c3b7dee4bbeb9a0ed4244aede9fbebdf1b293b6d51d702879116de0e7a21b test1/862 0
-b36b74bb84508ea89055345af32f739976d3f39f5b59165399174f9d3278bebe test1/863 0
-8283ec0b4c9f26e964922d176293818ff4971d31814041cf12cd758fc32eecfe test1/864 0
-65a5ed5ae98ad878c5ed43f084eaf5b746b01112455009f4ad3370537d10467b test1/865 0
-5f1d5ec0bde8374ec289b931bcceb16cf32a8a78c9051f0dbd2b8913710782e7 test1/866 0
-6d07e6aae985d31b37416d275536edf46a2feb436ec14e90ebd8872e8cc381e7 test1/867 0
-8ebd4cf105364452db0405f2d424023159ac6479a5d87bf603a0aae9a17ac24b test1/868 0
-3857a51bc8ad2d09d7410a804a2f8bb7971d778b42280ac11c32ad6517b7ddb7 test1/869 0
-db704bb5fd36956528a027b8e25c7e13443aca5736589e3e4fd244b3dfcb0ee2 test1/870 0
-57302ba0136da74ae1fc033ed1b63c9775de74c595f2c4b361d2a8acfba6f8a0 test1/871 0
-c7d772f7048fdd4dad9ff68f5ea293ce700738f655a0967003c3da78d4bbc94e test1/872 0
-0ddbe3627d2652e6352d4c2c66d25036d3f80f8250210825a01f29b5a81144da test1/873 0
-5252a08836b92af4ef04548aebf0b407d7c2ad04874c2b1cf4da3ef13bda6da9 test1/874 0
-d6ba333cd171bb75441c6494a98aaf943f7e89a36b88d338d943c4244e099039 test1/875 0
-1100ed72be88ab6814d0007493ccb2607cd1b2a431f75894a93c2774888b69f1 test1/876 0
-208abc0d2ba522025c1dc6feefc028b2e94967cb68eb7d2a192a4afdd7209ba6 test1/877 0
-68149250f84a8b7d0c5cea2bf2bc8888dea2cf29307413ea0a078644b747eb6a test1/878 0
-c1af374ff53cecfb8f89a3d4c9f5f8922296d32b3c49073b498b6f5cf6f7bcd9 test1/879 0
-bced8fec7183eb9e43591f8ea1a4f567cf2d4615fb292f3cfa2e6aa429a75552 test1/880 0
-8abb0adecd8dbfde769d9c9138263e60d8ba07078e3a724a795facb268b2862f test1/881 0
-edc7ee486ce42a36e9563670871ba7f97e3a33660e69f23463f7853798a2fdc2 test1/882 0
-d0d2e11f12762587c7a6b8622d68830231df2e332af59ec6613a6faafd65c55a test1/883 0
-857c7ffd9fed61cf4737e19a85cad4d33d182e16d52fb35aa7eeaa19086bf8bf test1/884 0
-fc7489c9c9c1b343a816b736e157ccdbcd07caaf2fb73ddedab5674511154214 test1/885 0
-ffad883c5ba6f814433b4d34b72be8b697eec721641bd63ccf829258858b4b06 test1/886 0
-5d94fa600efac14b9c21bce1c62591ebea295df155b7e791e712f2c1b017eb97 test1/887 0
-9f7cd7cc3b4ec282ea469db7e9574fcf034eafec84d33f9010fb6d116d9eb2f6 test1/888 0
-d5249ae6592fb9827dad81559200c21eff968dcaa3d716b0350e44b2bb27d3db test1/889 0
-a898ec863a83c6f13ef1f7ab4bd53ed7701385ef8563ea5aaf74a8d21046203e test1/890 0
-1edcc328802dec721390dfae092b0ca1cdd7cbac7429f111f24c60e883d483c7 test1/891 0
-96672b92badc8c357f801830a482c4ba0b30f9107651d2c36a436ca5e4cd84df test1/892 0
-03ff404b5c052581c0348bc65b81a923e81aed4d7d5a94fc2622361d04c3f7f1 test1/893 0
-0bd23d87e03a6ad8fdd59592e6b21954415ae669bf2dec7dcf75c4144f5808ac test1/894 0
-860eea9a3bf1598e9149370dec3b36fee80ccd4ad3f9a58fc989169bdf34794b test1/895 0
-55eef36a58c543a04ce89dcb704ccf4aa6244a14a62bba8a1fb28e10b0b89073 test1/896 0
-2b8f5338b77fd8f0d5becdb6b3cdd0eec01f5eaa788d6b969b34c2f77630519f test1/897 0
-cd3816c7023f73f2f3e3082e1bb55de671e227d63a982353373f27f52b493aef test1/898 0
-0ac91380d72ddacfb36b72125cda1be3a27caa115b3da488430414ddb171b62d test1/899 0
-7cc59565f435a84e51d7d5ced95246052b12530dc316c0578fcf012efc99c15a test1/900 0
-b7f369d3cedf19685cad6049196f074a20e0f56464060d8645534d3795e7b332 test1/901 0
-7488814f75a5645c647794974ec93d2c66308c207bd48511249e7aacb5931e6e test1/902 0
-017da69352342f15351aa2221fa030e431e091f78c68135032dede94eccb4d91 test1/903 0
-4851fd8ad15d7f3c6d494d19fa5c87415b75a910f4437f24735b15a181db441d test1/904 0
-17d0c578bcde1ccc53a344deda6f09b36a3a4f419b829a1f2cd0e42a3f6b0415 test1/905 0
-5eb800a69e560b1c1b1a9dddcf85eb664d78095d0f4bca620dd722cb5f5e5576 test1/906 0
-1c4f58382ae6ba79cc29a4358e3ed24f50c746a390c00fc5921c76346aace0fc test1/907 0
-967d6f5e884ccc5d510f16fbaa9510eec1d8859b60fcc296114f30c6960a733a test1/908 0
-2b7db0c2821e1a90a4c66702d8937caf1329cbf99dd7b8355168ae15c6459066 test1/909 0
-900a4dd01bf33ba965c841846b3bda45c6eba9b419c112342bb9ac87016b5ccc test1/910 0
-51e795c805c1503ebe55e76836d5a66e38017370ed7a439d19642df4f91077c2 test1/911 0
-b98550d0696418e5a3310d069d7caa8f0a74e6fcb61b11fb4324f4010b8e3eab test1/912 0
-29c57e321c154d020af9ee4d594c8ab35496f7a3057f0a79db8b2908086b7d27 test1/913 0
-9ded8c6abaac06ff5a266e9ddd429675dead3816c9613db59f49a215455f5e46 test1/914 0
-73e47c0d9fab1b98f6f22bea075e95a3028a9476a488b44d992e1af607e18c0f test1/915 0
-14beb0b06800b147c1e89524a5d4c6d734c61da376768a0075a01c7881bbb150 test1/916 0
-61f5bd3084445d0c33def4ea1c9cfbda07b74ad08481bcf71f5855dadd9561ab test1/917 0
-ff46dfcba8afdd8af4781a98a629129c3c6e3b954c37763937bc9f2821b08c36 test1/918 0
-891568b9ea605d0ce3bda904c758e48e8a857d06a6bb715c002e433142f9f67f test1/919 0
-ceec962ea95d7e491354872f30da34193837d9c5b9cfe53d965ae68350d18a19 test1/920 0
-72d0ea267da8ca75d8dc6e093c41f731d0eb91db2bc9435912281b86dc5b2ed7 test1/921 0
-acaaa643e3504f2d69bf12fa43d99df587033d75023f2f740735a80a01e25a64 test1/922 0
-2da115e128c16feaa386f9e4fe3391f3259ba514c23803248b6effac42e040df test1/923 0
-bb268aff11dc0707e4365aa738e5e4703d921b473f0dcb40d7791670694636f6 test1/924 0
-b8d8207aaeceb6914ebb8f7750a9b77cd85327515e2ef59e50eac2c3210470d3 test1/925 0
-95795dcf4d2ba7aacad8c2d7b93378a874afde5a03edca2f6ae7ce153b83a0bb test1/926 0
-6273e84971ce0ffbdd25724b78680aabddc85d99d376953050c95b8d5c86caa6 test1/927 0
-e0fc7d9d0e82a7e6f3f4dd8a7e0cd1a75a5e13353efa3e94da8eae292d30a9bd test1/928 0
-0f065e4730a4e50706c401b674148b0dc596a6ab5147ad729a5f3f034f583e60 test1/929 0
-d8a3b6be92697e6b3630c6993dc78e290078c76fc3f3f99029220f6a2b799fa3 test1/930 0
-fa0c4f50cb3b317a348aa46432af36c2f8bb3c7f4bb25393745b35dcba09de0e test1/931 0
-fcb43527a929bc2ebc1fa00ace9921c6609d2f389e140b4a266ad93d1ce8246a test1/932 0
-e820b23e5200d9230b8b4cb72898348b0c6c7fff4b7695a73d19689a6fc49a3f test1/933 0
-c2a546684b4271a8bc5369e877fb7b85060214a6c7a7076b729b977682933460 test1/934 0
-b434ee2bd453117892797a16594313ff3c62ef9c3d6e2dcd83377fd7c91f8d96 test1/935 0
-288b935b0369a24429d40446d142999a22b8917ae05ce2da7eaeca5b88a774ae test1/936 0
-e66819b6cbbaea5a82b5e4f2c4cf0dffc1ef82d34c4b0c2b496ff07fd9bcf346 test1/937 0
-eb988fac9fd03aa068df72fc2e59f8431be0c4b436ffa781d94fb42bb840be58 test1/938 0
-d13635d27272e9c8dcdedbab9ca7ffbfe2d0bc2f9b6a70b8bd05b58b5ca50a0a test1/939 0
-2df840c2ef8711ffd21ef8739427c621ed7e7998f892d505d1e3e24f1c83fa82 test1/940 0
-0b10ec6b91677b91465fa6c274178c1b3230b3c64865f6fea07fdd12a814936b test1/941 0
-1f6cf2abcd3297b1711417b83abc248e2598489091e340cbc60993c1bf8aed6a test1/942 0
-fbe99d7dfe48d79c525aeb71fbf7cb54a0327e0f34b5cb0205370a4aa72295f5 test1/943 0
-c40c024b084c32d43f3ca5ca47323b4f2ba8d2409d66bf83385598c174e2dfa5 test1/944 0
-dfd1774771336f9e39330227b8a47ed19be022162e3bb8a2f1bc2d90f7562bff test1/945 0
-9d6a75bc483062b60a879779ebfe2f7ba3dcb547f51e4c7116b56b5f5b31607f test1/946 0
-75149da7465f79c6641ed15835124a414351f47060bed002b3a167df08481d1d test1/947 0
-5bd3f20d4ccec44841e78b1e31db69694440106ce596a3a9ed38daf2e42098a2 test1/948 0
-f25a68aa95237e9c5d47449b332f8d5f65c3a5cde4d26de5caed4dd465204486 test1/949 0
-2cb93590abaf6f20463a9ceacac618efefa41cf3044deab572746e8b995ec90d test1/950 0
-e62f46d2c1fe261fb64064a46e7f784fec52fc5e7186e745af8398e7e4884a5c test1/951 0
-4cb7791c2ab18537723e5baa6993f00eb389a9720f4cbf35a55b8799ddcf9f35 test1/952 0
-f3e73444c848570dc3e2d3026648ff1e654665b0edfcf9456e8962057012d1dc test1/953 0
-2f68b873db3d68cbcdbfbc0c3497e899cccbaa3c9e8afdf8e2ffe0efd01651b2 test1/954 0
-865355492c5bdba98e05c0841204715973ba32d93155386d6794355e6e38096c test1/955 0
-fd3c0e22f220a55d96a7120facafd852bd55a6d8c67444ab751da299257c7072 test1/956 0
-11d845b1de621f1a34f2f11739269c38d4f77070684903f52556ee0022b5aeb6 test1/957 0
-231e8c04e114ce555c336717c28d801cd194030ce7effd0a5696a1ca497b9aff test1/958 0
-ac7decf59b2d810220acec5819141e901acf651c756e73f92ea145f26fc2880c test1/959 0
-f239cb132010391c6da157b52b6ff093079c4b60a4a0308da52e484e33561ee2 test1/960 0
-cc1d49447cdf5b28711ee1f3044a0731a9e4a6fa0091b311e9ca6e613438a8be test1/961 0
-f94e1a9f00b4076c95ae0bc15bba7237ab7f4a00863e3d02443d6e4eec96eb59 test1/962 0
-4107e1533f6cbd84b813f6bbdf7d0e162f1442847fcfd6a641908fb68657c4ab test1/963 0
-1805c6a10cb02da647954ec37fcbcf0b9b01234abe4db8978e201d0c1283168c test1/964 0
-8d7734523802c4914067c47991f022151340d2be161e11cac33963b2e83726c9 test1/965 0
-efce5e5f596918e846aa14f85d85e4b733ac47acdeaf84dcc427e410f18e2bc9 test1/966 0
-ad71e728035da9e9c4afa5f03e6c94de3ebac7f489efc8f0a82ed9d06ec33aff test1/967 0
-725460acd36098e7ab60b9d0862985f6b78bf2ea72b3ae61593c8fc93240cf26 test1/968 0
-9e3dcfb57ed973c51b2763f46fd01625c4858dd007c1fbb022f6d36e288ec2ff test1/969 0
-43bde0452c32c36bb6c24334ff779b5ed87b3b606f80f69ecfc2faf6679c302a test1/970 0
-002af63965bf58ba78fea496f0c52319b339b72887a2aeccc1bc7ad09dfe0ca8 test1/971 0
-1c5f6b86c86bb75fc01f3cb95a1c5d42c7a908c7d7d56af73c067657c71e497d test1/972 0
-275bc70b5ccb96cc449bfab4f7114b035b30a740ecc974741f6980cec4f63218 test1/973 0
-1a1484b3b9518adbfc74c002cb10311368f6b5a0eaa346945346c87c286e8bd3 test1/974 0
-f6095fcfdff6945c4c91018ae1d37607aa7c0db38282f528e57c98f2cbd8f9ff test1/975 0
-b6c7c373330d4383f1c23df4d369f8edfe72efb5ee9dd47624e91fb5ee19d7c3 test1/976 0
-84ff745c2a4034a995f64090ec02c702cddf0160713de5f16eb5ecc86f1382ee test1/977 0
-a4fe6c84c0f4cc66eacf3ecd630eddc16cd7abd768c240c416a594cb9a8d98fc test1/978 0
-edb60a0970872ebacbab7f03bf0376f860282a74273d87ca13b56954569b3331 test1/979 0
-8be76520415458a0d9fc6ace634dfe9d672f06c386858568c6188989223bc8b9 test1/980 0
-ecd3300db7f84b512376a2e352d7f91a6a16d33b1eb9196ac18f7165cbe5fa87 test1/981 0
-a422e30426de8d986e95901fd5d0c37ecce38ab0726020634aade60dcd82fdf6 test1/982 0
-5c63a6ae605ea9a42b49404d287eac0ba745fa4097d19aa0e744cea2f2491b32 test1/983 0
-a6140385e675a3e6c6578550457052088f4787d32135518c0088d680585fdb45 test1/984 0
-574eb0186b4577e6cd2e06247b6b37d0cfbbf4733228aed42e7bcd1df3598b38 test1/985 0
-a9e2c29553061ebd20a71fdf8cfe572e3f9d5df722570f14acb3df2111de7ddf test1/986 0
-c99164dfc3f6d1df91916fb4fd63f4a17174ccf2457ac8453d3ce09b0299d218 test1/987 0
-d34fef98c0235ea1b66b453ec6ec8ad7d8598d8c4361e27f91f75784089a9a1c test1/988 0
-1c3f0994175adab4a438f17bdd2e4d2e131e1a2a41890ff6b6d7142dbe0765d9 test1/989 0
-deb1ee8a3adbc1189add68b263e513a05ecd9b65e5861a35af4c271943e26bf8 test1/990 0
-181b72c0dad97d9b42d4d6b76799c4128e8d34cfe1327bd50e663d13d12c6329 test1/991 0
-9ad6ceca7ce297cf9fdbc6d47a84b368833c30a58cb5e751668001a713690020 test1/992 0
-f066e0c5ef0c109ed41f21ff737112938fda386abc41588fae53a8e7021215db test1/993 0
-f86b3848d6f5b67a29350b46928825baabf880f097b76682f3fac7bcaf589ca2 test1/994 0
-5a42200434e5ceb78b4d4917b7ebe7dcdeb7a4a307566f46c42890bbfa36a145 test1/995 0
-f87b04562fda7c576f314304d85627bd9ab37371c637b052096258c4e7132a86 test1/996 0
-42d2fadfdb1b4ee3c7d3c254ed880728b07fafcdadabb2a60bb2ea7d2bc1692c test1/997 0
-e1bb8021402887881cf2b32ac5c32516e4ef7b55f152346f7ce3e29189d4bc6a test1/998 0
-00674dadda85a075bedc2bad8e9ed6a74bdaf813cc2b7203cdfec1680658cc18 test1/999 0
-1935e54646d6e353ca808a1e902eb7661024183e9d947ac3bfe5d3615c1b9c9d test1/1000 0
-96264bb6d39f00edff80701fcc823b2991b2d8b96f86460d26727ad2bf103be2 test1/1001 0
-c667f2dfe2d862b732e6f69cd2134f0330321599a7c9bca34ee0ad15875d6e27 test1/1002 0
-95d4b5e8575fb7b2633b309194961ba87df3d07a17412a5ea74d943e117af5d6 test1/1003 0
-b7c4067f278f93d92043878fb8699ea613510014b0e7a5e73b422517724ae7f9 test1/1004 0
-644d870975f2550370768fd9d32c046a14aec8fbf97b608da1d64f0631d6f3d7 test1/1005 0
-cfea72d8c858b37aeb3be45719b107f09a58eeca0064664c478c36bacbeecfa1 test1/1006 0
-dabe77ee10fb4a23d6bd0d36a4d4687d811f7a7cb981ab30f885d20e58f37c2c test1/1007 0
-8c84f7553f3d517852b4e91de89de194e6ce0a9b465d19e127f8090def7f44d5 test1/1008 0
-1eefe47c568624a6c0fb293d50de9bb6d8e169d32aae3e4eb729bb400017ad49 test1/1009 0
-b89bff2ba399297ab594ffdb32cc7543a843c18f390fb8104cf0c750eaf7df33 test1/1010 0
-7f35fc4f10acd3bea75f17707723b69fe756a5ffd74e48f374cc7b0365e6d736 test1/1011 0
-ec1b9243b62f653d83daf3ef8c3db0bb28be5ca6848c7aa9989c35f677221f32 test1/1012 0
-dee826290600a55996c3f672a9b4bf9178538f24244883e420d39885f2ba549d test1/1013 0
-94bd2d6bda44d7bb29ef55e496b75c68faa0fec3d2224b98514cb862933b8d7b test1/1014 0
-350fcbbdc351f7e75854c350212095e618d50b94236353440009e2d4e4f21aa0 test1/1015 0
-39d8a57630df7bfb031c13093b1cdb6abf7281b53c6df54b15d3c1928a427199 test1/1016 0
-a425cd2b4a74967c677fc9aee0a68c20bae73401bbea685174295315debed56b test1/1017 0
-3f075217a562d86abe3b53dff94e09e6b0c5ca6e76f8697e7812aefdb127092a test1/1018 0
-30a37d84527467f12685f2deab37010a85ca6e2368d8d52c7781ced2b5d12138 test1/1019 0
-2e3b67e52111e15c61a32bfb49d425116014741452c1cb86621c7e6fdff662c4 test1/1020 0
-711a7118646c11eaeb5fde1b0daf72e7391ade404e12dc0d38d0ad572faafd10 test1/1021 0
-ccc80c7f328bbb992d5b349490ebcee0c756beb477535971d0310cf9802fc573 test1/1022 0
-722cbf25dd50ae693534f6b76e5c52b72cbe1abdb7e817f2b0bb10bcdb4976f9 test1/1023 0
-5efae2362ee75bc500a9970296b6b66dcbcf69b457d4df9e5c8509cff9a592d1 test1/1024 0
-1731cf651d88f5e1f59cff2ca103371389225955ca96e363b842ffa3b372245e test1/1025 0
-4b1055c1bb421e5235d86f430741446d91e243d6a2f386a3699e9ebe12577278 test1/1026 0
-aba5c34af60c02028119deef9e44db99411bcb5b542722e91377827c910781b3 test1/1027 0
-8fc681e41878f1588720b713a2a03da0f6234c7ea19e69067a30a97429bdc0c0 test1/1028 0
-30ca2234bc002c28deafcc8d68efcc9d7ed57043c7e7f4257aaf6dd4747da5ce test1/1029 0
-dde405d58316b1dd09b5a2fe1da6d5de7de4d2aedf0a90a5c0fd4356b4b4f1cd test1/1030 0
-cb6d6b7643ee8085b80edd001eb9ac7c735efe5fdc335063293f34c7811a370e test1/1031 0
-704ee88b017ec614e9c3d3486bb699d24d299f9a82bb887ff1e61e0bfb449cdc test1/1032 0
-b3334fcb422342e911e0cabb283712dfb58cd53414ad1e544ef2747773e82356 test1/1033 0
-211fd845880f913002dfbf18700d60d1736145b29631e7b789530e54971f1ce6 test1/1034 0
-86677149918462ebed4c4592d09e803709306082c5ef92bf0e99cbc17c541aef test1/1035 0
-595eaaca9cc6346bdb8ebf11325af7eec847f772a344e57d5adc1ef540f1b865 test1/1036 0
-578e7835dd90a1cf1ee92b0f37c590a3343712e3ce7452afa7f966d05e124a8b test1/1037 0
-15cfe5108ce418a8485509674548265684152a6101cc09715923ed8216bcce47 test1/1038 0
-aaa4efde9bda5a0573699751a90891dbb39fc0bdd38225326b1090ed0cf7e0cb test1/1039 0
-c0bf11c82256e46e1a38b0dd2abb16c4e7c4dee34cd7bba4e089180e4c5c0a02 test1/1040 0
-06f7c72b209f0f1d275b5ffa47c31f509f488ab464ecea1ee47a2a5da81f504f test1/1041 0
-56bc351cf244f365e45adc5df7663bfe0fed8146d3a52bea2741630c0cd46819 test1/1042 0
-391fce6144e13745ff5d17b2be5c6e06174143a68ff2a48fbca1cb338d9ef676 test1/1043 0
-78280eb92b5594d2248339b76d910badb43697605dd82655e14b61165203341e test1/1044 0
-3bd6232f0a401aac5b633bdc53cb15d52fc5ce66223f1b5ed139f858b3e1f0e1 test1/1045 0
-77e94c29ed3efd3af87d60d176d4e5ab74eabbb70f8f6b4d1de02306bbe9ffd9 test1/1046 0
-8ddec863715441c1b8d8f160fcd29649638d8d1233a23483a768f4790713c211 test1/1047 0
-b7546707c8ee33d95a2955407d230bc72a74506e0476fe765ade4dbaaa45307b test1/1048 0
-482b47db3aab28436dbfd585fae94fc89d98aa711661424eb25849c720b1b03f test1/1049 0
-4a9b613a3af3286cb10c80e815aeca37a884f67aff502730d2b68eab55f86391 test1/1050 0
-fd8f7047f52b1bf25d132750a30a98b901c0b6c529b23f7f16bd463187b24eb6 test1/1051 0
-76b70dd53adb6aebae017cd510898dea2be2d023a11acc8f9c213ba2fe9960ab test1/1052 0
-c593f7e086810a50e4acf185236793791316fbdfbeb1481f40386ca427ec59ac test1/1053 0
-365632237ecd36a6de395381f7cf6d352dbdb08874ab67d00e6b316d4caf0110 test1/1054 0
-04eff89737818952d7bfd08387bb84a7a4234b4aff3df4e23dea42ebe10863b8 test1/1055 0
-9fcbc46e63fc212d353a010689864d423890bcf0ac7da6a06234311ea729daf1 test1/1056 0
-87b15617b28b815bbcd83de86ce89af83becf5f9eae94b1118ae541ffb6b4b87 test1/1057 0
-cbcf88355ccf79fd59cf6d97a3e9661e2062f1f1a86026850e55900311a709fe test1/1058 0
-185a2ef5b5abc6fedae431bee445607b6a606cd5291e17fa6105742dc921a2a7 test1/1059 0
-02959f2ef4e6274a821481eba4dd5e3bececb11eaa9fcd2efc560623ba5a20e1 test1/1060 0
-8161679219bb92b90b6afae872aff39e672b889c8bfb355c16005e95ee1c50ee test1/1061 0
-bf431025cfed599b18e5490c996c909ad51d5266630b4398f42a773a96908313 test1/1062 0
-715ddfd7d925a6c5da6c8a969ef96bdc7f32f531be9d06b4a9a67144fb9d2cb3 test1/1063 0
-ecd1c2fec0f2f8c185c89543812b94ea2a985b6c57348aa4f31cf9659a5fd2d4 test1/1064 0
-8828aea0e43d9d7876cdd0d93599ae80bd4bdc9d6972ab1bec76d51b01604e8f test1/1065 0
-fd868d64851d1523ec66527e075416d077e2af588bf4f5770c8bbf7ca02523a2 test1/1066 0
-9ab5851c6f071c57633f48fe21f6121037e3d8642003ef7aad696710f0971097 test1/1067 0
-3324b31b12fea37e560fa98789ed1f4853bdeaac3aefcd1fa954f6645323f53f test1/1068 0
-67fe99c3890c9fe3bb7634ea087321c2ac6e6a9172bff6135db40ee4bd154d96 test1/1069 0
-614710c834c908668749aba41ccab5e3455925baba7f8ba73c645e1ba78fada3 test1/1070 0
-695f8868be3b324fa9278610d7ba0e96bd1f6be808fd285b7e6caae2614aa035 test1/1071 0
-562152e12028476e6b1a394e347d7f4ebe0df934acbc317f08811655e1352b6b test1/1072 0
-e247efd9d6dde20883ee3a6596a11b2267e9fabda290fab92473c24f589373d8 test1/1073 0
-cc9cd26962d87d773b58b16b02a6dbbfb6a98f5efee33ae2147565352db65246 test1/1074 0
-6fd974b740949d19b356d4b84638b3c025e82f7a3484a85eccf30e981f2b8166 test1/1075 0
-a2bfb68bedcbef46ef119e3a99ad1279c5d3c2f7debaaf362090b27e04789d23 test1/1076 0
-cb3d1926cbc204266af7c655e41fc26cbe7adc1cdc20a9af184641d49f27c2e9 test1/1077 0
-30a38efc513515d14c5242cd39bf53f1a6135c8f2c284df058386d461e9f6ee4 test1/1078 0
-0a20170c9124d7197559d671b197c0eec13319960fd980395e560878c0675ec5 test1/1079 0
-a4c5ff15649629dcfa7da9f87974e59f83f971aa42064ae84b187cfec2c21d1d test1/1080 0
-56b2b68c4be6af76e893ff2da07fcae0b9bd793b13c7ed8ffee6fb3568a7e1dc test1/1081 0
-0843be3a34fbf85511f20c71a0ab6548b349ec24fe784a5270d265e9b7a0489e test1/1082 0
-7f0c70fffc35d0f94b6e119ef22991bda3742149e772d1b4c5269a5d9afc2cf5 test1/1083 0
-337d1b4112cb3dbce7018e253e8130da2ed50a812c290a75b23c0acf0246f9d6 test1/1084 0
-b08bdc03bcafd6b27cccd87e822ddded6b517f924baa4a7397e3a64e936b054b test1/1085 0
-c19e19e59cac4aac7f3ecec93848398b9e13246e5c864cf85c381854c3e6d2e4 test1/1086 0
-882b807e6e9f67869998d6e0fea438d80ad9a582066357b85e1b77661d307327 test1/1087 0
-f12d1d575b218bdcf7a80ff49b15235efc855610ad0391f2f3edcf67bc447c1d test1/1088 0
-edeb8cccec09aed5203bb1e330ef849ec36de4f64faa5d78aaef05c508e9eda6 test1/1089 0
-4937c4708f6b45eb4d04d286250521036fe6f3b14f253a7ddd22a79b2d458669 test1/1090 0
-250c8e78ebb647faab24fa91964bfebfcd0e3be4cef50075492b6c8e8477477d test1/1091 0
-2a20f6dc13988681056c2d4c31bbccea0b76efcaac11157ed21a454c8e7ff5b3 test1/1092 0
-406383af1c5f3dd765b3fa82e3a045dbcdd01fcf23503fda8b8efb77cacedeee test1/1093 0
-5e4523967784b470f0ac0308e42b9434e657e4e17abec989cd87f8f1e61edfa1 test1/1094 0
-269039d7ebacac02e67fb5f1e9f241505956fcf3595166563476e9714c65a297 test1/1095 0
-4a829e9edc7db10934b4bd3f346505c8bb7255a53c5a6a86ec9cd7aacbf63276 test1/1096 0
-28471d06f30c728fff0c25d2e2e79aa451dd44aa187709c6d404123bd6693b9b test1/1097 0
-33a7f3a751634f16f3d816a6084455c3ce78678993ecc380e6596dc77728a5c2 test1/1098 0
-260a020a47ab118f4c1d8add8655af76effd6f990273063fcaf11c22a9fe96bf test1/1099 0
-8477ee48e08ef8c6d042729013c9170e90cf42727a31cf4a70eb82cc5a0889a3 test1/1100 0
-95f6e0f118bec3615dc09207786e9cd74fbf0cce92b61085a3573df189b5dc70 test1/1101 0
-ece1241839bf05aad4638b8828fb091f5b228330de06b6abbd2bd6dd114359b7 test1/1102 0
-ea21ec02d8d4529967d44d66e020b652c12401f528fbad3226909862d6fb1d51 test1/1103 0
-a41d7671fd78cefac178da785ad26257a6a4b8c71a67104ae0f4d00a1ec8fe07 test1/1104 0
-9ff3675eaefeed08922c582d30ee6a66afc0a4826efd331949e0a26db4ac8723 test1/1105 0
-bc1da177898569ff73d4e7f6d41cc6b4b05c14adb561709b6a146e65396f5411 test1/1106 0
-c222ebc0103ffdc1e26d3f66f273424f1af4ea41e289ad6ccf63a4a188aa81b1 test1/1107 0
-87d27dccfb684919923bd2c324c3db4ff4c56c1d88dee4f08b1bf6f97a5cea03 test1/1108 0
-00dc51d8dafc64b4a4d29dfbfa5db825dd3cdae0b8200193259ee62ac09bda20 test1/1109 0
-65f38e24d2470cf64dfd41c9e77a1bbcf167be02afd82d53ae2b67d0d876ece8 test1/1110 0
-e5a8d2d4a043bee424aa33965dba02ce9e91e815708313da1781c1cfa4614037 test1/1111 0
-d19790a36a1cb7b9c06e8d80ee0f8d4abfd9b88cd64bc67bc9af566c25bbfcaf test1/1112 0
-7781a25192a77c68bdf07a5e515d8c5f4386d8518623eb8f44caea3e4945057f test1/1113 0
-616a1408f69c85dda3f909c43fcae911c72455adf097b6a7f4b889dd3bb96a04 test1/1114 0
-61728a111e00940c36bee71f4706fd71d2a56ecc8aaeeed00a9e07d5b03d55d3 test1/1115 0
-f1cea93ac181efabf8d8c683ebf16693d0077407e2299b302f750acdd9bbcab4 test1/1116 0
-235f62e3a2db9b3729dab346492e666022bdbace878ecb9bd47217d7bfe7a1af test1/1117 0
-9501b06abce156940e346e44f000295e01984fc10859f9b0919409af7b220afa test1/1118 0
-f762556c82b449fcf4b25c11e7497166500e6fc3ec333352cb8b5dd198f088fc test1/1119 0
-727c9f8eb5047afa2e57d8090abb39dc0048f6f7a94ad4bc5142ac1ec256d948 test1/1120 0
-acb050484d3d33b69c3416fb3a86d4fab68cb72e2ba81661a4bb3439c3057f37 test1/1121 0
-803080c34d1f8ce7d16bd8d5cc7a131c027b6424d171547e538811c1bcc5f6c0 test1/1122 0
-8c3f9eb0a4df8972ae8b4612b70826293040b0e9e6526606847957e7439f1579 test1/1123 0
-a2f132da7a7285403eed6a814c2914a2066a69404e7e8b3e5bc7fee8f1586d48 test1/1124 0
-528aa043de9d6509c1734bca3f571e7c5662fe487057f99937909c86bac73072 test1/1125 0
-92d83c2ff4481c86d6333679e50d2f187af9266027ffaa55348095e189b2b7ca test1/1126 0
-872f94bde14a5cfa7ba3e97bf0de08570814e515534564b4b26b9ea117755ce8 test1/1127 0
-88e7b1b48e6d8b94317853402b45ce4de9fa6ca2ed1781e484f8f7c7a503426e test1/1128 0
-abdeaafb8d1366e70211687a99e77965181e95931f26c68adcf9b49d05dec92b test1/1129 0
-7f5111868a769cb8d33eaa991f82cbb696a1bf603f866d4d49f2d61154fd7724 test1/1130 0
-fcd3e869a8e54a6a0ab27dfedec044788f057ae8dbb99edb620242cf8bdc4fe5 test1/1131 0
-75fcf5cbda74d484039c58d1cf83faf0d466acc54b5335409eb245d3120831c5 test1/1132 0
-2089e371afd8cff90e44f4c8bf0f04f24cbf792cf2904c85801870066e4769d1 test1/1133 0
-0be03680bb3529431b8e03f4ad3d112017942ceee73127dc2125089e31f6b9a2 test1/1134 0
-d32441e746a43f5400a04337e276fd23cf46e6feccdfc5b929ac6744257132ce test1/1135 0
-bb6116d44c58ee4ba03e2bd322868c1697189e8761d1bfee08effa1be4d7098b test1/1136 0
-bde5d0ebd82cb750148208f7db310c603a5d36518058d814c527fa514daff8ae test1/1137 0
-5bb1d371caa448a52e8ec58b7810e8cb5ff71d823db8aa9ce958018e9d24f63a test1/1138 0
-5e907f5e871c704a885c4e1df2ab5ef00704eed1e04a3d661ddfd6a7d6838cd7 test1/1139 0
-514e0013983b74ca6dd20e0bab7c30f337ae8dc4fdf6afded3ff82265881b59b test1/1140 0
-c94e6b3dc51da04cad4d4de98641f796168d2e1062836fa333f45ad79c8ca85b test1/1141 0
-d0c94d509054fcff1bd2288ad360d45aca946d06242245ca50b5ded66f763319 test1/1142 0
-0d464b3ef0322e9b966c97f4f713b19af1c86ee055d7231660a41c244b1e54dd test1/1143 0
-82d19214ac90695bb0618a30996424806b4b5596508534aaaf0a55f346da52d9 test1/1144 0
-3db339491d83c9468101d2b628c59c295f0d1a5734325999b090eee91dc13438 test1/1145 0
-e3aa3564d47471f083b948d65781ead5a820b708a0e43792eb9ffc2d55bebdc5 test1/1146 0
-3d49f22fbadedc85eebbb8a817e2a204b39a43d8dbe54100c06b1b57061c88d6 test1/1147 0
-c27cf204d5f1e99d1c1d1ea883ab36bce4d586e9a050af23bfde7cd7d67c4162 test1/1148 0
-a5c014c4aa93d89ce33c6bcbf53a6b709b8022297234f95f9a3883c8a69b3854 test1/1149 0
-490961a48a31fbf6bde0338363e9a4be93c08dd5fc7b14a76d94dbece1855947 test1/1150 0
-332241c53114737ec978f25f17b49e510aea6de0c73da709ced85a2f4877d007 test1/1151 0
-64c8bc36d57ab97eb649d2a7dedca286889894bda8c81aa290e8b302188af00a test1/1152 0
-f1d9a2701f4bd0b75aeae65853754a1c93481881e42defd08fe0f92610955de6 test1/1153 0
-12fd81791429a4403588be0096b2cc8fc9f66c405b0e9af761169cb239858387 test1/1154 0
-0000b876f6a999528ab835c287f6e7617c267b435a7c031dce37d2af506b5a44 test1/1155 0
-6a4d7e65973728c89a0d40c72b58d1b6704d60fe017ab6b529ae9197e50d879a test1/1156 0
-f270c1a1848d291dc2f326e82d0082df70a5a31ac958b2dc7a10d641f66fa69a test1/1157 0
-e8c5348b510593c74658122b5c1d59bd404855d194a29ba789839476e8015119 test1/1158 0
-3be577e1bbc920e0396150fe6bc619a5ded0183fb153746ad793e76e1da9dd7c test1/1159 0
-2b66ffd9232061af92112317cc6f977b07bb2595c3cffdf5ba7cf29eb51dbd73 test1/1160 0
-de93644bbb8148cc75c32c9c8f0cba2616ec6d8b3138b4210e9109ab7e8a4f9d test1/1161 0
-3cb424e7577b18e7e8c6412e3a80076edd773b226b16da25ad14ec554a5c4029 test1/1162 0
-0f357c163debf6ec4496747a71e6617cee0e07d8c3f7b6fa346da96e88b3406d test1/1163 0
-ca89b2c09360104ac71dea16e541eedb63d03152b4b273c2d9ca3e74adee53d5 test1/1164 0
-7064c546c401b42e7a6ebdb776698ca51d10688a21e8eb7d5e5201460316d6c3 test1/1165 0
-ec081d1e826dd0198d7c690fc8b303043ba7ec16c8ab92d07d134b64380ff68c test1/1166 0
-b33f566881a776828bc7e0a3b0dc5eeed5081521b49d4994eb243b2df020f8b0 test1/1167 0
-521c8c26b2b71c45d1b5c928b1bb5999cbfe2c8aeb13109566b81e44578f63ac test1/1168 0
-d197042cc4715bec0105a26479d1267af3f40dc20ee36e48edc8f5d703bdc6a4 test1/1169 0
-ba9df39167bcc9814db2d1144d803b1b0cb77060bcbf2544b8ca6256a6ad1370 test1/1170 0
-3df248efcd0cb3189c40bceb388fd56e6ac25bd78f59b1f52f3f81ff325d493e test1/1171 0
-e3690e40f0482dc5f86ca841e23eb021014c668f48826939a9cf7d5dc8daf054 test1/1172 0
-224b77ae9ea08cf991ccf7126050e11dbe0cfcea1b1422b14a6ead19eac51ba5 test1/1173 0
-daab81e659a24a90276fa1d7b0adbbb3bf7c47a6b5294e638edfd5ef3be5c795 test1/1174 0
-ef6ec5ccdd07cec1dc8bd4a105439fd1ae54d2a5b6ba7407be3d85f91112ac04 test1/1175 0
-aaebcb46a3a9829b6d886c4c161bf22ff72d359264983ecb8fb9de79a0310ea4 test1/1176 0
-955ae1bf1030e828afc363cd6585992ded8c99bc932019e5e13a81cfb54e3b7d test1/1177 0
-e5e8a30b250306d0ddcf72c3826aed0573c506dbe69249b085011f5bb040bf46 test1/1178 0
-31a0ae718df395bc131370ce4576fb8ad6a7569b3e2d132c63b850d7991d5f88 test1/1179 0
-286bf8c355d462fd7811296beced6ac30bf457cbce1a196fc53d05d7fde9596a test1/1180 0
-881f6292cb5a6e29c72a4524d71bf5d49f75ff90fa8812105821d720a71c2b5d test1/1181 0
-a16d7f8f848fffbc5de8a916d6379a35db2e5ba81296f8a3ec641e7816514c86 test1/1182 0
-966e4b669a2a1b761a41ec787ead394bfddf6d8e57024cb7c1fb538293f64b3a test1/1183 0
-0309f63632b182d51623905088c020da5296a52ee8f81cd1218204d960f7fdb8 test1/1184 0
-ef96d7460c8ba3178ba55b1a199a45ccf4729ac172f8cabe956ed2e19bd6f8f7 test1/1185 0
-ac300399b42775d56bbb26b5e28cdefa3bc5ac67754afb6dd0bfa5c959203dfa test1/1186 0
-144620c2de89cbb22aaff1c2c2e7aa62eda90c32e50c0aa6a0e293af41ac7bba test1/1187 0
-414a25ca4e9b6996c8168d48f34e39f8cc891297f43b24872e2932188ac24a25 test1/1188 0
-efb14020c94e4bc59a303401ed1928a35db381ea9d429bac5218a7b7da3b48f7 test1/1189 0
-be39846fd644423a64f5c822f0d4f55e125fe8d93e1fd202f7ffd83e3f38ef99 test1/1190 0
-669d0f82df0701cbe9474378dca273ce02c82f48179c86ec0f452dae6f6198de test1/1191 0
-e9d93ab7c4ebe2e246398c4bcb78a913fb9759add79b4e04c484866a384a30db test1/1192 0
-20d6377d2928c56ce356d7e7f28e5f9672c5a8bdb01d17c29e553211fc9b1134 test1/1193 0
-1389cc029dffacf76851f9a11937db4e21261fa3881a0d5c5c2562feeaf416f0 test1/1194 0
-092f78a33e30d85a3acbdb0bccf769d9ec0bf0c4b4921384140e5f620424c86b test1/1195 0
-ba72ba689cccd010e100be69387111f54255864c2752f550b137e6473c98204b test1/1196 0
-245194c70e73a239d9bb6ab7ed2c956cceeb5a6fc353946c461aea9b61f8b06c test1/1197 0
-80b2c2364a683b3dadc85e39405b05d35917544f026f3383671e823708a6714c test1/1198 0
-eff1c7bed4e6ed556095c9171049bc62803f363e21554fef2ad0989adfc96d27 test1/1199 0
-de12f658fdb0cf214aa241a34fde17f9a1a2c2e428e7b26497ed69d4fed552d6 test1/1200 0
-1dcc6c1994f610d2db4a7aa468dfa23c9a5db60680775a57a951c89ed8c4bd9a test1/1201 0
-fbf76fb27fc5e3127e8ffe5bc2329c7b605783e8ef0b60b1892918ec393a932b test1/1202 0
-140101494f011376774826a381ee669fa7273bee69f218d634b900750441c84a test1/1203 0
-fd3782a5060d76cc34c2c799847b3308782b0135ff27d796e8ab62d145c35864 test1/1204 0
-312c3fefc93e62804fbf17f0cde77ca4c2a6e7703d67767c9c74c8a0b67c2ffd test1/1205 0
-c8dc80b5d19370dc0460eebbaccb5f7e75cdd50e1f42a6489bee6f4276d5ff62 test1/1206 0
-7e3ec09e47a320f4c17e10de379255bfce0782dd788f1bed4b36abeef9ac6a45 test1/1207 0
-65d16f05ac77d41b2298e733d759fc21678d8df319b31a2dff129faa93c553b6 test1/1208 0
-5071cc9f22f3b60c4c3ae020021dc1ad07c26593ca48ea915a7fcbb67fa27d51 test1/1209 0
-6f15da36ed4fafcbf6ff95d47a6b14ebd947f9fcaf9bdb32d502db388c2de29c test1/1210 0
-e27a090051c2f30d095a772bbe44e09f4ae96c6de6614ade517b9f76ce7fb2bc test1/1211 0
-c3c9fc4dcc1848b1e860c18343d6cbd1d03d5bad4bee9f580321a907945baf7d test1/1212 0
-bb8fc6d869959cfc53b6808c76312b3cee3d3c66e50ed238515156d06a0c2134 test1/1213 0
-c13df81d0f1fd5c4679842ecf030572df880e961fe7102a58f323e5b1c162d0b test1/1214 0
-7553d55908f9ff460b2acabc54da619d2007dd490abc42f47e8d7f2757646ff4 test1/1215 0
-702e28ddac74bdc7c048dfc620c5e7d7c71bfb23b10bed8cf8d2122517d0b0c3 test1/1216 0
-078401296157da2b10e674cfc0e1f98ba3feaa5e1ba191ae9218b6ee5113b068 test1/1217 0
-944389a6643bc2357cf27ddb883dad678c77476751f18876997ba4b3a4e7d8d1 test1/1218 0
-5545088d2f1d9c5c8ab32793bf2ff148eb967e816384628093271f85e423cb19 test1/1219 0
-d475b39e44d8fe2aed222c2dc20f058849b566892e102e7623eac3dda1492359 test1/1220 0
-dd926c73d76f2143693360abddf82ee5d47abbeaa13bba92870ba84b23ccc106 test1/1221 0
-b9a0105f25a3087bdd4e432b03d3daae6d39c39b2b092756685470a55b89f002 test1/1222 0
-6d3b501dc1f5b6ff5c9786b3f01ad782ef8c3448403e745b380c7ac6170f5c93 test1/1223 0
-0c743b3af8744dd9a524bcc08027593d94e7cbea37fcca01dded10623a2f50e9 test1/1224 0
-a0d58c34e634441df1f1c3552844667ddf2dc76cc3aef8f22ed6aa9c37e3f725 test1/1225 0
-83ad58edaa79c19939a4714980726ceb79d68d9c52d497cca1b597e19b57da93 test1/1226 0
-cfd8ffa0f11e60e7bec0799136faf77741af92b65936f84e9790982b6f29a8e3 test1/1227 0
-f4fc94aa1274184cd70d26418c0d80abc3c6f058e0da5c2a94bb9b58fc59aa27 test1/1228 0
-546fb5e87ab623d4c980ae36e685a5246a57ea1d48c3688e7ea7544f1c562c82 test1/1229 0
-683dda45efc77fc3f9dd70669a4d0adf31d7b4d543d6e236ccdc68568b17b87c test1/1230 0
-e064a4bca34ec02f19724d14107ceecc92c16497600d83a088dd1c5e0e450c96 test1/1231 0
-588666122321c6e4fabd7bca928a77eb38a2771cce0c83b00b578ddd62b23aaf test1/1232 0
-b62be0fafcabb3141ca55cff8fbdb0c75c8819f666caedde14b64b3a7b41a648 test1/1233 0
-f38ad96df4c17d8fb5e79ae99761efc7df6e252ddda06412d4cf84e5fdc1e893 test1/1234 0
-e9819a6d908610c8ac699d31cff53cd42ed8c2a17e5b109b5cf2950146364f51 test1/1235 0
-c51a2b4faef1187152fc0894f667e22be8ee479ac99d0778e704b515b8764c1c test1/1236 0
-12439e607a61e581f571678c0e9f04088083088192f4e703abb22d5308cdf0dd test1/1237 0
-b34bec8123037166930541d5f466df7b6e27e2c6c98ae954e92415626c66389c test1/1238 0
-5d34a476f2ba8b95651aa2c5b713271d213a6016c270f6b65e8f68b2c82bda37 test1/1239 0
-688a4fb38900f3a238a2f3f0be4d972bc0b1126ece302fcc5c2f28455a4d6d9b test1/1240 0
-ca5da3989bcab4db6ce8f1c95cf636d2d8fa5671d31f76eb7f163241f52c142c test1/1241 0
-c14071715cf63947d14eaaa931d6d9c130d83c4ec4d8d65a0223caff562f4db8 test1/1242 0
-819c7d15ffd75c826d095935959b21bcf78354961b0df0225be653f4ff6cf1f4 test1/1243 0
-229e10125f2e6559b9bc93d4f3cd2bc8e4c673bacc63df7a1e2c181db75dd10c test1/1244 0
-2b7bddf44b266e1d6b19c63c14bf629dafc0f2bc1716f76cba5256efbaf69558 test1/1245 0
-d595015cc6a1047122427d3a53167fa6c17a5422a742621e190b2666016782eb test1/1246 0
-bea09fbee51477acdd11b63a65d5e237bb04633b31b25f32867a85fdf4eaef5e test1/1247 0
-e24a01640f219dfe1969588055c756adc775d43b316160c7fe45feb721fda270 test1/1248 0
-4491a2c6ec2f5aca8dd3913a81d3fa2cbe95f358f2df34a16e790d472cc0a254 test1/1249 0
-52de62c21375b4e812479442ef91c17d09f9b59a42aa724ac22a9ec0a1b8c963 test1/1250 0
-be035c09f05b05e3300cfe472832d70e50606797590e872d2a3c251eee7ba6a9 test1/1251 0
-275b91a0e2ec57c88b4b3704596fe0c358557645855caf0825b9e3d853fee8e1 test1/1252 0
-07ba0687ccf118d12f7d68bd152ec1163dc3aa8207cb755bbe98507d931ccfc4 test1/1253 0
-8b708a7450eb884eabcafbf9750e1e79d005288c4344876c2b6f3d2128c959ad test1/1254 0
-aa924a41bcf7b2b17d82e3fb0f22cb7ae949be44141209b52c3e81f0aa70aea4 test1/1255 0
-f63a51d5a3445b0f5cbf287e870bc74b21d05892d972eca80c4f29a840a969b1 test1/1256 0
-43d00c2fbda0d316048e7fa3682263824ebbeb3ea813022e9ba07cf6f6aafada test1/1257 0
-86daf9761622de8e36eb0d09ed57cb0745679e957df5824af251b1ff2c393402 test1/1258 0
-aef60ea51133ddbdff04c724ec6ef55fcee96e8736b6aa664aabfee01a54b3c8 test1/1259 0
-49abf7194fb12bb1e17e8345a26cc8152e93fe8f449324406d7bce02ea21eacd test1/1260 0
-32925f10aa8bd580808534d36fcae9ef260e1c05139826ec1274c44f056a4ea8 test1/1261 0
-13b81e520e987a56ca35f7065af83f7333a33451cf94ab7747bcefb66a065628 test1/1262 0
-264f33fdd8204005ea60887ee7d7ec8218629878d15b9d17ff4960dccfe64168 test1/1263 0
-6441300db19ba7589dc4eb2eedbccd57a7a4bca0784fd010f144c6c6d29aa85a test1/1264 0
-01c5f35db1c9931bfd5c9de66a4098992c0538c56a15783a7c345e5ce6a99df9 test1/1265 0
-f255306eaeaa308d58002150517f13739a3a855b615dfe685ca294a8adb1f6fa test1/1266 0
-dd806b512e1431187c2dc4f5a991b32a51795e3651e2c91246a5ffdb92981a9e test1/1267 0
-8a28958c001c48920259f419b87b6743caf73fe869422b84018a30406d2eab59 test1/1268 0
-e968c31852e8155b0f94b09629cdb295b882f692960664e4ab63ab5433bd01f6 test1/1269 0
-0d7594024b26066ec3555ce89b8bbbe0ecf572a67e40c719d60afef077d44e73 test1/1270 0
-1ed29d030d82a399af3c882367b303e3c8d59ea599a495a27151369880a7cbda test1/1271 0
-7aff1f30885b6312b5aa49f0db1cf5eba8ed8e0a5611c142b4078ca5c0126d13 test1/1272 0
-21be1d718c07e8667b937c4e2b60d3eed7b70aee6d31c2c6c0fd293efc3c20e9 test1/1273 0
-5209200aaf856f333dcd9377540441ddc0f26b246a863d56ac01ee3e6d310575 test1/1274 0
-eb86a13d3aabc8c7a7dfb27fd9d1eca1df6f7f8f8ee1d63cbbd7ee9fe326305a test1/1275 0
-a2db91d4ca9d416df2f96a8c51c9ff969b7644cc5c8451843d8a8865fae227b9 test1/1276 0
-b7c88723adbbdfb07e3aec5513954f92e18ac02596f054fdbee5369517c8969e test1/1277 0
-8fef27f6bd3f70bca924f4492e94ba85f7ffecf2d9433129960564ae6a84e168 test1/1278 0
-3bc98fd29f8b39bcb695595285df47c9a9c3b07efea61d87ff264e80d5cb1c2e test1/1279 0
-3511c7330002a3ef2031c8439686fc616f594c15469415582590cdf6e75f2a6a test1/1280 0
-bf9e7fc1c4102f9b495617250011b607e8acb22cb61aa981152a026d8d8ce114 test1/1281 0
-7936b3f32a4b769e17554ca751f3d8744ea4a96d57ea37660fe8686c4cb1d25e test1/1282 0
-35694961b327eb87eb958ab67137603032b633a8fa0776df343dfa81cd538611 test1/1283 0
-26ee638a967f9563592b8a055b20649665aabdde81ff62ded1eaf7250b764c66 test1/1284 0
-d0000e3ddf04197cd5b3324f05d002198eb62100cb2b0eadd2d20615cbc225ae test1/1285 0
-f7b1459e0b49789743be08057056910e39824966cb912789abcfab35688bb8cf test1/1286 0
-3de1d4ef7a87c2e79a7dc5e10deeed3c807f60812f179dca38955f5977585281 test1/1287 0
-b1b95b4cd7915e17540202ce4fe9d31dd49b9fb156b2277f33b262630bda7a1e test1/1288 0
-1a25600e0ce85db83f4bd416b40ec1f0d9ae89b7dc968fa149e4f436879fd4d7 test1/1289 0
-15177b5a4870e076d79e5fae1b00b2852b5e79509cbc5efd3856d9d368ae5039 test1/1290 0
-6f6a740c5c0e69ba5a8c46685bb7c31133c9d766540fa6c43ee2d1afd868a4ee test1/1291 0
-819912a0380344045aac26c30e4bec24b7a97e28ac90acfa1f42f0344891bb19 test1/1292 0
-33587a7eddda06804dd8b14791ca47f9add580a242f3eef550c95f5b449995eb test1/1293 0
-3949f91975fea3acf8cc4478a86536e28a98427e1ad343558108870e1b34c51f test1/1294 0
-9ad89e4ac046f8fa9efb159ed780f1545f02d4049f747817015f380163a5cf01 test1/1295 0
-212f514435444f4f3caa9b9da46f6beb5f2f45c4f37bbeb3c78b393a5ef57f97 test1/1296 0
-13a260ab81211339de1c35fa20edc905771f93668b636c0b8ad0a2419bf0b65c test1/1297 0
-ce73829e804ef5c80e54e6a646ec11548371bd3e3cead6566a52c748aab90050 test1/1298 0
-ec459c405fe427a9b6b14b9b41947d61bc9109cb5800025d1c94d82b9b379306 test1/1299 0
-8e71d97c2903a622bb613523d99a12d6c3f98e9356f3a632b6ee97dbd7f898fd test1/1300 0
-741a5fb21dfac65c00d77d5f789614fd2c8b9b4f5c004ef3fd431cbf3ce2add9 test1/1301 0
-aff08950faeb1abc747dac1ff3e4ee519aa438f1962590122d8249f744e057a6 test1/1302 0
-557bf8aa121a5aa7cd62ef42df5d757f92329271a2444747e566dedf5bafb41f test1/1303 0
-d32574ece36d199669b069e01a932ea335983c5dcba0e613b29098f8a396681b test1/1304 0
-e83b17d19463a0d59bee2146b4877912dd5dec4aab7027559979548683cb60a8 test1/1305 0
-9d3d077d5eac3930cd62083a1a63468db25bb96748c3926bc8d81b9aef1fe83b test1/1306 0
-4c61d712d0827ccabf61cb8f4f3db3d2ba657a31c9dc5e6a660199bfd3faee6f test1/1307 0
-8cb553f9d84d1105181101eadd56a1f0feec27ef33a10cd7dc82852a2c72efb5 test1/1308 0
-70f5df24ec8120d34a11b7e9d66b5ced78298ab767da9deec9ea6224cd7e2f07 test1/1309 0
-99ccc170473c23c968f031cb630cd57f36823807ef46fd338c19ca785ab0677b test1/1310 0
-1886b5bf375343a92073f0a345e1415851e9e8d8cc43e2ebccdcb0caa7a19892 test1/1311 0
-9526ac73bef9376e5cb566bc02508f67da34342c24d8e75ef1080e009092639f test1/1312 0
-709a7085e3de6e86fb2d0648d56beba1bae715bf4e95e9dc659c8ebcc9e3a4ad test1/1313 0
-f0990b4db699b292e36e390172c9307602f2a49f40ebd695ae6251a58cd91023 test1/1314 0
-bcc2cbfb4e6867f805b79017421bb502ad53e5e9f7b8d0457e2247c7928993f2 test1/1315 0
-3254beee2c782aea5478976750fda914f38402a544c37d3122d460b0cd7c2fc7 test1/1316 0
-5463c52d17da05d80201247921b5cc76b80daef82e1b344125f4ef7add2074dd test1/1317 0
-4d8f49146bfb65b5a7ef465e1b2e15cc419d6aa3266949959a53b5fbcc9c0ec0 test1/1318 0
-bb9440d9b35796c3b63446dd9676a6748d24b9b389782f5b7b477797e684c0d9 test1/1319 0
-b7acec529401ac97b585870e9d22bc023c4aab8ac0ee8c0bd33e3b9901340fe5 test1/1320 0
-b28e995837407eef24051952bda07fd6540f27bdcfb52d865b07fe39809b4286 test1/1321 0
-5c432ddc0dd2bcf0740f9d4feea73e145b81150838fa3230dd0d5536ff9afb90 test1/1322 0
-ee3e2b01635f2f59db91b5ede66909a00c6462a2e85cdc25fa80a6e3301ba6e9 test1/1323 0
-d6cb9e1d4343c3b9566a3f74eee2f421d05460f68e4ac9c9d9bef1dd06da8315 test1/1324 0
-ab3c6d74748ef7e05505c3458b943440307d61e1eb91c49b90466d3ff85e5ef3 test1/1325 0
-30caba90fce994016ad5d0e2100e346bf3c12a901cb9dadb5ef311b05301a25e test1/1326 0
-b97850f985fd5bf09a35c9bc68f93f7e5cda73e366b81407af8bc3e763f145cd test1/1327 0
-68d5462ec3673c423d4e3ad44c2df1c67f5ba283506cd35e0b3545c8811fad80 test1/1328 0
-8ec2ac087d87163f4c9730ef0ddeeca25c2be16e1575949a8943ab0b137cb0a9 test1/1329 0
-8300af681982443516e3c294ff586382dbdc5578209ada6b9a37ae604ee708ff test1/1330 0
-056ff744185c8990d99dceb604f4b7accd74a64ab986608acd0ea51fb07a7ccf test1/1331 0
-7cf0707027b7d32ba745190aac5386b1ece20625a50645044a985403bd3a8757 test1/1332 0
-ad39309f50e7cb5f511d5aeaab67e30904bc65115c77e4edf8fca1b670630c10 test1/1333 0
-0e5e21d08fdcae8548d6406fe8d1674fd3359413818de762b9131abf3e9520d0 test1/1334 0
-39893f5405f8a34f7395dbd70b673514aba535ccba624b48ee9607ba42964723 test1/1335 0
-0ad89e69433bd1434081f578735a00092954f3b4270879fd3d4f6973734d2926 test1/1336 0
-7cbabb6d82eb1fb4a6951790519ba38659bc37658f83c4e8145490fcdd3a52e9 test1/1337 0
-64b1842360401306713d667c8b3ff8156b2b6f581f83e471c2a0931271c3df36 test1/1338 0
-4b89c9d6ab74f56755b10bc241f29a60440bff13b406aebaee52856a64a0513b test1/1339 0
-71102258b7053a2bb1810b65bb2dce97cd90b98a50683bdb17fc031b81f30f1b test1/1340 0
-61b0d6a2ce19754cde973cdd110ffb86242e42bef59889c664cf1677625b1638 test1/1341 0
-4c8e3bfc0171e77f453077b947c118878c2046df22dfecb47d850d3ce9904474 test1/1342 0
-adb5dc2f4517631b1069826ab865327e16de960580a6cfb5d2ef9a9474ed2892 test1/1343 0
-6ddfb0405944666395000991cd5a1ab03e8c69f8affebd144039713324407282 test1/1344 0
-f2df108a7052ba559e5ee33050428b4e2e723777e3a8b78574fbeb8bdda612b1 test1/1345 0
-6a9ad7e52ba6c5ff1022b3b7ae1cf729b8c8f914d46a58b0e83b967db01e7054 test1/1346 0
-f3cd11e7b09b12b758d3c3f1c46292037c107ac2e5f2aada1219a8b28cf9d314 test1/1347 0
-194aebbeaeb01a07fa98fcd234540c013fb5bc7becb64fb480908363a9eb526e test1/1348 0
-c29b92a5adc1f9bac1a65e29020c652a9feade1f6bb1a682db02fa11a73f77a3 test1/1349 0
-d33ca144fcc51ffa50de417916369e63eb24f932799679adf60b91672e269662 test1/1350 0
-41d761aa4973696f285406e97856fad2b17b69ac90ce9f64589afbd1d1c49a44 test1/1351 0
-49eee93696379ba51e3a25028b5738008ff22cf5c9526793687c87f559bdfab0 test1/1352 0
-e671ab56c5fb8dd59e76ee7ffb72bd29e789eb28c229a7bcce94f76a1e9f871d test1/1353 0
-68012450415f9a6e8bb362003cb26ae714e4419c9bf2ff4a9713c72e2b6c72af test1/1354 0
-bd382be24e23fbacd9e5dbff2abf71a02dbf15fe50e8ae5e4705b0f370da1560 test1/1355 0
-8b07997cd3a1a3b1a338665a4f5e9c203152c31e78fead1182e54b9e47721b9d test1/1356 0
-6023e92f4611e210de706b52d70de327199dcefd7b95114ac0f7adefb1c0311d test1/1357 0
-175a67a76902abcaf6b389cfb4e28798c40c03dc039524c74fa96c890006e8e6 test1/1358 0
-53ac1a28c89882654c1678293c88427422b1fa42bb67f0b1682a70646ea673db test1/1359 0
-0093066aed91d1b0375af630a97fd5b2be233c8849a0b45a527f77edc1b60dda test1/1360 0
-bfeabfeb7a32c7ef2750896cdfb29d239bf44bb0698022d16c04a2ee8196d3e6 test1/1361 0
-8ad19a3dae9285fd60fc6dede702183ec31ae2ddce11c31cef5ba88a8356ca88 test1/1362 0
-6bbc3de5dc435f8a98dc81173c0b9844d71487fdcf17b4ae9b2e9b03d454ef6b test1/1363 0
-308ac99fbe409bd07066e483c67af24a5cee534cea6d19cc5de00b49f4f12660 test1/1364 0
-a70683e6120649ffe9e36e7eade004f6e39d508d9d8f96d595a4ddc6df010c66 test1/1365 0
-92340b16ca4a7adb4ea356f617aaa51c5d3ffbb058b273ed3d4848a9f2411431 test1/1366 0
-1c1473cadc97455fb059329019548f64f6a6b45e3f965fb2e80ed6ef51ce5634 test1/1367 0
-72fd7240b4e90c84f7355c8489c7f692ea5cc861248847304c2e8901d863897f test1/1368 0
-a2c25e7dc2e54fc8f0c7831538f2613f24a57ba76b7d74650d699520e27feb0d test1/1369 0
-f188ce344c17109797d50c341322bb57114a60d11571f670a94e9158c6f452ad test1/1370 0
-e9106cf056f0c23d79c7c28c8dd6eefd0095ac279045fce72723109546e008a6 test1/1371 0
-106779ed4353b7588b28d386d25af17743585a1e2bf923dd1472ceab5ed83177 test1/1372 0
-d6e037bf0758ceee14b3c37fb959b359403460ddb1628c15ae4ca3196d03af89 test1/1373 0
-3014497d7f11ba8da65e96a3252d896f951dc2e2a78c1e16a403c25841d5e697 test1/1374 0
-f5af96ad1eac71dfab626d24f7fd22cd6417c3cf1719153da0029ce6da7a3c72 test1/1375 0
-5ea67043f50168ddd4e18d17bd166e39d82b8a7f43a38f615f25e100645c1569 test1/1376 0
-e87f77d49657444971ee0b1cedf13cbb79ce80a46f2f39bfbee8d69236e3f3b8 test1/1377 0
-a4381ccdbd2e5ef4104267a35a8fce05cb31b852e6fa165b78b4d88289324442 test1/1378 0
-991e7d31ce6abbea4af2bffacbef430044fb6a7695f288e8b08a61bdb92ca688 test1/1379 0
-c2640de545855b99f2ee50ca05f009446d877971a2fe7120f3d2f08d93db9b69 test1/1380 0
-2d1c7690eddeb7aa8bbfefe9eeaab26a85336646466b7b1020a396c5ae35f8ad test1/1381 0
-f3b63246422b5593c918b95067bb6a2dd082c7d474b224975fac3c374d02e179 test1/1382 0
-74c99218ac2b6db2885ff6300bbc817b844ccc1a6ba778e3b3ed633198d1c650 test1/1383 0
-e42e43e11a4c8e51b30e9800907e310c809ce171b1f0145c0a0f4dbdc9960700 test1/1384 0
-dadce04e7b7f47a5653550b9b3630abd5807d4e48746cbe3d2c4439ad014b6a1 test1/1385 0
-9beacad5c01b755d1a1f3d4509da9187ba9c42f3c4a917f701a29b4e1a68cb8d test1/1386 0
-4e43fb427a63723167c693fb7bca7cb67fa92f92981382e578ba1e583d52e6bf test1/1387 0
-be874d2f39a5128ca4e8b664cb2139f95205daa2fe858dc6b4e8d15abbbc2e4f test1/1388 0
-bb41fef6a05095fff1f2d494575b4a96d0c9fe69c5776aa1a5bf7d25a1c28404 test1/1389 0
-cfafcecba78aea9bd84d46a3eb11154ba4e06286f1190e872aeee8bd52ca904d test1/1390 0
-a1536cff37fe0305bce9ab70b7146be280dfb09af24555d3697b9ca2bf7bf175 test1/1391 0
-4d0d8fc3a0a6f824efa2ce91648b643332f899923ffc6cbb4c1225cad8bbd2bb test1/1392 0
-60ce8ffe04a3ccb5e23f4ed2e27c098d346eb90a09211c72e52bc23a9be5aee2 test1/1393 0
-9117ed7a3abd75762c92a01bd2e6c1b19973a435704d0438c3c52e80deb8d6a9 test1/1394 0
-a2fe6e26505e3523bdde1f1931a253e1edb6254f7f7fba5e6730ec91b554e920 test1/1395 0
-6cd6f7201d63c267c790df96a60165fc7756619950651294d3dffbafec9a24fe test1/1396 0
-0ce7e82df09956ad07c3636e147a6d2775f1a2630f01866e82bc961a461be89e test1/1397 0
-9986bbef9e4f2768b7fa3028b87d93e2a7111bf96d0c736e178b211fda5d68c8 test1/1398 0
-de6133a79491d7630c45f0d682e2ea85b2630f7c35d1ca85d8c55896543911c4 test1/1399 0
-6c62420136c4c03b090665397d6119890dd23971faeda9848c6622aa62231a2c test1/1400 0
-3fc45f865933e6a4be256992bf92cbaec801b4dcade31a614a4dbef94b3f214c test1/1401 0
-87b12d352c7cbc32c956a6254c3c6a61280e4d6db286088dbf08072f1c5b90ab test1/1402 0
-2c9f8c33f0177afa87ea71caa5f86b3d1f0f2e6e60bb4a16a3c2d97afd638040 test1/1403 0
-ec7dcead057aa19900f85e8dd8e8ec4305d089bfa7c8fe377bd3b4d1ef23279a test1/1404 0
-6b04b2c1ba7cdb7b043e04afd613a37be245d5ef4c2e90da73674c4c95308d2f test1/1405 0
-7c68da7e9ae283c65abd0bae4c90aebd34c3830bf34b8278dcd677824b6c1c67 test1/1406 0
-f52ba7be6ca7c0c6f401a7839b3ec91862f8b9649c96c95c5041563b978ff682 test1/1407 0
-02dd852f6aab102930bc1048628f6dc8214b999e2a9aa60f11240ae067b9f7e8 test1/1408 0
-69c2a39d95bcd3acdfea04381347f3ee5113851297731f859da11de83915f3b6 test1/1409 0
-7050d05826970ca688b1ae43f5398c636c19f7bd4d02a998602f32bc2e57af26 test1/1410 0
-a36745fa64ff56514cec6cf07d46e4de8ba1419288563afa7ac2a90924ab178e test1/1411 0
-f5f13dcef4f99599d3178de37a49bed28551fbbe1f9f60140d292784d9698a40 test1/1412 0
-bdfb31561a448d044b5e94730cec62399a600e8324a844e9b0f6a945f2ad4acb test1/1413 0
-18e1b8bd35403166ca0ba2b1c7c6ffe9b6ac6fb4d15dfa4d6200bc0d6a21d877 test1/1414 0
-acf4216add925cf2986d7333d68ac23c47818550d9b416cfa5947f0933d000e0 test1/1415 0
-7adf5d72833be1d8e0cd31ccfb3835386082a03c881b1212ff0ce765d1f888c0 test1/1416 0
-5fd1ef32b5bba5426c30347c40cc89a2b5ad3c6b28cbef99d7424cee2df156f1 test1/1417 0
-8e69f113d8a7f58a3075ac825eefcc4e84b8837d7d97449d36bed0a3882d4e9e test1/1418 0
-8cda60d4e29a44649b1b0ddbccb5af97d65c6f82db6ae4745e75fbb452004580 test1/1419 0
-ab7737b30ee65b6169b52e7a629deb922cc9593fbaecafcd210bbd408d20b41a test1/1420 0
-281bcfebc5b1055f98fea03905ba5b21b8e9c8b6f50443adc1e2c7ac30f832b4 test1/1421 0
-11555062f14686d17c4d4cb1d290a1700b6863b417722fcdaaa475eceb297e88 test1/1422 0
-1163d22e6b1a6c396dadfbbfdcc5ff50a194a2e6309e59c70e5367597fec8e9a test1/1423 0
-14e7f662b761e16d9d0e0ce306bd3e6b52198382fa7e376ed5f65dcd70eaf165 test1/1424 0
-456c635868a682cc473af5d24d1adc958955efe6b75601abe804f526ab76a425 test1/1425 0
-9af86888e3e5d463d30bbad54f8c2c2e2563ffe8c57a172d19ca6ce81321d587 test1/1426 0
-6eca17e24f9722c1af27c99318623a32678f7db870119a704bd998a6cd4ec0d0 test1/1427 0
-5f0991b5610dbf83796c007c9f866adbfccdeabd92b3b1a7faeb3dcc6dfa3275 test1/1428 0
-b1135318cd357c5b6bdc78dd5c0b0c0589e8e27c9c4522c226a70105d997b8b2 test1/1429 0
-bcb05aaf1236a7178e86425d99c761e04f72c6799067e45d9219150a3c701371 test1/1430 0
-dd02dbd11d589e98d10c87950abc06a918ad3cb6a8356b8672c5002609281b8c test1/1431 0
-e3402cb67955a3078e180269618b405d076a0e118249e30b5ea625133e8987aa test1/1432 0
-90bb60e6e7b741105a948df61bcc5c0fb02aea2e6f7582f55d7908d00af60be5 test1/1433 0
-1e3c676620fcb018825ea20b45399713e75867ac3e50b76c205e222f5a0f58af test1/1434 0
-5aad2fd5755d4e9d694e8ba6363cb43a728061f0b7c0984b6d92c10b9288ce2f test1/1435 0
-c5fc8cd229ffb08539dd3c0a5513da7cf20f60dfe67803eff2ffe9f92014ef0a test1/1436 0
-602a1e09014806ec648846074e85eb21046caa702a63cb9344355c3eff8d543f test1/1437 0
-29ba6a064865cd558c5fc358e4cc3568fa34728e4c881a3cbe935684b61f14ad test1/1438 0
-7b11d27cc2f62ae2c1d7d2de81d30c83f5ebcf3662960ad0917e694aa913b2de test1/1439 0
-01aebe2e8d0b21ce1a9217498cae20171907950f33136eb190872f760d51ceba test1/1440 0
-6ada5f02145ff6c3206e9c03b6afb6d248846956dc64e901fc316cdc49dd6fd3 test1/1441 0
-e023d395c6236a575208f05fc5d64f15014f721c0336b7ec8fe9ab462a544198 test1/1442 0
-0f0ee73cf515ef01b82c516a9ab7b2b6855c16110219924f0209ab9982f57b94 test1/1443 0
-03dfa088535cad316fe1834f6025c832fa26012df8732d6f466009164639c18a test1/1444 0
-2cbd96e243ba787cafc837cc82da90edba34094f881c3319e733508f488f8982 test1/1445 0
-8802cb9daea68309971ebe332cace9f39e25f9a55a5255b18b898b47fe433d07 test1/1446 0
-945787baf3373bde6cdff8136c2aeca9a354d9dbac394a8fdba1cb8123b25230 test1/1447 0
-26c412e9e94a657e8f56cee883ef6ba2c0f758fa9f0420d722b813e6bdd2e6c7 test1/1448 0
-58cce67f37244e11c98ff0fb44541f6a64d5a9cc329e3fef6e33a74f23520c4d test1/1449 0
-b0c936797fef6595f1b9e1261002bfe1cff27d05e4980b5710bf8f942f98bc5f test1/1450 0
-bf26018b664326884499037e7648e82f73c47910d5a18ca1543356dd909b489b test1/1451 0
-9bd1ef3f79eef85f8d99ef9d3c7a00a37d5981c714ab98c27b2eaca087fed3b1 test1/1452 0
-69aefe9c74e69fbdc21c854edb9ebfdaf19caf5833d13119fc4818fd77a7061f test1/1453 0
-3f5a42634eae022b18556d8d3f460e1636894958289b31b62936b6a72b594d97 test1/1454 0
-540ca613781221ee9041dc718e6bdb6f1b60d0b54d49b2a6ae42f72170f7a66a test1/1455 0
-5904508a526963ecce499e1ff137c2bd712bac6b454c70f42c1a2e5c543388e9 test1/1456 0
-ce8b0f3343da4fe445b929a948dfc0fb3df8e48d39a1bb484b0411a8c3e880b8 test1/1457 0
-c977b4429abd029bbba331142742a7cc6d2cbf3451894a106d3ffaaf56e2768d test1/1458 0
-53f15be7430d211fe7f3f35e219541f5442eae4bf67f29c55567787ab7731bbf test1/1459 0
-d35ec9d54e293bd1246d65730b9ba7912ac814f6f77be18346658402696b02c8 test1/1460 0
-9ecbc4dcaf3e077f1228adade47f04e46317e90b6e5610a3722be19d9d85fb02 test1/1461 0
-bdfe5540d8486018cbd35936d9e188da5ff08c0913b11a17844e3679b91a1a4b test1/1462 0
-136d27e959ba011ca211cc679338395c92aecb690a6b386bfe0ee76a1df3d56f test1/1463 0
-bcd33510b4d8996aeb7ffc40d6fdb53faa8be3f708ebfefda748beda34677df5 test1/1464 0
-c90ea4c267313b1c45ad44f5e1f4d80c1d9f2caa0df9fd51579329389b8347d8 test1/1465 0
-a12679792d7874ba3343eb3594b6274d06f696412bc5db50519fd594a1ac1c4c test1/1466 0
-dc5f76273304fef749167910d5cc3f851996b248bb41ecc0a51144ab95f96ffc test1/1467 0
-18ee8397e85336fd8833d7b58e0057034f730d07a8f07121466763f8cb21e105 test1/1468 0
-0f4fad077fb289d91f6ca7cf40421c66d41052007f06936433ce789dd8febb6e test1/1469 0
-ede748b6bc71a179cb235399ecb28f0065bfb3d74b1747776046c1539e9b6896 test1/1470 0
-d4210cd247c548e1efe4f7c70a050788252b9a74c5df3ad1e1ae60f1762f85a6 test1/1471 0
-f501f293cee58ff8d8392051e073b5700b3b7483657aef23f0c75a128868adfb test1/1472 0
-512019960965a1d6b8781af21b30e2d08bcc62d7b12c778c1496f28d4ee3bbb4 test1/1473 0
-b41178ea0333f28c220e0ae7bd85656654369ca8891987efe964902cae0c56e2 test1/1474 0
-d0c93e682226e3ff62ceb52814ea747e27c69e046383883ef2236bf866757528 test1/1475 0
-b0c3eb2625cd4c33ae55f7cccba2d8818f630fe704b2ecdd1e6751920416f380 test1/1476 0
-4541406f43dcec32c94af4591811fecff12d14fb4d1f11f23b6f078c276c8184 test1/1477 0
-71d2bc3d006bb66988cb822ceb146ecd630864f2e4a104f813be64befb69ca2e test1/1478 0
-426fbe4a71894366c45e8a0d106dc0d23ec37a2fa8d1fbcbaa4ebf44651228be test1/1479 0
-8d715d7542bf8cdec807f62ce9010590bf1527d191b2e68f84d6720554e605dc test1/1480 0
-5685e4b3da19781e25383096cf227fddff35e2fec0ff21e5aa2a9491edfa5bac test1/1481 0
-e89274db339230a9e83a3b1464804b04adacf93da07cddc7d15cbab1319981b4 test1/1482 0
-fcc8645e4202824ccaa9c4452d841fe19bdd176922623c5942b9bb32119293bc test1/1483 0
-ca1add897ae84f5c1c9c96cae585abfb96ae2c2d6bd44deb0d6113e964d3d510 test1/1484 0
-998b324d99fa8baa8743b6147cb73aefa609c36d5fea2ba108c61cc368c67242 test1/1485 0
-068001d5b5abe1dd3095cc261a4bb142da32d0f89dca452613b6759738e06e53 test1/1486 0
-779ff849f0fa73f29b59ae3d4f7095fb20c444f0494f7c7b74d687f904239e71 test1/1487 0
-3254278df1a864b0172cb92ef796b9ec2504c620d3679b55ff7bb16222370357 test1/1488 0
-79d13fd8b1032089bb37a26feff44e90295236e3d5d9f71f17b0f01bdc23a286 test1/1489 0
-4aad8ffcfe4a78cb8932708918e2028bd24a97e2b11345283223aa2ca7d52252 test1/1490 0
-2dff6b536d64442fbd51c8edb6854e4f4489adb6349fa28a5c9ba8e84146d2c8 test1/1491 0
-f3bc4a63d7b26e38bb26e08330a34fc765318aece3aa66b8563dffa79d7012c8 test1/1492 0
-9297a2760d83bd155ec4498a91a5cfb40183af6da3573c0e90eae4c602798749 test1/1493 0
-ea7f9b94714989834afdd1e0285bdb288742f3fe77be41d4ec5b30fc7a2644ae test1/1494 0
-7408f2022dd786223ef678db65f601420ce3604ee85d1cd5d6e19d4b20cdb0b3 test1/1495 0
-3e72ee614c4e708b398b0978e579b0f004c5f9fa2cc0bbd1d4208309903051a4 test1/1496 0
-d9eddf3875132d44232b02dca8e28784ca5519ff905ae128c7ddced99c7149d4 test1/1497 0
-8987907ce2a65f0d0345eee296f85ba48323e22abf8cb058d3bf7d0f5dfb0c84 test1/1498 0
-38d8b6281b191c84ac063f158ef089d5e480f78bcde4c36813b69bf6c5a1400d test1/1499 0
-622d04dea46480235c6acdb092b36d7c6d9451e3f6c3f7d5499b0b96894e36f0 test1/1500 0
-b6916996619db88b6964e673b02678db3c81485eea01d8e22636beb748bf0e4c test1/1501 0
-99ce920a47d5d774f0d2f6dad6d6fe515f17e2defdb510096a6d69cefb3e893a test1/1502 0
-19128ef11fa071eeb9155cbc7a14a3833090c9f56400d3375311602c749e034c test1/1503 0
-6117e3c9f44bf163381f8b6ff9a13b08302c68356d0005bdc62cb9de7c677d84 test1/1504 0
-d6937a5a6955e2be139e3c91da6e5463e10d817dd0a6ec72572b832fed96f69c test1/1505 0
-8705f93bb4b18c544607db6adc4c1d877025d067c8684a7e69cec8454a3b429f test1/1506 0
-1f3f5f326c8750735be0404945105f8b2334504365c4ce6712b08ce401a7f552 test1/1507 0
-f0312b47b0bb570c92d1ac22065feb50d809c78c576a94277b2647bae204ea6b test1/1508 0
-4a843257b4b50c97b71b6441834dc74ddf682992e828e12ba7907277ba1ebb56 test1/1509 0
-f9eedf69ea3256fe997c849865b3859edf8e9ead555e1933592b7d1cec4ba157 test1/1510 0
-3a579e75e30369510e7a584f9ff3c3ccffd2f30572d51589da8b4a7656a35f39 test1/1511 0
-9dc71b6f25b5e9c0fdb50bf347e3b3a5568ea978e4640db5dbdac9e36e601ca0 test1/1512 0
-5d9b2b5187f69072156a6cd7d85ce98c08c8aa75c96a703bac9e9d8e6562bb38 test1/1513 0
-a5888fde3138669220989506478faef1cf6ea53c68168d3917c361e96025bc02 test1/1514 0
-0c0d0438a75bb8a2f5fbae588b8f40ad79ddf10c25022c781518d932990d73f2 test1/1515 0
-d955b60d4a7cf354f0f4b3be71ab99745a8fd860d974c107c5b64ab7126567c9 test1/1516 0
-7fb3e5a656e8f7c24dc0dc8a647733abf84fe4d05ec47af88c53c3b9881c7b72 test1/1517 0
-4db702d52f0bc8c9375d65fa4fb92967599a2d1802918e3734cdaeb39dee90c4 test1/1518 0
-487c9309054167ca555e86b4d99b3ecd957abcca1237c6b52f025af2e7b649fd test1/1519 0
-8f820d7239a2678f699ae80882d61a625592dd6e9a069630d10ebf1ad4ebe9bb test1/1520 0
-3742024fe987034e575ba6fd901e4593c47958adda4f890269c9be186e645039 test1/1521 0
-0ba75a5ecf53e5a76df39c262f6ff5cff1578e7f07b64d9ee17bce9fdced6fcd test1/1522 0
-a321514668a64e300a2f032b29419fb8828d1bbc1ae6d0a63fd60701db507210 test1/1523 0
-b3d5a724537b05863e6502e2a29276222d4e8427357797acbbf25abebfbcc2e7 test1/1524 0
-41af5d7071977cce39ce05982589fdcb3398d4ffee9d224ec4133525feed6d2d test1/1525 0
-83e809c5cada104d0d65ba99593c1fd901081a514705fb4a2699f7428854e2c8 test1/1526 0
-151da1f3c6df6064839628bcdc5c90b1d47c052acd053eb8e22b4dc4ff671da0 test1/1527 0
-3e754e752a9fdf09af4fd6bc4296a9ff5b0ff02db4eb70646f3098d851d072f9 test1/1528 0
-b81a7b3fc16f2498e55b071c54813b0988613b386fd2c5e0ed6d5120c5ca4282 test1/1529 0
-fa3217072903a1b676e14625323a9c1f9a1f25843e31eefda19712bd13b898a5 test1/1530 0
-df87a7bb0943efbb8d46608fb45df542e0e8eba5edd65890beae9a55868bec72 test1/1531 0
-a273a4762df8a5900ca0d8484fafe4413b74c93435fe0acb32a7fa00cc68ff69 test1/1532 0
-c9315a336b279b679381c7869e71790c381f9c0eb45f796e1556b2b3225390c5 test1/1533 0
-7ce72fec86f49add434fc4da99dc73b12155ce81fbfdebfd1f6c3ed106291476 test1/1534 0
-3960eec027b59c540c6a505a76b8862f8586b133adb3b5c433a28a68f1ba6fdd test1/1535 0
-2f1b5d4ff84879613d92987b3a6b121d580f6863dd7a6a61a66ac6bb5ad0720f test1/1536 0
-2330a91b486fc9ff0f4ce2e8d9aa2b470754770284a057c12aa26d1fe716bfa0 test1/1537 0
-13c0e2e5b2fb74249d1b38daf9bc378b712c3190cd282e0849090239ed064ea7 test1/1538 0
-aa75d9393b86d99fb220750a8be3db214cc82be5688a7f5e38bdf0ba5d7936c8 test1/1539 0
-f08d212266799a07ef75795c85c2aed8d924d9b2828f11de52c1893512be343e test1/1540 0
-d99031e73d061597e0cf27c124ec8770fd8a414b34a81e18148df55faf1e5d60 test1/1541 0
-d5dad494fdfd09a5f48d7bf4bcead28eb237c1495d092b7f52b6bbfeebe6bc46 test1/1542 0
-17b0f14ae1df38c6fc76bd126d87f069da406055d418a71ecfdb3ea8442cadc0 test1/1543 0
-d15a95df1a1e435a8c448cae1b860226acda569d6f1e175eb6dbc135d5ae5938 test1/1544 0
-c1c26aacf8171a1463ad8bee6baa83ba062348345975ee9d879ef972c6918b37 test1/1545 0
-e42ceee121a24e851781f725bbf79f76869e41fbd14802321f6ff5cb1412b85a test1/1546 0
-1d825ab0076f6fa7bc330b4b899fc68d2e73741ee9e2e77604e1cbdf6295a978 test1/1547 0
-0365f5177dc3a6490f68d54c5c539cb3c22fcdda877440d1873792e88fcb81af test1/1548 0
-3f6409c40511e85ee2935a11d1f71bccab1ca0fa0a8d5152a483a2c4f2107034 test1/1549 0
-f1c12ba82b06505d1120be9cdf155ff9ac70ecac1e01fd9d8e875da78217c6ed test1/1550 0
-bfac55b229abf7f8c3704d0f9cd1e6db8477759d11aec2640733085779c1cb0b test1/1551 0
-e38f48c77d3f127469d9c3ba12598d6b6035eb44d15e09bafb0087dc223581e3 test1/1552 0
-7fef6f591338f0863ff9aa144c111ecebc1aec14c62eafe565441500dfbe0f6c test1/1553 0
-2ccb661b4ca94e0d730666e1b3c665d1e30de540bc67a0acf1ffda2e5389b8ec test1/1554 0
-670b3d12eb3d64452ba03250203fe6d1c0ed47db71492927832ef51a10839fd9 test1/1555 0
-262ef2248abf34936584d28d59230481eced03b06a54529d87e73519644cb6f8 test1/1556 0
-f0d4610cfa5d7eeb2b97a76232f6f65c85eb2804fa7797a90b535938268db996 test1/1557 0
-37a04f525cce7f0e5b6cf3ca7bfde05c1754e7da04c7dad8e7a9e446ba608d70 test1/1558 0
-bcb0601c9d3fdcfb6e83817d4fb96caf39d56bb5fce3f8e4601a10460ecfca6b test1/1559 0
-2b82b2647ce221f245f04cba9d0fa81794b3cae833f2970807fe2a49516895e6 test1/1560 0
-3567d1f098dccfd99dfa0470caf6dadc87865681db963dbffc2d8a8b47857345 test1/1561 0
-67de9c534dbce8d922b47036a55e21e583d93ef8fdeac010d22ad7b92a3ee1f8 test1/1562 0
-98ce671d260f0a993b9f5a34ffcf9e9aa563c5e3236a3fcac541efcea725306a test1/1563 0
-e30734c45e19015bbc76eb05fbc784c28e70e5c763c114f86f732625de8ca90a test1/1564 0
-239c94bf80a5d7cb3c8b3badeb488448477eea1cc039e1045ba3ce7172198dde test1/1565 0
-3e88718913c11211a2b79b98f3c948654b9be50394d56a1e7cbace3d3f07d568 test1/1566 0
-d54de1201519096cf0ee87efdf5c37fb896ded693a26daf6106f8d6c33cfc6df test1/1567 0
-87eb0e8854b675e928fa2e65952178ab6c6304d5c5d2a896d04b1464b9c94f8e test1/1568 0
-b352d21e43432048bbf52418aa9b795126eacacfb69edbffa653e71388cbd2cf test1/1569 0
-57cf870cebe8b22cd55371df0b189b5acfcadcb9a7bee839fcb589f6e5e01a39 test1/1570 0
-33fc7ef6f6d0e39cfd682f0929e08d6d8d4f9d01979476e4f9cd64abdcbc9706 test1/1571 0
-d99e1ed759b87ba326cc70630fc6b8d81fbf3a11cc2c7dd972df70bb91523b96 test1/1572 0
-1cc408c278f36468c3bc4b73aac60ea59254a3f27ff0c610ca1a7926473b6542 test1/1573 0
-921b5e3781b14b07dde258622f59c879b8687612c5029597feb5d9a265a7c096 test1/1574 0
-089b33d82e7448eaa2218448cfa6e32c54c5727dfc3affd944db938e93de6535 test1/1575 0
-ce014f585fac0edbf2473476fea36f1259b9b9b7308d2de814bb8d868266c301 test1/1576 0
-4683555d152eaddfaa95a9917e9c3f29d93cca7cc87f128132e8d138df505363 test1/1577 0
-ac9cb65718a14f1806a9e89574da850717bf9354c22788fa8f9562e42590386d test1/1578 0
-4d88f597c18cc13212f8ff74ccfa9ed04888909a1bf8d44c3d2924d3b3e89450 test1/1579 0
-e4da7de075068266d4625545f4798399c7cbc1b0ea16be79123f55b48972f8a4 test1/1580 0
-abedb0e5d3f2425d06fe883bb3a6fcbba0a41badc8b3b73e08658f1456706ff1 test1/1581 0
-9e92011e6c6b89a06d8da766b41aa5fac4a1219dcc19f917927fad99087e3c25 test1/1582 0
-565cfa6b844ad1e16917b3c24b1ab255f7038b902339d51c1e7bfe4c31603d27 test1/1583 0
-01cc5d2637e09d20ec8abe3658d74464a6b8a98ca89c4ebc02ffb3d1c4e734e7 test1/1584 0
-e5f8c8586aed7f19457688cd3c1e857e32c804f756f3821efe24883aa4086f0c test1/1585 0
-1449524ba745cc0a358f5075f0ef786142014782da597ff369f75a837f8ec8c7 test1/1586 0
-65a72fb3b572d849610c377eaccba6b57669c11b0d48de1ca5201c8723b1eb64 test1/1587 0
-ddfadf4156834973d5d2f8825e8e7f210e4579d77e07bcd5c77c40bfaa91b30a test1/1588 0
-b97a5eb597a3a77070ebe68cc89929776e1c21e64b13271f0029230f9d402b4b test1/1589 0
-98e536d112c7a98e17df7d66add0c0caf7bd5786835d6cb8ab2a9c02426f0817 test1/1590 0
-2e12a3cf000ed60473fe5fc0ffadaeb25a8b0443a3e4f5056f7cba38985288b6 test1/1591 0
-b8361ba1758fe5c0141fe957e1ca58e8585a2072c481ac6b36135085bcc1d6cb test1/1592 0
-a7cd0d4e946049e31c4624769414355c56da8a17a06e3535c0e876fc8c6d4b0f test1/1593 0
-985c55c37d001814b2bb127517e7d6c1781e46949eaa400c9dd7dcdb8c9ba97c test1/1594 0
-0c32fbfbd275c4d53c2bf269cf384cd628d8f6b395ebcb7b5f21485f1c1256cc test1/1595 0
-60241efee7b1e161f77b92e4079918b717b9f3b861184f9b4db64fe8201cf2d1 test1/1596 0
-68c384541151eb2c5463024001e7c5a4150bbf8281463993d6b426bc4927b2ed test1/1597 0
-66ab3f7c7de7b3042a935a4012b2e30ba9b4f90a7f49d318a340d1c0e71f12cc test1/1598 0
-abfd29f98d43115d15cd16b97307a15bd3bdf91c14e7e20caa412f3502e1756f test1/1599 0
-cb6c334375353db5dc403920ce2cdc644e74f373f6611b6afe8ffda247ff512c test1/1600 0
-db6a09e441da8d0527cc7001ebbb6148c74a130b2c5b5067341628d5e8c3d19d test1/1601 0
-abe4809a942979de7c80665f2c27744a9ee5da289d4dcc83db5bf09fa9a72fb3 test1/1602 0
-139e43bca5adc6b10bd75da693e9d42a99ee7dda63ee62719a67b7d3a9b09619 test1/1603 0
-5ff14439693077d11f32fc71499f8d8d19385d4f528861fe0bf1451e0f081494 test1/1604 0
-23770185f1d9e78e5b093eca40b3310b179013405902c680566e09d3bbc0e120 test1/1605 0
-5208ce48ba4fc76076ec100924581c502a29e33fa4dc9888bcb650e98c32874c test1/1606 0
-4d95762c10dac5cd0bba04f60c29467c6537b8bdabe1f76fc5e4559e3d2ae871 test1/1607 0
-bacfaa625296d491c23d9c8a3fba049e66e37c9e4370d3dff92909febbd30b42 test1/1608 0
-7a1d92b0499e128702ae7ded8a3bfa1e46ce5560c76eb49b365c4ce0d9525469 test1/1609 0
-fe0d257d493f0145b8963c2388855bdad766f91c6713a3e0c823da1b4b6dcfc2 test1/1610 0
-e72915a10e19487b42100e6a4ae770d64f2e67d1f4686bd47a94d0a2e9e7343b test1/1611 0
-76baa965d5a74d0c40c17141b51afd611b4b52855c89cf16f2e6fba2185a6f0b test1/1612 0
-943170d550884c313f1b6ecbfda16cd8fc9c3d5f922008a570291bd20e9ffa99 test1/1613 0
-583b89a1443a52f305d848b6ee57516fd973e8008af9c12c6bcc83c1891cb254 test1/1614 0
-3c929a0dbcab401bf26fe5fc7a85e07fef2ea92766c871ebe7fe87ed6ac21014 test1/1615 0
-0d09c844dbfa9a924e73537857c55316cc895a7b56c802354e7f6fc6263e1047 test1/1616 0
-7427f013c6ecdcc21a99b3df6d05fd42cab31f58363f95a2c1d7019f33d9ae4b test1/1617 0
-daacf0ae0a11455d5b500a8dc323bed6077a41359f37ce9482635b7ff5fb74b1 test1/1618 0
-b46880a4e54e2ec226ba93d7939d4672d90f8e951d60c460531e9ec7b830fffc test1/1619 0
-9a241937f120aa0d86e3e57e0d13ed4843e5d71c654244dd9ab43d6401819e77 test1/1620 0
-4d484ef31ae81169f04f1ce3000a0bb41a466d2e1094161883b0197c9bfc451b test1/1621 0
-0caf7d71319169eb4512fbdb72aa4dda028ae993d5e15717c421d1670160c885 test1/1622 0
-bd059632f7c8a52421aafa5cc772d1016a9f15ab58b6e4dae74ee0ac823cdccb test1/1623 0
-aa085285d0175fdbd166ccca03cc521a461a8e7e874439807c6356c2a13d1c96 test1/1624 0
-60c1d4d107c394c0ed652e741006fdcc8c43f7a22a2270f07cb81530422490f1 test1/1625 0
-d3c8368bbbdc42ffc8c6b67af12a81742daac1f7fe0bb2aac1937abfe802c0e6 test1/1626 0
-1d091cb3e929a37c454c3c2fa30302494991a9742de246dffa28a88dc3d61872 test1/1627 0
-b9abe62b0fd7418062f33ab48474cf70e6d5ee3d6b802c667678e60afec40910 test1/1628 0
-f60a419d63609953817f04a1e341599a1fd0d57576d48c032666e94871813eb5 test1/1629 0
-4af7b57669a832258f95a3ce2630d9c3cbec6a81c2328f80a8a48706c5824aa7 test1/1630 0
-4ea6c5fa2fdd7f1137c08b58b7b09dabafeaf36fad3f94237f5701c98fe45afc test1/1631 0
-636340964e7628d98c0105be9d3c4f08ec91ffedd6b67cdbde37e7178631ab26 test1/1632 0
-55e0f2c76306e08e3b70ded4686a35b3106527048bf2b6a71caeb7c5cd1a290b test1/1633 0
-ee1b5554916c39a7c9b16eb3438cac900d5b262bb11684bc3d794a2bf3273f45 test1/1634 0
-1eb18e8c7b26def3b2233c855f47ba89af6c4c736e80d3a045bb5d12be637fcd test1/1635 0
-1bfdc94863922c2345d91bba937d9506c2127fa776334a2a28115663d8c275fd test1/1636 0
-4aa478fd19ecee0716b9578592f3bb02d99e3c272081822c0f7368abe89ad8d1 test1/1637 0
-09c80c85aeb1b342d6cbaf8645ede00980ff97f8d09680d9e661b6770abeedea test1/1638 0
-7a3c149b5c467301020167168487afd799754530ede3a850f838ea8bd00f984e test1/1639 0
-d2060bfcbb126518d3cf842b28ca10b920dec0cac8c70140cced2248882eff8e test1/1640 0
-220ba2786abcd5c9633dbbd6cea54507b026b5142ee05d4bcb41809651a253ef test1/1641 0
-a1b6f6eaa75470b6b0e93db86f3c1df05a427f8cd98875578bdf27981a01b9bb test1/1642 0
-9686fd7b39082053552437e75b04feea8481c8567eeb8cbff85fdd1260acb9e5 test1/1643 0
-e386ffad5dc8a3d2c1c54841bee4f37d968b70adc5877b74b6cfe4a288873558 test1/1644 0
-a00d0c647f8fbfaf2d919a04854e1e7c250012d813fb9aa99a69027db16b0402 test1/1645 0
-1f187111097c6ee6effce1a61c75a9d656005746a450205951e7086736f8cd33 test1/1646 0
-393511d7d8840b1336e07edf8d74d900d606de93dbb7c946900b0db163feb917 test1/1647 0
-21ad507d0e7f8614aaac9dba5d0ff5b650dd08da345521d31204a9702eefb60d test1/1648 0
-a681f85f9f6758f82670400c558044a156d75e2336d66a691930ef0204b9e6de test1/1649 0
-67fd0e554cd7b717203a5cfd6d942d1247572e5d36a47aed639da3fe00d457eb test1/1650 0
-7414e43d10091795b7f573bd64ebc31c268f1df25f5b5bdeccfccfef2f2064a4 test1/1651 0
-1c114ecb52f88e25c5b58e835740f9bcb18b9fa27c3afa26887060264ff700b7 test1/1652 0
-e5168f6f327d905af63d7968d8d66803a0029a01e6eab161fba79d1faeb0919a test1/1653 0
-b90a9e1cd677f7317f063bbb2136a3d2300b7aa5f7ac7cb7d50a019256b4eca6 test1/1654 0
-a7cd4622a6fc324304588c3f38de5628ddda0d6d8ff1b1bacb82a808b3235b5e test1/1655 0
-4df7027d186cec3b4469c972fad005cddb1cae8a48da9cc5816dd3787636f864 test1/1656 0
-f2119867cae8a680050ce2d3ea66be5bdc565509bcb69640d5f6dc1750fb3224 test1/1657 0
-e2009f34b8ba9f8e18a08d8ccb5c6ff82d8fa72132ef4b2e2ac74807664577a2 test1/1658 0
-eb9e052ddaa32b548225752604dd4ed28ed0dd1949a00502a75a048661f285c0 test1/1659 0
-e044dc8224c211965e4ccee35cdbcb4b098c52e935281787fc8a287417134d5f test1/1660 0
-716d23c1ef01f8dc121fd4ae213b17d832c58b2e5c7d014ec05a7d4bb6f5fb9c test1/1661 0
-dc3f0a3247a8f7f072f5f6c2da9ad3a23b85d8aa876dd5d39255c750420dcd53 test1/1662 0
-0788f094ba19974f14de020962763d3b4ddb00cac8d67d11efe65603771fdc81 test1/1663 0
-41318fddb38506e023e3aec80f3d1b8309109d567d6bef5f213f221c270c8cdf test1/1664 0
-fe9dc317eab105b49e3e35a462244f89be18b5df2b887380cc9faa2b6883f5a7 test1/1665 0
-59fff1d1d25c18bcfd86e3bf5d641d9e4cddce495fe64cc57ed34f6144bd75e7 test1/1666 0
-5fd188bbbc3e33285e3b70858fa83ba68bf40d7e5261609c3735edd1832aa181 test1/1667 0
-880e24b2efe1457b49b956181920429c8bc17e6005cf557bf7902e20610d1ba5 test1/1668 0
-85a4cc35a3403d10d7944b4d6b1a41b2c69cf9ba8372fca5f69529ad2332480b test1/1669 0
-5dcd7a2019d2f450ec384c5b4d8bf5e1bc1a1531c2c5d42703f616604895fbf3 test1/1670 0
-ba8992bf8eeb4ad718e1ed4012860e1a18b74cf0942765e6f5b195e27355ad71 test1/1671 0
-451404f62cdcca2b972fd0f8bc37a209630d87b59b2f396b6bc0f9ea5816d51a test1/1672 0
-03e8ac391b30829384f385ada51b419211d6af89ee447f60549268a67377d4c4 test1/1673 0
-9168f335093dbc43e1bef65660cd29ea2c8cea4504cd8bbbf655e83e0f0cfa67 test1/1674 0
-0aae4343b0470dcda72804c8c1a4cf03d088e9d208588e2e8bcf1521f287bfa8 test1/1675 0
-a35b00daedf7ef0921b2ac908b211952c6ed6d0336b2184bc852fffea9b9e9da test1/1676 0
-accba70f1ff5d5d8d822e1a067d500c4a6816522e521dabf7c75d40d157b22ff test1/1677 0
-37a2f8b6ee33ef6062e11dae1cf7173d7faabbde3c5a0904b3ef71eec0a1643f test1/1678 0
-61448e86a4874966daf148bb0424e1b0b591fa2f38c581ca59a66c00de1c37b0 test1/1679 0
-11cfac369d72a0861050feeb62971149e431bb0f5e026defc5d64c88780db9ab test1/1680 0
-ca4a5d44b14825f4a51249c582077ee9052388b4d6e22ab5039191428931d116 test1/1681 0
-a823ee57fedc8855076d689fd8fce81b76884077c178de696957cb17d0179545 test1/1682 0
-c186939576a5d7871e906f9bd3193e11dab9c8773f4b72a8c2fbbca541679906 test1/1683 0
-7bf0744216b397c41ac277bafd34f1675427b20620b2de41f58ffc6cb27acf91 test1/1684 0
-1731b4888e3f8b0eac7291fdf2a323c567a8a41b902716202cf2c68351bae9ab test1/1685 0
-04996bb33fc49434059f40148028562823c9b12a5ecb1d2870cf211c554d5c38 test1/1686 0
-018278082d5770fa8cb06d8d02e7d5c4592e2b0903847e48e608e108e093d4ce test1/1687 0
-f3ee30ed1cfd382d20c5838c8fcbe263a5a32cdc960a1df78935245c9462a18a test1/1688 0
-127e6f23f3bdda60663738cc837d0f139933df1aa064952047ab600ec0f6a590 test1/1689 0
-873aca8aef9008461a7e509c7e4e959a3aa4deca0b1c039c74e46923d8761f9a test1/1690 0
-a9a267d145154dd66169076ec00a0bd978282e1820d3762e9e21dae00a275266 test1/1691 0
-385c64f232508ac3d182f0cdce610a124882077110088b9a22cb57c8487b7e82 test1/1692 0
-1b8be89cec76a755499c6e6194e0e2a72743d6828aa9b83fce4b654c37bf8b34 test1/1693 0
-73cefaa54ed9b82ebb1af904188d8461192e77a6243f7de65bbdc8bf3d723143 test1/1694 0
-9b3bd592d8dc287386c7cead6ec5a44719e5ec2ac5a593f41ad0735180cdffd1 test1/1695 0
-a8b1911f0e6ade4f2fc8f72d1f58c8b1dfbd7cd394ccc2fc154305411da8e9f3 test1/1696 0
-c637110da897c99313d0aab5f594a971f1629ece787820ee5f844569700c0d78 test1/1697 0
-3deadf5794e1ce5feaabeb8786dd38dad97d8f310dacfc4a1707b4c6df0b5f4c test1/1698 0
-168be638f278e612b1641da1a60d003a0aa1e6b006788e7fb2637456ccc3ce7c test1/1699 0
-2a60398078d442f6f0c08693a0cae0cf67c5690eb00af7d2aa4f11bfe6b4fe08 test1/1700 0
-18ae59b8487a0f2e5afee021a3394c4774c26745dccad9d050b732e26c041321 test1/1701 0
-8da942053e5ad23998c5c2d3bbc7511463f95095389176364c45c270651d1294 test1/1702 0
-a7c81ead490352a452c8fd849d1da1b293a746917dac77be54dc59bd674d0239 test1/1703 0
-f7e3fdba21909dc6c56b31c0d841f2f8b9aa57f569aead804e6f423a836a25d8 test1/1704 0
-006dbd18f0e432b64a486ee967925921febb2684368977e88edb77a0dc661218 test1/1705 0
-caf8c56a986242d715c71acb7f94c619a20aa2775d615e4c047b41d2e6460225 test1/1706 0
-1978426deebb038a4fdf0b6f8610e8af83ba4dde1fc781d0414a82e3aead2c9e test1/1707 0
-5b0daac1505d152cdb619e6abc2eacc048fd360684f356bb3ce46957d977cd25 test1/1708 0
-baaff8a7c3413e4dacc1f77b03646d768db3a1862932a8fa42f8ea2c38c551f8 test1/1709 0
-7fdd9a859eed901d8da350dce65845d5c235f64f6319cfae5c6121e92d2d4712 test1/1710 0
-af6f4c51d508652ee3f4e08be00aa2eb7a9ebe8873ec19b0888ef4c2830a110f test1/1711 0
-63da1db07035436ff1b12ade6bc69ce46ac49b23d7baa3c43304738e0d3a2e50 test1/1712 0
-85481baf544dfd97ea46d5210461e4ee0d9f0f5127537414f805e261c694e114 test1/1713 0
-cd3d13c9978756f52df6a57572f6f8bcaac61d376e41e933106ae7131507c9a9 test1/1714 0
-5adb8b07609d86744744ce919e3cc921df60f927645bb80d3fa3f3510c8eaaf7 test1/1715 0
-c4030c3ad50c958673905dbc647dbc85b609baa3df1888932b2b5956cb952b9e test1/1716 0
-3b3c53afe6b48044e60c7cd3e3560d8a10e6ff226e35fb9689bf74324f8f351c test1/1717 0
-b2867ede2bbbdc6be1eb06383a2db4f3bdd1b98fce7ecf7f1bc3500d3da36b54 test1/1718 0
-dbb7b94a73350c7affcf92c18c5299702d66401f00d0f3d52f28fe2915020473 test1/1719 0
-c7b46cc14547cf6be18328ff6bb955002cc8db7643adec6c66be061f12d97d44 test1/1720 0
-ea680e66f1bba697c4c9476d6041d5b59c3620ff0164d633fa47041ff953e556 test1/1721 0
-dceb25c04188a219bd59972c014838e6af7415a07ce2b6bc133b8944d379a62a test1/1722 0
-b596d01e0f011211e1631b3a5de96207256a8c4931d925d9ecc791e5775b7e85 test1/1723 0
-6d14f3bec907dfd3886cf3c7fa851b27cb92631731de3fc8c7654aa506508871 test1/1724 0
-2b3627a9fc869194be5ebbea6db7261c629332dd8779b4008e4a406a1e16842e test1/1725 0
-312fc04b033591dfca786f3e1b62463526cf67c8e3efc2423ad296721e7ffc2e test1/1726 0
-959c63ceacba1404642012dcd0bb7cbabce62d7cabfcaa8a271dfe7e6e265989 test1/1727 0
-7d1bb6abc515e0eb38b83395096a1dac0af28837967972cbc6f6df254b2c0874 test1/1728 0
-d492340ced2347a4b12f3e4afdcd88d2e66d78a0c71e45671175520e9dfae8a0 test1/1729 0
-3e4cbfdd8bc1bc43c0dc5cef12a773269e444072d8679651ff9b64e0c3e85217 test1/1730 0
-b0ea0d9290b0c8b8466f9b4bf1210d33a49be45b445a460b95faff77113c23a7 test1/1731 0
-5faf5c834d3a6ca5596e25a6156a3fc926a2ee79737918eabdc977d3573b4746 test1/1732 0
-1bd7a630be88e3fa42783cd1344af2f40db71e842cbb91f4ffbe43469a0c171d test1/1733 0
-400ddf0d1fcd437adbd29085044eebd8847d99ac1b1cd695eef2cda27b547137 test1/1734 0
-c847194f99f72a110b0d633025f626c5a7d9f3a00b2816a4e8ff49a556dbed87 test1/1735 0
-53dd844dad16122cb7aaafb0299d5ff943cbfbe80aa06e8dcfcd428b360c0dc1 test1/1736 0
-798af40fa0c811cab170117ebd50a9fc1ad0e528e6b1e67a66532492ef55a672 test1/1737 0
-0ef37dad64d0e30fd25f93653facab686f239faa798dbe63cd475a509c866c38 test1/1738 0
-9295c9faf3ad34a72a7a88999bdce1d83f538cc9b811632d95b1292e3b6bb547 test1/1739 0
-0f7e9c3b90452b1e85980a99466e012cfb9b469b216ee14acbe70c8e5a6a0c57 test1/1740 0
-5a9f8b30848b383bedd34c78494ce596bcf5d8384eaff2cfa236561b767a8df7 test1/1741 0
-ee318ab99c5e3ff2b359e4bca6039c9de6a48a688f1deb7d03e2d111422e82eb test1/1742 0
-5e02b251e1b0a7ca16745403af3184827ee5bb94b84fa8e8e6e1eda86feae89d test1/1743 0
-f710c8ba2a0ba1df936739031d3bd56044650a38318d857466be6d8255689372 test1/1744 0
-e0b35dfafedc4b4b6154dc850a11f2d835c4ab0c6f219c40ea6d35e1646341cb test1/1745 0
-e31a0743f81f5e664eba9be6e4015835686d8d012255dcf0692da51216aed6cc test1/1746 0
-5b7e0a1aabe91c4ac04e0353cbdab97361fb781e00d214c3d33cec99cb115cca test1/1747 0
-2817345a1b76d018b70f4a50dfe04f81a5a9594b12d571103fba0dc7160fad21 test1/1748 0
-7c8f1954402c1c2566149d1437583fe6750419bd157e2d4d94474f8823f9b907 test1/1749 0
-7e15e6f1b9b5ec5e05718f164e3bc799de6c0fe7975455245f5990886b4c58d9 test1/1750 0
-6498ce26a2820f4a5a16f8671550e4c0ba24329e35491ebcb8249fad418bc142 test1/1751 0
-d3345aa3700a8f19bfdf2093ac7edf8a26e64e20e66c82c92e4773cb75bd93c4 test1/1752 0
-55c3bd2e34e377b82719f77d6590bab35f8dcab59258dc038063eef4a35f219e test1/1753 0
-0a2b691a9459037454c9a50994a7031228ad81ba1dd67c6faf173d653a4d8dcc test1/1754 0
-c92e343c7dfde6d07109ecc8d43a3a245373902857756374f4aecf47478a1ac0 test1/1755 0
-acf5a0c838139f59abfc4e1b8327fe157dc6b805bd8f28af78d851214d9e7c87 test1/1756 0
-9499e9426bf6f23b47f87068e551e849776e58e398fa124817483098b5662004 test1/1757 0
-a0744d4a796bca19122484198e72ca90254556d485245a1b13cf037c8aaec73f test1/1758 0
-e2cc38d737018c2fdadc9e5f1436021ae03333a299e97b8e708cd9eee7c890a5 test1/1759 0
-c148412b5e2129d6a98e3ea6ca21f971ae69aa794ac64f9ab7883137c72cdd7b test1/1760 0
-40688b17747c3ecaa1a6d67aad36d11f9e4f534688085a93a18fd71649523ddc test1/1761 0
-dc915254fdf38899ee0fb0cd98b5b3f3c04e028aa353d0361ebc37ff235bc11d test1/1762 0
-011cc313966aa3ee60d00150dd7702749ac3df68c43d26088be4ca7b7e4441c5 test1/1763 0
-e3351966454bf531c421cf211e5e626938573ab8a8b3a164ce9a6cdd667c7e91 test1/1764 0
-8df331abb372357fd9f5d4dc8bea40deb931011d03ee611d2227ff3835269160 test1/1765 0
-0a405ba13b814e4d8362c0469a5885c97d51ecdf7fad04164d359a588cdf21f4 test1/1766 0
-8e472a1b76de2cd3ef899686457adca273ff3a80baac18dade5f23e04463a83e test1/1767 0
-fdabdc853017e55cad4154eeec883f3bfe98cc288169a5be76aaaf96bd812126 test1/1768 0
-9fdd8dde2a1e22b0de6a75cade85dafab0392c93d7db28846c3ccb6e5c5c9e65 test1/1769 0
-46a9b70512333fd332bb8f694abe9ae8f5824d950dfcbc89e1e426092ec54757 test1/1770 0
-7c0ccf0f2e15c1b743350a22c9ddaf53efdcadd84ef1ab99cddf745330ad9acb test1/1771 0
-1fa704c2e6c41073d9cba33d3ade412f0c2319ef3a2e7ef1a9e6fa09108bbc3e test1/1772 0
-8490b5657c7c4ac962d56ba153eba1d55d289b2cf3443a556b7dad10a1f668f5 test1/1773 0
-eaa9ebd6c151f6960882e46b5022bb9644b066462a4c5217d369f24ed5ecd1d7 test1/1774 0
-db62dfc4d4148da854c892ee5294d88801551ecfa48eebe57ee72acdc696a69e test1/1775 0
-915bd981091d14f6af045a25550dfd4543f1e681dcc23dd4bbe82d48b1b2b541 test1/1776 0
-d386a99ee8866ef2088e463e4c39ccf8a798e8babff5456ff235bbd7fdc5df25 test1/1777 0
-6bdf32d512b5d905dfed4cd7fe90965c0bcd2bb1d582142a11c30ac2b040613d test1/1778 0
-f91a848a596d4e8d5c870c4c883c2c9ac8b8f44e202f16068ad42c864290e7e2 test1/1779 0
-107b537e2ddb997ee856fd848a6f40e85e7f8ade6ee185a22a5874d8021c288f test1/1780 0
-0ad8cf10347fe4e336a9a7d3615c61e274147623119e86e89bf35bc226247591 test1/1781 0
-c6b05fcdaf2a08d9a613c1945ad999961803941b0303f69dbdd194b28e3f48da test1/1782 0
-5ff5c64d2e7838975a6286b6661fca10c9e7be3e57ade2f4092a2aff06e9bbb4 test1/1783 0
-e7b092cc69ff886211be2f7c4e74b187d01fd4adec83f9badeee4b1316d7e5ca test1/1784 0
-3ae26e5a5274d913dcfaf4a501058e77040cbc1dbb91f3a88e3a4ea8ccc01f08 test1/1785 0
-0c805732d438defa2cd9450487e9c50281ac2f9d9e7b51606db6640e55f21586 test1/1786 0
-4fdac23245a70b3ffdfe5c3254e0a494915477b4a186b46eef8bac0c00d19f84 test1/1787 0
-7f971ce928efe54a13d8ae989eaeb089ee98d737049c03919788aa37abd11220 test1/1788 0
-3d49026cb395d3e212da704baa47f57c2d3ffd0e3dad681ea4e8d4170bf31b37 test1/1789 0
-848c1b89ffb894221ae27d2cc9d9ccab0a418ebf0ce19692b1ffd2b51d01f43c test1/1790 0
-ee9182d28ea4424939b52ede15bb15f189bd5ae9b5792423e9be917adfe9070b test1/1791 0
-770181dfd5e63fde6c2b1a4ee98a08825d13db36048972fb2741b16a5a2c9e45 test1/1792 0
-ca6cdcb34ed014a86d93d707470121a2dd89a348da166286f23533d838cf2a63 test1/1793 0
-406055ca35b41dc31bdd17129590fd7dd370b9cc106a43e5828da55d79dbac92 test1/1794 0
-e1e9be25543cbcd3ddaa5f16024feff1bf09c0a823ca60a9eefb76421088b511 test1/1795 0
-0b0de5dca7f0b0016e80a79206d2622a78b310b03f4e64bcf1376c2967a38776 test1/1796 0
-9c6fee8c8653dd42830075910b9d4289d488c00358e58de3c6f04ccd171d18a2 test1/1797 0
-5fb7ac3cc64385b9cd6fa602062fed79af7e3c2f5ba3e74b1b8712772e6e0e6c test1/1798 0
-e6f5e22747d409930d1818e31642ca6773d7452c82f6f47823101649fe30a712 test1/1799 0
-d922438b5adeab789caca2b5858a2a797a0deb3573075ec943f8938f3cd6c002 test1/1800 0
-11762fd5f2ee2558079b46914a8e873b9945189f231a56ad747962000dcdb225 test1/1801 0
-ea280696340f302c56ed9702d1595b8eda863c44a5c8ef46604e5daffb3d0ace test1/1802 0
-c7d85965d50fc7a1d013ad351e6a33a73bbeaec66ee2fcd69cd2d521162fe970 test1/1803 0
-6a50b51f186fcae16cc6a336bd8c9b95bdf2f8e1b05b1d65ea70f1316ae620ab test1/1804 0
-73249c56b803ac0976662ca8d7ab828239b561d4ecb2a5a941565f4b0177ab84 test1/1805 0
-b3bcc0f9244cb9ba882607494907f7e7fbb2f8820a0a25503af28ae1c2d4cfde test1/1806 0
-ffd626b4cc58acce777b3b128cda304c56beb90ab69aa85d60f0e03ff44f85a5 test1/1807 0
-b864668455a5fc33bf2e6e4743fa6b3e9867674e5a7486fb96ae2696f9538cd4 test1/1808 0
-860769a0f2fd42825f22f199d2a8617473e940bbb489b11623438e425e8fbf4e test1/1809 0
-90d6659643be3242b3e7a88d546e68ebf2630d23cbcaf43910e01c23a83e0946 test1/1810 0
-70ff59f4186660718adf4a471fdcab5d5fe5e3e0d618220d9b5a999b8018d4e8 test1/1811 0
-a3537162218c1b8efc217fd5edd570711e826216b74b9b458907c5d3bd33bfaa test1/1812 0
-316b6ae00b1dc0af2a92c35c518b1ec0d32f34dff0091c3c6aaafdc89339bdad test1/1813 0
-cf03248b382f0ac64aac5e2bb2e32a2c2cbee18460372ad36e19709e4fae4681 test1/1814 0
-98c589a919f685d8f4829d2af75bdf61fd2c8e6cb92dcd3e0ea852b56c2da2c2 test1/1815 0
-32e85fb867d4c641d97c28c84785a07f6216891225883eeec892885064add33e test1/1816 0
-e1aea112346004842a81bb282b82ed4609225a3492999282e137f4025d8d8a6c test1/1817 0
-0b029db449c09099929b361704e3ac53de0adaba2d20085f1fca97061b6f1f95 test1/1818 0
-c840d188705e90fdabe018c1fa4ca079ba8daea34e9853597180540811f76151 test1/1819 0
-ab82be415f13f9f388b0ec4307427ab70bb413e9e798e431203eadfaa6287220 test1/1820 0
-6710b4839844ba927cfee7f7ec896f5027e88bb605377d56aa941ced244ef67f test1/1821 0
-6a2a9a1f777bb194171a1de84d7fdb2573df85b1a3b58de03c8970b70042c660 test1/1822 0
-ba9f33e682ae2e7ac497151a473090b6f8a66eaa22e92efe6a627ed638ba6cc3 test1/1823 0
-95b01ff0affec4f4632c96677287e1bd86a20e7555c35ece1cdcc21df5664cbb test1/1824 0
-b0f76fbfc7bdd50cc7ffb3c477f13e24edaf5177b5549946d1bc048e3cccc213 test1/1825 0
-c0489af5afb94e1207a866e6c5592808711f384b70fbe6338b3a8edf53c19c74 test1/1826 0
-085f7b773659955705e7936f445ad5b123d6c0d07c96dee83184cd4027c641c1 test1/1827 0
-9e863a0f8617f99d6df1701bd96348bbf57d12b6d2f254c02b307ff149330dc1 test1/1828 0
-6963cc4657aa6b62de097e43fbc8f0f98c0af8a8ef4c2e01580e565bcedb97dc test1/1829 0
-a3339af0285ae0c1648479498a2e6785cc6aee69a912aa38ec48a2df3305d062 test1/1830 0
-ed6c90dac7eb6aac30014bf2d11aa7e1e2ea51f9bff3d8227a9c9a4d3855cd7b test1/1831 0
-2439628ff13fc41f0b21973baaba3c92f84cafa64868400420a98939d670aa13 test1/1832 0
-9a2e1c84c8a4b036367fca42b87c23ed9ac269c3cc69d231a1f66112836e5765 test1/1833 0
-67fa1576105cb6728c2fb66b07a7522392708ef662ac50ebb4d9e8ae3dd7ab85 test1/1834 0
-633fa5fec0b6c448a6f72d0b0f8017a5b5940b808067dd8acf4c2fd78205de03 test1/1835 0
-cf0a58d71bef9551e9841f1caa6d4ee8d7eda7acb76851fb7f9d6aedb771f6cb test1/1836 0
-5e5509cfdae6752bb6e7ebff75f51c4f90746e7b4256d831bd2c548dfa380ed1 test1/1837 0
-392fd1f84e3641b377a53c0db7c5f797c721614f9d297f26104f9a08570c67f0 test1/1838 0
-c80eed196a253b6ffcd4117c9c79b0d571081f4855a7d102b888ccb5335f2183 test1/1839 0
-a4fbddf46d24a23104593111ed47b0512332deb5e6b4f36a69f5af94d3bb14a2 test1/1840 0
-30104508b7e6464ff626e31394a8e5d56f99f600f3376ae7148b400ffcf70960 test1/1841 0
-f918e27b858d87811094672f7ccf365e72052d345326f3358c7dd4b956f59b38 test1/1842 0
-02fff5b78e6c0a178077741a7a111e8af49f582eb50c37e3915ac7978d60041d test1/1843 0
-60a070b92783c4f1091f14db86ce51da318a79a6fe30469983729b646d469487 test1/1844 0
-3f5e1c65b247ce172cba3c924ee878cd2f7b2831d25f05daab4a8e6eef9bef8d test1/1845 0
-a5d066e10fab2b9d6091750c9dccea2d86a0fc4f055ecff5dac6be143335c56c test1/1846 0
-e3e042421c99ac8fae1ae3c79f5d17565f143279f896aafe0800700741aa2b17 test1/1847 0
-df997cbf56be3d0c0d53a2e547b7e5b05fd71e01867695f987c38b17c3cb9927 test1/1848 0
-ff9613d278bcce680d6da0d9cd87c5f1f7f38c7f4666aa616e2bd4a65ff99c39 test1/1849 0
-10d9f19d1b67d52b2fe1a35ad05d195dd2d62c4343bf2d2c70f0b7acfe7f532b test1/1850 0
-e815c1fe8252767af9ac8e48e3ae4016908f16c4cbc669266e449450941f30aa test1/1851 0
-ca48f4388f5f300fdfd42b35453ad87b6347f2a85a881c33d07b106605516b8e test1/1852 0
-95ed75df3e2bc0405231d1b84371170a1c2b43dc8294ab1ace74c4a7bf4bf357 test1/1853 0
-0900b8acb7c8ce4662bf51bba4d03b49df8b97e42ebcb65cf46100e0bda4782a test1/1854 0
-4c6113aa2cb5a6a7adc5b9150411f880521fa304ed16c88f2c97faac7be2c72f test1/1855 0
-0df2d101648e585876d447dc81bfb6d02672eae18bbcb394308fa831e863120a test1/1856 0
-a7760b7181cfd85bd55b77906abbdeec53849230b23b528f5a982a892e59df07 test1/1857 0
-400e4a3cea49cc89b72a2ef3b470ee607d4b149f31cd368eef3bf1eab0813167 test1/1858 0
-566ed1d095dc23008849fa93fbd5cbaea69946b708f18d50981d6497d8737591 test1/1859 0
-e71329e2d418ab6551fec562bcfba2bdf4e8e22c4dbb701d7e9168a0d52e071d test1/1860 0
-be36ffce5f0670ac24319fa3add05e47e00c3dc9ef93373d89850241aafaab21 test1/1861 0
-3e6ba1cbf9ab12b33121ca72cbd1e07528550394793b44a3a2ced458f1c95f10 test1/1862 0
-39d192884aa159a9c0aa400d89c51b0ae1c2bb53f83a7685ff96665fdf91083f test1/1863 0
-c36e4485648860f8b31d8c861901777cbb3e36e255b4814a652e5cbf755403b0 test1/1864 0
-36292819d91aa93ea92bd1b957772fc53bbbb620249e2e1eba2e591d5245014f test1/1865 0
-5c47414c698e16ff2baef28fb115ab819438a47e5bfaca284bcdc1c54a8b2641 test1/1866 0
-4770fe870ff9893b78f0e4db0fe937cf3800152708371fc4dd7b7ab575645b63 test1/1867 0
-3d7399c06f611d3ff6fd49f8dbb9da600ffa249ebe6423389b331ab9438b275a test1/1868 0
-908d863a3650e2580f98a625f7281d8767cd3b24bee7e7b71ad372dc8cf42301 test1/1869 0
-ad5a12001662eda98c6eb02792a393fea12829b9851f67a5f3b630e06f33a52a test1/1870 0
-cdabe686334c5a332b69bf281494f75d7ea1ce3c21804edb0b30b2b6e86d378b test1/1871 0
-807b74519a0bfe60614a477b93516e8f7db723fbe6377481f2d10d746bac23c7 test1/1872 0
-8b38195087326c8aa3a259249683f0aabccf769e0971d8af4575c2599e2bd924 test1/1873 0
-7271d4b9c9e47337315fd46c24b14418b0ae615d01e13a7d0cbafac365045100 test1/1874 0
-6f73c55a0f601f9495cb09b3b9fdc23176aefbea07ebf41d47fb848cf7a293da test1/1875 0
-af24b6f2e09951d00b3f212e81352ee8035e40634dccf080c5fd9858a181b482 test1/1876 0
-8f7fe7d7154a0ee526636bb27c69d60fc18d79e5d0b27ba00c74ddd6868afb86 test1/1877 0
-88e9c1bfc6e9cb228a7cda4e4f44e9a240f743afabe5489bfe34061d4ce7690a test1/1878 0
-2153f7d554ded0028063992dc62c5f10b63916cba1b421a5938c1a0997bc15d1 test1/1879 0
-4d0615556a29086c77c36fc8271f1e7778f5a3fd65c35790ebc3245998dc4e8e test1/1880 0
-93c5d5fc7bda4d7b11edb52380df7c328b388ac208b29cf8a61c9282093b7ac8 test1/1881 0
-8dfbb4610825bd84309f83aeb81d8c159843c5d100a79ae336c370761c31eda5 test1/1882 0
-7efcc45344734b78c1060a8fddb55ed63601ec782798e134d64bb36b9606a2ef test1/1883 0
-6c66448384f1af5daca44d19d5d330f200ec907cf4a2cbe1eb1392351a264558 test1/1884 0
-91d22848dcc40f12b2fbb15f60ab61e243f9bc8f7d68d9a698d39c240d855f0d test1/1885 0
-82a9439ad7fb158041acabd81c90b005404863f4d9ffe41a6d73e47a74d413b2 test1/1886 0
-7745fa52555d2879848b239e5b3abbd5df4c231507e45ba6a5d23d971285e232 test1/1887 0
-5cb19c71e7b69a4c486485c845f81cbe023a5fc21d48e675db739490c4096c78 test1/1888 0
-b031ef79c9102012f6d9feae9ab9715bd09debd1b3a04e8a3daed96d9fe716e7 test1/1889 0
-b59df949fabd329d638a4168ce8595140202c012dfaf2e862f478eb955e57cb1 test1/1890 0
-c69a39fcef3eb421a4028bfae7e7ce11756faf03d8cb97e0382e1fec0d16b4ed test1/1891 0
-55b4aa58006a47f9e2069e29f75c6458b01cad651c066edb419bd884120fbf97 test1/1892 0
-2f655d0e8030dc7077e4f34e7b8f8a23257ddda919efaff1d3a176f1f7c5ba7a test1/1893 0
-c78b2317981511bb3ea1d3eeff48871c358d869ed13a916ab90ca0260e415891 test1/1894 0
-2c1906380980df071bd06e7330ecaec55389fa528bbe2487a0b601712f737545 test1/1895 0
-1de685bb5a12aebf9c9cf79198a6c534ef9ea26ed464828e5622215f83a7520e test1/1896 0
-a848d2806882a7dcec34a213b8d195090009006ab39af1d73c153eed8c6ada2c test1/1897 0
-115f3efb9913e9538e20d2b36d6aed0588787cd2d0dd678cc0ab4213d3834d5f test1/1898 0
-caa58407d52ae83ab52c72b50946f804aed504088d96b36bf8a33bae6d1d5cfb test1/1899 0
-b95b795c4cac492542e16f2da12abaf9f5ac3b99535037a71897ccc6c03a5d5c test1/1900 0
-c49b870d8d55096b08483be6cae1f22ab06a8ad93f8824bd110470d49546eb99 test1/1901 0
-13b80a7439d6c482f38350ffe541e31271ae1db7c71dba0592aebe102986ffe4 test1/1902 0
-819c4ed5083bdf390894d44e368da36d26b1f305b71a6798651c21cda80afb00 test1/1903 0
-a6f60c79053b14aaf6c24e7c3c1d4571a8b99e4f7a40f5d874889851ddf9de0b test1/1904 0
-6994f1eb45af8e1afabc1c627db9d42d8ad1e002559c4305b47cc08aa9c32679 test1/1905 0
-76f783f59b951e642287c02b52aaf005e28ab05a5fd1082d192195a3c94d35b9 test1/1906 0
-0297019dbfd5d7ad1ee286b0dc5fdea19bd61210962527e0ab5d4ac59667d3f0 test1/1907 0
-513dac8e5fb5fdeed7a4e43b72d67ce0e9b9445f25f61e0d32bd8e56b137784d test1/1908 0
-f5fa5219b3ae1df5c196e25d00145e5dffc789f59c615960f38045641b920c8c test1/1909 0
-2305bdefb0e7ff37df7086d34401952186ce0404bb294b28cf00981806a0045e test1/1910 0
-9dcf6129032d5485ec277a710edde4ae374bd2be871d46d13a80a4ca9a878630 test1/1911 0
-569f85e0a7be04b7fb6d6fb5fe88c3e1b90d90fc16c0c0afc6d70e62dcd1eca0 test1/1912 0
-4a77599d5933f7fcc54fc36e8caac7228672d369552600a7268f6f44e7aabe5c test1/1913 0
-f7df9c2a03ee2ea5e78278453bbd2fc8f8bb388d482733baf6f62267f38c2440 test1/1914 0
-05bc3c621a2188ae0f57996511d338f6919c8e6375f4950dd1e5300b64bcb773 test1/1915 0
-49bba5a373bb5ff17455067e6260cdd6820734e9d0dd7a81e4c5406445af6ad7 test1/1916 0
-3f0a485789e8e65ff537e80d36fd010d0b7f532d8fc3dc56536fc4bd249c609a test1/1917 0
-8b97d47d3067893f2209850d89a60efc1793aaf6b63091553ab79c41ca1fcea2 test1/1918 0
-d220251c702d159a46132fa41c86e4197dc929066d309aff3316eef432fcf8c3 test1/1919 0
-84f30b76b6cdabbf45227c07f939a75070dabda421f2baa886e791592f201777 test1/1920 0
-f97cfc1435760cb2611f880d87b271106f419da0fc0b47d0dfd5872bb4dd2d7c test1/1921 0
-13df1eb6a712131a4ddfc7af37283cd007dfa75238e4c6875e7a567d5853ca9e test1/1922 0
-71c30b8c88b83b47918ea56ab9130e82acde49975046a424df7e994fcfcc1845 test1/1923 0
-a1bd9d56eee1f8d0b95897887131d5f54f6e903fcce3c6364caeb5bfe9a43b38 test1/1924 0
-01cfc16b4a04351460899ead11f869735271a2d4a7b4c85a298874820da17e17 test1/1925 0
-0e086756472db45a9c106422aa04cd893c85119d0f01128122a68c349aceb395 test1/1926 0
-5e07a20ac2ec1ca5d50fa2cb6d9abd015099bf4d211c495c048262f6c6b19600 test1/1927 0
-3858d01d6cbe033b6c6de39852c86c5bccbe87153c089487b9fd999cd2c3230e test1/1928 0
-bbf3bf192445e84e8a6a5c1d91f8904bac08b538a90e6ec7b85f6bb1065378f2 test1/1929 0
-d72f0249c28363f15cbdb10beba4a4a377d91e930a94f44c322cc45f3c854c2c test1/1930 0
-d08c30ee6b2f02801bef86105827ece7f521a1d49418568cb30e81ae8970cfee test1/1931 0
-c7be71fb15d6711cf8e8f0f1dbdd32e5941376a9fbc06882da6b7ec40df33d4b test1/1932 0
-d933c3ac6ad8db8fef31ff7b90fb140fa8a950f3df9c7d9c7d2717f72cf029fa test1/1933 0
-ef91320d95a5644658a24303bd57d711139c9433a565cb6c5da8055dd8971fc4 test1/1934 0
-680175f24597a27d756db751172ae7daf69a4fb8d7f1f118fcfda0c393c669a3 test1/1935 0
-753835c6a59d416bbf3664d66217cd175e2fdb0901a92289993bb429b1b02e78 test1/1936 0
-c03b01b7bb189726a304901b0c9c86027dbcdc3aad5104934edc22868c3d5343 test1/1937 0
-803a419c881708dce55bc4bd31d9e6f480a94f5f9eebed08d9c793ba7837a03f test1/1938 0
-b166405c2d3d69820c7fcf1d34fb59b371dba78599552a7d9985e1a5705b35f1 test1/1939 0
-a161fbb87410ed647555b7ac47049165b89d41d1479751af8b8f8be0f583fb23 test1/1940 0
-87f7498c84b51aad72f237b95cb0e9bd49f0b983250e1121614d20ba531e8b5b test1/1941 0
-0d1b972a0c9a66d641e020f1551f57be91afa9c811a15244efeaaca268dde0be test1/1942 0
-a55ade630ee6c2c592a8f4c3f38b0b0abfc657b12e4d9a99af8a0e38990824dd test1/1943 0
-cd292ce487ef5829569e7f71aaded18e332dd7de06099a68e9b41ab9ef5caa2d test1/1944 0
-0b43e52771a6b84ee22aad948644d7f7838c4c6aa0521046058b59185d773f99 test1/1945 0
-bbd90b1028ec6c8c6cd1ceb0e3e75ed921a1bf84c971b7f889734cc9e5af210c test1/1946 0
-38d22451c228e223d25a700e94730d93854cd0d95395d040ab1028caf9c3ed2c test1/1947 0
-71f2ad1d07f111602f72284138fbc841da243b92975e6ece0cbe999a40e6d825 test1/1948 0
-7a3daee1064f8b8fc8a6126914be7975bcddbb09753d61cfe41649fea7bf2b47 test1/1949 0
-c5c21423cbb894f7e5f572ad4827fae968b541d4712c47d6ff84acb6458caf8b test1/1950 0
-0aa4b5b23d25d1b21afa3f185fa73f52ce79e71c916d9200b62be2433cf926a8 test1/1951 0
-1f053fcc43f4fe514a5db03c9a821a9fe4a6e004299f4b8f3ca605520a52df40 test1/1952 0
-84454f0ed2e6b49604aaeb145b4068d33183e27c2fb8463be9871b11f8060a30 test1/1953 0
-2071b54900c0098b88e1b20568e4b52208314da841f50fdf26b8eafcf501301b test1/1954 0
-86f65d76cb3a393f2d1f4361034d11a5cbd202a56688b73616458b9c9670747a test1/1955 0
-7c995e508648936db3acec21af13b4f716413f7aa8bfe21ecb7123e2f4132f58 test1/1956 0
-37dfd08c3f35816064408b05159fa9e8bd2aa5fb4030ae86eb5f7a068872a35e test1/1957 0
-98ee2d54a4f369d82ad1555eb029ce96ce4628243d18546346533d4a55e1ab06 test1/1958 0
-a6f484740fff25b1e7c1220e9240b72c0968db66af8b63a1fdd47dd36d92b94a test1/1959 0
-fa7434563798c59b5bddfe7f8375a030bcb30e447c25a7ba63000980af22f7cf test1/1960 0
-5fad70246ec35f9adc246a84c90ccc8fe468b3c490ca9ca847019e7a853cac7a test1/1961 0
-cd52e4492653813feaa68704c058513e433e8aa957d49e0f933822627ad36c81 test1/1962 0
-4f3fb8097dcbd5bc614dabe0aa1169b1943a6274a8daf8a9a62c657b64b5c003 test1/1963 0
-d627eb06b1fc4a8007081fb06fa329223b02ebf05270cb576c1b32616aa455af test1/1964 0
-c0fb48a0340b89315e8f52265d10a072fb5f8e5886e4346ffe31699e6f9f3d5e test1/1965 0
-4f47d5a31ae6c2da29d3d69cfe1ce061da7434e6e69d0a350b598093a05b6265 test1/1966 0
-2b1a6164deefc223b3c1cbef79245ddf81d9d73b19c871f45f8605cbba8fa707 test1/1967 0
-398f13325f1abaef5e2bea70583724316e0342d829b8028c51f9d925bbf814a7 test1/1968 0
-012f7a3338301a4c32ba16a56122a4a7d9473ea6214937dae39022892908d053 test1/1969 0
-124566776a2ee2484789f619fc17ecf630d19eec412f393307779092ce726f76 test1/1970 0
-0918825cc50466f4572dae1919a092492e99f1b846473ebce4df892d6da2031e test1/1971 0
-8e524a089dc087fdd5d0d28ff5115a203c53d7623d1c50075d766a815e51d1c1 test1/1972 0
-e859cf693cd7bc3229adf026f429ee1e170f3d73034f0ad6eae8d51ca678236f test1/1973 0
-32ac3db65f54bff58c481b27beabf7f74385013fd8c7081894ec67c71d7d626c test1/1974 0
-8b85d0cdddf593a32dd7d442bce7ddd1c2774b60b8d76da915f3ae4dd1d76653 test1/1975 0
-f40a6c8d3a77053a96497c48ab643bdbdcb53fd86da7e13ceb8d0826fd7fd2e5 test1/1976 0
-25e29e6c780033dc8953dd27700fe7bbfaf60bb688367452408dacb0ad6c477c test1/1977 0
-5cd3e31ab534200aeab66d599bc5cf71950495ff742047d8e3012d5df6f919dc test1/1978 0
-ab05427353806c3ab929b9572574bb73cd9ba774d8ee80e2c31992cb435c89b3 test1/1979 0
-037727960fde144246c9f40ab20aa9cf677d10bd04ce643b68e6ca01c10a998c test1/1980 0
-23b7b646e41d7aeb0b909ae5d438d28edcc0d05b21b143b6cb43f5bab19e4961 test1/1981 0
-a969dcd2139397ee8946f3ed00b8a5ba7e9aa3b60725e599a6b8938c4a9394af test1/1982 0
-f345f0417cb8b7bf2b120d4b3a8231d92b637f90e846170271af705a9593c4cb test1/1983 0
-1254a67e10fa8aa5eeb3b0f1e973e320edf9d30e63315c53326ed28cd6610e4f test1/1984 0
-0d48c13ec2a2070084408bc2fdfd1e2a920a11d273a08bda48d74c1d124c40ba test1/1985 0
-9366a05f5e05aa80dd2a78f4a3a1a7df1982a00580fbb8893d783251facac8c0 test1/1986 0
-fd5f0184e0792d74b72e079275c9cba4f4881ef7ae8b17ed08460888cedf8c1c test1/1987 0
-c5f161361d01553dbd23b4f49426b4d5ba4aee47ece4bfb4645760d5af07b86b test1/1988 0
-e4596e54bf858024186a5dd383f3e4eb4920f770157908b5a3a1627299bbc2a2 test1/1989 0
-6608587dd6bf3ad7d6bd9fece08ac4be72ab8a863f4d165c4bfe4c09f4f36e08 test1/1990 0
-9f0363de671184a46a1d9bdfcc04e447c67697f8f366eda50259524abe6888d5 test1/1991 0
-aeb1cb4d0d8c8b9a063f40d10a013833881df671a4d2d3839ec072efa7b75510 test1/1992 0
-b37257bedfb10384baa661a4f126f256de5e366c2bd84787b987b9cee2a23985 test1/1993 0
-3788f5a13703a76d52337ffd75022146ad294859ecc88352ad7695d06dae0027 test1/1994 0
-08c3a981d432519786101dda8f7df65591c456eb8f7fc8636b3039186635b4d0 test1/1995 0
-a4f84f443fb3e0336b4b7e96084acde330cfa4ecd33834bfbd7205d04bfbae33 test1/1996 0
-290b5d500c91f9f489f0662a4bdbd387e9cd3c338216726a8284017f706ebe36 test1/1997 0
-d02337d3b1b3cd36fdf63914fb427a7d91ea94b68e7aee42a156170afa45b8ed test1/1998 0
-aae69e8788220e992e1cdd13a72862472ead396cddbb18fee49b22517d4c163c test1/1999 0
-f2fc5089c757507d650546f117eedb612d2408e633d434825ff74a95a0cafbcc test1/2000 0
-a57ea3973b67d08670859ae529f590fd99513dacdf34ed86590ebd7ae7e8a4be test1/2001 0
-fc06ba818dbe3a5061983e6e66a418895ee4cd206c85735adf27fb01128fe5cd test1/2002 0
-e0684cce45e93b0e7e36bfe060bd01c054b8b5be12337363d3090a1a9565014d test1/2003 0
-724555b3893127728677d2e1753c426bc547ed774df9a68a69417477fdf9a291 test1/2004 0
-465956043c792faa0d21677d70f3a4e04862f591bc0afd1a0742b93a4c527ef3 test1/2005 0
-415d75d051741b6e032323903fd45539d4ee4321dc6c79d7b62fa434e3d5ffba test1/2006 0
-dbdfa1c846ebc8c3e5bd3aaffd963140f4b192d19d287032dc79c003ef91e591 test1/2007 0
-978e1cb47429e8a245c8204d3da98b3ee76200331d23b6b04caeabee37e916c8 test1/2008 0
-b02e7dd1d6f5d4c406f4f87c9a995cfd14779c31c9b197303b003cfbd7bdae77 test1/2009 0
-987af0c9e135933eefd5e10725ea630d3d4aab181b1b97499077a34723fe1e40 test1/2010 0
-99deba53e323a3e4643aeee95870e2da3aeca8b89837aab514f138f0fd4ff08a test1/2011 0
-5116ee74929926814f398120b493a8f69bc351e18bfae4871bad4ec3bca65d32 test1/2012 0
-9f8b98c468f1e957caebe2806fb35f24d0a01988045ad024600b0b77fd535a31 test1/2013 0
-da99fbbd6ff521089e44eb76f1b99b3808306aacbe07653ad44a88a894cf90f0 test1/2014 0
-02560213f5240778ec277aab22bac23752e2aa242060e3192da0ec7b141e63d8 test1/2015 0
-772949abfec305bbc3290549b98358d3c34ed529d993801512977dbf74e2a67d test1/2016 0
-8c3c21d95deb4afdad151804d5eb1d06455ad51aa633b8857c80fecd8a4bbae7 test1/2017 0
-25bda60c9ccbd06a89356d53557508012ae0d96ac19662e62efa55342a110371 test1/2018 0
-2149544454de08bcd62d9a12b1575d39eb1cee1599c0e6943acdb64f07edfee0 test1/2019 0
-9753e14b414ac1976cbbcadd7dbacd77c9da56695456e48471741a4f67b3c1f8 test1/2020 0
-27dc711615c46afee606b5861996703ad082d22882a22537a6db8f8073e9eec5 test1/2021 0
-3baf6e83bbbab8d125ecc79b3460ddf8cb33e8589d32ea37267e50a295e65106 test1/2022 0
-aee2f214346f89433c759fae8d1fdc67c861d931c1a708bb579800986dcb6970 test1/2023 0
-8e54a04f35a410dd214003330f74df5e95281c636f555c1463d4e22b28f11bec test1/2024 0
-9201b18ce1ee4b323687103736632d422e1254375711c3f0e0389d30c17a866d test1/2025 0
-51cf056d140571ed707f6514741ea4c5077cae4b6d046bbf8919b29c9845bdf8 test1/2026 0
-6ef6e1562657d3a7a6cecdcb553a1d5669a6d90623ac70eeebb4ad1b8a22fc6a test1/2027 0
-fc2d720380f0524ddacd1607d49627f443d6b234fb2d6175e476dbd327074b2d test1/2028 0
-556a47b24cf78cc8f41c1c03ba09f15b8eb825b44c38929d98f0e46f691b7f23 test1/2029 0
-f3f8b03880691bcb075a2d29dd748dcc5a384a70dcd311065e8b55184b05dcb6 test1/2030 0
-555b1eb99a6fe75f065c9ddc91994e04508dbda5411ca8fac8eb423aa20a9557 test1/2031 0
-de159829e1ac9acb048632bcf7546d0b50de43039cd34d06d3417d466002f4e4 test1/2032 0
-c4fb9f254dadfe86156f051ca5d80f07d9a9fefdaf4e88b88315b870fec40c63 test1/2033 0
-7aeea18670b28723e8c5cc9ba5880aceeb04952e6be1df1c44dc8d0f72393a1c test1/2034 0
-7b5f139b5dc3a86956d25b30223ae6516c839dcbdd3fad747a422318ec39141b test1/2035 0
-df76051a5286d177f0cf760d2f5d973e3381e36bbf9e7940c508d434a964a105 test1/2036 0
-f86cd0a901a8cb5468ae01809998d0fa7bd9e9991429778036ffa3b2553ea2f2 test1/2037 0
-1bec861e07303b91edc686696613a4c12da7340a468230a87f5f624f523ec6ab test1/2038 0
-12000566ee1337447c296be57a103dea87e92910b8e4b845b0d2db825c3d6d1f test1/2039 0
-3084abc6a27afa80ab818b562321b817651c8051783b2bb0fda9114aba335883 test1/2040 0
-0e3686f0aa5cc15215da0a7b174393099289ef9528a41b07c95224e78e25c909 test1/2041 0
-af50cca50f833f732b6ff737136c950934177c0f6f9e5dab69506e4740c7b67b test1/2042 0
-912342d10f814e3f7f6411682dffa3fb3000d9ebe7511b988235f8e5821f3617 test1/2043 0
-faf624f64253ab43dd8c6921d7773cf7432dabd487a07d36eadcd75dc9cd3133 test1/2044 0
-c9811c2627c57a2ae418ed603f06d741b5500c9da04893c1c3c6b2a3629edc9b test1/2045 0
-93dc877933fa6a0e93600d2b73598d3caf596a0e52aa32fecf195fc879ff58ac test1/2046 0
-396aad060b3f97256e25819384e40899b5b182130dc6da08e4466e8e8c974947 test1/2047 0
-caf27d9f8b2a5ecd5e6511485430273a3bbeb2cf9ab2c3c8f0488cb1868d60aa test1/2048 0
-574b6220c843c313f5fe432c3d98f9025ba5a142c332abe26386c1e474a3eb37 test1/2049 0
-4f635941b761683e89bbc1651e63941e55a42c52ee243fa8911638d07c091c54 test1/2050 0
-5c93f5d672434468b91ab8a3d391bfbaf67987212831913e7d1d46be73a9be83 test1/2051 0
-9769916e2ce3463c297d011b7e4e04b326993d22568b585276cba1f1fa0c637e test1/2052 0
-70f60d99cc3d96a2977f69c8ad3f39604c8bd9fc2c266ed9cbedbb0faf8592ca test1/2053 0
-78052633c014e593c30856f46ce4a6fea3aa286572424214128221e7163d732f test1/2054 0
-58ccd30f7f8a26414f1db7bceee8365ed93c357b5e059e7612313c20167b080d test1/2055 0
-6f49d7a1f9c77f5607cc9d7f6c8e8535c10c404a1dd656d091428cc3f7e84a7d test1/2056 0
-8812d6fc4e9b45ec991febfe6b1be990583ad283e2160dcd2a80ef2528b2f56e test1/2057 0
-c6645400d65b0858bcf35590c5d37cd5003268d4319dc36f74d6179352d845af test1/2058 0
-3cafcbb656c9f93c1e8b49a194773ce2041a9a829e9556e02ef16d6f2e6252d9 test1/2059 0
-46aced58f1fae864be1b78c85a9c4692e4b56e46234d4aab8664679453b5962d test1/2060 0
-ff544e916891c9a7ad615c07df789458994fd841565ab326461b4e49e18f8531 test1/2061 0
-e581c1ef07c47dc70919de4f9481a1997a011df9da90cd78d78c678db813de13 test1/2062 0
-294e2fca9806b7d981fcbea4ddf4f16f4f51fdd138920a590447f2221f8906a6 test1/2063 0
-d70e7df1624cd8c84e7503a73d8191061a11bc89d712212a6fff3ea963a6f9b2 test1/2064 0
-974013f5f2eddcf5507c410500a6cd30eea8348326853daca5b5ab49937974e6 test1/2065 0
-25da8a81c1038009114152814cf04857b02da3771e0f3a8d87aee11d5382e4b9 test1/2066 0
-75bed8ecbad90265a3343f41746d342e9d3c52be4ed3c3f7b8c19539a4004ba1 test1/2067 0
-8d0d89fa8482be67902a260e14136eff8b3ac0d2968b295b36d2aa6d313833a8 test1/2068 0
-9face09f7684988a539a6b88fbe3ca868c9f3591f016283d3000bfe88d8aaf64 test1/2069 0
-fa879cec350bd7f8d5ca31812f6536927509cd92ce725cbf5114b726756c90f5 test1/2070 0
-0080a2d31e5464ecbd8842b342257bc1f1c75563bc47687f76f3023ebf6d6f56 test1/2071 0
-ac7cdcd6345ee144ad43301e0a0d9f25e63d9aeff0f943086ae135c0476df159 test1/2072 0
-ed662d8d814b4e9af09cd76c55a5e47b1c793d3bc5f1067c0050658168b15ce0 test1/2073 0
-ceea8ba1b359cd06543860307410eb2e3801185ef3d5b735a9976193a04414fa test1/2074 0
-a35ac8c5c3913a7f701f1f69ac8ecd13db33f5ed2d36ad3473bbf4d6ab35e621 test1/2075 0
-4acc15fc63e6991ac4a117070d5d2945ad1273d277e8380452fd794b88e4ec8b test1/2076 0
-a805785b91ed490e04e4436e938d54e7dd176a93a8e1c7e77144956e4899bba2 test1/2077 0
-09753734262bab88fd2b807ff9db14df53109ca5c2ded7b63a8e371d311cb828 test1/2078 0
-d11103a0a012bb2208d4b33e12bdcdff6164f035226ea057404fd81580c580fa test1/2079 0
-68c04bbba402020a7d8df090bdb6fcab2819e0ed21d070156ae2ab875d8e4372 test1/2080 0
-7d8ec113fe6bdbb576c1ea54623738ae2282b3be871be5f53bc1ff1bd802fc71 test1/2081 0
-b9daca4a5c2fc1bc791fbc7578de29f11be72c1283649c004c8cc0a19637332f test1/2082 0
-73e59d2b0035972946dd0083efd1b454aeae61173ff3aef92c9b4bb75e33e70b test1/2083 0
-6ad2013612422e84ad329ff42f5e3717b3b36ae2354055eb6f4c09364d6389a1 test1/2084 0
-20c7816c7c852d404cb669744b4e989e65b74af4a0fddb1ad573fab6d5b01fda test1/2085 0
-c72a8d561b6f54aac1680789ecb4034cf8ee18cfbfea87cf105503a8290b363f test1/2086 0
-fab1bb3aac1c4429932a95848285168e287545f071cafc80152cfd0664b13c64 test1/2087 0
-bca32dfbcee94c5f8fc724f9638a75f875235aa483c9e1a37cb981537e2d9a0e test1/2088 0
-2d2d4cead21931a0f9ccd0894cbfeb3461176291c57a34b75ca6459a96bac7e1 test1/2089 0
-9ffeba58cd126e0c3792d643e55292806ce1a70ba349baa336909cd31c122252 test1/2090 0
-792e72453f844b6cddfc9f5b1d30b048422d8d54429250a055aa02d5edc14a76 test1/2091 0
-f4c47edd4f19d89a34e058db36ea04d118dcff90ccdaa7a14accbedc37c15cf1 test1/2092 0
-5c33b7f8bfca2eeee2f988ad647adf4968f1ffbf639bb1de45c40d82bb6011b2 test1/2093 0
-04e80541df8e06207792131cc984f3627a9e37b92147de6dac88a2591fe4395b test1/2094 0
-95f1f4aee65a072277dd41bfbc6c1c531c7ad0dbb037681b3c60fc240708b404 test1/2095 0
-85b83849126f4bdf71fcd3f32c7e3c63ff2e028f2201b028efb7a1adb0758e7d test1/2096 0
-3cfa8d39871b79ef29867e35175cf2468e9ffdcf9538bd15c6f8cbffc76d265d test1/2097 0
-7ca5e19f620eef087ed2bf7bd18ee5f7c2f3a477a5ace130768c1eee0eb777ae test1/2098 0
-8590d87a7bf2d503700f072c881a0df66d914cef6b4f1a528dcf45cd90721eea test1/2099 0
-324d92d3aac8ea302772332e1138d41b205ad8e9408837a7b9295074e0738c37 test1/2100 0
-081fd9e6d4d84665f6fff53656fe17605b99658abd9a985e9a607ee8decf2779 test1/2101 0
-73f60d8606108b0ea8c32fa08f008599d875928fc5d75c32d5d9b1c80ba79c56 test1/2102 0
-2a72013ff4ff6f8dee885c3ab9941f6d65b2cc06ca3f6e06311163d4284e7fc7 test1/2103 0
-6e52936a24c78badf112d1a9ca8eb271649353d42da0662742051d4b5ef7b82e test1/2104 0
-edffa69054c35eff12ea354ae22c08421991d2915a45a316fc99e3c7a2e57bdb test1/2105 0
-82c1d12949cf62d1d2a41263e78ca1cc5939f38d693030479abe7f4b68498650 test1/2106 0
-7b20bf608434df1dcb352c3cd227e8ea81129e50824ea9bba80c4c65b19b42b3 test1/2107 0
-faf187af2ea97c156d8c0a82ea50f368a6567442993452855854a3f0af79ab81 test1/2108 0
-0da217bbfbac2048d245a176fcbaef0be92cee302bbe30a7374b43f733a69e30 test1/2109 0
-7f8872e5527dbc802aa0b5f3634b01cf21aa51f6a8fe9dec9b992d707e19359a test1/2110 0
-59503c8328d67e5bf3e54a4bab001e469b9bebd5e904997d23b5466c066f863a test1/2111 0
-59ccc13132e01f8bf0f28ccfc9bc378d3045fc04e72a5a4354ccb4bf6f0c4ccb test1/2112 0
-c79bcc882c9c41f3c6eb1d46ae8581c7c5dd4a629c64a625351c82381c42ccf9 test1/2113 0
-e393cbef25857a01396140bde495a9f6e4475a29c2be0a75ffcda7ecc8126a67 test1/2114 0
-4243991930bf0e57a257fe26c1525f7d7b230eb473d461937f87c2c9d6b2e74c test1/2115 0
-d80ca696d8976e6bc1189ce940f3d6b08d2267b07f12c39dcf5e561557c761be test1/2116 0
-1b258395256e658af89ffc02b8e8dedfa254b371723638b8e0191b575b626187 test1/2117 0
-2b0077045f83707c57eca029a6e837c4ae8febe2905f2d1708756bb8347f2025 test1/2118 0
-669c9d3dcb6fc699025cad5fbb2e223be7b7cbaa47b5e48eea7fa684b77817fd test1/2119 0
-789c7aa0a0c65acf980c234a63495764035affbe9d95ccea4f4431ceb74f426a test1/2120 0
-0318a5eff2295cfbd961fcbf40efed14ec33db73e94389e44bbd14b98b33db5d test1/2121 0
-ddd79486248bb4b7877bba59b88231da2d6dd15cc3c0926712fbe2e3245b975e test1/2122 0
-0fd41f87b83585542c3fa40f9ad924929311e46ac79e2819e9e9a92538fb19c8 test1/2123 0
-08cdf08b96a508663c2a8884a2081546184ea04c6ae7aaec788fcba62e051e23 test1/2124 0
-0f5740d8206ee2c138eb953c480d92afae885c0b53c1d7910eefdfba851f133c test1/2125 0
-22487321e277e3cd88024260b2d66ea299ee912e581b24ce95ec37b3eb1415ec test1/2126 0
-bea4fa7c1ff5a9f9065fdf0ca5390741caf20e65f94b68a920626cde896979c1 test1/2127 0
-c0d8e47887cf3de55d432e2c69c052caf5fa5c43cee6e4f7805a3895a4ca3ba2 test1/2128 0
-f2f4db7b5ae658302d5660d7c79e3dbacfc66bff591064f5310e93f2b8a48490 test1/2129 0
-f4d04d4ca4467cf972fad0daac890d7b7bcc1d07d2622789c73ac4345daae4ad test1/2130 0
-c724458f80a7277123ca2a0503dee5cf83674888ae49bc9faad1deb9c6a9bf25 test1/2131 0
-f4f8589d0fc80e93611b9585b3b4c01b3068f91af704fffd0334d1ad80033c8d test1/2132 0
-f0da71301558e05567f6e34a5c4c958b71c97dd42774a3307c7f658290476bab test1/2133 0
-b06126a1af8d5069796d63c3b676f93aed00328090615d13cb85e2e778ae12d5 test1/2134 0
-394b9ebc191cb1aea0ec39aeb89cfe2d5fb9b4b95d8e5c95aef88556244816b3 test1/2135 0
-db033c9abfacb61f865a5dc1176dab01611a3ff25da67f559fa42f86e436ca5a test1/2136 0
-e24b35b6de35c1d637f4516d158a0ce71a80155da843befa0f57983646055f47 test1/2137 0
-d11a904c37eabb4a8dd137d427fb02413b45ea159cb43d46af20b68bbc835324 test1/2138 0
-b3234a01665a0fb74ef51c75b06961e02ba144cb4cda4f3e596023dac024c3af test1/2139 0
-360838526e1805b991c0eadc958725397c8eb14a00a30572241d4d33d6266c23 test1/2140 0
-7eb653f896e16d8f305faaf69a6931ca247e5e4f5d2d2c4ea2fc53e60ce6fd65 test1/2141 0
-6383f1ad0b124b2badd895f57e6fc8d9abec80569ebec2520fbdf4768cc0d831 test1/2142 0
-315c04e83cffd42367559e9df7afb6469f9766ec8b76c127f75465b7341160f3 test1/2143 0
-2aa2092e154502fa193bc31b1155dbc84baab5d96d8ad1754ccc62ecb02a36c9 test1/2144 0
-6ec1a9209cd9294aacab90ec3d3eab12182571ddd317d55237f5396484cc053e test1/2145 0
-d3c19b76b10c0a7da077a409ad6f77b097ca819d606ed4ad53e44e9ebcd26825 test1/2146 0
-e6942d180966f814a074a3ac54655c04c236ede67f7f89db1ee8dc6153cd0762 test1/2147 0
-85e7c06031973289383389759a0f5c0da36b49e95ea30d74de995ea67982a9a1 test1/2148 0
-82a766d7132ed98ee86dc851b0f613bbb31fbc121c5b97f17b5924cf904c9b87 test1/2149 0
-04ed017f3a83e0f8105dc8115a280e6cfdef67810e4c1bed9e876688c2dfbd6c test1/2150 0
-b5cc432d3160aefb23a87c7b188d07fdf47cc83a8cebe12807111924d542f831 test1/2151 0
-76549b98fe9cf87340aedac605397994d3f25b285df236c09810e17e9b233b22 test1/2152 0
-5b1bb1028bc7e35ba03b810c58e28d5edffcef165c6ad999e910e95edcf7806a test1/2153 0
-2de7956039012303cd0967a79456c5f1765eddaf9aa2aed88afe7a798958f91a test1/2154 0
-3bd48a943a8d2704ff20a3ca0ed51f1b141fb38284027b890b819440a9f5a04d test1/2155 0
-a8ab62dd72c8888ee50c733c09b4fb2fdbc1abbd028e751ffa506739aaa0d072 test1/2156 0
-d20666a320810a890dbeab10fd1074049209e1a749b08e7655eeadaab3028ec7 test1/2157 0
-ed7fd00850d41dfb22aa24fb5ac1b56a3f3ba231393a9f51b0be49c0f3a38500 test1/2158 0
-ec036eed64897a217aeb4f395e1927b6c9b3ce64a6cbc8f5e8bc45b01e7cac00 test1/2159 0
-c275c8d704364300b083f152cea8852532bd543a23be8149175cf347c2fb6fd2 test1/2160 0
-2c09070a35af89637bcd5c5fc9b5bc2189a89c9d91dbc63a0a457968df52083e test1/2161 0
-c861f68d23e660c1cbcb93ed82b8baf9ec9fad118c97c376309b37c0098268be test1/2162 0
-489e11496c865a395c72a880f7725ecb64b2dc9e9c03c1540d3f08aec0785400 test1/2163 0
-ea9ef3fa28ef27c1d027e6e44ad1d90cf6db99e157126b3f63c7ea83d0ba116c test1/2164 0
-58658b3251a4762f976bb7e0689dfeb877cfa8d09d6e806e0be726b788459abe test1/2165 0
-9fca02fa463fad70b41421150591134fba909e7bb1a3c231b49604461c629a19 test1/2166 0
-7caf125719b93e5d8da83187e1d708e7d899f48b41e293c3f0f0174e9b1f6960 test1/2167 0
-96becad6a1eb038404b77f35723611fbe6922c44d5613d0ed4cfde27c8c6b5de test1/2168 0
-1776bb421a59345bb64da6487606abb1d59bab511b89beeb420c8f88b9ec5a05 test1/2169 0
-3c05a706627e06d14bba52832d488ad32b57effa5ad0b671a11834af0569d480 test1/2170 0
-6088f546ce3cc22b9821cafae8a734ae82ac7b6850a59d8130b1538a133808eb test1/2171 0
-866da6798244c9cff3bc57102efac7d7d718eafb27ddfe1426b3eb19e9628c39 test1/2172 0
-3f7cd6ea845bf30f115b45612c2872b2b8b31ab88e7374a4a70effd7596a00ce test1/2173 0
-a35ea33ffd76dc5aa14a60617d57c1b9b790fa2310626e7e600006cd4a73a2fc test1/2174 0
-c0156417c12977af7851fcd620f6d254c0049b80996ce8aa6d0181f481e5a91c test1/2175 0
-8c12a0f360205d8b22c757c790fc94eca3cb591dcad5df8d652fc34d30f483d7 test1/2176 0
-d905c4a755cff0ae63de516c21dfd75425d34131c21bee984b97b14167da1fd6 test1/2177 0
-68ff55690bf216977f48867969e76f864b698a78ee7b3291d914db50a43fec0c test1/2178 0
-acf1ead7dfe1daa0f5dc378fd9ce826f87d9cf86ab37e62c9d7221f06b7946a5 test1/2179 0
-36ceadaac2a27e39d587d31772279256a1b151020b45832b9eb08ef0e6a1fee3 test1/2180 0
-3f3fd6ff065766b9d209df1ac2f7572cd18a7251b83eeb316f26659bc07ae668 test1/2181 0
-e7d480669048fbbfaf960aa04ee35729dbf991560ffcc982bb283656c6f8cc3e test1/2182 0
-a00130d8bb296089d2e149bfde846a16c04dcf5acc39f9b38ba33c62ecc1d7c7 test1/2183 0
-461e5474dd217c08207fcf2df16a7eb7713c2b0fcc22a75185e0607924ec81ce test1/2184 0
-de89b13084eb1ef620a48a467bb0337b0efe20d7dd6eecc629cff1dc4e5fc596 test1/2185 0
-e29ef8e4c5e18fd2453bda0e3635291e3e612febcdc57dbe138e31d6b44c7ea9 test1/2186 0
-62674c4f26be0f37825246a00f7e07b53657ad9403613ce445755f8928b9259e test1/2187 0
-b7bfee4a0aac049a3e06c2e608b8e5940c649da03f0f312563908953eac5333c test1/2188 0
-0a0e0b95504205e33879d3a873e63b5dc592af6cb8bbb558ec976769ec1d0636 test1/2189 0
-e200b81649e98cd63c78ca9f65dbc02206f4fcd7631fbbcba0b38bfb5b1f21e8 test1/2190 0
-fabe0e2a31fc38fa5cb7d980cae9605044fb5a2f98f9147f003785808e1a6d3c test1/2191 0
-9891e0ae0aaf3c4de7bce58d0510765eb210f8ded5963bb213bd7316756e80b3 test1/2192 0
-f20c72b5c859215fde4cf7e5843a32770a010d4b0030fba108867fce06be7ab0 test1/2193 0
-6d3422048f653bbda50f04dc2136d58a2c979bcf6712cfb7c6867390b400656a test1/2194 0
-4de489f5a822767a296ace3cc0fd130166bab3c9d01c247be3751b1ba787ecf6 test1/2195 0
-cb37148b56ed468ce464032b4989a7f9d66317d68871b74ca3b94c87ed3fd82b test1/2196 0
-9dee5dc891803545e6c3b062d64062421f410a8a1939beaca7997a228f561cb8 test1/2197 0
-b76345d2e877cd95c45aa02769b5fa41e9272355f4f1208882ffcd99bf6d4460 test1/2198 0
-fb88123fcf04f0c70fc765dcf88168ca222513ab1256c7c0d39ec13b35c15966 test1/2199 0
-dbe2e3bdf666f6193b38a2fd892aa2f23122f840e8eec20b65d2ccd75da43b95 test1/2200 0
-3ee28ae073112dd4f510c759e7427143d7a0b780a48767b1ec204890f397100d test1/2201 0
-e900536b4cbd4ee7be965976229a53f87046d447e1bb6502c6d76319d6b1bfbb test1/2202 0
-5f64f9ed8d3c960742049e7ae15dfaa7ec14b6f6c9b3bb1cde2a7ebcacb5ce36 test1/2203 0
-6bcd87e5f17bc2041abf0d1c757eaa1b5aa82c179cae580051f8e56a177c2327 test1/2204 0
-c4f52442f71576754fcf2479a5fc02d34a2588f9a07ed1d9ae35e34dfdf9ac8a test1/2205 0
-d93ab242a2e2b899e43bb37fb6b249fd2392b237e3926e1f04a5b6e186c297ee test1/2206 0
-414e1de8ae21765691a7206893222e718daa5c9eb066c00c03bb6bcf2dcbf768 test1/2207 0
-6390be28c5ab8cb3b72285f407cf25fccd573435d06c777eaf36a39b20cd99ea test1/2208 0
-1d2048f4bf8b800dd281bfc824731fc21d6e628b06fef22e178f908d40603526 test1/2209 0
-6c87236949d181076af920f3f2f4aef6fb1f41d30bed8dc9484676d244de1f86 test1/2210 0
-a018ac3b6e398c0ddfb532c809f538bdad61c06f6d15ab5955bea04a826dd1ca test1/2211 0
-6b2885193e15bb5bedbb331304b7b1ccb63bba76b624a9d31f4d7a2058eefbf6 test1/2212 0
-71be9c1a635be1de654393d78488942dc1f495a629075122933b3d52a6998b93 test1/2213 0
-e26fe0db4a9bc8fc2ca52d1165b1ac606bb4f2b65a8397b3efb2e7eccf0fb7f8 test1/2214 0
-82902e276c127f20d92e3a572ef60489f8d8b3613c5c6375d1c1bb71ec92de26 test1/2215 0
-81fb777852c4148a34e4c25036f5265a583175dc2f4671e93a8240e4f2cb2efc test1/2216 0
-f4e07cc26a1fc35f001cd6a60a5a29081e062f64da947b25bd8abf842ef2390a test1/2217 0
-0603f6eab57e3a9093308e967eac700507c99ef6d492fab55af0bccbe12e6912 test1/2218 0
-a6258fbc0a8a465359e5bada52181319a8d06aa6c139b8070fd4b506c3ddd0cc test1/2219 0
-1784cbf7e094e0220f502d7a1670ad5645fb25d62aaffa5425dabc3523955d79 test1/2220 0
-873e8dfbd4cd5b2a45866eeeadaf2b9507be9ba0f50cc66bf2b3b8fcaf61df26 test1/2221 0
-821f2903f7919d6c840d9aa476deb812703bfed9dc686122ca460caad652073d test1/2222 0
-301f58af68a48893985f5ee15b1fb66b805093ef19366f77ec4ae4c18f38f806 test1/2223 0
-1c4a437b2a87e762ba74ee03a4f7b3f7633fc41da1e0978c5bd91b9891d0496e test1/2224 0
-f7580007393af10557bc0a4224258f6f98df0ed7d4a93f3611e74f2ad7d20e0f test1/2225 0
-971ec0eccddec5192de7e11bf7a88f791d7c2518b9aeebfd7ea63a8414dcd314 test1/2226 0
-31397ca48ac1c5a49919899577e9a5da4d404e93b9b68a6b700820281fc4bfb8 test1/2227 0
-d4e0c5523825907a0b5b4b743baf3c1cab56e81618894913a34d8bef4d5c2b98 test1/2228 0
-38785d0f524364d5c72e91da9f09b6ee1972c967250c1e4d5bce8d8c0acb0fb9 test1/2229 0
-d3f727561c4f86e2e1f67daeeab7b8adf8786e7e785d6a569de77001971ee3a0 test1/2230 0
-df71d84a18460f3e90d400d864f201094a780dc52c863d7ba18a73fc13a30220 test1/2231 0
-4c28ebf7fc8e5444b63bb60f6ca78f15b011b52c2dd2bc5f5df0a6faaebb5c12 test1/2232 0
-5fb1e135aa50602716d43630ab36314c23fcbe77a2f8af65e6119b6d09f3db2a test1/2233 0
-ddfa0bbcc01c421645fc1bf729bfa57b8d1d1c78733358ef0526ef344fc752ac test1/2234 0
-c8ad0a4aeb9ebedd90f5144ce23675e4ee63cd0897ef6f26f7710be7a27b6034 test1/2235 0
-95a8d244e13f4b7f0a435340523c672aaafdeb9b7321a2ceabf1d0d0acbbe538 test1/2236 0
-7aa12528ce4dd175942ffbd68b2f4bc18ee3c171c8133dcfb38dcc155b4e19da test1/2237 0
-e8616dcdc384e828c15e212977cba3719c07e3ae5376c7c5d0f111c6e236a9a5 test1/2238 0
-208bc77523e3d31a346626bcae4abbacdfd909726532fdb80793b5776d869ea5 test1/2239 0
-87641d98b0987bbe98f7d0a41ab362c5a943554459e41415d99b87659ab7171e test1/2240 0
-c08ea31837ea79b6aae4772def1054c8e336fe26e81b8f0530442a4a9e5c975a test1/2241 0
-e584586c9171e1bc0fc3b4899f248c7616bd6aefd84ee9a81d7dafd441522113 test1/2242 0
-3db0e29f9645d2ce477290f1db861b6a1c1b5ad25a0da4b629be5ccfabe5ff59 test1/2243 0
-1de1cd7a9c2d30904e50f96ff02d6d688ffbbc50eed160dd3e9fb345ffca191b test1/2244 0
-66a82285ac90f46b66473fcf432c0a6014ae109610eb47de7265b7b41979abd9 test1/2245 0
-711f07d5aeb97a496fe0b33de80b830fad6ef1ade40949a2316bbb2b12f7bc98 test1/2246 0
-27c6aec840d86f4fe1b4b690e41934a1c348e107aaca89dfd4ba7d9c3cfb56b0 test1/2247 0
-7133d5470310cdb16f1559d50f32a1645963e1d2939e155d85598e742dd78555 test1/2248 0
-c4879a1a3cc11906be34b373fb58f68ca0308e90c091f29eff35e5213533fbf0 test1/2249 0
-62b527d8e73cce8693a8b554e38564f44070b53b11cb21bc249e0a607fd3df9b test1/2250 0
-e4d44312e6bb15594077e448fca316ff59c89a0f78b7fe94140f9f76962c2539 test1/2251 0
-52effbbe022ce24d08e70ec52f9ad6af681c714bac879800cf7461cd959da89c test1/2252 0
-d3aa23ccc3d32727a070c347dc2e182ca7402458eabe08c3625c38613fde5db7 test1/2253 0
-dfefbe8ffe639dada012c016c329d46968c3c9038b3f7e84281e853b1a511d33 test1/2254 0
-c1bddae075670a3d60babdbe21f47998a9dcceab38321bc184c444ccc66cdba4 test1/2255 0
-6920a1e0625c4bd268efbaef5df26b5924ff3db2832f90becfbc8690e2304567 test1/2256 0
-4a6e94937f75d0ea80bbae4c77b51a1cc67d21f9c9100df16cc9c21a7a4c9f7a test1/2257 0
-be0801bf012d6709b58e74f44f5e6e241464f2141ab581b0ebec9a67d58a0fb9 test1/2258 0
-7491d8895044f4f468a08736f05f8088bb037857cbc42a960be42f8dc585ed7d test1/2259 0
-d499227875a49306bd9db5b846f285fa28dbaff7e3ae867626dfedc15e44d56f test1/2260 0
-7edf5b1fc5af09ea0537129c7c9bd6547db4686d7a71bae98259eafa155b2bc6 test1/2261 0
-1ba4ac6dda4d088f3fcbe6b066fa9b26ad9986a4ce0e8e99ef7ab1f750befa49 test1/2262 0
-c2ed9cde01e7be231b4b2f9bfcfc2ce1295137d9abaeb408743400685457494a test1/2263 0
-25239e447b454ad0e1fcb12fde8f2c490c9c98074b7bca86a3ff9a8b14bfd81d test1/2264 0
-0b00ab860ec9d6f9b0d681edb78220a52d594c46cb5e96251881d4d5cefadcfa test1/2265 0
-45633ea33b9a6f0bf72a6820c52492724b46a94cb1c255084ee2300be88ba5c9 test1/2266 0
-cde670ea5cf9abe687ade7445142b6640c536c5f68f82f0d886738bb7e385778 test1/2267 0
-3828affcaef7022f02c3bbf36bbc5ee403ac6848b4d3312c145f62d1930c4c1f test1/2268 0
-4394a95253b2fb44ab62a28cb9b8fc80ebd98ea4353a55216f5ce1beb642f78c test1/2269 0
-9a12c7d3977bf8a4b84566f6dc895c196ccda531e508dc94226ead7e40fd6dd6 test1/2270 0
-74401f7c1d30d9ff9e83282ba8ea64ee72684cd60a69cf5c6bc65f5c9df1ed0e test1/2271 0
-1a1c8675d4241608b2a4e54fb0c68a91bd85bf3ce5f1d7c89bec0cf3f319b9ac test1/2272 0
-2d83a06503fd401bc2bc78843ce2961ddd3b9dd78255e9940158f871fb742c32 test1/2273 0
-43287efb7b4b4ce4a68d411bc49f816242a21d7131862a14c5df6ae2b2bed44c test1/2274 0
-724acbf2eb91890baad3b61f9791de4d4496d1ced5ccea1b6231a631a17453c0 test1/2275 0
-af880f9f410bb2f681e4ac80392f9078e1be1b95790c529bbc1147adf82d253c test1/2276 0
-bc259ed94a5a1b888cbf0c20d29b1741f5fe97713e0e7d73b6d635d7a03269ef test1/2277 0
-0b87b58fd36c28343d9db03e510c77151a4b1f441628d1b4b95295702f7e3a67 test1/2278 0
-6ac0c628d595363c05a41fa416f26600cdbd5ff09be98fab6af06c10991fb748 test1/2279 0
-906e612f065d8a186b2a6c7aa960c36434e68c35779930fb6f5ac944b5d2bc30 test1/2280 0
-0e12d9c21fc4e66eaef5cfb2addb56738a38fa29e0e3db42e81cc0a8bf76afb5 test1/2281 0
-a31d03d82072afad06fbbeab2e537f4b224e3d84d3f1daf527299c88d41a2b74 test1/2282 0
-1ca5186c11cde566b424286070dd5e3264fe18eb4813ef3786d2a1e7f034b674 test1/2283 0
-de168c0774e0889ff1bb883275b3bb184050b851ace959668b9dc38332c640d3 test1/2284 0
-86ba74295293b18ea8308b26f8527e68c971f01620b04ad01d8e874eff0d048b test1/2285 0
-2cd2cda97a3d33e23567ec2610ad5d4037d1342752078bd5c5be56fd640a987d test1/2286 0
-2f7d15c20e3e671ad915c13c0ead7529891ae855b57a1ff78ed3a99c0c850141 test1/2287 0
-ad3f1eb48828dcb89fec3090557e8168c6967ced3ed41ca2c11089d7a783f50b test1/2288 0
-1c56e94f0a52be7b4173495e8554dde3bce24ef21e36da704cc6f6a47adfa250 test1/2289 0
-86513501f54e4c87e6aa820f11c1653f943af0898c55e5146bb1ddf8a11fafa1 test1/2290 0
-5d776ab429901b67d57ff03876034b355fd5fc23cc7b44a57ce6b9dd2b67f0de test1/2291 0
-563fbc233df691e957161439a1fbd1bce8b9812a7166844cfa096da110c8eadd test1/2292 0
-8e28d033b2bafc2b16f804b6d7848c99439eed8f20f40e1f3df2abd4ca49c4fe test1/2293 0
-bed83a643ba5737509df8584963bb1aba2e60207c5b0e127b08069e9a809f291 test1/2294 0
-611b7a7922874e14213cb67af3e6533f70926d89423ef7f254f1f4bbae39edef test1/2295 0
-3d61cf474304d1fc298597932a3c10527ac9d28ec03ae6cf2311bd1c5b19984b test1/2296 0
-b8d9f7a34c1e84ba823bc53d98897a024bfefce5768623e6b8386d546527a0d5 test1/2297 0
-a21e7f715f2dbf5d92a533f49b0005e3df2871130dce1f35ecaf97bd0be0dfe3 test1/2298 0
-615704fd4dea0ff2d7353b38c2a818918f4cf1c37f808630ff61e7edff039faf test1/2299 0
-40a81358767a2fcb5676c8b9d61e28406fa8e0afff74b784d6836b4afec85ab7 test1/2300 0
-6e0b42879b572aeeafae91a23aa00273970e44a631407532195da146b1163fa4 test1/2301 0
-39fbbf6cc306c0e360807aa8ba164bd24965b606c09505151c8e3518155d963d test1/2302 0
-53260895507943a3a96c3e8e159b0cc6e3a195462e61f508b0c00d84e3d03658 test1/2303 0
-d7d8472b0a9ff330a28b9eb0080e9fd948f6f60b3d3e88509311d38faf11bccd test1/2304 0
-2c83b8f7f67e52b610504e9be07b74dd2ee192ae62c0e99048556d1674f9e388 test1/2305 0
-56c829f474b8d8a2fd7c88dffcc96d38c0c405afab0beefd7559e3c554f4dbb3 test1/2306 0
-515b3eeccd54459a6a52e5f7e86f4e1edd67e763f8beece26abb749ebdde1035 test1/2307 0
-29abb4597da4237a720c59094edf259344f410bbb2ee1325fe0b814f7ec932f0 test1/2308 0
-f7eeb4ea6c91513ee1d4135a34a59259812a13647cc2056d7e43da919b096f07 test1/2309 0
-36db0cb4db02b1eebd6e8f8b2b53237e943c976a7b1ea6d0c502bd602550417f test1/2310 0
-2d5095c498c29d4aba60dbe0c720ee77c53a47ee16e9272f55891795b86fa40e test1/2311 0
-bf7e521032d6d93e98d74710cd2e2892eb7db73120bf867721b449a0baa0f4ae test1/2312 0
-df39aa328871e3ac621a88949d3e574fe7b7b75b509f2108a7734a4831f07a82 test1/2313 0
-c14398370f6c5e0f7690c6e221ec6dd7d498fed32b2929491dfe8df9a12ba52f test1/2314 0
-96cd7b39f3b84d2e170c23f64e4cec99b02a9ebbcc23cda56fd23180b7a8af12 test1/2315 0
-b37b7d30772f10510e1f1a2650ab375e8b34d0c78e1de1c5d742520a899d798e test1/2316 0
-fedfcecc3c964c03f1a817a8a1aecb8edadc39ee2905ba3e68c95514ecc5bad7 test1/2317 0
-86f851835026e7806545371a027a482d479180e0b415788914084f77a3ef84bc test1/2318 0
-f4ec3e4499273e2129c60034038835dc00272ad54cc61598749df6fd872019cf test1/2319 0
-69886bf893b2a3257ddf333c8e49c09533b5de652a486a58cf79c1db04b8932e test1/2320 0
-374c3445ce9dea2b03fc0eff9ac1ca91970e40d644b974f34f1869b55d50b2ef test1/2321 0
-70e68888d71eb11a7d1abab32c474b79f7627bb92c14ddf6874bdb9fc6a5f57b test1/2322 0
-39daf1b5e30ab00dab233985a4af243195593c09bf5fefd7aab27fbb30836e38 test1/2323 0
-02eea346fc98d7bb71052c6514f990162b265b82240fa608950045dfd0498fbb test1/2324 0
-37a6a22ab12dcbc97e71a1133c382ea04b45959ce7a0ae9bc72a228c25a1df00 test1/2325 0
-0379b1e3af3c7e9caaf7be0d3fa2f5852b6b3f93f04d288c5273200a62fbfbbe test1/2326 0
-30e8c83dea3078cff5800e05f48bf18699f693bf3e94a2b58d4f85c09fe3cb86 test1/2327 0
-dc9e152ca7487828f3a7a2a3dbbfa3e6ec9178253e914aa52d05e19a9766afea test1/2328 0
-8a916424f2d248e4128eaeb133c7ce54f0366aa0d4051c047242ac83a01e4e14 test1/2329 0
-7a00aa0324c112bd053e18174697aa1cb3513b812e6a155b7fdf1d4d8b16e134 test1/2330 0
-881dea59d0001cdd72e2c7141b0aeab99db3ecc17ab3f0300c77ba3f84fea218 test1/2331 0
-257d71b0f8571141e5a10fb69f082697de8b80c65dea31dfc886de8e992e0c62 test1/2332 0
-9bc10152d613f420c499e68bfeca0f1e8262dabc26c76f25a9b991abb0d05992 test1/2333 0
-95be4121962826fd7282bf0a6d52a1c22b5f995e252d0d706cee3cb2af557b1e test1/2334 0
-2329a90712744157c169bb1e3b143195214808c4e0c1f43e2e4993cecb10c923 test1/2335 0
-3b86b7212b09521633c6f8822209d4e685b6066ccb40ba5100bd3abdfa140836 test1/2336 0
-a7d04532c14e7dd7e416f2f0cb05d3c07e19b76ba9effc752f1bcf9eac676d07 test1/2337 0
-7dbf9edaf283d9678580da8d057eb1f786886b24531783ad8dcb2cebb7c905ff test1/2338 0
-c6a8ceeef6a39d06d39c13e616f1507eedee5908843c73288652fd4e3a1eb9da test1/2339 0
-25e82a20c11b5a9ae6ca5ec0cb125690035904319fdf7e9f66025367b7f5da39 test1/2340 0
-fefa25082755287d04442aaf3915f4ef19bc17c79a2b6e3a8d6b79dccaba3363 test1/2341 0
-e05895af38e8e78eb95e4ff28c26e704ae4f0c5b51dba87322ba7e624abd9f90 test1/2342 0
-5deea7f282c1e994879963530eb2b4514fe5d9be01e476661e0629412d1e172e test1/2343 0
-745f5cb281b9f149404edcfeebd2a93f0a4f83e122bfc22cd618868810748134 test1/2344 0
-eb91fe2606c0528d64b37dfdb4a33c6ab3db14ee5fdadcbd2aabaf33ec4793a3 test1/2345 0
-7a9bc14eb4ff9ee0e351875afb0551d8275287391f6ee5248f2f7b63b37f2d6b test1/2346 0
-1643976f9f41a3894457a466c23f7a980975d1a67548c501860007e8fab0dd10 test1/2347 0
-00e69e93805401e337df6700458b3579a7be1d80537b59d050f222b14b19ec6e test1/2348 0
-c2fceab6e1711d234c537f6d558e811ad4f8f112aa28a6625939455806e258fc test1/2349 0
-4d201b8ac1136e6330e552c3ab99bfee21e203d277031f970a2a634d47a948ab test1/2350 0
-0b72599e0925347e780d21288bae40a0cf0a124c94b433efc067ec58f1dec35c test1/2351 0
-b7958836597552f72e9da6d32fb2cd60e61770880cd1145ebd67a47abd0af5e2 test1/2352 0
-0fda3ba7491dd59350ab61ae431403789ea99b677939ee8a14670a1aba3ca08f test1/2353 0
-25192b129e910219edde31d9ebc723e07ec3773fa343e3d4631809d73473f136 test1/2354 0
-af48eb8c8f9f17e12bc63e7f4971bf9c08b2da5f4dcf25c85772bfd91dd56e10 test1/2355 0
-48ee001ea8db780d0d00dc95b0cd2ad865150fd47016950ccbfa953518043f78 test1/2356 0
-a2e19e45c74b08a398e1c9bf17ab28de9708f81f3c80cba5040729d5dc7a87ee test1/2357 0
-866c3b25c705842e041ddf19d2c0d9c3ad8e796b57fedd6b9ca9f98a6f4fbca8 test1/2358 0
-bc11eda44621d1dcded27992410b64141e2f613d2b7e215dc7c5232b8f2eab59 test1/2359 0
-f75e62a0de545b2df3161989c4428b27518318c193cd56219055b4641d597aed test1/2360 0
-aced475d1cde49fec0c0defab7c70beedb78d3963da54a90a77e97e2addeb293 test1/2361 0
-8c389dd574494d0d1ba4219e2ca8a8aac4caf716ae50a0d651592214411d12a2 test1/2362 0
-aaaafe06daea89591cd44e8279182e8232e4c7041dc86869604001c40a977dea test1/2363 0
-c9dd4c6a16d5c24909c522b7cd6f074b251dffb980eb0bdef96c13403a0e4190 test1/2364 0
-532fef9288539f6238d103499e4e614bd90c97c133e7597aeeae2b98f05efab4 test1/2365 0
-ba51ccf692272081a6cee093a0dbb420bb65392b799cdd78703f2fa0cf4ed2ed test1/2366 0
-7b1ba277b61b3a508abc8ab6cbcfd020895eef7ffa15701a45150f6af334f260 test1/2367 0
-c12f970c06df1f843d154ccc4dca18a57b85fc905f04816e7f16cb4d164f3ca2 test1/2368 0
-a800b2c8df6e165b9b939b0980282a943d4ea383b452544c13253162004ff0df test1/2369 0
-3e15f1630ee4ee7d3e2e5432874d016e8e3680e7cec2ac9088daf8205b56eb4c test1/2370 0
-f7d18c4307ab897292a80ae491ba2b93697e141f5ed22dfff634b4cb5b42ed4a test1/2371 0
-14952e6ebb7a0c890cfefedc26dcd3dc5852f7992b25088b81b0b8070d0f3460 test1/2372 0
-2a0cca81ebcbb0c784d9894ac4cb601362707acfa3eae58d238d9cd004c75414 test1/2373 0
-eacc97edfe5aa1e58ecae2f1e40f32a22f1d110b1cf1eb260f3826730efd15c1 test1/2374 0
-0d40ef7968a0343207fd7c695f52d0ca835ec2007a84e5c99bb9a382e7e08638 test1/2375 0
-7aeeeebc30f2b2b282709fc370afa85cbcc835f5278c61b052d1032b496f2172 test1/2376 0
-af022f91d4553584b782a6d8ef97b5630aa225f57f33b97c08c070b63fc2e764 test1/2377 0
-03d9ad2f646da281d88a2a9886e1a5cd3d8220075def647c742d0a85a4244274 test1/2378 0
-d3999e1b668db4d2c713e7c73d2105a33215cc09735c9664abdce384a6b02446 test1/2379 0
-886c0b823688629c6d08a68f3356bed3d10b13e0a745c71ec991eb7d0016c827 test1/2380 0
-5ffe5fd73667f65e6b020cd91dff21d06bb0dab94edaa0c642a388b250e1118c test1/2381 0
-01756c42aae4ec96e79d59311852f1087d8654743fea6b3fd8e500834616499f test1/2382 0
-34cfe1bc46dcafccb99951bb462ebe63f8b9f360251ab19f72770bfa9cb41b48 test1/2383 0
-dce5c60cdfe45ec8bbf60409dbfccdf78843fbcd8375261d759187fb63a5b288 test1/2384 0
-673acba4e97f5908f348cdca1f191ed5d2a0bf5ca982bc79a979392bc2e2d860 test1/2385 0
-2e182c7625d1bcf780e8e322a1e61b64da2c9d39d33a10a9d49ac70dad4a5e07 test1/2386 0
-259d1a68746b600760dba18e34cb8a748db65a91f3966d05c25770fa93855135 test1/2387 0
-dfef7c7aa36dac5e609b29c1a59c8df3af830140bd27d708ccbfd1cee4c2ae0a test1/2388 0
-ff97050cf7e735e2ecb466a95fe2932c20d02ea12a1f6944880dbaa2ef26181a test1/2389 0
-01a4dc3d1cfaff8599cb5f8ac757a35e899a62a68741b6291a9fee6caf703d15 test1/2390 0
-38ed499b93cc7132d807e2c271df651657fc81757fd680b04cbe3a01ac99d844 test1/2391 0
-fc95a141fe5a83b3b8302821572bc921a7755fa7c3a68bd1d4156ae7507c3586 test1/2392 0
-5e15542fd02dd79044759a50bd93a334b74104afa89646f96349c05217f2f10d test1/2393 0
-d6a0bcf8a02c5ef24ad4c0fa18cba55a91a95e792d00863aeea86c09bb2d46e0 test1/2394 0
-5b91baea773e01b211f38f6370354beb3a7636dd9d97462cd1d89430fb5f4414 test1/2395 0
-f5a7545762b1d8c8d34a0508c7bea9408b508d477352b4bfb53ce6b001ee63af test1/2396 0
-cdc8f0c52ddce95af42588ba184074079dd5389c0f977e892a2d1d17b8754732 test1/2397 0
-81f8936ed4e92298f2db72aed8b084ed7c71f27c71427aa012e85f868b86f0e1 test1/2398 0
-0794dad518bfcae5f3b2024b60f277d235e0ef961455bc5794840c4974c072a8 test1/2399 0
-f2c4909af9f2a0f5279af60a1d63628dad083deb9908830625980380e4fbe742 test1/2400 0
-9ca5247b59bc1de975300efdc1d7c2ae3e01c2cb91a559f8a1d639b84ff26a3a test1/2401 0
-885f61bb41bfab7cecb5da7fe74e9a3ded57dbd294e275bc57e6ed0e051981e7 test1/2402 0
-9282a8ce43c327e28cabbfa15d1e6e27a0c0e37baf3e89dda1a8cc6fb8ac176b test1/2403 0
-7b10077add5c9ebdd4a06c3c9595d5ff5801f8ffae927d23c2b500b0938adbb3 test1/2404 0
-fc70b543147f497ffb7321016c0a9022d7e38e138bd05a03008984dea7185947 test1/2405 0
-7901d3859b5123727d36890f03ff6edfe78453821e8e001971e533e896238e10 test1/2406 0
-57735c81af204b204140aa8ea5aa31f81c83ceb3c29f38c204d16d39614f8f6e test1/2407 0
-29c42b02117b087afda9ef01c1a64eee5d6ef8d11e7924f734c5855e3c5e2eb4 test1/2408 0
-7d6c8711b5776c7f3cd77bcf346c9c7a06729261376e03674fa65bb8484a37c8 test1/2409 0
-dc11856906d69efbe4118596bb02fe809a3964e25ba3a47a34c639e19a350e1a test1/2410 0
-e029c69efae66a89da23d7836e52855c121b8f5ab1b8f5a40e748d05f6205d57 test1/2411 0
-01c2328044256a06294bd1364c4988bb2bf7faaa6109bde7fc81f6bfe373b166 test1/2412 0
-c078d7bbf2de32dd1022408bab248b7c9992f958ead5944882eed79fb8b39269 test1/2413 0
-b901aef7ed07fe9b9b7a2e30a2183c0d4049742570a6d437ea94768a94453e61 test1/2414 0
-08ec77a7eb86cbd92c9a23d2b8238b6a51753c0787050cfed0830a8ef4bbb10b test1/2415 0
-56946ad348b9531994dca4e7ecc65fc5a98d2ca2f84b8eab69e94fa10e1ac849 test1/2416 0
-a7c6e0b68fc6421dac98d6187e1f0b055b98b4579bc9b571e73dc8fb350fa8a5 test1/2417 0
-61aa6b7a58e1ec8b4f833a9642361bf3330f13aa33de8bef7ccd3759468d8fcd test1/2418 0
-06bb33d3ac0f221f6f4c9980e6163ce656bbda9d47dcc01f78ec36d4b1e81938 test1/2419 0
-987a7f17c6d289a5420daba24408ab46ce7656e72aba9f8cb1b5da1e6bc2a415 test1/2420 0
-2c5076156e9896cc4d2310ea7af87209cdec84923b08e52f375cc7f8a4b972f2 test1/2421 0
-8ad1d7f710e6bcb5f7ce316fba996bd43e408d5990afe9dac894e5c1bf900c0d test1/2422 0
-41653786e060828f1d765272efdd01606497f1990509f9b81cce24810b3fc865 test1/2423 0
-e0ff982e5b46eba2e1d6426ed330773a65d717d2df907bc844d31bd4214e6835 test1/2424 0
-fcdae10e0c6306236e6fa2b210b76ee679c7dbbbbd038acd26d6c1b17eb33583 test1/2425 0
-354053dd9d44bd976fd6a7b8c955ed67ecba60109078dcc8f359c486c9f1417e test1/2426 0
-789e7f73d78ab0fbcc2ffbd1ae66a0558306a2fc6e047685cc198d5f9e717e41 test1/2427 0
-e60371b90273609339d9efb96ea92a83ab70cc8d351f11cb0802e930a107165e test1/2428 0
-a67a92a05ffa45bcdb01f9b71e9491e1af640738abe2abaae3d99874f57a26be test1/2429 0
-9c4795a93a2bb4569db0d96e8e20caa1cfddc2f961fb3309297216200b1ae97f test1/2430 0
-e85164f75b79aeea2f97734267e74e072ec1c495b7438aad432da12b99656bb1 test1/2431 0
-2291a6578f678c08ed1e64c48f9b5c3572505b15cf0461536364dafd34818e0e test1/2432 0
-24ea3ff9593e7b67439e8dee49b4762f0e8a0e0a51f004848f81c3795446c487 test1/2433 0
-4b7491008158e6cfde832014f3e4ac3ac89ecf6710f6ecae87c7b0eea792e9e1 test1/2434 0
-2823a5ba65d6e7cdcce75ab9318cad4e5d7a8562dad7a28e46b2810d56b0eef7 test1/2435 0
-8d86968ebb9aabe3e14d5a8345eef6840d3802f0050448aa3ad30c0c799389a6 test1/2436 0
-c7ef4d45b44db1d766f31456e2b1a905d08d2bd812a8c3a19d1509d67173b9b7 test1/2437 0
-86574206ba6a1f5b66db5432d9650c35e2f23ef525a69b81f600d9ab3084ec2c test1/2438 0
-10392a19da01c008dcfa941a2a876701d07fe688191cc2ae0033dbad12fa361c test1/2439 0
-ac610589954442f47b88bb8879d180f0ecfaba439f9c4a3ac1aab3cbd9817327 test1/2440 0
-1aba8c772982428da0e4760f6cb10d8a20785e21c1685a6351251548ee872650 test1/2441 0
-a28372f7a0f9fa4dfc0b79e5ed80ce10bb973b7577fdf2100e7f06926656a328 test1/2442 0
-daa217eb792b981cc05710d3c839c4ca18fbdef2aa87506a9dfbd60d0079e705 test1/2443 0
-cec466254960eef9f980ab043fb05963864118a5864693fc33d5ab36487a1a69 test1/2444 0
-fc6953b423030f37366db0fb5cc1dd84b6763daf90db7939fdf67016527acf2c test1/2445 0
-4e85cee6d1d17efd3569451b888efc9e203d2d4ed7a624b110dac8fa70603098 test1/2446 0
-bde64c17be935cab89a9131ebc6a8b933212e2f20e4e27aebd3a398a8d8e31db test1/2447 0
-7bee64be95457ccec7429c4e83f94ad3f9e89c3ceca26126ff922990d357557c test1/2448 0
-55204ffa92be4909f8a8f927960cf82f48ee4ad5a06e9586b3feb36c56b1c317 test1/2449 0
-956bbf605d86f759e5070551168b54896244a8dbf5c82bf0377d319986ac1cfd test1/2450 0
-1622c8c7910398eeada0463f69b13dcc0bea6792055c7ef91e89cf1cb61aa515 test1/2451 0
-383dcef0e28a882856cd27d97d35110dbdc849076242af7f14e51cca136e8a0e test1/2452 0
-a1b4e27f87b1efe73f5241039d0c2733758cc52807485eea5ccd67a082b57d9b test1/2453 0
-a9a0926cdf9d0546ab8fee6b012f7218ce7058485231d752512e9e7482397de0 test1/2454 0
-550a43cf547914e290806a548f65d67ef53df70668a0f8dfb864cc30afc9cb23 test1/2455 0
-6f1b722ae0a0361456624d9189063d4484701ef740b95d08a8e5c4152aecd7a4 test1/2456 0
-5af60d49bbb62ca0e1e0c3f44a2cbb98a624e2aee209c2603dee96262b9fe55f test1/2457 0
-53cd751d4cb4409a1f57f0277a652c5fea57d3b441527c7ee7a17fa7d624de7f test1/2458 0
-830884c83cd15f4d97825bf6f14f851b367d59a79adb4fdeb3555f286dd2ebd5 test1/2459 0
-3449522e23e9ae243e1fb1b13dddca878af2943c04c967556120d9b3b6ec823e test1/2460 0
-4acdde00de529e1fbe511c7b9ad66720c170e35ff79b675d84bec8a30b97f59e test1/2461 0
-34db087583f4de9d2fb6320b5ffc38597cd238058bd980ef66ea280f97c8da1c test1/2462 0
-71dc3894081a77df259949019cfb384664bf432471f09a8ea014c426cd276c7d test1/2463 0
-0a8a40a00dc22bab81bb0f6527bab7c4080e8bd1d0568dce210a60efb15391cf test1/2464 0
-c74575ce2ebaf9411bd997bba2096018c2e02127dcbb8b24acf432c14400a450 test1/2465 0
-2f6cdfa0d66bb7a42518813e699b4010299ca576526e6b30fbd796216bc83ecd test1/2466 0
-16c39b20b8ca572d2215b03d4f656779ddc586d7699094007b36ca25fc919af4 test1/2467 0
-8bc2841405e6237320e733bc5d166a93739b2ca9a0e8a124ac409b16b919644f test1/2468 0
-1e0f34e595bd017964d69e706efca65b5c008f08589d248677f9893f643e96b7 test1/2469 0
-629f125eec7df2d6b255bbfa4823de1f70176cb430342aff2336b52062d96d2f test1/2470 0
-33a379e9bded2099fc8ce2a7a7d415595bb3ad8bc58938c6d798f31ae044219d test1/2471 0
-cfcc5209149d9407f6a972413fe8e3fda733886fb56c03159844a44dcd738a34 test1/2472 0
-499602a15dfe8d84bab88e20577787e07c2ac65c1e6f6977179d64d2641ccf0b test1/2473 0
-6b2b11647cb3622e52a808a3ab7308a5fd0bb07c131f226138acb01af756e254 test1/2474 0
-0be3dcb9acf6689afed90e76e6d0a7f75a43e6c951d6ecf4638c5f1c3cfd57cd test1/2475 0
-d0ecb15055116cb15724111ee692c096cf703f52559e1e62fa7ee6a5846c75cd test1/2476 0
-2660f2a3a4106f7fd0dcc3b1bde4fdd92d14a97cc3feadfa9c61c1d18833fe95 test1/2477 0
-9f066cd6162b862db492de49a325791845408aa060ed8a6082e77580237a193f test1/2478 0
-ecc9bf0080b360e9fe061f7170078a0c9e26809ef00423bb9db79d65dc297a7f test1/2479 0
-6f5ddaeea64f07d7d5743baac0d21773184d4f26fe11447c935a243d3c6b96d6 test1/2480 0
-11e8a2de12b6be16b15021cd4679360c51bda2f2749570184884d4f61b14528b test1/2481 0
-f574b944661a09d1c10bb8a09ea432cec5f3896402600b4865eaf2aa67c2e5cc test1/2482 0
-36cd79ae17832258f1baefe3f615ab18506a4d845ecd18524d22dfc85dce4ce1 test1/2483 0
-ae99ac24ab8a0456c9808833ecc4c01a85c3cbf1fa142dae571c8534297d1495 test1/2484 0
-4d60df57c37ae39559c3ea48a85aaf8558a14b0ce927b78f9cde776d56355c77 test1/2485 0
-97724a9e3969a7dea582ec0bbd0aca739bb32a3a3a69af297c5b7dc28ce22b5f test1/2486 0
-6ca74430cd9f484c74e661d61f599d7df71e01eb467d2303c44059c2183bc633 test1/2487 0
-d7f882a409f9bb45ed624d2aee4210d8b2c2bfefc8fc2f6899c79be30ef46891 test1/2488 0
-0e3ae7faae663df1b648d0c6ab0a9a7f131961939d66f8e26228a2696db31056 test1/2489 0
-a9f737884d54b249622aa61946ac85dfacf50f27417b6e97665c7f1c03476c2b test1/2490 0
-c3fc4e86dcd4187f004ed0021d3098ffa06e70238893d3fafd3fbe70dcdb8ec6 test1/2491 0
-926e9c29d87dd4ff02d62b2fd4c1587c39b90af056c70f57ce29c9480fd52598 test1/2492 0
-a24793797779fd3c5687515e0a603d60d7912ffb74a6744c1266eba510870f98 test1/2493 0
-f5f51843d0f616c9a63ef1efc266552d060c2e580691182d2c9a9d8f10e3afa2 test1/2494 0
-44982408578ceab99787d406aaa7f7d78157f542da310887fd5695e86f44e6c7 test1/2495 0
-fb4d74c6b24cb9335ce8ce0b94366a962344a61e510d0b469ce695815657417e test1/2496 0
-aba5723348e40bb3fe329936a283166d97f6f77cfc842b5bec36601866898db4 test1/2497 0
-d535fc493c19b1478321bde38cb19ddadd25d53132e4eba7771af3e64c97e66a test1/2498 0
-bff4d1733d1c44dcb5f2423f1f5188104e363075e0b238bcdcb2e5d5dbdabffa test1/2499 0
-2b778010b56c7ea2fc1a0b345a8f2dfde6aeb99c526741d9e45ce8b38f0f3be5 test1/2500 0
-ef58caab748f38f291e8a9cadff04d110deedf4fabf5bf548ac96fba4ad6c6bf test1/2501 0
-f58490c2283306c021904b2810749210b1bdc56c97cee69c3f99651903e84ef8 test1/2502 0
-343a3412df670f59a0ef699e1be121297136839a647720979ccfd75ef26b4e43 test1/2503 0
-6ac6bf47a552ba947364626d53c532667ff0656adac9a1f8d3e46b6e248d1992 test1/2504 0
-a7b1ff691d6d710876aef51dbc66bb4d8703ee9a853a4ec9eb9a5ade29158769 test1/2505 0
-906c4d987b843a8a9ca88e32bd4d0ba9d7195db3a6248d20612f04f63f568c22 test1/2506 0
-146a1666fbb6cb179bbb50a147ef0d4136e0d966dd6329762a3171c9fbb14f01 test1/2507 0
-6d95f192ecd57f367ec231394058bbfd6024ef7787f80fb24c68cd9f7b903293 test1/2508 0
-c7c0617248b0ea3e1bd698f2412173f54b1983c5b98d984d3678e154a94aa62f test1/2509 0
-f22120348aa4bafd6a00492bf8a9f81f386e64e2e2a325b32946faad9806c36e test1/2510 0
-067b3d9fea312d1ab860cbf38c9e284a6623b78e5b851948fb539c5a80c760cb test1/2511 0
-2a9fc6b9b392ff4bc337d740a6697e7a1e1095050bb4d08d9853bda390d4468a test1/2512 0
-935f08bcfe3e5577d5d0504c41d6785168d7379830bf66ab2b2dfcd5787e6278 test1/2513 0
-19adf9851795da605c22f7d9ede92511c28deeae2dac970e2172ba448d1c8fb1 test1/2514 0
-13e213efdad87ffeb109d63aa973a96982a716ef8e2e956ce42e389cbe0e489f test1/2515 0
-614dd583c154edc7a5094a8624375646bc486ee54287b58bf5b547a95e6eb197 test1/2516 0
-ad2510f28929af1db1d4452be21addf56fea068c3ca74547e673ca0bb7bb345c test1/2517 0
-59336ef15626b3b85f1c646b657e3f5b8c3b791d97c2f7c5cd7fda493adbdcce test1/2518 0
-dbc80f93bc08120836001ac73684e9b57ec213d9b09153c2209fbdae58972392 test1/2519 0
-9b7ee1e61becd4c351fd1f2b9be1c047d859cce93cdbea6db4910d84c768022a test1/2520 0
-71f5d6fce3b91e6cf35ebaababc8992a9cc7114c01dd40ebe44b70bd927d7627 test1/2521 0
-6a5371cb7bc779b451e0875ed8f8f668e2154c4223441d1c48992f50756ae836 test1/2522 0
-9a819e1d39bb77b7df6398099ab773be3d6a3a0e58ee8e827edad00f73525598 test1/2523 0
-de2cff9f685f26a877fa0d1fa9269ebc1e1df47bb68791b100a0eb6d35657b28 test1/2524 0
-e369a38333e2c168fc5fab29d2294db8696acc28f429a6c0b9121da00fe3810e test1/2525 0
-ae91dd65f06c430104f7349898377a96418f109004a21c0a5e92b0988157bc9f test1/2526 0
-b522ab831fb35012e4143868f05bbf9602d120f720b575d02374fe25292796d9 test1/2527 0
-4648f6a44ec1d5416ff7ea57eee677eae2619b891a249b09ca74be1beb62b76a test1/2528 0
-22fcf150197d77c48b18e96052c5a43982b1f641800b3d0867042d0a97979f88 test1/2529 0
-bdccc30094c6472bc61ba58d33bddcd22fe4f5b108adbff15e02ec9817880e7c test1/2530 0
-df7f02731d94f2aa8a17a505fbf531e8ec429451cca47445cfcde0e9ad1cbc22 test1/2531 0
-a0af5cd2aaa8c5b7db1b2c683be9d8fc71d666760c99c3d931ae758e05413d8c test1/2532 0
-be24a0240eb7f8d943ac68612f483181ca327241806f0420983f8c13ab9a7474 test1/2533 0
-10ff38b9832979f07aca8c4945cd5d42e2f459c8faacf9b608c61d05d1d506f4 test1/2534 0
-b86beb3dde81ff7dc7a863f216e4f37080c5d24a225c8d2e736751141002d848 test1/2535 0
-ecc4c710880598a26fc27fb7a3e7950bcc31d1721adce1009d45a43dc76aba2e test1/2536 0
-d67dded668cb3e6523f568ae191b7e21440c656c8f26d603633b91b839e12609 test1/2537 0
-fea7998d4da167ea69fd1c9c0e8074c2485c413276dfb2946359d31bebd61614 test1/2538 0
-868b37d6cdc8655d569036eb3d0189552fc1ecceed7c9cc1d37f11473a2db994 test1/2539 0
-2ae5ac2a14fda2c4ea0033152552b9edf6bdd3ebf74cc74202cc3d8a1e528cc1 test1/2540 0
-b26d8d0adcdfa1925c373f755126cb3d57b96ad7a471d293d63dfc93cb961e9a test1/2541 0
-dfe80c832024bf0d5ab6f623a5fd5e0ac92141be0f3c3baedc349aad5043f949 test1/2542 0
-d03034402971f082093ac1b743f72d2be8a11d167c4e9b7a12e7ce362000f842 test1/2543 0
-be894beac213ec9c6d6168108d6ec4a7d4b951c7ff8075e255700318356f4e11 test1/2544 0
-0f9e892347c18b2941862be767031215ca64078f2155b9c1501d341ae499874e test1/2545 0
-4178802f6332bf7fa2688205c096aca827fa426fca6267b6823c6a9e787b9cf9 test1/2546 0
-a2161a0fae79efb2949194c4dc3e9528b934c327144a24b6e2e3961ab5f77040 test1/2547 0
-bdd74e742064b1a9f22eccc8060c8637c42363107600e750e6f55e7c4395c7be test1/2548 0
-9fa51522d80fc5ada925412ab32a65fb82cc3e9423e4de6558434abbe9d95436 test1/2549 0
-66dc0a420a07f97f42c08304a9cf4bc9fed59a790add2a240525e756bbed8ae5 test1/2550 0
-1901afaab8e3f45f868dcad25199d04b11d25a44efe428169e9574e655f5c560 test1/2551 0
-6ee5a3e06480870a483acafa187bceca71729b890c38a8ca6dd28bffa85b9c84 test1/2552 0
-7152c497f369b11e5322e3dbdd3c405fcc18cb6c71500c7839de2c2e613891e7 test1/2553 0
-236106818a02ed844b19b613a5a1b93cb92c0b62a74eda45ffa19ad30dc59bad test1/2554 0
-6e78749a97818d9bc613d7e689810c148be44cd923a0987af63cffc3cde50acf test1/2555 0
-3f9ac134f7bd388fde9f86e4e4ace2c0bfcafc88d7ed8d7b17ca2935a029da6b test1/2556 0
-1858463c98b80c5c08185448e6def51dc1227f95314d359d56e1d2d9b9c82a1f test1/2557 0
-469cb17c67c0c5375fa288f43baa2852408ac13645c3cfb01abaa1d6f653b1c7 test1/2558 0
-4a3c5c28352a52d4f90702fa0bb1c9a1f30744b1b34fdcd605bcc0aa72aad417 test1/2559 0
-2b9c54157f993d661c6b963b1f77d48b684f72412077f1285b420f4c85dc3071 test1/2560 0
-c5d69f05478c744a3616d41de0c5267bfbc5abc9ebc3de9b236d29a0b95ce3d4 test1/2561 0
-7f5e920cfbc045f42ebf5f787a15ad278ccfaef28fcedde7a184e0c1f4cb5131 test1/2562 0
-1befc9112e4038d382286f1888aa9a1c9d28d8cede82d69bdf5241915dbacc91 test1/2563 0
-3fe88c0b7fc3f57e263a3af82fc7481b574650accd8672894d2aceb97440c1e4 test1/2564 0
-d460cf7a796abd59226f9a32ca29454f43e62f835a7a48ec2be8d641c47273ac test1/2565 0
-68357cbbf1de3534d2d2c7a2f9e7a7b26cc787310036d63e6ce97a21a8ff102e test1/2566 0
-f9e4c1b42a1664a72c77cd00cddddec2a61887bd7f0d9ba4f289bd187dee952f test1/2567 0
-20331aa62aeba796140355453648ce2579c41df3be33aa931866bc72f0682ba0 test1/2568 0
-44aa0c549b0678d524a909aad280f8235f474a424858f04fa4eb3beb63bf170e test1/2569 0
-0da71175bdea2a1e158a5308babd42620b2efb799af6b8b60935040d6d360c7e test1/2570 0
-d25791a63a29c369225b5a180efef7507ba6772a3ff55b93a5042471072d8dd9 test1/2571 0
-85093c866c15b181899242b2863cfad7198c462220377e5024ef409ad846ccb4 test1/2572 0
-8afa021e26b88ddc1640938428aab28d5223e041ad723b9250440134370faf42 test1/2573 0
-e0aeba8eb8626af97c8888491060094e89f856bac54020466094803c135f9984 test1/2574 0
-5e059090b044e38b0ee9f7f2a038e77f64989d237514f557e9ae9bca1a092d51 test1/2575 0
-86529154ed58a15fa6b9a1541d61f6288fad342264ae61f930a2399a4d2b14bb test1/2576 0
-f5b37c7604c03d532d16fe9eb0a11c6775c4e917fb4a063d2d83c9dcc4d6d4f6 test1/2577 0
-e821d60cba07a4c5fd2ee58bc58f421671fd99582e84021b5e9b6b51ceb35977 test1/2578 0
-db9bdaa6222dacc63916d91b76ab7a8ebe11325099174c339870c4f89f89d8ba test1/2579 0
-1705735da6753c91803e003af4fbd47d1e04f00c7c028d79356d5f148ad1e0d8 test1/2580 0
-a81f6f86054dc5038da00d6a19b45695e3e162c62759c696dedc334a0764849a test1/2581 0
-dc1349b0dbbb06f109a7d0552b36b42e9d02b98f16a05e6365e57fe7586c50ef test1/2582 0
-7480942e415e89e2f9e7cb39b47fe098871d21e67b4d8ef5011cb49770a382cf test1/2583 0
-1f90792140613aeb30216351fd39c81d019d785fe0b86406e95f47ed5d7cef30 test1/2584 0
-d4be82cbb9bf3872fc3361bff5b176144f11bc4331a94eda455169b8bce279e3 test1/2585 0
-4f41d215cd2bd2283d8bca7f4918863c500be9334bddef5ee7734fdfe2da23be test1/2586 0
-b800e393a322693b5de86fe05486f4e57fba68726d94cc04d090b184db493e9f test1/2587 0
-58ff503b9c148a5d4c97f58d48911e3f7d56dfa5b7e5dda52d3100f7cd455d3c test1/2588 0
-440a847c7ccdaa4c9fd53e806ad424a36b5dc09f86f649c3d4509afb9d2a6c52 test1/2589 0
-9dd9fc8f387932a03f42b04e363bbcb744675716ca93fd4ee6a3ea187e14f004 test1/2590 0
-5a6c333f77534afc1033c26ecda96ba9fc6ede4161e85193ffdc6918ab0e5a5a test1/2591 0
-da5b5ff8b1e42aa0243989243803027b2bef832fff5d4abd7f90ee58967b450f test1/2592 0
-2d4c63c06f24ec40564fec83adedbc9f97adfc42deb40b0dfe3140a5d8aaaf05 test1/2593 0
-adf7e8a09037a6f214d46b744ac00a809fdafb897750a8517a282b35858270df test1/2594 0
-c7000e796aae80195c7e6925385cb1f90e4b361e626bef95ce73c8f65844cc6c test1/2595 0
-80ef6af296fc3573a3967cda657d94b2d2cc40c6943ffc9f88706da571a1cc9b test1/2596 0
-6b8b28c92cef6d8567235008a40277e5d6978eb09accee06e8cab75c1e43e680 test1/2597 0
-1a084399f4a47e965a7353248854793b5469388de7971a695a08fb28f9a7e417 test1/2598 0
-d3be5898b453a959ad0965401556d484cf96897b82d0c601e35b6f6ef7f22e6c test1/2599 0
-aeb51840f21ff92f628f09caa450587f6696b84b772505eccd1588e72baa0534 test1/2600 0
-75df14f569ab79fea8e876239f8a4665a42b2925d939c89eca47bd1b38f6fa03 test1/2601 0
-ede645f1afcd72b9281136918e07ef92149f63a87455fc221e248eaccd615b92 test1/2602 0
-1f2ad6e876606d908092fe87f5fe7e1a422583e1d7320a6fc2ec47f65c3483a0 test1/2603 0
-dec530acbeeb1a9093b7d293a72c07b20c905a00e17bb0b2cabf9f7dbeeddb5e test1/2604 0
-f9c4c3f43430e84cc3968a393e74131e9e0c617a10c12906cffe8ae73c380f95 test1/2605 0
-3e90299c7d0b50990218b0e5a929e6617b3025988386364a93d32a545c44e960 test1/2606 0
-c4a18d255aaa53d32b6e5b4f72c42a0fb08d5f130011acd0428807d1d2b90038 test1/2607 0
-a604283de549ce9fff597f8019d04cafb083882a64a329ad79905ca207030f7e test1/2608 0
-59faab148feceef49fd4c419ca691e08a14beda15eac58f09a8bc1a9c2530b83 test1/2609 0
-959c713c6257d485349181315569ca25ec9f68325ccf9add79c2273e26fe5cc3 test1/2610 0
-e137dff00155318da845cbf0e1923d53877605f317f625f86e358735ac525c01 test1/2611 0
-978f975e2b8bf0373a45b08fbeceea38ba4195b919bb7902d4d3d94f36949742 test1/2612 0
-f8e3f8d2989beca09efbfa4b0ede4475438afcc077fce6ebf218f873f09f7235 test1/2613 0
-7ae1418f30048b47aa06ac9ad4bd44eb14a846fab3b277e12a7af406c924e7ec test1/2614 0
-4551aad2002bfbc5c048449bbe090115968847e9ae8a64fca1a0d750b35c67ad test1/2615 0
-5deeda89c99ea75da963ebe78ba068153728b924414e4767994281c699aa1696 test1/2616 0
-ee516a35bdb7dda3cb36fb88e3e22bb71c9da44558029a0625b87cd0806a7c40 test1/2617 0
-70c3a782784d4a8e1d19b6e45907894ccbc671cb42f95a8f589e172b738fe8a1 test1/2618 0
-b6784b35d030716817d2e9d132d89ec49a5d40aa683b1c0f4e142357bb19d9f9 test1/2619 0
-f11e996b113c67315948e98716e347e4cec95a7fcc5013d06ca65a5c3fbbed50 test1/2620 0
-d83c370d132615030815745e7296d4f36475ffe4b3688c6e480c7b6fd0dbf452 test1/2621 0
-3d14750a7431566ac92eab9db743457dc3fae3f90d2d2a5d98015cb2366b89eb test1/2622 0
-53a1edf54af3ab247a316f20e4c410a50ae72d0867a4bc398cf34feb1ff258a0 test1/2623 0
-ce2f6cd957a51cb357db5115a636e2fdc0ae28e4977eaf35d84d25520e714727 test1/2624 0
-689ff51db54aa787098fd6fe108a93e2e047940d87133a83f38c45c619151c4a test1/2625 0
-e04b6704ebe46f85fc97148bda1320afb49dfdf6b12e2742e2182d04350597c8 test1/2626 0
-b709ede581f63362a297a00d87ee7a75afc287a0a3bf2cd2c953a9536fbc9d2f test1/2627 0
-a5e6de32fe6c9647d89cfc0ddf9ef9d996073829b98c6e8908cb13bda539fcda test1/2628 0
-769f4a92d4a8e52e72a7d8e0ae0883848c693a23f020b608d1918206ec191931 test1/2629 0
-ac2fde4cf2ec3169066dcf33b05e8c2fb1fc7f30ae6c4cbe60f889caee3e294b test1/2630 0
-50d473ee6e0faf16685988bb6f97007ee41c99b887b2e86e8567106ea3b848c1 test1/2631 0
-d3b1cdb74ea1d30ead937bf0dbed8a0e7c77e25c2cabecbbd8c446a190c1c5e5 test1/2632 0
-c80f793dd229e605979ed526ebd05a639d6175fbd352ce65234289a8b722bfa7 test1/2633 0
-edd42aa56c61ab42e93cceb8d3244d808da21c9fdc778ea8c4e49e395c685ada test1/2634 0
-9131982d3c7963d4ec03f3efb9c0c48da71a31581a1da7e64abac3e4debf935a test1/2635 0
-7b1fb748375a63297859ab876e9ffb0403ffb0d1051054cc63d97449cc005d13 test1/2636 0
-2067154697286dcc5ed79315e9b5e006b4cdf0a36e9add2147e4c15ed9526965 test1/2637 0
-7d4f7db629b86efc08c862f92e5f907c463e47aa62dd48da092b90fd1a9056e4 test1/2638 0
-56be074866fcd9015f59f70366fd03126bfb9025f5e044b7f3e21d4c98bd084b test1/2639 0
-fd636f79ec0c89c222775b258c2d9d53ea9c5f0e73978a9df00e3396381573e0 test1/2640 0
-e52698d8433e2d064f2cb3d4c25200e89db170bd79386efe188a8e8b67f865d9 test1/2641 0
-45875db8a1cd318ea04f7a311faf96c23b97eefb0a8ea13245a9f570f09d1651 test1/2642 0
-57fded8a8ff9e96e37cea9a96d97f03d6b42fb44b631658afabe066cced41c1d test1/2643 0
-de5a55cd978e90f40565125b41cacc480a941747ac14b8cc322b8497b6beb893 test1/2644 0
-1e1d47fbbc89cd06ed4f36b1620bfc695f04681a383248d312c1e89a4e632b7f test1/2645 0
-62c84612f92dd7c6dca8beb05d419e7871dc287d62ec93205ec2bed8fb279b3b test1/2646 0
-ee83a40340ccef3debff281f872265de1654f6fc8ce16c26b798e08125efc236 test1/2647 0
-979de8e83429153f2894f24f7b5f0587a5062adbd6c7c51f9db86f9f2745c086 test1/2648 0
-3eaa83a4deb540c2c0f24d07749e5baf629bff655b8499dae8fd3a8f5f1c8573 test1/2649 0
-d033a76f7df198b3c414f94c7c594df3da83823335dfc468226c50367edc82bf test1/2650 0
-c224af2bf464045316df3b4588a4fccbd733bacb8cc71e53a0c5ca95c1ce3c59 test1/2651 0
-12d83ac788b102d1a4eadd3f163cb4e29397d59db2c0263ad03eb9d731015826 test1/2652 0
-a762bb6a860d9d58574f3d354f44e13b75ebc0945c4d645421cca50ef6487f07 test1/2653 0
-6999d04374f1a0d9b9b05966d7962288744929959e9825dfcc45a4dabd97057d test1/2654 0
-56b1c9e8489a2ffe532b6c1462a3a8c22c1391f4bb2389fc04f6dbadc429ab10 test1/2655 0
-92f33ca0c58e866b5df4ed6e65a4959001ff0c1edf7ddc94e28f3a765b3d25bc test1/2656 0
-f5cde198374e97e888730b0a32e3501e5a1bac8c816829c24c6444f7ee5aea9d test1/2657 0
-b4c9afeb855bb9f630fe8bdcf939d781694d02aedf7cbd1a1824ed0be678b167 test1/2658 0
-6bec70eb9222f4b6de05ed28fd670a8d9ee20d41298a7c7ae41fb279551a2842 test1/2659 0
-ff1b5b16130c81a0735ed96e90f32079fe10511a5b7966fd6619ec5a5b0bc21b test1/2660 0
-a21872fda210e1c11ef51928ba8ed0f13dc539fb2136a0238dcc3c0cf9600406 test1/2661 0
-222b1ac105525d8b3e8ca260590d9408abf414de10da6b06e437efdbb6797db2 test1/2662 0
-d597f9b638f8394d8716731e0aef376cfbf148d334dcb27a4b0aaf97f2c16ae2 test1/2663 0
-5788d35217e0a281f0d5d788765d2ae393dde3243601abf69e9d9178f9d3d8b4 test1/2664 0
-9523240de24932826d1637521ec2dafcecbfece93a37836fbb432753520c88d1 test1/2665 0
-03cba944c72766f53d5096919897b6c5cd389b1b13d06c50cc8e7dfa37232554 test1/2666 0
-7efb8d8590e846d6bffdfec91d7d310b99fee8d9a145dfc6ebf3e690ddd7ffe5 test1/2667 0
-4c7900fcd1763191b15071947a9591dbdd489bd7f6e9b93388be35bff0177c9e test1/2668 0
-058453bd6f0ab66fcc6d414f01d6d6de6a65cec591413d2fb71b2c9355894630 test1/2669 0
-b65046d1300481c0c87cb00d9a777efeaf1165b939650850752fd56cd049370d test1/2670 0
-72e8efc1d8d3dc9079f4f72339bdb86d19cb06e8705c2eae54c92b78b199518d test1/2671 0
-6bef39534de0075b1e6f0602b6c6581eff6029155846a48ecc9b2bd0e3d9be64 test1/2672 0
-724d1ac3f19231841a87b6472fa192c0904b394821fa4bfe6f49dc302289277a test1/2673 0
-2c8f131f7f87be27eff1fed447c0be36aa8fad210c1a4f5184ea726e6c90197e test1/2674 0
-233afdc8e6c58d513cf1bdcf7c074f460c6cb2f5a03d6a48ae26398199fa1983 test1/2675 0
-1ec9e28acf9a4d407cd47e3933026efe4541818013309dad184a7d1b40c40274 test1/2676 0
-fcde01a335625de61a3507b315eeda9ebfd8bc5f4b91131364e97aa9301d721b test1/2677 0
-2511e253eee15ce87cc868f7cab762b77831123a65ae2626f7f95604a333e14a test1/2678 0
-958712ed8e0368faa673b547ffca68955a35fdfbf7c32556f8199eec84c50276 test1/2679 0
-48f468667444cb3ad8da3f2544d0aa49237546c41a3872c779b56e75f4eace59 test1/2680 0
-1ebe6030cc1ede1cb846b1c789e9ea302d307ed1fabd60158335dee2fa3984f9 test1/2681 0
-7534112fedd80b9f9e330cbfc0089b8ed03cc481c724f14a9eb5db38e10e98c6 test1/2682 0
-0868308d650afb3998070b187fb42f3c87a510e95c868f686efd67650abf33aa test1/2683 0
-99048c6dcc7c4ea0542a57e5377aac27167a56ff54ee28a20ea284d1cc5bbe09 test1/2684 0
-a403200272e2bb97a73c0b43fef53df5240521792cb4d424713b1c2d8c818464 test1/2685 0
-d2ff826a1f7cbd24c40fb50a819b37490ca31af8dfdc94174c16055e64febc55 test1/2686 0
-6a9af39108789ab73870afa2645a01f147ef85d45680030d3d065a54779a0bfb test1/2687 0
-0566619e5c095768f1ab36fd2b8fb4f974a841b9234271311f951837741e4f05 test1/2688 0
-ad2134cb7b5fe2a73ab3168cf43d0b497655e58076f2ca34687685b248deaf7e test1/2689 0
-60f0a8e61e3b6585b87ac7daf614eab7ab0d6ba3554ac51d10298164f9660d16 test1/2690 0
-2735b8132215bfbb9f5e5ba78ab02d46fa9a08f6878a433df45219f338515412 test1/2691 0
-916d702a7bf5835073d0f15101a9445c536f4a65b664cfcb71b6bb9abe3d4931 test1/2692 0
-dbfa603a22fce058932a89f15c0325115c9475d354da59d5115b0fed9973b63d test1/2693 0
-53e57f96e5591f71ccf92bd3af3bf0290cbfded399f18bce3b1cde77aaeaa74b test1/2694 0
-56995926e7e6f3ddaad6b60da5bfa464ada75eadbe69b556714ec421933a1d68 test1/2695 0
-2b4b77402caa67e6da32f3578d513b3c7f2df09fbcadb1ad0385dc73fe198da8 test1/2696 0
-c80b4e4dff2659bb4e4530a2d2febc944bd2022626c25ee43d539235991dd289 test1/2697 0
-89b2aadf363ef26d79ead65461f4c16f9e7343a7a14d40d338b76f9c439dc342 test1/2698 0
-fd9bf6e76a7b97ad2e2d588662746e92a9957fb8184e9dde67cb840b73cffefa test1/2699 0
-1b307c670076a7fe8e643900b1391e50efef80ac228559e91aefa9f6ef868890 test1/2700 0
-0fcc0ad6bcad924ca70d42bfe2b31c1ba0ff57ee70ebcf09a080edec0e28630c test1/2701 0
-b3f469ebaf2db6d71ea9ef92656e8f2b6cef1f245746a17d5b0468b16e2d7050 test1/2702 0
-cb4321050b3d8de90d7860d80e25dc75ea5404082ec4d3e07a9c5d0668121877 test1/2703 0
-7a5252a5df3218d5e3781e9df6eefc3330273587a6357d3c9327df7a2228de5b test1/2704 0
-ffa3f379c8f4e8902068218fa859c666b2882cac57739b0e788ef26195f49267 test1/2705 0
-8d96a594ad8c72b5164af7f8935234aa0014ed7d5c7e0433ba23727faa52be69 test1/2706 0
-e93bc9daf5d932389f2a8d24db2121ea5421c3ac983b0429b8596b6b1170319b test1/2707 0
-d2b1f9e1b7c2f82c7cc26ebae36a15600742ceaac35c2da8246fbfca0c18c250 test1/2708 0
-f583bcfd2fcd62fabea7b1f9d40f28993dde568e9e25a3a2f7c0ace1a0a76d19 test1/2709 0
-ecbc43ef9300e1589a0d095c6e3d0dd9abb7892c38a0a33f4721251ec9cb10c2 test1/2710 0
-1d88a23e7ac64cef925a57f042f59d7e93e3c7d7c7c4c1bd206e1fc2c4b3fa31 test1/2711 0
-b979e880281bbddaab2e6a1bd684ea37146e4bb35369b3a9502a5da3279a6619 test1/2712 0
-c0e4eb4568904ad4270a080d8b7e9b1cba08f0ad7ec75bc25b1b45e714c0aa0c test1/2713 0
-f03dc6fa2732c5946f70b45c80d0912d8ca8520ad9256cda029f976b6604ea70 test1/2714 0
-97a9f36c9dc9a10b889643348cdf9c851b9eeda92e91dfb36796146ad19ec860 test1/2715 0
-d7fe35a4b544245098ce0356531524ebe15d3ea99a2ece46aadd7938ffbd538e test1/2716 0
-2367cc37222c46fabdd517953cd8c90fe3de2dd13a20289f4557af6988134dbf test1/2717 0
-df57bb54b0fe7ee254bf9463d8c304e6f63388f954702e9f4d909dfb9b08e8d8 test1/2718 0
-dde9410c5b8de527e80ab3cbd470599f581370b9114c742846f194706055bf6f test1/2719 0
-4c65df0c35b0506736c70bba74be4668376acffb58bf00a66a09b1d7251f762d test1/2720 0
-068d2ed00a64507a115ba03c4c06ccd3e6bc76cb77c1e3d4f278c09d92cf9358 test1/2721 0
-29487197526916b219f8261f29e37ea5caaa3a910f318d9c197297ecd71ba571 test1/2722 0
-5937542e90f1fcfa0b9d443f46c0245d24c4328ee32abe42a8ec8ffdb5a338a9 test1/2723 0
-84335a191914666d79044d9f99034b128572d16dd1b3b049531f34e5fb0ec8da test1/2724 0
-6a96ddb7b8f8dc66f3dc56f5ddbac111c0b19b58de73c83239885cb316e91f9b test1/2725 0
-adbec1a38804f6de1c75c5f6bbe783d0b1d44caf17d29ff0892db3b86cc73133 test1/2726 0
-721f2364d865b73032768397b13aa610f67970216212b5e27d03f3afd0df2083 test1/2727 0
-8261447bbf8d1111b88abef54d79bf3eb186ef1afbc397b687d69edd078ebd0f test1/2728 0
-bd08e9bbb24b148d51dcfac4d17f4c555d902c89d30eaeb0798c414c32085578 test1/2729 0
-247080865d74134e1e8621b356c50dcac01e245cef4912d6f6cc13fd53ca2dfd test1/2730 0
-e66db873457c7077bda396081dc462bbb4f8c5fa37ec9abe9b0b8364ad0167ea test1/2731 0
-837bf596c36cad8a5ccd7f37d88105479dbff59222220c915b232f838b19ae22 test1/2732 0
-2da8733bfb643b45e63e02d159115097cc11a13550d8b00ece734981daa773da test1/2733 0
-c8ecb6e1b53b5b15e689edf18f10b76056504fc7405606fb647fd52f8c67128a test1/2734 0
-9b9b5b36b026de625b9a4ffa6f5a77cf8c99f63cf9921b75b170d0f734bcdee0 test1/2735 0
-7151f4da57d4c108da4de89b264fbadcf9700c5b9f72ddec8270abde186b7e7e test1/2736 0
-b8c017aac0f91a7eb3815271f0ce56fcfa992cd2bee71d37355ccef4f4a4c4e6 test1/2737 0
-e63fd20be5465bf3b30e0585a6fd2af215906d130ef02be099020a5a904aed77 test1/2738 0
-b0173d1cdc7578b8755f831d5bc89a0826acafd0a5e1c7e7963f201cc0721c79 test1/2739 0
-f55191a518e7717fd294497a619ce742eab8f926bf86b5c45c46ca780e739533 test1/2740 0
-bdd209dfe960ca0cb37c104494ff09b11d3091235529ae371efdc3e9e006fb89 test1/2741 0
-dc87c01d17c9eb17f848255253e0467a9823c688118a5b70afde7c00c317bd59 test1/2742 0
-3ee0a88d08b1980ff7252904566842045561dea1471c85ef25b3e9b7ed5f9201 test1/2743 0
-b0a691e475d31e93bc5b7734a750e979f06d9b937470b573fb409d1d76366711 test1/2744 0
-06671f3d57f55e69c3ff808e80d8cb782bb1a85b351da71b622ce3d5c39c9c47 test1/2745 0
-254d5aa681c73090dfb40def5c43fb403a947dec3f401c723e0d8a66e5d53892 test1/2746 0
-a491d1e60f56a22e549024c2b1c5087b34c8d8d180dc2deabec5db9e37afcbf8 test1/2747 0
-2819f2773cc3138249a33169777d76ddfd0f8b10b1b98a00e5421d5a0d67d107 test1/2748 0
-249f4e9ed9d77df4e5db010c56e45232d024ca640dc99c4347998614f7714bd1 test1/2749 0
-53bc66337856e257894be40f306dacb478d02e9bdd570ef1f74fed854b02b1a6 test1/2750 0
-4346d0ddb12f4bf1acff1357366f6b06c52721cbf935040bf198369c3568e8ad test1/2751 0
-762a09192187f117a8f7450c0baa9bf3c5006eacba0f16e9eabd0146711bf15a test1/2752 0
-0d92124b4d72a3e13b86f6c5c4342fb0945e8777cc30c355bb75b311697b6930 test1/2753 0
-6f75088fb5d391fc98e2f0032183a2d7092873dd8a016af45c83440aa851b1a6 test1/2754 0
-166e51319c115c02320faf4beebdaf8ded62659c414f1faaf30a732ecc1271e6 test1/2755 0
-563f91ee9a9d42b59171d989fb1eda46599d3033c14a3af8c4e7d3d84784204c test1/2756 0
-626d16eb8c89355316f7fa68e207e3bd8be6471d750569ae081486330a30c1d9 test1/2757 0
-6c76b83a5aadeb87b71ec6150d8272707963eace6ac80ecb740dd4a0f9f4e317 test1/2758 0
-1902ca38727744c5ca4308511ac35cb62a966076d435f0a2ae89ea89ac9b7bcb test1/2759 0
-8ae330b5651ee1387a59eead34c3d14f1341d5f8d4c6565d0348edd269e86d32 test1/2760 0
-f4dad3e97d12b358e2178c92eca1c84b1e1a2000ce7b35375f6d5dcd4fae58f8 test1/2761 0
-d27f3c0ad17fddbb1f374ada0167fddc76db17a80991c3ac4528fca93c91383a test1/2762 0
-bfa2f7e0ba4d50b4729d38b02c867655b5597d4ef771115341dd946c5460e5f9 test1/2763 0
-bfe3e2270f28817b82d1560e1073915537078582ca5ede64d87e8deffc37dfb1 test1/2764 0
-ce5f28c43449082f0fd4970f4b22bc050d822f82f0c06464b64f98bcf5ae05a7 test1/2765 0
-3d7feb160c2264519ca2090d51dcfa7cf87334de713acb95cce4ed93095b4203 test1/2766 0
-8e614681a8e308a61c661c5b1b7a40e26bcf3d07fa9cdeb1cd0fd19ecfab35e2 test1/2767 0
-e098e11351ddec9064424724ae0e7f1304c5d1935692ee2d627fbbd301fcec45 test1/2768 0
-3b0b856e1738e22c3aa08522476bdb88f30259d02738d780b069ab293c018f2e test1/2769 0
-43d6419bd978f32508c6d9beb49b6acff0a7bbb81430863ca83c37176f2239af test1/2770 0
-2b707794ff138d9995b33e1871e58fbd94c5cba44bdf5d0768e9d627ed259e8b test1/2771 0
-28c6b28f7d59f9485c1ed9739ba4cd9f3e78f99c9216d529e5a44f2c9a98482c test1/2772 0
-6c6da015baf87d34c377a14a3692b95591b38e29e18a07aa626ad1be71a6ae05 test1/2773 0
-a173536e20bea77df4e52885c33519c807cb61ebed44ffad188de74e9a4e0333 test1/2774 0
-856907c7e81380e79669b2b585485d759a0b5180d7f662028b1315f750ce49e4 test1/2775 0
-3b2f6d3fe6eedeebb545de74aa5359c8c1bb52ec4672e25b18ca95c98c333c57 test1/2776 0
-54e143dc7235cc659d9d73478763d0412397259cfa76208dc2e685c4745d36b9 test1/2777 0
-e3b8acf4d29daa138f00b2d6522f90be9d2d6a7d5edcab47bd5d07e6925ad569 test1/2778 0
-0a368be2eb9343f5815b2abacab9402ba2bdcc280f50791d558bb3b02d279126 test1/2779 0
-1b5e1b0405c2e60ff7a546c629f92bfea7af2e260788106cfff75615803c350f test1/2780 0
-7be67cddd5a04a030275d83a82557b3d4b1406d8666699d092e15aa9392c9b6f test1/2781 0
-23fa1831330d7c1bc1113b7a5cb8b6bdad3adc29afb3c00af0b54fb362358d8c test1/2782 0
-04ab385b924b44e2089f008ce7d9d51fb4922fd487c9f31a30b4beac28a6ba20 test1/2783 0
-2541d0efaa04cc67510404b142f0445fd9020c5cd740b561f5e7b17b6c748312 test1/2784 0
-774739f36525e002a20ba9771479cc0d99173ce7ecdf5d6b5def20042d9bdf6f test1/2785 0
-d1ae6b1d27dbebd56150da15e9a079ee6f0c0472fc05a8c68d7b7390f837d29c test1/2786 0
-54d06f58c6d694910b3a792b8505651b1927e156d02dfe1c8d284936bbcb5e37 test1/2787 0
-020c88ca8000285074b8943e878940fcdb2bb1efeab59c2a27686d5f48bd5329 test1/2788 0
-44a1f3bbfac5d534e46b2abd8b080375d85e8e9dee35952b633014171e1ecf6b test1/2789 0
-f0e1042a16471aae14f7f5e155a80d25beccf86e99b3ffddd095b61fc26acc6b test1/2790 0
-1bac752e66ab182bccbac1148af675928fcab37fe3a1227fb0af2ca6dae8ad97 test1/2791 0
-e1ea734db508a6c87d0b743d4343588d063e2b25d11520ca54cae8283370de6e test1/2792 0
-60166301d140495d61f1c6942578fee8b0f09943199d1da80da311bdf0f7ecee test1/2793 0
-b9ab514e951977831bb8fc0629edcfb6dff7543cbb2280e8ab32d306616c50e6 test1/2794 0
-e907538330f62cffe737dc9b889d507a5cb3441ca21ef98a021de9c8208a0c2c test1/2795 0
-408134e380e511d9344238f1ed457e6631170f558d222662416a8770d3a2d942 test1/2796 0
-de52ef403fd781f1de82be3b219a07de4343cf8c4d29a5af95a74da6082caca6 test1/2797 0
-fa99431bd1847b4a5ce4f88ff77747e57c1a16af46e223c613e9472d2624b898 test1/2798 0
-d97d1b798ddf2842a7c5ac7d78a12537dab27d15acb0b3dafcfba5f89ce49c97 test1/2799 0
-c933acf9fb14347b5aac3241a0ba345d244f203a21e21b684afc47d210f36710 test1/2800 0
-0e6785a5da77e6acfa84b5aff90ef6a2066583d56b6a75e65fde0d4f0b3959f6 test1/2801 0
-78495d6af176c87e9403d1e227abecc1b48975cdcaccf6bea0c956447296ba88 test1/2802 0
-f01360eb90567167ecd3fce3889253c793ffb3a3809da91288efb3fc262460cf test1/2803 0
-0925b51ebf24b0593d5407f26e4c898dcfaacd7f612c02426bad9811189c1cc7 test1/2804 0
-c3bad171e54ccd54e29ca095abc5ff1e23afe571ed37134d29fa544beeca33f5 test1/2805 0
-839bb33da65182cea98e7dfb371b0b70ab78b92c9e932d9081840d443af5e2da test1/2806 0
-992c5709d26a731cc4f361d28e30fe9a91e1e7c2f2001d07ceaa5f6c652f5eb3 test1/2807 0
-53948bfb8c160b3e8ca1aa4e88f5b378d1c4b7953f9d41fcf5edc8b4e8ca4f88 test1/2808 0
-5053cd6b087f3dbf15eff0b772c66961280352c6b903da4c459d70b44c5050cd test1/2809 0
-083b8beb46c944836fe67fade2a652aa478acbf27d982074687afef531fcad26 test1/2810 0
-e2efef66749b799c0c48229dcac2e6559d00cb092525571817d3dbf12a14f55e test1/2811 0
-d6d2b6c9964f435e34c728d29510109cd8956b2ad0425be9e1475dc1a2de73e3 test1/2812 0
-77b3cdb3d6b6a18899b4f2967f5544d684b19779554b634d3bc010361c641c2e test1/2813 0
-65e361bc6f4f6e163faa4fbe1307af1511b3c229a891bd33034f005cf7ec3d4f test1/2814 0
-9c05a66ef663f73d0eeec2e150dac656da117c6a344e1121aae502e83be2aad9 test1/2815 0
-d374144dd06d0a0902c44152e90788836ac470e5c1ed889e79acc286c42d18bc test1/2816 0
-405fa95b7a2ef8a5804ffeac06f74a053230f600bde58e2567e89c3b7e25f006 test1/2817 0
-e73595adab5ab8a8fd7f6397560942844565a23682b23696569d346e134651f9 test1/2818 0
-b848bd518dc93690a45a1edf2ac0146863ecf23ecec09062dc6a59c614b98683 test1/2819 0
-10bbbbf0f9bc8d82878cff3fb8968eb800a43a39f27291e8d1d63d1dcd53f197 test1/2820 0
-a90df09df42883dc08bad2de757d7c76aafedc1ff958e04bd799055d2680e586 test1/2821 0
-2517b444dd840e26c5d3e73406a27a17ce82befa1ca45109de63633ea27a07f7 test1/2822 0
-3565124ad54da806395bf170fdb5a1760449eb71e4fda0702a75d5734a3818cb test1/2823 0
-545f4bc96398572f9bafd8733224e0916e8c2391a68c5a3319dca82cee786b9b test1/2824 0
-69fbba40b4c151022207eb85297833834924e6df73fbba056528b857ff1a29cb test1/2825 0
-82fb44afff495b00ee99650bd414785bd030e59b2502db475f96c8294bab28a6 test1/2826 0
-380c2673b7c495c9e21d3b2891df197d32a82c03ccddf5b410f560d62df8a043 test1/2827 0
-2d631979aec8ca003dc609dcc8b9c5a4e94a5c8e6ae11be1c10810cb707e4fb0 test1/2828 0
-01adca85e263997fb00a79da16916cd1386511e1479fa49ece67a5cc93804d18 test1/2829 0
-292918ea9572aea300bc8e99f29f201e62d2e770b5294636b15d639fa90eafc0 test1/2830 0
-384eb796c091a7db47ed5512413edd4822b018e0e3f4ae9160149ae274df0b8d test1/2831 0
-072b56a55a44268d8f9a281fca21b2058f2316aeb0ac5f1c5f0d11464f3f9005 test1/2832 0
-f1088639cf58d6448442f9c66cff895f21c676e3df51129d98dc75bdaa83c950 test1/2833 0
-d67e9483962293944f61c64eeef45c85a88c6a6a001fdaa20ba288fb7ed3b81b test1/2834 0
-4121d1448514bf26f59ded75d4dbd49e4e07a91c262f4cbb3960123ab59e880e test1/2835 0
-c2f8d62b9fd4198a1754397b8323cd463cc08c266b97d450626aad9ec39268fa test1/2836 0
-85899bb54bc996c3a1cc87073d70afd5292c96bbb17052b7adb3edb174e532f5 test1/2837 0
-2ac782b7fef6b7a375069acc3f398b70014a01c33fb733faf66fc4885864930b test1/2838 0
-f7e18b2b565d5169bde4fd8b7ade9412a3c098379eb754758833f824eb171682 test1/2839 0
-019c32c27a9c2d46b8738e4e39beb66a40f491538046a532c734e037092794b0 test1/2840 0
-af5a5e7edf8080551bfaf5482cc1102e3fa0e587621c8fb17f82160b20132b9f test1/2841 0
-a7f8bf12a956b01e1c94bed5c7ae556597c3fc387ea92160042d039583355f32 test1/2842 0
-48b4cc523441bd6e03b0c52053365463f76a49beeebc6faf6ebdfeed26db7236 test1/2843 0
-5bc6dfcab6356c8c3505a6ee4d5154580b99b0ee56331aa11618ab9101df45f3 test1/2844 0
-fcffdcaa6fac8219a083d16f751357b50ef45bd8e451095ea7e15fac70ad4b66 test1/2845 0
-dbec24bcf178b405ad8a234613eb3d522158205b14d550abb53edd5bacb0d6e1 test1/2846 0
-260b360df02c65885f6b655c63fc029b00650239d1f05017d5eb0955faf25fcb test1/2847 0
-ec295d4c4674f0e1592fa54c692728a8354eaac80b6825db165780f15325e72e test1/2848 0
-36612898d09267b076cea4c9ae8b3b8de9ecb808c81d4d75a46ddce310122d10 test1/2849 0
-4f8c0f2242625c4720ab49603e655633e21485aff5b1fd481fbfc865901c60dc test1/2850 0
-4847c377188e1209cb8b95c899459d8542f165985cc2847a63d0d28ccb3c48ce test1/2851 0
-92e70d0d27d373cd4b3d92ca1762af9d17e03f580c25215c8157db228c66c0e0 test1/2852 0
-cdeaf99d365d46e148105ed3a6a6f67063271e5e602c6c8df69fd305e75efc18 test1/2853 0
-a7694916a18aca2d06aa7da3d674e22e9cd255cb2bc3a95152594bdf83da4c1e test1/2854 0
-d84d4ba36dd1a0cc786a6ab62329be975f8ac7a328f5771d0f4112f0324d56a2 test1/2855 0
-59341229662ea779d8d63cba45d5c3715fa4c33c89d54e1daf5b97da54fba98d test1/2856 0
-798bc95ad41f69192d2eae69c0ec2fcca50c1e9d97103473bdde3942aea124ed test1/2857 0
-cb2403e10ee67f42365b04dfbff267611a762bad418c76911323a8a628933880 test1/2858 0
-46de72422906d92199355d8d09224de13fe37fec01eb16a5032942fb7136df73 test1/2859 0
-66b3daeca3efb9498d21139cfaed05f625646ca62617d29cbf221fb8265b95d1 test1/2860 0
-d52da1d6b89d8659dbf1a7859ecafdf507aba21e017d1d1297c82280b4433838 test1/2861 0
-9b730b0d51f81fafe1674d248d37e58f6221ffea87b52735ad5fd670a706eb13 test1/2862 0
-4cd71e83488c8110c91a8b777e77766c70f4e8f6b75481798ecdb5c87a441804 test1/2863 0
-b49f40aa3fc9559c4f8c0c6a5e3afef74cc2e021e98d4bbc56b056a22bd33da7 test1/2864 0
-7de6145c104777db6292857431c5af53b1ecca0c1669ea974b97a313016f2fa9 test1/2865 0
-27f3592790b591c2738ae6a5f7b4d39f80e5a61c3c20614600a0f33e58371f7e test1/2866 0
-99ed7c6ac36358c24f06cf03e4d7073206716cf72e3185629e19aef34f4570bb test1/2867 0
-22d412ebbad4b38a1843a46c3563d67a5a7c0218cceca4c33423e299dd40415b test1/2868 0
-fed498be36cb2c0bb64ae9ea368de78003a46078968cc720a2acec1a2f76b0fa test1/2869 0
-c05776cf90e1ae00f43066b11980fe2923e6933179b91b3de7eb496fdc78c515 test1/2870 0
-cc4b2b25aece6e645a0fbff58b71363602990536c901ebeee7a8bb20289d6fe3 test1/2871 0
-968e86bf9630aab3627aff546a5c38f5912aee8342324f4a346ed95b9d0d3d73 test1/2872 0
-8abc40591be782331284e8608ef1f82973963e152df25ec8f9891c49727be8e6 test1/2873 0
-2f3f6d9c47290fe061272cfb6106c12cafe156dc01ccaac004473d6b6beab2b2 test1/2874 0
-5143d99bafa6ba8e1ca73001eb4a41d0158dc8a0136a4c7bc685aa8bf87eec6e test1/2875 0
-4aa778e59f16f854e70cfbe3e787ea27dcb359d2ec0eaecb9901767296998ae5 test1/2876 0
-2b0b7aaa2ab0e32cdd155aab38dded95fec63e5dde52d48b39517c652e595ab6 test1/2877 0
-34a579c64648f78afa1444b1a82d3668b7b7cc80f0df136947fc2829c9c3cce4 test1/2878 0
-927773c703435160888a181409eac7ca4d18bcc91b3a9d9b576c2ccd0d275349 test1/2879 0
-7ae66d21e54997af35a0d329760a545609df5291e6deb9cd436a9472b78428af test1/2880 0
-6fee1832ac36361284f8bad53466d1408c2ce7e8bcfada1d45598611fc2dd85a test1/2881 0
-a7be3ebeccbe23eb6225a139471ec4dd7a74e24deca9daefd118ce987f0f8a7d test1/2882 0
-aae84cbf60a312439e0f1c4214bc93695706e1c4f818a067fcb2e32176766dff test1/2883 0
-4a47c600ed541c8c62b4c13032e927518575ece8f72daf4864f89ddd93afd872 test1/2884 0
-f88b2a2a37f23aee86aae3f733e5085f3bb8c827e29cc613804a771555ac1c56 test1/2885 0
-2d4a3becde98241def3019463c772fdbfd0fccf0f3fa725caecb783f70571da4 test1/2886 0
-4bdd367c3efec38e3baffa123140ec08a06b5928020778119b20dcb62c33f0a2 test1/2887 0
-6dff9f86e4665ec2800db2521e78b3acd43eb621078c306946f478b02f03f8aa test1/2888 0
-09c79b0f3d4ab407f60d6b21c4162696c3836f43ea17aa28690bfcf47f6c83c8 test1/2889 0
-b18d8c06bc9394a07c30968f38835069c947ee5583ae411c9eadd11d7da232e9 test1/2890 0
-7da561130beb7426c5f5ea68652b5f2f24812f16d795e59c133e37be7da362b2 test1/2891 0
-d3386d3f4cd0f6af673254c940e6f27f5a9f6453076c62753ac0dcc90011455c test1/2892 0
-a95f3a258819649a546ccaff18d08407315f587e83664d72d91608b33dd316d3 test1/2893 0
-393ca4dff751f3c8912dd6893e4b0a6a092bba3f5a62e2aa91a59b2122333a5e test1/2894 0
-ca2db108f8be49c3093b2b43053ae67e84b2dc7a7618e7ecbcae975ee43c1bba test1/2895 0
-96eb5e51d71b65a3e51f93973dfd09bc1a064b68a57bd8b392347de8bed43b65 test1/2896 0
-9afedae5118c62fcf3ba4c3a54aa3df5e59499d106fece050dc89298b56e8557 test1/2897 0
-fe0fadd6dbb4a3993d0a6946bc78c049ae7f83b8f0195b82694c6c4527790d14 test1/2898 0
-1beb312f8872f3cafa905b287f22ec68d861ed3fab5917f270c9d48fdf3baece test1/2899 0
-1b864a6d99d2ee3098c16062040163233cdf41d901ffcc60b839da3e26ae6570 test1/2900 0
-d4011b56de71f5e25afd4675b149023b730070f04e3cf62b8329c6b48019aa1c test1/2901 0
-09de244282999f0bf5f1ffb7ecb0c206bc72227a16dd10523bd0ec666e396c79 test1/2902 0
-54192bdbe158c797183fc248c85da09f27c44388a4edfad8b5d6b7ccd45f69de test1/2903 0
-c92a8027b0c3bdde82cc63488fa1b2b344564d5571e670af99cbb170f6eaab05 test1/2904 0
-89b094a37d64705e2c066a8856b4c9dfaf8225f7a14362004d6912a995b64d89 test1/2905 0
-505af18ba330ef3100b8e2f0c31d1d4b222d36e7d9dc3f09d8fd3ed614fcfbb0 test1/2906 0
-61178a21e17cca205adc35bfee2f7b9f3906089c38abcae39afc64c2e029864a test1/2907 0
-048a91abd2933278cc51c2e74d7c59d33c65c1443ab44944db11830ee9e7e6f6 test1/2908 0
-031415bf2dd4344a0139938a40c63a9cae953066ded086d9d25771057f1251a8 test1/2909 0
-65e266de4ff5dcee912db08f03170501d918da696089008c602db48fa1867980 test1/2910 0
-edb2b4b1ddb4c853affcbe5cb82c53582551abf42a2b4377124eed55d43e0e9d test1/2911 0
-c64ba762feb1f4568f66db59dfaf566d3ebc7c7bdca9fa03cb1a3ccc407bb2fe test1/2912 0
-94809d49af3a4705c675f17e5a70c0b7bb4b985bfa103cfc6107444bb05cac1e test1/2913 0
-16733fb82a05f876008deea7b9fc71377271177a2e41dee7457f8bd94339c01f test1/2914 0
-e47526cdd9296f6aa2cfcb5e0cd184918d4dd96d43395a7b40cc1d33ff32399e test1/2915 0
-7c746895b356845875a5319f10daec0e5bccd8964305a4ffc4b757112d1fb69f test1/2916 0
-c7e275e7e00ea5a25a0afce1cc8004845fdd8930f7651a39dd69654eadc111fe test1/2917 0
-aaf71d5580dc9c54221ebb896b256ce1a0b8aafeb5f602913f06e48e8681f464 test1/2918 0
-5b12203350172fea0fd072c45049cffa4db7da0b96b9ea2fc8dd641008f126fb test1/2919 0
-7d838f764aa9d3200bb2d2e9db2d9fd030d7f5659b24bd32f36073c4e326f0d8 test1/2920 0
-62a63042ce91113d5e6fd585692bf299041d80b59e869ac9244f397fd4d00872 test1/2921 0
-f1bc07d0fb9c5c12b41800a3ec4719a511a88d2977ce984935cb7103bcbbf671 test1/2922 0
-b8f3c3ed6335f15751b1991f999a889d884c6d0dc11da86772408594f91c3fbd test1/2923 0
-c27902b2424d33a74d6b6040d71b78026734311a0c1ccfe7d8c0b21d9cde4c56 test1/2924 0
-e0cce9853a9df4c71673743abfdaea3acddd2da91aa7172cebb0cf49be2140a8 test1/2925 0
-7cc5c4b66a7bd725ab79ef0840f8eb7d0011dcadea165a33f669f985a6ad06be test1/2926 0
-006d50c6956221642e9b4ad9cf86d4bc8bb0301e4ae71d82f2630aff4a1ac8ee test1/2927 0
-89a1577e5fb1ef0a7731b6b2d4f58476270c810396e2b22b8db13e7d75d4131c test1/2928 0
-a5453397eec6dfd1d44d59b5ab1c2368fd15bc38411c02770da66c2978c92e05 test1/2929 0
-21fa11d4da39ed740f6af427089bd1e34faab79fa456cf29f63146b27368b923 test1/2930 0
-86b882f7d19cc77981f36ae94272556032096130eff6e69cbf09b47e4302d625 test1/2931 0
-1b3363302630f77bc9ae0c2ba9d26a6cb90eb5858c01872a3681c9430e444b7e test1/2932 0
-25be3bf05a88652b4900370425a2d930a9691745bc5e111ec3dbc8c4f80cb6ff test1/2933 0
-64d05a806ae64f2ad104d188697a0f6d6e9e8ccbb4d62d25b5108e0d71fef929 test1/2934 0
-ad3553888cc380180b670eac3f168637feaf6717b59ca24bde365f02e622e5ad test1/2935 0
-dc855e3d7cd9d345637fb32638954e3c80b9da5d8acd06b4f085cc6d0bf891a8 test1/2936 0
-65044f168cd3ab38be227de1d8b7337eeb79d32c157b68c0abeb685410035742 test1/2937 0
-d2a2076ed4f19908ec2022d1e7b24a8ffadd33b935ea1aebce08d0baab13ac38 test1/2938 0
-57f3715a0f4e4d08afe25d3f21f52c14e91472a6b79d89daf123e6d9ba20d815 test1/2939 0
-cbe78f95ab31a3d8eb8070c27ec6f077b0b9b6a7d9acab619a589bdef271ade9 test1/2940 0
-0b9ad5ba4bea62b691fb3f4435041bb58108ed19bad520e5894627a0ccdbe276 test1/2941 0
-e584746c7db40c58c2fc4e188a5738cc37bd2792a0481edd8c7272ee0f22eed0 test1/2942 0
-e0f8468e3fb932e809ae8189f2e695133f3b8219864b2e9b956319351b0d6cb5 test1/2943 0
-368096572deda36211a28413a1afbee5d19ea19ea3de6f359bbf46b3bb9d98eb test1/2944 0
-8b2abf73fac61167a7545b83979d50ea3f511ab864c38de81a4dfe940d773583 test1/2945 0
-c48135d77474a97778147aa840cbb0409d5fac00bb9167c5270c209391e04b9b test1/2946 0
-2abcc0f29f41835d37b3b5d7fec41f55e73c17833503d0cb0d76bb8697b5eae2 test1/2947 0
-d9d86a738fa5002b0cb5b268c3152719e1809cde1b032849a0b34e9b0c7a066b test1/2948 0
-11652727b8431476aeb90cd8dd2cc05fcbf8d16162ebbb9d5d983802c5c81a2f test1/2949 0
-5867da820fde5940d7c0a34ed8ef397ff0c81c9dbedbc103e3cc2511d28b9aa7 test1/2950 0
-4da53e83a59212b67ee075f7bf6fa4d1b8ab898f5cb17b916551a420e4950ef3 test1/2951 0
-9e6a2d8c86e9500e5a4b7a65ad13e6757d9e7bfcff4cc88a4cc28d91765bc659 test1/2952 0
-a0b2715dc2951179de3e2d2e33131b7ce9ac9680572dd90734897dba5f98e993 test1/2953 0
-9f984e2110bc8312b987585f9254fbe5363a076ceafd45d0834789d0130fff05 test1/2954 0
-ac9593dd50e2aaf31dc843c8ccf8aaa158236cf832c306335a2b3cc6dea748af test1/2955 0
-bb610dc36b46acc9011d6de5994cc3e004a3de0d645885633b2dbbeb690fd6f7 test1/2956 0
-b37a1a5961aa6a6421e7af307d299bc8d09cdc2d3b01b4889eefc03bd49fd155 test1/2957 0
-7cf0e1faef63f78fe2993d865c39e8a425c82ed6885744994f0bce5b4dcf22fa test1/2958 0
-110c2c5a06e8b5a7e7ec2acbeb0d503ac24a5a8d799204ae0ee575b28a9035d8 test1/2959 0
-3c99c7cd555005383293c6cb1dcc7b2822dd0132d5985802dadc892a031ffff6 test1/2960 0
-26835dfed3505322dd68e556eda429873624afa628fdcb23bd02170c544cb4ef test1/2961 0
-2685cc4df39198d502e34a841b81a7a916ea891f15b77a98ff8a153c34e7225a test1/2962 0
-074a1f06c8a5deefda34e60ae30e5af271811eadedbd02e9eab11104f7fe230d test1/2963 0
-fe83d60c7099e231fd0c57edad15472272ab63a0c958df874b00e13ed0eb956f test1/2964 0
-54e48e84bcc0f774f11934f553c1687101c1e639e32ffd4cd9a9fb55eecd285e test1/2965 0
-ddd6fae9979dda839bc7dbc370530e5b3adc8445ee0caceb49519883cee83739 test1/2966 0
-a281835dbed1e4fc9deb7943a5efca05b7ac92f2839027b007e505d4bc7c3d48 test1/2967 0
-a6c9c29efefbe720a6414fc12c2fe4679ff819b5b2c771bd99474573824e73ad test1/2968 0
-7847709e0677cfd0d114158a22cbb4900714c3c276a6a313c0f5f2c1f71df5a8 test1/2969 0
-a7139a1587e08b85776a4b4dfed553b6b7d558c1221a1cefc28c1e46393562e4 test1/2970 0
-5bf5611712faf02cf71cba2ba9efcd925951d45aa4e133b97450f84289e2a5fc test1/2971 0
-172089a3515735aaf4bc246e67f83c5266a5a8ab0efe57a223f93281b4faee2a test1/2972 0
-fa0e4b2f2ee1832ebd68676f22966f65e822b85f680e0397df3d44181732844a test1/2973 0
-3486589dc8ffb845c7fd2818f47c714f9a18e0c089e862d2c9ac203d7e6f3396 test1/2974 0
-2a7357cae0796dd83fe086bc7511f34b0bb61fe6bbda091629e667d6c775f272 test1/2975 0
-c58629fa79ea48da49daee30cafb9d276b3f0467a5f7d0eb522ceb5b9ef83d50 test1/2976 0
-0938caeaffd5a4d4b2557ddf27d85a00e4b135697c70158053942eb289004f64 test1/2977 0
-468e712434715c9808554b76020a660c1df296d448eb4ebd7fcdb53830666ee5 test1/2978 0
-5dcbe597bb4be06b61622efd4ab59715fcda1f85f5b0fb3ffead038a4a7e7975 test1/2979 0
-11e8ebc6da602391abc7b3ed14709e637848a49f794987ff5336adba512cbd29 test1/2980 0
-d66bc7295eba90722a7594c2a9143e7f35a194714921cd3c7f3522122aed4ae9 test1/2981 0
-047ebf0cebf36b6a754faad01a5e3d6e5e0a77766b87f807b1ecaf59174f09da test1/2982 0
-e5351b4749017e65e064b1f152086184e46b8640c329e89db62778a3c1aa817d test1/2983 0
-3db33214f2016e78a7aa6d3f0d2827b8d5d40d3da12a3757f132de597d15c79f test1/2984 0
-08c7cc09e71ed76c82d00e325bdcc84e3a5d2cc386d2f4e03968496a96792f81 test1/2985 0
-cb88fe541000fb33b44e5b70d8c26ac8311c102a124980694d668810dca64cb1 test1/2986 0
-542472a6f3566e0d716b3758d70c2bcfc9b9d09156985867b0fb2e1a13824845 test1/2987 0
-c359e996a630ce709109376d70201bbbb22b2226280717774cbcc19f9f022c21 test1/2988 0
-7bf83c1d95e09ce3c65094da2227b786fee9cd9673c017ac38b5b783106ba27a test1/2989 0
-62e779585c02500ec2e085b07f99797a543c55b53a1bc2048e690f73ef68dcda test1/2990 0
-0f3b82a490c2d3d4caa86d8e290ee2b245c2d97b95af465246935a2f8bdb6fdf test1/2991 0
-85354ff3fee9c06ddaa34fbedb2f7b8b0890436d085de05ce1a0f7fa7f790324 test1/2992 0
-dbf4ab486ca53b2710914bb0ee8f2074c61c024e044fe41501fcd718cd2f1375 test1/2993 0
-b3083cc70ea831123e1f7756527655cbe148898d4e7810caefdfc64a436c5311 test1/2994 0
-e98d3684f784c4dd2faa96ba68a8454e65589cbbd295138604543eda293a67d6 test1/2995 0
-5e850d63c3d528db495ab68e87862655dba38526987667afe1898f6c6b3e4e2e test1/2996 0
-5b18cb632ccd3cc63f9d1a056553d419d56d398a2918b18de31a56bf9f526fa7 test1/2997 0
-16f432cdc47bd1890ee87064f3bd472b457be46ada2763d60441a20cf4dd8079 test1/2998 0
-5ea0b38d9049b021a7c39d798e2aa312659eb1db52569b0c4ccee60f5d356e57 test1/2999 0
commit 14ca408ff03ff3802fc66cd379c33ba2797eda72
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jul 21 21:06:54 2011 +0200
Test configuration writing for nested AS7-resources
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
index a89db4d..c7a4e2a 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationWriteDelegate.java
@@ -182,6 +182,9 @@ public class ConfigurationWriteDelegate implements ConfigurationFacet {
private void updateHandlePropertyMapSpecial(CompositeOperation cop, PropertyMap prop, PropertyDefinitionMap propDef) {
Map<String,Object> results = updateHandleMap(prop,propDef);
+ if (prop.get(namePropLocator)==null) {
+ throw new IllegalArgumentException("There is no element in the map with the name " + namePropLocator);
+ }
String addrVal= ((PropertySimple)prop.get(namePropLocator)).getStringValue();
Address addr = new Address(address);
addr.add(type,addrVal);
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
index 3ed04d1..ad91dac 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Address.java
@@ -41,7 +41,8 @@ public class Address {
public Address(Address other) {
this();
- path.addAll(other.path);
+ if (other!=null && other.path!=null)
+ path.addAll(other.path);
}
public Address(List<PROPERTY_VALUE> other) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
index 3afc242..4fedcd5 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Operation.java
@@ -134,5 +134,13 @@ public class Operation {
return address;
}
+ @Override
+ public String toString() {
+ return "Operation{" +
+ "operation='" + operation + '\'' +
+ ", address=" + address +
+ ", additionalProperties=" + additionalProperties +
+ '}';
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
index 3bddfd4..3510b71 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationUpdatingTest.java
@@ -222,4 +222,48 @@ public class ConfigurationUpdatingTest extends AbstractConfigurationHandlingTest
String result = mapper.writeValueAsString(cop);
}
+
+ public void test7() throws Exception {
+ ConfigurationDefinition definition = loadDescriptor("SocketBindingGroupStandalone");
+
+ FakeConnection connection = new FakeConnection();
+
+ ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(definition,connection,null);
+
+ Configuration conf = new Configuration();
+ PropertyMap propertyMap = new PropertyMap("http");
+ propertyMap.put(new PropertySimple("name","http"));
+ propertyMap.put(new PropertySimple("port",18080));
+ propertyMap.put(new PropertySimple("fixed-port",false));
+ PropertyList propertyList = new PropertyList("*");
+ propertyList.add(propertyMap);
+ conf.put(propertyList);
+ conf.put(new PropertySimple("port-offset",0));
+
+ CompositeOperation cop = delegate.updateGenerateOperationFromProperties(conf);
+
+ assert cop.numberOfSteps() == 3 : "#Steps should be 3 but were " + cop.numberOfSteps();
+ Operation step1 = cop.step(0);
+ Operation step2 = cop.step(1);
+ Operation step3 = cop.step(2);
+
+ // As we do not specify a base address when creating the delegate 0 or 1 address element is ok.
+ assert step1.getAddress().isEmpty();
+ assert step2.getAddress().size()==1;
+ assert step3.getAddress().size()==1;
+
+ assert step1.getAdditionalProperties().get("name").equals("port-offset");
+ assert step1.getAdditionalProperties().get("value").equals("0");
+
+ assert step2.getAdditionalProperties().get("name").equals("port");
+ assert step2.getAdditionalProperties().get("value").equals("18080");
+
+ assert step3.getAdditionalProperties().get("name").equals("fixed-port");
+ assert step3.getAdditionalProperties().get("value").equals("false");
+
+ assert step2.getAddress().get(0).getKey().equals("socket-binding");
+ assert step2.getAddress().get(0).getValue().equals("http");
+ assert step3.getAddress().get(0).getKey().equals("socket-binding");
+ assert step3.getAddress().get(0).getValue().equals("http");
+ }
}
diff --git a/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml b/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
index 1de7d7a..42ff024 100644
--- a/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/test/resources/test-plugin.xml
@@ -137,4 +137,41 @@
</resource-configuration>
</server>
+
+ <server name="SocketBindingGroupStandalone"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ >
+
+ <resource-configuration>
+ <c:simple-property name="default-interface" readOnly="true" displayName="Default Interface"
+ description="Default Interface for these bindings. See NetworkInterfaces for its definition"
+ required="true">
+ <c:option-source target="resource" expression="type=NetworkInterface plugin=jboss-as-7"/>
+ </c:simple-property>
+ <!-- note: at domain level there is no port-offset -->
+ <c:simple-property name="port-offset" readOnly="false" displayName="Port Offset"
+ description="Offset from standard ports for this group."
+ required="false"/>
+ <c:group name="children:socket-binding:name" displayName="Individual socket bindings">
+ <c:list-property name="*" displayName="Bindings">
+ <c:map-property name="binding">
+ <c:simple-property name="name" readOnly="true"/>
+ <c:simple-property name="interface"
+ required="false">
+ <c:option-source target="resource" expression="type=NetworkInterface plugin=jboss-as-7"/>
+ </c:simple-property>
+ <c:simple-property name="port" type="integer"/>
+ <c:simple-property name="fixed-port"
+ type="boolean" defaultValue="false"/>
+ <c:simple-property name="multicast-address" required="false"/>
+ <c:simple-property name="multicast-port" type="integer" required="false"/>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
+ </resource-configuration>
+
+ </server>
+
+
</plugin>
\ No newline at end of file
commit df80d823044c1566232df99540628507ac32e136
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 19 23:16:19 2011 -0500
Returning back to simple availability methods (no availability collectors) after getting clarifications from the mod_cluster team with regards to JMX attributes and node refresh operations.
The simple method to get availability now works correctly for mod_cluster resources.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 8512ed5..42a1d6e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -42,15 +42,19 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
- ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(
- proxyInfo.getAvailableContexts().indexOf(context));
+ int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
+
+ if (indexOfCurrentContext != -1) {
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
- if (currentContext.isEnabled()) {
- return AvailabilityType.UP;
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
}
return AvailabilityType.DOWN;
@@ -68,12 +72,18 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+ Object[] configuration = null;
+ if ("stopContext".equals(name)) {
+ configuration = new Object[] { context.getHost(), context.getPath(),
+ parameters.getSimple("timeout").getLongValue(), parameters.getSimple("unit").getStringValue() };
+ } else {
+ configuration = new Object[] { context.getHost(), context.getPath() };
+ }
+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
-
- Object resultObject = getEmsBean().getOperation(name).invoke(
- new Object[] { context.getHost(), context.getPath() });
+ Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
return new OperationResult(String.valueOf(resultObject));
} finally {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index e6495a1..52dd287 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,13 +18,7 @@
*/
package org.rhq.plugins.modcluster;
-import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
-import org.rhq.core.pluginapi.availability.AvailabilityFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -33,66 +27,18 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
- private AvailabilityCollectorRunnable availabilityCollector;
-
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
- */
- @Override
- public void start(ResourceContext context) {
-
- availabilityCollector = context.createAvailabilityCollectorRunnable(new AvailabilityFacet() {
- public AvailabilityType getAvailability() {
- try {
- OperationResult result = ModclusterServerComponent.this.invokeOperation("refresh",
- new Configuration());
-
- int numberOfAttempts = 0;
-
- //The configuration should be loaded in less than 20 attempts.
- //Only in extraneous cases (like network overload or a huge list webapp contexts)
- //it can take more than this.
- while (numberOfAttempts < 20) {
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
-
- if (proxyInfo.getAvailableContexts().size() != 0) {
- break;
- }
-
- numberOfAttempts++;
- Thread.sleep(2000);
- }
- } catch (Exception e) {
- log.info("mod_cluster availability update failed. Node configuration could not be refreshed.", e);
- return AvailabilityType.DOWN;
- }
-
- return ModclusterServerComponent.super.getAvailability();
- }
- }, 60000L); // 1 minute - the minimum interval allowed
-
- // Now that you've created your availability collector, you must start it. Once started,
- // it is assigned a thread in a thread pool and begins periodically collecting availability.
- availabilityCollector.start();
-
- super.start(context);
- }
-
- /**
- * Cleans the old resource context and the old MBean.
- * @see ResourceComponent#stop()
- */
- public void stop() {
- availabilityCollector.stop();
- super.stop();
- }
-
/* (non-Javadoc)
* @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
*/
@Override
public AvailabilityType getAvailability() {
- return availabilityCollector.getLastKnownAvailability();
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ if (proxyInfo.getAvailableContexts().size() == 0) {
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index c517364..36f490d 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -34,7 +34,7 @@ import java.util.regex.Pattern;
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
- private Map<String, Vhost> availableVHosts = new HashMap<String, Vhost>();
+ private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
public ProxyInfo(String rawProxyInfo) {
Pattern vhostPattern = Pattern.compile("Vhost.*\n");
@@ -50,7 +50,7 @@ public class ProxyInfo {
String host = vhostPieces[1].trim();
host = host.substring(host.indexOf(":") + 1).trim();
- availableVHosts.put(identifier, new Vhost(identifier, host));
+ availableVhosts.put(identifier, new Vhost(identifier, host));
}
Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
@@ -68,7 +68,7 @@ public class ProxyInfo {
rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
- Vhost relatedVhost = availableVHosts.get(identifier);
+ Vhost relatedVhost = availableVhosts.get(identifier);
availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
}
@@ -78,6 +78,10 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
+ public List<Vhost> getAvailableVhosts() {
+ return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
+ }
+
private static class Vhost {
private String identifier;
private String host;
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index b7322bd..8bead55 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -72,7 +72,7 @@ public class ModclusterPluginTest {
log.info("...Loaded plugin: " + plugin);
}
} catch (Exception e) {
- e.printStackTrace();
+ log.info("Error initializing the context", e);
}
}
@@ -93,19 +93,13 @@ public class ModclusterPluginTest {
public void testDiscovery() throws Exception {
InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
- Thread.sleep(10000);
+ Thread.sleep(1000);
report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- Thread.sleep(10000);
-
- report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
- assert report != null;
- System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
List<String> typeNames = new ArrayList<String>() {
{
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index fb1ccba..8c8c6f4 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -50,10 +50,21 @@ public class ProxyInfoTest {
+ ProxyInfo.Context.class.getCanonicalName();
}
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed to parse application contexts!";
+ assert (proxyInfo.getAvailableVhosts().size() != 0) : "Raw proxy info parsing failed to parse vhosts!";
}
}
+ @Test
+ public void testProxyInfoWithEmptyConfig() throws IOException {
+ String testConfigurationFile = "/proxy_config/proxy_config_empty.txt";
+ String testConfiguration = readConfigFile(testConfigurationFile);
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+
+ assert (proxyInfo.getAvailableContexts().size() == 0) : "Raw proxy info parsing failed to parse an empty proxy config.";
+ assert (proxyInfo.getAvailableVhosts().size() == 0) : "Raw proxy info parsing failed to parse an empty proxy config.";
+ }
+
private String readConfigFile(String filePath) throws IOException {
StringBuffer tempBuffer = new StringBuffer();
byte[] readBuffer = new byte[1024];
commit e7be518553e576305b16109aa4e98826ce7d00ae
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 15 15:40:54 2011 -0500
Implemented getAvailability using the async collector because there is no guarantee when node full refreshes its configuration. The configuration is read from the httpd proxy and parsed; so network latency and number of loaded contexts influence the reload time.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index ef13143..e6495a1 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -20,6 +20,10 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.availability.AvailabilityCollectorRunnable;
+import org.rhq.core.pluginapi.availability.AvailabilityFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
@@ -29,14 +33,66 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+ private AvailabilityCollectorRunnable availabilityCollector;
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)
+ */
@Override
- public AvailabilityType getAvailability() {
- try {
- OperationResult result = this.invokeOperation("refresh", new Configuration());
- } catch (Exception e) {
- log.info(e);
- }
+ public void start(ResourceContext context) {
+
+ availabilityCollector = context.createAvailabilityCollectorRunnable(new AvailabilityFacet() {
+ public AvailabilityType getAvailability() {
+ try {
+ OperationResult result = ModclusterServerComponent.this.invokeOperation("refresh",
+ new Configuration());
+
+ int numberOfAttempts = 0;
+
+ //The configuration should be loaded in less than 20 attempts.
+ //Only in extraneous cases (like network overload or a huge list webapp contexts)
+ //it can take more than this.
+ while (numberOfAttempts < 20) {
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ if (proxyInfo.getAvailableContexts().size() != 0) {
+ break;
+ }
+
+ numberOfAttempts++;
+ Thread.sleep(2000);
+ }
+ } catch (Exception e) {
+ log.info("mod_cluster availability update failed. Node configuration could not be refreshed.", e);
+ return AvailabilityType.DOWN;
+ }
+
+ return ModclusterServerComponent.super.getAvailability();
+ }
+ }, 60000L); // 1 minute - the minimum interval allowed
- return super.getAvailability();
+ // Now that you've created your availability collector, you must start it. Once started,
+ // it is assigned a thread in a thread pool and begins periodically collecting availability.
+ availabilityCollector.start();
+
+ super.start(context);
+ }
+
+ /**
+ * Cleans the old resource context and the old MBean.
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ availabilityCollector.stop();
+ super.stop();
+ }
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
+ */
+ @Override
+ public AvailabilityType getAvailability() {
+ return availabilityCollector.getLastKnownAvailability();
}
}
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 874011a..b7322bd 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -87,7 +87,6 @@ public class ModclusterPluginTest {
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
-
}
@Test(dependsOnMethods = "testPluginLoad")
@@ -96,6 +95,14 @@ public class ModclusterPluginTest {
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ Thread.sleep(10000);
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Thread.sleep(10000);
+
report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
@@ -103,7 +110,7 @@ public class ModclusterPluginTest {
List<String> typeNames = new ArrayList<String>() {
{
add(PLUGIN_NAME);
- add(PLUGIN_NAME + "_context");
+ add(PLUGIN_NAME + " Webapp Context");
}
};
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt
new file mode 100644
index 0000000..815b8a4
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_empty.txt
@@ -0,0 +1 @@
+{192.168.0.101/192.168.0.101:6666=null}
commit b0a583c8aa227e05ae7c91bc4a8f42e083835b63
Author: Rafael Soares <rafaelcba(a)gmail.com>
Date: Fri Jul 15 14:15:53 2011 -0300
a bit more 'pt' translation
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
old mode 100755
new mode 100644
index c32dabf..40add0d
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -6,9 +6,9 @@
# http://rhq-project.org/display/RHQ/Working+with+the+Resource+Bundles
#
###################################
-common_alert_high = High
-common_alert_low = Low
-common_alert_medium = Medium
+common_alert_high = Alto
+common_alert_low = Baixo
+common_alert_medium = M\u00E9dio
common_buildInfo_gwtVersion = ${gwt.version}
common_button_ack = Confirmar
common_button_ack_all = Confirmar Todos
@@ -30,13 +30,13 @@ common_button_new = Novo
common_button_next = Pr\u00F3ximo
common_button_ok = OK
common_button_previous = Anterior
-common_button_purgeAll = Purge All
-common_button_refresh = Refresh
+common_button_purgeAll = Remover Todos
+common_button_refresh = Atualizar
common_button_reset = Limpar
common_button_save = Salvar
-common_button_schedule = Schedule
+common_button_schedule = Agendar
common_button_search = Procurar
-common_button_set = Set
+common_button_set = Definir
common_button_showDetails = Mostrar Detalhes...
common_button_uninventory = Remover do Invent\u00E1rio
common_calendar_april_short = abr
@@ -74,57 +74,57 @@ common_label_user = usu\u00E1rio
common_label_users = usu\u00E1rios
common_label_week = semana
common_label_weeks = semanas
-common_label_yesterday = Yesterday
+common_label_yesterday = Ontem
common_msg_areYouSure = Tem certeza?
-common_msg_asyncTimeout = {0}. This occurred because the server is taking a long time to complete this request. Please be aware that the server may still be processing your request and it may complete shortly. You can check the server logs to see if any abnormal errors occurred.
-common_msg_changeAutoDetected = Change auto-detected
-common_msg_deleteConfirm = Tem certeza de que deseja excluir o # selecionado {0}?
-common_msg_emphasizedNotePrefix = NOTA:
+common_msg_asyncTimeout = {0}. Isso ocorre porque o servidor est\u00E1 levando muito tempo para atender esta requisi\u00E7\u00E3o. Favor atentar para o fato de que o servidor ainda esteja processando sua requisi\u00E7\u00E3o e pode concluir dentro de mais alguns instantes. Voc\u00EA ainda pode verificar os logs do servidor para identificar se algum erro anormal ocorreu.
+common_msg_changeAutoDetected = Mudan\u00E7as detectadas automaticamente
+common_msg_deleteConfirm = Tem certeza de que deseja excluir o \# selecionado {0}?
+common_msg_emphasizedNotePrefix = NOTA\:
common_msg_loading = Carregando...
common_msg_noItemsToShow = N\u00E3o existem itens para apresentar
-common_msg_notYetImplemented = Not Yet Implemented
-common_msg_see_more = see more...
-common_msg_step_x_of_y = Step {0} of {1}
+common_msg_notYetImplemented = N\u00E3o implementado ainda
+common_msg_see_more = Ver detalhes...
+common_msg_step_x_of_y = Passo {0} de {1}
common_severity_debug = Debug
common_severity_error = Error
common_severity_fatal = Fatal
common_severity_info = Info
common_severity_warn = Warn
-common_status_canceled = Canceled
-common_status_deferred = Deferred
-common_status_failed = Failed
-common_status_inprogress = In Progress
-common_status_nochange = No Change
-common_status_partial = Partial
-common_status_success = Success
-common_status_timedOut = Timed Out
-common_status_unknown = Unknown
+common_status_canceled = Cancelado
+common_status_deferred = Deferido
+common_status_failed = Falha
+common_status_inprogress = Processando
+common_status_nochange = Sem altera\u00E7\u00E3o
+common_status_partial = Parcial
+common_status_success = Sucesso
+common_status_timedOut = Tempo Esgotado
+common_status_unknown = Desconhecido
common_title_add_column = Adicionar Coluna
-common_title_add_graph_to_view = Add Graph to Monitor View
+common_title_add_graph_to_view = Adicionar Gr\u00E1fico ao Monitor de Vis\u00E3o
common_title_add_portlet = Adicionar Portlet
common_title_address = Endere\u00E7o
common_title_alert_range = S\u00E9rie de Alertas
-common_title_ancestry = Ancestry
+common_title_ancestry = Ancestral
common_title_availability = Disponibilidade
common_title_available_resources = Recursos Dispon\u00EDveis
common_title_average_metrics = M\u00E9tricas da m\u00E9dia por Minuto
-common_title_background = Background
+common_title_background = Fundo (background)
common_title_bundle = Bundle
common_title_bundles = Bundles
common_title_category = Categoria
-common_title_change_refresh_time = Refresh Interval
+common_title_change_refresh_time = Atualizar Intervalo
common_title_columns = Colunas
-common_title_compare_metrics = Compare Metrics
+common_title_compare_metrics = Comparar M\u00E9tricas
common_title_compatibleGroups = Grupos Compat\u00EDveis
common_title_compatibleGroups_total = Total de Grupos Compat\u00EDveis
common_title_component_errors = Componentes com erro
-common_title_config_update_status = Update Status
+common_title_config_update_status = Atualizar Status
common_title_configuration = Configura\u00E7\u00E3o
-common_title_count = Count
+common_title_count = Quantidade
common_title_custom = Personalizado
common_title_dashboard_name = Nome do Painel de Controle
common_title_dateCreated = Data de Cria\u00E7\u00E3o
-common_title_dateRange = Date Range
+common_title_dateRange = Intervalo de Data
common_title_default = Padr\u00E3o
common_title_description = Descri\u00E7\u00E3o
common_title_details = Detalhes
@@ -134,14 +134,14 @@ common_title_duration = Dura\u00E7\u00E3o
common_title_edit_mode = Modo Edi\u00E7\u00E3o
common_title_enabled = Habilitado?
common_title_end = Fim
-common_title_error = Error
+common_title_error = Erro
common_title_favorites = Favoritos
common_title_generalProp = Propriedades Gerais
-common_title_group = Group
+common_title_group = Grupo
common_title_group_def_total = Total de Defini\u00E7\u00E3o de Grupos
-common_title_group_member_health = Group Member Health
-common_title_groups = Groups
-common_title_help = Help
+common_title_group_member_health = Sa\u00FAde do Membro do Grupo
+common_title_groups = Grupos
+common_title_help = Ajuda
common_title_host = Host
common_title_icon = \u00EDcone
common_title_id = ID
@@ -151,25 +151,25 @@ common_title_inventory = Invent\u00E1rio
common_title_inventorySummary = Sum\u00E1rio do Invent\u00E1rio
common_title_lastUpdated = \u00DAltima Atualiza\u00E7\u00E3o
common_title_lastUpdatedBy = \u00DAltima Atualiza\u00E7\u00E3o feita por
-common_title_ldapGroups = LDAP Groups
+common_title_ldapGroups = Grupos LDAP
common_title_mashup = Mashup
-common_title_members_reporting = Members Reporting
+common_title_members_reporting = Relat\u00F3rio de Membros
common_title_message = Mensagem
common_title_metric = M\u00E9trica
-common_title_metric_chart = Metric Chart
+common_title_metric_chart = Gr\u00E1fico de M\u00E9trica
common_title_mixedGroups = Grupos Mistos
common_title_mixedGroups_total = Total de Grupos Mistos
common_title_name = Nome
common_title_new_dashboard = Novo Painel de Controle
-common_title_numeric_metrics = Numeric Metrics
+common_title_numeric_metrics = M\u00E9tricas Num\u00E9ricas
common_title_numeric_type = Tipo Num\u00E9rico
-common_title_operation_status = Operation Status
+common_title_operation_status = Status da Opera\u00E7\u00E3o
common_title_operations = Opera\u00E7\u00F5es
common_title_operations_range = S\u00E9rie de Opera\u00E7\u00F5es
common_title_over = Execesso
common_title_password = Senha
-common_title_path = Path
-common_title_permissions = Permissions
+common_title_path = Caminho
+common_title_permissions = Permiss\u00F5es
common_title_platform = Plataforma
common_title_platform_total = Total de Plataformas
common_title_plugin = Plugin
@@ -177,12 +177,12 @@ common_title_port = Porta
common_title_providers = Provedores
common_title_recent_alerts = Alertas Recentes
common_title_recent_bundle_deployments = Recent Bundle Deployments
-common_title_recent_configuration_updates = Recent Configuration Updates
-common_title_recent_event_counts = Recent Event Counts
-common_title_recent_measurements = Recent Measurements
-common_title_recent_oob_metrics = Recent Out of Bound metrics
+common_title_recent_configuration_updates = Configura\u00E7\u00F5es Alteradas Recentemente
+common_title_recent_event_counts = Totaliza\u00E7\u00E3o de Eventos Recentes
+common_title_recent_measurements = M\u00E9tricas Recentes
+common_title_recent_oob_metrics = M\u00E9tricas fora dos limites Recentes
common_title_recent_operations = Opera\u00E7\u00F5es Recentes
-common_title_recent_pkg_history = Recent Package History
+common_title_recent_pkg_history = Hist\u00F3rico de Pacotes Recentes
common_title_recently_added = Recursos Adicionados Recentemente
common_title_remove_column = Remover Coluna
common_title_repositories = Reposit\u00F3rios
@@ -191,29 +191,29 @@ common_title_resourceGroups = Resource Groups
common_title_resource_group = Grupo de Recursos
common_title_resource_id = ID do Recurso
common_title_resource_inventory = Invent\u00E1rio de Recursos
-common_title_resource_key = Resource Key
+common_title_resource_key = Chave do Recurso
common_title_resource_name = Nome do Recurso
-common_title_resource_type = Resource Type
-common_title_resources = Resources
-common_title_results_count = Results Count
-common_title_results_count_tooltip = Displays this number of results
-common_title_role = Role
-common_title_roles = Roles
+common_title_resource_type = Tipo do Recurso
+common_title_resources = Recursos
+common_title_results_count = Resultado Total
+common_title_results_count_tooltip = Mostra este n\u00FAmero de resultados
+common_title_role = Perfil
+common_title_roles = Perfis
common_title_scheduled_operations = Opera\u00E7\u00F5es Agendadas
common_title_search = Procurar
common_title_selected_resources = Recursos Selecionados
-common_title_server = Server
+common_title_server = Servidor
common_title_server_total = Total de Servidores
-common_title_service = Service
+common_title_service = Servi\u00E7o
common_title_service_total = Total de Servi\u00E7os
common_title_settings = Configura\u00E7\u00F5es
common_title_show = Visualizar
common_title_show_more = Visualizar mais...
-common_title_sort_order = Sort Order
-common_title_sort_order_tooltip = Sets sort order for results.
+common_title_sort_order = Ordena\u00E7\u00E3o
+common_title_sort_order_tooltip = Define a ordem dos resultados.
common_title_start = Iniciar
common_title_status = Status
-common_title_stop = Stop
+common_title_stop = Parar
common_title_summary = Sum\u00E1rio
common_title_summary_counts = Sum\u00E1rio de Contagem
common_title_tag_cloud = Nuvem de Tags
@@ -223,48 +223,48 @@ common_title_total = Total
common_title_type = Tipo
common_title_units = Unidades
common_title_user = Usu\u00E1rio
-common_title_users = Users
+common_title_users = Usu\u00E1rios
common_title_value = Valor
common_title_version = Vers\u00E3o
common_title_view_mode = Modo vis\u00E3o
common_title_web_address = Endere\u00E7o Web
common_title_welcome = Bem Vindo
-common_unit_days = days
-common_unit_hours = hours
-common_unit_milliseconds = milliseconds
-common_unit_minutes = minutes
-common_unit_months = months
-common_unit_seconds = seconds
-common_unit_times = times
-common_unit_weeks = weeks
-common_unit_years = years
+common_unit_days = dias
+common_unit_hours = horas
+common_unit_milliseconds = milisegundos
+common_unit_minutes = minutos
+common_unit_months = meses
+common_unit_seconds = segundos
+common_unit_times = vezes
+common_unit_weeks = semanas
+common_unit_years = anos
common_val_for = para
-common_val_n1st = {0}st
-common_val_n2nd = {0}nd
-common_val_n3rd = {0}rd
+common_val_n1st = {0}\u00BA
+common_val_n2nd = {0}\u00BA
+common_val_n3rd = {0}\u00BA
common_val_na = N/A
common_val_never = Nunca
common_val_no = N\u00E3o
common_val_no_lower = n\u00E3o
common_val_none = Nenhum
-common_val_nth = {0}th
+common_val_nth = {0}\u00BA
common_val_yes = Sim
common_val_yes_lower = sim
dataSource_ContentRepoTree_error_load = Erro ao carregar os reposit\u00F3rios
-dataSource_ContentRepoTree_field_parentId = Parent ID
-dataSource_bundle_loadFailed = Failed to load Bundle data
-dataSource_configurationHistory_clickToSeeError = Double click to see error message...
-dataSource_configurationHistory_currentConfig = This is the current configuration
-dataSource_configurationHistory_dateCompleted = Date Completed
-dataSource_configurationHistory_dateSubmitted = Date Submitted
+dataSource_ContentRepoTree_field_parentId = ID pai
+dataSource_bundle_loadFailed = Falha ao carregar os dados do Bundle
+dataSource_configurationHistory_clickToSeeError = Duplo clique para visualizar a mensagem...
+dataSource_configurationHistory_currentConfig = Esta \u00E9 a configura\u00E7\u00E3o atual
+dataSource_configurationHistory_dateCompleted = Conclu\u00EDdo em
+dataSource_configurationHistory_dateSubmitted = Submetido em
dataSource_configurationHistory_error_fetchFailure = N\u00E3o foi poss\u00EDvel carregar o hist\u00F3rico de configura\u00E7\u00E3o.
dataSource_configurationHistory_field_createdTime = Criado
dataSource_configurationHistory_field_id = ID
dataSource_configurationHistory_field_resource = Recurso
dataSource_configurationHistory_field_status = Status
dataSource_configurationHistory_field_subject = Assunto
-dataSource_configurationHistory_updateType = Update Type
-dataSource_configurationHistory_updateType_group = Group
+dataSource_configurationHistory_updateType = Tipo de atualiza\u00E7\u00E3o
+dataSource_configurationHistory_updateType_group = Grupo
dataSource_configurationHistory_updateType_individual = Individual
dataSource_definitions_loadFailed = Falha ao carregar defini\u00E7\u00E3o de m\u00E9tricas
dataSource_measurementOob_error_fetchFailure = Falha ao carregar informa\u00E7\u00F5es das m\u00E9tricas OOB
@@ -275,17 +275,17 @@ dataSource_measurementOob_field_parentName = Pai
dataSource_measurementOob_field_resourceName = Recurso
dataSource_measurementOob_field_scheduleName = M\u00E9trica
dataSource_operationHistory_error_fetchFailure = Falha ao carregar o hist\u00F3rico de opera\u00E7\u00F5es.
-dataSource_operationHistory_field_createdTime = Created Time
-dataSource_operationHistory_field_operationName = Operation Name
-dataSource_operationHistory_field_startedTime = Started Time
-dataSource_operationHistory_field_subject = Requester
-dataSource_operationSchedule_field_description = Notes
-dataSource_operationSchedule_field_id = Schedule ID
-dataSource_operationSchedule_field_nextFireTime = Next Execution
-dataSource_operationSchedule_field_operationDisplayName = Operation
-dataSource_operationSchedule_field_operationName = Operation
-dataSource_operationSchedule_field_subject = Owner
-dataSource_operationSchedule_field_timeout = Timeout (in seconds)
+dataSource_operationHistory_field_createdTime = Data de cria\u00E7\u00E3o
+dataSource_operationHistory_field_operationName = Nome da Opera\u00E7\u00E3o
+dataSource_operationHistory_field_startedTime = Iniciado em
+dataSource_operationHistory_field_subject = Solicitante
+dataSource_operationSchedule_field_description = Notas
+dataSource_operationSchedule_field_id = ID do Agendamento
+dataSource_operationSchedule_field_nextFireTime = Pr\u00F3xima execu\u00E7\u00E3o
+dataSource_operationSchedule_field_operationDisplayName = Opera\u00E7\u00E3o
+dataSource_operationSchedule_field_operationName = Opera\u00E7\u00E3o
+dataSource_operationSchedule_field_subject = Propriet\u00E1rio
+dataSource_operationSchedule_field_timeout = Tempo limite (em segundos)
dataSource_platforms_field_cpu = CPU
dataSource_platforms_field_memory = Mem\u00F3ria
dataSource_platforms_field_swap = Swap
@@ -300,23 +300,23 @@ dataSource_recentOperations_field_operation = Opera\u00E7\u00E3o
dataSource_recentOperations_field_resource = Recurso
dataSource_recentOperations_field_status = Status
dataSource_recentOperations_field_time = Data/Hora
-dataSource_resourceErrors_clickStatusIcon = Click the icon for more details
-dataSource_resourceErrors_deleteFailure = Failed to delete resource errors
-dataSource_resourceErrors_deleteSuccess = You have successfully deleted [{0}] resource error messages.
+dataSource_resourceErrors_clickStatusIcon = Clique no \u00EDcone para mais detalhes
+dataSource_resourceErrors_deleteFailure = Falha do excluir mensagens de erros do recurso
+dataSource_resourceErrors_deleteSuccess = Mensagens de erro para o recurso [{0}] exclu\u00EDdas com sucesso.
dataSource_resourceErrors_error_fetchFailure = Falha ao procurar por erros para o Recurso com ID [{0}].
dataSource_resourceErrors_field_detail = Mensagem detalhada
dataSource_resourceErrors_field_errorType = Tipo de Erro
dataSource_resourceErrors_field_summary = Sum\u00E1rio
dataSource_resourceErrors_field_timeOccured = Tempo
-dataSource_resourceGroups_loadFailed = Failed to load Resource Groups
-dataSource_resources_field_discoveryTime = Discovery Time
-dataSource_resources_field_importTime = Import Time
-dataSource_resources_field_key = Key
-dataSource_resources_field_lastModifiedTime = Last Modified Time
-dataSource_resources_field_lastModifier = Last Modifier
-dataSource_resources_field_location = Location
+dataSource_resourceGroups_loadFailed = Falha ao carregar grupos de recurso
+dataSource_resources_field_discoveryTime = Data de Descoberta
+dataSource_resources_field_importTime = Data de Importa\u00E7\u00E3o
+dataSource_resources_field_key = Chave
+dataSource_resources_field_lastModifiedTime = Data da \u00FAltima altera\u00E7\u00E3o
+dataSource_resources_field_lastModifier = \u00DAltima altera\u00E7\u00E3o
+dataSource_resources_field_location = Localiza\u00E7\u00E3o
dataSource_rpc_error_transformRequestFailure = Ocorreu uma falha na fonte de dados durante o processamento da requisi\u00E7\u00E3o {0}.
-dataSource_rpc_error_unsupportedArrayFilterType = Sem suporte para passing de array filters do tipo {0}.
+dataSource_rpc_error_unsupportedArrayFilterType = Sem suporte para o array filters do tipo {0}.
dataSource_rpc_error_unsupportedEnumType = Favor adicionar um trecho de c\u00F3digo apropriado para a enum {0} para RPCDataSource.getEnumArray(Class)
dataSource_rpc_no = n\u00E3o
dataSource_rpc_yes = sim
@@ -325,34 +325,34 @@ dataSource_scheduledOperations_field_location = Localiza\u00E7\u00E3o
dataSource_scheduledOperations_field_operation = Opera\u00E7\u00E3o
dataSource_scheduledOperations_field_resource = Recurso
dataSource_scheduledOperations_field_time = Data/Hora
-dataSource_schedules_disableFailure_group = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas eram: [{2}]
-dataSource_schedules_disableFailure_resource = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas eram: [{2}]
+dataSource_schedules_disableFailure_group = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas eram\: [{2}]
+dataSource_schedules_disableFailure_resource = Falha ao desabilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas eram\: [{2}]
dataSource_schedules_disableSuccessful_concise = Voc\u00EA desabilitou a coleta de m\u00E9tricas de [{0}]
-dataSource_schedules_disableSuccessful_full_group = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o: [{2}]
-dataSource_schedules_disableSuccessful_full_resource = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o recurso com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o: [{2}]
-dataSource_schedules_enableFailure_group = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o grupo com ID [{1}]. As m\u00E9tricas s\u00E3o: [{2}]
-dataSource_schedules_enableFailure_resource = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas s\u00E3o: [{2}]
+dataSource_schedules_disableSuccessful_full_group = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\: [{2}]
+dataSource_schedules_disableSuccessful_full_resource = Voc\u00EA desabilitou a coleta de m\u00E9tricas de[{0}] para o recurso com ID [{1}]. As m\u00E9tricas desabilitadas s\u00E3o\: [{2}]
+dataSource_schedules_enableFailure_group = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o grupo com ID [{1}]. As m\u00E9tricas s\u00E3o\: [{2}]
+dataSource_schedules_enableFailure_resource = Falha ao habilitar a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas s\u00E3o\: [{2}]
dataSource_schedules_enableSuccessful_concise = Voce habilitou a coleta de m\u00E9tricas de [{0}]
-dataSource_schedules_enableSuccessful_full_group = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas habilitadas foram: [{2}]
-dataSource_schedules_enableSuccessful_full_resource = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas habilitadas foram: [{2}]
+dataSource_schedules_enableSuccessful_full_group = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. As m\u00E9tricas habilitadas foram\: [{2}]
+dataSource_schedules_enableSuccessful_full_resource = Voc\u00EA habilitou a coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. As m\u00E9tricas habilitadas foram\: [{2}]
dataSource_schedules_field_resourceGroupId = ID de Grupo
dataSource_schedules_loadFailed = Falha ao carregar agendamento de m\u00E9tricas
-dataSource_schedules_loadFailedContext = Failed to load metric schedules for context [{0}]
-dataSource_schedules_loadFailedCriteria = Failed to load metric schedules for criteria [{0}]
-dataSource_schedules_updateFailure_group = Falha ao configurar o intervalo para coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. M\u00E9tricas: [{2}]. O intervalo de coleta seria de [{3}] segundos.
-dataSource_schedules_updateFailure_resource = Falha ao configurar o intervalo para coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. M\u00E9tricas: [{2}]. O intervalo de coleta seria de [{3}] segundos.
+dataSource_schedules_loadFailedContext = Falha ao carregar agendamentos de m\u00E9tricas para o contexto [{0}]
+dataSource_schedules_loadFailedCriteria = Falha ao carregar agendamentos de m\u00E9tricas com o crit\u00E9io [{0}]
+dataSource_schedules_updateFailure_group = Falha ao configurar o intervalo para coleta de m\u00E9tricas de [{0}] para o grupo de recursos com ID [{1}]. M\u00E9tricas\: [{2}]. O intervalo de coleta seria de [{3}] segundos.
+dataSource_schedules_updateFailure_resource = Falha ao configurar o intervalo para coleta de m\u00E9tricas de [{0}] para o recurso com ID [{1}]. M\u00E9tricas\: [{2}]. O intervalo de coleta seria de [{3}] segundos.
dataSource_schedules_updateSuccessful_concise = Um novo intervalo de coleta de [{0}] segundos foi configurado para m\u00E9tricas de [{1}]
-dataSource_schedules_updateSuccessful_full_group = Um novo intervalo de coleta de [{0}] segundos foi configurado para m\u00E9tricas de [{1}] para o grupo de recursos com ID [{2}]. M\u00E9tricas atualizadas: [{3}]
-dataSource_schedules_updateSuccessful_full_resource = Um novo intervalo de coleta de [{0}] segundos foi configurado para m\u00E9tricas de [{1}] para o recurso com ID [{2}]. M\u00E9tricas atualizadas: [{3}]
-dataSource_traits_failFetch = Failed to fetch traits for criteria [{0}].
-dataSource_traits_field_definitionID = Definition ID
+dataSource_schedules_updateSuccessful_full_group = Um novo intervalo de coleta de [{0}] segundos foi configurado para m\u00E9tricas de [{1}] para o grupo de recursos com ID [{2}]. M\u00E9tricas atualizadas\: [{3}]
+dataSource_schedules_updateSuccessful_full_resource = Um novo intervalo de coleta de [{0}] segundos foi configurado para m\u00E9tricas de [{1}] para o recurso com ID [{2}]. M\u00E9tricas atualizadas\: [{3}]
+dataSource_traits_failFetch = Falha ao obter as caracter\u00EDsticas com o crit\u00E9rio [{0}].
+dataSource_traits_field_definitionID = ID da defini\u00E7\u00E3o
dataSource_traits_field_lastChanged = \u00DAltima Altera\u00E7\u00E3o
dataSource_traits_field_primaryKey = Chave Prim\u00E1ria
dataSource_traits_field_trait = Propriedade
dataSource_traits_group_field_groupId = ID de Grupo
dataSource_traits_group_field_memberResource = Recurso Membro
-dataSource_users_delete = Deleted user [{0}]
-dataSource_users_deleteFailed = Failed to delete user [{0}]
+dataSource_users_delete = Usu\u00E1rio exclu\u00EDdo [{0}]
+dataSource_users_deleteFailed = Falha ao excluir o usu\u00E1rio [{0}]
dataSource_users_field_department = Departamento
dataSource_users_field_emailAddress = Endere\u00E7o de Email
dataSource_users_field_factive = Login Habilitado?
@@ -364,50 +364,50 @@ dataSource_users_field_name = Nome do Usu\u00E1rio
dataSource_users_field_password = Senha
dataSource_users_field_passwordVerify = Verifique a Senha
dataSource_users_field_phoneNumber = N\u00FAmero de Telefone
-dataSource_users_invalidEmailAddress = Invalid email address.
-dataSource_users_passwordsDoNotMatch = Passwords do not match.
-datasource_roles_field_ldapGroups = LDAP Groups
-datasource_roles_field_permissions = Permissions
-datasource_roles_field_resourceGroups = Resource Groups
+dataSource_users_invalidEmailAddress = Endere\u00E7o de email inv\u00E1lido.
+dataSource_users_passwordsDoNotMatch = Senhas n\u00E3o conferem.
+datasource_roles_field_ldapGroups = Grupos LDAP
+datasource_roles_field_permissions = Permiss\u00F5es
+datasource_roles_field_resourceGroups = Grupos de Recurso
datasource_roles_field_subjects = Subjects
-datasource_templateSchedules_disabled = Disabled collection of selected metric [{0}].
-datasource_templateSchedules_disabled_detailed = Disabled collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
-datasource_templateSchedules_disabled_failed = Failed to disable collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
-datasource_templateSchedules_enabled = Enabled collection of selected metric [{0}].
+datasource_templateSchedules_disabled = Desabilitar a coleta da m\u00E9trica selecionada [{0}].
+datasource_templateSchedules_disabled_detailed = Desabilitar a coleta da m\u00E9trica [{0}] [{1}] para o Tipo de Recurso com id [{2}].
+datasource_templateSchedules_disabled_failed = Falha ao desabilitar a coleta da m\u00E9trica [{0}] [{1}] para o Tipo de Recurso com id [{2}].
+datasource_templateSchedules_enabled = Habilitar a coleta da m\u00E9trica selecionada [{0}].
datasource_templateSchedules_enabled_detailed = Enabled collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
-datasource_templateSchedules_enabled_failed = Failed to enable collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
-datasource_templateSchedules_updated = Updated collection intervals of selected metric [{0}].
-datasource_templateSchedules_updated_detail = Collection interval for metric [{0}] [{1}] by default for ResourceType with id [{2}] set to [{3}] seconds.
-datasource_templateSchedules_updated_failed = Failed to set collection interval to [{0}] seconds for metric [{1}] [{2}] by default for ResourceType with id [{3}].
-favorites = Favorites
-favorites_groups = Favorite Groups
-favorites_recentlyViewed = Recently Viewed
-favorites_resources = Favorite Resources
+datasource_templateSchedules_enabled_failed = Falha ao habilitar a coleta da m\u00E9trica [{0}] [{1}] para o Tipo de Recurso com id [{2}].
+datasource_templateSchedules_updated = Intervalos de coleta atualizados para a m\u00E9trica [{0}].
+datasource_templateSchedules_updated_detail = Intervalo de coleta da m\u00E9trica [{0}] [{1}] para o Tipo de Recurso com id [{2}] configurado para [{3}] segundos.
+datasource_templateSchedules_updated_failed = Falha ao configurar o intervalo de coleta para [{0}] segundos para a m\u00E9trica [{1}] [{2}] para o Tipo de Recurso com id [{3}].
+favorites = Favoritos
+favorites_groups = Grupos Favoritos
+favorites_recentlyViewed = Acessados Recentemente
+favorites_resources = Recursos Favoritos
group_tree_partialClusterTooltip = {0} out of {1} group members have a ''{2}'' resource
-util_ancestry_parentAncestry = Parent Ancestry for:
+util_ancestry_parentAncestry = Ancestral para\:
util_errorHandler_nullException = Exce\u00E7\u00E3o nula
-util_monitoringRequestCallback_error_checkServerStatusFailure = Imposs\u00EDvel verificar o status do login - verifique o estatdo do Servidor.
+util_monitoringRequestCallback_error_checkServerStatusFailure = Imposs\u00EDvel verificar o status do login - verifique o status do Servidor.
util_rpcManager_activeRequests = {0} Requisi\u00E7\u00F5es ativas
util_userPerm_loadFailGlobal = Falha ao carregar permiss\u00F5es globais - nenhuma permiss\u00E3o concedida.
-util_userPerm_loadFailGroup = Falha ao carregar suas permiss\u00F5es para o Grupo de Recursos com id [{0}] - nenhum permiss\u00E3o concedida.
+util_userPerm_loadFailGroup = Falha ao carregar suas permiss\u00F5es para o Grupo de Recursos com id [{0}] - nenhuma permiss\u00E3o concedida.
util_userPerm_loadFailResource = Falha ao carregar suas permiss\u00F5es para o Recurso com id [{0}] - nenhuma permiss\u00E3o concedida.
-util_userSession_loadFailSubject = UserSessionManager: Falha ao carregar a credencial do usu\u00E1rio
+util_userSession_loadFailSubject = UserSessionManager\: Falha ao carregar a credencial do usu\u00E1rio
util_userSession_logoutFail = Falha durante o logout.
util_widgetsField_unlimited = Ilimitado
view_aboutBox_allRightsReserved = Todos os Direitos Reservados.~
-view_aboutBox_buildNumber = N\u00FAmero do Build:~
+view_aboutBox_buildNumber = N\u00FAmero do Build\:~
view_aboutBox_failedToLoad = Falha ao carregar informa\u00E7oes do produto.~
view_aboutBox_homepage = P\u00E1gina Inicial~
view_aboutBox_jbossByRedHat = JBoss by Red Hat~
view_aboutBox_title = Sobre {0}~
-view_aboutBox_version = Vers\u00E3o:~
+view_aboutBox_version = Vers\u00E3o\:
view_adminConfig_downloads = Downloads
view_adminConfig_license = Licen\u00E7a
view_adminConfig_plugins = Plugins
view_adminConfig_systemSettings = Propriedades de Sistema
-view_adminConfig_templates = Modelos
-view_adminContent_contentSources = Content Sources
-view_adminContent_repositories = Repositories
+view_adminConfig_templates = Templates
+view_adminContent_contentSources = Fontes de Conte\u00FAdo
+view_adminContent_repositories = Reposit\u00F3rios
view_adminRoles_assignedGroups = Grupos de Recursos Associados
view_adminRoles_assignedSubjects = Perfis Associados
view_adminRoles_failLdap = Falha ao determinar se o LDAP foi configurado - assumindo como LDAP n\u00E3o configurado.
@@ -423,18 +423,18 @@ view_adminRoles_permissions_autoselecting_configureRead_implied = Autodeselected
view_adminRoles_permissions_autoselecting_configureWrite_implied = Autoselected CONFIGURE_READ permission, since CONFIGURE_WRITE implies it...
view_adminRoles_permissions_autoselecting_manageInventory_implied = Autoselected unselected Resource permissions, since MANAGE_INVENTORY implies all Resource permissions...
view_adminRoles_permissions_autoselecting_manageSecurity_implied = Autoselected unselected permissions, since MANAGE_SECURITY implies all other permissions...
-view_adminRoles_permissions_globalPermissions = Global Permissions
+view_adminRoles_permissions_globalPermissions = Permiss\u00F5es Globais
view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection = {0} read permission cannot be deselected, unless the {0} write permission, which implies the read permission, is deselected first.
view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection = {0} permission cannot be deselected, unless Manage Inventory, which implies all Resource permissions, is deselected first.
view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection = {0} permission cannot be deselected, unless the Manage Security permission, which implies all other permissions, is deselected first.
-view_adminRoles_permissions_isAuthorized = Authorized?
-view_adminRoles_permissions_isRead = Read?
-view_adminRoles_permissions_isWrite = Write?
+view_adminRoles_permissions_isAuthorized = Autorizado?
+view_adminRoles_permissions_isRead = Leitura?
+view_adminRoles_permissions_isWrite = Escrita?
view_adminRoles_permissions_permDesc_manageBundles = can create, update, or delete provisioning bundles (viewing is implied for everyone)
-view_adminRoles_permissions_permDesc_manageInventory = has all Resource permissions, as described below, for all Resources; can create, update, and delete groups; and can import auto-discovered or manually discovered Resources
+view_adminRoles_permissions_permDesc_manageInventory = possui todas as permiss\u00F5es de Recurso, como descrito abaixo, pode criar, atualizar, excluir grupos e importar Recursos descobertos automaticamente ou manualmente.
view_adminRoles_permissions_permDesc_manageRepositories = can create, update, or delete repositories of any user (everyone can create their own repositories), can associate content sources to repositories.
-view_adminRoles_permissions_permDesc_manageSecurity = can create, update, or delete users and roles (viewing is implied for everyone)
-view_adminRoles_permissions_permDesc_manageSettings = can modify the RHQ Server configuration and perform any Server-related functionality
+view_adminRoles_permissions_permDesc_manageSecurity = Pode criar, atualizar, ou excluir usu\u00E1rios e perfis (visualiza\u00E7\u00E3o \u00E9 padr\u00E3o para todos)
+view_adminRoles_permissions_permDesc_manageSettings = pode modificar a configura\u00E7\u00E3o do RHQ Server e utilizar qualquer funcionalidade relacionada ao Servidor
view_adminRoles_permissions_permReadDesc_configure = view Resource configuration and Resource configuration revision history
view_adminRoles_permissions_permReadDesc_control = (IMPLIED) view available operations and operation execution history
view_adminRoles_permissions_permReadDesc_createChildResources = (IMPLIED) view child Resource creation history
@@ -453,24 +453,24 @@ view_adminRoles_permissions_permWriteDesc_manageAlerts = create, update, and del
view_adminRoles_permissions_permWriteDesc_manageContent = subscribe to content sources; install and uninstall packages
view_adminRoles_permissions_permWriteDesc_manageEvents = delete events
view_adminRoles_permissions_permWriteDesc_manageMeasurements = update metric collection schedules
-view_adminRoles_permissions_perm_configure = Configure
-view_adminRoles_permissions_perm_control = Control
+view_adminRoles_permissions_perm_configure = Configurar
+view_adminRoles_permissions_perm_control = Controlar
view_adminRoles_permissions_perm_createChildResources = Create Child Resources
view_adminRoles_permissions_perm_deleteChildResources = Delete Child Resources
-view_adminRoles_permissions_perm_inventory = Inventory
-view_adminRoles_permissions_perm_manageAlerts = Manage Alerts
-view_adminRoles_permissions_perm_manageBundles = Manage Bundles
-view_adminRoles_permissions_perm_manageContent = Manage Content
-view_adminRoles_permissions_perm_manageEvents = Manage Events
-view_adminRoles_permissions_perm_manageInventory = Manage Inventory
-view_adminRoles_permissions_perm_manageMeasurements = Manage Measurements
-view_adminRoles_permissions_perm_manageRepositories = Manage Repositories
-view_adminRoles_permissions_perm_manageSecurity = Manage Security
-view_adminRoles_permissions_perm_manageSettings = Manage Settings
-view_adminRoles_permissions_read = Read:
-view_adminRoles_permissions_readAccessImplied = Read access for the {0} permission is implied and cannot be disabled.
-view_adminRoles_permissions_resourcePermissions = Resource Permissions
-view_adminRoles_permissions_write = Write:
+view_adminRoles_permissions_perm_inventory = Invent\u00E1rio
+view_adminRoles_permissions_perm_manageAlerts = Gerenciar Alertas
+view_adminRoles_permissions_perm_manageBundles = Gerenciar Bundles
+view_adminRoles_permissions_perm_manageContent = Gerenciar Conte\u00FAdo
+view_adminRoles_permissions_perm_manageEvents = Gerenciar Eventos
+view_adminRoles_permissions_perm_manageInventory = Gerenciar Invent\u00E1rio
+view_adminRoles_permissions_perm_manageMeasurements = Gerenciar M\u00E9tricas
+view_adminRoles_permissions_perm_manageRepositories = Gerenciar Reposit\u00F3rios
+view_adminRoles_permissions_perm_manageSecurity = Gerenciar Seguran\u00E7a
+view_adminRoles_permissions_perm_manageSettings = Gerenciar Configura\u00E7\u00F5es
+view_adminRoles_permissions_read = Leitura\:
+view_adminRoles_permissions_readAccessImplied = Acesso de leitura para a permiss\u00E3o {0} \u00E9 impl\u00EDcita e n\u00E3o pode ser desabilitada.
+view_adminRoles_permissions_resourcePermissions = Permiss\u00F5es de Recurso
+view_adminRoles_permissions_write = Escrita\:
view_adminRoles_perms = Permiss\u00F5es
view_adminRoles_resourcePerms = Permiss\u00F5es do Recurso
view_adminRoles_roleAdded = Perfil [{0}] adicionado.
@@ -481,19 +481,19 @@ view_adminRoles_roleUpdateFailed = Falha ao atualizar o perfil [{0}].
view_adminRoles_roleUpdated = Perfil [{0}] atualizado.
view_adminSecurity_roles = Perfis
view_adminSecurity_users = Usu\u00E1rios
-view_adminTemplates_disabledAlertTemplates = Disabled Alert Templates
-view_adminTemplates_disabledMetricTemplates = Disabled Metric Templates
-view_adminTemplates_editAlertTemplate = Edit Alert Template
-view_adminTemplates_editMetricTemplate = Edit Metric Template
-view_adminTemplates_enabledAlertTemplates = Enabled Alert Templates
-view_adminTemplates_enabledMetricTemplates = Enabled Metric Templates
-view_adminTemplates_platformServices = Platform Services
-view_adminTemplates_platforms = Platforms
-view_adminTemplates_prompt_disabledAlertTemplates = Number of alert templates that are created but disabled on this resource type
-view_adminTemplates_prompt_disabledMetricTemplates = Number of metric schedules that are disabled by default on this resource type
-view_adminTemplates_prompt_enabledAlertTemplates = Number of alert templates that are enabled on this resource type
-view_adminTemplates_prompt_enabledMetricTemplates = Number of metric schedules that are enabled by default on this resource type
-view_adminTemplates_servers = Servers
+view_adminTemplates_disabledAlertTemplates = Templates de Alerta Desabilitados
+view_adminTemplates_disabledMetricTemplates = Templates de M\u00E9trica Desabilitados
+view_adminTemplates_editAlertTemplate = Editar Template de Alerta
+view_adminTemplates_editMetricTemplate = Editar Template de M\u00E9trica
+view_adminTemplates_enabledAlertTemplates = Templates de Alerta Habilitados
+view_adminTemplates_enabledMetricTemplates = Templates de M\u00E9trica Habilitados
+view_adminTemplates_platformServices = Servi\u00E7os da Plataforma
+view_adminTemplates_platforms = Plataformas
+view_adminTemplates_prompt_disabledAlertTemplates = N\u00FAmero de templates de alerta criados mas desabilitados para este tipo de recurso
+view_adminTemplates_prompt_disabledMetricTemplates = N\u00FAmero de coletas de m\u00E9trica desabilitadas por padr\u00E3o para este tipo de recurso
+view_adminTemplates_prompt_enabledAlertTemplates = N\u00FAmero de templates de alerta habilitados para este tipo de recurso
+view_adminTemplates_prompt_enabledMetricTemplates = N\u00FAmero de coletas de m\u00E9trica habilitadas por padr\u00E3o para este tipo de recurso
+view_adminTemplates_servers = Servidores
view_adminTopology_affinityGroups = Grupos de Afinidade
view_adminTopology_agents = Agentes
view_adminTopology_partitionEvents = Eventos na Parti\u00E7\u00E3o
@@ -504,23 +504,23 @@ view_adminUsersList_dataTypeName = usu\u00E1rio
view_adminUsersList_dataTypeNamePlural = usu\u00E1rios
view_admin_administration = Administra\u00E7\u00E3o
view_admin_configuration = Configura\u00E7\u00E3o
-view_admin_content = Content
+view_admin_content = Conte\u00FAdo
view_admin_downloads_agentDownload = Agent Download
view_admin_downloads_agent_buildNumber = Agent Build
-view_admin_downloads_agent_help = <p> This is the RHQ Agent Update Binary jar file. The purpose of this jar file is to allow you to install a fresh agent on a machine where an agent does not yet exist and to allow you to update an agent that is already installed on a machine. For more details, run this agent download jar with the --help command line option:<br/> <b>java -jar <agent-download.jar> --help</b> </p> <h3>Agent Install</h3> <p> <b>java -jar <agent-download.jar> --install[=<new agent directory>]</b><br/> This command will install a new agent. If you do not specify the new agent directory, the default will be "." </p> <h3>Agent Update</h3> <p> <b>java -jar <agent-download.jar> --update[=<old agent home>]</b><br/> This will update an existing agent that was already installed. If you do not specify the directory where the old, existing agent was installed, it will assumed to be "rhq-agent". </p>
+view_admin_downloads_agent_help = <p> This is the RHQ Agent Update Binary jar file. The purpose of this jar file is to allow you to install a fresh agent on a machine where an agent does not yet exist and to allow you to update an agent that is already installed on a machine. For more details, run this agent download jar with the --help command line option\:<br/> <b>java -jar <agent-download.jar> --help</b> </p> <h3>Agent Install</h3> <p> <b>java -jar <agent-download.jar> --install[\ = <new agent directory>]</b><br/> This command will install a new agent. If you do not specify the new agent directory, the default will be "." </p> <h3>Agent Update</h3> <p> <b>java -jar <agent-download.jar> --update[\ = <old agent home>]</b><br/> This will update an existing agent that was already installed. If you do not specify the directory where the old, existing agent was installed, it will assumed to be "rhq-agent". </p>
view_admin_downloads_agent_link_label = Link
view_admin_downloads_agent_link_value = Download Agent {0} ({1})
view_admin_downloads_agent_loadError = Cannot get agent version info
view_admin_downloads_agent_md5 = Agent MD5
view_admin_downloads_agent_version = Agent Version
view_admin_downloads_bundleDownload = Bundle Deployer Download
-view_admin_downloads_bundle_help = <p> This is the Bundle Deployer tool. It is for use by developers and packagers of RHQ bundles. This standalone tool allows you to test your bundles and their recipes from a console. </p>
+view_admin_downloads_bundle_help = <p> \
view_admin_downloads_bundle_link_label = Link
view_admin_downloads_bundle_link_value = Download Bundle Deployer {0}
view_admin_downloads_bundle_loadError = Cannot get bundle deployer info
view_admin_downloads_cliDownload = Command Line Client Download
view_admin_downloads_cli_buildNumber = CLI Build
-view_admin_downloads_cli_help = <p> This is the Command Line Client tool, otherwise known as the CLI. It is a standalone tool that runs from within a console and provides a command line interface to the RHQ Server. You can invoke commands via the CLI as well as run scripts to perform automated tasks. See the documentation for more information on how to install and use the CLI. </p>
+view_admin_downloads_cli_help = <p> \
view_admin_downloads_cli_link_label = Link
view_admin_downloads_cli_link_value = Download CLI {0} ({1})
view_admin_downloads_cli_loadError = Cannot get CLI version info
@@ -561,13 +561,13 @@ view_admin_systemSettings_EventPurge_desc = How old event data must be before be
view_admin_systemSettings_EventPurge_name = Delete Events Older Than
view_admin_systemSettings_JAASProvider_desc = Should LDAP be used to determine user identity?
view_admin_systemSettings_JAASProvider_name = Enable LDAP
-view_admin_systemSettings_LDAPBaseDN_desc = The base of the directory tree to search for usernames and passwords while authenticating users, e.g. ou=People,dc=redhat,dc=com
+view_admin_systemSettings_LDAPBaseDN_desc = The base of the directory tree to search for usernames and passwords while authenticating users, e.g. ou = People,dc = redhat,dc = com
view_admin_systemSettings_LDAPBaseDN_name = Search Base
-view_admin_systemSettings_LDAPBindDN_desc = The username to connect to the LDAP server when querying the LDAP user database. This is typically the full LDAP distinguished name (DN) of a manager user, e.g. cn=Manager,dc=redhat,dc=com
+view_admin_systemSettings_LDAPBindDN_desc = The username to connect to the LDAP server when querying the LDAP user database. This is typically the full LDAP distinguished name (DN) of a manager user, e.g. cn = Manager,dc = redhat,dc = com
view_admin_systemSettings_LDAPBindDN_name = Username
view_admin_systemSettings_LDAPBindPW_desc = The credentials of the user used to connect to the LDAP server when querying the LDAP user database.
view_admin_systemSettings_LDAPBindPW_name = Password
-view_admin_systemSettings_LDAPFilter_desc = Any additional filters to apply when doing the LDAP search. This is useful if the population to authenticate can be identified via a given LDAP property, e.g. RHQUser=true
+view_admin_systemSettings_LDAPFilter_desc = Any additional filters to apply when doing the LDAP search. This is useful if the population to authenticate can be identified via a given LDAP property, e.g. RHQUser = true
view_admin_systemSettings_LDAPFilter_name = Search Filter
view_admin_systemSettings_LDAPGroupFilter_desc = LDAP search filter that must return all LDAP groups available for authorization. This is used for LDAP group authorization.
view_admin_systemSettings_LDAPGroupFilter_name = Group Search Filter
@@ -653,9 +653,9 @@ view_alert_common_tab_dampening_partial_evalatuions_label_tooltip = O total de v
view_alert_common_tab_dampening_partial_occurrences_label = Ocorr\u00EAncias
view_alert_common_tab_dampening_partial_occurrences_label_tooltip = O n\u00FAmero de vezes que o conjunto de condi\u00E7\u00F5es deve ser satisfeito durante as \u00FAltimas N verifica\u00E7\u00F5es antes do alerta ser disparado.
view_alert_common_tab_general = Propriedades Gerais
-view_alert_common_tab_invalid_condition_category = Categoria de condi\u00E7\u00E3o inv\u00E1lida - favor reportar como um bug: {0}
-view_alert_common_tab_invalid_dampening_category = Categora de sensibilidade inv\u00E1lida - favor reportar como um bug: {0}
-view_alert_common_tab_invalid_time_units = Unidade de tempo inv\u00E1lida - favor reportar como um bug: {0}
+view_alert_common_tab_invalid_condition_category = Categoria de condi\u00E7\u00E3o inv\u00E1lida - favor reportar como um bug\: {0}
+view_alert_common_tab_invalid_dampening_category = Categora de sensibilidade inv\u00E1lida - favor reportar como um bug\: {0}
+view_alert_common_tab_invalid_time_units = Unidade de tempo inv\u00E1lida - favor reportar como um bug\: {0}
view_alert_common_tab_notifications = Notifica\u00E7\u00F5es
view_alert_common_tab_notifications_all_emails = Todos os Emails
view_alert_common_tab_notifications_bad_emails = Emails recusados
@@ -697,7 +697,7 @@ view_alert_definition_condition_editor_metric_calltime_common_limit_tooltip = Te
view_alert_definition_condition_editor_metric_calltime_common_name = M\u00E9trica do tempo de chamada
view_alert_definition_condition_editor_metric_calltime_common_regex = Express\u00E3o Regular
view_alert_definition_condition_editor_metric_calltime_common_regex_tooltip = Se especificada, essa \u00E9 a express\u00E3o regular a ser satisfeita pela chamada para disparar a condi\u00E7\u00E3o.
-view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Especifica um tempo limite para a chamada que, quando alcan\u00E7ado, dispara a condi\u00E7\u00E3o. O valor especificado deve ser absoluto e com uma unidade de medida opcional. \u00C9 necess\u00E1rio especificar o tempo limite da chamada para compar\u00E1-lo ao valor: m\u00EDnimo, m\u00E1ximo ou m\u00E9dio.
+view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Especifica um tempo limite para a chamada que, quando alcan\u00E7ado, dispara a condi\u00E7\u00E3o. O valor especificado deve ser absoluto e com uma unidade de medida opcional. \u00C9 necess\u00E1rio especificar o tempo limite da chamada para compar\u00E1-lo ao valor\: m\u00EDnimo, m\u00E1ximo ou m\u00E9dio.
view_alert_definition_condition_editor_metric_calltime_threshold_value = Valor do tempo de chamada
view_alert_definition_condition_editor_metric_calltime_threshold_value_tooltip = O valor do limiar (<i>threshold</i>) da m\u00E9trica usado para disparar a condi\u00E7\u00E3o quando comparado ao mecanismo de compara\u00E7\u00E3o escolhido.
view_alert_definition_condition_editor_metric_change_tooltip = Especifica a m\u00E9trica cujo valor deve ser alterado para disparar a condi\u00E7\u00E3o.
@@ -763,7 +763,7 @@ view_alert_definition_notification_operation_editor_mode_relative = Recurso pare
view_alert_definition_notification_operation_editor_mode_specific = Recurso Espec\u00EDfico
view_alert_definition_notification_operation_editor_mode_this = Este Recurso
view_alert_definition_notification_operation_editor_mode_title = Modo de Sele\u00E7\u00E3o do Recurso
-view_alert_definition_notification_operation_editor_mode_unknown = OP\u00C7\u00C3O INV\u00C1LIDA - BUG!
+view_alert_definition_notification_operation_editor_mode_unknown = OP\u00C7\u00C3O INV\u00C1LIDA - BUG\!
view_alert_definition_notification_operation_editor_operations_loadFailed = Falha ao carregar a lista de opera\u00E7\u00F5es dispon\u00EDveis
view_alert_definition_notification_operation_editor_operations_no_parameters = Esta opera\u00E7\u00E3o n\u00E3o recebe par\u00E2metros
view_alert_definition_notification_operation_editor_relative_ancestor = Iniciar a busca a partir de
@@ -815,12 +815,12 @@ view_alert_details_field_recovery_info = Informa\u00E7\u00E3o de Recupera\u00E7\
view_alert_details_loadFailed = Falha ao recuperar detalhes do alerta
view_alerts_ack_confirm = Confirma o(s) alerta(s) selecionado(s)?
view_alerts_ack_confirm_all = Confirma todos os alertas?
-view_alerts_ack_failure = Falha ao confirmar alertas com os seguintes IDs: {0}
+view_alerts_ack_failure = Falha ao confirmar alertas com os seguintes IDs\: {0}
view_alerts_ack_failure_all = N\u00E3o foi poss\u00EDvel confirmar todos os alertas
view_alerts_ack_success = Alertas {0} confirmados com sucesso
view_alerts_delete_confirm = Excluir o(s) alerta(s) selecionado(s)?
view_alerts_delete_confirm_all = Excluir todos os alertas?
-view_alerts_delete_failure = Falha ao excluir alertas com os seguintes IDs: {0}
+view_alerts_delete_failure = Falha ao excluir alertas com os seguintes IDs\: {0}
view_alerts_delete_failure_all = N\u00E3o foi poss\u00EDvel excluir os alertas
view_alerts_delete_success = Alertas {0} exclu\u00EDdos com sucesso
view_alerts_field_ack_status = Status
@@ -886,8 +886,8 @@ view_bundle_bundleVersion = Bundle Version~
view_bundle_bundleVersions = Bundle Versions~
view_bundle_bundles = Bundles~
view_bundle_createWizard_bundleDistro = Bundle Distribution~
-view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version=[{1}] - the bundle may still exist in the database~
-view_bundle_createWizard_cancelSuccessful = Canceled the creation of bundle [{0}], version=[{1}]~
+view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version = [{1}] - the bundle may still exist in the database~
+view_bundle_createWizard_cancelSuccessful = Canceled the creation of bundle [{0}], version = [{1}]~
view_bundle_createWizard_clickToUploadRecipe = Click to upload a recipe file~
view_bundle_createWizard_createFailure = Failed to create the bundle~
view_bundle_createWizard_createSuccessful = You have successfully created a bundle named [{0}] with a version of [{1}]~
@@ -1082,7 +1082,7 @@ view_configurationDetails_somePropertiesInvalid = The following configuration pr
view_configurationHistoryDetails_dialogTitle = Configuration Details~
view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.~
view_configurationHistoryList_cannotDeleteCurrent = One of the selected history items represents the current configuration - you cannot delete it.
-view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. You must purge that parent group history item before you can delete its individual resource history items.
+view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. \
view_configurationHistoryList_delete_failure = Failed to delete the configuration history items.
view_configurationHistoryList_delete_success = You successfully deleted the selected configuration history items.
view_configurationHistoryList_itemNamePlural = configuration history items
@@ -1153,7 +1153,7 @@ view_dynagroup_exprBuilder_expressionType_resource = Resource
view_dynagroup_exprBuilder_expressionType_resourceCategory = Resource Category
view_dynagroup_exprBuilder_expressionType_resourceConfig = Resource Configuration
view_dynagroup_exprBuilder_expressionType_resourceType = Resource Type
-view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on:<br/> <b>Resource</b>: A resource property such as its name or version<br/> <b>Resource Type</b>: Search for resources of a specific type<br/> <b>Resource Category</b>: Search for resources by category: platform, server, service<br/> <b>Trait</b>: Resources that have selected values for a monitored trait<br/> <b>Plugin Configuration</b>: Search by the plugin component configuration setting of the component<br/> <b>Resource Configuration</b>: Search by the configuration setting of the managed resource
+view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on\:<br/> <b>Resource</b>\: A resource property such as its name or version<br/> <b>Resource Type</b>\: Search for resources of a specific type<br/> <b>Resource Category</b>\: Search for resources by category\: platform, server, service<br/> <b>Trait</b>\: Resources that have selected values for a monitored trait<br/> <b>Plugin Configuration</b>\: Search by the plugin component configuration setting of the component<br/> <b>Resource Configuration</b>\: Search by the configuration setting of the managed resource
view_dynagroup_exprBuilder_expressionType_trait = Trait
view_dynagroup_exprBuilder_expression_tooltip = This is the full expression that is represented by the selections in the form below. This text will be added to your group definition expression text when you click the "Add Expression" button.
view_dynagroup_exprBuilder_groupBy = Group by
@@ -1178,7 +1178,7 @@ view_dynagroup_exprBuilder_resource_resource = Resource
view_dynagroup_exprBuilder_resource_tooltip = Choose the level of the resource you wish to select. For example, select "parent" will find resources whose parent resource matches the rest of the expression.
view_dynagroup_exprBuilder_title = Expression Builder
view_dynagroup_exprBuilder_unset = Unset
-view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the "=" operator because of how databases store and query data.
+view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the " = " operator because of how databases store and query data.
view_dynagroup_exprBuilder_value_tooltip = The string value for the expression to query
view_dynagroup_expression = Expression~
view_dynagroup_expressionBuilderIconTooltip = Expression Builder...
@@ -1214,7 +1214,7 @@ view_dynagroup_template_platforms = Platform resources in inventory
view_dynagroup_template_uniqueResourceTypes = Unique resource types in inventory
view_groupConfigEdit_member = Membro
view_groupConfigEdit_noListProps = Lista de propriedades n\u00E3o suportada atualmente para configura\u00E7\u00F5es em grupo.
-view_groupConfigEdit_setAll = Atribuir todos os valores \u00E0:
+view_groupConfigEdit_setAll = Atribuir todos os valores \u00E0\:
view_groupConfigEdit_tooltip_1 = Valores dos membros diferem - clique no \u00EDcone para edit\u00E1-los.
view_groupConfigEdit_unset = Remover atribui\u00E7\u00E3o
view_groupConfigEdit_valsDiff = valores dos membros diferem
@@ -1222,7 +1222,7 @@ view_groupConfigEdit_valsDiffForProp = Valores dos membros para a Propriedade [{
view_groupCreateWizard_createFailure = Failed to create the resource group~
view_groupCreateWizard_createStepName = Group Settings~
view_groupCreateWizard_createStep_recursive = Recursive~
-view_groupCreateWizard_createSuccessful_concise = You have created a new resource group. [<a href="{0}">View Group</a>]~
+view_groupCreateWizard_createSuccessful_concise = You have created a new resource group. [<a href = "{0}">View Group</a>]~
view_groupCreateWizard_createSuccessful_full = You have created a new [{0}] resource group with the name [{1}] that contains [{2}] member resources~
view_groupCreateWizard_membersStepName = Select Members~
view_groupCreateWizard_title = Create Group~
@@ -1378,18 +1378,18 @@ view_inventory_summary_agent_status_title = Agent Communications Status~
view_inventory_summary_agent_title = Agent Managing this Resource~
view_inventory_unavailableServers = Unavailable Servers
view_leftNav_unknownPage = P\u00E1gina desconhecida [{0}] para a se\u00E7\u00E3o [{1}] - URL inv\u00E1lida.
-view_login_invalidEmail = Endere\u00E7o de e-mail inv\u00E1lido~
-view_login_login = Login~
-view_login_logout = Logout~
-view_login_noBackend = Fonte de Dados indispon\u00EDvel.~
+view_login_invalidEmail = Endere\u00E7o de e-mail inv\u00E1lido
+view_login_login = Entrar
+view_login_logout = Sair
+view_login_noBackend = Fonte de Dados indispon\u00EDvel.
view_login_noLdap = Note: Optional retrieval of ldap details unsuccessful. Manual entry is required.~
-view_login_noUser = Usu\u00E1rio ou senha inv\u00E1lidos.~
-view_login_prompt = Favor efetuar Login~
-view_login_registerLater = (Logout - Concluir registro mais tarde.)~
-view_login_registerLdapSuccess = Novo usu\u00E1rios do LDAP registrado com sucesso.~
-view_login_registerUser = Registrar Usu\u00E1rio~
-view_login_welcome = Bem Vindo~
-view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>~
+view_login_noUser = Usu\u00E1rio ou senha inv\u00E1lidos.
+view_login_prompt = Favor efetuar Login
+view_login_registerLater = (Sair - Concluir registro mais tarde.)
+view_login_registerLdapSuccess = Novo usu\u00E1rios do LDAP registrado com sucesso.
+view_login_registerUser = Registrar Usu\u00E1rio
+view_login_welcome = Bem Vindo
+view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON\! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>
view_measureRange_day = 1 Dia
view_measureRange_days = {0} Dias
view_measureRange_hour = 1 Hora
@@ -1406,7 +1406,7 @@ view_measureTable_live_title = Live Data
view_measure_nan = --dados indispon\u00EDveis--
view_measurementOob_title = M\u00E9tricas Suspeitas~
view_menuBar_help = Ajuda~
-view_menuBar_logout = Logout~
+view_menuBar_logout = Sair
view_messageCenter_button_messages = Mensagens~
view_messageCenter_clearAllMessages = Clear All Messages
view_messageCenter_lastNMessages = Last {0} Messages
@@ -1625,14 +1625,14 @@ view_remoteAgentInstall_promptUser = Nome do usu\u00E1rio informado nas credenci
view_remoteAgentInstall_result = Resultado
view_remoteAgentInstall_resultCode = ResultCode
view_remoteAgentInstall_startAgent = Iniciar Agente
-view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente: [{0}]
+view_remoteAgentInstall_startAgentResults = resultado da inicializa\u00E7\u00E3o do Agente\: [{0}]
view_remoteAgentInstall_step = Step
view_remoteAgentInstall_stopAgent = Parar Agente
-view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente: [{0}]
+view_remoteAgentInstall_stopAgentResults = resultado do encerramento do Agente\: [{0}]
view_remoteAgentInstall_success = Instala\u00E7\u00E3o do Agente finalizada
view_remoteAgentInstall_updateStatus = Status da Atualiza\u00E7\u00E3o
view_reportsTop_description = This section provides access to global reports.~
-view_reportsTop_title = Relat\u00F3rios~
+view_reportsTop_title = Relat\u00F3rios
view_reports_alertDefinitions = Defini\u00E7\u00E3o de Alertas~
view_reports_alertDefinitions_parentHover = Click to go to the parent alert definition
view_reports_alertDefinitions_resTypeLoadError = Cannot get the template resource type - unable to view the alert template.
@@ -1682,12 +1682,12 @@ view_resource_monitor_table_max = Maximum
view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details~
view_resource_title_tagUpdateFailed = Failed to update resource tags~
-view_searchBar_defaultPattern = definir nome para o padr\u00E3o~
-view_searchBar_error_selectSavedSearch = ''Erro ao selecionar a pesquisa''~
-view_searchBar_query = Query~
-view_searchBar_resourceGroups = Grupos de Recursos~
-view_searchBar_resources = Recursos~
-view_searchBar_welcomeMessage = procurar por {0}s~
+view_searchBar_defaultPattern = definir nome para o padr\u00E3o
+view_searchBar_error_selectSavedSearch = ''Erro ao selecionar a pesquisa''
+view_searchBar_query = Pesquisa
+view_searchBar_resourceGroups = Grupos de Recursos
+view_searchBar_resources = Recursos
+view_searchBar_welcomeMessage = procurar por {0}s
view_searchGUI_loginStatus = Imposs\u00EDvel determinar o status do login, verifique o status do servidor~
view_selector_assigned = Associado {0}
view_selector_available = Dispon\u00EDvel {0}
@@ -1717,7 +1717,7 @@ view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1
view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.~
view_table_drawFail = Failed to draw Table [{0}].
view_table_matchingRows = Matching Rows: {0} (selected: {1})
-view_table_totalRows = Total de Linhas: {0} (selecionada: {1})
+view_table_totalRows = Total de Linhas\: {0} (selecionada\: {1})
view_tabs_common_activity = Activity
view_tabs_common_agent = Agent
view_tabs_common_alerts = Alerts~
@@ -1767,7 +1767,7 @@ view_tags_tags = Tags~
view_tags_title = Tags:~
view_tags_tooltip_1 = Click to remove this Tag~
view_tags_tooltip_2 = Click to edit Tags~
-view_tags_tooltip_3 = Enter a Tag in the format: (namespace:)(semantic=)tagname (e.g. it:env=QA, or owner=John)
+view_tags_tooltip_3 = Enter a Tag in the format: (namespace:)(semantic = )tagname (e.g. it:env = QA, or owner = John)
view_testTop_description = Esta se\u00E7\u00E3o cont\u00E9m p\u00E1ginas para realiza\u00E7\u00E3o de testes em v\u00E1rios componentes UI.~
view_testTop_title = Teste~
view_titleBar_common_addedFav = You have added [{0}] as a favorite~
@@ -1834,51 +1834,51 @@ view_upload_tooltip_1b = Select a file to upload, then click Next
view_upload_tooltip_2 = File upload had previously failed~
view_upload_upload = Upload~
view_upload_uploadFile = UploadFile~
-widget_colorPicker_tooltip = Click to select a new color
-widget_durationItem_inputUnitLessThanTargetUnit = Input unit is less than target unit.
-widget_durationItem_unitTypeNotSupported = Unit type [{0}] is not supported by this DurationItem.
-widget_jobTriggerEditor_fieldHelp_repeatDuration = keep running this operation this many times or until this amount of time has elapsed
-widget_jobTriggerEditor_fieldHelp_repeatInterval = how often the operation should be executed
-widget_jobTriggerEditor_fieldHelp_startDelay = start executing the operation after this amount of time has elapsed
-widget_jobTriggerEditor_field_cronExpression = Cron Expression
-widget_jobTriggerEditor_field_mode = Schedule using
-widget_jobTriggerEditor_field_repeatInterval_later = Repeat every
-widget_jobTriggerEditor_field_repeatInterval_now = Run now and every
-widget_jobTriggerEditor_field_startType = Run
-widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime = End time must be after start time.
-widget_jobTriggerEditor_message_endTimeMustBeInFuture = End time must be in the future.
-widget_jobTriggerEditor_message_startTimeMustBeInFuture = Start time must be in the future.
-widget_jobTriggerEditor_tab_examples = Examples
-widget_jobTriggerEditor_tab_format = Format
-widget_jobTriggerEditor_value_calendar = Calendar
-widget_jobTriggerEditor_value_cronExpression = Cron Expression
-widget_jobTriggerEditor_value_for = For
-widget_jobTriggerEditor_value_in = in
-widget_jobTriggerEditor_value_indefinitely = Indefinitely
-widget_jobTriggerEditor_value_later = Later
+widget_colorPicker_tooltip = Clique para selecionar uma nova cor
+widget_durationItem_inputUnitLessThanTargetUnit = A unidade de entrada \u00E9 menor que a unidade final.
+widget_durationItem_unitTypeNotSupported = Tipo de unidade [{0}] n\u00E3o suportada por este Item de Dura\u00E7\u00E3o.
+widget_jobTriggerEditor_fieldHelp_repeatDuration = permanecer executando esta opera\u00E7\u00E3o por tantas vezes ou at\u00E9 o t\u00E9rmino deste tempo
+widget_jobTriggerEditor_fieldHelp_repeatInterval = qual a frequ\u00EAncia de execu\u00E7\u00E3o da opera\u00E7\u00E3o
+widget_jobTriggerEditor_fieldHelp_startDelay = iniciar a execu\u00E7\u00E3o da opera\u00E7\u00E3o ap\u00F3s passar esta quantidade de tempo
+widget_jobTriggerEditor_field_cronExpression = Express\u00E3o da Cron
+widget_jobTriggerEditor_field_mode = Agendar usando
+widget_jobTriggerEditor_field_repeatInterval_later = Sempre repetir
+widget_jobTriggerEditor_field_repeatInterval_now = Executar agora e sempre
+widget_jobTriggerEditor_field_startType = Executar
+widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime = O t\u00E9rmino deve ser ap\u00F3s o in\u00EDcio.
+widget_jobTriggerEditor_message_endTimeMustBeInFuture = O t\u00E9rmino deve ser no futuro.
+widget_jobTriggerEditor_message_startTimeMustBeInFuture = O in\u00EDcio deve ser no futuro.
+widget_jobTriggerEditor_tab_examples = Exemplos
+widget_jobTriggerEditor_tab_format = Formato
+widget_jobTriggerEditor_value_calendar = Calend\u00E1rio
+widget_jobTriggerEditor_value_cronExpression = Express\u00E3o da Cron
+widget_jobTriggerEditor_value_for = Para
+widget_jobTriggerEditor_value_in = em
+widget_jobTriggerEditor_value_indefinitely = Indefinidamente
+widget_jobTriggerEditor_value_later = Mais tarde
widget_jobTriggerEditor_value_laterAndRepeat = Later & Repeat
-widget_jobTriggerEditor_value_now = Now
-widget_jobTriggerEditor_value_nowAndRepeat = Now & Repeat
-widget_jobTriggerEditor_value_on = on
-widget_jobTriggerEditor_value_until = Until
-widget_recordEditor_error_invalidViewPath = Caminho inv\u00E1lido: [{0}]
+widget_jobTriggerEditor_value_now = Agora
+widget_jobTriggerEditor_value_nowAndRepeat = Agora & Repetir
+widget_jobTriggerEditor_value_on = em
+widget_jobTriggerEditor_value_until = At\u00E9
+widget_recordEditor_error_invalidViewPath = Caminho inv\u00E1lido\: [{0}]
widget_recordEditor_error_multipleRecords = Foram encontrados v\u00E1rios registros - era esperado apenas um.
widget_recordEditor_error_noRecords = Nenhum registro encontrado - era esperado exatamente um.
-widget_recordEditor_error_operation = Operation failed. An error occurred
-widget_recordEditor_error_operationInvalidValues = Operation failed - one or more fields have invalid values
-widget_recordEditor_error_permissionCreate = You do not have the permissions required to create a new [{0}]
-widget_recordEditor_error_unsupportedOperationType = Tipo de opera\u00E7\u00E3o n\u00E3o suportada: [{0}]
+widget_recordEditor_error_operation = Falha na Opera\u00E7\u00E3o. Ocorreu um Erro
+widget_recordEditor_error_operationInvalidValues = Falha na Opera\u00E7\u00E3o - um ou mais campos possuem valores inv\u00E1lidos
+widget_recordEditor_error_permissionCreate = Voc\u00EA n\u00E3o possui permiss\u00E3o necess\u00E1ria para criar um novo [{0}]
+widget_recordEditor_error_unsupportedOperationType = Tipo de opera\u00E7\u00E3o n\u00E3o suportada\: [{0}]
widget_recordEditor_info_recordCreatedConcise = {0} criado.
widget_recordEditor_info_recordCreatedDetailed = {0} [{1}] criado.
widget_recordEditor_info_recordUpdatedConcise = {0} atualizado.
widget_recordEditor_info_recordUpdatedDetailed = {0} [{1}] atualizado.
widget_recordEditor_info_recordsDeletedConcise = {0} {1} exclu\u00EDdo.
-widget_recordEditor_info_recordsDeletedDetailed = {0} {1} exclu\u00EDdo: {2}.
+widget_recordEditor_info_recordsDeletedDetailed = {0} {1} exclu\u00EDdo\: {2}.
widget_recordEditor_label_loading = Carregar...
widget_recordEditor_title_edit = Editar {0} [{1}]
widget_recordEditor_title_new = Criar Novo {0}
widget_recordEditor_title_view = Visualizar {0} [{1}]
-widget_recordEditor_warn_validation = One or more fields have invalid values. This [{0}] cannot be saved until these values are corrected
+widget_recordEditor_warn_validation = Um ou mais campos possuem valores inv\u00E1lidos. Este [{0}] n\u00E3o pode ser salvo at\u00E9 que os valores sejam corrigidos.
widget_resourceFactoryWizard_archPrompt = Arquitetura do Pacote
widget_resourceFactoryWizard_configTemplatePrompt = Modelo de Configura\u00E7\u00E3o de Recurso
widget_resourceFactoryWizard_contentTemplatePrompt = Modelos de Configura\u00E7\u00E3o do Tempo de Deploy
@@ -1886,7 +1886,7 @@ widget_resourceFactoryWizard_createSubmit = A requisi\u00E7\u00E3o para cria\u00
widget_resourceFactoryWizard_createSubmitType = A requisi\u00E7\u00E3o para cria\u00E7\u00E3o de um recurso do tipo [{0}] foi submetida com sucesso.
widget_resourceFactoryWizard_createWizardTitle = Criar novo recurso do tipo [{0}]
widget_resourceFactoryWizard_createWizardWindowTitle = Assistente para Cria\u00E7\u00E3o de Recurso
-##widget_resourceFactoryWizard_editConfigStepName = Deployment Options
+##widget_resourceFactoryWizard_editConfigStepName = Deployment Options
widget_resourceFactoryWizard_execute1 = Falha ao criar novo recurso - vers\u00E3o do pacote inexistente
widget_resourceFactoryWizard_execute2 = Falha ao criar novo recurso
widget_resourceFactoryWizard_failedToDeleteVersion = Falha ao excluir a vers\u00E3o do pacote durante o cancelamento da cria\u00E7\u00E3o do recurso
@@ -1896,10 +1896,10 @@ widget_resourceFactoryWizard_importSubmitted = Uma requisi\u00E7\u00E3o para imp
widget_resourceFactoryWizard_importWizardTitle = Importar Recursos do Tipo [{0}]
widget_resourceFactoryWizard_importWizardWindowTitle = Assistente para Importa\u00E7\u00E3o de Recurso
widget_resourceFactoryWizard_infoStepName = Informa\u00E7\u00E3o do Recurso
-widget_resourceFactoryWizard_infoStep_loadFail = Failed to get available Architectures
+widget_resourceFactoryWizard_infoStep_loadFail = Falha ao recuperar Arquiteturas dispon\u00EDveis.
widget_resourceFactoryWizard_namePrompt = Novo Nome do Recurso
widget_resourceFactoryWizard_templatePrompt = Modelo de Propriedades para Conex\u00E3o
-##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the RHQ Agent). Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
+##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the RHQ Agent). Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_uploadFailure = Falha ao realizar o upload do arquivo
widget_resourceFactoryWizard_uploadFileStepName = Upload do Arquivo do Recurso
widget_resourceFactoryWizard_uploadInProgress = Upload em andamento... Esse processo pode demorar alguns minutos para ser finalizado em caso de arquivos muito grandes.
@@ -1909,7 +1909,7 @@ widget_resourceSelector_pleaseSelectMultipleResource = Favor selecionar um ou ma
widget_resourceSelector_pleaseSelectResource = Favor selecionar um recurso
widget_resourceSelector_selectMultipleResources = Selecionar Recursos
widget_resourceSelector_selectResource = Selecionar um Recurso
-widget_typeCache_loadFail = Failed to load resource type metadata
-widget_typeTree_badTemplateType = Invalid URL. Unknown template type [{0}]
-widget_typeTree_badTypeId = Invalid URL. Bad resource type ID [{0}]
-widget_typeTree_loadFail = Failed to load resource types
+widget_typeCache_loadFail = Falha ao carregar o metadado do tipo de recurso
+widget_typeTree_badTemplateType = URL inv\u00E1lida. Tipo de template desconhecido [{0}]
+widget_typeTree_badTypeId = URL inv\u00E1lida. Tipo de recurso inv\u00E1lido\: ID [{0}]
+widget_typeTree_loadFail = Falha ao carregar tipos de recurso
commit 4120c6b83a25a6b52c44e8e5a6fa528989f8c4a5
Merge: 447cd29 c8dc1d8
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Jul 14 11:46:34 2011 +0200
Merge branch 'master' into code-smell
diff --cc modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
index e84d7d4,be0446b..d21ab62
--- a/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
@@@ -23,9 -23,10 +23,11 @@@
package org.rhq.core.util.stream;
import java.io.BufferedInputStream;
+ import java.io.BufferedReader;
+ import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
commit 19c02c04340a49aae6749166e175a96a4602f2d7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 15:33:59 2011 -0500
A couple of small configuration and test corrections.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index cf12b89..70a9f2b 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -60,7 +60,7 @@
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="refreshProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
<c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
<c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 41bf26a..fb1ccba 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -36,7 +36,6 @@ public class ProxyInfoTest {
@Test
public void testProxyInfo() throws IOException {
-
String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
for (String testConfigurationFile : availableFiles) {
@@ -44,10 +43,6 @@ public class ProxyInfoTest {
ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString() + " - " + context.isEnabled());
-
- log.info(proxyInfo.getAvailableContexts().indexOf(context));
-
assert (proxyInfo.getAvailableContexts().indexOf(context) != -1) : "Equals and hash functions not implemented correctly for "
+ ProxyInfo.Context.class.getCanonicalName();
commit 8f5f1559d0d45b7405334d588b5272254ac119c9
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 15:33:39 2011 -0500
The configuration needs to be refreshed before computing availability on all the contexts. Attempt to correctly invoke the operation.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 783f579..ef13143 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,6 +18,9 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -25,4 +28,15 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+
+ @Override
+ public AvailabilityType getAvailability() {
+ try {
+ OperationResult result = this.invokeOperation("refresh", new Configuration());
+ } catch (Exception e) {
+ log.info(e);
+ }
+
+ return super.getAvailability();
+ }
}
commit ae2f827b434bb95c2bcf76f7d5a3e1e07f910d90
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Jul 11 13:23:22 2011 -0500
Added availability attribute for contexts. Also improved unit test and coverage.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 922197a..8512ed5 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -21,6 +21,7 @@ package org.rhq.plugins.modcluster;
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
@@ -36,18 +37,43 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
}
@Override
+ public AvailabilityType getAvailability() {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(
+ proxyInfo.getAvailableContexts().indexOf(context));
+
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
+
+ return AvailabilityType.DOWN;
+ } catch (Exception e) {
+ log.info(e);
+ return AvailabilityType.DOWN;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ @Override
public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
- System.out.println(context.toString());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
Object resultObject = getEmsBean().getOperation(name).invoke(
- new Object[] { context.host, context.path });
+ new Object[] { context.getHost(), context.getPath() });
return new OperationResult(String.valueOf(resultObject));
} finally {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 40b24f9..c517364 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -50,9 +50,7 @@ public class ProxyInfo {
String host = vhostPieces[1].trim();
host = host.substring(host.indexOf(":") + 1).trim();
- System.out.println(identifier + "--" + host);
availableVHosts.put(identifier, new Vhost(identifier, host));
-
}
Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
@@ -65,9 +63,14 @@ public class ProxyInfo {
String identifier = contextPieces[0];
identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String rawIsEnabled = contextPieces[2];
+ rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
+ boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
+
Vhost relatedVhost = availableVHosts.get(identifier);
- availableContexts.add(new Context(relatedVhost.getHost(), actualContext));
+ availableContexts.add(new Context(relatedVhost.getHost(), actualContext, isEnabled));
}
}
@@ -95,12 +98,18 @@ public class ProxyInfo {
}
public static class Context {
- String path;
- String host;
+ private String path;
+ private String host;
+ private boolean isEnabled;
public Context(String host, String path) {
+ this(path, host, false);
+ }
+
+ public Context(String host, String path, boolean isEnabled) {
this.path = path;
this.host = host;
+ this.isEnabled = isEnabled;
}
public String getPath() {
@@ -111,14 +120,49 @@ public class ProxyInfo {
return host;
}
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
@Override
public String toString() {
return host + ":" + path;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Context other = (Context) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+
public static Context fromString(String stringRepresentation) {
String part[] = stringRepresentation.trim().split(":");
- return new Context(part[0], part[1]);
+ return new Context(part[1], part[0]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index be5e987..41bf26a 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -37,15 +37,26 @@ public class ProxyInfoTest {
@Test
public void testProxyInfo() throws IOException {
- String testConfiguration = readConfigFile("/proxy_config/proxy_config_1.txt");
+ String[] availableFiles = new String[] { "/proxy_config/proxy_config_1.txt", "/proxy_config/proxy_config_2.txt" };
- ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+ for (String testConfigurationFile : availableFiles) {
+ String testConfiguration = readConfigFile(testConfigurationFile);
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
- for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString());
- }
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString() + " - " + context.isEnabled());
+
+ log.info(proxyInfo.getAvailableContexts().indexOf(context));
+
+ assert (proxyInfo.getAvailableContexts().indexOf(context) != -1) : "Equals and hash functions not implemented correctly for "
+ + ProxyInfo.Context.class.getCanonicalName();
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ assert (context.equals(ProxyInfo.Context.fromString(context.toString())) == true) : "fromString and toString are not equivalent for:"
+ + ProxyInfo.Context.class.getCanonicalName();
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
}
private String readConfigFile(String filePath) throws IOException {
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt
new file mode 100644
index 0000000..573967a
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_2.txt
@@ -0,0 +1,16 @@
+{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3690,Read: 27864911,Transfered: 0,Connected: 0,Load: 100
+Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 148,Read: 57994,Transfered: 0,Connected: 0,Load: 100
+Vhost: [1:1:1], Alias: test-agent-1
+Vhost: [2:1:2], Alias: remote-agent-2
+Context: [1:1:1], Context: /invoker, Status: DISABLED
+Context: [1:1:2], Context: /loaddemo, Status: DISABLED
+Context: [1:1:3], Context: /jbossws, Status: DISABLED
+Context: [1:1:4], Context: /juddi, Status: DISABLED
+Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED
+Context: [1:1:6], Context: /web-console, Status: DISABLED
+Context: [1:1:7], Context: /jmx-console, Status: DISABLED
+Context: [1:1:8], Context: /, Status: DISABLED
+Context: [2:1:9], Context: /, Status: ENABLED
+Context: [2:1:10], Context: /loaddemo, Status: ENABLED
+Context: [2:1:11], Context: /juddi, Status: ENABLED
+Context: [2:1:12], Context: /invoker, Status: ENABLED}
\ No newline at end of file
commit 1ea6e2e37dd183c05072cbbc48e664deaa88da68
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 16:37:41 2011 -0500
Created separate unit test suite for proxy info parser. Also, the code now parses the vhost from the actual config property.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index f2af2bc..40b24f9 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -20,7 +20,9 @@ package org.rhq.plugins.modcluster;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -32,17 +34,40 @@ import java.util.regex.Pattern;
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+ private Map<String, Vhost> availableVHosts = new HashMap<String, Vhost>();
public ProxyInfo(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost.*\n");
+ Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
+ while (vhostMatcher.find()) {
+ String rawVhost = vhostMatcher.group();
+ String[] vhostPieces = rawVhost.split(",");
- Pattern test = Pattern.compile("Context.*\n");
- Matcher m = test.matcher(rawProxyInfo);
- while (m.find()) {
- String rawContext = m.group();
+ String identifier = vhostPieces[0].trim();
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String host = vhostPieces[1].trim();
+ host = host.substring(host.indexOf(":") + 1).trim();
+
+ System.out.println(identifier + "--" + host);
+ availableVHosts.put(identifier, new Vhost(identifier, host));
+
+ }
+
+ Pattern contextPattern = Pattern.compile("Context.*[\n|}]");
+ Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
+ while (contextMatcher.find()) {
+ String rawContext = contextMatcher.group();
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context("localhost", actualContext));
+ String identifier = contextPieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+ Vhost relatedVhost = availableVHosts.get(identifier);
+
+ availableContexts.add(new Context(relatedVhost.getHost(), actualContext));
}
}
@@ -50,6 +75,25 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
+ private static class Vhost {
+ private String identifier;
+ private String host;
+
+ public Vhost(String identifier, String host) {
+ this.identifier = identifier;
+ this.host = host;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ }
+
public static class Context {
String path;
String host;
@@ -63,18 +107,10 @@ public class ProxyInfo {
return path;
}
- public void setPath(String path) {
- this.path = path;
- }
-
public String getHost() {
return host;
}
- public void setHost(String host) {
- this.host = host;
- }
-
@Override
public String toString() {
return host + ":" + path;
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0d16e92..874011a 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -47,10 +47,9 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.modcluster.ProxyInfo;
/**
- * @author Fady Matar
+ * @author Stefan Negrea
*/
@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
@@ -83,31 +82,6 @@ public class ModclusterPluginTest {
}
@Test
- public void testProxyInfo() {
- String test = "{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100\n"
- + "Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99\n"
- + "Vhost: [1:1:1], Alias: localhost\n"
- + "Vhost: [2:1:2], Alias: localhost\n"
- + "Context: [1:1:1], Context: /invoker, Status: DISABLED\n"
- + "Context: [1:1:2], Context: /loaddemo, Status: DISABLED\n"
- + "Context: [1:1:3], Context: /jbossws, Status: DISABLED\n"
- + "Context: [1:1:4], Context: /juddi, Status: DISABLED\n"
- + "Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED\n"
- + "Context: [1:1:6], Context: /web-console, Status: DISABLED\n"
- + "Context: [1:1:7], Context: /jmx-console, Status: DISABLED\n"
- + "Context: [1:1:8], Context: /, Status: DISABLED\n"
- + "Context: [2:1:9], Context: /loaddemo, Status: ENABLED\n" + "}";
-
- ProxyInfo proxyInfo = new ProxyInfo(test);
-
- for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
- log.info(context.toString());
- }
-
- assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
- }
-
- @Test
public void testPluginLoad() {
PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
new file mode 100644
index 0000000..be5e987
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.plugins.modcluster.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.Test;
+
+import org.rhq.plugins.modcluster.ProxyInfo;
+
+/**
+ * @author Stefan Negrea
+ */
+@Test(groups = "modcluster-plugin")
+public class ProxyInfoTest {
+ private Log log = LogFactory.getLog(this.getClass());
+
+ @Test
+ public void testProxyInfo() throws IOException {
+
+ String testConfiguration = readConfigFile("/proxy_config/proxy_config_1.txt");
+
+ ProxyInfo proxyInfo = new ProxyInfo(testConfiguration);
+
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString());
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
+
+ private String readConfigFile(String filePath) throws IOException {
+ StringBuffer tempBuffer = new StringBuffer();
+ byte[] readBuffer = new byte[1024];
+ int bytesRead = 0;
+
+ InputStream resourceStream = getClass().getResourceAsStream(filePath);
+
+ while ((bytesRead = resourceStream.read(readBuffer)) != -1) {
+ tempBuffer.append(new String(readBuffer, 0, bytesRead));
+ }
+
+ resourceStream.close();
+
+ return tempBuffer.toString();
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt
new file mode 100644
index 0000000..c99edd3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/proxy_config/proxy_config_1.txt
@@ -0,0 +1,13 @@
+{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100
+Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99
+Vhost: [1:1:1], Alias: localhost
+Vhost: [2:1:2], Alias: localhost
+Context: [1:1:1], Context: /invoker, Status: DISABLED
+Context: [1:1:2], Context: /loaddemo, Status: DISABLED
+Context: [1:1:3], Context: /jbossws, Status: DISABLED
+Context: [1:1:4], Context: /juddi, Status: DISABLED
+Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED
+Context: [1:1:6], Context: /web-console, Status: DISABLED
+Context: [1:1:7], Context: /jmx-console, Status: DISABLED
+Context: [1:1:8], Context: /, Status: DISABLED
+Context: [2:1:9], Context: /loaddemo, Status: ENABLED}
\ No newline at end of file
commit 98d1af05eae3cd7013b6a2315c601a29b62ab641
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 13:27:01 2011 -0600
Fine tunning the plugin based on UI testing.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index fb72b5f..f2af2bc 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -77,7 +77,7 @@ public class ProxyInfo {
@Override
public String toString() {
- return path + ":" + host;
+ return host + ":" + path;
}
public static Context fromString(String stringRepresentation) {
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 88357db..cf12b89 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -80,15 +80,14 @@
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
<c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
<c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
- <c:simple-property name="balancer" type="string" description="Name of the balancer."/>
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="containerName" type="string" description="Object name of the container."/>
- <c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
- <c:simple-property name="advertisePort" type="integer" description="Multicast port for discovery" />
- <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="domain" type="string" required="false" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
+ <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
<c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
<c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
</resource-configuration>
commit 96a80b66d1a918c012cc3825ef151df87c42a0ec
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 10:38:53 2011 -0600
Changed the name of context objects to the proposed short notation.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 9cb6b86..fb72b5f 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -42,7 +42,7 @@ public class ProxyInfo {
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context(actualContext, "localhost"));
+ availableContexts.add(new Context("localhost", actualContext));
}
}
@@ -54,7 +54,7 @@ public class ProxyInfo {
String path;
String host;
- public Context(String path, String host) {
+ public Context(String host, String path) {
this.path = path;
this.host = host;
}
@@ -77,25 +77,12 @@ public class ProxyInfo {
@Override
public String toString() {
- return "Context [path=" + path + ", host=" + host + "]";
+ return path + ":" + host;
}
public static Context fromString(String stringRepresentation) {
- stringRepresentation = stringRepresentation.substring(stringRepresentation.indexOf('[') + 1);
- stringRepresentation = stringRepresentation.substring(0, stringRepresentation.indexOf(']'));
- stringRepresentation = stringRepresentation.trim();
-
- String host = null;
- String path = null;
- for (String part : stringRepresentation.split(",")) {
- part = part.trim();
- if (part.startsWith("path=")) {
- path = part.substring(5).trim();
- } else if (part.startsWith("host=")) {
- host = part.substring(5).trim();
- }
- }
- return new Context(path, host);
+ String part[] = stringRepresentation.trim().split(":");
+ return new Context(part[0], part[1]);
}
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index ad23d34..88357db 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -74,7 +74,7 @@
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)" />
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
@@ -83,7 +83,7 @@
<c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" description="Name of the balancer."/>
- <c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
+ <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
<c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="containerName" type="string" description="Object name of the container."/>
<c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
commit 109bdc7c6ce20c3b514679be08f1735955945aa3
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 10:23:06 2011 -0600
Added support for all the mod_cluster available operations.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 17a4267..ad23d34 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,41 +27,70 @@
<c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
- <operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
- <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all engines.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:option value="MILLISECONDS" name="MILLISECONDS"/>
+ <c:option value="NANOSECONDS" name="NANOSECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
+ </parameters>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
- </operation>
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines">
+ </operation>
+ <operation name="reset" displayName="Reset the node" description="Move the node out of an error state." />
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
+ <operation name="refreshProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
+ </parameters>
+ </operation>
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="workerTimeout" type="int" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)"
<c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
- <c:simple-property name="smax" type="int" description="Maximum time on seconds for idle connections above smax."/>
- <c:simple-property name="maxAttempts" type="int" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="int" description="Security key for discovery."/>
+ <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
+ <c:simple-property name="advertiseSecurityKey" type="integer" description="Security key for discovery."/>
<c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
<c:simple-property name="balancer" type="string" description="Name of the balancer."/>
<c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="int" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
<c:simple-property name="containerName" type="string" description="Object name of the container."/>
<c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
- <c:simple-property name="advertisePort" type="int" description="Multicast port for discovery" />
+ <c:simple-property name="advertisePort" type="integer" description="Multicast port for discovery" />
<c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
- <c:simple-property name="flushWait" type="int" description="Time in ms to wait before flushing packets."/>
- <c:simple-property name="ping" type="int" description="Time in s to wait for a pong answer to a ping"/>
+ <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
+ <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
</resource-configuration>
<service name="mod_cluster Webapp Context"
@@ -69,19 +98,30 @@
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp">
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="result" type="boolean" description="The result of the operation."/>
</results>
</operation>
- <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp">
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout"/>
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS"/>
+ <c:option value="MILLISECONDS" name="MILLISECONDS"/>
+ <c:option value="NANOSECONDS" name="NANOSECONDS"/>
+ <c:option value="SECONDS" name="SECONDS"/>
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
commit 9133ff50842297f30bed9fcb7553a66a38379d76
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jul 7 09:49:10 2011 -0600
Added all the properties available through the JMX interface to the plugin configuration.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b2179c3..17a4267 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -45,9 +45,23 @@
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ <c:simple-property name="workerTimeout" type="int" description="Timeout to wait for an available worker (default is no wait)"
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
<c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
+ <c:simple-property name="smax" type="int" description="Maximum time on seconds for idle connections above smax."/>
+ <c:simple-property name="maxAttempts" type="int" description="Maximum number of attempts to send the request to the backend server."/>
+ <c:simple-property name="advertiseSecurityKey" type="int" description="Security key for discovery."/>
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
+ <c:simple-property name="balancer" type="string" description="Name of the balancer."/>
+ <c:simple-property name="flushPackets" type="boolean" descritpion="Allows controlling flusing of packets."/>
+ <c:simple-property name="socketTimeout" type="int" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="containerName" type="string" description="Object name of the container."/>
+ <c:simple-property name="domain" type="string" description="Domain parameter, which allows tying a jvmRoute to a particular domain."/>
+ <c:simple-property name="advertisePort" type="int" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address for discovery."/>
+ <c:simple-property name="flushWait" type="int" description="Time in ms to wait before flushing packets."/>
+ <c:simple-property name="ping" type="int" description="Time in s to wait for a pong answer to a ping"/>
</resource-configuration>
<service name="mod_cluster Webapp Context"
@@ -55,17 +69,17 @@
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable the webapp">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="disableContext" displayName="Disable webpapp" description="Disable the webapp">
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops the webapp">
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
commit 93ac1b5c3ba6032e3c726f32e01d73e16d73e076
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 15:28:48 2011 -0500
A couple more tweaks to make the user interface for mod_cluster display correct and proper text.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index cdfa7fb..b2179c3 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -24,7 +24,7 @@
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="nameTemplate" default="{application}"/>
+ <c:simple-property name="nameTemplate" default="mod_cluster"/>
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
@@ -50,22 +50,22 @@
<c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
</resource-configuration>
- <service name="mod_cluster_context"
+ <service name="mod_cluster Webapp Context"
discovery="ContextDiscoveryComponent"
class="ContextComponent"
description="A mod_cluster context">
- <operation name="enableContext" displayName="Enable webapp" description="Enable a single webapp">
+ <operation name="enableContext" displayName="Enable webapp" description="Enable the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="disableContext" displayName="Disable webpapp" description="Disable a single webapp">
+ <operation name="disableContext" displayName="Disable webpapp" description="Disable the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
</operation>
- <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops a single webapp">
+ <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops the webapp">
<results>
<c:simple-property name="result" type="boolean" description="The result of the operation" />
</results>
commit bed08a054ca397b313d97022c29ad61f1b7e6a81
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 13:19:07 2011 -0500
Fine tuning the plugin configuration based other plugin configuration and test deployment issues.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 74defeb..4536125 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -12,7 +12,7 @@
<artifactId>modcluster-plugin</artifactId>
<packaging>jar</packaging>
- <name>mod_cluster RHQ Plugin</name>
+ <name>RHQ mod_cluster Plugin</name>
<description>mod_cluster RHQ Agent plugin</description>
<dependencies>
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index be4b25b..cdfa7fb 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -14,11 +14,12 @@
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="ModclusterServerComponent"
supportsManualAdd="true"
- description="mod_cluster plugin">
+ description="mod_cluster plugin"
+ singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
- <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
+ <parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
</runs-inside>
<plugin-configuration>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 02f6584..f32159e 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -125,10 +125,11 @@
<module>augeas</module>
<module>apache</module>
<module>tomcat</module>
- <module>jboss-as</module>
<module>hibernate</module>
+ <module>mod-cluster</module>
<module>rhq-server</module>
<module>jboss-cache</module>
+ <module>jboss-as</module>
<module>jboss-as-5</module>
<module>jboss-as-7</module>
<module>jboss-cache-v3</module>
commit af18d25dc8b66f9d95477e90356f6aecccf6077c
Merge: 7f4c0a9 67e6127
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 10:01:46 2011 -0500
Merge branch 'master' into mod_cluster_plugin
commit 7f4c0a99bb2121fd3496d3bc1af3079f4e922c3a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jul 6 10:00:21 2011 -0500
Added dev profile for plugin deployment in the local plugin repo.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index a19dfc0..74defeb 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -190,6 +190,82 @@
</plugins>
</build>
</profile>
+
+
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset><include name="META-INF/**" /></patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>
commit 060cf8983b9230adf3f26c936d0fe6c8d1966bd1
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 23:31:24 2011 -0500
All the context dependent operations are now passed for execution to the parent MBean. The operation arguments are parsed from the proxyInfo MBean property.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index f73a151..922197a 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -1,24 +1,20 @@
/*
- * Jopr Management Platform
+ * 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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
+ * 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 and the GNU Lesser General Public License
- * for more details.
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.rhq.plugins.modcluster;
@@ -29,10 +25,9 @@ import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * Manages a Hibernate Entity.
+ * Manages a mod_cluster context entity.
*
- * @author Greg Hinkle
- * @author John Mazzitelli
+ * @author Stefan Negrea
*/
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
@Override
@@ -42,46 +37,24 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
@Override
public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if ("enableContext".equals(name)) {
- //String[] queryStrings = (String[]) getEmsBean().getAttribute("Queries").refresh();
- OperationResult result = new OperationResult();
- result.setSimpleResult("This works!");
- /*PropertyList queries = new PropertyList("queries");
- result.getComplexResults().put(queries);*/
+ if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+ System.out.println(context.toString());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
- /*Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- for (String queryString : queryStrings) {
- Object queryStatistics = getEmsBean().getOperation("getQueryStatistics").invoke(
- new Object[] { queryString });
-
- Long executionCount = (Long) queryStatistics.getClass().getMethod("getExecutionCount")
- .invoke(queryStatistics);
- Long executionRowCount = (Long) queryStatistics.getClass().getMethod("getExecutionRowCount")
- .invoke(queryStatistics);
- Long executionMinTime = (Long) queryStatistics.getClass().getMethod("getExecutionMinTime")
- .invoke(queryStatistics);
- Long executionMaxTime = (Long) queryStatistics.getClass().getMethod("getExecutionMaxTime")
- .invoke(queryStatistics);
- Long executionAvgTime = (Long) queryStatistics.getClass().getMethod("getExecutionAvgTime")
- .invoke(queryStatistics);
-
- PropertyMap query = new PropertyMap("query", new PropertySimple("query", queryString),
- new PropertySimple("executionCount", executionCount), new PropertySimple("executionRowCount",
- executionRowCount), new PropertySimple("executionMinTime", executionMinTime),
- new PropertySimple("executionMaxTime", executionMaxTime), new PropertySimple(
- "executionAvgTime", executionAvgTime));
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- queries.add(query);
- }*/
+ Object resultObject = getEmsBean().getOperation(name).invoke(
+ new Object[] { context.host, context.path });
- return result;
+ return new OperationResult(String.valueOf(resultObject));
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
- return super.invokeOperation(name, parameters);
+ throw new Exception("Operation " + name + " not available mod_cluster_context service");
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 90e5c6b..4b3adcd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -33,11 +33,15 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * Discovers hibernate entities from a hibernate stats mbean
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
*
- * @author Greg Hinkle
+ * @author Stefan Negrea
*/
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+
+ /* (non-Javadoc)
+ * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
+ */
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
index 15a9a68..9cb6b86 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.modcluster;
import java.util.ArrayList;
@@ -25,16 +24,17 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+/**
+ * Simple parser for the raw proxy information provided by mod_cluster.
+ *
+ * @author Stefan Negrea
+ */
public class ProxyInfo {
private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
public ProxyInfo(String rawProxyInfo) {
- System.out.println("--------------------------------------");
- System.out.println(rawProxyInfo);
- System.out.println("--------------------------------------");
-
Pattern test = Pattern.compile("Context.*\n");
Matcher m = test.matcher(rawProxyInfo);
while (m.find()) {
@@ -42,7 +42,7 @@ public class ProxyInfo {
String[] contextPieces = rawContext.split(",");
String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
- availableContexts.add(new Context(actualContext, "localHost"));
+ availableContexts.add(new Context(actualContext, "localhost"));
}
}
@@ -50,12 +50,11 @@ public class ProxyInfo {
return Collections.unmodifiableList(availableContexts);
}
- public class Context {
+ public static class Context {
String path;
String host;
public Context(String path, String host) {
- super();
this.path = path;
this.host = host;
}
@@ -80,5 +79,23 @@ public class ProxyInfo {
public String toString() {
return "Context [path=" + path + ", host=" + host + "]";
}
+
+ public static Context fromString(String stringRepresentation) {
+ stringRepresentation = stringRepresentation.substring(stringRepresentation.indexOf('[') + 1);
+ stringRepresentation = stringRepresentation.substring(0, stringRepresentation.indexOf(']'));
+ stringRepresentation = stringRepresentation.trim();
+
+ String host = null;
+ String path = null;
+ for (String part : stringRepresentation.split(",")) {
+ part = part.trim();
+ if (part.startsWith("path=")) {
+ path = part.substring(5).trim();
+ } else if (part.startsWith("host=")) {
+ host = part.substring(5).trim();
+ }
+ }
+ return new Context(path, host);
+ }
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 084165e..be4b25b 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -45,6 +45,8 @@
<resource-configuration>
<c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node."/>
+ <c:simple-property name="advertise" type="boolean" description="Enable autodiscovery of httpd servers."/>
</resource-configuration>
<service name="mod_cluster_context"
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index deceb70..0d16e92 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -140,8 +140,14 @@ public class ModclusterPluginTest {
assert (resources.size() != 0) : "No mod_cluster or related instances found.";
if (resources.size() != 0) {
- testResourceMeasurement((Resource) resources.toArray()[0]);
- testContextOperations((Resource) resources.toArray()[1]);
+ for (Object objectResource : resources.toArray()) {
+ Resource resource = (Resource) objectResource;
+ if (resource.getResourceType().getName().equals("mod_cluster")) {
+ testResourceMeasurement(resource);
+ } else {
+ testContextOperations(resource);
+ }
+ }
}
}
@@ -175,9 +181,12 @@ public class ModclusterPluginTest {
.getResourceComponent(resource);
if (resourceComponent instanceof OperationFacet) {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
-
+ try {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+ } catch (Exception e) {
+ log.info("Operation failed");
+ }
/*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
log.info("Result of operation test was: " + result.getSimpleResult());*/
}
commit a23fc57dda98b70cb7c1b23af91b9e3e3597969a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 18:43:06 2011 -0500
Added individual contexts as sub services to mod_cluster service.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
new file mode 100644
index 0000000..f73a151
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -0,0 +1,87 @@
+/*
+ * Jopr 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Manages a Hibernate Entity.
+ *
+ * @author Greg Hinkle
+ * @author John Mazzitelli
+ */
+public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+ @Override
+ protected EmsBean loadBean() {
+ return getResourceContext().getParentResourceComponent().getEmsBean();
+ }
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if ("enableContext".equals(name)) {
+ //String[] queryStrings = (String[]) getEmsBean().getAttribute("Queries").refresh();
+ OperationResult result = new OperationResult();
+ result.setSimpleResult("This works!");
+ /*PropertyList queries = new PropertyList("queries");
+ result.getComplexResults().put(queries);*/
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ /*Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ for (String queryString : queryStrings) {
+ Object queryStatistics = getEmsBean().getOperation("getQueryStatistics").invoke(
+ new Object[] { queryString });
+
+ Long executionCount = (Long) queryStatistics.getClass().getMethod("getExecutionCount")
+ .invoke(queryStatistics);
+ Long executionRowCount = (Long) queryStatistics.getClass().getMethod("getExecutionRowCount")
+ .invoke(queryStatistics);
+ Long executionMinTime = (Long) queryStatistics.getClass().getMethod("getExecutionMinTime")
+ .invoke(queryStatistics);
+ Long executionMaxTime = (Long) queryStatistics.getClass().getMethod("getExecutionMaxTime")
+ .invoke(queryStatistics);
+ Long executionAvgTime = (Long) queryStatistics.getClass().getMethod("getExecutionAvgTime")
+ .invoke(queryStatistics);
+
+ PropertyMap query = new PropertyMap("query", new PropertySimple("query", queryString),
+ new PropertySimple("executionCount", executionCount), new PropertySimple("executionRowCount",
+ executionRowCount), new PropertySimple("executionMinTime", executionMinTime),
+ new PropertySimple("executionMaxTime", executionMaxTime), new PropertySimple(
+ "executionAvgTime", executionAvgTime));
+
+ queries.add(query);
+ }*/
+
+ return result;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
new file mode 100644
index 0000000..90e5c6b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -0,0 +1,57 @@
+/*
+ * Jopr 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * Discovers hibernate entities from a hibernate stats mbean
+ *
+ * @author Greg Hinkle
+ */
+public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+
+ EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
+
+ String rawProxyInfo = (String) statsBean.getAttribute("proxyInfo").refresh().toString();
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.toString(), availableContext.toString(), null, "mod_cluster Context", null, null);
+ entities.add(detail);
+ }
+
+ return entities;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index a98792e..783f579 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,9 +18,6 @@
*/
package org.rhq.plugins.modcluster;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -28,16 +25,4 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
-
- /**
- * Stores the context and loads the MBean.
- * @see ResourceComponent#start(ResourceContext)
- */
- @Override
- public void start(ResourceContext context) {
- super.start(context);
-
- OperationDefinition test = new OperationDefinition(context.getResourceType(), "Text");
- context.getResourceType().addOperationDefinition(test);
- }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
new file mode 100644
index 0000000..15a9a68
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
@@ -0,0 +1,84 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class ProxyInfo {
+
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+
+ public ProxyInfo(String rawProxyInfo) {
+
+ System.out.println("--------------------------------------");
+ System.out.println(rawProxyInfo);
+ System.out.println("--------------------------------------");
+
+ Pattern test = Pattern.compile("Context.*\n");
+ Matcher m = test.matcher(rawProxyInfo);
+ while (m.find()) {
+ String rawContext = m.group();
+ String[] contextPieces = rawContext.split(",");
+ String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
+
+ availableContexts.add(new Context(actualContext, "localHost"));
+ }
+ }
+
+ public List<Context> getAvailableContexts() {
+ return Collections.unmodifiableList(availableContexts);
+ }
+
+ public class Context {
+ String path;
+ String host;
+
+ public Context(String path, String host) {
+ super();
+ this.path = path;
+ this.host = host;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ @Override
+ public String toString() {
+ return "Context [path=" + path + ", host=" + host + "]";
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b8d7249..084165e 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -47,5 +47,29 @@
<c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
</resource-configuration>
+ <service name="mod_cluster_context"
+ discovery="ContextDiscoveryComponent"
+ class="ContextComponent"
+ description="A mod_cluster context">
+
+ <operation name="enableContext" displayName="Enable webapp" description="Enable a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="disableContext" displayName="Disable webpapp" description="Disable a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stopContext" displayName="Stop webpapp" description="Gracefully stops a single webapp">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ </service>
+
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index da0303e..deceb70 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -19,8 +19,10 @@
package org.rhq.plugins.modcluster.test;
import java.io.File;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
+import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -45,6 +47,7 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.modcluster.ProxyInfo;
/**
* @author Fady Matar
@@ -80,6 +83,31 @@ public class ModclusterPluginTest {
}
@Test
+ public void testProxyInfo() {
+ String test = "{mobile-work/192.168.1.40:6666=Node: [1],Name: 4e6189af-0502-3305-8ff3-fad7fee8b516,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 3233,Read: 7355619,Transfered: 0,Connected: 0,Load: 100\n"
+ + "Node: [2],Name: node2,Balancer: mycluster,LBGroup: ,Host: 127.0.0.1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 99\n"
+ + "Vhost: [1:1:1], Alias: localhost\n"
+ + "Vhost: [2:1:2], Alias: localhost\n"
+ + "Context: [1:1:1], Context: /invoker, Status: DISABLED\n"
+ + "Context: [1:1:2], Context: /loaddemo, Status: DISABLED\n"
+ + "Context: [1:1:3], Context: /jbossws, Status: DISABLED\n"
+ + "Context: [1:1:4], Context: /juddi, Status: DISABLED\n"
+ + "Context: [1:1:5], Context: /jbossmq-httpil, Status: DISABLED\n"
+ + "Context: [1:1:6], Context: /web-console, Status: DISABLED\n"
+ + "Context: [1:1:7], Context: /jmx-console, Status: DISABLED\n"
+ + "Context: [1:1:8], Context: /, Status: DISABLED\n"
+ + "Context: [2:1:9], Context: /loaddemo, Status: ENABLED\n" + "}";
+
+ ProxyInfo proxyInfo = new ProxyInfo(test);
+
+ for (ProxyInfo.Context context : proxyInfo.getAvailableContexts()) {
+ log.info(context.toString());
+ }
+
+ assert (proxyInfo.getAvailableContexts().size() != 0) : "Raw proxy info parsing failed!";
+ }
+
+ @Test
public void testPluginLoad() {
PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
@@ -98,12 +126,22 @@ public class ModclusterPluginTest {
assert report != null;
System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ List<String> typeNames = new ArrayList<String>() {
+ {
+ add(PLUGIN_NAME);
+ add(PLUGIN_NAME + "_context");
+ }
+ };
+
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- PLUGIN_NAME);
- log.info("Found " + resources.size() + " mod_cluster instance(s).");
+ typeNames);
+ log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
+
+ assert (resources.size() != 0) : "No mod_cluster or related instances found.";
if (resources.size() != 0) {
testResourceMeasurement((Resource) resources.toArray()[0]);
+ testContextOperations((Resource) resources.toArray()[1]);
}
}
@@ -132,7 +170,20 @@ public class ModclusterPluginTest {
}
}
- private Set<Resource> findResource(Resource parent, String typeName) {
+ private void testContextOperations(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ /*result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ log.info("Result of operation test was: " + result.getSimpleResult());*/
+ }
+ }
+
+ private Set<Resource> findResource(Resource parent, List<String> typeNames) {
Set<Resource> found = new HashSet<Resource>();
Queue<Resource> discoveryQueue = new LinkedList<Resource>();
@@ -142,7 +193,7 @@ public class ModclusterPluginTest {
Resource currentResource = discoveryQueue.poll();
log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
- if (currentResource.getResourceType().getName().equals(typeName)) {
+ if (typeNames.contains(currentResource.getResourceType().getName())) {
found.add(currentResource);
}
commit a78a8e8b90cb76cf3412732008870804c2210a6b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 15:46:03 2011 -0500
Attempt to manually manipulate the operations list for mod_cluster to dynamically load the contexts.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index c70f53b..a98792e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,6 +18,9 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.operation.OperationDefinition;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
@@ -26,4 +29,15 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
*/
public class ModclusterServerComponent extends MBeanResourceComponent {
+ /**
+ * Stores the context and loads the MBean.
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ @Override
+ public void start(ResourceContext context) {
+ super.start(context);
+
+ OperationDefinition test = new OperationDefinition(context.getResourceType(), "Text");
+ context.getResourceType().addOperationDefinition(test);
+ }
}
commit 302abb94355bf86db5f6e7cc419657d53210c7a5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jul 5 15:45:23 2011 -0500
Added simple operations to the list of operations supported by the plugin. Complex operations to follow....
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
deleted file mode 100644
index fa807a3..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
+++ /dev/null
@@ -1,116 +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.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ManualAddFacet;
-import org.rhq.core.pluginapi.inventory.ProcessScanResult;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-
-/**
- * This can be the start of your own custom plugin's discovery component. Review the javadoc for
- * {@link ResourceDiscoveryComponent}.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class ModclusterDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
- private final Log log = LogFactory.getLog(ModclusterDiscoveryComponent.class);
-
- /**
- * This discovery method is the way the plugin supports "manual-add" capability. The plugin
- * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
- * If that attribute is false, this method will never be used since it will not be possible to manually
- * add an instance of the resource.
- *
- * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
- */
- @Override
- public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
- ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
-
- // pluginConfiguration contains information on a resource that was manually added by the user.
- // take it and build a details object that represents that resource.
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Manually Added Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, pluginConfiguration, null);
-
- return resource;
- }
-
- /**
- * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
- */
- @Override
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
- log.info("Discovering my custom plugin's resources");
-
- // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
- // auto-discovered processes using those process scan definitions. Process all those that were found.
- List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
- for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
- // determine if you want to include the result in this method's returned set of discovered resources
- }
-
- // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
- // create a details object that describe the resource that you discovered.
- HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, null, null);
-
- set.add(resource);
-
- return set;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index c924753..b8d7249 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,10 +27,25 @@
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
+ <operation name="refresh" displayName="Refresh configuration" description="Refresh configuration" />
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all engines">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all engines">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <resource-configuration>
+ <c:simple-property name="stickySessions" type="boolean" description="Enables sticky sessions."/>
+ </resource-configuration>
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 5f68989..da0303e 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -43,6 +43,8 @@ import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
/**
* @author Fady Matar
@@ -115,13 +117,19 @@ public class ModclusterPluginTest {
MeasurementReport report = new MeasurementReport();
((MeasurementFacet) resourceComponent).getValues(report, metricList);
- /*assert report.getNumericData().size() > 0 : "Measurement " + def.getName() + " not collected from "
- + resource;*/
MeasurementData data = report.getTraitData().iterator().next();
assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
log.info("Measurement: " + def.getName() + "=" + data.getValue());
}
}
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
+ log.info("Result of operation test was: " + result);
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ log.info("Result of operation test was: " + result.getSimpleResult());
+ }
}
private Set<Resource> findResource(Resource parent, String typeName) {
commit b6e3c85546af1faaac5e71ad6295a85e4b9d66b3
Merge: 3c46d2a 0ef2b57
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 1 16:15:00 2011 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq into mod_cluster_plugin
commit 3c46d2aaa05a0b355624f758977ef766bd3e8c6f
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 1 16:12:13 2011 -0500
Remove unused file.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
deleted file mode 100644
index 1223508..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.plugins.modcluster;
-
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-public class LoadMetric extends MBeanResourceComponent {
-
-}
commit 727836e4eca968619ec5307db7332eb132ac5562
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jul 1 15:11:36 2011 -0600
Added all the metrics proposed in the design document to the plugin with complete unit tests.
Also, corrected the cumbersome find resource code. No reason to have recursion when a simple queue can do the job more efficiently.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 869a25e..a19dfc0 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -69,6 +69,8 @@
<fileset dir="${settings.localRepository}/">
<include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
<include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
</fileset>
<fileset dir="${rhq.deploymentDir}">
<include name="${project.artifactId}-${project.version}.jar" />
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 6d6998a..c70f53b 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2009 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -18,151 +18,12 @@
*/
package org.rhq.plugins.modcluster;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
/**
- * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
- * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
- * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
- * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
- * implementations that that facet required.
- *
- * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
- * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
- * will need to know.</p>
+ * @author Stefan Negrea
*
- * @author John Mazzitelli
*/
-public class ModclusterServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
- ConfigurationFacet {
- private final Log log = LogFactory.getLog(ModclusterServerComponent.class);
-
- /**
- * Represents the resource configuration of the custom product being managed.
- */
- private Configuration resourceConfiguration;
-
- /**
- * All AMPS plugins are stateful - this context contains information that your resource component can use when
- * performing its processing.
- */
- private ResourceContext resourceContext;
-
- /**
- * This is called when your component has been started with the given context. You normally initialize some internal
- * state of your component as well as attempt to make a stateful connection to your managed resource.
- *
- * @see ResourceComponent#start(ResourceContext)
- */
- public void start(ResourceContext context) {
- resourceContext = context;
- }
-
- /**
- * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
- * perform some cleanup here; though normally not much needs to be done here.
- *
- * @see ResourceComponent#stop()
- */
- public void stop() {
- }
-
- /**
- * All resource components must be able to tell the plugin container if the managed resource is available or not.
- * This method is called by the plugin container when it needs to know if the managed resource is actually up and
- * available.
- *
- * @see ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- // TODO: here you normally make some type of connection attempt to the managed resource
- // to determine if it is really up and running.
- return AvailabilityType.UP;
- }
-
- /**
- * The plugin container will call this method when your resource component has been scheduled to collect some
- * measurements now. It is within this method that you actually talk to the managed resource and collect the
- * measurement data that is has emitted.
- *
- * @see MeasurementFacet#getValues(MeasurementReport, Set)
- */
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
- for (MeasurementScheduleRequest request : requests) {
- String name = request.getName();
-
- // TODO: based on the request information, you must collect the requested measurement(s)
- // you can use the name of the measurement to determine what you actually need to collect
- try {
- Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
- report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
- } catch (Exception e) {
- log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
- }
- }
-
- return;
- }
-
- /**
- * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
- * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
- *
- * @see OperationFacet#invokeOperation(String, Configuration)
- */
- public OperationResult invokeOperation(String name, Configuration configuration) {
- return null;
- }
-
- /**
- * The plugin container will call this method and it needs to obtain the current configuration of the managed
- * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
- * returned Configuration object with the managed resource's configuration property values.
- *
- * @see ConfigurationFacet#loadResourceConfiguration()
- */
- public Configuration loadResourceConfiguration() {
- // here we simulate the loading of the managed resource's configuration
-
- if (resourceConfiguration == null) {
- // for this example, we will create a simple dummy configuration to start with.
- // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
- resourceConfiguration = new Configuration();
- }
-
- Configuration config = resourceConfiguration;
-
- return config;
- }
-
- /**
- * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
- * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
- * of the given configuration.
- *
- * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
- */
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- // this simulates the plugin taking the new configuration and reconfiguring the managed resource
- resourceConfiguration = report.getConfiguration().deepCopy();
+public class ModclusterServerComponent extends MBeanResourceComponent {
- report.setStatus(ConfigurationUpdateStatus.SUCCESS);
- }
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index fe6d1b3..c924753 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -12,21 +12,25 @@
<service name="mod_cluster"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
- class="LoadMetric"
+ class="ModclusterServerComponent"
supportsManualAdd="true"
description="mod_cluster plugin">
- <!-- runs-inside>
- <parent-resource-type name="JMX Server" plugin="JMX"/>
- </runs-inside-->
- <runs-inside>
- <parent-resource-type name="JMX Server" plugin="JMX"/>
- </runs-inside>
+ <runs-inside>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
+ </runs-inside>
- <plugin-configuration>
- <c:simple-property name="connectorAddress" default="http://192.168.1.56:6666"/>
- <c:simple-property name="objectName" readOnly="true" default="ModClusterServiceMBean"/>
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
+ <c:simple-property name="nameTemplate" default="{application}"/>
</plugin-configuration>
-
+
+ <operation name="reset" displayName="Reset the node" description="Move the node out of an error state" />
+
+ <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
+ <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+
</service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 971ccb1..5f68989 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -20,6 +20,8 @@ package org.rhq.plugins.modcluster.test;
import java.io.File;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -29,12 +31,18 @@ import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.pc.PluginContainer;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
/**
* @author Fady Matar
@@ -90,23 +98,53 @@ public class ModclusterPluginTest {
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
PLUGIN_NAME);
- log.info("Found " + resources.size() + "mod_cluster instance(s).");
+ log.info("Found " + resources.size() + " mod_cluster instance(s).");
+
+ if (resources.size() != 0) {
+ testResourceMeasurement((Resource) resources.toArray()[0]);
+ }
+ }
+
+ private void testResourceMeasurement(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ if (resourceComponent instanceof MeasurementFacet) {
+ for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
+ Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
+ metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
+ MeasurementReport report = new MeasurementReport();
+ ((MeasurementFacet) resourceComponent).getValues(report, metricList);
+
+ /*assert report.getNumericData().size() > 0 : "Measurement " + def.getName() + " not collected from "
+ + resource;*/
+ MeasurementData data = report.getTraitData().iterator().next();
+ assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
+ log.info("Measurement: " + def.getName() + "=" + data.getValue());
+ }
+ }
}
private Set<Resource> findResource(Resource parent, String typeName) {
Set<Resource> found = new HashSet<Resource>();
- Resource platform = parent;
- for (Resource resource : platform.getChildResources()) {
- log.info("Discovered resource of type: " + resource.getResourceType().getName());
- if (resource.getResourceType().getName().equals(typeName)) {
- found.add(resource);
+
+ Queue<Resource> discoveryQueue = new LinkedList<Resource>();
+ discoveryQueue.add(parent);
+
+ while (!discoveryQueue.isEmpty()) {
+ Resource currentResource = discoveryQueue.poll();
+
+ log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
+ if (currentResource.getResourceType().getName().equals(typeName)) {
+ found.add(currentResource);
}
- if (resource.getChildResources() != null) {
- for (Resource child : found) {
- found.addAll(findResource(child, typeName));
+
+ if (currentResource.getChildResources() != null) {
+ for (Resource child : currentResource.getChildResources()) {
+ discoveryQueue.add(child);
}
}
}
+
return found;
}
}
commit 5866fe5b6283debb6dfca115770301b1c1322489
Merge: 2884cc5 19558e1
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 28 09:31:15 2011 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq into mod_cluster_plugin
commit 2884cc5a209b7ab07f7fed6e8f38510c6c6683d5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 28 09:21:49 2011 -0500
Attempts to make mod_cluster a simple derivation from JMX plugin.
diff --git a/.classpath b/.classpath
index 566c57d..6280671 100644
--- a/.classpath
+++ b/.classpath
@@ -266,5 +266,7 @@
<classpathentry excluding="**" kind="src" path="modules/enterprise/comm/src/test/resources"/>
<classpathentry excluding="**" kind="src" path="modules/enterprise/agent/src/main/resources"/>
<classpathentry excluding="**" kind="src" path="modules/enterprise/agent/src/test/resources"/>
+ <classpathentry kind="src" path="modules/plugins/mod-cluster/src/main/java"/>
+ <classpathentry kind="src" path="modules/plugins/mod-cluster/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index e22efc7..869a25e 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -12,16 +10,11 @@
<groupId>org.rhq.plugins.modcluster</groupId>
<artifactId>modcluster-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mod_cluster RHQ Plugin</name>
<description>mod_cluster RHQ Agent plugin</description>
- <!--properties>
- <rhq.version>4.1.0-SNAPSHOT</rhq.version>
- </properties-->
-
<dependencies>
<dependency>
@@ -31,220 +24,170 @@
<scope>provided</scope>
</dependency>
- <!-- Below are the core modules that are required dependencies of all plugins -->
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-domain</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-plugin-api</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-native-system</artifactId>
- <version>${rhq.version}</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>hibernate-annotations</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.2.1.GA</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope> <!-- provided by the agent/plugin-container -->
- </dependency>
-
- <!--
- Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
- All three are provided to your plugin by the agent/plugin-container.
- -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
-
-
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
-
- <!--
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>1.0.9</version>
- <scope>provided</scope>
- </dependency>
- -->
-
- <!-- Define any third-party dependencies your plugin has here. -->
- <!--
- <dependency>
- <groupId>group-id-of-dependency-goes-here</groupId>
- <artifactId>artifact-id-of-dependency-goes-here</artifactId>
- <version>version-of-dependency-goes-here</version>
- </dependency>
- -->
</dependencies>
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <!--
- If your plugin has third-party jar dependencies that are not already available when deployed in the plugin
- container, you can package these jars in your plugin. They go in your plugin jar's "lib" directory.
- Uncomment the maven plugin definition below and define one or more jar files (aka "artifactItem" elements)
- that you want to include in your plugin jar.
- -->
- <!--
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>your-third-party-dep-group</groupId>
- <artifactId>your-third-party-dep-artifact</artifactId>
- <version>your-third-party-dep-version</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
-
- </plugins>
- </build>
-
<profiles>
+
<profile>
- <id>dev</id>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>maven.test.skip</name>
+ <value>!true</value>
+ </property>
+ </activation>
+
<properties>
- <!-- define the location of your RHQ root directory - typically rhq.rootDir is overridden in Maven's settings.xml -->
- <rhq.rootDir>/rhq/trunk</rhq.rootDir>
- <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
+ <rhq.rootDir>../../..</rhq.rootDir>
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
- <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
</properties>
+
<build>
<plugins>
+
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
- <id>deploy</id>
- <phase>compile</phase>
+ <phase>process-test-resources</phase>
<configuration>
<tasks>
- <mkdir dir="${rhq.deploymentDir}" />
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Updating ${deployment.file}...</echo>
- <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ <echo>Setting up plugin dependencies...</echo>
+ <property name="settings.localRepository" location="${user.home}/.m2/repository" />
+ <mkdir dir="target/testsetup" />
+
+ <mkdir dir="target/testsetup/plugins" />
+ <copy toDir="target/testsetup/plugins" flatten="true">
+ <fileset dir="${settings.localRepository}/">
+ <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
+ <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ </fileset>
+ <fileset dir="${rhq.deploymentDir}">
+ <include name="${project.artifactId}-${project.version}.jar" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="target/testsetup/lib" />
+ <unzip dest="target/testsetup/lib">
+ <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
+ <patternset>
+ <include name="**/lib/sigar.jar" />
+ <include name="**/lib/bcel*.jar" />
+ <include name="**/lib/*.so" />
+ <include name="**/lib/*.sl" />
+ <include name="**/lib/*.dll" />
+ <include name="**/lib/*.dylib" />
+ </patternset>
+ </unzip>
+ <move todir="target/testsetup/lib" flatten="true">
+ <fileset dir="target/testsetup/lib">
+ <include name="**/lib/*" />
+ </fileset>
+ </move>
+ <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
<execution>
<id>deploy-jar-meta-inf</id>
<phase>package</phase>
<configuration>
- <tasks>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
- <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
- <patternset>
- <include name="META-INF/**" />
- </patternset>
- </unjar>
- <jar destfile="${deployment.file}"
- manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
- update="true">
- </jar>
- </tasks>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset><include name="META-INF/**" /></patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
</configuration>
<goals>
- <goal>run</goal>
+ <goal>run</goal>
</goals>
</execution>
+
<execution>
<id>undeploy</id>
<phase>clean</phase>
<configuration>
- <tasks>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Deleting ${deployment.file}...</echo>
- <delete file="${deployment.file}" />
- </tasks>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
</configuration>
<goals>
- <goal>run</goal>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
</goals>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <systemProperties>
+ <property>
+ <name>project.artifactId</name>
+ <value>${project.artifactId}</value>
+ </property>
+ <property>
+ <name>project.version</name>
+ <value>${project.version}</value>
+ </property>
+ </systemProperties>
+ </configuration>
</execution>
</executions>
</plugin>
+
</plugins>
</build>
</profile>
</profiles>
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
</project>
-
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
new file mode 100644
index 0000000..1223508
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetric.java
@@ -0,0 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.plugins.modcluster;
+
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class LoadMetric extends MBeanResourceComponent {
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
new file mode 100644
index 0000000..fa807a3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterDiscoveryComponent.java
@@ -0,0 +1,116 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ManualAddFacet;
+import org.rhq.core.pluginapi.inventory.ProcessScanResult;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+/**
+ * This can be the start of your own custom plugin's discovery component. Review the javadoc for
+ * {@link ResourceDiscoveryComponent}.
+ *
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class ModclusterDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
+ private final Log log = LogFactory.getLog(ModclusterDiscoveryComponent.class);
+
+ /**
+ * This discovery method is the way the plugin supports "manual-add" capability. The plugin
+ * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
+ * If that attribute is false, this method will never be used since it will not be possible to manually
+ * add an instance of the resource.
+ *
+ * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
+ */
+ @Override
+ public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
+ ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
+
+ // pluginConfiguration contains information on a resource that was manually added by the user.
+ // take it and build a details object that represents that resource.
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Manually Added Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, pluginConfiguration, null);
+
+ return resource;
+ }
+
+ /**
+ * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ log.info("Discovering my custom plugin's resources");
+
+ // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
+ // auto-discovered processes using those process scan definitions. Process all those that were found.
+ List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
+ for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
+ // determine if you want to include the result in this method's returned set of discovered resources
+ }
+
+ // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
+ // create a details object that describe the resource that you discovered.
+ HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, null, null);
+
+ set.add(resource);
+
+ return set;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
new file mode 100644
index 0000000..6d6998a
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -0,0 +1,168 @@
+/*
+ * 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.plugins.modcluster;
+
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
+ * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
+ * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
+ * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
+ * implementations that that facet required.
+ *
+ * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
+ * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
+ * will need to know.</p>
+ *
+ * @author John Mazzitelli
+ */
+public class ModclusterServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
+ ConfigurationFacet {
+ private final Log log = LogFactory.getLog(ModclusterServerComponent.class);
+
+ /**
+ * Represents the resource configuration of the custom product being managed.
+ */
+ private Configuration resourceConfiguration;
+
+ /**
+ * All AMPS plugins are stateful - this context contains information that your resource component can use when
+ * performing its processing.
+ */
+ private ResourceContext resourceContext;
+
+ /**
+ * This is called when your component has been started with the given context. You normally initialize some internal
+ * state of your component as well as attempt to make a stateful connection to your managed resource.
+ *
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ public void start(ResourceContext context) {
+ resourceContext = context;
+ }
+
+ /**
+ * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
+ * perform some cleanup here; though normally not much needs to be done here.
+ *
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ }
+
+ /**
+ * All resource components must be able to tell the plugin container if the managed resource is available or not.
+ * This method is called by the plugin container when it needs to know if the managed resource is actually up and
+ * available.
+ *
+ * @see ResourceComponent#getAvailability()
+ */
+ public AvailabilityType getAvailability() {
+ // TODO: here you normally make some type of connection attempt to the managed resource
+ // to determine if it is really up and running.
+ return AvailabilityType.UP;
+ }
+
+ /**
+ * The plugin container will call this method when your resource component has been scheduled to collect some
+ * measurements now. It is within this method that you actually talk to the managed resource and collect the
+ * measurement data that is has emitted.
+ *
+ * @see MeasurementFacet#getValues(MeasurementReport, Set)
+ */
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
+ for (MeasurementScheduleRequest request : requests) {
+ String name = request.getName();
+
+ // TODO: based on the request information, you must collect the requested measurement(s)
+ // you can use the name of the measurement to determine what you actually need to collect
+ try {
+ Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
+ report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
+ } catch (Exception e) {
+ log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
+ * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
+ *
+ * @see OperationFacet#invokeOperation(String, Configuration)
+ */
+ public OperationResult invokeOperation(String name, Configuration configuration) {
+ return null;
+ }
+
+ /**
+ * The plugin container will call this method and it needs to obtain the current configuration of the managed
+ * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
+ * returned Configuration object with the managed resource's configuration property values.
+ *
+ * @see ConfigurationFacet#loadResourceConfiguration()
+ */
+ public Configuration loadResourceConfiguration() {
+ // here we simulate the loading of the managed resource's configuration
+
+ if (resourceConfiguration == null) {
+ // for this example, we will create a simple dummy configuration to start with.
+ // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
+ resourceConfiguration = new Configuration();
+ }
+
+ Configuration config = resourceConfiguration;
+
+ return config;
+ }
+
+ /**
+ * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
+ * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
+ * of the given configuration.
+ *
+ * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
+ */
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ // this simulates the plugin taking the new configuration and reconfiguring the managed resource
+ resourceConfiguration = report.getConfiguration().deepCopy();
+
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
deleted file mode 100644
index 2abd0ea..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
+++ /dev/null
@@ -1,116 +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.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ManualAddFacet;
-import org.rhq.core.pluginapi.inventory.ProcessScanResult;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-
-/**
- * This can be the start of your own custom plugin's discovery component. Review the javadoc for
- * {@link ResourceDiscoveryComponent}.
- *
- * @author John Mazzitelli
- */
-@SuppressWarnings("unchecked")
-public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
- private final Log log = LogFactory.getLog(SamplePluginDiscoveryComponent.class);
-
- /**
- * This discovery method is the way the plugin supports "manual-add" capability. The plugin
- * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
- * If that attribute is false, this method will never be used since it will not be possible to manually
- * add an instance of the resource.
- *
- * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
- */
- @Override
- public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
- ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
-
- // pluginConfiguration contains information on a resource that was manually added by the user.
- // take it and build a details object that represents that resource.
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Manually Added Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, pluginConfiguration, null);
-
- return resource;
- }
-
- /**
- * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
- * you need to do in this method.
- *
- * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
- */
- @Override
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
- log.info("Discovering my custom plugin's resources");
-
- // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
- // auto-discovered processes using those process scan definitions. Process all those that were found.
- List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
- for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
- // determine if you want to include the result in this method's returned set of discovered resources
- }
-
- // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
- // create a details object that describe the resource that you discovered.
- HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-
- // key = this must be a unique string across all of your resources - see docs for uniqueness rules
- // name = this is the name you give the new resource; it does not necessarily have to be unique
- // version = this is any string that corresponds to the resource's version
- // description = this is any string that you want to assign as the default description for your resource
- String key = "My Resource Key";
- String name = "My Resource";
- String version = "1.0";
- String description = "This describes My Resource";
-
- DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
- version, description, null, null);
-
- set.add(resource);
-
- return set;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
deleted file mode 100644
index 0236532..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
+++ /dev/null
@@ -1,245 +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.plugins.modcluster;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
-import org.rhq.core.domain.content.PackageType;
-import org.rhq.core.domain.content.transfer.DeployPackageStep;
-import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
-import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
-import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementDataNumeric;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.content.ContentFacet;
-import org.rhq.core.pluginapi.content.ContentServices;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
- * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
- * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
- * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
- * implementations that that facet required.
- *
- * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
- * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
- * will need to know.</p>
- *
- * @author John Mazzitelli
- */
-public class SamplePluginServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
- ConfigurationFacet, ContentFacet, DeleteResourceFacet, CreateChildResourceFacet {
- private final Log log = LogFactory.getLog(SamplePluginServerComponent.class);
-
- /**
- * Represents the resource configuration of the custom product being managed.
- */
- private Configuration resourceConfiguration;
-
- /**
- * All AMPS plugins are stateful - this context contains information that your resource component can use when
- * performing its processing.
- */
- private ResourceContext resourceContext;
-
- /**
- * This is called when your component has been started with the given context. You normally initialize some internal
- * state of your component as well as attempt to make a stateful connection to your managed resource.
- *
- * @see ResourceComponent#start(ResourceContext)
- */
- public void start(ResourceContext context) {
- resourceContext = context;
- }
-
- /**
- * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
- * perform some cleanup here; though normally not much needs to be done here.
- *
- * @see ResourceComponent#stop()
- */
- public void stop() {
- }
-
- /**
- * All resource components must be able to tell the plugin container if the managed resource is available or not.
- * This method is called by the plugin container when it needs to know if the managed resource is actually up and
- * available.
- *
- * @see ResourceComponent#getAvailability()
- */
- public AvailabilityType getAvailability() {
- // TODO: here you normally make some type of connection attempt to the managed resource
- // to determine if it is really up and running.
- return AvailabilityType.UP;
- }
-
- /**
- * The plugin container will call this method when your resource component has been scheduled to collect some
- * measurements now. It is within this method that you actually talk to the managed resource and collect the
- * measurement data that is has emitted.
- *
- * @see MeasurementFacet#getValues(MeasurementReport, Set)
- */
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
- for (MeasurementScheduleRequest request : requests) {
- String name = request.getName();
-
- // TODO: based on the request information, you must collect the requested measurement(s)
- // you can use the name of the measurement to determine what you actually need to collect
- try {
- Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
- report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
- } catch (Exception e) {
- log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
- }
- }
-
- return;
- }
-
- /**
- * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
- * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
- *
- * @see OperationFacet#invokeOperation(String, Configuration)
- */
- public OperationResult invokeOperation(String name, Configuration configuration) {
- return null;
- }
-
- /**
- * The plugin container will call this method and it needs to obtain the current configuration of the managed
- * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
- * returned Configuration object with the managed resource's configuration property values.
- *
- * @see ConfigurationFacet#loadResourceConfiguration()
- */
- public Configuration loadResourceConfiguration() {
- // here we simulate the loading of the managed resource's configuration
-
- if (resourceConfiguration == null) {
- // for this example, we will create a simple dummy configuration to start with.
- // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
- resourceConfiguration = new Configuration();
- }
-
- Configuration config = resourceConfiguration;
-
- return config;
- }
-
- /**
- * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
- * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
- * of the given configuration.
- *
- * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
- */
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- // this simulates the plugin taking the new configuration and reconfiguring the managed resource
- resourceConfiguration = report.getConfiguration().deepCopy();
-
- report.setStatus(ConfigurationUpdateStatus.SUCCESS);
- }
-
- /**
- * When this is called, the plugin is responsible for scanning its managed resource and look for content that need
- * to be managed for that resource. This method should only discover packages of the given package type.
- *
- * @see ContentFacet#discoverDeployedPackages(PackageType)
- */
- public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
- return null;
- }
-
- /**
- * The plugin container calls this method when new packages need to be deployed/installed on resources.
- *
- * @see ContentFacet#deployPackages(Set, ContentServices)
- */
- public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices) {
- return null;
- }
-
- /**
- * When a remote client wants to see the actual data content for an installed package, this method will be called.
- * This method must return a stream of data containing the full content of the package.
- *
- * @see ContentFacet#retrievePackageBits(ResourcePackageDetails)
- */
- public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
- return null;
- }
-
- /**
- * This is the method that is used when the component has to create the installation steps and their results.
- *
- * @see ContentFacet#generateInstallationSteps(ResourcePackageDetails)
- */
- public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails) {
- return null;
- }
-
- /**
- * This is called when the actual content of packages should be deleted from the managed resource.
- *
- * @see ContentFacet#removePackages(Set)
- */
- public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
- return null;
- }
-
- /**
- * When called, the plugin container is asking the plugin to create a new managed resource. The new resource's
- * details need to be added to the given report.
- *
- * @see CreateChildResourceFacet#createResource(CreateResourceReport)
- */
- public CreateResourceReport createResource(CreateResourceReport report) {
- return null;
- }
-
- /**
- * When called, the plugin container is asking the plugin to delete a managed resource.
- *
- * @see DeleteResourceFacet#deleteResource()
- */
- public void deleteResource() {
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 1a99bf7..fe6d1b3 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -10,97 +10,23 @@
<depends plugin="JMX" />
- <!--
- CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
- be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
- defined at this level.
- -->
- <server name="mod_cluster"
- discovery="SamplePluginDiscoveryComponent"
- class="SamplePluginServerComponent"
+ <service name="mod_cluster"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+ class="LoadMetric"
supportsManualAdd="true"
description="mod_cluster plugin">
-
- <!--
- CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
- related child resources. Categories defined at this level can carry metadata on the category itself,
- such as a display name and description.
- -->
- <subcategories>
- <subcategory name="Category1" displayName="Sample Category 1"
- description="This is a sample category that should be removed."/>
- <subcategory name="Category2" >
- <subcategory name="ChildCategory2a" />
- </subcategory>
- </subcategories>
-
- <!--
- CHANGE: The entire plugin configuration is optional. If there are properties specific to handling how the
- resource component will connect to the resource, they should be added here. If the plugin-configuration
- entity is specified, at least one property must be provided.
- -->
- <plugin-configuration>
- <c:simple-property name="SamplePluginProperty" displayName="Sample Plugin Property" default="Value" />
+
+ <!-- runs-inside>
+ <parent-resource-type name="JMX Server" plugin="JMX"/>
+ </runs-inside-->
+ <runs-inside>
+ <parent-resource-type name="JMX Server" plugin="JMX"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="connectorAddress" default="http://192.168.1.56:6666"/>
+ <c:simple-property name="objectName" readOnly="true" default="ModClusterServiceMBean"/>
</plugin-configuration>
- <!--
- CHANGE: The process-scan element requests the plugin container provide the discovery component for
- this resource type with the results of scanning the machine for running processes. If there is
- no use for this in a given resource type, this entry may be omitted.
- -->
- <process-scan name="ScanIdentifier" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
-
- <!--
- CHANGE: An operation element is added for each operation that may be executed against resources of this type.
- The parameters element is optional; properties defined within will be displayed to the user when
- invoking the operation. If the resource has no applicable operations, these elements may be omitted.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the OperationFacet interface
- if any operations are specified.
- -->
- <operation name="testSimple"
- description="Test simple-property configuration element for a resource operation">
- <parameters>
- <c:group name="required" displayName="Required Parameters" hiddenByDefault="false">
- <c:description>All of these properties are required</c:description>
- <c:simple-property name="aNumber" type="integer" required="true" default="42" displayName="A Number" description="A number between 1 and 100, inclusive">
- <c:constraint>
- <c:integer-constraint minimum="1" maximum="100"/>
- </c:constraint>
- </c:simple-property>
- </c:group>
- </parameters>
- <results>
- <c:simple-property name="results" />
- </results>
- </operation>
-
- <!--
- CHANGE: For each measurement that should be collected for resources of this type, a metric element is added.
- In addition to identifying the metric, a default collection interval and whether or not the
- metric is even collected by default are indicated. If the resource has no measurements to be
- collected, these elements may be omitted.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the MeasurementFacet interface
- if any metrics are specified.
- -->
- <metric property="MeasurementName"
- displayName="The Measurement Name"
- description="Describes what this measurement is actually telling you"
- defaultOn="true"
- defaultInterval="300000"
- category="performance" />
-
- <!--
- CHANGE: Resource configuration properties are used to configure resources themselves, as compared to the plugin
- configuration which refers to the connection to a resource. If the resource-configuration
- entity is specified, at least one property must be provided.
-
- REQUIRED INTERFACE: The resource component for this resource type must implement the ConfigurationFacet
- interface if a resource-configuration element is supplied.
- -->
- <resource-configuration>
- <c:simple-property name="port" type="integer" displayName="Port on which to listen" />
- </resource-configuration>
- </server>
+ </service>
</plugin>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index bada521..971ccb1 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -24,6 +24,9 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.discovery.InventoryReport;
import org.rhq.core.domain.resource.Resource;
@@ -32,22 +35,19 @@ import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
/**
* @author Fady Matar
*/
-@Test(groups = "tomcat-plugin")
+@Test(groups = "modcluster-plugin")
public class ModclusterPluginTest {
private Log log = LogFactory.getLog(this.getClass());
- private static final String PLUGIN_NAME = "Tomcat";
+ private static final String PLUGIN_NAME = "mod_cluster";
@BeforeSuite
public void start() {
try {
- File pluginDir = new File("target/itest/plugins");
+ File pluginDir = new File("target/testsetup/plugins");
PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
pcConfig.setPluginDirectory(pluginDir);
@@ -75,16 +75,22 @@ public class ModclusterPluginTest {
PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+
}
@Test(dependsOnMethods = "testPluginLoad")
public void testDiscovery() throws Exception {
InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ System.out.println("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- "Tomcat");
- log.info("Found " + resources.size() + " ews / apache tomcat instance(s).");
+ PLUGIN_NAME);
+ log.info("Found " + resources.size() + "mod_cluster instance(s).");
}
private Set<Resource> findResource(Resource parent, String typeName) {
commit 82bacafdbd2cc892ad6e98a2a7362ae36cc61c57
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Jun 23 11:09:56 2011 -0500
A couple of updates to modcluster plugin based on tomcat plugin (modified the initial template commit).
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index b72c93d..e22efc7 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -1,25 +1,36 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.rhq.sample.skeletonplugin</groupId>
- <artifactId>skeleton-plugin</artifactId>
+ <parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-plugins-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.rhq.plugins.modcluster</groupId>
+ <artifactId>modcluster-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Skeleton RHQ Plugin Template</name>
- <description>A template for building a custom RHQ Agent plugin</description>
+ <name>mod_cluster RHQ Plugin</name>
+ <description>mod_cluster RHQ Agent plugin</description>
- <properties>
+ <!--properties>
<rhq.version>4.1.0-SNAPSHOT</rhq.version>
- </properties>
+ </properties-->
<dependencies>
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Below are the core modules that are required dependencies of all plugins -->
<dependency>
<groupId>org.rhq</groupId>
@@ -77,15 +88,14 @@
<scope>provided</scope>
</dependency>
- <!--
+
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
- -->
-
+
<!--
<dependency>
<groupId>i18nlog</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
index 2bb46e6..2abd0ea 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-package org.rhq.sample.skeletonplugin;
+package org.rhq.plugins.modcluster;
import java.util.HashSet;
import java.util.List;
@@ -113,4 +113,4 @@ public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponen
return set;
}
-}
\ No newline at end of file
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
index 701afb0..0236532 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-package org.rhq.sample.skeletonplugin;
+package org.rhq.plugins.modcluster;
import java.io.InputStream;
import java.util.List;
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 2547af7..1a99bf7 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -1,36 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- See the rhq-plugin.xsd file for detailed documentatoin on the schema. The notes in this file are to
- facilitate using this file as a base plugin descriptor.
--->
-
-<!--
- CHANGE: The name (and optional displayName) should be changed to reflect the plugin being developed. Keep in mind
- the value for name must be unique across all other plugins that are deployed.
-
- The package attribute should be changed to reflect the package in which all of the component classes
- are built.
--->
-<plugin name="SkeletonPlugin"
- displayName="Skeleton Plugin"
+<plugin name="mod_cluster"
+ displayName="mod_cluster"
version="1.0"
- package="org.rhq.sample.skeletonplugin"
+ package="org.rhq.plugins.modcluster"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
+ <depends plugin="JMX" />
- <!--
+ <!--
CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
defined at this level.
-->
- <server name="Sample Plugin Server"
+ <server name="mod_cluster"
discovery="SamplePluginDiscoveryComponent"
class="SamplePluginServerComponent"
supportsManualAdd="true"
- description="This is a sample resource type and should be removed.">
+ description="mod_cluster plugin">
<!--
CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
new file mode 100644
index 0000000..bada521
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -0,0 +1,106 @@
+/*
+ * 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.plugins.modcluster.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.plugin.FileSystemPluginFinder;
+import org.rhq.core.pc.plugin.PluginEnvironment;
+import org.rhq.core.pc.plugin.PluginManager;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+/**
+ * @author Fady Matar
+ */
+@Test(groups = "tomcat-plugin")
+public class ModclusterPluginTest {
+ private Log log = LogFactory.getLog(this.getClass());
+ private static final String PLUGIN_NAME = "Tomcat";
+
+ @BeforeSuite
+ public void start() {
+ try {
+ File pluginDir = new File("target/itest/plugins");
+ PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
+ pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
+ pcConfig.setPluginDirectory(pluginDir);
+
+ pcConfig.setInsideAgent(false);
+ PluginContainer.getInstance().setConfiguration(pcConfig);
+ PluginContainer.getInstance().initialize();
+ log.info("PC started.");
+ for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
+ log.info("...Loaded plugin: " + plugin);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AfterSuite
+ public void stop() {
+ PluginContainer.getInstance().shutdown();
+ }
+
+ @Test
+ public void testPluginLoad() {
+ PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
+ PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
+ assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
+ assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+ }
+
+ @Test(dependsOnMethods = "testPluginLoad")
+ public void testDiscovery() throws Exception {
+ InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+ Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
+ "Tomcat");
+ log.info("Found " + resources.size() + " ews / apache tomcat instance(s).");
+ }
+
+ private Set<Resource> findResource(Resource parent, String typeName) {
+ Set<Resource> found = new HashSet<Resource>();
+ Resource platform = parent;
+ for (Resource resource : platform.getChildResources()) {
+ log.info("Discovered resource of type: " + resource.getResourceType().getName());
+ if (resource.getResourceType().getName().equals(typeName)) {
+ found.add(resource);
+ }
+ if (resource.getChildResources() != null) {
+ for (Resource child : found) {
+ found.addAll(findResource(child, typeName));
+ }
+ }
+ }
+ return found;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/test/resources/log4j.xml b/modules/plugins/mod-cluster/src/test/resources/log4j.xml
new file mode 100644
index 0000000..9ac1be8
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/log4j.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 9973 2008-05-08 00:57:31Z ispringer $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Messagen -->
+
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+
+ <!--<param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>-->
+ </layout>
+ </appender>
+
+ <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="false"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Messagen -->
+ <!--
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ -->
+ <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
commit 68ca76535a5aa082a5adbfa3adae1d49c9da2300
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Jun 22 15:52:27 2011 -0500
Start for mod_cluster plugin from skeleton-plugin template.
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
new file mode 100644
index 0000000..b72c93d
--- /dev/null
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -0,0 +1,240 @@
+<?xml version="1.0"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.rhq.sample.skeletonplugin</groupId>
+ <artifactId>skeleton-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>Skeleton RHQ Plugin Template</name>
+ <description>A template for building a custom RHQ Agent plugin</description>
+
+ <properties>
+ <rhq.version>4.1.0-SNAPSHOT</rhq.version>
+ </properties>
+
+ <dependencies>
+
+ <!-- Below are the core modules that are required dependencies of all plugins -->
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-domain</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-plugin-api</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-native-system</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>hibernate-annotations</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.GA</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!-- Fix for the Javac bug requiring annotations to be available when compiling classes. (fixed in JDK 6) -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope> <!-- provided by the agent/plugin-container -->
+ </dependency>
+
+ <!--
+ Uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog
+ All three are provided to your plugin by the agent/plugin-container.
+ -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!--
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+ -->
+
+ <!--
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ <version>1.0.9</version>
+ <scope>provided</scope>
+ </dependency>
+ -->
+
+ <!-- Define any third-party dependencies your plugin has here. -->
+ <!--
+ <dependency>
+ <groupId>group-id-of-dependency-goes-here</groupId>
+ <artifactId>artifact-id-of-dependency-goes-here</artifactId>
+ <version>version-of-dependency-goes-here</version>
+ </dependency>
+ -->
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <!--
+ If your plugin has third-party jar dependencies that are not already available when deployed in the plugin
+ container, you can package these jars in your plugin. They go in your plugin jar's "lib" directory.
+ Uncomment the maven plugin definition below and define one or more jar files (aka "artifactItem" elements)
+ that you want to include in your plugin jar.
+ -->
+ <!--
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>your-third-party-dep-group</groupId>
+ <artifactId>your-third-party-dep-artifact</artifactId>
+ <version>your-third-party-dep-version</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>dev</id>
+ <properties>
+ <!-- define the location of your RHQ root directory - typically rhq.rootDir is overridden in Maven's settings.xml -->
+ <rhq.rootDir>/rhq/trunk</rhq.rootDir>
+ <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset>
+ <include name="META-INF/**" />
+ </patternset>
+ </unjar>
+ <jar destfile="${deployment.file}"
+ manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
+ update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+</project>
+
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
new file mode 100644
index 0000000..2bb46e6
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginDiscoveryComponent.java
@@ -0,0 +1,116 @@
+/*
+ * 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.sample.skeletonplugin;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ManualAddFacet;
+import org.rhq.core.pluginapi.inventory.ProcessScanResult;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+/**
+ * This can be the start of your own custom plugin's discovery component. Review the javadoc for
+ * {@link ResourceDiscoveryComponent}.
+ *
+ * @author John Mazzitelli
+ */
+@SuppressWarnings("unchecked")
+public class SamplePluginDiscoveryComponent implements ResourceDiscoveryComponent, ManualAddFacet {
+ private final Log log = LogFactory.getLog(SamplePluginDiscoveryComponent.class);
+
+ /**
+ * This discovery method is the way the plugin supports "manual-add" capability. The plugin
+ * descriptor must specify supportsManualAdd="true" to allow the resource to be manually added.
+ * If that attribute is false, this method will never be used since it will not be possible to manually
+ * add an instance of the resource.
+ *
+ * Review the javadoc for both {@link ManualAddFacet} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ManualAddFacet#discoverResource(Configuration, ResourceDiscoveryContext)
+ */
+ @Override
+ public DiscoveredResourceDetails discoverResource(Configuration pluginConfiguration,
+ ResourceDiscoveryContext context) throws InvalidPluginConfigurationException {
+
+ // pluginConfiguration contains information on a resource that was manually added by the user.
+ // take it and build a details object that represents that resource.
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Manually Added Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, pluginConfiguration, null);
+
+ return resource;
+ }
+
+ /**
+ * Review the javadoc for both {@link ResourceDiscoveryComponent} and {@link ResourceDiscoveryContext} to learn what
+ * you need to do in this method.
+ *
+ * @see ResourceDiscoveryComponent#discoverResources(ResourceDiscoveryContext)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ log.info("Discovering my custom plugin's resources");
+
+ // if your plugin descriptor defined one or more <process-scan>s, then see if the plugin container
+ // auto-discovered processes using those process scan definitions. Process all those that were found.
+ List<ProcessScanResult> autoDiscoveryResults = context.getAutoDiscoveredProcesses();
+ for (ProcessScanResult autoDiscoveryResult : autoDiscoveryResults) {
+ // determine if you want to include the result in this method's returned set of discovered resources
+ }
+
+ // now perform your own discovery mechanism, if you have one. For each resource discovered, you need to
+ // create a details object that describe the resource that you discovered.
+ HashSet<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+
+ // key = this must be a unique string across all of your resources - see docs for uniqueness rules
+ // name = this is the name you give the new resource; it does not necessarily have to be unique
+ // version = this is any string that corresponds to the resource's version
+ // description = this is any string that you want to assign as the default description for your resource
+ String key = "My Resource Key";
+ String name = "My Resource";
+ String version = "1.0";
+ String description = "This describes My Resource";
+
+ DiscoveredResourceDetails resource = new DiscoveredResourceDetails(context.getResourceType(), key, name,
+ version, description, null, null);
+
+ set.add(resource);
+
+ return set;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
new file mode 100644
index 0000000..701afb0
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/SamplePluginServerComponent.java
@@ -0,0 +1,245 @@
+/*
+ * 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.sample.skeletonplugin;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.DeployPackageStep;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.content.ContentFacet;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * This can be the start of your own custom plugin's server component. Review the javadoc for {@link ResourceComponent}
+ * and all the facet interfaces to learn what you can do in your resource component. This component has a lot of methods
+ * in it because it implements all possible facets. If your resource does not support, for example, configuration, you
+ * can remove the {@link ConfigurationFacet} from the <code>implements</code> clause and remove all method
+ * implementations that that facet required.
+ *
+ * <p>You should not only read the javadoc in each of this class' methods, but you should also read the javadocs linked
+ * by their "see" javadoc tags since those additional javadocs will contain a good deal of additional information you
+ * will need to know.</p>
+ *
+ * @author John Mazzitelli
+ */
+public class SamplePluginServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet,
+ ConfigurationFacet, ContentFacet, DeleteResourceFacet, CreateChildResourceFacet {
+ private final Log log = LogFactory.getLog(SamplePluginServerComponent.class);
+
+ /**
+ * Represents the resource configuration of the custom product being managed.
+ */
+ private Configuration resourceConfiguration;
+
+ /**
+ * All AMPS plugins are stateful - this context contains information that your resource component can use when
+ * performing its processing.
+ */
+ private ResourceContext resourceContext;
+
+ /**
+ * This is called when your component has been started with the given context. You normally initialize some internal
+ * state of your component as well as attempt to make a stateful connection to your managed resource.
+ *
+ * @see ResourceComponent#start(ResourceContext)
+ */
+ public void start(ResourceContext context) {
+ resourceContext = context;
+ }
+
+ /**
+ * This is called when the component is being stopped, usually due to the plugin container shutting down. You can
+ * perform some cleanup here; though normally not much needs to be done here.
+ *
+ * @see ResourceComponent#stop()
+ */
+ public void stop() {
+ }
+
+ /**
+ * All resource components must be able to tell the plugin container if the managed resource is available or not.
+ * This method is called by the plugin container when it needs to know if the managed resource is actually up and
+ * available.
+ *
+ * @see ResourceComponent#getAvailability()
+ */
+ public AvailabilityType getAvailability() {
+ // TODO: here you normally make some type of connection attempt to the managed resource
+ // to determine if it is really up and running.
+ return AvailabilityType.UP;
+ }
+
+ /**
+ * The plugin container will call this method when your resource component has been scheduled to collect some
+ * measurements now. It is within this method that you actually talk to the managed resource and collect the
+ * measurement data that is has emitted.
+ *
+ * @see MeasurementFacet#getValues(MeasurementReport, Set)
+ */
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
+ for (MeasurementScheduleRequest request : requests) {
+ String name = request.getName();
+
+ // TODO: based on the request information, you must collect the requested measurement(s)
+ // you can use the name of the measurement to determine what you actually need to collect
+ try {
+ Number value = new Integer(1); // dummy measurement value - this should come from the managed resource
+ report.addData(new MeasurementDataNumeric(request, value.doubleValue()));
+ } catch (Exception e) {
+ log.error("Failed to obtain measurement [" + name + "]. Cause: " + e);
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * The plugin container will call this method when it wants to invoke an operation on your managed resource. Your
+ * plugin will connect to the managed resource and invoke the analogous operation in your own custom way.
+ *
+ * @see OperationFacet#invokeOperation(String, Configuration)
+ */
+ public OperationResult invokeOperation(String name, Configuration configuration) {
+ return null;
+ }
+
+ /**
+ * The plugin container will call this method and it needs to obtain the current configuration of the managed
+ * resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the
+ * returned Configuration object with the managed resource's configuration property values.
+ *
+ * @see ConfigurationFacet#loadResourceConfiguration()
+ */
+ public Configuration loadResourceConfiguration() {
+ // here we simulate the loading of the managed resource's configuration
+
+ if (resourceConfiguration == null) {
+ // for this example, we will create a simple dummy configuration to start with.
+ // note that it is empty, so we're assuming there are no required configs in the plugin descriptor.
+ resourceConfiguration = new Configuration();
+ }
+
+ Configuration config = resourceConfiguration;
+
+ return config;
+ }
+
+ /**
+ * The plugin container will call this method when it has a new configuration for your managed resource. Your plugin
+ * will re-configure the managed resource in your own custom way, setting its configuration based on the new values
+ * of the given configuration.
+ *
+ * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
+ */
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ // this simulates the plugin taking the new configuration and reconfiguring the managed resource
+ resourceConfiguration = report.getConfiguration().deepCopy();
+
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+ }
+
+ /**
+ * When this is called, the plugin is responsible for scanning its managed resource and look for content that need
+ * to be managed for that resource. This method should only discover packages of the given package type.
+ *
+ * @see ContentFacet#discoverDeployedPackages(PackageType)
+ */
+ public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+ return null;
+ }
+
+ /**
+ * The plugin container calls this method when new packages need to be deployed/installed on resources.
+ *
+ * @see ContentFacet#deployPackages(Set, ContentServices)
+ */
+ public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices) {
+ return null;
+ }
+
+ /**
+ * When a remote client wants to see the actual data content for an installed package, this method will be called.
+ * This method must return a stream of data containing the full content of the package.
+ *
+ * @see ContentFacet#retrievePackageBits(ResourcePackageDetails)
+ */
+ public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ /**
+ * This is the method that is used when the component has to create the installation steps and their results.
+ *
+ * @see ContentFacet#generateInstallationSteps(ResourcePackageDetails)
+ */
+ public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails) {
+ return null;
+ }
+
+ /**
+ * This is called when the actual content of packages should be deleted from the managed resource.
+ *
+ * @see ContentFacet#removePackages(Set)
+ */
+ public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
+ return null;
+ }
+
+ /**
+ * When called, the plugin container is asking the plugin to create a new managed resource. The new resource's
+ * details need to be added to the given report.
+ *
+ * @see CreateChildResourceFacet#createResource(CreateResourceReport)
+ */
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ return null;
+ }
+
+ /**
+ * When called, the plugin container is asking the plugin to delete a managed resource.
+ *
+ * @see DeleteResourceFacet#deleteResource()
+ */
+ public void deleteResource() {
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
new file mode 100644
index 0000000..2547af7
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ See the rhq-plugin.xsd file for detailed documentatoin on the schema. The notes in this file are to
+ facilitate using this file as a base plugin descriptor.
+-->
+
+<!--
+ CHANGE: The name (and optional displayName) should be changed to reflect the plugin being developed. Keep in mind
+ the value for name must be unique across all other plugins that are deployed.
+
+ The package attribute should be changed to reflect the package in which all of the component classes
+ are built.
+-->
+<plugin name="SkeletonPlugin"
+ displayName="Skeleton Plugin"
+ version="1.0"
+ package="org.rhq.sample.skeletonplugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
+
+
+ <!--
+ CHANGE: The following is a sample server resource type. This entry is here to serve as a model and should
+ be removed prior to deploying the plugin. Multiple resource types (either server or service) may be
+ defined at this level.
+ -->
+ <server name="Sample Plugin Server"
+ discovery="SamplePluginDiscoveryComponent"
+ class="SamplePluginServerComponent"
+ supportsManualAdd="true"
+ description="This is a sample resource type and should be removed.">
+
+ <!--
+ CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
+ related child resources. Categories defined at this level can carry metadata on the category itself,
+ such as a display name and description.
+ -->
+ <subcategories>
+ <subcategory name="Category1" displayName="Sample Category 1"
+ description="This is a sample category that should be removed."/>
+ <subcategory name="Category2" >
+ <subcategory name="ChildCategory2a" />
+ </subcategory>
+ </subcategories>
+
+ <!--
+ CHANGE: The entire plugin configuration is optional. If there are properties specific to handling how the
+ resource component will connect to the resource, they should be added here. If the plugin-configuration
+ entity is specified, at least one property must be provided.
+ -->
+ <plugin-configuration>
+ <c:simple-property name="SamplePluginProperty" displayName="Sample Plugin Property" default="Value" />
+ </plugin-configuration>
+
+ <!--
+ CHANGE: The process-scan element requests the plugin container provide the discovery component for
+ this resource type with the results of scanning the machine for running processes. If there is
+ no use for this in a given resource type, this entry may be omitted.
+ -->
+ <process-scan name="ScanIdentifier" query="process|basename|match=^java.*,arg|org.jboss.Main|match=.*"/>
+
+ <!--
+ CHANGE: An operation element is added for each operation that may be executed against resources of this type.
+ The parameters element is optional; properties defined within will be displayed to the user when
+ invoking the operation. If the resource has no applicable operations, these elements may be omitted.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the OperationFacet interface
+ if any operations are specified.
+ -->
+ <operation name="testSimple"
+ description="Test simple-property configuration element for a resource operation">
+ <parameters>
+ <c:group name="required" displayName="Required Parameters" hiddenByDefault="false">
+ <c:description>All of these properties are required</c:description>
+ <c:simple-property name="aNumber" type="integer" required="true" default="42" displayName="A Number" description="A number between 1 and 100, inclusive">
+ <c:constraint>
+ <c:integer-constraint minimum="1" maximum="100"/>
+ </c:constraint>
+ </c:simple-property>
+ </c:group>
+ </parameters>
+ <results>
+ <c:simple-property name="results" />
+ </results>
+ </operation>
+
+ <!--
+ CHANGE: For each measurement that should be collected for resources of this type, a metric element is added.
+ In addition to identifying the metric, a default collection interval and whether or not the
+ metric is even collected by default are indicated. If the resource has no measurements to be
+ collected, these elements may be omitted.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the MeasurementFacet interface
+ if any metrics are specified.
+ -->
+ <metric property="MeasurementName"
+ displayName="The Measurement Name"
+ description="Describes what this measurement is actually telling you"
+ defaultOn="true"
+ defaultInterval="300000"
+ category="performance" />
+
+ <!--
+ CHANGE: Resource configuration properties are used to configure resources themselves, as compared to the plugin
+ configuration which refers to the connection to a resource. If the resource-configuration
+ entity is specified, at least one property must be provided.
+
+ REQUIRED INTERFACE: The resource component for this resource type must implement the ConfigurationFacet
+ interface if a resource-configuration element is supplied.
+ -->
+ <resource-configuration>
+ <c:simple-property name="port" type="integer" displayName="Port on which to listen" />
+ </resource-configuration>
+ </server>
+</plugin>
commit 447cd29b3c4d39c80fabc990096807353544d258
Merge: f7aa5f5 32b8223
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Dec 2 10:54:48 2010 +0100
Merge branch 'master' into code-smell
diff --cc modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
index 3eb1c6b,b57c65b..e4d7575
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
@@@ -30,16 -27,16 +27,17 @@@ import org.rhq.core.pluginapi.inventory
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.util.jdbc.JDBCUtil;
import org.rhq.plugins.database.DatabaseComponent;
+ import java.io.File;
+ import java.io.FileReader;
import java.sql.Connection;
- import java.sql.DatabaseMetaData;
- import java.sql.DriverManager;
import java.sql.ResultSet;
- import java.sql.ResultSetMetaData;
import java.sql.SQLException;
+ import java.sql.Statement;
import java.util.HashMap;
+ import java.util.List;
import java.util.Map;
import java.util.Set;
diff --cc modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
index 2ada67b,30b65f2..c4ada90
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
@@@ -28,10 -28,8 +28,9 @@@ import org.rhq.core.pluginapi.inventory
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.pluginapi.inventory.ManualAddFacet;
import org.rhq.core.system.ProcessInfo;
+import org.rhq.core.util.jdbc.JDBCUtil;
import java.sql.Connection;
- import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.LinkedHashSet;
import java.util.List;
@@@ -82,59 -79,53 +80,53 @@@ public class MySqlDiscoveryComponent im
}
protected static DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext discoveryContext,
- Configuration pluginConfiguration, ProcessInfo processInfo) {
-
- String key = buildUrl(pluginConfiguration);
- String db = pluginConfiguration.getSimple(DB_CONFIGURATION_PROPERTY).getStringValue();
- String name = "MySql [" + db + "]";
- try {
- String version = getVersion(pluginConfiguration);
- return new DiscoveredResourceDetails(discoveryContext.getResourceType(), key, name, version,
- DEFAULT_RESOURCE_DESCRIPTION, pluginConfiguration, processInfo);
- } catch (Exception e) {
- log.warn("Getting details failed: " + e.getMessage());
- if (e.getCause()!=null) {
- log.warn(" caused by: " + e.getCause().getMessage());
- }
- }
- return null;
- }
+ Configuration pluginConfiguration,
+ ProcessInfo processInfo) throws InvalidPluginConfigurationException {
- protected static String buildUrl(Configuration config) {
- String host = config.getSimple(HOST_CONFIGURATION_PROPERTY).getStringValue();
- String port = config.getSimple(PORT_CONFIGURATION_PROPERTY).getStringValue();
- String user = config.getSimple(PRINCIPAL_CONFIGURATION_PROPERTY).getStringValue();
- String pass = config.getSimple(CREDENTIALS_CONFIGURATION_PROPERTY).getStringValue();
- String url = "jdbc:mysql://" + host + "?user=" + user + "&password=" + pass;
- return url;
- }
-
- protected static String getVersion(Configuration config) {
- String version = null;
- Connection conn = null;
+ MySqlConnectionInfo ci = buildConnectionInfo(pluginConfiguration);
+ Connection conn;
+ String version = "";
try {
- conn = buildConnection(config);
+ conn = MySqlConnectionManager.getConnectionManager().getConnection(ci);
version = conn.getMetaData().getDatabaseProductVersion();
- } catch (SQLException e) {
- // TODO GH: How to put this back to the server while inventorying this resource in an unconfigured state
- log.info("Exception detecting mysql instance version" + e.getMessage());
- } finally {
- JDBCUtil.safeClose(conn);
+ } catch (SQLException ex) {
+ // ignore so we can still add to the inventory even though we can't currently connect
}
- return version;
- }
+ String key = new StringBuilder().append("MySql:")
+ .append(ci.getDb())
+ .append(":")
+ .append(ci.getHost())
+ .append(":")
+ .append(ci.getPort())
+ .append("-")
+ .append(ci.getUser()).toString();
+ String name = new StringBuilder().append("MySql [")
+ .append(ci.getDb())
+ .append("]").toString();
+
+ DiscoveredResourceDetails result = new DiscoveredResourceDetails(
+ discoveryContext.getResourceType(),
+ key,
+ name,
+ version,
+ "MySql Server",
+ pluginConfiguration,
+ processInfo);
- public static Connection buildConnection(Configuration configuration) throws SQLException {
- String driverClass = configuration.getSimple(DRIVER_CONFIGURATION_PROPERTY).getStringValue();
- try {
- Class.forName(driverClass);
- } catch (ClassNotFoundException e) {
- throw new InvalidPluginConfigurationException("Specified JDBC driver class (" + driverClass
- + ") not found.");
+ if (log.isDebugEnabled()) {
+ log.debug("Discovered Database Server for MySQL Database " + ci.buildURL());
}
+ return result;
- String url = buildUrl(configuration);
-
- return DriverManager.getConnection(url);
}
+
+ static MySqlConnectionInfo buildConnectionInfo(Configuration configuration) {
+ // build the Discovered Resource from the configuration
+ String host = configuration.getSimple(HOST_CONFIGURATION_PROPERTY).getStringValue();
+ String port = configuration.getSimple(PORT_CONFIGURATION_PROPERTY).getStringValue();
+ String user = configuration.getSimple(PRINCIPAL_CONFIGURATION_PROPERTY).getStringValue();
+ String pass = configuration.getSimple(CREDENTIALS_CONFIGURATION_PROPERTY).getStringValue();
+ String db = configuration.getSimple(DB_CONFIGURATION_PROPERTY).getStringValue();
+ return new MySqlConnectionInfo(host, port, db, user, pass);
+ }
-}
+}
commit f7aa5f57e02fb94389c33ac5b22bcef222488bc7
Merge: 077dd3d 08566cc
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Oct 13 11:16:45 2010 +0200
Merge branch 'master' into code-smell
diff --cc modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
index 4034184,bc1fc64..484d591
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
@@@ -87,10 -87,12 +87,12 @@@ public class Props
private Set<Template> templates = new HashSet<Template>();
- private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();;
+ private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();
- private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();;
+ private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();
+ private Set<TypeKey> runsInsides = new LinkedHashSet<TypeKey>();;
+
private String pluginName;
private String pluginDescription;
commit 077dd3d75a5782dd4c775b47a64e80b0cfd38311
Merge: 8970684 e5fac0a
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Sep 14 18:08:59 2010 +0200
Merge branch 'master' into code-smell
commit 89706849030f5d35d65189b7cc6e8fd75da403d2
Merge: 271474d fb4f6c2
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Sep 3 11:02:19 2010 +0200
Merge branch 'master' into code-smell
commit 271474dd691b04cc01106d83baee292cfd6689a2
Merge: 4d5b070 66234db
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 24 18:10:33 2010 +0200
Merge branch 'master' into code-smell
diff --cc modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
index ba0ea81,4f1045e..2ada67b
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
@@@ -106,9 -115,7 +117,9 @@@ public class MySqlDiscoveryComponent im
version = conn.getMetaData().getDatabaseProductVersion();
} catch (SQLException e) {
// TODO GH: How to put this back to the server while inventorying this resource in an unconfigured state
- log.info("Exception detecting mysql instance version", e);
+ log.info("Exception detecting mysql instance version" + e.getMessage());
+ } finally {
+ JDBCUtil.safeClose(conn);
}
return version;
}
@@@ -126,4 -133,4 +137,4 @@@
return DriverManager.getConnection(url);
}
--}
++}
commit 4d5b070e7e77d53f32d93ee9788e52e1ff5b509f
Merge: 88faac6 462e15f
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 20 12:46:56 2010 +0200
Merge branch 'master' into code-smell
commit 88faac6a30c0282e08d2b0d7d19d6d019a0504c3
Merge: 2c7c7fc 1c5c441
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Aug 16 12:19:04 2010 +0200
Merge branch 'master' into code-smell
commit 2c7c7fc3aa949bbfebdefaaa4a0688a95bbeede8
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 15:21:25 2010 +0200
Be defensive about the existence of HTTP Date header.
diff --git a/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceComponent.java b/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceComponent.java
index 85b19ad..54d9256 100644
--- a/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceComponent.java
+++ b/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceComponent.java
@@ -24,6 +24,7 @@ import java.util.Date;
import java.util.Locale;
import java.util.Set;
+import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.logging.Log;
@@ -114,7 +115,8 @@ public class HTTPNetServiceComponent implements ResourceComponent, MeasurementFa
// TODO: may need to allow plugin to configure the locale, but for this fixed string, make sure we
// ignore default locale, this works for english.
SimpleDateFormat sdf = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
- Date contentDate = sdf.parse(method.getResponseHeader("Date").getValue());
+ Header dateHeader = method.getResponseHeader("Date");
+ Date contentDate = dateHeader == null ? new Date(System.currentTimeMillis()) : sdf.parse(dateHeader.getValue());
// System.out.println("Success: " + success);
// System.out.println("Response: " + responseCode);
commit c033ec0a86a394f0caeda7081ed9c3fbd77ac524
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 15:16:53 2010 +0200
Fail gracefully if we cannot determine the deployment descriptor file of the mbean during the resource configuration update.
diff --git a/modules/plugins/jboss-cache/src/main/java/org/rhq/plugins/jbosscache/JBossCacheComponent.java b/modules/plugins/jboss-cache/src/main/java/org/rhq/plugins/jbosscache/JBossCacheComponent.java
index 34c3ffc..daa7cdb 100644
--- a/modules/plugins/jboss-cache/src/main/java/org/rhq/plugins/jbosscache/JBossCacheComponent.java
+++ b/modules/plugins/jboss-cache/src/main/java/org/rhq/plugins/jbosscache/JBossCacheComponent.java
@@ -281,6 +281,12 @@ public class JBossCacheComponent implements ResourceComponent<JMXComponent>, Mea
String mbeanName = context.getResourceKey();
File file = DeploymentUtility.getDescriptorFile(parentServer.getEmsConnection(), mbeanName);
+ if (file == null) {
+ report.setStatus(ConfigurationUpdateStatus.FAILURE);
+ report.setErrorMessage("Failed to determine the deployment descriptor file for mbean '" + mbeanName + "'.");
+ return;
+ }
+
CacheConfigurationHelper helper = new CacheConfigurationHelper();
try {
helper.writeConfig(file, newOne, mbeanName, true);
commit 6334d8b4fbb3e77b3ce607cd3191406ad85cc348
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 15:06:07 2010 +0200
Paranoidly prevent NPE if a set of rules changed between avail checks of the parent BytemanScriptComponent.
diff --git a/modules/plugins/byteman/src/main/java/org/rhq/plugins/byteman/BytemanRuleComponent.java b/modules/plugins/byteman/src/main/java/org/rhq/plugins/byteman/BytemanRuleComponent.java
index 09f7213..189eb47 100644
--- a/modules/plugins/byteman/src/main/java/org/rhq/plugins/byteman/BytemanRuleComponent.java
+++ b/modules/plugins/byteman/src/main/java/org/rhq/plugins/byteman/BytemanRuleComponent.java
@@ -36,7 +36,7 @@ public class BytemanRuleComponent implements ResourceComponent<BytemanScriptComp
List<String> rules = this.resourceContext.getParentResourceComponent().getRules();
for (String rule : rules) {
String ruleName = client.determineRuleName(rule);
- if (ruleName.equals(ourKey)) {
+ if (ourKey.equals(ruleName)) {
return AvailabilityType.UP;
}
}
commit ac1418991c901faed1397c7a9016d226316855a0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 15:00:54 2010 +0200
Make sure to close the stream (this will paranoidly close the buffered output stream instead just the file output stream that is wrapped by it).
diff --git a/modules/plugins/rhq-agent/src/main/java/org/rhq/plugins/agent/AgentSnapshotReport.java b/modules/plugins/rhq-agent/src/main/java/org/rhq/plugins/agent/AgentSnapshotReport.java
index f2fb4b3..cd92575 100644
--- a/modules/plugins/rhq-agent/src/main/java/org/rhq/plugins/agent/AgentSnapshotReport.java
+++ b/modules/plugins/rhq-agent/src/main/java/org/rhq/plugins/agent/AgentSnapshotReport.java
@@ -21,6 +21,7 @@ package org.rhq.plugins.agent;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.OutputStream;
import java.util.Properties;
import org.apache.commons.logging.Log;
@@ -29,6 +30,7 @@ import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.util.SnapshotReport;
+import org.rhq.core.util.stream.StreamUtil;
/**
* Performs some slight customizations of the snapshot report utility such as taking a snapshot of the live
@@ -82,11 +84,12 @@ public class AgentSnapshotReport extends SnapshotReport {
try {
File configDir = new File(this.agentInstallDir, "conf");
File liveConfigFile = new File(configDir, "live-agent-configuration.properties");
- FileOutputStream fos = new FileOutputStream(liveConfigFile);
+ OutputStream fos = null;
try {
- this.agentConfiguration.store(new BufferedOutputStream(fos), null);
+ fos = new BufferedOutputStream(new FileOutputStream(liveConfigFile));
+ this.agentConfiguration.store(fos, null);
} finally {
- fos.close();
+ StreamUtil.safeClose(fos);
}
return liveConfigFile;
} catch (Exception e) {
commit 8869c018b39935049b924b1d7273fcb15663b7b9
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:54:40 2010 +0200
Prevent an NPE if all aliases would be removed from a tomcat vhost.
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatVHostComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatVHostComponent.java
index e8d6e8b..2746c5b 100644
--- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatVHostComponent.java
+++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatVHostComponent.java
@@ -159,11 +159,10 @@ public class TomcatVHostComponent extends MBeanResourceComponent<TomcatServerCom
String currentValsLongString = currentVals.getStringValue();
String newValsLongString = newVals.getStringValue();
StringTokenizer tokenizer = null;
- Configuration opConfig = null;
+ Configuration opConfig = new Configuration();
if (null != newValsLongString) {
tokenizer = new StringTokenizer(newValsLongString, "\n");
- opConfig = new Configuration();
while (tokenizer.hasMoreTokens()) {
String newVal = tokenizer.nextToken().trim();
if ((null == currentValsLongString) || !currentValsLongString.contains(newVal)) {
commit f270fe5702392360cc2ab6710f2e4f528f6ab4b3
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:53:00 2010 +0200
Prevent an NPE when the user was removed from all groups or roles during resource configuration update.
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatUserComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatUserComponent.java
index 52efaac..24936cd 100644
--- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatUserComponent.java
+++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatUserComponent.java
@@ -162,11 +162,10 @@ public class TomcatUserComponent extends MBeanResourceComponent<TomcatUserDataba
String currentValsLongString = currentVals.getStringValue();
String newValsLongString = newVals.getStringValue();
StringTokenizer tokenizer = null;
- Configuration opConfig = null;
+ Configuration opConfig = new Configuration();
if (null != newValsLongString) {
tokenizer = new StringTokenizer(newValsLongString, "\n");
- opConfig = new Configuration();
while (tokenizer.hasMoreTokens()) {
String newVal = tokenizer.nextToken().trim();
if ((null == currentValsLongString) || !currentValsLongString.contains(newVal)) {
commit d6a394514a81cab7a2912d5f0d183b7b958d84ea
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:50:40 2010 +0200
Prevent an NPE in case all the roles were removed from the tomcat group.
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatGroupComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatGroupComponent.java
index 89b2ce2..1d667a7 100644
--- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatGroupComponent.java
+++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatGroupComponent.java
@@ -141,11 +141,10 @@ public class TomcatGroupComponent extends MBeanResourceComponent<TomcatUserDatab
String currentValsLongString = currentVals.getStringValue();
String newValsLongString = newVals.getStringValue();
StringTokenizer tokenizer = null;
- Configuration opConfig = null;
+ Configuration opConfig = new Configuration();
if (null != newValsLongString) {
tokenizer = new StringTokenizer(newValsLongString, "\n");
- opConfig = new Configuration();
while (tokenizer.hasMoreTokens()) {
String newVal = tokenizer.nextToken().trim();
if ((null == currentValsLongString) || !currentValsLongString.contains(newVal)) {
commit 48f7788fa29d437b791f28625c233e87c5e2b811
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:48:16 2010 +0200
Be paranoid about File.getParentFile()
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
index 3007520..fc0e681 100644
--- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
+++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
@@ -341,8 +341,17 @@ public class TomcatDiscoveryComponent implements ResourceDiscoveryComponent, Man
private String determineCatalinaHomeOnWindows(ProcessInfo processInfo) {
File exePath = new File(processInfo.getName());
+
File parentDir = exePath.getParentFile();
+ if (parentDir == null) { //paranoia
+ return null;
+ }
+
File ewsDir = parentDir.getParentFile();
+ if (ewsDir == null) { //paranoia
+ return null;
+ }
+
File tomcatDir = new File(ewsDir, "share/apache-tomcat-6.0.24");
if (tomcatDir.exists()) {
commit dd633d1e56712671a496952dd6f04fae21bada07
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:36:32 2010 +0200
Throw a specific exception if failed to parse virt domain xml.
diff --git a/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/VirtualizationDomainComponent.java b/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/VirtualizationDomainComponent.java
index a67d5c3..adc75a6 100644
--- a/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/VirtualizationDomainComponent.java
+++ b/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/VirtualizationDomainComponent.java
@@ -159,6 +159,11 @@ public class VirtualizationDomainComponent implements ResourceComponent<Virtuali
String xml = virt.getDomainXML(this.domainName);
Configuration oldConfig = loadResourceConfiguration();
+
+ if (oldConfig == null) {
+ throw new IllegalStateException("Failed to parse the XML specification for domain '" + domainName + "'.");
+ }
+
Configuration newConfig = report.getConfiguration();
String newXml = XMLEditor.updateDomainXML(report.getConfiguration(), xml);
commit 8ad726302d19649136d25783b23555431de16db2
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 14:07:50 2010 +0200
Be paranoid about free()ing the libvirt objects, throw IllegalArgumentException if domain/network of some name cannot be found instead of just blindly throwing an NPE later in the workflow.
diff --git a/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/LibVirtConnection.java b/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/LibVirtConnection.java
index 6b16328..b1f578e 100644
--- a/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/LibVirtConnection.java
+++ b/modules/plugins/virt/src/main/java/org/rhq/plugins/virt/LibVirtConnection.java
@@ -114,15 +114,17 @@ public class LibVirtConnection {
public DomainInfo getDomainInfo(String domainName) throws LibvirtException {
try {
- Domain domain = connection.domainLookupByName(domainName);
-
- DomainInfo info = new DomainInfo();
- info.domainInfo = domain.getInfo();
- info.name = domainName;
- info.uuid = domain.getUUIDString();
- domain.free();
-
- return info;
+ Domain domain = getDomain(domainName);
+ try {
+ DomainInfo info = new DomainInfo();
+ info.domainInfo = domain.getInfo();
+ info.name = domainName;
+ info.uuid = domain.getUUIDString();
+
+ return info;
+ } finally {
+ domain.free();
+ }
} catch (LibvirtException e) {
log.error("Error looking up domain with name " + domainName, e);
throw e;
@@ -132,14 +134,19 @@ public class LibVirtConnection {
public DomainInfo getDomainInfo(int id) throws LibvirtException {
try {
Domain domain = connection.domainLookupByID(id);
-
- DomainInfo info = new DomainInfo();
- info.domainInfo = domain.getInfo();
- info.name = domain.getName();
- info.uuid = domain.getUUIDString();
- domain.free();
-
- return info;
+ if (domain == null) {
+ throw new IllegalArgumentException("No domain found with ID: " + id);
+ }
+ try {
+ DomainInfo info = new DomainInfo();
+ info.domainInfo = domain.getInfo();
+ info.name = domain.getName();
+ info.uuid = domain.getUUIDString();
+
+ return info;
+ } finally {
+ domain.free();
+ }
} catch (LibvirtException e) {
log.error("Error looking up domain with id " + id, e);
throw e;
@@ -147,18 +154,22 @@ public class LibVirtConnection {
}
public String getDomainXML(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- String returnValue = domain.getXMLDesc(0);
- domain.free();
-
- return returnValue;
+ Domain domain = getDomain(domainName);
+ try {
+ return domain.getXMLDesc(0);
+ } finally {
+ domain.free();
+ }
}
public int domainReboot(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.reboot(0);
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.reboot(0);
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainRestore(String toPath) throws LibvirtException {
@@ -167,57 +178,79 @@ public class LibVirtConnection {
}
public int domainDestroy(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.destroy();
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.destroy();
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainDelete(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- DomainState state = domain.getInfo().state;
-
- if ((state != DomainState.VIR_DOMAIN_SHUTDOWN) && (state != DomainState.VIR_DOMAIN_SHUTOFF)) {
- domain.destroy();
+ Domain domain = getDomain(domainName);
+ try {
+ DomainState state = domain.getInfo().state;
+
+ if ((state != DomainState.VIR_DOMAIN_SHUTDOWN) && (state != DomainState.VIR_DOMAIN_SHUTOFF)) {
+ domain.destroy();
+ }
+ domain.undefine();
+
+ return SUCCESS;
+ } finally {
+ domain.free();
}
- domain.undefine();
- domain.free();
- return SUCCESS;
}
public int domainSave(String domainName, String toPath) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.save(toPath);
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.save(toPath);
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainResume(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.resume();
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.resume();
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainShutdown(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.shutdown();
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.shutdown();
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainSuspend(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.suspend();
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.suspend();
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public int domainCreate(String domainName) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.create();
- domain.free();
- return SUCCESS;
+ Domain domain = getDomain(domainName);
+ try {
+ domain.create();
+ return SUCCESS;
+ } finally {
+ domain.free();
+ }
}
public boolean defineDomain(String xml) throws LibvirtException {
@@ -230,35 +263,48 @@ public class LibVirtConnection {
}
public void setMaxMemory(String domainName, long size) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.setMaxMemory(size);
- domain.free();
+ Domain domain = getDomain(domainName);
+ try {
+ domain.setMaxMemory(size);
+ } finally {
+ domain.free();
+ }
}
public void setMemory(String domainName, long size) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.setMemory(size);
- domain.free();
+ Domain domain = getDomain(domainName);
+ try {
+ domain.setMemory(size);
+ } finally {
+ domain.free();
+ }
}
public void setVcpus(String domainName, int count) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- domain.setVcpus(count);
- domain.free();
+ Domain domain = getDomain(domainName);
+ try {
+ domain.setVcpus(count);
+ } finally {
+ domain.free();
+ }
}
public DomainInterfaceStats getDomainInterfaceStats(String domainName, String path) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- DomainInterfaceStats returnValue = domain.interfaceStats(path);
- domain.free();
- return returnValue;
+ Domain domain = getDomain(domainName);
+ try {
+ return domain.interfaceStats(path);
+ } finally {
+ domain.free();
+ }
}
public DomainBlockStats getDomainBlockStats(String domainName, String path) throws LibvirtException {
- Domain domain = connection.domainLookupByName(domainName);
- DomainBlockStats returnValue = domain.blockStats(path);
- domain.free();
- return returnValue;
+ Domain domain = getDomain(domainName);
+ try {
+ return domain.blockStats(path);
+ } finally {
+ domain.free();
+ }
}
public int close() throws LibvirtException {
@@ -275,7 +321,10 @@ public class LibVirtConnection {
double usedMemory = 0;
for (int id : connection.listDomains()) {
Domain domain = connection.domainLookupByID(id);
- usedMemory += domain.getInfo().memory;
+ if (domain != null) {
+ usedMemory += domain.getInfo().memory;
+ domain.free();
+ }
}
return usedMemory / memory;
}
@@ -284,8 +333,10 @@ public class LibVirtConnection {
long cpuTime = 0;
for (int id : connection.listDomains()) {
Domain domain = connection.domainLookupByID(id);
- cpuTime += domain.getInfo().cpuTime;
- domain.free();
+ if (domain != null) {
+ cpuTime += domain.getInfo().cpuTime;
+ domain.free();
+ }
}
return cpuTime;
}
@@ -321,28 +372,37 @@ public class LibVirtConnection {
return getNetworks().contains(name);
}
- //TODO NEED TO ADD A NETWORK OBJECT AND FREE THE LIBVIRT ONE
public NetworkInfo getNetwork(String name) throws LibvirtException {
- NetworkInfo info = new NetworkInfo();
- Network net = connection.networkLookupByName(name);
- info.name = net.getName();
- info.autostart = net.getAutostart();
- info.bridgeName = net.getBridgeName();
- return info;
+ Network net = getLibVirtNetwork(name);
+
+ try {
+ NetworkInfo info = new NetworkInfo();
+ info.name = net.getName();
+ info.autostart = net.getAutostart();
+ info.bridgeName = net.getBridgeName();
+ return info;
+ } finally {
+ net.free();
+ }
}
public String getNetworkXML(String name) throws LibvirtException {
- Network network = connection.networkLookupByName(name);
- String returnValue = network.getXMLDesc(0);
- network.free();
- return returnValue;
+ Network network = getLibVirtNetwork(name);
+ try {
+ return network.getXMLDesc(0);
+ } finally {
+ network.free();
+ }
}
public void updateNetwork(String name, String xml, boolean autostart) throws LibvirtException {
connection.networkDefineXML(xml);
- Network network = connection.networkLookupByName(name);
- network.setAutostart(autostart);
- network.free();
+ Network network = getLibVirtNetwork(name);
+ try {
+ network.setAutostart(autostart);
+ } finally {
+ network.free();
+ }
}
public static class DomainInfo {
@@ -385,10 +445,26 @@ public class LibVirtConnection {
System.out.println(conn.connection.domainLookupByName(foo).getXMLDesc(0));
}
}
+
+ private Domain getDomain(String domainName) throws LibvirtException, IllegalArgumentException {
+ Domain ret = connection.domainLookupByName(domainName);
+ if (ret == null) {
+ throw new IllegalArgumentException("Could not find a domain called '" + domainName + "'.");
+ }
+
+ return ret;
+ }
+
+ private Network getLibVirtNetwork(String networkName) throws LibvirtException, IllegalArgumentException {
+ Network ret = connection.networkLookupByName(networkName);
+ if (ret == null) {
+ throw new IllegalArgumentException("Could not find a netword called '" + networkName + "'.");
+ }
+
+ return ret;
+ }
}
-//TODO Put the callbacks in
-/* Comment this out untilt he callbacks get in*/
class Logger extends org.libvirt.ErrorCallback {
// Make this static so the callback will always have an object
commit 1a666b2c5cd1e942d8f568c041ac2f678421050b
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Aug 13 12:20:05 2010 +0200
Removed needless null check.
diff --git a/modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java b/modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java
index 475195a..38f1b02 100644
--- a/modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java
+++ b/modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java
@@ -336,12 +336,8 @@ public class ScriptServerComponent implements ResourceComponent, MeasurementFace
ProcessExecutionResults results = executeExecutable(sysInfo, pluginConfig, args, wait, captureOutput);
if (log.isDebugEnabled()) {
- if (results != null) {
- logDebug("CLI results: exitcode=[" + results.getExitCode() + "]; error=[" + results.getError()
- + "]; output=" + truncateString(results.getCapturedOutput()));
- } else {
- logDebug("CLI has null results");
- }
+ logDebug("CLI results: exitcode=[" + results.getExitCode() + "]; error=[" + results.getError()
+ + "]; output=" + truncateString(results.getCapturedOutput()));
}
return results;
commit b9f07c09436a548434acfd6855662d54d33bf866
Merge: c8fb8b3 910702a
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Aug 12 15:30:40 2010 +0200
Merge branch 'master' into code-smell
commit c8fb8b3652d6b32e880b52913dd2280ab157eb57
Merge: 2638f27 f1365e5
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Aug 12 15:18:05 2010 +0200
Merge branch 'code-smell' of ssh://git.fedorahosted.org/git/rhq/rhq into code-smell
commit f1365e541a2ba19357abfa063333dc9901f6d786
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Aug 12 12:24:08 2010 +0200
12644 prevent NPE
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
index 6830f5f..16d6c89 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
@@ -18,6 +18,7 @@
*/
package org.rhq.plugins.perftest;
+import java.util.Collections;
import java.util.Set;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.resource.ResourceType;
@@ -44,6 +45,9 @@ public class PerfTestDiscoveryComponent implements ResourceDiscoveryComponent {
Set<DiscoveredResourceDetails> resourceDetails = null;
if (manager.isEnabled()) {
ResourceFactory resourceFactory = manager.getResourceFactory(resourceType.getName());
+ if (resourceFactory==null)
+ return Collections.emptySet();
+
resourceDetails = resourceFactory.discoverResources(context);
// If there is a plugin configuration factory defined, run it on each resource
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
index d9aabf9..1eb831d 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
@@ -310,6 +310,7 @@ public class ScenarioManager {
return new SimpleResourceFactory((SimpleResourceGenerator) generator);
}
+ log.warn("No factory for generator " + generator.toString() + " specified");
return null;
}
commit 391f9be4637842049cc01e90d7bce1b4ce54e86f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Aug 12 12:02:58 2010 +0200
Fix some potential NPE and resource leakage
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
index 69587d0..17a6818 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
@@ -61,37 +61,49 @@ public class PluginGen {
public void run() throws Exception {
+ Props props = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ try {
- Props props = askQuestions(br, new Props());
- if (props == null) {
- // abort by user
- return;
- }
+ props = askQuestions(br, new Props());
+ if (props == null) {
+ // abort by user
+ return;
+ }
+
+ boolean done = false;
+ do {
- boolean done = false;
- do {
-
- System.out.println();
- System.out.print("Do you want to add a child to " + props.getName() + "? (y/N) ");
- String answer = br.readLine();
- answer = answer.toLowerCase(Locale.getDefault());
- if (answer.startsWith("n") || answer.length() == 0)
- done = true;
- else {
- Props child = askQuestions(br, props);
- if (child == null) {
- // abort by user
- return;
+ System.out.println();
+ System.out.print("Do you want to add a child to " + props.getName() + "? (y/N) ");
+ String answer = br.readLine();
+ if (answer==null) {
+ break;
+ }
+ answer = answer.toLowerCase(Locale.getDefault());
+ if (answer.startsWith("n") || answer.length() == 0)
+ done = true;
+ else {
+ Props child = askQuestions(br, props);
+ if (child == null) {
+ // abort by user
+ return;
+ }
+ props.getChildren().add(child);
}
- props.getChildren().add(child);
- }
- } while (!done);
+ } while (!done);
+ } catch (IOException ioe) {
+ System.err.println("Internal error happended: " + ioe.getMessage());
+ } finally {
+ br.close();
+ }
- log.info("\nYou have choosen:\n" + props.toString());
- postprocess(props);
- generate(props);
+ if (props!=null) {
+ log.info("\nYou have chosen:\n" + props.toString());
+ postprocess(props);
+ generate(props);
+ }
System.out.println("Don't forget to ");
System.out.println(" - add your plugin to the parent pom.xml if needed");
@@ -345,11 +357,15 @@ public class PluginGen {
Template templ = config.getTemplate(template + ".ftl");
Writer out = new BufferedWriter(new FileWriter(new File(directory, fileName)));
- Map<String, Props> root = new HashMap<String, Props>();
- root.put("props", props);
- templ.process(root, out);
- out.flush();
- out.close();
+ try {
+ Map<String, Props> root = new HashMap<String, Props>();
+ root.put("props", props);
+ templ.process(root, out);
+ }
+ finally {
+ out.flush();
+ out.close();
+ }
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (TemplateException te) {
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
index a657f42..4034184 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
@@ -87,9 +87,9 @@ public class Props {
private Set<Template> templates = new HashSet<Template>();
- private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();;
+ private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();
- private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();;
+ private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();
private String pluginName;
private String pluginDescription;
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
index 566af60..911ed41 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
@@ -77,7 +77,7 @@ public enum ResourceCategory {
public static ResourceCategory getByAbbrv(char abbrev) {
EnumSet<ResourceCategory> set = EnumSet.allOf(ResourceCategory.class);
for (ResourceCategory cat : set) {
- if (cat.getAbbrev()==abbrev)
+ if (cat.abbrevLetter ==abbrev)
return cat;
}
return null;
commit 2638f279d22aebb3e5ebcad5f7bd17c3d873b33b
Merge: aef5cf2 a13c17d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Aug 11 15:02:32 2010 +0200
Merge branch 'master' into code-smell
commit aef5cf286fc08b16273a54022ecb0f48f19d9b44
Merge: ac90dbd a5187a8
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 18:11:10 2010 +0200
Merge branch 'master' into code-smell
commit ac90dbd66d849db6dc7d4d82e595cf44cf58b5c0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 18:02:45 2010 +0200
Trivial - code formatting.
diff --git a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
index 1821eed..b805ea9 100644
--- a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
+++ b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
@@ -37,27 +37,29 @@ import org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent;
public class SambaServerDiscoveryComponent extends AugeasConfigurationDiscoveryComponent {
- private static final Pattern netBiosNamePattern = Pattern.compile("[\\s]*netbios[\\s]*name[\\s]*=[\\s]*(.*)[\\s]*");
-
- public Set discoverResources(ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException, Exception {
+ private static final Pattern NET_BIOS_NAME_PATTERN = Pattern
+ .compile("[\\s]*netbios[\\s]*name[\\s]*=[\\s]*(.*)[\\s]*");
+
+ public Set discoverResources(ResourceDiscoveryContext resourceDiscoveryContext)
+ throws InvalidPluginConfigurationException, Exception {
Set<DiscoveredResourceDetails> resources = super.discoverResources(resourceDiscoveryContext);
- for (DiscoveredResourceDetails detail : resources){
+ for (DiscoveredResourceDetails detail : resources) {
Configuration config = detail.getPluginConfiguration();
PropertySimple property = (PropertySimple) config.get(AugeasConfigurationComponent.INCLUDE_GLOBS_PROP);
String configFilePath = property.getStringValue();
String resourceName;
-
+
try {
- resourceName = findNetBiosName(configFilePath);
- }catch(Exception e){
- resourceName = resourceDiscoveryContext.getSystemInformation().getHostname();
+ resourceName = findNetBiosName(configFilePath);
+ } catch (Exception e) {
+ resourceName = resourceDiscoveryContext.getSystemInformation().getHostname();
}
detail.setResourceName(resourceName);
}
return resources;
}
-
- private String findNetBiosName(String includeFile) throws Exception{
+
+ private String findNetBiosName(String includeFile) throws Exception {
try {
File file = new File(includeFile);
if (file.exists()) {
@@ -66,21 +68,20 @@ public class SambaServerDiscoveryComponent extends AugeasConfigurationDiscoveryC
try {
String strLine;
while ((strLine = br.readLine()) != null) {
- Matcher m = netBiosNamePattern.matcher(strLine);
+ Matcher m = NET_BIOS_NAME_PATTERN.matcher(strLine);
if (m.matches()) {
String glob = m.group(1);
-
- return glob;
- }
+
+ return glob;
+ }
}
} finally {
StreamUtil.safeClose(br);
}
}
- }
- catch (Exception e) {
- throw new Exception("NetBios name was not found in configuration file "+ includeFile + " cause:",e);
+ } catch (Exception e) {
+ throw new Exception("NetBios name was not found in configuration file " + includeFile + " cause:", e);
}
- throw new Exception("NetBios name was not found in configuration file "+ includeFile);
+ throw new Exception("NetBios name was not found in configuration file " + includeFile);
}
}
commit 892927807a251621668c91bbf18e07e05c8037bd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 18:00:39 2010 +0200
Close the stream.
diff --git a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
index b53c006..1821eed 100644
--- a/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
+++ b/modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaServerDiscoveryComponent.java
@@ -31,6 +31,7 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.core.util.stream.StreamUtil;
import org.rhq.plugins.augeas.AugeasConfigurationComponent;
import org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent;
@@ -62,16 +63,19 @@ public class SambaServerDiscoveryComponent extends AugeasConfigurationDiscoveryC
if (file.exists()) {
FileInputStream fstream = new FileInputStream(file);
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
- String strLine;
- while ((strLine = br.readLine()) != null) {
- Matcher m = netBiosNamePattern.matcher(strLine);
- if (m.matches()) {
- String glob = m.group(1);
-
- return glob;
- }
+ try {
+ String strLine;
+ while ((strLine = br.readLine()) != null) {
+ Matcher m = netBiosNamePattern.matcher(strLine);
+ if (m.matches()) {
+ String glob = m.group(1);
+
+ return glob;
+ }
+ }
+ } finally {
+ StreamUtil.safeClose(br);
}
- br.close();
}
}
catch (Exception e) {
commit e6e41cf77ad3cd48cb50abb74b56952c289fa49c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 17:57:09 2010 +0200
Unnecessarily getting a value twice.
diff --git a/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresUserComponent.java b/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresUserComponent.java
index af3280a..6312c4d 100644
--- a/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresUserComponent.java
+++ b/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresUserComponent.java
@@ -151,7 +151,8 @@ public class PostgresUserComponent implements DatabaseComponent<PostgresServerCo
+ " ";
if (type != UpdateType.DROP) {
- if (config.getSimpleValue("password",null) != null && config.getSimpleValue("password",null).length() != 0) {
+ String password = config.getSimpleValue("password",null);
+ if (password != null && password.length() != 0) {
sql += " WITH PASSWORD '" + config.getSimpleValue("password",null) + "' ";
}
commit 75e16e1459f6e2d7f1725189be63f2439a91ec3a
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 17:56:14 2010 +0200
Make sure to close the JDBC connection.
diff --git a/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresDiscoveryComponent.java b/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresDiscoveryComponent.java
index b02d764..b03327d 100644
--- a/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresDiscoveryComponent.java
+++ b/modules/plugins/postgres/src/main/java/org/rhq/plugins/postgres/PostgresDiscoveryComponent.java
@@ -298,7 +298,12 @@ public class PostgresDiscoveryComponent implements ResourceDiscoveryComponent, M
}
public static List<String> getDatabases(Configuration pluginConfiguration) {
- return getDatabaseNames(pluginConfiguration, getConnection(pluginConfiguration));
+ Connection conn = getConnection(pluginConfiguration);
+ try {
+ return getDatabaseNames(pluginConfiguration, conn);
+ } finally {
+ JDBCUtil.safeClose(conn);
+ }
}
private static List<String> getDatabaseNames(Configuration config, Connection conn) {
commit dfa063dcb426f7ba05cfd3923c603b9d33e4dbf4
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 17:46:45 2010 +0200
Trivial - code formatting.
diff --git a/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java b/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
index 49172bd..91490c0 100644
--- a/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
+++ b/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
@@ -37,27 +37,28 @@ import java.util.regex.Pattern;
public class PostfixServerDiscoveryComponent extends AugeasConfigurationDiscoveryComponent {
- private static final Pattern hostNamePattern = Pattern.compile("[\\s]*myhostname[\\s]*=[\\s]*([^$].*)[\\s]*");
-
- public Set discoverResources(ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException, Exception {
+ private static final Pattern HOSTNAME_PATTERN = Pattern.compile("[\\s]*myhostname[\\s]*=[\\s]*([^$].*)[\\s]*");
+
+ public Set discoverResources(ResourceDiscoveryContext resourceDiscoveryContext)
+ throws InvalidPluginConfigurationException, Exception {
Set<DiscoveredResourceDetails> resources = super.discoverResources(resourceDiscoveryContext);
- for (DiscoveredResourceDetails detail : resources){
+ for (DiscoveredResourceDetails detail : resources) {
Configuration config = detail.getPluginConfiguration();
PropertySimple property = (PropertySimple) config.get(AugeasConfigurationComponent.INCLUDE_GLOBS_PROP);
String configFilePath = property.getStringValue();
String resourceName;
-
+
try {
- resourceName = findHostName(configFilePath);
- }catch(Exception e){
- resourceName = resourceDiscoveryContext.getSystemInformation().getHostname();
+ resourceName = findHostName(configFilePath);
+ } catch (Exception e) {
+ resourceName = resourceDiscoveryContext.getSystemInformation().getHostname();
}
detail.setResourceName(resourceName);
}
return resources;
}
-
- private String findHostName(String includeFile) throws Exception{
+
+ private String findHostName(String includeFile) throws Exception {
try {
File file = new File(includeFile);
if (file.exists()) {
@@ -66,21 +67,20 @@ public class PostfixServerDiscoveryComponent extends AugeasConfigurationDiscover
try {
String strLine;
while ((strLine = br.readLine()) != null) {
- Matcher m = hostNamePattern.matcher(strLine);
+ Matcher m = HOSTNAME_PATTERN.matcher(strLine);
if (m.matches()) {
String glob = m.group(1);
-
- return glob;
- }
+
+ return glob;
+ }
}
} finally {
StreamUtil.safeClose(br);
}
}
- }
- catch (Exception e) {
- throw new Exception("NetBios name was not found in configuration file "+ includeFile + " cause:",e);
+ } catch (Exception e) {
+ throw new Exception("NetBios name was not found in configuration file " + includeFile + " cause:", e);
}
- throw new Exception("NetBios name was not found in configuration file "+ includeFile);
+ throw new Exception("NetBios name was not found in configuration file " + includeFile);
}
}
commit e13bce0c0d7a0d84a6afbfc5c7c04586f306329a
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 17:37:40 2010 +0200
Close the stream.
diff --git a/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java b/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
index 8f26ee0..49172bd 100644
--- a/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
+++ b/modules/plugins/postfix/src/main/java/org/rhq/plugins/postfix/PostfixServerDiscoveryComponent.java
@@ -23,6 +23,7 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.core.util.stream.StreamUtil;
import org.rhq.plugins.augeas.AugeasConfigurationComponent;
import org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent;
@@ -62,16 +63,19 @@ public class PostfixServerDiscoveryComponent extends AugeasConfigurationDiscover
if (file.exists()) {
FileInputStream fstream = new FileInputStream(file);
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
- String strLine;
- while ((strLine = br.readLine()) != null) {
- Matcher m = hostNamePattern.matcher(strLine);
- if (m.matches()) {
- String glob = m.group(1);
-
- return glob;
- }
+ try {
+ String strLine;
+ while ((strLine = br.readLine()) != null) {
+ Matcher m = hostNamePattern.matcher(strLine);
+ if (m.matches()) {
+ String glob = m.group(1);
+
+ return glob;
+ }
+ }
+ } finally {
+ StreamUtil.safeClose(br);
}
- br.close();
}
}
catch (Exception e) {
commit 86b070e80ddf96df954e976613464d7af120a977
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 16:42:19 2010 +0200
Make sure to not fail when close() method of a stream throws an exception.
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
index 08303c8..6bee4b2 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
@@ -26,6 +26,7 @@ import java.io.FileInputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import org.jbpm.graph.exe.ExecutionContext;
+import org.rhq.core.util.stream.StreamUtil;
/**
* @author Jason Dobies
@@ -115,9 +116,7 @@ public class CompareDigestActionHandler extends BaseHandler {
while (in.read(buffer) != -1) {
}
} finally {
- if (in != null) {
- in.close();
- }
+ StreamUtil.safeClose(in);
}
String digest = HandlerUtils.encode(messageDigest.digest());
commit 41a3463a600a4014ed650d96c9fbd604dd4e8ba5
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 16:38:49 2010 +0200
Adding a utility method for safely closing streams.
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java b/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
index e970b83..e84d7d4 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
@@ -25,6 +25,7 @@ package org.rhq.core.util.stream;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
@@ -245,4 +246,19 @@ public class StreamUtil {
return retObject;
}
+
+ /**
+ * Can be used to safely close a stream. No-op if the stream is null.
+ *
+ * @param stream the stream to close or null
+ */
+ public static void safeClose(Closeable stream) {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ LOG.error("Failed to close a stream.", e);
+ }
+ }
+ }
}
\ No newline at end of file
commit fe93c191577091c0f45b11e80d5aba28084f7fb5
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 16:27:43 2010 +0200
Added missing import (how come I missed this?)
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
index 7f6dbae..a3f1963 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
@@ -22,6 +22,7 @@
*/
package com.jboss.jbossnetwork.product.jbpm.handlers;
+import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
commit 0597c8e2ddafd88f7c0c9d2c25f81f1f461739f4
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 15:34:10 2010 +0200
Close the connections in the test code and in the discovery.
diff --git a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
index e3da0aa..f89344a 100644
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlComponent.java
@@ -28,6 +28,7 @@ import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.util.jdbc.JDBCUtil;
import org.rhq.plugins.database.DatabaseComponent;
import java.sql.Connection;
@@ -116,10 +117,11 @@ public class MySqlComponent implements DatabaseComponent, ResourceComponent, Mea
public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
+ Connection conn = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
- Connection conn =
+ conn =
DriverManager.getConnection("jdbc:mysql://192.168.1.5?user=rhqadmin&password=rhqadmin");
DatabaseMetaData dmd = conn.getMetaData();
@@ -149,6 +151,8 @@ public class MySqlComponent implements DatabaseComponent, ResourceComponent, Mea
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
+ } finally {
+ JDBCUtil.safeClose(conn);
}
}
}
diff --git a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
index f50fbc0..ba0ea81 100644
--- a/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
+++ b/modules/plugins/mysql/src/main/java/org/rhq/plugins/mysql/MySqlDiscoveryComponent.java
@@ -28,6 +28,7 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.pluginapi.inventory.ManualAddFacet;
import org.rhq.core.system.ProcessInfo;
+import org.rhq.core.util.jdbc.JDBCUtil;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -99,12 +100,15 @@ public class MySqlDiscoveryComponent implements ResourceDiscoveryComponent, Manu
protected static String getVersion(Configuration config) {
String version = null;
+ Connection conn = null;
try {
- Connection conn = buildConnection(config);
+ conn = buildConnection(config);
version = conn.getMetaData().getDatabaseProductVersion();
} catch (SQLException e) {
// TODO GH: How to put this back to the server while inventorying this resource in an unconfigured state
log.info("Exception detecting mysql instance version", e);
+ } finally {
+ JDBCUtil.safeClose(conn);
}
return version;
}
commit 20460165a99b1f2e92cc6033e7fb3dc158984ef4
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 15:27:11 2010 +0200
Close the connection when done with it during the discovery.
diff --git a/modules/plugins/oracle/src/main/java/org/rhq/plugins/oracle/OracleDiscoveryComponent.java b/modules/plugins/oracle/src/main/java/org/rhq/plugins/oracle/OracleDiscoveryComponent.java
index 2340f0b..79d67fd 100644
--- a/modules/plugins/oracle/src/main/java/org/rhq/plugins/oracle/OracleDiscoveryComponent.java
+++ b/modules/plugins/oracle/src/main/java/org/rhq/plugins/oracle/OracleDiscoveryComponent.java
@@ -35,6 +35,7 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.core.pluginapi.inventory.ManualAddFacet;
import org.rhq.core.system.ProcessInfo;
+import org.rhq.core.util.jdbc.JDBCUtil;
/**
@@ -75,8 +76,10 @@ public class OracleDiscoveryComponent implements ResourceDiscoveryComponent, Man
public DiscoveredResourceDetails discoverResource(Configuration pluginConfig,
ResourceDiscoveryContext resourceDiscoveryContext)
throws InvalidPluginConfigurationException {
+
+ Connection connection = null;
try {
- Connection connection = OracleServerComponent.buildConnection(pluginConfig);
+ connection = OracleServerComponent.buildConnection(pluginConfig);
DatabaseMetaData dbmd = connection.getMetaData();
String version = dbmd.getDatabaseMajorVersion() + "." + dbmd.getDatabaseMinorVersion();
DiscoveredResourceDetails details = createResourceDetails(resourceDiscoveryContext, pluginConfig,
@@ -85,6 +88,8 @@ public class OracleDiscoveryComponent implements ResourceDiscoveryComponent, Man
} catch (Exception e) {
log.warn("Could not connect to oracle with supplied configuration", e);
throw new InvalidPluginConfigurationException("Unable to connect to Oracle",e);
+ } finally {
+ JDBCUtil.safeClose(connection);
}
}
commit cb19eacae48d2e2c0d47b761191dd11ef103c2cd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 14:52:23 2010 +0200
Removing unused obsolete testing code.
diff --git a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISServerDiscoveryComponent.java b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISServerDiscoveryComponent.java
index f4cbceb..4e276a3 100644
--- a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISServerDiscoveryComponent.java
+++ b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISServerDiscoveryComponent.java
@@ -83,8 +83,4 @@ public class IISServerDiscoveryComponent implements ResourceDiscoveryComponent {
return Collections.singleton(details);
}
-
- public static void main(String[] args) throws Exception {
- new IISServerDiscoveryComponent().discoverResources(null);
- }
}
diff --git a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostDiscoveryComponent.java b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostDiscoveryComponent.java
index a6fc8a1..0cd5cd8 100644
--- a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostDiscoveryComponent.java
+++ b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostDiscoveryComponent.java
@@ -93,8 +93,4 @@ public class IISVHostDiscoveryComponent implements ResourceDiscoveryComponent<II
return hostDetails;
}
-
- public static void main(String[] args) throws Exception {
- new IISVHostDiscoveryComponent().discoverResources(null);
- }
}
commit be16929be8cdd15b30d9e2ac98ee6efa2a68cbe0
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 14:51:52 2010 +0200
Preventing NPE in case of invalid plugin configuration.
diff --git a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostComponent.java b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostComponent.java
index 692dbb8..9d264b9 100644
--- a/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostComponent.java
+++ b/modules/plugins/iis/src/main/java/org/rhq/plugins/iis/IISVHostComponent.java
@@ -56,6 +56,10 @@ public class IISVHostComponent implements ResourceComponent<IISServerComponent>,
String logFormat = getResponseTimeLogFormat();
ResponseTimeConfiguration responseTimeConfiguration = getResponseTimeConfiguration();
+ if (logFormat == null) {
+ throw new InvalidPluginConfigurationException("The 'responseTimeLogFormat' property must be specified.");
+ }
+
responseTimeDelegate = new IISResponseTimeDelegate(logDirectory, logFormat, responseTimeConfiguration
/*,collectionTZ.equals("true")*/);
}
commit 4ea9b298ddf1e5bf36567265e040c894d074fa92
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 14:05:31 2010 +0200
Avoid an NPE when the component is not properly configured.
diff --git a/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableComponent.java b/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableComponent.java
index 0c7a5a5..f8ddcd8 100644
--- a/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableComponent.java
+++ b/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableComponent.java
@@ -23,10 +23,14 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
@@ -40,6 +44,8 @@ import org.rhq.core.util.jdbc.JDBCUtil;
public class CustomTableComponent implements DatabaseComponent<DatabaseComponent>, MeasurementFacet {
private ResourceContext<DatabaseComponent> context;
+ private static final Log log = LogFactory.getLog(CustomTableComponent.class);
+
public void start(ResourceContext<DatabaseComponent> resourceContext) throws InvalidPluginConfigurationException,
Exception {
this.context = resourceContext;
@@ -67,7 +73,15 @@ public class CustomTableComponent implements DatabaseComponent<DatabaseComponent
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
String query = this.context.getPluginConfiguration().getSimpleValue("metricQuery", null);
-
+
+ if (query == null) {
+ ResourceType type = this.context.getResourceType();
+ String resourceKey = this.context.getResourceKey();
+ log.info("Resource " + resourceKey + " (" + type.getName() + ", plugin " + type.getPlugin()
+ + "): The plugin configuration doesn't specify 'metricQuery' property. Ignoring the measurement request.");
+ return;
+ }
+
query = CustomTableRowDiscoveryComponent.formatMessage(query, this.context.getPluginConfiguration().getSimpleValue("key",null));
Map<String, Double> values = DatabaseQueryUtility.getNumericQueryValues(this, query);
commit 029f0c7abe2743f33460a4be96e1fc1814cce917
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 12:35:22 2010 +0200
Making sure resource name is specified in the plugin config and that null description doesn't blow up the discovery.
diff --git a/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableRowDiscoveryComponent.java b/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableRowDiscoveryComponent.java
index aaf2e67..4b40d86 100644
--- a/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableRowDiscoveryComponent.java
+++ b/modules/plugins/database/src/main/java/org/rhq/plugins/database/CustomTableRowDiscoveryComponent.java
@@ -53,8 +53,12 @@ public class CustomTableRowDiscoveryComponent implements ResourceDiscoveryCompon
String table = config.getSimpleValue("table", null);
String keyColumn = config.getSimpleValue("keyColumn", null);
String resourceName = config.getSimpleValue("name", null);
- String resourceDescription = config.getSimpleValue("description", null);
+ String resourceDescription = config.getSimpleValue("description", "");
+ if (resourceName == null) {
+ throw new InvalidPluginConfigurationException("The 'name' connection property has to be specified.");
+ }
+
statement = conn.createStatement();
resultSet = statement.executeQuery("SELECT * FROM " + table);
commit cc86e651f9c850356dbfa82a42ee821948440ab8
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 11:54:25 2010 +0200
Make sure to close the stream.
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
index 1f6d9c5..08303c8 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/CompareDigestActionHandler.java
@@ -107,12 +107,19 @@ public class CompareDigestActionHandler extends BaseHandler {
private String calculateDigest() throws Exception {
MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
- DigestInputStream in = new DigestInputStream(new FileInputStream(fileToBeCheckedLocation), messageDigest);
-
- byte[] buffer = new byte[4096];
- while (in.read(buffer) != -1) {
+ DigestInputStream in = null;
+
+ try {
+ in = new DigestInputStream(new FileInputStream(fileToBeCheckedLocation), messageDigest);
+ byte[] buffer = new byte[4096];
+ while (in.read(buffer) != -1) {
+ }
+ } finally {
+ if (in != null) {
+ in.close();
+ }
}
-
+
String digest = HandlerUtils.encode(messageDigest.digest());
return digest;
}
commit 8a9fd618e4f6a47a97da77a23e30437093861610
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 11:40:31 2010 +0200
Fix possible null dereference.
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
index 48a2674..7f6dbae 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/SetProcessStatusActionHandler.java
@@ -37,7 +37,10 @@ public class SetProcessStatusActionHandler implements ActionHandler {
private Boolean status;
public void execute(ExecutionContext executionContext) {
- executionContext.getContextInstance().setVariable("processStatus", status);
+ ContextInstance instance = executionContext.getContextInstance();
+ if (instance != null) {
+ instance.setVariable("processStatus", status);
+ }
}
public Boolean getStatus() {
commit bff8c9db80f86d9696f8ddc57756ee9782d2a8e2
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Aug 10 11:09:49 2010 +0200
Fixing possible null parent path dereference.
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/BackupAndReplaceFileActionHandler.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/BackupAndReplaceFileActionHandler.java
index 00d6a65..da5b5b2 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/BackupAndReplaceFileActionHandler.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/BackupAndReplaceFileActionHandler.java
@@ -155,9 +155,11 @@ public class BackupAndReplaceFileActionHandler extends BaseHandler {
if (!replacementFilename.equalsIgnoreCase(originalFilename)) {
// This file name can't be relative since we need its parent in the next step
HandlerUtils.checkFilenameIsAbsolute(originalFileLocation);
-
- File destinationFile = new File(originalFile.getParentFile().getPath() + File.separator
- + replacementFilename);
+
+ //check that there is a parent
+ File parent = HandlerUtils.checkAndReturnParent(originalFileLocation);
+
+ File destinationFile = new File(parent, replacementFilename);
setDestinationFileLocation(destinationFile.getPath());
// Make sure the newly generated file name isn't going to clash with an existing file
diff --git a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/HandlerUtils.java b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/HandlerUtils.java
index ae5293b..50d802c 100644
--- a/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/HandlerUtils.java
+++ b/modules/common/jboss-as/src/main/java/com/jboss/jbossnetwork/product/jbpm/handlers/HandlerUtils.java
@@ -142,6 +142,15 @@ public class HandlerUtils {
}
}
+ public static File checkAndReturnParent(String filename) throws ActionHandlerException {
+ File parent = getFile(filename).getParentFile();
+ if (parent == null) {
+ throw new ActionHandlerException("Cannot access parent directory of [" + formatPath(filename) + "].");
+ }
+
+ return parent;
+ }
+
private static File getFile(String filename) throws ActionHandlerException {
return new File(filename);
}
12 years, 10 months