/** * 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 ) ); }
/** * 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.REMOVE_ATTRIBUTE ); nexus.modify( new ModifyOperationContext( coreSession, getDn(), items ) ); }