Source Code Cross Referenced for StrutsManageableEntityLogicImpl.java in  » UML » AndroMDA-3.2 » org » andromda » cartridges » bpm4struts » metafacades » 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 » UML » AndroMDA 3.2 » org.andromda.cartridges.bpm4struts.metafacades 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.andromda.cartridges.bpm4struts.metafacades;
002:
003:        import org.andromda.cartridges.bpm4struts.Bpm4StrutsGlobals;
004:        import org.andromda.cartridges.bpm4struts.Bpm4StrutsUtils;
005:        import org.andromda.cartridges.bpm4struts.Bpm4StrutsProfile;
006:        import org.andromda.utils.StringUtilsHelper;
007:        import org.andromda.metafacades.uml.UMLMetafacadeProperties;
008:        import org.andromda.metafacades.uml.AttributeFacade;
009:        import org.apache.commons.lang.StringUtils;
010:
011:        import java.util.Collection;
012:        import java.util.Iterator;
013:
014:        /**
015:         * MetafacadeLogic implementation for org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntity.
016:         *
017:         * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsManageableEntity
018:         */
019:        public class StrutsManageableEntityLogicImpl extends
020:                StrutsManageableEntityLogic {
021:            /**
022:             * @return the configured property denoting the character sequence to use for the separation of namespaces
023:             */
024:            private String getNamespaceProperty() {
025:                return (String) this 
026:                        .getConfiguredProperty(UMLMetafacadeProperties.NAMESPACE_SEPARATOR);
027:            }
028:
029:            public StrutsManageableEntityLogicImpl(Object metaObject,
030:                    String context) {
031:                super (metaObject, context);
032:            }
033:
034:            protected boolean handleIsMultipartFormData() {
035:                boolean multipartFormPost = false;
036:
037:                final Collection formFields = this .getManageableAttributes();
038:                for (final Iterator fieldIterator = formFields.iterator(); !multipartFormPost
039:                        && fieldIterator.hasNext();) {
040:                    final AttributeFacade field = (AttributeFacade) fieldIterator
041:                            .next();
042:                    if (field.getType().isFileType()) {
043:                        multipartFormPost = true;
044:                    }
045:                }
046:
047:                return multipartFormPost;
048:            }
049:
050:            protected String handleGetFormBeanType() {
051:                return this .getManageablePackageName()
052:                        + this .getNamespaceProperty()
053:                        + this .getFormBeanClassName();
054:            }
055:
056:            protected String handleGetFormBeanClassName() {
057:                return this .getName() + Bpm4StrutsGlobals.FORM_SUFFIX;
058:            }
059:
060:            protected String handleGetFormBeanFullPath() {
061:                return StringUtils.replace(this .getFormBeanType(), this 
062:                        .getNamespaceProperty(), "/");
063:            }
064:
065:            protected java.lang.String handleGetMessageKey() {
066:                return StringUtilsHelper.toResourceMessageKey(this .getName());
067:            }
068:
069:            protected java.lang.String handleGetMessageValue() {
070:                return StringUtilsHelper.toPhrase(this .getName());
071:            }
072:
073:            protected java.lang.String handleGetPageTitleKey() {
074:                return StringUtilsHelper.toResourceMessageKey(this .getName())
075:                        + ".page.title";
076:            }
077:
078:            protected java.lang.String handleGetPageTitleValue() {
079:                return StringUtilsHelper.toPhrase(getName());
080:            }
081:
082:            protected java.lang.String handleGetListName() {
083:                return "manageableList";
084:            }
085:
086:            protected java.lang.String handleGetListGetterName() {
087:                return "getManageableList";
088:            }
089:
090:            protected java.lang.String handleGetListSetterName() {
091:                return "setManageableList";
092:            }
093:
094:            protected String handleGetPageName() {
095:                return this .getName().toLowerCase() + "-crud.jsp";
096:            }
097:
098:            protected String handleGetPageFullPath() {
099:                return '/' + this .getManageablePackagePath() + '/'
100:                        + this .getPageName();
101:            }
102:
103:            protected java.lang.String handleGetActionPath() {
104:                return '/' + this .getName() + "/Manage";
105:            }
106:
107:            protected java.lang.String handleGetActionParameter() {
108:                return "crud";
109:            }
110:
111:            protected java.lang.String handleGetFormBeanName() {
112:                return "manage" + this .getName()
113:                        + Bpm4StrutsGlobals.FORM_SUFFIX;
114:            }
115:
116:            protected java.lang.String handleGetActionType() {
117:                return this .getManageablePackageName()
118:                        + this .getNamespaceProperty()
119:                        + this .getActionClassName();
120:            }
121:
122:            protected java.lang.String handleGetExceptionKey() {
123:                return StringUtilsHelper.toResourceMessageKey(this .getName())
124:                        + ".exception";
125:            }
126:
127:            protected java.lang.String handleGetExceptionPath() {
128:                return this .getPageFullPath();
129:            }
130:
131:            protected java.lang.String handleGetActionFullPath() {
132:                return '/' + StringUtils.replace(this .getActionType(), this 
133:                        .getNamespaceProperty(), "/");
134:            }
135:
136:            protected java.lang.String handleGetActionClassName() {
137:                return "Manage" + getName();
138:            }
139:
140:            protected boolean handleIsPreload() {
141:                return this .isCreate() || this .isRead() || this .isUpdate()
142:                        || this .isDelete();
143:            }
144:
145:            protected String handleGetOnlineHelpKey() {
146:                return this .getMessageKey() + ".online.help";
147:            }
148:
149:            protected String handleGetOnlineHelpValue() {
150:                final String value = StringUtilsHelper.toResourceMessage(this 
151:                        .getDocumentation("", 64, false));
152:                return (value == null) ? "No entity documentation has been specified"
153:                        : value;
154:            }
155:
156:            protected String handleGetOnlineHelpActionPath() {
157:                return this .getActionPath() + "Help";
158:            }
159:
160:            protected String handleGetOnlineHelpPagePath() {
161:                return '/' + this .getManageablePackagePath() + '/'
162:                        + this .getName().toLowerCase() + "_help";
163:            }
164:
165:            protected boolean handleIsTableExportable() {
166:                return this .getTableExportTypes().indexOf("none") == -1;
167:            }
168:
169:            protected String handleGetTableExportTypes() {
170:                return Bpm4StrutsUtils
171:                        .getDisplayTagExportTypes(
172:                                this 
173:                                        .findTaggedValues(Bpm4StrutsProfile.TAGGEDVALUE_TABLE_EXPORT),
174:                                (String) getConfiguredProperty(Bpm4StrutsGlobals.PROPERTY_DEFAULT_TABLE_EXPORT_TYPES));
175:            }
176:
177:            protected boolean handleIsTableSortable() {
178:                final Object taggedValue = this 
179:                        .findTaggedValue(Bpm4StrutsProfile.TAGGEDVALUE_TABLE_SORTABLE);
180:                return (taggedValue == null) ? Bpm4StrutsProfile.TAGGEDVALUE_TABLE_SORTABLE_DEFAULT_VALUE
181:                        : Bpm4StrutsUtils.isTrue(String.valueOf(taggedValue));
182:            }
183:
184:            protected int handleGetTableMaxRows() {
185:                final Object taggedValue = this 
186:                        .findTaggedValue(Bpm4StrutsProfile.TAGGEDVALUE_TABLE_MAXROWS);
187:                int pageSize;
188:
189:                try {
190:                    pageSize = Integer.parseInt(String.valueOf(taggedValue));
191:                } catch (Exception e) {
192:                    pageSize = Bpm4StrutsProfile.TAGGEDVALUE_TABLE_MAXROWS_DEFAULT_COUNT;
193:                }
194:
195:                return pageSize;
196:            }
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.