Source Code Cross Referenced for Constrained.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: Constrained.java 3717 2007-04-12 18:01:39Z gbevin $
007:         */
008:        package com.uwyn.rife.site;
009:
010:        import java.util.Collection;
011:
012:        /**
013:         * This interface defines methods for bean-centric constraining of data
014:         * entities.
015:         * <p>A constraint describes additional information about a data entity. Its
016:         * main purpose is to alter the default behaviour of a data type and to
017:         * clearly set the accepted limits. The meta-data that's provided through
018:         * constraints can be used elsewhere to gather more information about how to
019:         * correctly integrate the indicated data limits.
020:         * <p>For example, a constraint specifies that a certain text's length is
021:         * limited to 30 characters, parts of the system can query this information
022:         * and act accordingly:
023:         * <ul>
024:         * <li>a HTML form builder can create a field that doesn't allow the entry of
025:         * longer text,
026:         * <li>a SQL query builder can limit the size of the column in which the text
027:         * will stored when the table creation SQL is generated,
028:         * <li>a validation system can check if the text isn't longer than 30
029:         * characters and provide appropriate information when the length is exceeded.
030:         * </ul>
031:         * <p>There are two types of constraints:
032:         * <ul>
033:         * <li>those that are related to the entire bean (<code>ConstrainedBean</code>
034:         * constraints)
035:         * <li>those that only apply to a single property (<code>ConstrainedProperty</code>
036:         * constraints)
037:         * </ul>
038:         *
039:         * @author Geert Bevin (gbevin[remove] at uwyn dot com)
040:         * @see ConstrainedBean
041:         * @see ConstrainedProperty
042:         * @version $Revision: 3717 $
043:         * @since 1.0
044:         */
045:        public interface Constrained<B extends ConstrainedBean, P extends ConstrainedProperty> {
046:            /**
047:             * Add a new constrained bean.
048:             * <p>
049:             * When several constrained beans are added, they are merged at
050:             * constraint-level. This means for instance that all previous unique
051:             * constraints will be replaced by those of the new constrained bean, they
052:             * will not be combined.
053:             *
054:             * @param constrainedBean the <code>ConstrainedBean</code> instance
055:             * that has to be added
056:             * @see ConstrainedBean
057:             * @since 1.0
058:             */
059:            public void addConstraint(B constrainedBean);
060:
061:            /**
062:             * Add a new constrained property.
063:             * <p>
064:             * When several of the same constrained properties are added, they are
065:             * merged at constraint-level. This means for instance that a previous
066:             * inList constraint will be replaced by the one of the new constrained
067:             * bean, they will not be combined.
068:             *
069:             * @param constrainedProperty the <code>ConstrainedProperty</code>
070:             * instance that has to be added
071:             * @see ConstrainedProperty
072:             * @since 1.0
073:             */
074:            public void addConstraint(P constrainedProperty);
075:
076:            /**
077:             * Retrieves the constrained bean that has been set for this
078:             * <code>Constrained</code> instance.
079:             *
080:             * @return the requested <code>ConstrainedBean; or </code>
081:             * <p><code>null</code> if no <code>ConstrainedBean</code> is
082:             * available.
083:             * @see ConstrainedProperty
084:             * @since 1.0
085:             */
086:            public B getConstrainedBean();
087:
088:            /**
089:             * Returns a collection with all the constrained properties that have
090:             * been registered.
091:             *
092:             * @return A <code>Collection</code> with all the
093:             * <code>ConstrainedProperty</code> objects that are registered. If no
094:             * constrained properties are available, an empty collection will be
095:             * returned, not <code>null</code>.
096:             * @see ConstrainedProperty
097:             * @since 1.0
098:             */
099:            public Collection<P> getConstrainedProperties();
100:
101:            /**
102:             * Indicates whether this constrained bean contains a particular constraint
103:             * on at least one of its properties.
104:             *
105:             * @return <code>true</code> if this constraint is present on at least one
106:             * of the properties; or
107:             * <p><code>false</code> otherwise
108:             * @see ConstrainedProperty
109:             * @since 1.6
110:             */
111:            public boolean hasPropertyConstraint(String name);
112:
113:            /**
114:             * Retrieve a registered <code>ConstrainedProperty</code> according to
115:             * its name.
116:             *
117:             * @param propertyName the name of the
118:             * <code>ConstrainedProperty</code> that has to be retrieved
119:             * @return the requested <code>ConstrainedProperty; or </code>
120:             * <p><code>null</code> if no such <code>ConstrainedProperty</code> is
121:             * available.
122:             * @see ConstrainedProperty
123:             * @since 1.0
124:             */
125:            public P getConstrainedProperty(String propertyName);
126:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.