public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException { nexus.modify( name, modOp, mods ); }
public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods ) throws NamingException { nexus.modify( name, mods ); }
/** * @see javax.naming.directory.DirContext#modifyAttributes( * javax.naming.Name,int, javax.naming.directory.Attributes) */ public void modifyAttributes( Name name, int modOp, Attributes attrs ) throws NamingException { getNexusProxy().modify( buildTarget( name ), modOp, attrs ); }
/** * @see javax.naming.directory.DirContext#modifyAttributes( * javax.naming.Name, javax.naming.directory.ModificationItem[]) */ public void modifyAttributes( Name name, ModificationItemImpl[] mods ) throws NamingException { getNexusProxy().modify( buildTarget( name ), mods ); }
/** * @see javax.naming.directory.DirContext#modifyAttributes( * javax.naming.Name, javax.naming.directory.ModificationItem[]) */ public void modifyAttributes( Name name, ModificationItem[] mods ) throws NamingException { ModificationItemImpl[] newMods = new ModificationItemImpl[ mods.length ]; for ( int i = 0; i < mods.length; i++ ) { newMods[i] = new ModificationItemImpl( mods[i] ); } getNexusProxy().modify( buildTarget( name ), newMods ); }
/** * 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 ) ); }
/** * 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 ) ); }
public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException { nextInterceptor.move( name, newParentName ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( newParentName, DirContext.REPLACE_ATTRIBUTE, attributes ); }
public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItemImpl[] items ) throws NamingException { nextInterceptor.modify( name, items ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( name, DirContext.REPLACE_ATTRIBUTE, attributes ); }
public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs ) throws NamingException { nextInterceptor.modify( name, modOp, attrs ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( name, DirContext.REPLACE_ATTRIBUTE, attributes ); }
public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException { nextInterceptor.move( name, newParentName, newRn, deleteOldRn ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( newParentName, DirContext.REPLACE_ATTRIBUTE, attributes ); }
nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
nexus.modify( dn, getOperationalModsForAdd( candidate, operational ) );
public void modifyRn( NextInterceptor nextInterceptor, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException { nextInterceptor.modifyRn( name, newRn, deleteOldRn ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); LdapDN newDn = ( LdapDN ) name.clone(); newDn.remove( name.size() - 1 ); newDn.add( newRn ); newDn.normalize( registry.getNormalizerMapping() ); nexus.modify( newDn, DirContext.REPLACE_ATTRIBUTE, attributes ); }