Skip to content
Permalink
Browse files
+ mod method to set ldap controls
  • Loading branch information
shawnmckinney committed Feb 26, 2022
1 parent cfb2fc4 commit 9de78b477427437727f1f739db432b093ae6bcdd
Showing 1 changed file with 24 additions and 2 deletions.
@@ -325,6 +325,28 @@ protected void modify( LdapConnection connection, String dn, List<Modification>
*/
protected void modify( LdapConnection connection, String dn, List<Modification> mods,
FortEntity entity, boolean setRelaxControl ) throws LdapException
{
Control setControl = null;
if ( setRelaxControl )
{
setControl = new RelaxControlImpl();
}
modify( connection, dn, mods, entity, setControl );
}


/**
* 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.
* @param setControl add specified control to the request
* @throws LdapException in the event system error occurs.
*/
protected void modify( LdapConnection connection, String dn, List<Modification> mods,
FortEntity entity, Control setControl ) throws LdapException
{
COUNTERS.incrementMod();
audit( mods, entity );
@@ -334,9 +356,9 @@ protected void modify( LdapConnection connection, String dn, List<Modification>
{
modRequest.addModification( mod );
}
if ( setRelaxControl )
if ( setControl != null )
{
modRequest.addControl( new RelaxControlImpl() );
modRequest.addControl( setControl );
}
modRequest.setName( new Dn( dn ) );
ModifyResponse response = connection.modify( modRequest );

0 comments on commit 9de78b4

Please sign in to comment.