Coverage details for org.chwf.resources.ResourceInitException

LineHitsSource
1 /*
2 Chrysalis Web Framework [http://chrysalis.sourceforge.net]
3 Copyright (c) 2002, 2003, 2004, Paul Strack
4  
5 All rights reserved.
6  
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9  
10 1. Redistributions of source code must retain the above copyright notice, this
11 list of conditions and the following disclaimer.
12  
13 2. Redistributions in binary form must reproduce the above copyright notice,
14 this list of conditions and the following disclaimer in the documentation
15 and/or other materials provided with the distribution.
16  
17 3. Neither the name of the copyright holder nor the names of its contributors
18 may be used to endorse or promote products derived from this software without
19 specific prior written permission.
20  
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
25 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32  
33 package org.chwf.resources;
34  
35 import org.chwf.i18n.RuntimeMessageException;
36  
37 /**
38  * Exception for resource initialization related errors.
39  *
40  * @author Paul Strack
41  */
42 public class ResourceInitException extends RuntimeMessageException {
43  
44   /** Message key */
45   static final String MESSAGE_ALREADY_INITIALIZED = "ALREADY_INITIALIZED";
46  
47   /** Message key */
48   static final String MESSAGE_NOT_INITIALIZED = "NOT_INITIALIZED";
49  
50   /** Message key */
51   static final String MESSAGE_WRONG_FACTORY_TYPE = "WRONG_FACTORY_TYPE";
52  
53   /** Message key */
54   static final String MESSAGE_RESOURCE_CLASS_NOT_FOUND =
55     "RESOURCE_CLASS_NOT_FOUND";
56  
57   /** Message key */
58   static final String MESSAGE_FACTORY_CLASS_NOT_FOUND =
59     "FACTORY_CLASS_NOT_FOUND";
60  
61   /** Message key */
62   static final String MESSAGE_NOT_A_RESOURCE_FACTORY = "NOT_A_RESOURCE_FACTORY";
63  
64   /** Message key */
65   static final String MESSAGE_FACTORY_NOT_CREATED = "FACTORY_NOT_CREATED";
66  
67   /** Message key */
68   static final String MESSAGE_FACTORY_NOT_FOUND = "FACTORY_NOT_FOUND";
69  
70   /** Message key */
71   static final String MESSAGE_MANAGEMENT_NOT_INITIALIZED =
72     "MANAGEMENT_NOT_INITIALIZED";
73  
74   /** Message key */
75   static final String MESSAGE_FACTORY_INIT_FAILED = "FACTORY_INIT_FAILED";
76  
77   /** Empty object array. */
781  private static final Object[] EMPTY_ARRAY = new Object[0];
79  
80   /**
81    * Constructor.
82    *
83    * @param key The key used for message lookup. If lookup fails, the key
84    * is used as the message pattern, following the rules of
85    * {@link java.text.MessageFormat}
86    * @param arguments The arguments for the pattern.
87    */
88   public ResourceInitException(String key, Object[] arguments) {
894    super(key, arguments);
904  }
91  
92   /**
93    * Constructor.
94    *
95    * @param key The key used for message lookup. If lookup fails, the key
96    * is used as the message pattern, following the rules of
97    * {@link java.text.MessageFormat}
98    */
99   public ResourceInitException(String key) {
1002    this(key, EMPTY_ARRAY);
1012  }
102 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.