code: public void defineApplication(ApplicationDefinition appDef) {
          checkServiceState();
          Tenant tenant = TenantService.instance().getDefaultTenant();
          defineApplication(tenant, appDef);
      }
docs: Create the application with the given name in the default tenant. If the given
  application already exists, the request is treated as an application update. If the
  update is successfully validated, its schema is stored in the database, and the
  appropriate storage service is notified to implement required physical database
  changes, if any.
  
  @param appDef    {@link ApplicationDefinition} of application to create or update.
  Note that appDef is updated with the "Tenant" option.