001/*
002 * Copyright 2011-2016 UnboundID Corp.
003 *
004 * This program is free software; you can redistribute it and/or modify
005 * it under the terms of the GNU General Public License (GPLv2 only)
006 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
007 * as published by the Free Software Foundation.
008 *
009 * This program is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012 * GNU General Public License for more details.
013 *
014 * You should have received a copy of the GNU General Public License
015 * along with this program; if not, see <http://www.gnu.org/licenses>.
016 */
017
018package com.unboundid.scim.sdk;
019
020/**
021 * Signals the specified version number does not match the resource's latest
022 * version number or a Service Provider refused to create a new,
023 * duplicate resource.
024 *
025 * This exception corresponds to HTTP response code 409 CONFLICT.
026 */
027public class ResourceConflictException extends SCIMException
028{
029  /**
030   * Create a new <code>ResourceConflictException</code> from the provided
031   * information.
032   *
033   * @param errorMessage  The error message for this SCIM exception.
034   */
035  public ResourceConflictException(final String errorMessage) {
036    super(409, errorMessage);
037  }
038
039  /**
040   * Create a new <code>ResourceConflictException</code> from the provided
041   * information.
042   *
043   * @param errorMessage  The error message for this SCIM exception.
044   * @param cause         The cause (which is saved for later retrieval by the
045   *                      {@link #getCause()} method).  (A <tt>null</tt> value
046   *                      is permitted, and indicates that the cause is
047   *                      nonexistent or unknown.)
048   */
049  public ResourceConflictException(final String errorMessage,
050                                   final Throwable cause) {
051    super(409, errorMessage, cause);
052  }
053}