/** * {@inheritDoc} */ public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws Exception { ModifyOperationContext opContext = new ModifyOperationContext( this, modifyRequest ); opContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.modify( opContext ); modifyRequest.getResultResponse().addAll( opContext.getResponseControls() ); }
public final void modify( ModifyOperationContext modifyContext ) throws Exception { store.modify( modifyContext.getDn(), modifyContext.getModItems() ); }
public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws Exception { Operation op = operationFactory.newModify( modifyContext ); op.execute( nexus, store, modifyContext.getSession() ); }
/** * {@inheritDoc} */ public void modify( DN dn, List<Modification> mods, LogChange log ) throws Exception { if ( mods == null ) { return; } List<Modification> serverModifications = new ArrayList<Modification>( mods.size() ); for ( Modification mod:mods ) { serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) ); } ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications ); opContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.modify( opContext ); }
/** * Inject the modified attribute into the server. * * @param nexus the partition which will be modified * @param coreSession the current session */ protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception { DirectoryService ds = coreSession.getDirectoryService(); ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN ); EntryAttribute attribute = getAttribute(); serverEntry.put( attribute ); List<Modification> items = ModifyOperationContext.createModItems( serverEntry, ModificationOperation.REPLACE_ATTRIBUTE ); nexus.modify( new ModifyOperationContext( coreSession, getDn(), items ) ); }
/** * Inject the modified attribute into the server. * * @param nexus the partition which will be modified * @param coreSession the current session */ protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception { DirectoryService ds = coreSession.getDirectoryService(); ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN ); EntryAttribute attribute = getAttribute(); serverEntry.put( attribute ); List<Modification> items = ModifyOperationContext.createModItems( serverEntry, ModificationOperation.ADD_ATTRIBUTE ); nexus.modify( new ModifyOperationContext( coreSession, getDn(), items ) ); }
/** * {@inheritDoc} */ public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws Exception { if ( mods == null ) { return; } List<Modification> serverModifications = new ArrayList<Modification>( mods.size() ); for ( Modification mod:mods ) { serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) ); } ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications ); setReferralHandling( opContext, ignoreReferral ); opContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.modify( opContext ); }
List<Modification> items = opContext.getModItems(); LdapDN normalizedName = opContext.getDn();
/** * Inject the modified attribute into the server. * * @param nexus the partition which will be modified * @param coreSession the current session */ protected void execute1( PartitionNexus nexus, CoreSession coreSession ) throws Exception { DirectoryService ds = coreSession.getDirectoryService(); ServerEntry serverEntry = ds.newEntry( LdapDN.EMPTY_LDAPDN ); EntryAttribute attribute = getAttribute(); serverEntry.put( attribute ); List<Modification> items = ModifyOperationContext.createModItems( serverEntry, ModificationOperation.REMOVE_ATTRIBUTE ); nexus.modify( new ModifyOperationContext( coreSession, getDn(), items ) ); }