| | |
| | | { |
| | | if (! (isInternalOperation() || isSynchronizationOperation())) |
| | | { |
| | | setResultCode(ResultCode.UNWILLING_TO_PERFORM); |
| | | setResultCode(ResultCode.CONSTRAINT_VIOLATION); |
| | | appendErrorMessage(ERR_ADD_ATTR_IS_NO_USER_MOD.get( |
| | | String.valueOf(entryDN), |
| | | at.getNameOrOID())); |
| | |
| | | { |
| | | if (! (isInternalOperation() || isSynchronizationOperation())) |
| | | { |
| | | setResultCode(ResultCode.UNWILLING_TO_PERFORM); |
| | | setResultCode(ResultCode.CONSTRAINT_VIOLATION); |
| | | appendErrorMessage(ERR_ADD_ATTR_IS_NO_USER_MOD.get( |
| | | String.valueOf(entryDN), |
| | | at.getNameOrOID())); |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_ADD_MISSING_RDN_ATTRIBUTE.get( |
| | | String.valueOf(entryDN), n)); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_ADD_MISSING_RDN_ATTRIBUTE.get( |
| | | String.valueOf(entryDN), n)); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_ADD_MISSING_RDN_ATTRIBUTE.get( |
| | | String.valueOf(entryDN),n)); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_ADD_MISSING_RDN_ATTRIBUTE.get( |
| | | String.valueOf(entryDN),n)); |
| | | } |
| | |
| | | // passwords. |
| | | Message message = ERR_PWPOLICY_ATTRIBUTE_OPTIONS_NOT_ALLOWED.get( |
| | | passwordAttribute.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | Attribute passwordAttr = attrList.get(0); |
| | |
| | | { |
| | | Message message = ERR_PWPOLICY_ATTRIBUTE_OPTIONS_NOT_ALLOWED.get( |
| | | passwordAttribute.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | if (passwordAttr.isEmpty()) |
| | |
| | | |
| | | Message message = ERR_PWPOLICY_MULTIPLE_PW_VALUES_NOT_ALLOWED |
| | | .get(passwordAttribute.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | List<PasswordStorageScheme<?>> defaultStorageSchemes = |
| | |
| | | |
| | | Message message = ERR_PWPOLICY_PREENCODED_NOT_ALLOWED.get( |
| | | passwordAttribute.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | | } |
| | |
| | | |
| | | Message message = ERR_PWPOLICY_PREENCODED_NOT_ALLOWED.get( |
| | | passwordAttribute.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | | } |
| | |
| | | Message message = ERR_PWPOLICY_VALIDATION_FAILED. |
| | | get(passwordAttribute.getNameOrOID(), |
| | | String.valueOf(invalidReason)); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (at.isObsolete()) |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | WARN_ADD_ATTR_IS_OBSOLETE.get( |
| | | String.valueOf(entryDN), |
| | | at.getNameOrOID())); |
| | |
| | | { |
| | | if (at.isObsolete()) |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | WARN_ADD_ATTR_IS_OBSOLETE.get( |
| | | String.valueOf(entryDN), |
| | | at.getNameOrOID())); |
| | |
| | | { |
| | | if (oc.isObsolete()) |
| | | { |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | WARN_ADD_OC_IS_OBSOLETE.get( |
| | | String.valueOf(entryDN), |
| | | oc.getNameOrOID())); |