{
encode(writer, OP_GET_ACCOUNT_DISABLED_STATE, NO_VALUE);
}
else if (subCommandName.equals(SC_SET_ACCOUNT_DISABLED_STATE))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
String valueStr = a.getValue();
if (isTrueValue(valueStr))
{
encode(writer, OP_SET_ACCOUNT_DISABLED_STATE, "true");
}
else if (isFalseValue(valueStr))
{
encode(writer, OP_SET_ACCOUNT_DISABLED_STATE, "false");
}
else
{
Message message = ERR_PWPSTATE_INVALID_BOOLEAN_VALUE.get(valueStr);
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
}
}
else
{
Message message = ERR_PWPSTATE_NO_BOOLEAN_VALUE.get();
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
}
}
else if (subCommandName.equals(SC_CLEAR_ACCOUNT_DISABLED_STATE))
{
encode(writer, OP_CLEAR_ACCOUNT_DISABLED_STATE, NO_VALUE);
}
else if (subCommandName.equals(SC_GET_ACCOUNT_EXPIRATION_TIME))
{
encode(writer, OP_GET_ACCOUNT_EXPIRATION_TIME, NO_VALUE);
}
else if (subCommandName.equals(SC_SET_ACCOUNT_EXPIRATION_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_SET_ACCOUNT_EXPIRATION_TIME, a.getValue());
}
else
{
encode(writer, OP_SET_ACCOUNT_EXPIRATION_TIME, NO_VALUE);
}
}
else if (subCommandName.equals(SC_CLEAR_ACCOUNT_EXPIRATION_TIME))
{
encode(writer, OP_CLEAR_ACCOUNT_EXPIRATION_TIME, NO_VALUE);
}
else if (subCommandName.equals(SC_GET_SECONDS_UNTIL_ACCOUNT_EXPIRATION))
{
encode(writer, OP_GET_SECONDS_UNTIL_ACCOUNT_EXPIRATION, NO_VALUE);
}
else if (subCommandName.equals(SC_GET_PASSWORD_CHANGED_TIME))
{
encode(writer, OP_GET_PASSWORD_CHANGED_TIME, NO_VALUE);
}
else if (subCommandName.equals(SC_SET_PASSWORD_CHANGED_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_SET_PASSWORD_CHANGED_TIME, a.getValue());
}
else
{
encode(writer, OP_SET_PASSWORD_CHANGED_TIME, NO_VALUE);
}
}
else if (subCommandName.equals(SC_CLEAR_PASSWORD_CHANGED_TIME))
{
encode(writer, OP_CLEAR_PASSWORD_CHANGED_TIME, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_PASSWORD_EXP_WARNED_TIME))
{
encode(writer, OP_GET_PASSWORD_EXPIRATION_WARNED_TIME, NO_VALUE);
}
else if(subCommandName.equals(SC_SET_PASSWORD_EXP_WARNED_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_SET_PASSWORD_EXPIRATION_WARNED_TIME,
a.getValue());
}
else
{
encode(writer, OP_SET_PASSWORD_EXPIRATION_WARNED_TIME,
NO_VALUE);
}
}
else if(subCommandName.equals(SC_CLEAR_PASSWORD_EXP_WARNED_TIME))
{
encode(writer, OP_CLEAR_PASSWORD_EXPIRATION_WARNED_TIME,
NO_VALUE);
}
else if(subCommandName.equals(SC_GET_SECONDS_UNTIL_PASSWORD_EXPIRATION))
{
encode(writer, OP_GET_SECONDS_UNTIL_PASSWORD_EXPIRATION,
NO_VALUE);
}
else if(subCommandName.equals(
SC_GET_SECONDS_UNTIL_PASSWORD_EXPIRATION_WARNING))
{
encode(writer, OP_GET_SECONDS_UNTIL_PASSWORD_EXPIRATION_WARNING,
NO_VALUE);
}
else if(subCommandName.equals(SC_GET_AUTHENTICATION_FAILURE_TIMES))
{
encode(writer, OP_GET_AUTHENTICATION_FAILURE_TIMES, NO_VALUE);
}
else if(subCommandName.equals(SC_ADD_AUTHENTICATION_FAILURE_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_ADD_AUTHENTICATION_FAILURE_TIME,
a.getValue());
}
else
{
encode(writer, OP_ADD_AUTHENTICATION_FAILURE_TIME, NO_VALUE);
}
}
else if(subCommandName.equals(SC_SET_AUTHENTICATION_FAILURE_TIMES))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
ArrayList<String> valueList = new ArrayList<String>(a.getValues());
String[] values = new String[valueList.size()];
valueList.toArray(values);
encode(writer, OP_SET_AUTHENTICATION_FAILURE_TIMES, values);
}
else
{
encode(writer, OP_SET_AUTHENTICATION_FAILURE_TIMES, NO_VALUE);
}
}
else if(subCommandName.equals(SC_CLEAR_AUTHENTICATION_FAILURE_TIMES))
{
encode(writer, OP_CLEAR_AUTHENTICATION_FAILURE_TIMES, NO_VALUE);
}
else if(subCommandName.equals(
SC_GET_SECONDS_UNTIL_AUTHENTICATION_FAILURE_UNLOCK))
{
encode(writer, OP_GET_SECONDS_UNTIL_AUTHENTICATION_FAILURE_UNLOCK,
NO_VALUE);
}
else if(subCommandName.equals(
SC_GET_REMAINING_AUTHENTICATION_FAILURE_COUNT))
{
encode(writer, OP_GET_REMAINING_AUTHENTICATION_FAILURE_COUNT,
NO_VALUE);
}
else if(subCommandName.equals(SC_GET_LAST_LOGIN_TIME))
{
encode(writer, OP_GET_LAST_LOGIN_TIME, NO_VALUE);
}
else if(subCommandName.equals(SC_SET_LAST_LOGIN_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_SET_LAST_LOGIN_TIME, a.getValue());
}
else
{
encode(writer, OP_SET_LAST_LOGIN_TIME, NO_VALUE);
}
}
else if(subCommandName.equals(SC_CLEAR_LAST_LOGIN_TIME))
{
encode(writer, OP_CLEAR_LAST_LOGIN_TIME, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_SECONDS_UNTIL_IDLE_LOCKOUT))
{
encode(writer, OP_GET_SECONDS_UNTIL_IDLE_LOCKOUT, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_PASSWORD_RESET_STATE))
{
encode(writer, OP_GET_PASSWORD_RESET_STATE, NO_VALUE);
}
else if(subCommandName.equals(SC_SET_PASSWORD_RESET_STATE))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
String valueStr = a.getValue();
if (isTrueValue(valueStr))
{
encode(writer, OP_SET_PASSWORD_RESET_STATE, "true");
}
else if (isFalseValue(valueStr))
{
encode(writer, OP_SET_PASSWORD_RESET_STATE, "false");
}
else
{
Message message = ERR_PWPSTATE_INVALID_BOOLEAN_VALUE.get(valueStr);
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
}
}
else
{
Message message = ERR_PWPSTATE_NO_BOOLEAN_VALUE.get();
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
}
}
else if(subCommandName.equals(SC_CLEAR_PASSWORD_RESET_STATE))
{
encode(writer, OP_GET_PASSWORD_RESET_STATE, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_SECONDS_UNTIL_PASSWORD_RESET_LOCKOUT))
{
encode(writer, OP_GET_SECONDS_UNTIL_PASSWORD_RESET_LOCKOUT,
NO_VALUE);
}
else if(subCommandName.equals(SC_GET_GRACE_LOGIN_USE_TIMES))
{
encode(writer, OP_GET_GRACE_LOGIN_USE_TIMES, NO_VALUE);
}
else if(subCommandName.equals(SC_ADD_GRACE_LOGIN_USE_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_ADD_GRACE_LOGIN_USE_TIME, a.getValue());
}
else
{
encode(writer, OP_ADD_GRACE_LOGIN_USE_TIME, NO_VALUE);
}
}
else if(subCommandName.equals(SC_SET_GRACE_LOGIN_USE_TIMES))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
ArrayList<String> valueList = new ArrayList<String>(a.getValues());
String[] values = new String[valueList.size()];
valueList.toArray(values);
encode(writer, OP_SET_GRACE_LOGIN_USE_TIMES, values);
}
else
{
encode(writer, OP_SET_GRACE_LOGIN_USE_TIMES, NO_VALUE);
}
}
else if(subCommandName.equals(SC_CLEAR_GRACE_LOGIN_USE_TIMES))
{
encode(writer, OP_CLEAR_GRACE_LOGIN_USE_TIMES, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_REMAINING_GRACE_LOGIN_COUNT))
{
encode(writer, OP_GET_REMAINING_GRACE_LOGIN_COUNT, NO_VALUE);
}
else if(subCommandName.equals(SC_GET_PASSWORD_CHANGED_BY_REQUIRED_TIME))
{
encode(writer, OP_GET_PASSWORD_CHANGED_BY_REQUIRED_TIME,
NO_VALUE);
}
else if(subCommandName.equals(SC_SET_PASSWORD_CHANGED_BY_REQUIRED_TIME))
{
Argument a = subCommand.getArgumentForName(ARG_OP_VALUE);
if ((a != null) && a.isPresent())
{
encode(writer, OP_SET_PASSWORD_CHANGED_BY_REQUIRED_TIME,
a.getValue());
}
else
{
encode(writer, OP_SET_PASSWORD_CHANGED_BY_REQUIRED_TIME,
NO_VALUE);