Пример #1
0
 public void run() {
   try {
     working = dataSource.isWorking();
   } catch (Exception e) {
     log.error("Error checking if Data Source " + dataSource.getId() + " is working", e);
     working = false;
   }
 }
  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"));
  }