protected void addMethod(UserRequest ureq, AccessMethod method) {
    Offer offer = acService.createOffer(resource, displayName);
    OfferAccess link = acService.createOfferAccess(offer, method);

    removeAsListenerAndDispose(newMethodCtrl);
    AccessMethodHandler handler = acModule.getAccessMethodHandler(link.getMethod().getType());
    if (handler != null) {
      newMethodCtrl = handler.createConfigurationController(ureq, getWindowControl(), link);
    }
    if (newMethodCtrl != null) {
      listenTo(newMethodCtrl);

      String title = handler.getMethodName(getLocale());
      cmc =
          new CloseableModalController(
              getWindowControl(),
              translate("close"),
              newMethodCtrl.getInitialComponent(),
              true,
              title);
      cmc.activate();
      listenTo(cmc);
    } else {
      OfferAccess newLink = acService.saveOfferAccess(link);
      addConfiguration(newLink);
    }
  }