01: /*
02: * Copyright 2006 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.core.exceptions;
17:
18: import org.kuali.RiceKeyConstants;
19:
20: /**
21: * This class represents an exception that is thrown when a given user is not authorized to initiate a
22: * certain document type.
23: */
24: public class DocumentInitiationAuthorizationException extends
25: RuntimeException {
26: private static final long serialVersionUID = -3874239711783179351L;
27:
28: private String errorMessageKey;
29: private String[] messageParameters;
30:
31: public DocumentInitiationAuthorizationException(
32: String errorMessageKey, String[] messageParameters) {
33: this .errorMessageKey = errorMessageKey;
34: this .messageParameters = messageParameters;
35: }
36:
37: public DocumentInitiationAuthorizationException(
38: String[] messageParameters) {
39: this .errorMessageKey = RiceKeyConstants.AUTHORIZATION_ERROR_DOCUMENT_WORKGROUP;
40: this .messageParameters = messageParameters;
41: }
42:
43: /**
44: * Gets the errorMessageKey attribute.
45: * @return Returns the errorMessageKey.
46: */
47: public String getErrorMessageKey() {
48: return errorMessageKey;
49: }
50:
51: /**
52: * Sets the errorMessageKey attribute value.
53: * @param errorMessageKey The errorMessageKey to set.
54: */
55: public void setErrorMessageKey(String errorMessageKey) {
56: this .errorMessageKey = errorMessageKey;
57: }
58:
59: /**
60: * Gets the messageParameters attribute.
61: * @return Returns the messageParameters.
62: */
63: public String[] getMessageParameters() {
64: return messageParameters;
65: }
66:
67: /**
68: * Sets the messageParameters attribute value.
69: * @param messageParameters The messageParameters to set.
70: */
71: public void setMessageParameters(String[] messageParameters) {
72: this.messageParameters = messageParameters;
73: }
74: }
|