Java Code Examples for org.apache.directory.ldap.client.api.LdapConnection#modify()

The following examples show how to use org.apache.directory.ldap.client.api.LdapConnection#modify() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LdapConnectionTemplate.java    From directory-ldap-api with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public ModifyResponse modify( ModifyRequest modifyRequest )
{
    LdapConnection connection = null;
    try
    {
        connection = connectionPool.getConnection();
        return connection.modify( modifyRequest );
    }
    catch ( LdapException e )
    {
        throw new LdapRuntimeException( e );
    }
    finally
    {
        returnLdapConnection( connection );
    }
}
 
Example 2
Source File: LdapDataProvider.java    From directory-fortress-core with Apache License 2.0 3 votes vote down vote up
/**
 * Update exiting ldap entry to the directory.  Do not add audit context.
 *
 * @param connection handle to ldap connection.
 * @param dn         contains distinguished node of entry.
 * @param mods       contains data to modify.
 * @throws LdapException in the event system error occurs.
 */
protected void modify( LdapConnection connection, Dn dn, List<Modification> mods ) throws LdapException
{
    COUNTERS.incrementMod();
    connection.modify( dn, mods.toArray( new Modification[]
        {} ) );
}
 
Example 3
Source File: LdapDataProvider.java    From directory-fortress-core with Apache License 2.0 3 votes vote down vote up
/**
 * Update exiting ldap entry to the directory.  Add audit context.
 *
 * @param connection handle to ldap connection.
 * @param dn         contains distinguished node of entry.
 * @param mods       contains data to modify.
 * @param entity     contains audit context.
 * @throws LdapException in the event system error occurs.
 */
protected void modify( LdapConnection connection, String dn, List<Modification> mods,
    FortEntity entity ) throws LdapException
{
    COUNTERS.incrementMod();
    audit( mods, entity );
    connection.modify( dn, mods.toArray( new Modification[]
        {} ) );
}
 
Example 4
Source File: LdapDataProvider.java    From directory-fortress-core with Apache License 2.0 3 votes vote down vote up
/**
 * Update exiting ldap entry to the directory.  Add audit context.
 *
 * @param connection handle to ldap connection.
 * @param dn         contains distinguished node of entry.
 * @param mods       contains data to modify.
 * @param entity     contains audit context.
 * @throws LdapException in the event system error occurs.
 */
protected void modify( LdapConnection connection, Dn dn, List<Modification> mods,
    FortEntity entity ) throws LdapException
{
    COUNTERS.incrementMod();
    audit( mods, entity );
    connection.modify( dn, mods.toArray( new Modification[]
        {} ) );
}
 
Example 5
Source File: LdapDataProvider.java    From directory-fortress-core with Apache License 2.0 2 votes vote down vote up
/**
 * Update exiting ldap entry to the directory.  Do not add audit context.
 *
 * @param connection handle to ldap connection.
 * @param dn         contains distinguished node of entry.
 * @param mods       contains data to modify.
 * @throws LdapException in the event system error occurs.
 */
protected void modify( LdapConnection connection, String dn, List<Modification> mods ) throws LdapException
{
    COUNTERS.incrementMod();
    connection.modify( dn, mods.toArray( new Modification[]{} ) );
}