Source Code Cross Referenced for RcthConstraintBuilderDirectiveStep.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:        import java.util.ArrayList;
012:
013:        //project specific classes
014:        import org.jfolder.common.UnexpectedSystemException;
015:        import org.jfolder.common.utils.xml.XMLHelper;
016:
017:        //other classes
018:
019:        public class RcthConstraintBuilderDirectiveStep {
020:
021:            //
022:            private final static int TYPE__EARMARK = 0;
023:            private final static int TYPE__POP_UP = 1;
024:            private final static int TYPE__HTML_ITER = 2;
025:            private final static int TYPE__TARGET = 3;
026:            //
027:            private int type = 0;
028:            //
029:            //
030:            //private String parentSourceHtmlId = null;
031:            private String targetHtmlId = null;
032:            private String targetActualIdParent = null;
033:            private Integer targetActualIdIndex = null;
034:            private String targetUpdateValue = null;
035:            private ArrayList actions = null;
036:            private ArrayList parentActions = null;
037:            private String menuEarmarkId = null;
038:
039:            //
040:            //
041:            private RcthConstraintBuilderDirectiveStep(int inType) {
042:                this .type = inType;
043:            }
044:
045:            //
046:            private final static RcthConstraintBuilderDirectiveStep newInstance(
047:                    int inType) {
048:                //
049:                RcthConstraintBuilderDirectiveStep outValue = null;
050:
051:                //
052:                outValue = new RcthConstraintBuilderDirectiveStep(inType);
053:
054:                return outValue;
055:            }
056:
057:            public final static RcthConstraintBuilderDirectiveStep newEarmark() {
058:                return RcthConstraintBuilderDirectiveStep
059:                        .newInstance(TYPE__EARMARK);
060:            }
061:
062:            public final static RcthConstraintBuilderDirectiveStep newPopUp() {
063:                return RcthConstraintBuilderDirectiveStep
064:                        .newInstance(TYPE__POP_UP);
065:            }
066:
067:            public final static RcthConstraintBuilderDirectiveStep newHtmlIter() {
068:                return RcthConstraintBuilderDirectiveStep
069:                        .newInstance(TYPE__HTML_ITER);
070:            }
071:
072:            public final static RcthConstraintBuilderDirectiveStep newTarget() {
073:                return RcthConstraintBuilderDirectiveStep
074:                        .newInstance(TYPE__TARGET);
075:            }
076:
077:            //
078:            //
079:            //
080:            public boolean isTypeAsEarmark() {
081:                return (this .type == TYPE__EARMARK);
082:            }
083:
084:            public boolean isTypeAsPopUp() {
085:                return (this .type == TYPE__POP_UP);
086:            }
087:
088:            public boolean isTypeAsHtmlIter() {
089:                return (this .type == TYPE__HTML_ITER);
090:            }
091:
092:            public boolean isTypeAsTarget() {
093:                return (this .type == TYPE__TARGET);
094:            }
095:
096:            //
097:            //
098:            //
099:            public void registerForEarmark(String inTargetHtmlId,
100:                    String inEarmarkMenuId) {
101:                //
102:                if (isTypeAsEarmark()) {
103:                    this .targetHtmlId = inTargetHtmlId;
104:                    this .actions = new ArrayList();
105:                    this .menuEarmarkId = inEarmarkMenuId;
106:                    //
107:                    ArrayList preActions = new ArrayList();
108:                    preActions.add("macroGoTo('" + inTargetHtmlId + "')");
109:                    preActions.add("macroClickImage()");
110:                    preActions.add("macroClick('" + inTargetHtmlId + "')");
111:                    //
112:                    ArrayList postActions = new ArrayList();
113:                    postActions.add("macroGoTo(" + inEarmarkMenuId + ")");
114:                    postActions.add("macroClickImage()");
115:                    postActions.add("macroClick(" + inEarmarkMenuId + ")");
116:                    postActions.add("closeOpenTagMenus('', false)");
117:                    //postActions.add=
118:                    this .actions.addAll(0, preActions);
119:                    this .actions.addAll(postActions);
120:                } else {
121:                    throw UnexpectedSystemException.unknownState();
122:                }
123:            }
124:
125:            public void registerForPopUp(String inTargetHtmlId) {
126:                //
127:                if (isTypeAsPopUp()) {
128:                    //this.parentSourceHtmlId = inParentSourceHtmlId;
129:                    this .targetHtmlId = inTargetHtmlId;
130:                    this .actions = new ArrayList();
131:                    //
132:                    ArrayList preActions = new ArrayList();
133:                    preActions.add("macroGoTo('" + inTargetHtmlId + "')");
134:                    preActions.add("macroClickImage()");
135:                    preActions.add("macroClick('" + inTargetHtmlId + "')");
136:                    //
137:                    this .actions.addAll(0, preActions);
138:                } else {
139:                    throw UnexpectedSystemException.unknownState();
140:                }
141:            }
142:
143:            public void registerForHtmlIter(String inTargetHtmlId,
144:                    String inTargetUpdateValue, String inSelectionAction) {
145:                //
146:                if (isTypeAsHtmlIter()) {
147:                    this .targetHtmlId = inTargetHtmlId;
148:                    this .targetUpdateValue = inTargetUpdateValue;
149:                    //
150:                    //
151:                    ArrayList preActions = new ArrayList();
152:                    preActions.add("macroGoTo('" + this .targetHtmlId + "')");
153:                    preActions.add("macroClickImage()");
154:                    preActions
155:                            .add("macroChangeFormValue('"
156:                                    + this .targetHtmlId
157:                                    + "', '"
158:                                    + XMLHelper
159:                                            .fromStringToJSCData(this .targetUpdateValue)
160:                                    + "')");
161:                    preActions.add("macroEval('"
162:                            + XMLHelper.fromStringToJSCData(inSelectionAction)
163:                            + "')");
164:                    //
165:                    this .actions = preActions;
166:                    //this.parentActions = preActions;
167:                } else {
168:                    throw UnexpectedSystemException.unknownState();
169:                }
170:            }
171:
172:            public void registerForTarget(String inTargetHtmlId,
173:                    String inTargetActualIdParent,
174:                    Integer inTargetActualIdIndex, ArrayList inActions,
175:                    ArrayList inParentActions) {
176:                //
177:                if (isTypeAsTarget()) {
178:                    this .targetHtmlId = inTargetHtmlId;
179:                    this .targetActualIdParent = inTargetActualIdParent;
180:                    this .targetActualIdIndex = inTargetActualIdIndex;
181:                    this .actions = inActions;
182:                    this .parentActions = inParentActions;
183:                    //
184:                    //
185:                    ArrayList preActions = new ArrayList();
186:                    preActions.add("macroGoTo('" + this .targetHtmlId + "')");
187:                    preActions.add("macroClickImage()");
188:                    //
189:                    this .actions.addAll(0, preActions);
190:                    this .parentActions.addAll(0, preActions);
191:                } else {
192:                    throw UnexpectedSystemException.unknownState();
193:                }
194:            }
195:
196:            //
197:            //
198:            //
199:            public String getTargetHtmlId() {
200:                return this .targetHtmlId;
201:            }
202:
203:            public String getTargetActualIdParent() {
204:                return this .targetActualIdParent;
205:            }
206:
207:            public boolean isTargetActualIdIndexPresent() {
208:                return (this .targetActualIdIndex != null);
209:            }
210:
211:            public int getTargetActualIdIndex() {
212:                return this .targetActualIdIndex.intValue();
213:            }
214:
215:            public String getTargetUpdateValue() {
216:                return this .targetUpdateValue;
217:            }
218:
219:            public ArrayList getActions(boolean inParent) {
220:
221:                ArrayList outValue = null;
222:
223:                if (isTypeAsTarget() && inParent) {
224:                    outValue = this .parentActions;
225:                } else {
226:                    outValue = this .actions;
227:                }
228:
229:                return outValue;
230:            }
231:
232:            public String getMenuEarmarkId() {
233:                return this.menuEarmarkId;
234:            }
235:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.