/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* The panel that appears when the user wants to verify an index.
*/
{
/** Constructor of the panel. */
public VerifyIndexPanel()
{
super();
createLayout();
}
{
info.addIndexModifiedListener(this);
}
{
}
{
}
/** Creates the layout of the panel (but the contents are not populated here). */
private void createLayout()
{
{
{
}
});
lNoBaseDNsFound.setVisible(false);
verifyIndexContents = Utilities.createRadioButton(INFO_CTRL_PANEL_VERIFY_ENTRY_CONTEXT_ARE_INDEXES.get());
verifyIndexContents.setSelected(true);
JLabel explanation = Utilities.createInlineHelpLabel(INFO_CTRL_PANEL_REQUIRES_REBUILD_LEGEND.get());
verifyKeyEntryIDs.setSelected(true);
model = new DefaultComboBoxModel();
verifyIndexContents.setSelected(true);
listener = new ItemListener()
{
{
}
};
}
{
}
{
return baseDNs;
}
{
}
{
{
public void run()
{
{
}
else
{
}
{
}
else
{
}
}
});
}
public void cancelClicked()
{
super.cancelClicked();
}
public void okClicked()
{
{
{
}
else
{
}
}
if (verifyIndexContents.isSelected())
{
{
}
}
else
{
{
}
}
{
new ProgressDialog(Utilities.createFrame(), Utilities.getParentDialog(this), getTitle(), getInfo());
{
}
{
progressDialog.setVisible(true);
}
}
{
}
}
{
}
{
}
{
}
private void updateVerifyKeyEntriesComboBox()
{
{
{
{
if (index instanceof IndexDescriptor)
{
if (standardIndex.isDatabaseIndex())
{
}
else
{
}
}
else
{
}
}
}
}
}
{
{
{
}
}
}
/** The task in charge of verifying the index. */
{
/**
* The constructor of the task.
*
* @param info
* the control panel info.
* @param dlg
* the progress dialog that shows the progress of the task.
*/
{
this.baseDN = getSelectedBaseDN();
}
{
return Type.VERIFY_INDEXES;
}
{
}
public boolean canLaunch(Task taskToBeLaunched, Collection<LocalizableMessage> incompatibilityReasons)
{
boolean canLaunch = true;
{
// All the operations are incompatible if they apply to this backend.
{
canLaunch = false;
}
}
return canLaunch;
}
public void runTask()
{
try
{
}
catch (Throwable t)
{
lastException = t;
}
}
{
if (verifyIndexContents.isSelected())
{
{
}
}
else
{
}
return args;
}
{
if (index instanceof VLVIndexDescriptor)
{
}
}
{
return getCommandLinePath("verify-index");
}
}
}