Class FindBadMemberships

java.lang.Object
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 Details

    • out

      public static PrintStream out
    • gshScript

      public static StringWriter gshScript
      GSH script to fix membership data
  • Constructor Details

    • FindBadMemberships

      public FindBadMemberships()
  • Method Details

    • 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.