Exemplo n.º 1
0
 /**
  * Returns an ldap constraints object configured with the supplied controls.
  *
  * @param controls to sets in the constraints
  * @return ldap constraints
  */
 protected LDAPConstraints getLDAPConstraints(final RequestControl[] controls) {
   LDAPConstraints constraints = connection.getConstraints();
   if (constraints == null) {
     constraints = new LDAPConstraints();
   }
   if (controls != null) {
     constraints.setControls(config.getControlProcessor().processRequestControls(controls));
   }
   return constraints;
 }
Exemplo n.º 2
0
 /**
  * Returns an ldap constraints object configured with the supplied request.
  *
  * @param request request containing configuration to create constraints
  * @return ldap constraints
  */
 protected LDAPConstraints getLDAPConstraints(final Request request) {
   LDAPConstraints constraints = connection.getConstraints();
   if (constraints == null) {
     constraints = new LDAPConstraints();
   }
   if (request.getControls() != null) {
     constraints.setControls(
         config.getControlProcessor().processRequestControls(request.getControls()));
   }
   constraints.setReferralFollowing(request.getFollowReferrals());
   return constraints;
 }