View Javadoc

1   /* 
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.serializer;
18  
19  import org.apache.jetspeed.exception.JetspeedException;
20  import org.apache.jetspeed.i18n.KeyedMessage;
21  
22  /***
23   * <p>Exception throwns by members of the security service.</p>
24   *
25   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
26   */
27  public class SerializerException extends JetspeedException
28  {
29      /*** The serial version uid. */
30      private static final long serialVersionUID = -8823877029853488431L;
31  
32      /*** <p>Component Manager does not exist exception message.</p> */
33      public static final KeyedMessage COMPONENTMANAGER_DOES_NOT_EXIST = new KeyedMessage("The component manager {0} does not exist.");
34  
35      /*** <p>Creating the serilized Object failed </p> */
36      public static final KeyedMessage GET_EXISTING_OBJECTS = new KeyedMessage("Get existing objects for {0} failed with message {1}");
37  
38      /*** <p>Creating the serilized Object failed </p> */
39      public static final KeyedMessage CREATE_SERIALIZED_OBJECT_FAILED = new KeyedMessage("Creating a serialized representation of {0} failed with message {1}");
40  
41      /*** <p>Creating the serilized Object failed </p> */
42      public static final KeyedMessage CREATE_OBJECT_FAILED = new KeyedMessage("Creating an instance from a serialized representation of {0} failed with message {1}");
43  
44      /*** <p>Component Manager already initialized</p> */
45      public static final KeyedMessage COMPONENT_MANAGER_EXISTS = new KeyedMessage("Component Manager already established");
46  
47  
48      /*** <p>Filename already exists</p> */
49      public static final KeyedMessage FILE_ALREADY_EXISTS = new KeyedMessage("File {0} already exists");
50  
51      /*** <p>Filename already exists</p> */
52      public static final KeyedMessage FILE_BACKUP_FAILED = new KeyedMessage("File {0} backup failed. Could create new name.");
53  
54      /*** <p>io error</p> */
55      public static final KeyedMessage FILE_PROCESSING_ERROR = new KeyedMessage("Error processing File {0} : {1}");
56      /*** <p>writer error</p> */
57      public static final KeyedMessage FILE_WRITER_ERROR = new KeyedMessage("Error creating Writer for {0} : {1}");
58      /*** <p>reader error</p> */
59      public static final KeyedMessage FILE_READER_ERROR = new KeyedMessage("Error creating Reader for {0} : {1}");
60      
61      /*** <p>version problem -  version in XML file is not compatible with current environment </p> */
62      public static final KeyedMessage INCOMPETIBLE_VERSION  = new KeyedMessage("Incompetible version in {0} : CurrentVersion = {1}, RequestedVersion = {2}");
63      
64      
65      /***
66       * <p>Default Constructor.</p>
67       */
68      public SerializerException()
69      {
70          super();
71      }
72  
73      public SerializerException(Throwable t)
74      {
75          super(t);
76      }
77      
78      /***
79       * <p>Constructor with exception message.</p>
80       * @param message The exception message.
81       */
82      public SerializerException(KeyedMessage typedMessage)
83      {
84          super(typedMessage);
85      }
86  
87      /***
88       * <p>Constructor with exception message and nested exception.</p>
89       * @param msg The exception message.
90       * @param nested Nested exception.
91       */
92      public SerializerException(KeyedMessage msg, Throwable nested)
93      {
94          super(msg, nested);
95      }
96  
97  }