private void edit(final DataRetentionRule existingRule) {
        final DataRetentionRulePresenter editRulePresenter = editRulePresenterProvider.get();
        editRulePresenter.read(existingRule);

        final PopupSize popupSize = PopupSize.resizable(800, 600);
        ShowPopupEvent.builder(editRulePresenter)
                .popupType(PopupType.OK_CANCEL_DIALOG)
                .popupSize(popupSize)
                .caption("Edit Rule")
                .onShow(e -> listPresenter.focus())
                .onHideRequest(e -> {
                    if (e.isOk()) {
                        final DataRetentionRule rule = editRulePresenter.write();
                        final int index = visibleRules.indexOf(existingRule);
                        visibleRules.remove(index);
                        visibleRules.add(index, rule);

                        update();
                        // Only mark the policies as dirty if the rule was actually changed.
                        if (!existingRule.equals(rule)) {
                            setDirty(true);
                        }

                        listPresenter.getSelectionModel().setSelected(visibleRules.get(index));
                    }
                    e.hide();
                })
                .fire();
    }
@return The rules created by the users, ignoring the default retain all rule
stroom-core-client/src/main/java/stroom/receive/rules/client/presenter/DataRetentionPolicyPresenter.java