/*
* 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-2010 Sun Microsystems, Inc.
*/
/**
* Abstract class used to refactor some code used by the import LDIF and export
* LDIF panels.
*
*/
{
/**
* The DNs to exclude.
*/
/**
* The attributes to exclude.
*/
/**
* The exclusion filter.
*/
/**
* The DNs to include.
*/
/**
* The attributes to include.
*/
/**
* The inclusion filter.
*/
/**
* The DNs to include.
*/
/**
* The attributes to include.
*/
/**
* The inclusion filter label.
*/
/**
* The DNs to exclude label.
*/
/**
* The attributes to exclude label.
*/
/**
* The exclusion filter label.
*/
/**
* {@inheritDoc}
*/
public void cancelClicked()
{
super.cancelClicked();
}
/**
* A commodity method that layouts a set of components.
* @param extraComponentLabels the labels.
* @param extraComponents the components.
* @return the panel containing the labels and the components.
*/
final JLabel[] extraComponentLabels,
final Component[] extraComponents)
{
int labelInsetLeft = 15;
final BasicExpander expander =
{
/**
* {@inheritDoc}
*/
public void stateChanged(ChangeEvent e)
{
}
};
expander.setSelected(false);
return panel;
}
/**
* A commodity method that layouts a set of components.
* @param extraComponentLabels the labels.
* @param extraComponents the components.
* @return the panel containing the labels and the components.
*/
final JLabel[] extraComponentLabels,
final Component[] extraComponents)
{
int labelInsetLeft = 15;
final BasicExpander expander =
{
/**
* {@inheritDoc}
*/
public void stateChanged(ChangeEvent e)
{
}
};
expander.setSelected(false);
return panel;
}
{
{
if (extraComponentLabels[i] == null)
{
}
else
{
}
}
}
{
{
{
}
}
{
}
}
/**
* Updates a list of errors in the include and exclude subpanels.
* @param errors the list of errors to be updated.
* @param backendName the name of the backend where the operation associated
* with the panel applies (used to generate the error messages).
*/
{
}
{
boolean validDn = true;
{
{
{
validDn = false;
}
else
{
if (backendName != null)
{
{
{
backend = b;
break;
}
}
}
{
boolean found = false;
{
try
{
{
found = true;
break;
}
}
catch (Throwable t)
{
// Bug
t.printStackTrace();
}
}
if (!found)
{
dnArray[i], backendName));
}
}
}
}
}
if (!validDn)
{
}
s = attributes.getText();
boolean validAttributes = true;
{
{
{
attributeArray[i]));
validAttributes = false;
}
}
}
if (!validAttributes)
{
}
{
try
{
LDAPFilter.decode(s);
}
catch (LDAPException le)
{
}
}
}
/**
* Abstract class that provides some methods that can be used to generate the
* equivalent command-line arguments for some of the things that are contained
*
*/
{
/**
* The constructor of the task.
* @param info the control panel info.
* @param dlg the progress dialog that shows the progress of the task.
*/
{
}
/**
* Returns the command line arguments corresponding to the elements
* @return the command line arguments corresponding to the elements
*/
{
{
{
}
}
s = attributesToInclude.getText();
{
{
}
}
s = inclusionFilter.getText();
{
}
s = dnsToExclude.getText();
{
{
}
}
s = attributesToExclude.getText();
{
{
}
}
s = exclusionFilter.getText();
{
}
return args;
}
}
}