KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Header: $
3  * $Revision: $
4  * $Date: $
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  * Exception thrown to indicate that a limitation of available storage space
30  * has been reached or exceeded.
31  *
32  * @version $Revision: $
33  */

34 public class InsufficientStorageException
35     extends ContentException {
36     
37     
38     // ----------------------------------------------------------- Constructors
39

40     
41     /**
42      * Constructor.
43      *
44      * @param objectUri Uri of the object
45      * @param userUri Uri of the user
46      * @param details Details on the exception
47      */

48     public InsufficientStorageException(String JavaDoc objectUri, String JavaDoc userUri,
49                                         String JavaDoc details) {
50         super(Messages.format(InsufficientStorageException.class.getName(),
51                               objectUri, userUri, details));
52         
53         this.objectUri = objectUri;
54         this.userUri = userUri;
55         this.details = details;
56     }
57     
58     
59     // ----------------------------------------------------- Instance Variables
60

61     
62     /**
63      * Object URI.
64      */

65     private String JavaDoc objectUri;
66         
67     
68     /**
69      * User URI.
70      */

71     private String JavaDoc userUri;
72     
73     
74     /**
75      * Exception details.
76      */

77     private String JavaDoc details;
78     
79     
80     // ------------------------------------------------------------- Properties
81

82     
83     /**
84      * Returns the URI of the object.
85      *
86      * @return the object URI
87      */

88     public String JavaDoc getObjectUri() {
89         
90         if (objectUri == null) {
91             return new String JavaDoc();
92         } else {
93             return objectUri;
94         }
95     }
96     
97     
98     /**
99      * Returns the URI of the user.
100      *
101      * @return the user URI
102      */

103     public String JavaDoc getUserUri() {
104         
105         return userUri;
106     }
107     
108     
109     /**
110      * Returns a String containing details about the exception.
111      *
112      * @return details about the exception
113      */

114     public String JavaDoc getDetails() {
115         
116         return details;
117     }
118     
119     
120 }
121
122
Popular Tags