Source Code Cross Referenced for ActionConfig.java in  » Portal » stringbeans-3.5 » com » nabhinc » portlet » mvcportlet » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » stringbeans 3.5 » com.nabhinc.portlet.mvcportlet.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * (C) Copyright 2004 Nabh Information Systems, Inc.
003:         *
004:         * All copyright notices regarding Nabh's products MUST remain
005:         * intact in the scripts and in the outputted HTML.
006:         * This program is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public License
008:         * as published by the Free Software Foundation; either version 2.1 
009:         * of the License, or (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
019:         *
020:         */
021:        package com.nabhinc.portlet.mvcportlet.core;
022:
023:        /**
024:         * Configuration associated with an action type, i.e., a
025:         * request type used in processAction method of ControllerPortlet.
026:         *
027:         * @author Padmanabh Dabke
028:         * (c) 2004 Nabh Information Systems, Inc. All Rights Reserved.
029:         */
030:        public class ActionConfig extends RequestConfig {
031:
032:            /**
033:             * Should we validate the form associated with this action type.
034:             */
035:            private boolean acValidateForm = true;
036:
037:            /**
038:             * Should we transfer parameters on ActionRequest to render
039:             * request or session.
040:             */
041:            private boolean acSetRenderParameters = true;
042:
043:            /**
044:             * Associated ActionProcessor
045:             */
046:            private ActionProcessor acActionProcessor = null;
047:
048:            /**
049:             * Maximum size of an uploaded file.
050:             * Relevant only when this action is used to upload files.
051:             */
052:            private long acMaxFileSize = 1000000;
053:
054:            /**
055:             * File size threshold beyond which the file is
056:             * temporarily written down to a disk.
057:             * Relevant only when this action is used to upload files.
058:             */
059:            private int acThreshold = 500000;
060:
061:            /**
062:             * Should we wrap multipart requests (i.e. file upload
063:             * requests) in a wrapper request that provides seamless
064:             * access to request parameters and uploaded files.
065:             */
066:            private boolean acWrapMultipart = true;
067:
068:            /**
069:             * Scope of this action. This is used in transferring ActionRequest
070:             * parameters to render request/portlet session.
071:             */
072:            private int acScope = Constants.SCOPE_UNSPECIFIED;
073:
074:            /**
075:             * Returns the ActionProcessor associated with this action type.
076:             * @return ActionProcessor associated with this action type.
077:             */
078:            public ActionProcessor getActionProcessor() {
079:                return acActionProcessor;
080:            }
081:
082:            /**
083:             * Sets ActionProcessor associated with this action type.
084:             * @param pr ActionProcessor object corresponding to this action type.
085:             */
086:            public void setActionProcessor(ActionProcessor pr) {
087:                acActionProcessor = pr;
088:            }
089:
090:            /**
091:             * Returns the flag indicating whether the form associated with this
092:             * action type should be validated in processAction method.
093:             */
094:            public boolean isValidateForm() {
095:                return acValidateForm;
096:            }
097:
098:            /**
099:             * Sets the flag indicating whether form validation is on or off.
100:             * @param validate Validation flag
101:             */
102:
103:            public void setValidateForm(boolean validate) {
104:                acValidateForm = validate;
105:            }
106:
107:            /**
108:             * Returns flag indicating if ActionRequest parameters are to
109:             * be copied to render request/portlet session.
110:             * @return Flag indicating if ActionRequest parameters are to
111:             * be transferred.
112:             */
113:            public boolean isSetRenderParameters() {
114:                return acSetRenderParameters;
115:            }
116:
117:            /**
118:             * Sets the flag indicating if ActionRequest parameters are to
119:             * be copied to render request/portlet session.
120:             * @param flag
121:             */
122:            public void setSetRenderParameters(boolean flag) {
123:                acSetRenderParameters = flag;
124:            }
125:
126:            /**
127:             * Sets the maximum size of an uploaded file.
128:             * Relevant only when this action is used to upload files.
129:             * @param fileSize Maximum upload file size in bytes.
130:             */
131:            public void setMaxFileSize(long fileSize) {
132:                acMaxFileSize = fileSize;
133:            }
134:
135:            /**
136:             * Returns the maximum size of an uploaded file.
137:             * Relevant only when this action is used to upload files.
138:             * @return Maximum upload file size in bytes
139:             */
140:            public long getMaxFileSize() {
141:                return acMaxFileSize;
142:            }
143:
144:            /**
145:             * Sets the file size threshold beyond which the file is
146:             * temporarily written down to a disk.
147:             * Relevant only when this action is used to upload files.
148:             * @param threshold Threshold in bytes
149:             */
150:            public void setThreshold(int threshold) {
151:                acThreshold = threshold;
152:            }
153:
154:            /**
155:             * Sets the file size threshold beyond which the file is
156:             * temporarily written down to a disk.
157:             * Relevant only when this action is used to upload files.
158:             * @return Threshold in bytes.
159:             */
160:            public int getThreshold() {
161:                return acThreshold;
162:            }
163:
164:            /**
165:             * Retrieves action scope. This value affects the way ActionRequest
166:             * parameters are processed. If the scope is Constants.SCOPE_REQUEST,
167:             * action paramters are copied to render parameters. If the scope
168:             * is Constants.SCOPE_PORTLET_SESSION, the action parameters are
169:             * copied as attributes on portlet session within the portlet scope.
170:             * If the scope is Constants.SCOPE_APPLICATION_SESSION, the action
171:             * parameters are coped to attributes on portlet session under
172:             * application scope, else those parameters will be set as 
173:             * attributes under the portlet context.
174:             * @return Scope of this action: Constants.SCOPE_REQUEST,
175:             * Constants.SCOPE_PORTLET_SESSION, Costants.SCOPE_APPLICATION_SESSION,
176:             * or Constants.SCOPE_PORTLET_CONTEXT
177:             */
178:            public int getScope() {
179:                return acScope;
180:            }
181:
182:            /**
183:             * Sets action scope. This value affects the way ActionRequest
184:             * parameters are processed. If the scope is Constants.SCOPE_REQUEST,
185:             * action paramters are copied to render parameters. If the scope
186:             * is Constants.SCOPE_PORTLET_SESSION, the action parameters are
187:             * copied as attributes on portlet session within the portlet scope.
188:             * If the scope is Constants.SCOPE_APPLICATION_SESSION, the action
189:             * parameters are copied to attributes on portlet session under
190:             * application scope, else those parameters will be set as  
191:             * portlet context attributes so that they are available globally.
192:             * @param scope Scope of this action: Constants.SCOPE_REQUEST,
193:             * Constants.SCOPE_PORTLET_SESSION, Costants.SCOPE_APPLICATION_SESSION, 
194:             * or Constants.SCOPE_PORTLET_CONTEXT.
195:             */
196:            public void setScope(int scope) {
197:                acScope = scope;
198:            }
199:
200:            /**
201:             * Get the flag indicating if a multipart (file upload) request
202:             * should be wrapped in a convenience request wrapper that makes
203:             * the request parameters and files accessible as regular parameters
204:             * and attributes.
205:             * @return Returns true multipart requests would be wrapped in a
206:             * request wrapper.
207:             */
208:            public boolean isWrapMultipart() {
209:                return acWrapMultipart;
210:            }
211:
212:            /**
213:             * Sets the flag indicating if a multipart (file upload) request
214:             * should be wrapped in a convenience request wrapper that makes
215:             * the request parameters and files accessible as regular parameters
216:             * and attributes.
217:             * @param flag If true multipart requests would be wrapped in a
218:             * request wrapper.
219:             */
220:            public void setWrapMultipart(boolean flag) {
221:                acWrapMultipart = flag;
222:            }
223:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.