AbstractVLVIndexPanel.java revision 55c9e7bd9ea802475e0d4fdaad7caa22f1671dda
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * CDDL HEADER START
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * The contents of this file are subject to the terms of the
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * Common Development and Distribution License, Version 1.0 only
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * (the "License"). You may not use this file except in compliance
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * with the License.
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * or http://forgerock.org/license/CDDLv1.0.html.
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * See the License for the specific language governing permissions
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * and limitations under the License.
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin CASTEL * When distributing Covered Code, include this CDDL HEADER in each
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin 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
5e89746cb5bec21d15a044ce89cfcdbf99d3d49dQuentin 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.messages.AdminToolMessages.*;
protected TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, LocalizableMessage.EMPTY);
protected JLabel lBaseDN = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_BASE_DN_LABEL.get());
protected JLabel lSearchScope = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_SEARCH_SCOPE_LABEL.get());
protected JLabel lFilter = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_FILTER_LABEL.get());
protected JLabel lSortOrder = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_SORT_ORDER_LABEL.get());
protected JLabel lMaxBlockSize = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_VLV_INDEX_MAX_BLOCK_SIZE_LABEL.get());
protected JRadioButton baseObject = Utilities.createRadioButton(INFO_CTRL_PANEL_VLV_INDEX_BASE_OBJECT_LABEL.get());
protected JRadioButton singleLevel = Utilities.createRadioButton(INFO_CTRL_PANEL_VLV_INDEX_SINGLE_LEVEL_LABEL.get());
protected JButton moveUp = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_MOVE_UP_BUTTON_LABEL.get());
protected JButton moveDown = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_MOVE_DOWN_BUTTON_LABEL.get());
protected JButton remove = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_REMOVE_BUTTON_LABEL.get());
protected JLabel[] labels = { lName, lBaseDN, lSearchScope, lFilter, lSortOrder, lBackend, lMaxBlockSize };
private int defaultVLVEntryLimitValue;
protected final int MIN_MAX_BLOCK_SIZE = LocalDBVLVIndexCfgDefn.getInstance().getMaxBlockSizePropertyDefinition()
.getLowerLimit();
final String dn = Utilities.getRDNString("ds-cfg-backend-id", backendName.getText()) + ",cn=Backends,cn=config";
return scope;
return sortOrder;
if (s.isAscending())
final boolean[] repack = { false };
final boolean[] error = { false };
LinkedHashSet<CategorizedComboBoxElement> newElements = new LinkedHashSet<CategorizedComboBoxElement>();
synchronized (standardAttrNames)
boolean defined = false;
defined = true;
if (!defined)
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()
boolean confirm = true;
confirm =
catch (Throwable t)
return confirm;
case AND:
case OR:
case NOT:
INFO_CTRL_PANEL_VLV_INDEX_PRESENCE_TYPE.get(), INFO_CTRL_PANEL_VLV_INDEX_APPROXIMATE_TYPE.get(), null };
indexTypeNames[i]));
index = i;
return index;
catch (Throwable t)
setPrimaryValid(l);
if (checkName)
errors.add(ERR_CTRL_PANEL_INVALID_MAX_BLOCK_SIZE_FOR_VLV_PROVIDED.get(MIN_MAX_BLOCK_SIZE, MAX_MAX_BLOCK_SIZE));
catch (Throwable t)
errors.add(ERR_CTRL_PANEL_INVALID_MAX_BLOCK_SIZE_FOR_VLV_PROVIDED.get(MIN_MAX_BLOCK_SIZE, MAX_MAX_BLOCK_SIZE));
return errors;
backend = b;
return backend;
return null;
if (o != null)
return attrName;
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 =