Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 368505 Details for
Bug 534378
Remote Client - Remote API
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
resourcemanager-29-jun.patch
resourcemanager-29-jun.patch (text/plain), 2.90 KB, created by
Noam
on 2009-07-01 14:36:00 UTC
(
hide
)
Description:
resourcemanager-29-jun.patch
Filename:
MIME Type:
Creator:
Noam
Created:
2009-07-01 14:36:00 UTC
Size:
2.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P rhq >Index: modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java >=================================================================== >--- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (revision 4234) >+++ modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (working copy) >@@ -101,6 +101,7 @@ > import org.rhq.core.domain.util.PageControl; > import org.rhq.core.domain.util.PageList; > import org.rhq.core.domain.util.PersistenceUtility; >+import org.rhq.core.domain.util.QueryGenerator; > import org.rhq.core.util.collection.ArrayUtils; > import org.rhq.enterprise.server.RHQConstants; > import org.rhq.enterprise.server.agentclient.AgentClient; >@@ -2014,10 +2015,27 @@ > return result; > } > >- // THIS IS A TEMPORARY IMPL, THE REAL IMPL WILL USE THE QUERY GENERATOR > public PageList<Resource> findResources(Subject sessionSubject, Resource criteria, PageControl pc) > throws FetchException { > >+ try { >+ QueryGenerator qg = new QueryGenerator(criteria, pc.getOptionalData(), pc); >+ String query_name = qg.getQueryString(); >+ >+ Query query_count = PersistenceUtility.createCountQuery(entityManager, query_name); >+ Query query = PersistenceUtility.createQueryWithOrderBy(entityManager, query_name, pc); >+ query_count = qg.getQuery(query_count); >+ query = qg.getQuery(query); >+ >+ long total_count = (Long) query_count.getSingleResult(); >+ List<Resource> resources = query.getResultList(); >+ >+ return new PageList<Resource>(resources, (int) total_count, pc); >+ } catch (Exception e1) { >+ throw new FetchException(e1.getMessage()); >+ } >+ >+ /* > PageList<ResourceComposite> pl; > List<Resource> resourceList; > >@@ -2048,18 +2066,17 @@ > } > > return new PageList<Resource>(resourceList, pl.getTotalSize(), pc); >+ */ > } > > // THIS IS A TEMPORARY IMPL, THE REAL IMPL WILL USE THE QUERY GENERATOR > public PageList<Resource> findResourceChildren(Subject sessionSubject, int resourceId, Resource criteria, > PageControl pc) throws FetchException { > >- try { >- Resource resource = entityManager.find(Resource.class, resourceId); >- return this.getChildResources(sessionSubject, resource, pc); >- } catch (Exception e) { >- throw new FetchException(e); >- } >+ Resource resource = entityManager.find(Resource.class, resourceId); >+ >+ criteria.setParentResource(resource); >+ return findResources(sessionSubject, criteria, pc); > } > > public void uninventoryResources(Subject sessionSubject, int[] resourceIds) throws DeleteException {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 534378
:
368504
| 368505