public static void createData(CasIdmClient idmClient) throws Exception {
  logger.debug("IdmDataCreator.createData called");
  Validate.notNull(idmClient);
  if (forceCleanup) {
    int i=0;
    String tenantName=ServerConfig.getTenant(i);
    while (tenantName != null) {
      IdmDataRemover.addTenant(tenantName);
      i++;
      tenantName=ServerConfig.getTenant(i);
    }
    try {
      IdmDataRemover.removeData(idmClient);
    }
 catch (    Exception e) {
      logger.debug("Caught exception while removing data {}",e.toString());
    }
    forceCleanup=false;
  }
  int i=0;
  String tenantName=ServerConfig.getTenant(i);
  while (tenantName != null) {
    processTenant(idmClient,tenantName);
    i++;
    tenantName=ServerConfig.getTenant(i);
  }
  String defaultTenant=ServerConfig.getDefaultTenant();
  idmClient.setDefaultTenant(defaultTenant);
}

public static void createData ( CasIdmClient idmClient ) throws Exception { logger . debug ( "IdmDataCreator.createData called" ) ; Validate . notNull ( idmClient ) ; if ( forceCleanup ) { int i = 0 ; String tenantName = ServerConfig . getTenant ( i ) ; while ( tenantName != null ) { IdmDataRemover . addTenant ( tenantName ) ; i ++ ; tenantName = ServerConfig . getTenant ( i ) ; } try { IdmDataRemover . removeData ( idmClient ) ; } catch ( Exception e ) { logger . debug ( "Caught exception while removing data {}" , e . toString ( ) ) ; } forceCleanup = false ; } int i = 0 ; String tenantName = ServerConfig . getTenant ( i ) ; while ( tenantName != null ) { processTenant ( idmClient , tenantName ) ; i ++ ; tenantName = ServerConfig . getTenant ( i ) ; } String defaultTenant = ServerConfig . getDefaultTenant ( ) ; idmClient . setDefaultTenant ( defaultTenant ) ; }
create data ( serverconfig loaded at this point )
