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 2015 ForgeRock AS 025 */ 026package org.opends.server.backends.pluggable.spi; 027 028/** 029 * Thrown when the server or a tool attempts to access the storage while it is read-only. 030 */ 031@SuppressWarnings("serial") 032public final class ReadOnlyStorageException extends StorageRuntimeException 033{ 034 035 /** Constructor with default error message. */ 036 public ReadOnlyStorageException() 037 { 038 this("This storage is read-only."); 039 } 040 041 /** 042 * Constructor with a message and a cause. 043 * 044 * @param message 045 * the exception message 046 * @param cause 047 * the cause of the exception 048 */ 049 public ReadOnlyStorageException(String message, Throwable cause) 050 { 051 super(message, cause); 052 } 053 054 /** 055 * Constructor with a message. 056 * 057 * @param message 058 * the exception message 059 */ 060 public ReadOnlyStorageException(String message) 061 { 062 super(message); 063 } 064 065 /** 066 * Constructor with a cause. 067 * 068 * @param cause 069 * the cause of the exception 070 */ 071 public ReadOnlyStorageException(Throwable cause) 072 { 073 super(cause); 074 } 075 076}