/*
* 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
* 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
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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 2009-2010 Sun Microsystems, Inc.
* Portions Copyright 2012 ForgeRock AS
*/
/**
* The panel used to duplicate an entry.
*
*/
{
/**
* Default constructor.
*
*/
public DuplicateEntryPanel()
{
super();
createLayout();
}
/**
* {@inheritDoc}
*/
{
return name;
}
/**
* {@inheritDoc}
*/
public boolean requiresScroll()
{
return true;
}
/**
* {@inheritDoc}
*/
{
throw new IllegalArgumentException("this method must not be called");
}
/**
* Sets the entry to be duplicated.
* @param node the node to be duplicated.
* @param controller the browser controller.
*/
{
{
throw new IllegalArgumentException("node is null.");
}
setEnabledOK(false);
super.controller = controller;
try
{
{
aRdn = "(1)";
}
else
{
}
}
catch (DirectoryException de)
{
throw new IllegalStateException("Unexpected error decoding dn: '"+
}
}
/**
* {@inheritDoc}
*/
{
return INFO_CTRL_PANEL_DUPLICATE_ENTRY_TITLE.get();
}
/**
* {@inheritDoc}
*/
{
return INFO_CTRL_PANEL_DUPLICATE_ENTRY_TITLE.get();
}
/**
* Creates the layout of the panel (but the contents are not populated here).
*/
private void createLayout()
{
{
/**
* {@inheritDoc}
*/
{
}
});
gbc);
{
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
};
}
/**
* {@inheritDoc}
*/
{
{
}
{
}
else if (!entryExists(parentDN))
{
}
{
}
{
try
{
getEntry();
}
catch (IOException ioe)
{
}
catch (LDIFException le)
{
}
}
}
/**
* {@inheritDoc}
*/
{
{
{
{
}
}
{
{
continue;
}
{
{
}
else if (value instanceof byte[])
{
}
else
{
}
}
}
else
{
try
{
}
catch (DirectoryException de)
{
}
{
}
else
{
try
{
}
catch (DirectoryException de)
{
throw new IllegalStateException("Unexpected error with dn: '"+
}
{
{
}
else
{
}
}
}
}
}
}
private void browseClicked()
{
{
browsePanel = new LDAPEntrySelectionPanel();
browsePanel.setMultipleSelection(false);
Utilities.getParentDialog(this));
}
browseDlg.setVisible(true);
{
{
}
}
}
{
new BackgroundTask<CustomSearchResult>()
{
{
return reader.processBackgroundTask();
}
{
{
}
else
{
try
{
setEnabledOK(true);
}
catch (DirectoryException de)
{
de.getMessageObject());
}
}
}
};
}
private void updateDNValue()
{
{
}
else
{
}
}
{
if (tSleep > 0)
{
try
{
}
catch (Throwable t)
{
}
}
}
}