| | |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.api; |
| | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Attribute %s resolves to true for user entry " |
| | | + "%s", attributeType.getNameOrOID(), entry.getDN().toString()); |
| | | + "%s", attributeType.getNameOrOID(), |
| | | entry.getName().toString()); |
| | | } |
| | | |
| | | return ConditionResult.TRUE; |
| | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Attribute %s resolves to false for user " |
| | | + "entry %s", attributeType.getNameOrOID(), entry.getDN() |
| | | + "entry %s", attributeType.getNameOrOID(), entry.getName() |
| | | .toString()); |
| | | } |
| | | |
| | |
| | | { |
| | | TRACER.debugError("Unable to resolve value %s for attribute %s " |
| | | + "in user entry %s as a Boolean.", valueString, |
| | | attributeType.getNameOrOID(), entry.getDN().toString()); |
| | | attributeType.getNameOrOID(), entry.getName().toString()); |
| | | } |
| | | |
| | | final Message message = ERR_PWPSTATE_CANNOT_DECODE_BOOLEAN |
| | | .get(valueString, attributeType.getNameOrOID(), entry.getDN() |
| | | .get(valueString, attributeType.getNameOrOID(), entry.getName() |
| | | .toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message); |
| | |
| | | { |
| | | TRACER.debugInfo("Returning %s because attribute %s does not exist " |
| | | + "in user entry %s", ConditionResult.UNDEFINED.toString(), |
| | | attributeType.getNameOrOID(), entry.getDN().toString()); |
| | | attributeType.getNameOrOID(), entry.getName().toString()); |
| | | } |
| | | |
| | | return ConditionResult.UNDEFINED; |
| | |
| | | |
| | | TRACER.debugWarning("Unable to decode value %s for attribute %s " |
| | | + "in user entry %s: %s", v.getValue().toString(), |
| | | attributeType.getNameOrOID(), entry.getDN().toString(), |
| | | attributeType.getNameOrOID(), entry.getName().toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | final Message message = ERR_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME |
| | | .get(v.getValue().toString(), attributeType.getNameOrOID(), entry |
| | | .getDN().toString(), String.valueOf(e)); |
| | | .getName().toString(), String.valueOf(e)); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message, e); |
| | | } |
| | |
| | | { |
| | | TRACER.debugInfo("Returning -1 because attribute %s does not " |
| | | + "exist in user entry %s", attributeType.getNameOrOID(), entry |
| | | .getDN().toString()); |
| | | .getName().toString()); |
| | | } |
| | | } |
| | | // FIXME: else to be consistent... |
| | |
| | | { |
| | | TRACER.debugWarning("User %s is considered administratively " |
| | | + "disabled because an error occurred while " |
| | | + "attempting to make the determination: %s.", userEntry.getDN() |
| | | + "attempting to make the determination: %s.", userEntry.getName() |
| | | .toString(), stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | { |
| | | TRACER.debugInfo("User %s is not administratively disabled since " |
| | | + "the attribute \"%s\" is not present in the entry.", userEntry |
| | | .getDN().toString(), OP_ATTR_ACCOUNT_DISABLED); |
| | | .getName().toString(), OP_ATTR_ACCOUNT_DISABLED); |
| | | } |
| | | return false; |
| | | } |
| | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("User %s %s administratively disabled.", userEntry |
| | | .getDN().toString(), ((isDisabled == ConditionResult.TRUE) ? " is" |
| | | .getName().toString(), ((isDisabled == ConditionResult.TRUE) ? " is" |
| | | : " is not")); |
| | | } |
| | | |