/**
   * @see
   *     com.alfaariss.oa.api.IComponent#start(com.alfaariss.oa.api.configuration.IConfigurationManager,
   *     org.w3c.dom.Element)
   */
  public void start(IConfigurationManager oConfigurationManager, Element eConfig)
      throws OAException {
    try {
      // read organizations config
      Element eOrganizations = oConfigurationManager.getSection(eConfig, "idps");
      if (eOrganizations == null) {
        _logger.error(
            "No 'idps' section found in 'method' section in configuration from SAML authentication method");
        throw new OAException(SystemErrors.ERROR_CONFIG_READ);
      }

      IIDPStorage idpStorage = createStorage(oConfigurationManager, eOrganizations);
      idpStorage.start(oConfigurationManager, eOrganizations);

      IDPStorageManager idpStorageManager = Engine.getInstance().getIDPStorageManager();
      if (idpStorageManager.existStorage(idpStorage.getID())) {
        _logger.error("Storage not unique: " + idpStorage.getID());
        throw new OAException(SystemErrors.ERROR_INIT);
      }
      idpStorageManager.addStorage(idpStorage);

      // to start the super class, first an organization storage must be created
      super.start(oConfigurationManager, eConfig, idpStorage);

      if (_bIsEnabled) {
        String sFallback = _configurationManager.getParam(eOrganizations, "fallback");
        if (sFallback != null) {
          if (sFallback.equalsIgnoreCase("TRUE")) _bEnableFallback = true;
          else if (!sFallback.equalsIgnoreCase("FALSE")) {
            _logger.error(
                "Unknown value in 'fallback' configuration item (in organizations): " + sFallback);
            throw new OAException(SystemErrors.ERROR_CONFIG_READ);
          }

          _logger.debug("Optional organization fallback set to " + _bEnableFallback);
        }

        _profileWebBrowserSSO = new WebBrowserSSOProfile();
        _profileWebBrowserSSO.init(
            _configurationManager,
            eConfig,
            SAML2Exchange.getEntityDescriptor(_sLinkedIDPProfile),
            _idMapper,
            _organizationStorage,
            _sMethodId,
            _sLinkedIDPProfile,
            _conditionsWindow,
            _oAuthnInstantWindow,
            _oRemoteSAMLUserProvisioningProfile);
      }
    } catch (OAException e) {
      throw e;
    } catch (Exception e) {
      _logger.fatal("Internal error during start", e);
      throw new OAException(SystemErrors.ERROR_INTERNAL);
    }
  }
  /** @see com.alfaariss.oa.authentication.remote.saml2.BaseSAML2AuthenticationMethod#stop() */
  public void stop() {
    if (_profileWebBrowserSSO != null) _profileWebBrowserSSO.destroy();

    if (_mRemoteIDPLists != null) _mRemoteIDPLists.clear();

    if (_organizationStorage != null) {
      Engine.getInstance().getIDPStorageManager().removeStorage(_organizationStorage.getID());
      _organizationStorage.stop();
    }

    super.stop();
  }