Source Code Cross Referenced for ActivityForm.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 java.util.AbstractCollection;
004:
005:        import javax.servlet.http.HttpServletRequest;
006:        import org.apache.struts.action.ActionError;
007:        import org.apache.struts.action.ActionErrors;
008:        import org.apache.struts.action.ActionForm;
009:        import org.apache.struts.action.ActionMapping;
010:
011:        /**
012:         * Form bean for Activity.  This form has the following fields,
013:         * with default values in square brackets:
014:         * <ul>
015:         * <li><b>role</b> - The name of the hook.  [REQUIRED]
016:         * <li><b>deadline</b> - The event for this hook.  [REQUIRED]
017:         * <li><b>description</b> - The hook type [REQUIRED]
018:         * </ul>
019:         *
020:         * @author Miguel Valdes Faura
021:         * @version $Revision: 1.1 $ $Date: 2004/07/30 14:57:57 $
022:         */
023:
024:        public final class ActivityForm extends ActionForm {
025:
026:            // =================================================== Instance Variables
027:
028:            /**
029:             * The activity role
030:             */
031:            private String role = null;
032:
033:            /**
034:             * The activity deadline
035:             */
036:
037:            private String deadline = null;
038:
039:            /**
040:             * The activity description
041:             */
042:
043:            private String description = null;
044:
045:            /**
046:             * Type atribute
047:             */
048:
049:            private String type = null;
050:
051:            /**
052:             * Anticipable atribute
053:             */
054:
055:            private String anticipable = null;
056:
057:            /**
058:             * Automatic atribute
059:             */
060:
061:            private String automatic = null;
062:
063:            // =========================================================== Properties
064:
065:            /**
066:             * Return the activity role
067:             */
068:            public String getRole() {
069:
070:                return (this .role);
071:
072:            }
073:
074:            /**
075:             * Set the activity role
076:             *
077:             */
078:            public void setRole(String role) {
079:
080:                this .role = role;
081:
082:            }
083:
084:            /**
085:             * Return the activity deadline
086:             */
087:            public String getDeadline() {
088:                if (this .deadline.length() > 10)
089:                    return (this .deadline.substring(0, 10));
090:                else
091:                    return (this .deadline);
092:
093:            }
094:
095:            /**
096:             * Set the activity deadline
097:             *
098:             */
099:            public void setDeadline(String deadline) {
100:
101:                this .deadline = deadline;
102:
103:            }
104:
105:            /**
106:             * Return the activity description
107:             */
108:            public String getDescription() {
109:
110:                return (this .description);
111:
112:            }
113:
114:            /**
115:             * Set the activity description
116:             *
117:             */
118:            public void setDescription(String description) {
119:
120:                this .description = description;
121:
122:            }
123:
124:            /**
125:             * Return the activity type
126:             */
127:            public String getType() {
128:
129:                return (this .type);
130:
131:            }
132:
133:            /**
134:             * Set the activity type
135:             *
136:             */
137:            public void setType(String type) {
138:                this .type = type;
139:            }
140:
141:            /**
142:             * Return the anticipable value
143:             */
144:            public String getAnticipable() {
145:
146:                return (this .anticipable);
147:
148:            }
149:
150:            /**
151:             * Set anticipable value
152:             *
153:             */
154:            public void setAnticipable(String anticipable) {
155:
156:                this .anticipable = anticipable;
157:
158:            }
159:
160:            /**
161:             * Return the automatic value
162:             */
163:            public String getAutomatic() {
164:
165:                return (this .automatic);
166:
167:            }
168:
169:            /**
170:             * Set automatic value
171:             *
172:             */
173:            public void setAutomatic(String automatic) {
174:
175:                this .automatic = automatic;
176:
177:            }
178:
179:            // --------------------------------------------------------- Public Methods
180:
181:            /**
182:             * Reset all properties to their default values.
183:             *
184:             * @param mapping The mapping used to select this instance
185:             * @param request The servlet request we are processing
186:             */
187:            public void reset(ActionMapping mapping, HttpServletRequest request) {
188:
189:                this .role = null;
190:                this .deadline = null;
191:                this .description = null;
192:                this .type = null;
193:            }
194:
195:            /**
196:             * Validate the properties that have been set from this HTTP request,
197:             * and return an <code>ActionErrors</code> object that encapsulates any
198:             * validation errors that have been found.  If no errors are found, return
199:             * <code>null</code> or an <code>ActionErrors</code> object with no
200:             * recorded error messages.
201:             *
202:             * @param mapping The mapping used to select this instance
203:             * @param request The servlet request we are processing
204:             */
205:            public ActionErrors validate(ActionMapping mapping,
206:                    HttpServletRequest request) {
207:
208:                ActionErrors errors = new ActionErrors();
209:
210:                if (role == null || role.length() == 0)
211:                    errors.add("role", new ActionError("error.role.required"));
212:                if (deadline == null || deadline.length() == 0)
213:                    errors.add("deadline", new ActionError(
214:                            "error.deadline.required"));
215:                if (description == null || description.length() == 0)
216:                    errors.add("description", new ActionError(
217:                            "error.description.required"));
218:
219:                return (errors);
220:
221:            }
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.