01: /*
02: * Copyright 2000 The JA-SIG Collaborative. All rights reserved.
03: * See license distributed with this file and
04: * available online at http://www.uportal.org/license.html
05: */
06:
07: package org.jasig.portal;
08:
09: /**
10: * Exception thrown by the framework in response to an attempt to override a
11: * channel static data parameter when that parameter is not configured to be
12: * overridable.
13: *
14: * @author andrew.petro@YALE.EDU
15: * @author mboyd@sungardsct.com
16: * @since 2.6.0
17: */
18: public class IllegalChannelParameterOverrideException extends
19: RuntimeException {
20: /**
21: * The name of the channel parameter that could not be overridden.
22: */
23: private final String parameterName;
24:
25: /**
26: * The value that the parameter could not be set to because the parameter is
27: * not overridable.
28: */
29: private final String failedValue;
30:
31: /**
32: * Instantiate this exception, specifying the name of the parameter that
33: * could not be overridden and the value it could not be set to.
34: */
35: public IllegalChannelParameterOverrideException(
36: String parameterNameArg, String failedValueArg) {
37: super ("Could not override channel parameter ["
38: + parameterNameArg + "] with value [" + failedValueArg
39: + "] because this parameter is not configured to "
40: + "allow being overridden.");
41:
42: this .parameterName = parameterNameArg;
43: this .failedValue = failedValueArg;
44: }
45:
46: /**
47: * Get the name of the parameter that could not be overridden.
48: */
49: public String getParameterName() {
50: return this .parameterName;
51: }
52:
53: /**
54: * Get the value that the parameter could not be set to.
55: */
56: public String getFailedValue() {
57: return this.failedValue;
58: }
59: }
|