if (!clientSideSort) { baseTmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL)); if (!clientSideSort) { tmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL)); if (!clientSideSort) { tmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL));
@Test public void testCreateRequestControl() throws Exception { SortControl result = (SortControl) tested.createRequestControl(); assertThat(result).isNotNull(); assertThat(result.getID()).isEqualTo("1.2.840.113556.1.4.473"); assertThat(result.getEncodedValue().length).isEqualTo(9); }
try { searchControl = new Control[]{ new SortControl(new String[]{manager.getUsernameField()}, Control.NONCRITICAL) }; } catch (IOException e) {
new SortControl(new String[]{manager.getGroupNameField()}, Control.NONCRITICAL) }; ctx.setRequestControls(searchControl);
ctlk = new SortControl( getSortingAttributesKeys(), Control.NONCRITICAL ); nrCtl++; if ( log.isDebug() ) {
getInitialContext().setRequestControls( new Control[] { new SortControl( getSortingAttributesKeys(), Control.NONCRITICAL ), new PagedResultsControl( GetPagingSize(), cookie, Control.CRITICAL ) } ); } else {
protected void applyRequestControls(AbstractQuery<?, ?> query) { try { List<Control> controls = new ArrayList<>(); List<QueryOrderingProperty> orderBy = query.getOrderingProperties(); if(orderBy != null) { for (QueryOrderingProperty orderingProperty : orderBy) { String propertyName = orderingProperty.getQueryProperty().getName(); if(UserQueryProperty.USER_ID.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserIdAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.EMAIL.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserEmailAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.FIRST_NAME.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserFirstnameAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.LAST_NAME.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserLastnameAttribute(), Control.CRITICAL)); } } } initialContext.setRequestControls(controls.toArray(new Control[0])); } catch (Exception e) { throw new IdentityProviderException("Exception while setting paging settings", e); } }
protected void applyRequestControls(AbstractQuery<?, ?> query) { try { List<Control> controls = new ArrayList<Control>(); List<QueryOrderingProperty> orderBy = query.getOrderingProperties(); if(orderBy != null) { for (QueryOrderingProperty orderingProperty : orderBy) { String propertyName = orderingProperty.getQueryProperty().getName(); if(UserQueryProperty.USER_ID.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserIdAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.EMAIL.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserEmailAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.FIRST_NAME.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserFirstnameAttribute(), Control.CRITICAL)); } else if(UserQueryProperty.LAST_NAME.getName().equals(propertyName)) { controls.add(new SortControl(ldapConfiguration.getUserLastnameAttribute(), Control.CRITICAL)); } } } initialContext.setRequestControls(controls.toArray(new Control[0])); } catch (Exception e) { throw new IdentityProviderException("Exception while setting paging settings", e); } }
SortControl sctl = new SortControl(new String[]{ldapAttrMapping.userUsernameAttr}, Control.NONCRITICAL); ctx.setRequestControls(new Control[]{sctl});
/** * Set the standard request controls */ private void setRequestControls(byte[] cookie) throws TranslatorException { List<Control> ctrl = new ArrayList<Control>(); SortKey[] keys = searchDetails.getSortKeys(); try { if (keys != null) { ctrl.add(new SortControl(keys, Control.NONCRITICAL)); } if (this.executionFactory.usePagination()) { ctrl.add(new PagedResultsControl(this.executionContext.getBatchSize(), cookie, Control.CRITICAL)); } if (!ctrl.isEmpty()) { this.ldapCtx.setRequestControls(ctrl.toArray(new Control[ctrl.size()])); LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Sort/pagination controls were created successfully."); //$NON-NLS-1$ } } catch (NamingException ne) { final String msg = LDAPPlugin.Util.getString("LDAPSyncQueryExecution.setControlsError") + //$NON-NLS-1$ " : "+ne.getExplanation(); //$NON-NLS-1$ throw new TranslatorException(ne, msg); } catch(IOException e) { throw new TranslatorException(e); } }
extControls.add(new SortControl(sortedBy, Control.CRITICAL));
if (!clientSideSort) { baseTmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL)); if (!clientSideSort) { tmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL)); if (!clientSideSort) { tmpRequestControls.add(new SortControl(new String[]{attribute}, Control.NONCRITICAL));
try { searchControl = new Control[]{ new SortControl(new String[]{manager.getUsernameField()}, Control.NONCRITICAL) }; } catch (IOException e) {
requestControls.add(new SortControl(buildSortKeyArray(controls.getSortKeys()), Control.CRITICAL));
new SortControl(new String[]{manager.getGroupNameField()}, Control.NONCRITICAL) }; ctx.setRequestControls(searchControl);
PagedResultsControl prc = new PagedResultsControl(getPageSize(), Control.NONCRITICAL); String[] keys = {ldapAttrMapping.userUsernameAttr}; SortControl sctl = new SortControl(keys, SEARCH_CONTROL);
new SortControl(typeConfiguration.getIdAttributeName(), Control.CRITICAL) };