~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/struts-faces/src/example/org/apache/struts/webapp/example/ApplicationMapping.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 1999-2001,2004 The Apache Software Foundation.
 
3
 * 
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 * 
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 * 
 
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
 
 
17
 
 
18
package org.apache.struts.webapp.example;
 
19
 
 
20
 
 
21
import org.apache.struts.action.ActionMapping;
 
22
 
 
23
 
 
24
/**
 
25
 * Implementation of <strong>ActionMapping</strong> for the Struts
 
26
 * example application.  It defines the following custom properties:
 
27
 * <ul>
 
28
 * <li><b>failure</b> - The context-relative URI to which this request
 
29
 *     should be forwarded if a validation error occurs on the input
 
30
 *     information (typically goes back to the input form).
 
31
 * <li><b>success</b> - The context-relative URI to which this request
 
32
 *     should be forwarded if the requested action is successfully
 
33
 *     completed.
 
34
 * </ul>
 
35
 *
 
36
 * @author Craig R. McClanahan
 
37
 * @version $Revision: 1.2 $ $Date: 2004/03/08 02:49:52 $
 
38
 */
 
39
 
 
40
public final class ApplicationMapping extends ActionMapping {
 
41
 
 
42
 
 
43
    // --------------------------------------------------- Instance Variables
 
44
 
 
45
 
 
46
    /**
 
47
     * The failure URI for this mapping.
 
48
     */
 
49
    private String failure = null;
 
50
 
 
51
 
 
52
    /**
 
53
     * The success URI for this mapping.
 
54
     */
 
55
    private String success = null;
 
56
 
 
57
 
 
58
    // ----------------------------------------------------------- Properties
 
59
 
 
60
 
 
61
    /**
 
62
     * Return the failure URI for this mapping.
 
63
     */
 
64
    public String getFailure() {
 
65
 
 
66
        return (this.failure);
 
67
 
 
68
    }
 
69
 
 
70
 
 
71
    /**
 
72
     * Set the failure URI for this mapping.
 
73
     *
 
74
     * @param failure The failure URI for this mapping
 
75
     */
 
76
    public void setFailure(String failure) {
 
77
 
 
78
        this.failure = failure;
 
79
 
 
80
    }
 
81
 
 
82
 
 
83
    /**
 
84
     * Return the success URI for this mapping.
 
85
     */
 
86
    public String getSuccess() {
 
87
 
 
88
        return (this.success);
 
89
 
 
90
    }
 
91
 
 
92
 
 
93
    /**
 
94
     * Set the success URI for this mapping.
 
95
     *
 
96
     * @param success The success URI for this mapping
 
97
     */
 
98
    public void setSuccess(String success) {
 
99
 
 
100
        this.success = success;
 
101
 
 
102
    }
 
103
 
 
104
 
 
105
}