Source Code Cross Referenced for ApcRuleDefinition.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 2006-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:        package org.kuali.core.datadictionary;
017:
018:        import org.apache.commons.lang.StringUtils;
019:        import org.apache.commons.logging.Log;
020:        import org.apache.commons.logging.LogFactory;
021:        import org.kuali.core.datadictionary.exception.AttributeValidationException;
022:        import org.kuali.core.datadictionary.exception.ClassValidationException;
023:
024:        public class ApcRuleDefinition extends DataDictionaryDefinitionBase {
025:
026:            private String attributeName;
027:            private String parameterNamespace;
028:            private String parameterDetailType;
029:            private String parameterName;
030:            private String errorMessage;
031:
032:            // logger
033:            private static Log LOG = LogFactory
034:                    .getLog(ReferenceDefinition.class);
035:
036:            public ApcRuleDefinition() {
037:                LOG.debug("creating new ApcRuleDefinition");
038:            }
039:
040:            public void completeValidation(Class rootBusinessObjectClass,
041:                    Class otherBusinessObjectClass,
042:                    ValidationCompletionUtils validationCompletionUtils) {
043:
044:                // make sure the rootBusinessObjectClass is actually a descendent of BusinessObject
045:                if (!validationCompletionUtils
046:                        .isBusinessObjectClass(rootBusinessObjectClass)) {
047:                    throw new ClassValidationException(
048:                            "RootBusinessObject is not a descendent of BusinessObject. "
049:                                    + "rootBusinessObjectClass = '"
050:                                    + rootBusinessObjectClass.getName() + "' "
051:                                    + "(" + getParseLocation() + ")");
052:                }
053:
054:                // make sure the attributeName is actually a property of the BO
055:                if (!validationCompletionUtils.isPropertyOf(
056:                        rootBusinessObjectClass, attributeName)) {
057:                    throw new AttributeValidationException(
058:                            "unable to find attribute '" + attributeName
059:                                    + "' in rootBusinessObjectClass '"
060:                                    + rootBusinessObjectClass.getName() + "' ("
061:                                    + getParseLocation() + ")");
062:                }
063:
064:                // make sure that the member referencec by attributeName is actually a string
065:                Class attributeClass = validationCompletionUtils
066:                        .getAttributeClass(rootBusinessObjectClass,
067:                                attributeName);
068:                if (!attributeClass.equals(String.class)) {
069:                    throw new AttributeValidationException("the attribute '"
070:                            + attributeName + "' in rootBusinessObjectClass '"
071:                            + rootBusinessObjectClass.getName()
072:                            + "' is of type '" + attributeClass.getName()
073:                            + "'. These attributes may only be string. ("
074:                            + getParseLocation() + ")");
075:                }
076:
077:            }
078:
079:            public String getParameterNamespace() {
080:                return parameterNamespace;
081:            }
082:
083:            public void setParameterNamespace(String parameterNamespace) {
084:                if (StringUtils.isBlank(parameterNamespace)) {
085:                    throw new IllegalArgumentException(
086:                            "invalid (blank) parameterNamespace");
087:                }
088:                if (LOG.isDebugEnabled()) {
089:                    LOG.debug("calling parameterNamespace '"
090:                            + parameterNamespace + "'");
091:                }
092:                this .parameterNamespace = parameterNamespace;
093:            }
094:
095:            public String getParameterName() {
096:                return parameterName;
097:            }
098:
099:            void setParameterName(String parameterName) {
100:                if (StringUtils.isBlank(parameterName)) {
101:                    throw new IllegalArgumentException(
102:                            "invalid (blank) parameterName");
103:                }
104:                if (LOG.isDebugEnabled()) {
105:                    LOG.debug("calling parameterName '" + parameterName + "'");
106:                }
107:                this .parameterName = parameterName;
108:            }
109:
110:            public String getAttributeName() {
111:                return attributeName;
112:            }
113:
114:            public void setAttributeName(String attributeName) {
115:                if (StringUtils.isBlank(attributeName)) {
116:                    throw new IllegalArgumentException(
117:                            "invalid (blank) attributeName");
118:                }
119:                if (LOG.isDebugEnabled()) {
120:                    LOG.debug("calling setAttributeName '" + attributeName
121:                            + "'");
122:                }
123:                this .attributeName = attributeName;
124:            }
125:
126:            public String getErrorMessage() {
127:                return errorMessage;
128:            }
129:
130:            public void setErrorMessage(String errorMessage) {
131:                if (StringUtils.isBlank(errorMessage)) {
132:                    throw new IllegalArgumentException(
133:                            "invalid (blank) errorMessage");
134:                }
135:                if (LOG.isDebugEnabled()) {
136:                    LOG.debug("calling setErrorMessage '" + errorMessage + "'");
137:                }
138:                this .errorMessage = errorMessage;
139:            }
140:
141:            /**
142:             * @see java.lang.Object#toString()
143:             */
144:            public String toString() {
145:                return "ApcRuleDefinition for attribute " + getAttributeName();
146:            }
147:
148:            public String getParameterDetailType() {
149:                return this .parameterDetailType;
150:            }
151:
152:            public void setParameterDetailType(String parameterDetailType) {
153:                if (StringUtils.isBlank(parameterDetailType)) {
154:                    throw new IllegalArgumentException(
155:                            "invalid (blank) parameterDetailType");
156:                }
157:                if (LOG.isDebugEnabled()) {
158:                    LOG.debug("calling setParameterDetailType '"
159:                            + parameterDetailType + "'");
160:                }
161:                this.parameterDetailType = parameterDetailType;
162:            }
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.