@Override public void bind(String name, Object obj) throws NamingException { delegating.bind(name, obj); }
@Override public void bind(String name, Object obj, Attributes attrs) throws NamingException { delegating.bind(name, obj, attrs); }
@Override public void bind(Name name, Object obj, Attributes attrs) throws NamingException { delegating.bind(name, obj, attrs); }
@Override public void bind(Name name, Object obj) throws NamingException { delegating.bind(name, obj); }
@Override public void bind(Name name, Object obj, Attributes attrs) throws NamingException { Assert.checkNotNullParam("name", name); final ReparsedName reparsedName = reparse(name); ContextResult result = getProviderContext(reparsedName.getUrlScheme()); if(result.oldStyle) { ((DirContext)result.context).bind(name, obj, attrs); } else { ((DirContext)result.context).bind(reparsedName.getName(), obj, attrs); } }
@Override public void bind(String name, Object obj, Attributes attrs) throws NamingException { Assert.checkNotNullParam("name", name); final ReparsedName reparsedName = reparse(getNameParser().parse(name)); ContextResult result = getProviderContext(reparsedName.getUrlScheme()); if(result.oldStyle) { ((DirContext)result.context).bind(name, obj, attrs); } else { ((DirContext)result.context).bind(reparsedName.getName(), obj, attrs); } }
public Object executeWithContext(DirContext ctx) throws javax.naming.NamingException { ctx.bind(dn, obj, attributes); return null; } });
public Object executeWithContext(DirContext ctx) throws javax.naming.NamingException { ctx.bind(dn, obj, attributes); return null; } });
public Object executeWithContext(DirContext ctx) throws NamingException { ctx.bind(dn, obj, attributes); return null; } });
@Override public Object operation() throws NamingException { ((DirContext) getDelegate()).bind(name, obj, attrs); return null; } }.perform();
/** * @see DirContext#bind(Name, Object, Attributes) */ public void bind(Name name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
/** * @see javax.naming.directory.DirContext#bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
/** * @see DirContext#bind(String, Object, Attributes) */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
/** * @see DirContext#bind(String, Object, Attributes) */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
/** * @see javax.naming.directory.DirContext#bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
/** * @see DirContext#bind(String, Object, Attributes) */ public void bind(String name, Object obj, Attributes attrs) throws NamingException { this.assertOpen(); this.getDelegateDirContext().bind(name, obj, attrs); }
@Override public void bind(Name name, Object obj, Attributes attrs) throws NamingException { Assert.checkNotNullParam("name", name); final ReparsedName reparsedName = reparse(name); ContextResult result = getProviderContext(reparsedName.getUrlScheme()); if(result.oldStyle) { ((DirContext)result.context).bind(name, obj, attrs); } else { ((DirContext)result.context).bind(reparsedName.getName(), obj, attrs); } }
@Override public void bind(Name name, Object obj, Attributes attrs) throws NamingException { Assert.checkNotNullParam("name", name); final ReparsedName reparsedName = reparse(name); ContextResult result = getProviderContext(reparsedName.getUrlScheme()); if(result.oldStyle) { ((DirContext)result.context).bind(name, obj, attrs); } else { ((DirContext)result.context).bind(reparsedName.getName(), obj, attrs); } }
@Test public void testBindWithContext() throws Exception { expectGetReadWriteContext(); when(dirContextOperationsMock.getDn()).thenReturn(nameMock); when(dirContextOperationsMock.isUpdateMode()).thenReturn(false); tested.bind(dirContextOperationsMock); verify(dirContextMock).bind(nameMock, dirContextOperationsMock, null); verify(dirContextMock).close(); }
@Test public void testBind() throws Exception { expectGetReadWriteContext(); Object expectedObject = new Object(); BasicAttributes expectedAttributes = new BasicAttributes(); tested.bind(nameMock, expectedObject, expectedAttributes); verify(dirContextMock).bind(nameMock, expectedObject, expectedAttributes); verify(dirContextMock).close(); }