use of com.unboundid.ldap.sdk.unboundidds.controls.GetUserResourceLimitsRequestControl in project ldapsdk by pingidentity.
the class LDAPModify method getBindControls.
/**
* {@inheritDoc}
*/
@Override()
@NotNull()
protected List<Control> getBindControls() {
final ArrayList<Control> bindControls = new ArrayList<>(10);
if (bindControl.isPresent()) {
bindControls.addAll(bindControl.getValues());
}
if (authorizationIdentity.isPresent()) {
bindControls.add(new AuthorizationIdentityRequestControl(false));
}
if (getAuthorizationEntryAttribute.isPresent()) {
bindControls.add(new GetAuthorizationEntryRequestControl(true, true, getAuthorizationEntryAttribute.getValues()));
}
if (getRecentLoginHistory.isPresent()) {
bindControls.add(new GetRecentLoginHistoryRequestControl());
}
if (getUserResourceLimits.isPresent()) {
bindControls.add(new GetUserResourceLimitsRequestControl());
}
if (usePasswordPolicyControl.isPresent()) {
bindControls.add(new PasswordPolicyRequestControl());
}
if (suppressOperationalAttributeUpdates.isPresent()) {
final EnumSet<SuppressType> suppressTypes = EnumSet.noneOf(SuppressType.class);
for (final String s : suppressOperationalAttributeUpdates.getValues()) {
if (s.equalsIgnoreCase("last-access-time")) {
suppressTypes.add(SuppressType.LAST_ACCESS_TIME);
} else if (s.equalsIgnoreCase("last-login-time")) {
suppressTypes.add(SuppressType.LAST_LOGIN_TIME);
} else if (s.equalsIgnoreCase("last-login-ip")) {
suppressTypes.add(SuppressType.LAST_LOGIN_IP);
}
}
bindControls.add(new SuppressOperationalAttributeUpdateRequestControl(suppressTypes));
}
return bindControls;
}
use of com.unboundid.ldap.sdk.unboundidds.controls.GetUserResourceLimitsRequestControl in project ldapsdk by pingidentity.
the class LDAPSearch method getBindControls.
/**
* {@inheritDoc}
*/
@Override()
@NotNull()
protected List<Control> getBindControls() {
final ArrayList<Control> bindControls = new ArrayList<>(10);
if (bindControl.isPresent()) {
bindControls.addAll(bindControl.getValues());
}
if (authorizationIdentity.isPresent()) {
bindControls.add(new AuthorizationIdentityRequestControl(false));
}
if (getAuthorizationEntryAttribute.isPresent()) {
bindControls.add(new GetAuthorizationEntryRequestControl(true, true, getAuthorizationEntryAttribute.getValues()));
}
if (getRecentLoginHistory.isPresent()) {
bindControls.add(new GetRecentLoginHistoryRequestControl());
}
if (getUserResourceLimits.isPresent()) {
bindControls.add(new GetUserResourceLimitsRequestControl());
}
if (usePasswordPolicyControl.isPresent()) {
bindControls.add(new PasswordPolicyRequestControl());
}
if (suppressOperationalAttributeUpdates.isPresent()) {
final EnumSet<SuppressType> suppressTypes = EnumSet.noneOf(SuppressType.class);
for (final String s : suppressOperationalAttributeUpdates.getValues()) {
if (s.equalsIgnoreCase("last-access-time")) {
suppressTypes.add(SuppressType.LAST_ACCESS_TIME);
} else if (s.equalsIgnoreCase("last-login-time")) {
suppressTypes.add(SuppressType.LAST_LOGIN_TIME);
} else if (s.equalsIgnoreCase("last-login-ip")) {
suppressTypes.add(SuppressType.LAST_LOGIN_IP);
}
}
bindControls.add(new SuppressOperationalAttributeUpdateRequestControl(suppressTypes));
}
return bindControls;
}
Aggregations