|
From: <jt...@hy...> - 2007-03-24 20:32:20
|
Author: jtravis Date: 2007-03-24 12:32:19 -0800 (Sat, 24 Mar 2007) New Revision: 3863 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3863 Modified: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy Log: Add find for groups Modified: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 20:23:30 UTC (rev 3862) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 20:32:19 UTC (rev 3863) @@ -3,6 +3,7 @@ import org.hyperic.util.pager.PageControl import org.hyperic.hq.appdef.shared.AppdefResourceValue +import org.hyperic.hq.appdef.server.session.AppdefGroupManagerEJBImpl import org.hyperic.hq.appdef.server.session.PlatformManagerEJBImpl class ResourceHelper @@ -15,10 +16,14 @@ platformType: [ str: {name -> platMan.findPlatformTypeByName(name)}, int: {id -> platMan.findPlatformTypeValueById(id)}], + group: [ + str: {name -> groupMap.findGroupByName(userVal, name)}, + int: {id -> groupMan.findGroup(userVal, id)}], ] private final ALL_FINDERS = [ - platforms: {platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL)}, + platforms: {platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL)}, + groups: {groupMan.findAllGroups(userVal, PageControl.PAGE_ALL)}, ] ResourceHelper(user) { @@ -26,6 +31,7 @@ } private getPlatMan() { PlatformManagerEJBImpl.one } + private getGroupMan() { AppdefGroupManagerEJBImpl.one } /** * Generic method to find resources. The results are constrained by the |