1 /* 2 * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.properties.resource.domain; 17 18 import de.smartics.properties.api.core.app.AbstractBaseMessageBean; 19 import de.smartics.properties.api.core.app.PropertyRootException; 20 import de.smartics.properties.resource.app.ResourcesCode; 21 22 /** 23 * Signals problems dealing with a resource. This is the root exception of the 24 * {@link de.smartics.properties.resource resource} package. 25 */ 26 public class ResourceException extends PropertyRootException 27 { 28 // ********************************* Fields ********************************* 29 30 // --- constants ------------------------------------------------------------ 31 32 /** 33 * The class version identifier. 34 * <p> 35 * The value of this constant is {@value}. 36 * </p> 37 */ 38 private static final long serialVersionUID = 1L; 39 40 // --- members -------------------------------------------------------------- 41 42 // ****************************** Initializer ******************************* 43 44 // ****************************** Constructors ****************************** 45 46 /** 47 * Constructor without a cause. 48 * 49 * @param code the error or exception code of the exception. 50 */ 51 public ResourceException(final ResourcesCode code) 52 { 53 super(code); 54 } 55 56 /** 57 * Default constructor. 58 * 59 * @param cause the cause (which is saved for later retrieval by the 60 * {@link #getCause()} method). (A <tt>null</tt> value is permitted, 61 * and indicates that the cause is nonexistent or unknown.) 62 * @param code the error or exception code of the exception. 63 */ 64 public ResourceException(final Throwable cause, final ResourcesCode code) 65 { 66 super(cause, code); 67 } 68 69 /** 70 * Default constructor with a message bean. 71 * 72 * @param messageBean the message information for the exception. 73 */ 74 public ResourceException(final AbstractBaseMessageBean messageBean) 75 { 76 super(messageBean); 77 } 78 79 // ****************************** Inner Classes ***************************** 80 81 // ********************************* Methods ******************************** 82 83 // --- init ----------------------------------------------------------------- 84 85 // --- get&set -------------------------------------------------------------- 86 87 // --- business ------------------------------------------------------------- 88 89 // --- object basics -------------------------------------------------------- 90 91 }