Esempio n. 1
0
  private Control[] getControls(final LDAPConstraints c) {
    Control[] controls = null;
    if (c != null) {
      controls = LDAPControl.toControls(c.getServerControls());
    } else if (constraints != null) {
      controls = LDAPControl.toControls(constraints.getServerControls());
    }

    if (controls == null) {
      return new Control[0];
    } else {
      return controls;
    }
  }
Esempio n. 2
0
 private void setResponseControls(final com.hwlcn.ldap.ldap.sdk.LDAPException ldapException) {
   if (ldapException.hasResponseControl()) {
     responseControls = LDAPControl.toLDAPControls(ldapException.getResponseControls());
   } else {
     responseControls = null;
   }
 }
Esempio n. 3
0
 private void setResponseControls(final LDAPResult ldapResult) {
   if (ldapResult.hasResponseControl()) {
     responseControls = LDAPControl.toLDAPControls(ldapResult.getResponseControls());
   } else {
     responseControls = null;
   }
 }
Esempio n. 4
0
  private void update(final UpdatableLDAPRequest request, final LDAPConstraints constraints) {
    final LDAPConstraints c = (constraints == null) ? this.constraints : constraints;

    request.setControls(LDAPControl.toControls(c.getServerControls()));
    request.setResponseTimeoutMillis(c.getTimeLimit());
    request.setFollowReferrals(c.getReferrals());
  }