From: <jma...@rh...> - 2009-08-08 09:22:34
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [4818] [RHQ-2312] - remove duplicate types in filter drop-down on resource hub; </title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>4818</dd> <dt>Author</dt> <dd>jmarques</dd> <dt>Date</dt> <dd>2009-08-08 04:22:23 -0500 (Sat, 08 Aug 2009)</dd> </dl> <h3>Log Message</h3> <pre>[RHQ-2312] - remove duplicate types in filter drop-down on resource hub; </pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainpluginPluginjava">rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java</a></li> <li><a href="#rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainresourceResourcejava">rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java</a></li> <li><a href="#rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainresourceResourceTypejava">rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java</a></li> <li><a href="#rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainutilStringUtilsjava">rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/StringUtils.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiactionnavigationhubNavigationHubPortalActionjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/action/navigation/hub/NavigationHubPortalAction.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcehubHubFormjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/HubForm.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcehubResourceHubPortalActionjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/ResourceHubPortalAction.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationresourceResourceSelectUIBeanjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappjsfunctionsjs">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/js/functions.js</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappresourcehubResourceHubjsp">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/resource/hub/ResourceHub.jsp</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappfilteredWEBINFclassesApplicationResourcesproperties">rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiwebdavwarsrcmainjavaorgrhqguiwebdavRootFolderjava">rhq/trunk/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceTypeManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceTypeManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourcemetadataResourceMetadataManagerBeanjava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBean.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourcemetadataResourceMetadataManagerLocaljava">rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerLocal.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseserverjarsrctestjavaorgrhqenterpriseserverresourcetestResourceStorageTestjava">rhq/trunk/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/test/ResourceStorageTest.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainpluginPluginjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/plugin/Plugin.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -94,7 +94,29 @@ </span><span class="cx"> + " p.path = :path, " // + " p.md5 = :md5, " // + " p.mtime = :mtime " // </span><span class="rem">- + " WHERE p.id = :id") }) </span><span class="add">+ + " WHERE p.id = :id"), + + // this query does not load the content blob, but loads everything else + @NamedQuery(name = Plugin.QUERY_FIND_BY_RESOURCE_TYPE_AND_CATEGORY, query = "" // + + " SELECT new org.rhq.core.domain.plugin.Plugin( " // + + " p.id, " // + + " p.name, " // + + " p.path, " // + + " p.displayName, " // + + " p.enabled, " // + + " p.description, " // + + " p.help, " // + + " p.md5, " // + + " p.version, " // + + " p.ctime, " // + + " p.mtime) " // + + " FROM Plugin p " // + + " WHERE p.name IN ( SELECT rt.plugin " // + + " FROM Resource res " // + + " JOIN res.resourceType rt " // + + " WHERE ( rt.category = :resourceCategory OR :resourceCategory IS NULL ) " // + + " AND ( rt.name = :resourceTypeName OR :resourceTypeName IS NULL ) ) " // + + "ORDER BY p.name") }) </span><span class="cx"> @SequenceGenerator(name = "SEQ", sequenceName = "RHQ_PLUGIN_ID_SEQ") @Table(name = Plugin.TABLE_NAME) public class Plugin implements Serializable { </span><span class="lines">@@ -102,6 +124,7 @@ </span><span class="cx"> public static final String TABLE_NAME = "RHQ_PLUGIN"; </span><span class="add">+ public static final String QUERY_FIND_BY_RESOURCE_TYPE_AND_CATEGORY = "Plugin.findByResourceType"; </span><span class="cx"> public static final String QUERY_FIND_ALL = "Plugin.findAll"; public static final String QUERY_FIND_BY_NAME = "Plugin.findByName"; public static final String UPDATE_ALL_BUT_CONTENT = "Plugin.updateAllButContent"; </span></pre></div> <a id="rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainresourceResourcejava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -589,7 +589,8 @@ </span><span class="cx"> + "WHERE res.id IN (SELECT rr.id FROM Resource rr JOIN rr.implicitGroups g JOIN g.roles r JOIN r.subjects s WHERE s = :subject)" + " AND (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_FIND_COMPOSITE_WITH_PARENT, query = "" // </span><span class="lines">@@ -610,7 +611,8 @@ </span><span class="cx"> + "WHERE res.id IN (SELECT rr.id FROM Resource rr JOIN rr.implicitGroups g JOIN g.roles r JOIN r.subjects s WHERE s = :subject)" + " AND (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_FIND_COMPOSITE_COUNT, query = "SELECT count(res) " // </span><span class="lines">@@ -618,7 +620,8 @@ </span><span class="cx"> + " WHERE res.id IN (SELECT rr.id FROM Resource rr JOIN rr.implicitGroups g JOIN g.roles r JOIN r.subjects s WHERE s = :subject)" + " AND (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_FIND_COMPOSITE_ADMIN, query = "" // </span><span class="lines">@@ -627,7 +630,8 @@ </span><span class="cx"> + " LEFT JOIN res.currentAvailability a " // + " WHERE (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_FIND_COMPOSITE_WITH_PARENT_ADMIN, query = "" // </span><span class="lines">@@ -639,7 +643,8 @@ </span><span class="cx"> + " LEFT JOIN res.currentAvailability a " // + " WHERE (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_FIND_COMPOSITE_COUNT_ADMIN, query = "" // </span><span class="lines">@@ -647,7 +652,8 @@ </span><span class="cx"> + " FROM Resource res " // + " WHERE (:category = res.resourceType.category OR :category is null) " // + " AND (:parentResource = res.parentResource OR :parentResource is null)" // </span><span class="rem">- + " AND (:resourceType = res.resourceType OR :resourceType is null) " // </span><span class="add">+ + " AND (:resourceTypeName = res.resourceType.name OR :resourceTypeName is null) " // + + " AND (:pluginName = res.resourceType.plugin OR :pluginName is null) " // </span><span class="cx"> + " AND (res.inventoryStatus = :inventoryStatus OR :inventoryStatus is null) " // + " AND (UPPER(res.name) LIKE :search OR UPPER(res.description) LIKE :search OR :search is null) "), @NamedQuery(name = Resource.QUERY_GET_STATUSES_BY_PARENT, query = "" // </span></pre></div> <a id="rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainresourceResourceTypejava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -113,14 +113,18 @@ </span><span class="cx"> @NamedQuery(name = ResourceType.QUERY_FIND_BY_CATEGORY, query = "SELECT rt FROM ResourceType AS rt " + "WHERE rt.category = :category"), @NamedQuery(name = ResourceType.QUERY_FIND_UTILIZED_BY_CATEGORY, query = "SELECT DISTINCT res.resourceType " </span><span class="rem">- + "FROM Resource res, IN (res.implicitGroups) g, IN (g.roles) r, IN (r.subjects) s " + "WHERE s = :subject " </span><span class="add">+ + "FROM Resource res, IN (res.implicitGroups) g, IN (g.roles) r, IN (r.subjects) s " // + + "WHERE s = :subject " // </span><span class="cx"> + "AND res.resourceType.category = :category " + "AND (UPPER(res.name) LIKE :nameFilter OR :nameFilter is null) " </span><span class="add">+ + "AND (res.resourceType.plugin = :pluginName OR :pluginName is null) " </span><span class="cx"> + "AND (:inventoryStatus = res.inventoryStatus OR :inventoryStatus is null) " + "ORDER BY res.resourceType.name "), @NamedQuery(name = ResourceType.QUERY_FIND_UTILIZED_BY_CATEGORY_admin, query = "SELECT DISTINCT res.resourceType " </span><span class="rem">- + "FROM Resource res " + "WHERE res.resourceType.category = :category " </span><span class="add">+ + "FROM Resource res " // + + "WHERE res.resourceType.category = :category " </span><span class="cx"> + "AND (UPPER(res.name) LIKE :nameFilter OR :nameFilter is null) " </span><span class="add">+ + "AND (res.resourceType.plugin = :pluginName OR :pluginName is null) " </span><span class="cx"> + "AND (:inventoryStatus = res.inventoryStatus OR :inventoryStatus is null) " + "ORDER BY res.resourceType.name " </span></pre></div> <a id="rhqtrunkmodulescoredomainsrcmainjavaorgrhqcoredomainutilStringUtilsjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/StringUtils.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/StringUtils.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/core/domain/src/main/java/org/rhq/core/domain/util/StringUtils.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -1,25 +1,25 @@ </span><span class="rem">- /* - * 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. - */ </span><span class="add">+/* + * 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. + */ </span><span class="cx"> package org.rhq.core.domain.util; import java.util.ArrayList; </span><span class="lines">@@ -92,7 +92,6 @@ </span><span class="cx"> return results; } </span><span class="rem">- @SuppressWarnings("unchecked") </span><span class="cx"> public static String getListAsString(List<String> stringList, String seperatorFragment) { StringBuilder builder = new StringBuilder(); for (String element : stringList) { </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiactionnavigationhubNavigationHubPortalActionjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/action/navigation/hub/NavigationHubPortalAction.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/action/navigation/hub/NavigationHubPortalAction.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/action/navigation/hub/NavigationHubPortalAction.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -20,6 +20,7 @@ </span><span class="cx"> import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; </span><span class="add">+ </span><span class="cx"> import org.rhq.enterprise.gui.legacy.Portal; import org.rhq.enterprise.gui.legacy.action.resource.hub.ResourceHubPortalAction; </span><span class="lines">@@ -97,7 +98,6 @@ </span><span class="cx"> * ApplicationResource.properties // e.g. resource.navigation.JBossEntityEJBs.filter * hubForm.addTypeFirst(createMenuLabel(request, hubForm.getCategoryName() + ".filter", ""));}*/ </span><span class="rem">- @Override </span><span class="cx"> protected Portal createPortal() { Portal portal = Portal.createPortal("resource.hub.ResourceHubTitle", ".navigation.hub"); return portal; </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcehubHubFormjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/HubForm.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/HubForm.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/HubForm.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -44,9 +44,11 @@ </span><span class="cx"> * indicates the group's resource type. */ protected String resourceType; </span><span class="add">+ protected String plugin; </span><span class="cx"> protected List<LabelValueBean> functions; protected List<LabelValueBean> types; </span><span class="add">+ protected List<LabelValueBean> plugins; </span><span class="cx"> protected String keywords; protected String[] resources; </span><span class="lines">@@ -64,6 +66,14 @@ </span><span class="cx"> this.resourceType = resourceType; } </span><span class="add">+ public String getPlugin() { + return plugin; + } + + public void setPlugin(String plugin) { + this.plugin = plugin; + } + </span><span class="cx"> public List<LabelValueBean> getFunctions() { return this.functions; } </span><span class="lines">@@ -102,6 +112,22 @@ </span><span class="cx"> } } </span><span class="add">+ public List<LabelValueBean> getPlugins() { + return this.plugins; + } + + public void setPlugins(List<LabelValueBean> plugins) { + this.plugins = plugins; + } + + public void addPlugin(LabelValueBean plugin) { + if (this.plugins == null) { + this.plugins = new ArrayList<LabelValueBean>(); + } + + this.plugins.add(plugin); + } + </span><span class="cx"> public void setKeywords(String keywords) { this.keywords = keywords; } </span><span class="lines">@@ -142,8 +168,11 @@ </span><span class="cx"> @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(super.toString()); </span><span class="rem">- stringBuilder.append(" resourceType=").append(resourceType).append(" functions=").append(functions).append( - " types=").append(types).append(" view=").append(view); </span><span class="add">+ stringBuilder.append(" resourceType=").append(resourceType); + stringBuilder.append(" plugin=").append(plugin); + stringBuilder.append(" functions=").append(functions); + stringBuilder.append(" types=").append(types); + stringBuilder.append(" view=").append(view); </span><span class="cx"> stringBuilder.append(" resources="); if (resources != null) { for (int i = 0; i < resources.length; i++) { </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcehubResourceHubPortalActionjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/ResourceHubPortalAction.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/ResourceHubPortalAction.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/hub/ResourceHubPortalAction.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -35,10 +35,9 @@ </span><span class="cx"> import org.jetbrains.annotations.NotNull; import org.rhq.core.domain.auth.Subject; </span><span class="add">+import org.rhq.core.domain.plugin.Plugin; </span><span class="cx"> import org.rhq.core.domain.resource.ResourceCategory; </span><span class="rem">-import org.rhq.core.domain.resource.ResourceType; </span><span class="cx"> import org.rhq.core.domain.resource.composite.ResourceComposite; </span><span class="rem">-import org.rhq.core.domain.util.PageControl; </span><span class="cx"> import org.rhq.core.domain.util.PageList; import org.rhq.enterprise.gui.legacy.Constants; import org.rhq.enterprise.gui.legacy.Portal; </span><span class="lines">@@ -50,8 +49,6 @@ </span><span class="cx"> import org.rhq.enterprise.gui.legacy.util.SessionUtils; import org.rhq.enterprise.gui.util.WebUtility; import org.rhq.enterprise.server.resource.InventorySummary; </span><span class="rem">-import org.rhq.enterprise.server.resource.ResourceBossLocal; -import org.rhq.enterprise.server.resource.ResourceManagerLocal; </span><span class="cx"> import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal; import org.rhq.enterprise.server.util.LookupUtil; </span><span class="lines">@@ -62,19 +59,22 @@ </span><span class="cx"> */ public class ResourceHubPortalAction extends BaseAction { public static final int SELECTOR_GROUP_COMPAT = 1; </span><span class="rem">- </span><span class="cx"> public static final int SELECTOR_GROUP_ADHOC = 2; private static final String DEFAULT_RESOURCE_CATEGORY = ResourceCategory.PLATFORM.name(); </span><span class="rem">- </span><span class="cx"> private static final String DEFAULT_RESOURCE_NAME = null; </span><span class="rem">- </span><span class="cx"> private static final String HIERARCHY_SEPARATOR = " > "; </span><span class="add">+ private static final String ALL_RESOURCE_TYPES = null; + private static final String ALL_PLUGINS = null; </span><span class="cx"> </span><span class="rem">- private static final ResourceType ALL_RESOURCE_TYPES = null; - </span><span class="cx"> protected Log log = LogFactory.getLog(ResourceHubPortalAction.class.getName()); </span><span class="add">+ private MessageResources messages; + + private ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager(); + + private static String CHARSET = "UTF-16"; + </span><span class="cx"> // ---------------------------------------------------- Public Methods /** </span><span class="lines">@@ -83,15 +83,11 @@ </span><span class="cx"> @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { </span><span class="add">+ messages = getResources(request); </span><span class="cx"> ResourceHubForm hubForm = (ResourceHubForm) form; org.rhq.core.domain.util.PageControl pageControl = WebUtility.getPageControl(request); Subject subject = RequestUtils.getSubject(request); </span><span class="rem">- //ControlBoss controlBoss = ContextUtils.getControlBoss(context); // TODO: Get rid of this. - ResourceBossLocal resourceBoss = LookupUtil.getResourceBoss(); - ResourceManagerLocal resourceManager = LookupUtil.getResourceManager(); - ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager(); - </span><span class="cx"> HttpSession session = request.getSession(); WebUser user = SessionUtils.getWebUser(request.getSession()); </span><span class="lines">@@ -101,10 +97,9 @@ </span><span class="cx"> // Find resources specified by category and potentially type. // Collect query params and replace invalid ones with defaults. String resourceName = getResourceName(request, hubForm); </span><span class="rem">- ResourceType resourceType = ALL_RESOURCE_TYPES; </span><span class="add">+ String resourceType = ALL_RESOURCE_TYPES; </span><span class="cx"> if ((hubForm.getResourceType() != null) && !hubForm.getResourceType().trim().equals("")) { </span><span class="rem">- resourceType = resourceTypeManager - .getResourceTypeById(subject, Integer.parseInt(hubForm.getResourceType())); </span><span class="add">+ resourceType = decode(hubForm.getResourceType()); </span><span class="cx"> } if ((hubForm.getResourceCategory() == null) || hubForm.getResourceCategory().equals("")) { </span><span class="lines">@@ -112,28 +107,33 @@ </span><span class="cx"> } ResourceCategory resourceCategory = ResourceCategory.valueOf(hubForm.getResourceCategory()); </span><span class="rem">- PageList<ResourceComposite> resources = getResources(hubForm, subject, resourceManager, resourceCategory, - resourceType, resourceName, pageControl); </span><span class="add">+ String pluginName = ALL_PLUGINS; + if ((hubForm.getPlugin() != null) && !hubForm.getPlugin().trim().equals("")) { + pluginName = decode(hubForm.getPlugin()); + } + PageList<ResourceComposite> resources = LookupUtil.getResourceManager().findResourceComposites(subject, + resourceCategory, resourceType, pluginName, null, hubForm.getKeywords(), true, pageControl); </span><span class="cx"> request.setAttribute(Constants.ALL_RESOURCES_ATTR, resources); </span><span class="rem">- initResourceTypesPulldownMenu(request, hubForm, subject, resourceTypeManager, resourceCategory, resourceName); </span><span class="add">+ initResourceTypesAndPluginsPulldownMenu(hubForm, subject, resourceCategory, resourceName, resourceType, + pluginName); </span><span class="cx"> request.setAttribute(Constants.ALL_RESOURCES_CONTROLLABLE, new ArrayList()); </span><span class="rem">- initInventorySummary(subject, request, resourceBoss); </span><span class="add">+ initInventorySummary(subject, request); </span><span class="cx"> SessionUtils.resetReturnPath(request.getSession()); </span><span class="rem">- Portal portal = createPortal(); - request.setAttribute(Constants.PORTAL_KEY, portal); </span><span class="add">+ request.setAttribute(Constants.PORTAL_KEY, Portal + .createPortal("resource.hub.ResourceHubTitle", ".resource.hub")); </span><span class="cx"> String navHierarchy = buildResourceNavHierarchy(resourceCategory, resourceType); request.setAttribute(Constants.INVENTORY_HIERARCHY_ATTR, navHierarchy); return returnSuccess(request, mapping); } </span><span class="rem">- private String buildResourceNavHierarchy(ResourceCategory resourceCategory, ResourceType resourceType) { </span><span class="add">+ private String buildResourceNavHierarchy(ResourceCategory resourceCategory, String resourceTypeName) { </span><span class="cx"> String navHierarchy; // Start the navHierarchy with the resource category. navHierarchy = StringUtil.toUpperCaseAt(resourceCategory.toString(), 0) + "s" + HIERARCHY_SEPARATOR; </span><span class="rem">- if (resourceType != null) { - navHierarchy += getResourceTypeDisplayName(resourceType); </span><span class="add">+ if (resourceTypeName != null) { + navHierarchy += resourceTypeName; </span><span class="cx"> } else { navHierarchy += "All " + StringUtil.toUpperCaseAt(resourceCategory.toString(), 0) + "s"; } </span><span class="lines">@@ -141,16 +141,15 @@ </span><span class="cx"> return navHierarchy; } </span><span class="rem">- private void initInventorySummary(Subject user, HttpServletRequest request, ResourceBossLocal resourceBoss) </span><span class="add">+ private void initInventorySummary(Subject user, HttpServletRequest request) </span><span class="cx"> throws org.rhq.enterprise.server.auth.SessionNotFoundException, org.rhq.enterprise.server.auth.SessionTimeoutException, java.rmi.RemoteException { </span><span class="rem">- InventorySummary summary = resourceBoss.getInventorySummary(user); </span><span class="add">+ InventorySummary summary = LookupUtil.getResourceBoss().getInventorySummary(user); </span><span class="cx"> request.setAttribute(Constants.RESOURCE_SUMMARY_ATTR, summary); } private String getResourceName(HttpServletRequest request, ResourceHubForm hubForm) { </span><span class="rem">- MessageResources res = getResources(request); - String jsInserted = res.getMessage("resource.hub.search.KeywordSearchText"); </span><span class="add">+ String jsInserted = messages.getMessage("resource.hub.search.KeywordSearchText"); </span><span class="cx"> String resourceName = hubForm.getKeywords(); if ((resourceName != null) && (resourceName.equals("") || resourceName.equals(jsInserted))) { resourceName = DEFAULT_RESOURCE_NAME; </span><span class="lines">@@ -160,37 +159,26 @@ </span><span class="cx"> return resourceName; } </span><span class="rem">- protected Portal createPortal() { - Portal portal = Portal.createPortal("resource.hub.ResourceHubTitle", ".resource.hub"); - return portal; - } - - protected PageList<ResourceComposite> getResources(ResourceHubForm hubForm, Subject subject, - ResourceManagerLocal resourceManager, ResourceCategory resourceCategory, ResourceType resourceType, - String nameFilter, PageControl pageControl) throws Exception { - if (log.isTraceEnabled()) { - log.trace("Finding all resources with category [" + resourceCategory + "] and resource type [" - + resourceType + "] and resource name [" + nameFilter + "]..."); </span><span class="add">+ protected void initResourceTypesAndPluginsPulldownMenu(ResourceHubForm hubForm, Subject subject, + ResourceCategory resourceCategory, String nameFilter, String typeName, String pluginName) throws Exception { + // Set the first entry in the menu to the label "All <ResourceCategory> Types". + hubForm.addType(buildResourceTypeMenuCategoryLabel(resourceCategory)); + List<String> resourceTypeNames = resourceTypeManager.getUtilizedResourceTypeNamesByCategory(subject, + resourceCategory, nameFilter, pluginName); + for (String resourceTypeName : resourceTypeNames) { + hubForm.addType(new LabelValueBean(resourceTypeName, encode(resourceTypeName))); </span><span class="cx"> } </span><span class="rem">- return resourceManager.findResourceComposites(subject, resourceCategory, resourceType, null, hubForm - .getKeywords(), true, pageControl); </span><span class="add">+ // Set the first entry in the menu to the label "All Plugins Types" + hubForm.addPlugin(new LabelValueBean(messages.getMessage("resource.hub.filter.AllPlugins"), "")); + List<Plugin> plugins = LookupUtil.getResourceMetadataManager().getPluginsByResourceTypeAndCategory(typeName, + resourceCategory); + for (Plugin plugin : plugins) { + hubForm.addPlugin(new LabelValueBean(plugin.getDisplayName(), encode(plugin.getName()))); + } </span><span class="cx"> } </span><span class="rem">- protected void initResourceTypesPulldownMenu(HttpServletRequest request, ResourceHubForm hubForm, Subject subject, - ResourceTypeManagerLocal resourceTypeManager, ResourceCategory resourceCategory, String nameFilter) - throws Exception { - // Set the first entry in the menu to the label "All <ResourceCategory> Types". - hubForm.addType(buildResourceTypeMenuCategoryLabel(request, resourceCategory)); - List<ResourceType> resourceTypes = resourceTypeManager.getUtilizedResourceTypesByCategory(subject, - resourceCategory, nameFilter); - - //Set<ResourceType> resourceTypes = getResourceTypesRepresentedByResources(resources); - addTypeMenuItems(hubForm, resourceTypes); - } - - protected LabelValueBean buildResourceTypeMenuCategoryLabel(HttpServletRequest request, - @NotNull ResourceCategory resourceCategory) { </span><span class="add">+ protected LabelValueBean buildResourceTypeMenuCategoryLabel(@NotNull ResourceCategory resourceCategory) { </span><span class="cx"> String key = null; switch (resourceCategory) { case PLATFORM: { </span><span class="lines">@@ -209,26 +197,15 @@ </span><span class="cx"> } } </span><span class="rem">- LabelValueBean menuLabel = createMenuLabel(request, key, ""); </span><span class="add">+ LabelValueBean menuLabel = new LabelValueBean(messages.getMessage(key), ""); </span><span class="cx"> return menuLabel; } </span><span class="rem">- protected LabelValueBean createMenuLabel(HttpServletRequest req, String key, String value) { - MessageResources messages = getResources(req); - return new LabelValueBean(messages.getMessage(key), value); </span><span class="add">+ private String encode(String parameter) { + return parameter.replaceAll(" ", "_"); </span><span class="cx"> } </span><span class="rem">- protected void addTypeMenuItems(ResourceHubForm hubForm, List<ResourceType> resourceTypes) { - for (ResourceType resourceType : resourceTypes) { - String typeDisplayName = getResourceTypeDisplayName(resourceType); - hubForm.addType(new LabelValueBean(typeDisplayName, Integer.toString(resourceType.getId()))); - } </span><span class="add">+ private String decode(String parameter) { + return parameter.replaceAll("_", " "); </span><span class="cx"> } </span><span class="rem">- - private String getResourceTypeDisplayName(ResourceType resourceType) { - // TODO: Type display name should probably also include ancestor server/service type names. - // (e.g. "JBoss Datasource" rather than simply "Datasource" to distinguish a JBoss datasource from a - // WebLogic datasource) - return resourceType.getName(); - } </span><span class="cx"> } \ No newline at end of file </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguinavigationresourceResourceSelectUIBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -18,22 +18,21 @@ </span><span class="cx"> */ package org.rhq.enterprise.gui.navigation.resource; </span><span class="add">+import java.util.ArrayList; +import java.util.List; + </span><span class="cx"> import org.rhq.core.domain.resource.Resource; import org.rhq.core.domain.resource.composite.ResourceComposite; import org.rhq.core.domain.util.PageControl; </span><span class="add">+import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility; </span><span class="cx"> import org.rhq.enterprise.server.resource.ResourceManagerLocal; import org.rhq.enterprise.server.util.LookupUtil; </span><span class="rem">-import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility; </span><span class="cx"> </span><span class="rem">-import java.util.List; -import java.util.ArrayList; - </span><span class="cx"> /** * @author Greg Hinkle */ public class ResourceSelectUIBean { </span><span class="rem">- </span><span class="cx"> private Resource resource; private ResourceManagerLocal resourceManager = LookupUtil.getResourceManager(); </span><span class="lines">@@ -57,20 +56,14 @@ </span><span class="cx"> } public List<ResourceComposite> autocomplete(Object suggest) { </span><span class="rem">- String pref = (String)suggest; </span><span class="add">+ String pref = (String) suggest; </span><span class="cx"> ArrayList<ResourceComposite> result; PageControl pc = new PageControl(); pc.setPageSize(50); </span><span class="rem">- result = resourceManager.findResourceComposites( - EnterpriseFacesContextUtility.getSubject(), - null, - null, - null, - pref, - true, - pc); </span><span class="add">+ result = resourceManager.findResourceComposites(EnterpriseFacesContextUtility.getSubject(), null, null, null, + null, pref, true, pc); </span><span class="cx"> return result; } </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappjsfunctionsjs"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/js/functions.js (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/js/functions.js 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/js/functions.js 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -264,7 +264,7 @@ </span><span class="cx"> var newParam = param + "=" + e.options[e.selectedIndex].value; var newUrl; </span><span class="rem">- var reg = new RegExp("" + param + "=[a-zA-Z0-9]+"); </span><span class="add">+ var reg = new RegExp("" + param + "=[a-zA-Z0-9_]+"); </span><span class="cx"> if ( reg.test(base) ) { </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappresourcehubResourceHubjsp"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/resource/hub/ResourceHub.jsp (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/resource/hub/ResourceHub.jsp 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp/resource/hub/ResourceHub.jsp 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -56,6 +56,7 @@ </span><span class="cx"> </c:when> </c:choose> </span><span class="add">+<fmt:message var="pluginTH" key="resource.hub.PluginTH"/> </span><span class="cx"> <c:url var="resourceTypeAction" value="/ResourceHub.do"> <c:if test="${not empty param.keywords}"> </span><span class="lines">@@ -73,6 +74,9 @@ </span><span class="cx"> <c:if test="${not empty param.resourceType}"> <c:param name="resourceType" value="${param.resourceType}"/> </c:if> </span><span class="add">+ <c:if test="${not empty param.plugin}"> + <c:param name="plugin" value="${param.plugin}"/> + </c:if> </span><span class="cx"> <c:param name="resourceCategory" value="${ResourceHubForm.resourceCategory}"/> <c:param name="view" value="${ResourceHubForm.view}"/> </c:url> </span><span class="lines">@@ -179,12 +183,12 @@ </span><span class="cx"> <!-- FILTER TOOLBAR CONTENTS --> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> </span><span class="rem">- <td class="FilterLine" colspan="2"> </span><span class="add">+ <td class="FilterLine" colspan="3"> </span><span class="cx"> <html:img page="/images/spacer.gif" width="1" height="1" border="0"/> </td> </tr> <tr> </span><span class="rem">- <td class="FilterLabelText" nowrap align="right"> </span><span class="add">+ <td class="FilterLabelText" nowrap="nowrap" align="right"> </span><span class="cx"> <c:choose> <c:when test="${ResourceHubForm.types == null}"> <html:hidden property="resourceType" value=""/> </span><span class="lines">@@ -193,7 +197,7 @@ </span><span class="cx"> <c:otherwise> <fmt:message key="Filter.ViewLabel"/> </td> </span><span class="rem">- <td class="FilterLabelText" width="100%"> </span><span class="add">+ <td class="FilterLabelText"> </span><span class="cx"> <html:select property="resourceType" styleClass="FilterFormText" size="1" onchange="goToSelectLocation(this, 'resourceType', '${resourceTypeAction}');"> <html:optionsCollection property="types"/> </span><span class="lines">@@ -201,6 +205,20 @@ </span><span class="cx"> </c:otherwise> </c:choose> </td> </span><span class="add">+ <td class="FilterLabelText" width="100%"> + <c:choose> + <c:when test="${ResourceHubForm.plugins == null}"> + <html:hidden property="plugin" value=""/> + &nbsp; + </c:when> + <c:otherwise> + <html:select property="plugin" styleClass="FilterFormText" size="1" + onchange="goToSelectLocation(this, 'plugin', '${resourceTypeAction}');"> + <html:optionsCollection property="plugins"/> + </html:select> + </c:otherwise> + </c:choose> + </td> </span><span class="cx"> <c:url var="viewAction" value="/ResourceHub.do"> <c:if test="${not empty param.keywords}"> </span><span class="lines">@@ -218,6 +236,9 @@ </span><span class="cx"> <c:if test="${not empty param.resourceType}"> <c:param name="resourceType" value="${param.resourceType}"/> </c:if> </span><span class="add">+ <c:if test="${not empty param.plugin}"> + <c:param name="plugin" value="${param.plugin}"/> + </c:if> </span><span class="cx"> <c:param name="resourceCategory" value="${ResourceHubForm.resourceCategory}"/> </c:url> </span><span class="lines">@@ -234,6 +255,9 @@ </span><span class="cx"> <c:if test="${not empty param.resourceType}"> <c:param name="resourceType" value="${param.resourceType}"/> </c:if> </span><span class="add">+ <c:if test="${not empty param.plugin}"> + <c:param name="plugin" value="${param.plugin}"/> + </c:if> </span><span class="cx"> <c:if test="${not empty param.ps}"> <c:param name="ps" value="${param.ps}"/> </c:if> </span><span class="lines">@@ -274,8 +298,10 @@ </span><span class="cx"> </c:if> <c:if test="${not empty resourceTypeTH}"> </span><span class="rem">- <display:column width="25%" property="resource.resourceType.name" </span><span class="add">+ <display:column width="15%" property="resource.resourceType.name" </span><span class="cx"> title="${resourceTypeTH}" isLocalizedTitle="false" sortAttr="res.resourceType.name"/> </span><span class="add">+ <display:column width="10%" property="resource.resourceType.plugin" + title="${pluginTH}" isLocalizedTitle="false" sortAttr="res.resourceType.plugin"/> </span><span class="cx"> </c:if> <display:column width="30%" property="resource.description" title="common.header.Description" sortAttr="res.description"/> </span><span class="lines">@@ -297,6 +323,9 @@ </span><span class="cx"> <c:if test="${not empty param.resourceType}"> <c:param name="resourceType" value="${param.resourceType}"/> </c:if> </span><span class="add">+ <c:if test="${not empty param.plugin}"> + <c:param name="plugin" value="${param.plugin}"/> + </c:if> </span><span class="cx"> <c:param name="resourceCategory" value="${param.resourceCategory}"/> <c:if test="${not empty param.so}"> </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainwebappfilteredWEBINFclassesApplicationResourcesproperties"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -941,6 +941,7 @@ </span><span class="cx"> resource.hub.filter.compatibleGroups=Compatible Groups resource.hub.filter.mixedGroups=Mixed Groups resource.hub.filter.groupDefinitions=Group Definitions </span><span class="add">+resource.hub.filter.AllPlugins=All Plugin Types </span><span class="cx"> resource.hub.filter.AllPlatformTypes=All Platform Types resource.hub.filter.AllServerTypes=All Server Types resource.hub.filter.AllServiceTypes=All Service Types </span><span class="lines">@@ -955,6 +956,7 @@ </span><span class="cx"> resource.hub.PlatformTypeTH=Platform Type resource.hub.ServerTypeTH=Server Type resource.hub.ServiceTypeTH=Service Type </span><span class="add">+resource.hub.PluginTH=Plugin </span><span class="cx"> resource.hub.PlatformServiceTypeTH=Platform Service Type resource.hub.GroupTypeTH=Group Type </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiwebdavwarsrcmainjavaorgrhqguiwebdavRootFolderjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/gui/webdav-war/src/main/java/org/rhq/gui/webdav/RootFolder.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -104,7 +104,7 @@ </span><span class="cx"> ResourceManagerLocal rm = LookupUtil.getResourceManager(); List<ResourceComposite> foundRoots = rm.findResourceComposites(subject, ResourceCategory.PLATFORM, null, </span><span class="rem">- null, null, true, PageControl.getUnlimitedInstance()); </span><span class="add">+ null, null, null, true, PageControl.getUnlimitedInstance()); </span><span class="cx"> if (foundRoots != null) { this.roots = new ArrayList<ResourceFolder>(foundRoots.size()); </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerBeanjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (4817 => 4818)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java 2009-08-08 06:45:11 UTC (rev 4817) +++ rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java 2009-08-08 09:22:23 UTC (rev 4818) </span><span class="lines">@@ -797,7 +797,9 @@ </span><span class="cx"> parentResource = getResourceById(user, parentResourceId); } </span><span class="rem">- return findResourceComposites(user, category, type, parentResource, searchString, false, pageControl); </span><span class="add">+ String typeNameFilter = type == null ? null : type.getName(); + return findResourceComposites(user, category, typeNameFilter, null, parentResource, searchString, false, + pageControl); </span><span class="cx"> } /** </span><span class="lines">@@ -815,8 +817,8 @@ </span><span class="cx"> * @return */ @SuppressWarnings("unchecked") </span><span class="rem">- public PageList<ResourceComposite> findResourceComposites(Subject user, ResourceCategory category, - ResourceType type, Resource parentResource, String searchString, boolean attachParentResource, </span><span class="add">+ public PageList<ResourceComposite> findResourceComposites(Subject user, ResourceCategory category, String typeName, + String pluginName, Resource parentResource, String searchString, boolean attachParentResource, </span><span class="cx"> PageControl pageControl) { pageControl.initDefaultOrderingField("res.name"); pageControl.addDefaultOrderingField("res.id"); </span><span class="lines">@@ -852,8 +854,10 @@ </span><span class="cx"> query.setParameter("category", category); queryCount.setParameter("category", category); </span><span class="rem">- query.setParameter("resourceType", type); - queryCount.setParameter("resourceType", type); </span><span class="add">+ query.setParameter("resourceTypeName", typeName); + queryCount.setParameter("resourceTypeName", typeName); + query.setParameter("pluginName", pluginName); + queryCount.setParameter("pluginName", pluginName); </span><span class="cx"> query.setParameter("search", searchString); queryCount.setParameter("search", searchString); query.setParameter("inventoryStatus", InventoryStatus.COMMITTED); </span><span class="lines">@@ -890,7 +894,8 @@ </span><span class="cx"> } } </span><span class="rem">- return findResourceComposites(user, category, resourceType, parentResource, null, false, pageControl); </span><span class="add">+ String typeNameFilter = resourceType == null ? null : resourceType.getName(); + return findResourceComposites(user, category, typeNameFilter, null, parentResource, null, false, pageControl); </span><span class="cx"> } @SuppressWarnings("unchecked") </span></pre></div> <a id="rhqtrunkmodulesenterpriseserverjarsrcmainjavaorgrhqenterpriseserverresourceResourceManagerLocaljava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.j... [truncated message content] |