edu.internet2.middleware.grouper.misc
Class FindBadMemberships

java.lang.Object
  extended by edu.internet2.middleware.grouper.misc.FindBadMemberships

public class FindBadMemberships
extends Object

Find bad memberships in the Grouper memberships table. This script is used to find bad memberships in Grouper. If a bad membership is found, a GSH script will be created to resolve the issue.

Since:
1.3.1

Field Summary
static StringWriter gshScript
          GSH script to fix membership data
static PrintStream out
           
 
Constructor Summary
FindBadMemberships()
           
 
Method Summary
static long checkAll()
           
static void checkAll(PrintStream printStream)
           
static void checkAndFixGrouperAll()
          GrouperAll shouldn't have manage privileges or be a member of a group.
static long checkComposites()
           
static long checkDeletedGroupAsMember()
           
static long checkGrouperAll()
          GrouperAll shouldn't have manage privileges or be a member of a group
static long checkGroupSets()
          Note that this isn't a complete check of the group set table..
static void clearResults()
          call this before finding bad memberships
static void main(String[] args)
           
static void printErrorsToSTOUT(boolean v)
          Set whether to print errors to STDOUT.
static void writeGshScriptToFile()
          Write GSH script to file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public static PrintStream out

gshScript

public static StringWriter gshScript
GSH script to fix membership data

Constructor Detail

FindBadMemberships

public FindBadMemberships()
Method Detail

clearResults

public static void clearResults()
call this before finding bad memberships


main

public static void main(String[] args)
Parameters:
args -
Since:
1.3.1

checkAll

public static void checkAll(PrintStream printStream)
                     throws SessionException
Parameters:
printStream -
Throws:
SessionException

checkAll

public static long checkAll()
Returns:
count of bad and missing memberships

printErrorsToSTOUT

public static void printErrorsToSTOUT(boolean v)
Set whether to print errors to STDOUT.

Parameters:
v -

checkGroupSets

public static long checkGroupSets()
Note that this isn't a complete check of the group set table..

Returns:
count of bad and missing group sets

checkGrouperAll

public static long checkGrouperAll()
GrouperAll shouldn't have manage privileges or be a member of a group

Returns:
count of bad memberships

checkAndFixGrouperAll

public static void checkAndFixGrouperAll()
GrouperAll shouldn't have manage privileges or be a member of a group. Use this to force a cleanup without outputting a GSH script.


checkComposites

public static long checkComposites()
Returns:
count of bad and missing memberships

checkDeletedGroupAsMember

public static long checkDeletedGroupAsMember()
Returns:
count of bad memberships

writeGshScriptToFile

public static void writeGshScriptToFile()
Write GSH script to file.