grouper-users - [grouper-users] RE: grouper UI validation
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Rahul Doshi <>, "" <>
- Subject: [grouper-users] RE: grouper UI validation
- Date: Fri, 26 Jun 2015 15:16:17 +0000
- Accept-language: en-US
Theres two ways to query. Might be best for performance to find the parent stem and look for extensions in that stem String parentFolderName = GrouperUtil.parentStemNameFromName(someName);
Stem parentStem = StemFinder.findByName(grouperSession, parentFolderName,
true);
Group group = HibernateSession.byHqlStatic() .createQuery("select theGroup from Group theGroup " +
"where lower(theGroup.extensionDb) = :theExtension " +
"and theGroup.parentUuid = :stemUuid") .setString("theExtension",
StringUtils.defaultString(GrouperUtil.extensionFromName(someName)).toLowerCase()) .setString("stemUuid",
parentStem.getId()) .uniqueResult(Group.class); Otherwise you can just do a case insensitive search for that full path. If you have performance problems you might need a function based index on lower name Group group = HibernateSession.byHqlStatic() .createQuery("select theGroup from Group theGroup where
lower(theGroup.nameDb) = :theName") .setString("theName",
StringUtils.defaultString(someName).toLowerCase()).uniqueResult(Group.class); From: Rahul Doshi [mailto:]
Folders are ok. I will take a look at hooks.example and will let you know if I am stuck. Thanks, Rahul From:
Chris Hyzer <> You would need a hook to veto conflicts. There are examples in the hooks.examples package or I could write one for you if you like, let me know. Do you want
it to also not allow folders with a group name too (theres an example of that in there but its not case insensitive)? Thanks, Chris From:
[]
On Behalf Of Rahul Doshi Hello, We are moving from case insensitive to case sensitive database and one thing we need to do as part of it is put a validation to avoid creating duplicate group
names. For example users should not be able to create group Apps:TEST and Apps:test. Any suggestions on best way to implement this? Thanks, Rahul |
- [grouper-users] grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/29/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
Archive powered by MHonArc 2.6.16.