001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.serializer;
018:
019: import org.apache.jetspeed.exception.JetspeedException;
020: import org.apache.jetspeed.i18n.KeyedMessage;
021:
022: /**
023: * <p>Exception throwns by members of the security service.</p>
024: *
025: * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
026: */
027: public class SerializerException extends JetspeedException {
028: /** The serial version uid. */
029: private static final long serialVersionUID = -8823877029853488431L;
030:
031: /** <p>Component Manager does not exist exception message.</p> */
032: public static final KeyedMessage COMPONENTMANAGER_DOES_NOT_EXIST = new KeyedMessage(
033: "The component manager {0} does not exist.");
034:
035: /** <p>Creating the serilized Object failed </p> */
036: public static final KeyedMessage GET_EXISTING_OBJECTS = new KeyedMessage(
037: "Get existing objects for {0} failed with message {1}");
038:
039: /** <p>Creating the serilized Object failed </p> */
040: public static final KeyedMessage CREATE_SERIALIZED_OBJECT_FAILED = new KeyedMessage(
041: "Creating a serialized representation of {0} failed with message {1}");
042:
043: /** <p>Creating the serilized Object failed </p> */
044: public static final KeyedMessage CREATE_OBJECT_FAILED = new KeyedMessage(
045: "Creating an instance from a serialized representation of {0} failed with message {1}");
046:
047: /** <p>Component Manager already initialized</p> */
048: public static final KeyedMessage COMPONENT_MANAGER_EXISTS = new KeyedMessage(
049: "Component Manager already established");
050:
051: /** <p>Filename already exists</p> */
052: public static final KeyedMessage FILE_ALREADY_EXISTS = new KeyedMessage(
053: "File {0} already exists");
054:
055: /** <p>Filename already exists</p> */
056: public static final KeyedMessage FILE_BACKUP_FAILED = new KeyedMessage(
057: "File {0} backup failed. Could create new name.");
058:
059: /** <p>io error</p> */
060: public static final KeyedMessage FILE_PROCESSING_ERROR = new KeyedMessage(
061: "Error processing File {0} : {1}");
062: /** <p>writer error</p> */
063: public static final KeyedMessage FILE_WRITER_ERROR = new KeyedMessage(
064: "Error creating Writer for {0} : {1}");
065: /** <p>reader error</p> */
066: public static final KeyedMessage FILE_READER_ERROR = new KeyedMessage(
067: "Error creating Reader for {0} : {1}");
068:
069: /** <p>version problem - version in XML file is not compatible with current environment </p> */
070: public static final KeyedMessage INCOMPETIBLE_VERSION = new KeyedMessage(
071: "Incompetible version in {0} : CurrentVersion = {1}, RequestedVersion = {2}");
072:
073: /**
074: * <p>Default Constructor.</p>
075: */
076: public SerializerException() {
077: super ();
078: }
079:
080: public SerializerException(Throwable t) {
081: super (t);
082: }
083:
084: /**
085: * <p>Constructor with exception message.</p>
086: * @param message The exception message.
087: */
088: public SerializerException(KeyedMessage typedMessage) {
089: super (typedMessage);
090: }
091:
092: /**
093: * <p>Constructor with exception message and nested exception.</p>
094: * @param msg The exception message.
095: * @param nested Nested exception.
096: */
097: public SerializerException(KeyedMessage msg, Throwable nested) {
098: super(msg, nested);
099: }
100:
101: }
|