/** * {@inheritDoc} */ @Override public void modify( Dn dn, List<Modification> mods, LogChange log ) throws LdapException { if ( mods == null ) { return; } List<Modification> serverModifications = new ArrayList<>( mods.size() ); for ( Modification mod : mods ) { serverModifications.add( new DefaultModification( directoryService.getSchemaManager(), mod ) ); } ModifyOperationContext modifyContext = new ModifyOperationContext( this, dn, serverModifications ); modifyContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.modify( modifyContext ); }
/** * {@inheritDoc} */ @Override public void modify( Dn dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException { if ( mods == null ) { return; } List<Modification> serverModifications = new ArrayList<>( mods.size() ); for ( Modification mod : mods ) { serverModifications.add( new DefaultModification( directoryService.getSchemaManager(), mod ) ); } ModifyOperationContext modifyContext = new ModifyOperationContext( this, dn, serverModifications ); setReferralHandling( modifyContext, ignoreReferral ); modifyContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.modify( modifyContext ); }
ModifyOperationContext bindModCtx = new ModifyOperationContext( directoryService.getAdminSession() ); bindModCtx.setDn( numberHolder ); bindModCtx.setPushToEvtInterceptor( true );
ModifyOperationContext modifyContext = new ModifyOperationContext( session, schemaModificationDN, mods ); modifyContext.setPartition( this ); modifyContext.setTransaction( opContext.getTransaction() );
ModifyOperationContext modifyContext = new ModifyOperationContext( session ); modifyContext.setEntry( entry ); modifyContext.setDn( entry.getDn() );
/** * {@inheritDoc} */ @Override public void modify( ModifyRequest modifyRequest, LogChange log ) throws LdapException { ModifyOperationContext modifyContext = new ModifyOperationContext( this, modifyRequest ); modifyContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); try { operationManager.modify( modifyContext ); } catch ( LdapException e ) { modifyRequest.getResultResponse().addAllControls( modifyContext.getResponseControls() ); throw e; } modifyRequest.getResultResponse().addAllControls( modifyContext.getResponseControls() ); }
/** * Used to encapsulate [de]marshalling of controls before and after modify operations. * * @param dn The modified entry's dn * @param modifications The list of modifications to apply * @throws Exception If the modify failed */ protected void doModifyOperation( Dn dn, List<Modification> modifications ) throws Exception { // setup the op context and populate with request controls ModifyOperationContext modifyContext = new ModifyOperationContext( session, dn, modifications ); modifyContext.addRequestControls( convertControls( true, requestControls ) ); // Inject the referral handling into the operation context injectReferralControl( modifyContext ); // execute modify operation OperationManager operationManager = service.getOperationManager(); operationManager.modify( modifyContext ); // clear the request controls and set the response controls requestControls = EMPTY_CONTROLS; responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(), modifyContext.getResponseControls() ); }
ModifyOperationContext modifyContext = new ModifyOperationContext( session, remoteEntry.getDn(), serverModifications ); modifyContext.setReplEvent( true );
ModifyOperationContext modifyContext = new ModifyOperationContext( session ); modifyContext.setEntry( entry ); modifyContext.setDn( entry.getDn() );
ModifyOperationContext modifyContext = new ModifyOperationContext( opContext.getSession(), candidateDn, modifications ); modifyContext.setPartition( opContext.getPartition() ); modifyContext.setTransaction( opContext.getTransaction() );
ModifyOperationContext modContext = new ModifyOperationContext( directoryService.getAdminSession() ); modContext.setDn( userEntry.getDn() );
nexus.modify( new ModifyOperationContext( renameContext.getSession(), dn, getOperationalModsForReplace( oldDn, newName, subentry, candidate ) ) ); ModifyOperationContext newModifyContext = new ModifyOperationContext( renameContext.getSession(), newName, mods ); newModifyContext.setPartition( renameContext.getPartition() ); newModifyContext.setTransaction( renameContext.getTransaction() );
ModifyOperationContext newModifyContext = new ModifyOperationContext( moveAndRenameContext.getSession(), dn, getOperationalModsForReplace( oldDn, newName, subentry, candidate ) ); newModifyContext.setPartition( moveAndRenameContext.getPartition() ); nexus.modify( new ModifyOperationContext( moveAndRenameContext.getSession(), newDn, mods ) );
.getEntryCSN(), csnVal ); mods.add( csnMod ); ModifyOperationContext bindModCtx = new ModifyOperationContext( adminSession ); bindModCtx.setDn( bindDn ); bindModCtx.setEntry( userEntry ); mods.add( csnMod ); ModifyOperationContext bindModCtx = new ModifyOperationContext( adminSession ); bindModCtx.setDn( bindDn ); bindModCtx.setEntry( userEntry );
ModifyOperationContext newModifyContext = new ModifyOperationContext( moveContext.getSession(), dn, getOperationalModsForReplace( oldDn, newName, subentry, candidate ) ); newModifyContext.setPartition( moveContext.getPartition() ); ModifyOperationContext newModifyContext = new ModifyOperationContext( moveContext.getSession(), newDn, mods ); newModifyContext.setPartition( moveContext.getPartition() ); newModifyContext.setTransaction( moveContext.getTransaction() );
ModifyOperationContext newModifyContext = new ModifyOperationContext( modifyContext.getSession(), candidateDn, getOperationalModsForRemove( dn, candidate ) ); newModifyContext.setPartition( modifyContext.getPartition() ); nexus.modify( new ModifyOperationContext( modifyContext.getSession(), candidateDn, getOperationalModsForAdd( candidate, operationalAttributes ) ) ); ModifyOperationContext newModifyContext = new ModifyOperationContext( modifyContext.getSession(), dn, subentriesOpAttrMods ); newModifyContext.setPartition( modifyContext.getPartition() ); newModifyContext.setTransaction( modifyContext.getTransaction() );
mods.add( csnMod ); ModifyOperationContext internalModifyCtx = new ModifyOperationContext( adminSession ); internalModifyCtx.setPushToEvtInterceptor( true ); internalModifyCtx.setDn( modifyContext.getDn() );