AbstractVLVIndexPanel.java revision 9e82f3d205d5756d6cc6a400dc92e07c078862d6
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * CDDL HEADER START
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * The contents of this file are subject to the terms of the
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * Common Development and Distribution License, Version 1.0 only
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * (the "License"). You may not use this file except in compliance
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * with the License.
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * or http://forgerock.org/license/CDDLv1.0.html.
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * See the License for the specific language governing permissions
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * and limitations under the License.
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * When distributing Covered Code, include this CDDL HEADER in each
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * file and include the License file at legal-notices/CDDLv1_0.txt.
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * If applicable, add the following below this CDDL HEADER, with the
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * fields enclosed by brackets "[]" replaced with your own identifying
ce2e2c2c7126b18ccfce0fe69a3bfa2eafea68b7Quentin CASTEL * information:
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * Portions Copyright [yyyy] [name of copyright owner]
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * CDDL HEADER END
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * Copyright 2008-2010 Sun Microsystems, Inc.
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * Portions Copyright 2014-2015 ForgeRock AS
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTELimport static org.opends.guitools.controlpanel.util.Utilities.*;
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTELimport static org.opends.messages.AdminToolMessages.*;
protected final TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, LocalizableMessage.EMPTY);
private final JLabel lName = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_NAME_LABEL.get());
private final JLabel lBaseDN = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_BASE_DN_LABEL.get());
private final JLabel lSearchScope = createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_SEARCH_SCOPE_LABEL.get());
private final JLabel lFilter = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_FILTER_LABEL.get());
private final JLabel lSortOrder = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_SORT_ORDER_LABEL.get());
private final JLabel lMaxBlockSize = createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_MAX_BLOCK_SIZE_LABEL.get());
protected final JRadioButton baseObject = createRadioButton(INFO_CTRL_PANEL_VLV_INDEX_BASE_OBJECT_LABEL.get());
protected final JRadioButton singleLevel = createRadioButton(INFO_CTRL_PANEL_VLV_INDEX_SINGLE_LEVEL_LABEL.get());
private final JButton add = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_ADD_BUTTON_LABEL.get());
private final JButton moveUp = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_MOVE_UP_BUTTON_LABEL.get());
private final JButton moveDown = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_MOVE_DOWN_BUTTON_LABEL.get());
protected final JButton remove = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_REMOVE_BUTTON_LABEL.get());
private final JLabel[] labels = { lName, lBaseDN, lSearchScope, lFilter, lSortOrder, lBackend, lMaxBlockSize };
private final LocalizableMessage STANDARD_ATTRIBUTES = INFO_CTRL_PANEL_STANDARD_ATTRIBUTES_LABEL.get();
private final TreeSet<String> configurationAttrNames = new TreeSet<String>(new LowerCaseComparator());
final String dn = Utilities.getRDNString("ds-cfg-backend-id", backendName.getText()) + ",cn=Backends,cn=config";
return sortOrder;
if (s.isAscending())
final boolean[] repack = { false };
final boolean[] error = { false };
LinkedHashSet<CategorizedComboBoxElement> newElements = new LinkedHashSet<CategorizedComboBoxElement>();
synchronized (standardAttrNames)
newElements.add(new CategorizedComboBoxElement(CUSTOM_ATTRIBUTES, CategorizedComboBoxElement.Type.CATEGORY));
newElements.add(new CategorizedComboBoxElement(STANDARD_ATTRIBUTES, CategorizedComboBoxElement.Type.CATEGORY));
updateErrorPane(errorPane, ERR_CTRL_PANEL_SCHEMA_NOT_FOUND_SUMMARY.get(), ColorAndFontConstants.errorTitleFont,
public void run()
Utilities.centerGoldenMean(Utilities.getParentDialog(AbstractVLVIndexPanel.this), relativeComponent);
protected boolean checkIndexRequired()
catch (Throwable t)
case AND:
case OR:
case NOT:
IndexTypeDescriptor.ORDERING, IndexTypeDescriptor.PRESENCE, IndexTypeDescriptor.APPROXIMATE, null };
INFO_CTRL_PANEL_VLV_INDEX_PRESENCE_TYPE.get(), INFO_CTRL_PANEL_VLV_INDEX_APPROXIMATE_TYPE.get(), null };
indexTypeNames[i]));
return null;
catch (Throwable t)
setPrimaryValid(l);
if (checkName)
return errors;
return null;
if (nameReadOnly)
if (nameReadOnly)
p.setOpaque(false);
p.setOpaque(false);
DefaultComboBoxModel model = new DefaultComboBoxModel(new Object[] { COMBO_SEPARATOR, OTHER_BASE_DN });
JLabel inlineHelp = Utilities.createInlineHelpLabel(INFO_CTRL_PANEL_SUBTREE_INLINE_HELP_LABEL.get());
newIndex = j;
newIndex = j;
synchronized (standardAttrNames)
boolean dealingWithCustom = true;
dealingWithCustom = false;
if (isCustom)
Dimension d =