* Used to encapsulate [de]marshalling of controls before and after lookup operations.
*/
protected ServerEntry doLookupOperation( DN target, String[] attrIds ) throws Exception
{
// setup the op context and populate with request controls
LookupOperationContext opCtx;
// execute lookup/getRootDSE operation
opCtx = new LookupOperationContext( session, target, attrIds );
opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );
OperationManager operationManager = service.getOperationManager();
ClonedServerEntry serverEntry = operationManager.lookup( opCtx );
// clear the request controls and set the response controls
requestControls = EMPTY_CONTROLS;
responseControls = JndiUtils.toJndiControls( opCtx.getResponseControls() );
// Now remove the ObjectClass attribute if it has not been requested
if ( ( opCtx.getAttrsId() != null ) && ( opCtx.getAttrsId().size() != 0 ) )
{
if ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
&& ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) )
{
serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );