cons.setMaxResults(0); // no limit LDAPSearchResults searchResults = null; if (attributeList == null || attributeList.size() == 0) {
/** * Sets the maximum number of search results to be returned; 0 means no * limit. The default is 1000. * * @see <a href="../../../../api/com/novell/ldap/LDAPSearchConstraints.html#setMaxResults(int)"> com.novell.ldap.LDAPSearchConstraints.setMaxResults(int)</a> */ public void setMaxResults(int maxResults) { cons.setMaxResults(maxResults); return; }
/** * Returns a set of LDAPSearchConstraints to apply globally * to all LDAP searches. * * @return * A LDAPSearchConstraints object containing constraints * to be applied to all LDAP search operations. * * @throws GuacamoleException * If guacamole.properties cannot be parsed. */ public LDAPSearchConstraints getLDAPSearchConstraints() throws GuacamoleException { LDAPSearchConstraints constraints = new LDAPSearchConstraints(); constraints.setMaxResults(getMaxResults()); constraints.setDereference(getDereferenceAliases().DEREF_VALUE); return constraints; }
constraints.setMaxResults(maxResults);
cons.setServerTimeLimit(serverTimeLimit); cons.setDereference(dereference); cons.setMaxResults(maxResults); cons.setBatchSize(batchSize); return;
/** * Constructs a com.novell.ldap.LDAPConstraints object from an * LDAPConstraints object */ /* package */ LDAPConstraints( LDAPConstraints cons) { // Set base constraints with defaults for search parameters this( cons.getTimeLimit(), cons.getReferralFollowing(), null, cons.getHopLimit()); refHandler = cons.getReferralHandler(); if( cons instanceof LDAPSearchConstraints) { // Set search constraints values, if present LDAPSearchConstraints inCons = (LDAPSearchConstraints)cons; com.novell.ldap.LDAPSearchConstraints outCons = (com.novell.ldap.LDAPSearchConstraints)this.cons; outCons.setServerTimeLimit(inCons.getServerTimeLimit()); outCons.setDereference(inCons.getDereference()); outCons.setMaxResults(inCons.getMaxResults()); outCons.setBatchSize(inCons.getBatchSize()); } return; }
constraints.setMaxResults(getMaxResults(context)); constraints.setReferralFollowing(true); constraints.setReferralHandler(new LDAPPluginReferralHandler(loginDN, password, context));