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 $
4
* $Date: 2004/03/14 07:15:03 $
6
* Copyright 2001-2004 The Apache Software Foundation.
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
12
* http://www.apache.org/licenses/LICENSE-2.0
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.
22
package org.apache.struts.scaffold;
25
import javax.servlet.http.HttpServletRequest;
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
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;
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>].
48
* @version $Revision: 1.4 $ $Date: 2004/03/14 07:15:03 $
50
public interface BizForm {
53
* The session attribute key for our user profile bean ["USER_PROFILE"].
54
* (Suggestion only, may be overridden by presentation framework
56
public static String USER_PROFILE_KEY = "USER_PROFILE";
59
* Return our bizRequest property.
61
public BizRequest getBizRequest();
64
* Set our bizRequest property.
66
public void setBizRequest(BizRequest bizRequest);
69
* Factory method to create business request object.
71
public BizRequest createBizRequest(String bizType);
74
// ------------------------------------------------------ User Profile
77
* Return our userProfile property.
79
public Object getUserProfile();
82
* Set our userProfile property.
84
public void setUserProfile(Object userProfile);
87
* Returns name of result server to be used by this Action,
88
* [BizRequest.USER_PROFILE_KEY]
90
public String getUserProfileName();
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.
98
* @param request The HTTP request we are processing
100
public void resetUserProfile(HttpServletRequest request);
103
* Return our remoteServer property.
105
public Object getRemoteServer();
108
* Set our remoteServer property.
110
public void setRemoteServer(Object remoteServer);
113
* Checks application scope for the remote server object
114
* specified by <code>getRemoteServerName</code>
116
public void resetRemoteServer(HttpServletRequest request);
119
* Copy messages from business tier message class to presentation
121
* :TODO: Refactor once everything is based on a root Commons
124
public void addMessages(ActionErrors errors, Messages messages);
b'\\ No newline at end of file'