Source Code Cross Referenced for BaseActionContext.java in  » Workflow-Engines » JFolder » org » jfolder » common » web » template » 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 » JFolder » org.jfolder.common.web.template 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JFolder, Copyright 2001-2006 Gary Steinmetz
003:         *
004:         * Distributable under LGPL license.
005:         * See terms of license at gnu.org.
006:         */
007:
008:        package org.jfolder.common.web.template;
009:
010:        //base classes
011:
012:        //project specific classes
013:        import org.jfolder.common.UnexpectedSystemException;
014:        import org.jfolder.common.web.template.ConsoleParameterContext;
015:
016:        //other classes
017:
018:        public abstract class BaseActionContext extends BaseParameterContext {
019:
020:            //
021:            private final static String CONSOLE_ACTION_PREFIX = "CONSOLE_ACTION_";
022:            //
023:            //protected final static String FIRST_ACTION = "CONSOLE_FIRST_ACTION";
024:            //protected final static String SECOND_ACTION = "CONSOLE_SECOND_ACTION";
025:            //protected final static String THIRD_ACTION = "CONSOLE_THIRD_ACTION";
026:            //
027:            //
028:            //private String consoleFirstAction = null;
029:            //private String consoleSecondAction = null;
030:            //private String consoleThirdAction = null;
031:            //
032:            private ConsoleParameterHolder actionCph = null;
033:
034:            //
035:            protected BaseActionContext() {
036:                this .actionCph = ConsoleParameterHolder.newInstance();
037:            }
038:
039:            public int hashCode() {
040:
041:                int outValue = 0;
042:
043:                outValue += this .actionCph.hashCode();
044:                outValue += super .hashCode();
045:
046:                return outValue;
047:            }
048:
049:            public boolean equals(Object inObj) {
050:
051:                boolean outValue = true;
052:
053:                if (inObj instanceof  BaseActionContext) {
054:                    BaseActionContext nextBac = ((BaseActionContext) inObj);
055:                    outValue &= (this .actionCph.equals(nextBac.actionCph));
056:                    outValue &= super .equals(nextBac);
057:                } else {
058:                    outValue &= false;
059:                }
060:
061:                return outValue;
062:            }
063:
064:            public boolean isValid() {
065:                return (
066:                //
067:                super .isValid() && getActionCount() == ConsoleParameterContext.MAX_CREATION_PARAMS);
068:                //&& this.consoleFirstAction != null
069:                //&& this.consoleSecondAction != null
070:                //&& this.consoleThirdAction != null);
071:            }
072:
073:            //
074:            public final int getActionCount() {
075:                return this .actionCph.getIndexCount();
076:            }
077:
078:            //
079:            public final String getAction(Integer inIndex) {
080:
081:                String outValue = null;
082:
083:                Object o = this .actionCph.getInput(inIndex);
084:                outValue = (String) o;
085:
086:                return outValue;
087:            }
088:
089:            public final void addAction(Integer inIndex, String inValue) {
090:                this .actionCph.addInput(inIndex, inValue);
091:            }
092:
093:            //public final String getFirstAction() {
094:            //    return this.consoleFirstAction;
095:            //}
096:            //
097:            //public final String getSecondAction() {
098:            //    return this.consoleSecondAction;
099:            //}
100:            //
101:            //public final String getThirdAction() {
102:            //    return this.consoleThirdAction;
103:            //}
104:
105:            public final boolean isAction(String inFirstAction,
106:                    String inSecondAction, String inThirdAction) {
107:
108:                return (inFirstAction.equals(getAction(FIRST_INPUT))
109:                        && inSecondAction.equals(getAction(SECOND_INPUT)) && inThirdAction
110:                        .equals(getAction(THIRD_INPUT)));
111:            }
112:
113:            public final boolean isAction(String inFirstAction,
114:                    String inSecondAction) {
115:
116:                return (inFirstAction.equals(getAction(FIRST_INPUT)) && inSecondAction
117:                        .equals(getAction(SECOND_INPUT)));
118:            }
119:
120:            public final boolean isAction(String inFirstAction) {
121:
122:                return (inFirstAction.equals(getAction(FIRST_INPUT)));
123:            }
124:
125:            public final boolean isSubAction(String inSecondAction,
126:                    String inThirdAction) {
127:
128:                return (inSecondAction.equals(getAction(SECOND_INPUT)) && inThirdAction
129:                        .equals(getAction(THIRD_INPUT)));
130:            }
131:
132:            public final boolean isSubAction(String inSecondAction) {
133:
134:                return (inSecondAction.equals(getAction(SECOND_INPUT)));
135:            }
136:
137:            //public final void setFirstAction(String inAction) {
138:            //    this.consoleFirstAction = inAction;
139:            //}
140:            //
141:            //public final void setSecondAction(String inSubAction) {
142:            //    this.consoleSecondAction = inSubAction;
143:            //}
144:            //
145:            //public final void setThirdAction(String inSubSecondAction) {
146:            //    this.consoleThirdAction = inSubSecondAction;
147:            //}
148:
149:            public void unknownAction() {
150:                throw new UnexpectedSystemException(
151:                        "Unknown Action - FirstAction("
152:                                + getAction(FIRST_INPUT) + "), SecondAction("
153:                                + getAction(SECOND_INPUT) + "), ThirdAction("
154:                                + getAction(THIRD_INPUT) + ")");
155:            }
156:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.