...
See the WIKI for running the Grouper Report manually
External systems
Test all external systems
Code Block |
---|
import java.util.List;
import edu.internet2.middleware.grouper.app.externalSystem.GrouperExternalSystem;
import edu.internet2.middleware.grouper.app.gsh.template.GshTemplateOutput;
import edu.internet2.middleware.grouper.app.gsh.template.GshTemplateV2;
import edu.internet2.middleware.grouper.app.gsh.template.GshTemplateV2input;
import edu.internet2.middleware.grouper.app.gsh.template.GshTemplateV2output;
public class Test77externalSystemTest extends GshTemplateV2 {
@Override
public void gshRunLogic(GshTemplateV2input gshTemplateV2input, GshTemplateV2output gshTemplateV2output) {
GshTemplateOutput gsh_builtin_gshTemplateOutput = gshTemplateV2output.getGsh_builtin_gshTemplateOutput();
gsh_builtin_gshTemplateOutput.assignRedirectToGrouperOperation("NONE");
List<GrouperExternalSystem> grouperExternalSystems = GrouperExternalSystem.retrieveAllGrouperExternalSystems();
for (GrouperExternalSystem grouperExternalSystem : grouperExternalSystems) {
try {
grouperExternalSystem.test();
gsh_builtin_gshTemplateOutput.addOutputLine("Success: extenal system '" + grouperExternalSystem.getConfigId() + "' passed its test");
} catch (Exception e) {
gsh_builtin_gshTemplateOutput.addOutputLine("error", "Error: extenal system '" + grouperExternalSystem.getConfigId() + "' failed: " + e.getMessage());
}
}
}
}
|
Create a script from SQL
Here is an example to remove access from someone... run a SQL to generate a GSH script, e.g. in oracle:
...