KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > content > RevisionContentNotFoundException


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/RevisionContentNotFoundException.java,v 1.7 2004/07/28 09:37:53 ib Exp $
3  * $Revision: 1.7 $
4  * $Date: 2004/07/28 09:37:53 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.content;
25
26 import org.apache.slide.util.Messages;
27
28 /**
29  * Revision content not found.
30  *
31  * @version $Revision: 1.7 $
32  */

33 public class RevisionContentNotFoundException extends ContentException {
34     
35     
36     // ----------------------------------------------------------- Constructors
37

38     
39     /**
40      * Constructor.
41      *
42      * @param objectUri Uri of the object
43      * @param number The number of the revision
44      */

45     public RevisionContentNotFoundException(String JavaDoc objectUri,
46                                             NodeRevisionNumber number) {
47         super(Messages.format(RevisionContentNotFoundException.class.getName(),
48                               number, objectUri));
49         this.objectUri = objectUri;
50         this.number = number;
51     }
52     
53     
54     // ----------------------------------------------------- Instance Variables
55

56     
57     /**
58      * Object Uri.
59      */

60     private String JavaDoc objectUri;
61     
62     
63     /**
64      * Revision number.
65      */

66     private NodeRevisionNumber number;
67     
68     
69     // ------------------------------------------------------------- Properties
70

71     
72     /**
73      * Object Uri accessor.
74      *
75      * @return String object Uri
76      */

77     public String JavaDoc getObjectUri() {
78         if (objectUri == null) {
79             return new String JavaDoc();
80         } else {
81             return objectUri;
82         }
83     }
84     
85     
86     /**
87      * Revision number accessor.
88      *
89      * @return NodeRevisionNumber
90      */

91     public NodeRevisionNumber getNumber() {
92         return number;
93     }
94     
95 }
96
Popular Tags