}
private void deleteAttribute()
{
ArrayList<Message> errors = new ArrayList<Message>();
Schema schema = getInfo().getServerDescriptor().getSchema();
ProgressDialog dlg = new ProgressDialog(
Utilities.createFrame(),
Utilities.getParentDialog(this),
INFO_CTRL_PANEL_DELETE_ATTRIBUTE_TITLE.get(), getInfo());
LinkedHashSet<AttributeType> attrsToDelete =
new LinkedHashSet<AttributeType>(1);
attrsToDelete.add(attribute);
Task newTask = new DeleteSchemaElementsTask(getInfo(), dlg,
new LinkedHashSet<ObjectClass>(0), attrsToDelete);
for (Task task : getInfo().getTasks())
{
task.canLaunch(newTask, errors);
}
TreeSet<String> childAttributes = new TreeSet<String>();
TreeSet<String> dependentClasses = new TreeSet<String>();
if (schema != null)
{
for (AttributeType attr : schema.getAttributeTypes().values())
{
if (attribute.equals(attr.getSuperiorType()))
{
childAttributes.add(attr.getNameOrOID());
}
}
for (ObjectClass o : schema.getObjectClasses().values())
{
if (o.getRequiredAttributeChain().contains(attribute))
{
dependentClasses.add(o.getNameOrOID());
}