| | |
| | | * The panel that displays an existing index (it appears on the right of the |
| | | * 'Manage Indexes' dialog). |
| | | */ |
| | | public class IndexPanel extends AbstractIndexPanel |
| | | class IndexPanel extends AbstractIndexPanel |
| | | { |
| | | private static final long serialVersionUID = 1439500626486823366L; |
| | | |
| | |
| | | @Override |
| | | public void okClicked() |
| | | { |
| | | // no-op |
| | | } |
| | | |
| | | /** |
| | |
| | | * selection of the index should be canceled) and <CODE>false</CODE> |
| | | * otherwise. |
| | | */ |
| | | public boolean mustCheckUnsavedChanges() |
| | | boolean mustCheckUnsavedChanges() |
| | | { |
| | | return index != null && |
| | | saveChanges.isVisible() && saveChanges.isEnabled(); |
| | |
| | | * panel, to not save them or simply cancelled the selection change in |
| | | * the tree. |
| | | */ |
| | | public UnsavedChangesDialog.Result checkUnsavedChanges() |
| | | UnsavedChangesDialog.Result checkUnsavedChanges() |
| | | { |
| | | UnsavedChangesDialog.Result result; |
| | | UnsavedChangesDialog unsavedChangesDlg = new UnsavedChangesDialog(Utilities.getParentDialog(this), getInfo()); |
| | |
| | | * @param index |
| | | * the index descriptor to be used to update the panel. |
| | | */ |
| | | public void update(IndexDescriptor index) |
| | | void update(IndexDescriptor index) |
| | | { |
| | | ignoreCheckSave = true; |
| | | setPrimaryValid(lEntryLimit); |
| | |
| | | } |
| | | |
| | | /** The task in charge of modifying the index. */ |
| | | protected class ModifyIndexTask extends Task |
| | | private class ModifyIndexTask extends Task |
| | | { |
| | | private Set<String> backendSet; |
| | | private String attributeName; |
| | | private String backendName; |
| | | private int entryLimitValue; |
| | | private IndexDescriptor indexToModify; |
| | | private SortedSet<IndexType> indexTypes = new TreeSet<>(); |
| | | private final Set<String> backendSet; |
| | | private final String attributeName; |
| | | private final String backendName; |
| | | private final int entryLimitValue; |
| | | private final IndexDescriptor indexToModify; |
| | | private final SortedSet<IndexType> indexTypes; |
| | | private IndexDescriptor modifiedIndex; |
| | | |
| | | /** |
| | |
| | | * @param dlg |
| | | * the progress dialog that shows the progress of the task. |
| | | */ |
| | | public ModifyIndexTask(ControlPanelInfo info, ProgressDialog dlg) |
| | | private ModifyIndexTask(ControlPanelInfo info, ProgressDialog dlg) |
| | | { |
| | | super(info, dlg); |
| | | backendName = index.getBackend().getBackendID(); |
| | |
| | | { |
| | | return getCommandLinePath("dsconfig"); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |