001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2010 Sun Microsystems, Inc. 025 * Portions Copyright 2013-2014 ForgeRock AS. 026 */ 027 028package org.forgerock.opendj.ldap; 029 030import org.forgerock.opendj.ldap.responses.Result; 031 032/** 033 * Thrown when the result code returned in a Result indicates that the update 034 * Request failed because it would have left the Directory in an inconsistent 035 * state. More specifically, this exception is used for the following error 036 * result codes: 037 * <ul> 038 * <li>{@link ResultCode#ATTRIBUTE_OR_VALUE_EXISTS ATTRIBUTE_OR_VALUE_EXISTS} - 039 * the Request failed because it would have resulted in a conflict with an 040 * existing attribute or attribute value in the target entry. 041 * <li>{@link ResultCode#NO_SUCH_ATTRIBUTE NO_SUCH_ATTRIBUTE} - the Request 042 * failed because it targeted an attribute or attribute value that did not exist 043 * in the specified entry. 044 * <li>{@link ResultCode#CONSTRAINT_VIOLATION CONSTRAINT_VIOLATION} - the 045 * Request failed because it would have violated some constraint defined in the 046 * server. 047 * <li>{@link ResultCode#ENTRY_ALREADY_EXISTS ENTRY_ALREADY_EXISTS} - the 048 * Request failed because it would have resulted in an entry that conflicts with 049 * an entry that already exists. 050 * <li>{@link ResultCode#INVALID_ATTRIBUTE_SYNTAX INVALID_ATTRIBUTE_SYNTAX} - 051 * the Request failed because it violated the syntax for a specified attribute. 052 * <li>{@link ResultCode#INVALID_DN_SYNTAX INVALID_DN_SYNTAX} - the Request 053 * failed because it would have resulted in an entry with an invalid or 054 * malformed DN. 055 * <li>{@link ResultCode#NAMING_VIOLATION NAMING_VIOLATION} - the Request failed 056 * becauseit would have violated the server's naming configuration. 057 * <li>{@link ResultCode#NOT_ALLOWED_ON_NONLEAF NOT_ALLOWED_ON_NONLEAF} - the 058 * Request failed because it is not allowed for non-leaf entries. 059 * <li>{@link ResultCode#NOT_ALLOWED_ON_RDN NOT_ALLOWED_ON_RDN} - the Request 060 * failed because it is not allowed on an RDN attribute. 061 * <li>{@link ResultCode#OBJECTCLASS_MODS_PROHIBITED 062 * OBJECTCLASS_MODS_PROHIBITED} - the Request failed because it would have 063 * modified the objectclasses associated with an entry in an illegal manner. 064 * <li>{@link ResultCode#OBJECTCLASS_VIOLATION OBJECTCLASS_VIOLATION} - the 065 * Request failed because it would have resulted in an entry that violated the 066 * server schema. 067 * <li>{@link ResultCode#UNDEFINED_ATTRIBUTE_TYPE UNDEFINED_ATTRIBUTE_TYPE} - 068 * the Request failed because it referenced an attribute that is not defined in 069 * the server schema. 070 * </ul> 071 */ 072@SuppressWarnings("serial") 073public class ConstraintViolationException extends LdapException { 074 ConstraintViolationException(final Result result) { 075 super(result); 076 } 077}