001 /*
002 * Copyright 2011-2015 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2015 UnboundID Corp.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021 package com.unboundid.ldap.sdk.unboundidds;
022
023
024
025 import com.unboundid.util.LDAPSDKException;
026 import com.unboundid.util.NotMutable;
027 import com.unboundid.util.ThreadSafety;
028 import com.unboundid.util.ThreadSafetyLevel;
029
030
031
032 /**
033 * <BLOCKQUOTE>
034 * <B>NOTE:</B> This class is part of the Commercial Edition of the UnboundID
035 * LDAP SDK for Java. It is not available for use in applications that
036 * include only the Standard Edition of the LDAP SDK, and is not supported for
037 * use in conjunction with non-UnboundID products.
038 * </BLOCKQUOTE>
039 * This class provides an exception that may be thrown when attempting to obtain
040 * the value of an updated attribute as it appeared before or after a change
041 * was processed, but the number of values for that attribute exceeded the
042 * maximum number to include in a changelog entry.
043 */
044 @NotMutable()
045 @ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
046 public final class ChangeLogEntryAttributeExceededMaxValuesException
047 extends LDAPSDKException
048 {
049 /**
050 * The serial version UID for this serializable class.
051 */
052 private static final long serialVersionUID = -9108989779921909512L;
053
054
055
056 // The object providing information about the attribute that had more values
057 // than could be included in a changelog entry.
058 private final ChangeLogEntryAttributeExceededMaxValuesCount attrInfo;
059
060
061
062 /**
063 * Creates a new instance of this exception with the provided object.
064 *
065 * @param message The message to use for the exception.
066 * @param attrInfo An object providing information about the attribute that
067 * had more values than could be included in a changelog
068 * entry before and/or after the change was processed.
069 */
070 public ChangeLogEntryAttributeExceededMaxValuesException(
071 final String message,
072 final ChangeLogEntryAttributeExceededMaxValuesCount attrInfo)
073 {
074 super(message);
075
076 this.attrInfo = attrInfo;
077 }
078
079
080
081 /**
082 * Retrieves an object providing information about the attribute that had more
083 * values than could be included in a changelog entry before and/or after the
084 * change was processed.
085 *
086 * @return An object providing information about the attribute that had more
087 * values than could be included in a changelog entry before and/or
088 * after the change was processed.
089 */
090 public ChangeLogEntryAttributeExceededMaxValuesCount getAttributeInfo()
091 {
092 return attrInfo;
093 }
094 }