private static void add_group_to_tenants(String groupName,String description,Collection<String> tenants) throws Exception {
  CasIdmClient client=new CasIdmClient(HOSTNAME);
  if (tenants.isEmpty()) {
    tenants=client.getAllTenants();
  }
  GroupDetail detail=new GroupDetail(description);
  for (  String tenantName : tenants) {
    try {
      client.addGroup(tenantName,groupName,detail);
    }
 catch (    InvalidPrincipalException e) {
    }
  }
}

private static void add_group_to_tenants ( String groupName , String description , Collection < String > tenants ) throws Exception { CasIdmClient client = new CasIdmClient ( HOSTNAME ) ; if ( tenants . isEmpty ( ) ) { tenants = client . getAllTenants ( ) ; } GroupDetail detail = new GroupDetail ( description ) ; for ( String tenantName : tenants ) { try { client . addGroup ( tenantName , groupName , detail ) ; } catch ( InvalidPrincipalException e ) { } } }
add a group to a collection of tenants . if the list of tenants is empty , applies this change to all tenants
