Source Code Cross Referenced for BusinessObjectEntry.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » datadictionary » 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 » ERP CRM Financial » Kuali Financial System » org.kuali.core.datadictionary 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.kuali.core.datadictionary;
018:
019:        import org.apache.commons.lang.StringUtils;
020:        import org.apache.commons.logging.Log;
021:        import org.apache.commons.logging.LogFactory;
022:        import org.kuali.core.datadictionary.exception.ClassValidationException;
023:
024:        /**
025:         * A single BusinessObject entry in the DataDictionary, which contains information relating to the display, validation, and general
026:         * maintenance of a BusinessObject and its attributes.
027:         * 
028:         * Note: the setters do copious amounts of validation, to facilitate generating errors during the parsing process.
029:         */
030:        public class BusinessObjectEntry extends DataDictionaryEntryBase {
031:            // logger
032:            private static Log LOG = LogFactory
033:                    .getLog(BusinessObjectEntry.class);
034:
035:            private Class businessObjectClass;
036:
037:            private boolean boNotesEnabled;
038:
039:            private InquiryDefinition inquiryDefinition;
040:            private LookupDefinition lookupDefinition;
041:
042:            private String titleAttribute;
043:            private String objectLabel;
044:            private String objectDescription;
045:
046:            private HelpDefinition helpDefinition;
047:
048:            public BusinessObjectEntry() {
049:                super ();
050:                LOG.debug("creating new BusinessObjectEntry");
051:            }
052:
053:            /**
054:             * @see org.kuali.core.datadictionary.DataDictionaryEntry#getJstlKey()
055:             */
056:            public String getJstlKey() {
057:                if (this .businessObjectClass == null) {
058:                    throw new IllegalStateException(
059:                            "cannot generate JSTL key: businessObjectClass is null");
060:                }
061:
062:                String jstlKey = StringUtils.substringAfterLast(
063:                        this .businessObjectClass.getName(), ".");
064:                return jstlKey;
065:            }
066:
067:            public void setBusinessObjectClass(Class businessObjectClass) {
068:                if (businessObjectClass == null) {
069:                    throw new IllegalArgumentException(
070:                            "invalid (null) businessObjectClass");
071:                }
072:
073:                this .businessObjectClass = businessObjectClass;
074:            }
075:
076:            public Class getBusinessObjectClass() {
077:                return businessObjectClass;
078:            }
079:
080:            public boolean isBoNotesEnabled() {
081:                return boNotesEnabled;
082:            }
083:
084:            public void setBoNotesEnabled(boolean boNotesEnabled) {
085:                this .boNotesEnabled = boNotesEnabled;
086:            }
087:
088:            /**
089:             * @return true if this instance has an inquiryDefinition
090:             */
091:            public boolean hasInquiryDefinition() {
092:                return (inquiryDefinition != null);
093:            }
094:
095:            /**
096:             * @return current inquiryDefinition for this BusinessObjectEntry, or null if there is none
097:             */
098:            public InquiryDefinition getInquiryDefinition() {
099:                return inquiryDefinition;
100:            }
101:
102:            /**
103:             * Sets the inquiryDefinition for this BusinessObjectEntry to the given inquiryDefinition.
104:             * 
105:             * @param inquiryDefinition
106:             */
107:            public void setInquiryDefinition(InquiryDefinition inquiryDefinition) {
108:                if (inquiryDefinition == null) {
109:                    throw new IllegalArgumentException(
110:                            "invalid (null) inquiryDefinition");
111:                }
112:                LOG.debug("calling setInquiryDefinition '"
113:                        + inquiryDefinition.getTitle() + "'");
114:
115:                this .inquiryDefinition = inquiryDefinition;
116:            }
117:
118:            /**
119:             * @return true if this instance has a lookupDefinition
120:             */
121:            public boolean hasLookupDefinition() {
122:                return (lookupDefinition != null);
123:            }
124:
125:            /**
126:             * @return current lookupDefinition for this BusinessObjectEntry, or null if there is none
127:             */
128:            public LookupDefinition getLookupDefinition() {
129:                return lookupDefinition;
130:            }
131:
132:            /**
133:             * Sets the lookupDefinition for this BusinessObjectEntry to the given lookupDefinition.
134:             * 
135:             * @param lookupDefinition
136:             */
137:            public void setLookupDefinition(LookupDefinition lookupDefinition) {
138:                if (lookupDefinition == null) {
139:                    throw new IllegalArgumentException(
140:                            "invalid (null) lookupDefinition");
141:                }
142:                LOG.debug("calling setLookupDefinition '"
143:                        + lookupDefinition.getTitle() + "'");
144:
145:                this .lookupDefinition = lookupDefinition;
146:            }
147:
148:            /**
149:             * @return Returns the titleAttribute.
150:             */
151:            public String getTitleAttribute() {
152:                return titleAttribute;
153:            }
154:
155:            /**
156:             * @param titleAttribute The titleAttribute to set.
157:             */
158:            public void setTitleAttribute(String titleAttribute) {
159:                this .titleAttribute = titleAttribute;
160:            }
161:
162:            /**
163:             * Directly validate simple fields, call completeValidation on Definition fields.
164:             */
165:            public void completeValidation(
166:                    ValidationCompletionUtils validationCompletionUtils) {
167:                super .completeValidation(validationCompletionUtils);
168:
169:                if (!validationCompletionUtils
170:                        .isBusinessObjectClass(businessObjectClass)) {
171:                    throw new ClassValidationException("businessObjectClass '"
172:                            + businessObjectClass.getName()
173:                            + "' is not a BusinessObject class");
174:                }
175:
176:                if (hasInquiryDefinition()) {
177:                    inquiryDefinition.completeValidation(businessObjectClass,
178:                            null, validationCompletionUtils);
179:                }
180:
181:                if (hasLookupDefinition()) {
182:                    lookupDefinition.completeValidation(businessObjectClass,
183:                            null, validationCompletionUtils);
184:                }
185:
186:            }
187:
188:            /**
189:             * @see org.kuali.core.datadictionary.DataDictionaryEntryBase#getEntryClass()
190:             */
191:            public Class getEntryClass() {
192:                return getBusinessObjectClass();
193:            }
194:
195:            /**
196:             * @see org.kuali.core.datadictionary.DataDictionaryEntry#getFullClassName()
197:             */
198:            public String getFullClassName() {
199:                return getBusinessObjectClass().getName();
200:            }
201:
202:            /**
203:             * @return Returns the objectLabel.
204:             */
205:            public String getObjectLabel() {
206:                return objectLabel;
207:            }
208:
209:            /**
210:             * @param objectLabel The objectLabel to set.
211:             */
212:            public void setObjectLabel(String objectLabel) {
213:                this .objectLabel = objectLabel;
214:            }
215:
216:            /**
217:             * @return Returns the description.
218:             */
219:            public String getObjectDescription() {
220:                return objectDescription;
221:            }
222:
223:            /**
224:             * @param description The description to set.
225:             */
226:            public void setObjectDescription(String objectDescription) {
227:                if (StringUtils.isBlank(objectDescription)) {
228:                    throw new IllegalArgumentException(
229:                            "invalid (blank) objectDescription");
230:                }
231:                LOG.debug("calling setObjectDescription '" + objectDescription
232:                        + "'");
233:
234:                this .objectDescription = objectDescription;
235:            }
236:
237:            /**
238:             * Gets the helpDefinition attribute.
239:             * 
240:             * @return Returns the helpDefinition.
241:             */
242:            public HelpDefinition getHelpDefinition() {
243:                return helpDefinition;
244:            }
245:
246:            /**
247:             * Sets the helpDefinition attribute value.
248:             * 
249:             * @param helpDefinition The helpDefinition to set.
250:             */
251:            public void setHelpDefinition(HelpDefinition helpDefinition) {
252:                this .helpDefinition = helpDefinition;
253:            }
254:
255:            /**
256:             * @see java.lang.Object#toString()
257:             */
258:            public String toString() {
259:                String className = null;
260:                if (getBusinessObjectClass() != null) {
261:                    className = getBusinessObjectClass().getName();
262:                }
263:
264:                return "BusinessObjectEntry for class " + className;
265:            }
266:
267:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.