/** * {@inheritDoc} */ @Override public AddRequest setEntry( Entry entry ) { getDecorated().setEntry( entry ); return this; }
/** * {@inheritDoc} */ @Override public void add( Entry entry ) throws LdapException { if ( entry == null ) { String msg = "Cannot add an empty entry"; LOG.debug( msg ); throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); addRequest.setEntryDn( entry.getDn() ); AddResponse addResponse = add( addRequest ); processResponse( addResponse ); }
/** * {@inheritDoc} */ @Override public AddRequest setEntry( Entry entry ) { getDecorated().setEntry( entry ); return this; }
public void run() { try { // Preparing the add request AddRequest request = new AddRequestImpl(); request.setEntryDn( new Dn( dn ) ); request.setEntry( AttributeUtils.toEntry( attributes, new Dn( dn ) ) ); request.addAllControls( convertControls( controls ) ); // Performing the add operation AddResponse addResponse = ldapConnection.add( request ); // Checking the response checkResponse( addResponse ); } catch ( Exception e ) { exception = e; } NamingException ne = null; if ( exception != null ) { ne = new NamingException( exception.getMessage() ); } for ( IJndiLogger logger : getJndiLoggers() ) { logger.logChangetypeAdd( connection, dn, attributes, controls, ne ); } } };
/** * {@inheritDoc} */ @Override public AddRequest setEntry( Entry entry ) { getDecorated().setEntry( entry ); return this; }
/** * {@inheritDoc} */ @Override public AddRequest setEntry( Entry entry ) { getDecorated().setEntry( entry ); return this; }
/** * {@inheritDoc} */ @Override public AddFuture addAsync( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04125_CANNOT_ADD_NULL_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); return addAsync( addRequest ); }
/** * {@inheritDoc} */ @Override public AddFuture addAsync( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04125_CANNOT_ADD_NULL_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); return addAsync( addRequest ); }
/** * {@inheritDoc} */ @Override public AddFuture addAsync( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04125_CANNOT_ADD_NULL_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); return addAsync( addRequest ); }
/** * {@inheritDoc} */ @Override public void add( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04123_CANNOT_ADD_EMPTY_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); AddResponse addResponse = add( addRequest ); processResponse( addResponse ); }
/** * {@inheritDoc} */ @Override public void add( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04123_CANNOT_ADD_EMPTY_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); AddResponse addResponse = add( addRequest ); processResponse( addResponse ); }
/** * {@inheritDoc} */ @Override public void add( Entry entry ) throws LdapException { if ( entry == null ) { String msg = I18n.err( I18n.ERR_04123_CANNOT_ADD_EMPTY_ENTRY ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } AddRequest addRequest = new AddRequestImpl(); addRequest.setEntry( entry ); AddResponse addResponse = add( addRequest ); processResponse( addResponse ); }