| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.types.DN; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_DELETE_BASE_DN_TITLE.get(); |
| | | } |
| | |
| | | * Returns the no backend found label. |
| | | * @return the no backend found label. |
| | | */ |
| | | protected Message getNoElementsFoundLabel() |
| | | protected LocalizableMessage getNoElementsFoundLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_NO_BASE_DNS_FOUND_LABEL.get(); |
| | | } |
| | |
| | | * Returns the list label. |
| | | * @return the list label. |
| | | */ |
| | | protected Message getListLabel() |
| | | protected LocalizableMessage getListLabel() |
| | | { |
| | | return INFO_CTRL_PANEL_SELECT_BASE_DNS_TO_DELETE.get(); |
| | | } |
| | |
| | | */ |
| | | public void okClicked() |
| | | { |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), getTitle(), getInfo()); |
| | |
| | | } |
| | | if (errors.isEmpty()) |
| | | { |
| | | Message confirmationMessage = getConfirmationMessage(baseDNsToDelete); |
| | | LocalizableMessage confirmationMessage = getConfirmationMessage(baseDNsToDelete); |
| | | if (displayConfirmationDialog( |
| | | INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(), |
| | | confirmationMessage)) |
| | |
| | | } |
| | | } |
| | | |
| | | private Message getConfirmationMessage( |
| | | private LocalizableMessage getConfirmationMessage( |
| | | Collection<BaseDNDescriptor> baseDNsToDelete) |
| | | { |
| | | MessageBuilder mb = new MessageBuilder(); |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | Map<String, Set<BaseDNDescriptor>> hmBackends = |
| | | new HashMap<String, Set<BaseDNDescriptor>>(); |
| | | for (BaseDNDescriptor baseDN : baseDNsToDelete) |