Hi Evelina,
Such methods already exist in GroupService. I have just added and
committed access to theses in RightsManager plugin api. I created sub
api because root api contains too many methods so the new ones are, in
Velocity :
$xwiki.rightsmanager.userApi.countAllGlobalUsers()
$xwiki.rightsmanager.userApi.countAllLocalUsers()
$xwiki.rightsmanager.userApi.countAllMatchedGlobalUsers(Map)
$xwiki.rightsmanager.userApi.countAllMatchedLocalUsers(Map)
$xwiki.rightsmanager.userApi.countAllMatchedUsers(Map)
$xwiki.rightsmanager.userApi.countAllMatchedWikiUsers(String, Map)
$xwiki.rightsmanager.userApi.countAllUsers()
$xwiki.rightsmanager.userApi.countAllWikiUsers(String)
$xwiki.rightsmanager.groupApi.countAllGlobalGroups()
$xwiki.rightsmanager.groupApi.countAllGroups()
$xwiki.rightsmanager.groupApi.countAllLocalGroups()
$xwiki.rightsmanager.groupApi.countAllMatchedGlobalGroups(Map)
$xwiki.rightsmanager.groupApi.countAllMatchedGroups(Map)
$xwiki.rightsmanager.groupApi.countAllMatchedLocalGroups(Map)
$xwiki.rightsmanager.groupApi.countAllMatchedWikiGroups(String, Map)
$xwiki.rightsmanager.groupApi.countAllWikiGroups(String)
Same Map format that getAll*User and getAll*Groups methods.
$xwiki.rightsmanager.countAllGroups()
$xwiki.rightsmanager.countAllUsers()
etc. are now deprecated.
If you don't use it anymore I will clean the api.
2007/10/27, evelina.slatineanu <evely24(a)yahoo.com>om>:
Hi all,
My status about rights management: ready and working :)
There are 2 small problems:
1. currently I tested with 10.000 random generate users and it works
slowly because I need some new methods in the RM API to count the number
of returned rows (because I currently used something like:
#set( $users = $rm.getAllMatchedGlobalUsers( $filterMap, $limit, $off,
$orderList ) )
#set( $countUsers = $rm.getAllMatchedGlobalUsers( $filterMap ).size() )
so for count I just take ALL the users from the database and then apply
size() which is killing, I know :P )
- so, Thomas, I will need the following methods:
getAllMatchedLocalGroupsCount(filters) or
countAllMatchedLocalGroups(filters) (to keep the name from the other
methods)
getAllMatchedGlobalGroupsCount(filters)
getAllMatchedLocalUsersCount(filters)
getAllMatchedGlobalUsersCount(filters)
getAllMatchedUsersCount(filters)
getAllMatchedGroupsCount(filters)
getAllMembersNamesForGroup(name)
getAllGroupsForMember(name)
(...without the nb, start parameters)
I then tested with the count put manually and it worked extremely well
(400 ms for 10.000 users this including all: database query, transfer,
javascript and dom processing - this on my personal laptop which has
limited capabilities :D ; like it is right now (with .size() ) it would
be 19 sec for 10.000! so a lot more :D ) so the count will improve the
ajax loading very much.
2. I need the suggest patch applyed :D I will make the patch for 1.1 (I
already apply it on the core and is working fine ) but someone has to
commit it ( I done it for GSOC for trunks 1.2)
I just have to put some css to make it look prettier (some images and
some alignment, nothing complicated :) )
So the lightbox is working fine, the rights are working fine, the
loading will be quickly if I have this methods....And that's all for now
because my mail is already long :))
Thanks.
Evelina
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne