01: /*
02: * $Id: ApplicationMapping.java 471754 2006-11-06 14:55:09Z husted $
03: *
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21:
22: package org.apache.struts.webapp.example;
23:
24: import org.apache.struts.action.ActionMapping;
25:
26: /**
27: * Implementation of <strong>ActionMapping</strong> for the Struts
28: * example application. It defines the following custom properties:
29: * <ul>
30: * <li><b>failure</b> - The context-relative URI to which this request
31: * should be forwarded if a validation error occurs on the input
32: * information (typically goes back to the input form).
33: * <li><b>success</b> - The context-relative URI to which this request
34: * should be forwarded if the requested action is successfully
35: * completed.
36: * </ul>
37: *
38: * @author Craig R. McClanahan
39: * @version $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
40: */
41:
42: public final class ApplicationMapping extends ActionMapping {
43:
44: // --------------------------------------------------- Instance Variables
45:
46: /**
47: * The failure URI for this mapping.
48: */
49: private String failure = null;
50:
51: /**
52: * The success URI for this mapping.
53: */
54: private String success = null;
55:
56: // ----------------------------------------------------------- Properties
57:
58: /**
59: * Return the failure URI for this mapping.
60: */
61: public String getFailure() {
62:
63: return (this .failure);
64:
65: }
66:
67: /**
68: * Set the failure URI for this mapping.
69: *
70: * @param failure The failure URI for this mapping
71: */
72: public void setFailure(String failure) {
73:
74: this .failure = failure;
75:
76: }
77:
78: /**
79: * Return the success URI for this mapping.
80: */
81: public String getSuccess() {
82:
83: return (this .success);
84:
85: }
86:
87: /**
88: * Set the success URI for this mapping.
89: *
90: * @param success The success URI for this mapping
91: */
92: public void setSuccess(String success) {
93:
94: this.success = success;
95:
96: }
97:
98: }
|