Source Code Cross Referenced for HookForm.java in  » Workflow-Engines » bonita-v3.1 » hero » struts » forms » 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 » Workflow Engines » bonita v3.1 » hero.struts.forms 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package hero.struts.forms;
002:
003:        import javax.servlet.http.HttpServletRequest;
004:        import org.apache.struts.action.ActionError;
005:        import org.apache.struts.action.ActionErrors;
006:        import org.apache.struts.action.ActionForm;
007:        import org.apache.struts.action.ActionMapping;
008:
009:        /**
010:         * Form bean for the Hook.  This form has the following fields,
011:         * with default values in square brackets:
012:         * <ul>
013:         * <li><b>name</b> - The name of the hook.  [REQUIRED]
014:         * <li><b>event</b> - The event for this hook.  [REQUIRED]
015:         * <li><b>type</b> - The hook type [REQUIRED]
016:         * </ul>
017:         *
018:         * @author Miguel Valdes Faura
019:         * @version $Revision: 1.1 $ $Date: 2004/07/30 14:57:57 $
020:         */
021:
022:        public final class HookForm extends ActionForm {
023:
024:            // =================================================== Instance Variables
025:
026:            /**
027:             * The hook name
028:             */
029:            private String name = null;
030:
031:            /**
032:             * The hook event
033:             */
034:
035:            private String event = null;
036:
037:            /**
038:             * The hook type
039:             */
040:
041:            private String type = null;
042:
043:            /**
044:             * The hook value
045:             */
046:            private String value = null;
047:
048:            // =========================================================== Properties
049:
050:            /**
051:             * Return the hook name
052:             */
053:            public String getName() {
054:
055:                return (this .name);
056:
057:            }
058:
059:            /**
060:             * Set the hook name
061:             *
062:             */
063:            public void setName(String name) {
064:
065:                this .name = name;
066:
067:            }
068:
069:            /**
070:             * Return the hook event
071:             */
072:            public String getEvent() {
073:
074:                return (this .event);
075:
076:            }
077:
078:            /**
079:             * Set the hook event
080:             *
081:             */
082:            public void setEvent(String event) {
083:
084:                this .event = event;
085:
086:            }
087:
088:            /**
089:             * Return the hook type
090:             */
091:            public String getType() {
092:
093:                return (this .type);
094:
095:            }
096:
097:            /**
098:             * Set the hook type
099:             *
100:             */
101:            public void setType(String type) {
102:
103:                this .type = type;
104:
105:            }
106:
107:            /**
108:             * Return the hook value
109:             */
110:            public String getValue() {
111:
112:                return (this .value);
113:
114:            }
115:
116:            /**
117:             * Set the hook value
118:             *
119:             */
120:            public void setValue(String value) {
121:
122:                this .value = value;
123:            }
124:
125:            // --------------------------------------------------------- Public Methods
126:
127:            /**
128:             * Reset all properties to their default values.
129:             *
130:             * @param mapping The mapping used to select this instance
131:             * @param request The servlet request we are processing
132:             */
133:            public void reset(ActionMapping mapping, HttpServletRequest request) {
134:
135:                this .name = null;
136:                this .event = null;
137:                this .type = null;
138:                this .value = null;
139:            }
140:
141:            /**
142:             * Validate the properties that have been set from this HTTP request,
143:             * and return an <code>ActionErrors</code> object that encapsulates any
144:             * validation errors that have been found.  If no errors are found, return
145:             * <code>null</code> or an <code>ActionErrors</code> object with no
146:             * recorded error messages.
147:             *
148:             * @param mapping The mapping used to select this instance
149:             * @param request The servlet request we are processing
150:             */
151:            public ActionErrors validate(ActionMapping mapping,
152:                    HttpServletRequest request) {
153:
154:                ActionErrors errors = new ActionErrors();
155:
156:                if (name == null || name.length() == 0)
157:                    errors.add("name", new ActionError("error.name.required"));
158:                if (event == null || event.length() == 0)
159:                    errors
160:                            .add("event", new ActionError(
161:                                    "error.event.required"));
162:                if (type == null || type.length() == 0)
163:                    errors.add("type", new ActionError("error.type.required"));
164:
165:                return (errors);
166:
167:            }
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.