Source Code Cross Referenced for PropertyValidationRule.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » site » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.site 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
003:         * Distributed under the terms of either:
004:         * - the common development and distribution license (CDDL), v1.0; or
005:         * - the GNU Lesser General Public License, v2.1 or later
006:         * $Id: PropertyValidationRule.java 3634 2007-01-08 21:42:24Z gbevin $
007:         */
008:        package com.uwyn.rife.site;
009:
010:        import java.util.Collection;
011:
012:        /**
013:         * This abstract class extends the <code>AbstractValidationRule</code> class
014:         * to provide common functionality that is useful for all bean property
015:         * validation rules.
016:         * 
017:         * @author Geert Bevin (gbevin[remove] at uwyn dot com)
018:         * @version $Revision: 3634 $
019:         * @since 1.0
020:         */
021:        public abstract class PropertyValidationRule extends
022:                AbstractValidationRule {
023:            private String mPropertyName = null;
024:            private String mSubject = null;
025:            private Collection<String> mLoadingErrors = null;
026:            private ConstrainedProperty mConstrainedProperty = null;
027:
028:            /**
029:             * Instantiates a new <code>PropertyValidationRule</code> instance.
030:             * 
031:             * @param propertyName the name of the property
032:             * @since 1.0
033:             */
034:            protected PropertyValidationRule(String propertyName) {
035:                setPropertyName(propertyName);
036:            }
037:
038:            /**
039:             * Set the name of the property.
040:             * 
041:             * @param propertyName the name of the property
042:             * @see #getPropertyName
043:             * @since 1.0
044:             */
045:            public <T extends PropertyValidationRule> T setPropertyName(
046:                    String propertyName) {
047:                mPropertyName = propertyName;
048:                if (null == mSubject) {
049:                    mSubject = propertyName;
050:                }
051:
052:                return (T) this ;
053:            }
054:
055:            /**
056:             * Retrieves the name of the property.
057:             * 
058:             * @return the name of the property
059:             * @see #setPropertyName
060:             * @since 1.0
061:             */
062:            public String getPropertyName() {
063:                return mPropertyName;
064:            }
065:
066:            /**
067:             * Set the subject that the property refers to.
068:             * 
069:             * @param subjectName the subject name of the property
070:             * @see #getSubject
071:             * @since 1.0
072:             */
073:            public PropertyValidationRule setSubject(String subjectName) {
074:                if (null == subjectName) {
075:                    mSubject = mPropertyName;
076:                } else {
077:                    mSubject = subjectName;
078:                }
079:
080:                return this ;
081:            }
082:
083:            /**
084:             * Retrieves the subject name of the property.
085:             * 
086:             * @return the subject name of the property
087:             * @see #setSubject
088:             * @since 1.0
089:             */
090:            public String getSubject() {
091:                return mSubject;
092:            }
093:
094:            /**
095:             * Set the list of error messages that occurred during the loading of
096:             * content data.
097:             * 
098:             * @param errors the collection of errors messages
099:             * @since 1.0
100:             */
101:            protected void setLoadingErrors(Collection<String> errors) {
102:                mLoadingErrors = errors;
103:            }
104:
105:            /**
106:             * Retrieves the list of error messages that occurred during the loading
107:             * of content data.
108:             * 
109:             * @return the collection of errors messages; or
110:             * <p><code>null</code> if the data was <code>null</code> or the property
111:             * didn't exist
112:             * @since 1.0
113:             */
114:            public Collection<String> getLoadingErrors() {
115:                return mLoadingErrors;
116:            }
117:
118:            void setConstrainedProperty(ConstrainedProperty constrainedProperty) {
119:                mConstrainedProperty = constrainedProperty;
120:            }
121:
122:            ConstrainedProperty getConstrainedProperty() {
123:                return mConstrainedProperty;
124:            }
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.