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


001:        package org.andromda.cartridges.spring.metafacades;
002:
003:        import org.andromda.metafacades.uml.UMLMetafacadeProperties;
004:        import org.apache.commons.lang.StringUtils;
005:        import org.apache.commons.lang.ObjectUtils;
006:
007:        /**
008:         * MetafacadeLogic implementation for org.andromda.cartridges.spring.metafacades.SpringManageableEntity.
009:         *
010:         * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntity
011:         */
012:        public class SpringManageableEntityLogicImpl extends
013:                SpringManageableEntityLogic {
014:
015:            public SpringManageableEntityLogicImpl(Object metaObject,
016:                    String context) {
017:                super (metaObject, context);
018:            }
019:
020:            /**
021:             * @return the configured property denoting the character sequence to use for the separation of namespaces
022:             */
023:            private String getNamespaceProperty() {
024:                return (String) getConfiguredProperty(UMLMetafacadeProperties.NAMESPACE_SEPARATOR);
025:            }
026:
027:            protected java.lang.String handleGetDaoReferenceName() {
028:                final char[] name = getName().toCharArray();
029:                if (name.length > 0) {
030:                    name[0] = Character.toLowerCase(name[0]);
031:                }
032:
033:                return new String(name) + "Dao";
034:            }
035:
036:            protected java.lang.String handleGetManageableDaoName() {
037:                return getName() + "ManageableDao";
038:            }
039:
040:            protected java.lang.String handleGetFullyQualifiedManageableDaoName() {
041:                return getManageablePackageName() + getNamespaceProperty()
042:                        + getManageableDaoName();
043:            }
044:
045:            protected String handleGetManageableDaoFullPath() {
046:                return StringUtils.replace(this 
047:                        .getFullyQualifiedManageableDaoName(),
048:                        getNamespaceProperty(), "/");
049:            }
050:
051:            protected String handleGetManageableDaoBaseName() {
052:                return getManageableDaoName() + "Base";
053:            }
054:
055:            protected String handleGetFullyQualifiedManageableDaoBaseName() {
056:                return getManageablePackageName() + getNamespaceProperty()
057:                        + getManageableDaoBaseName();
058:            }
059:
060:            protected String handleGetManageableDaoBaseFullPath() {
061:                return StringUtils.replace(this 
062:                        .getFullyQualifiedManageableDaoBaseName(), this 
063:                        .getNamespaceProperty(), "/");
064:            }
065:
066:            protected String handleGetManageableServiceBaseName() {
067:                return getManageableServiceName() + "Base";
068:            }
069:
070:            protected String handleGetFullyQualifiedManageableServiceBaseName() {
071:                return getManageablePackageName() + getNamespaceProperty()
072:                        + getManageableServiceBaseName();
073:            }
074:
075:            protected String handleGetManageableServiceBaseFullPath() {
076:                return StringUtils.replace(this 
077:                        .getFullyQualifiedManageableServiceBaseName(), this 
078:                        .getNamespaceProperty(), "/");
079:            }
080:
081:            protected String handleGetManageableValueObjectFullPath() {
082:                return StringUtils.replace(this 
083:                        .getFullyQualifiedManageableValueObjectName(), this 
084:                        .getNamespaceProperty(), "/");
085:            }
086:
087:            protected String handleGetManageableValueObjectClassName() {
088:                return getName()
089:                        + this 
090:                                .getConfiguredProperty(SpringGlobals.CRUD_VALUE_OBJECT_SUFFIX);
091:            }
092:
093:            protected String handleGetFullyQualifiedManageableValueObjectName() {
094:                return getManageablePackageName() + getNamespaceProperty()
095:                        + getManageableValueObjectClassName();
096:            }
097:
098:            protected boolean handleIsRemotingTypeRmi() {
099:                return this .getRemotingType().equalsIgnoreCase(
100:                        SpringGlobals.REMOTING_PROTOCOL_RMI);
101:            }
102:
103:            protected boolean handleIsRemotingTypeNone() {
104:                return this .getRemotingType().equalsIgnoreCase(
105:                        SpringGlobals.REMOTING_PROTOCOL_NONE);
106:            }
107:
108:            protected boolean handleIsRemotingTypeHttpInvoker() {
109:                return this .getRemotingType().equalsIgnoreCase(
110:                        SpringGlobals.REMOTING_PROTOCOL_HTTPINVOKER);
111:            }
112:
113:            protected boolean handleIsRemotingTypeHessian() {
114:                return this .getRemotingType().equalsIgnoreCase(
115:                        SpringGlobals.REMOTING_PROTOCOL_HESSIAN);
116:            }
117:
118:            protected boolean handleIsRemotingTypeBurlap() {
119:                return this .getRemotingType().equalsIgnoreCase(
120:                        SpringGlobals.REMOTING_PROTOCOL_BURLAP);
121:            }
122:
123:            protected String handleGetRemoteUrl() {
124:                final StringBuffer result = new StringBuffer();
125:
126:                String propertyPrefix = ObjectUtils
127:                        .toString(this 
128:                                .getConfiguredProperty(SpringGlobals.CONFIG_PROPERTY_PREFIX));
129:
130:                if (this .isRemotingTypeNone()) {
131:                    // nothing
132:                } else if (this .isRemotingTypeHttpInvoker()
133:                        || this .isRemotingTypeHessian()
134:                        || this .isRemotingTypeBurlap()) {
135:                    // server
136:                    result.append("http://${");
137:                    result.append(propertyPrefix);
138:                    result.append("remoteServer}");
139:
140:                    // port
141:                    if (hasServiceRemotePort()) {
142:                        result.append(":${");
143:                        result.append(propertyPrefix);
144:                        result.append("remotePort}");
145:                    }
146:
147:                    // context
148:                    if (hasServiceRemoteContext()) {
149:                        result.append("/${");
150:                        result.append(propertyPrefix);
151:                        result.append("remoteContext}");
152:                    }
153:
154:                    // service name
155:                    result.append("/remote");
156:                    result.append(this .getManageableServiceName());
157:                } else if (this .isRemotingTypeRmi()) {
158:                    // server
159:                    result.append("rmi://${");
160:                    result.append(propertyPrefix);
161:                    result.append("remoteServer}");
162:
163:                    // port
164:                    if (hasServiceRemotePort()) {
165:                        result.append(":${");
166:                        result.append(propertyPrefix);
167:                        result.append("remotePort}");
168:                    }
169:
170:                    // service name
171:                    result.append("/remote");
172:                    result.append(this .getManageableServiceName());
173:                }
174:
175:                return result.toString();
176:            }
177:
178:            protected String handleGetRemoteServer() {
179:                return StringUtils
180:                        .trimToEmpty(String
181:                                .valueOf(this 
182:                                        .getConfiguredProperty(SpringGlobals.SERVICE_REMOTE_SERVER)));
183:            }
184:
185:            protected String handleGetRemotePort() {
186:                final String serviceRemotePort = StringUtils
187:                        .trimToEmpty(String
188:                                .valueOf(this 
189:                                        .getConfiguredProperty(SpringGlobals.SERVICE_REMOTE_PORT)));
190:                return SpringMetafacadeUtils.getServiceRemotePort(this ,
191:                        serviceRemotePort);
192:            }
193:
194:            protected String handleGetRemoteContext() {
195:                return this 
196:                        .isConfiguredProperty(SpringGlobals.SERVICE_REMOTE_CONTEXT) ? ObjectUtils
197:                        .toString(this 
198:                                .getConfiguredProperty(SpringGlobals.SERVICE_REMOTE_CONTEXT))
199:                        : "";
200:            }
201:
202:            protected boolean handleIsRemotable() {
203:                return !this .isRemotingTypeNone();
204:            }
205:
206:            /**
207:             * Gets the remoting type for this service.
208:             */
209:            private String getRemotingType() {
210:                final String serviceRemotingType = StringUtils
211:                        .trimToEmpty(String
212:                                .valueOf(this 
213:                                        .getConfiguredProperty(SpringGlobals.SERVICE_REMOTING_TYPE)));
214:                return SpringMetafacadeUtils.getServiceRemotingType(this ,
215:                        serviceRemotingType);
216:            }
217:
218:            /**
219:             * Checks whether this service has a remote port assigned.
220:             *
221:             * @return <code>true</code> if the service has a remote port, <code>false</code> otherwise.
222:             */
223:            private boolean hasServiceRemotePort() {
224:                return StringUtils.isNotEmpty(this .getRemotePort());
225:            }
226:
227:            /**
228:             * Checks whether the service has a remote context assigned.
229:             *
230:             * @return <code>true</code> if the service has a remote context, <code>false</code> otherweise.
231:             */
232:            private boolean hasServiceRemoteContext() {
233:                return StringUtils.isNotEmpty(this.getRemoteContext());
234:            }
235:
236:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.