public Resolution delete() throws DocumentException, IOException {
    DataProvider dataProvider =
        context.getRepoxManager().getDataProviderManager().getDataProvider(dataProviderId);

    context.getRepoxManager().getDataProviderManager().deleteDataProvider(dataProvider.getId());
    context
        .getMessages()
        .add(new LocalizableMessage("dataProvider.delete.success", dataProvider.getName()));

    return new RedirectResolution("/Homepage.action");
  }
  public Resolution delete() throws DocumentException, IOException {
    DataProvider dataProvider =
        context.getRepoxManager().getDataProviderManager().getDataProvider(dataProviderId);
    DataSource dataSource = dataProvider.getDataSource(dataSourceId);

    context.getRepoxManager().getDataProviderManager().deleteDataSource(dataSource.getId());
    dataProvider.getDataSources().remove(dataSource);
    context
        .getRepoxManager()
        .getDataProviderManager()
        .updateDataProvider(dataProvider, dataProvider.getId());
    context.getMessages().add(new LocalizableMessage("dataSource.delete.success", dataSourceId));

    return new RedirectResolution(
        "/dataProvider/ViewDataProvider.action?dataProviderId="
            + URLEncoder.encode(dataProviderId, "UTF-8"));
  }