try
{
EventRegistry.suspendEventFireingInCurrentThread();
LdifContentRecord record = ModelConverter.entryToLdifContentRecord( templateEntries[0] );
DummyEntry prototypeEntry = ModelConverter.ldifContentRecordToEntry( record, new DummyConnection( connection.getSchema() ) );
IAttribute[] attributes = prototypeEntry.getAttributes();
for ( int i = 0; i < attributes.length; i++ )
{
if ( !SchemaUtils.isModifyable( attributes[i].getAttributeTypeDescription() ) )
{
prototypeEntry.deleteAttribute( attributes[i] );
}
}
wizard.setPrototypeEntry( prototypeEntry );
}
catch ( Exception e )
{
e.printStackTrace();
}
finally
{
EventRegistry.resumeEventFireingInCurrentThread();
}
}
else
{
wizard.setPrototypeEntry( new DummyEntry( new DN(), new DummyConnection( wizard.getSelectedConnection().getSchema() ) ) );
}
return super.getNextPage();
}