grouper-users - RE: [grouper-users] gsh scripting
Subject: Grouper Users - Open Discussion List
List archive
- From: Gagné Sébastien <>
- To: "mohan shamachar" <>, <>
- Subject: RE: [grouper-users] gsh scripting
- Date: Fri, 19 Apr 2013 13:46:26 -0400
- Authentication-results: sfpop-ironport01.merit.edu; dkim=neutral (message not signed) header.i=none
For stems, use the "obliterateStem" GSH command :
https://spaces.internet2.edu/display/Grouper/GrouperShell+(gsh)
For the attributes I'm not sure how you would do it, maybe obliterateStem
will remove them. If you don't have too many you could do it using the lite
ui.
-----Message d'origine-----
De :
[mailto:]
De la part de mohan shamachar
Envoyé : 19 avril 2013 13:42
À :
Objet : [grouper-users] gsh scripting
Hi Chris,
I have used the following script to clean the stems and groups. I tried a
script, in a similar fashion to remove the attributes, using a wildcard (like
folder, remove all permissions assigned to a role, etc), but I couldn't. Any
pointers?
Clean Stems/Groups:
grouperSession = GrouperSession.startRootSession();
stem = StemFinder.findByName(grouperSession, "<folder>"); for(child :
stem.getChildGroups(Stem.Scope.SUB)) {
System.out.println("deleting: " + child.getName()); child.delete(); }
stemList = new ArrayList(stem.getChildStems(Stem.Scope.SUB));
Collections.sort(stemList);
Collections.reverse(stemList);
for(childStem : stemList) { System.out.println("deleting: " +
childStem.getName()); childStem.delete(); } stem.delete();
My attempt to remove attributes in a folder.
for(theAttr :
GrouperDAOFactory.getFactory().getAttributeDef().findByStem("<folder>"))
{
// I like to iterate through the attributes or delete each.
}
similarly... an example to iterate all attributes assigned to a role...
Thank you,
mohan
- [grouper-users] gsh scripting, mohan shamachar, 04/19/2013
- RE: [grouper-users] gsh scripting, Gagné Sébastien, 04/19/2013
- RE: [grouper-users] gsh scripting, Chris Hyzer, 04/19/2013
- Re: RE: [grouper-users] gsh scripting, mohan shamachar, 04/19/2013
- RE: RE: [grouper-users] gsh scripting, Chris Hyzer, 04/19/2013
- RE: [grouper-users] gsh scripting, Gagné Sébastien, 04/19/2013
Archive powered by MHonArc 2.6.16.