/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
/** * Set the cookie * * @param cookie The cookie to store in this control */ @Override public void setCookie( byte[] cookie ) { // Copy the bytes if ( !Strings.isEmpty( cookie ) ) { byte[] copy = new byte[cookie.length]; System.arraycopy( cookie, 0, copy, 0, cookie.length ); getDecorated().setCookie( copy ); } else { getDecorated().setCookie( null ); } }
private SearchRequest createSearchRequest(LdapConnection connection, byte[] cookie, @NotNull String[] userAttributes) throws LdapException { SearchRequest req = new SearchRequestImpl(); req.setScope(SearchScope.SUBTREE); if (userAttributes.length == 0) { req.addAttributes(SchemaConstants.ALL_USER_ATTRIBUTES); } else { req.addAttributes(userAttributes); } req.setTimeLimit((int) config.getSearchTimeout()); req.setBase(new Dn(idConfig.getBaseDN())); req.setFilter(searchFilter); PagedResults pagedSearchControl = new PagedResultsDecorator(connection.getCodecService()); // do paged searches (OAK-2874) pagedSearchControl.setSize(1000); pagedSearchControl.setCookie(cookie); req.addControl(pagedSearchControl); return req; }
pagedSearchControl.setCookie( psCookie.getCookie() ); pagedSearchControl.setSize( 0 ); pagedSearchControl.setCritical( true );