~ubuntu-branches/ubuntu/lucid/libstruts1.2-java/lucid

« back to all changes in this revision

Viewing changes to contrib/scaffold/src/java/org/apache/struts/scaffold/BizForm.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-24 12:14:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060424121423-naev53qigqgks0sa
Tags: 1.2.9-1
New upstream  release Fixes  three security  problems: CVE-2006-1546,
CVE-2006-1547,  CVE-2006-1548  (closes:  #360551),  thanks  to  Moritz
Muehlenhoff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Header: /home/cvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/BizForm.java,v 1.4 2004/03/14 07:15:03 sraeburn Exp $
3
 
 * $Revision: 1.4 $
4
 
 * $Date: 2004/03/14 07:15:03 $
5
 
 *
6
 
 * Copyright 2001-2004 The Apache Software Foundation.
7
 
 * 
8
 
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 
 * you may not use this file except in compliance with the License.
10
 
 * 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, software
15
 
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 
 * See the License for the specific language governing permissions and
18
 
 * limitations under the License.
19
 
 */
20
 
 
21
 
 
22
 
package org.apache.struts.scaffold;
23
 
 
24
 
 
25
 
import javax.servlet.http.HttpServletRequest;
26
 
 
27
 
import org.apache.struts.action.ActionErrors;
28
 
// import org.apache.struts.validator.ValidatorForm; // Struts 1.1
29
 
import com.wintecinc.struts.action.ValidatorForm; // Struts 1.0.x
30
 
 
31
 
import org.apache.commons.scaffold.lang.Tokens;
32
 
import org.apache.commons.scaffold.util.BizRequest;
33
 
import org.apache.commons.scaffold.util.Message;
34
 
import org.apache.commons.scaffold.util.MessageImpl;
35
 
import org.apache.commons.scaffold.util.Messages;
36
 
import org.apache.commons.scaffold.util.MessagesImpl;
37
 
 
38
 
 
39
 
/**
40
 
 * A BizForm creates and validates a business request 
41
 
 * [<code>org.apache.commons.scaffold.BizRequest</code>]
42
 
 * as part of its own validation routine.
43
 
 * A BizForm is typically procesed by a business action 
44
 
 * [<code>org.apache.commons.scaffold.BizAction</code>]
45
 
 * which passes the business request to a business service 
46
 
 * [<code>org.apache.commons.scaffold.BizService</code>].
47
 
 * 
48
 
 * @version $Revision: 1.4 $ $Date: 2004/03/14 07:15:03 $
49
 
 */
50
 
public interface BizForm {
51
 
        
52
 
    /**
53
 
     * The session attribute key for our user profile bean ["USER_PROFILE"].
54
 
     * (Suggestion only, may be overridden by presentation framework
55
 
     */
56
 
    public static String USER_PROFILE_KEY = "USER_PROFILE";
57
 
 
58
 
    /**
59
 
     * Return our bizRequest property.
60
 
     */
61
 
    public BizRequest getBizRequest();
62
 
    
63
 
    /**
64
 
     * Set our bizRequest property.
65
 
     */
66
 
    public void setBizRequest(BizRequest bizRequest);
67
 
 
68
 
    /**
69
 
     * Factory method to create business request object.
70
 
     */
71
 
    public BizRequest createBizRequest(String bizType);
72
 
 
73
 
  
74
 
 // ------------------------------------------------------ User Profile
75
 
 
76
 
   /**
77
 
     * Return our userProfile property.
78
 
     */
79
 
    public Object getUserProfile();
80
 
    
81
 
    /**
82
 
     * Set our userProfile property.
83
 
     */
84
 
    public void setUserProfile(Object userProfile);
85
 
 
86
 
        /**
87
 
     * Returns name of result server to be used by this Action,
88
 
         * [BizRequest.USER_PROFILE_KEY]
89
 
         */
90
 
        public String getUserProfileName();
91
 
 
92
 
    /**
93
 
     * Retrieve from session under known key
94
 
     * (<code>ProcessBean.USER_PROFILE_KEY</code>).
95
 
     * Override this approach to implement another method (e.g cookies).
96
 
     * Also revise UpdateProfile action-mapping to store changes.
97
 
     *
98
 
     * @param request The HTTP request we are processing
99
 
     */
100
 
    public void resetUserProfile(HttpServletRequest request);
101
 
    
102
 
    /**
103
 
     * Return our remoteServer property.
104
 
     */
105
 
    public Object getRemoteServer();
106
 
 
107
 
    /**
108
 
     * Set our remoteServer property.
109
 
     */
110
 
    public void setRemoteServer(Object remoteServer);
111
 
 
112
 
    /**
113
 
     * Checks application scope for the remote server object
114
 
     * specified by <code>getRemoteServerName</code>
115
 
     */
116
 
    public void resetRemoteServer(HttpServletRequest request);
117
 
 
118
 
    /**
119
 
     * Copy messages from business tier message class to presentation 
120
 
     * tier error class.
121
 
     * :TODO: Refactor once everything is based on a root Commons 
122
 
     * Messages class.
123
 
     */
124
 
    public void addMessages(ActionErrors errors, Messages messages);
125
 
      
126
 
 
127
 
} // end BizForm
 
 
b'\\ No newline at end of file'