Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Any Grouper API method can be directly invoked just by referencing it, inclusive of the class in which it is defined. Methods return a java object which can be stored in a variable. For example, the following gsh session determines all of the groups to which a given subject belongs:

No Format
gsh 0% GrouperSession.startRootSession();
gsh 0% subj = findSubject("SD00125")
subject: id='SD00125' type='person' source='kitn-person' name='Barton, Tom'
gsh 1% sess = GrouperSession.start(subj)
edu.internet2.middleware.grouper.GrouperSession: 29c40f97-9fb0-4e45-88bc-a14877a6c9b5,'SD00125','person'
gsh 2% member = MemberFinder.findBySubject(sess, subj)
member: id='SD00125' type='person' source='kitn-person' uuid='d0fa765e-1439-4701-89b1-9b08b4ce9daa'
gsh 3% member.getGroups()
group: name='etc:sysadmingroup' displayName='Grouper Administration:SysAdmin Group' uuid='6f77fb36-b466-481a-84a7-7af609f1ad09'

...

 For more information, see Unresolvable Subject Deletion Utility (USDU)

subject=SubjectFinder.findById("GrouperSystem")

Command

Description


 session= GrouperSession.startstartRootSession(subject);
 usdu()

Sample call to find all unresolvable subjects in the registry and print details to the screen

usdu(usdu.DELETE)

Pass in that you want to delete memberships in the usdu call

usduBySource("schoolperson")

Work only in a specific subject source, pass in the sourceId from sources.xml

usduBySource("schoolperson", usdu.DELETE)

Work in a specific source and delete membeships

subject=SubjectFinder.findById("GrouperSystem")
 session=GrouperSession.start(subject)"
 memberSubject=SubjectFinder.findById("1234567")
 member=MemberFinder.findBySubject(session,memberSubject)
 usduByMember(member)

Work only with a specific member

usduByMember(member, usdu.DELETE)

usdu by member, and delete memberships

...