Source Code Cross Referenced for Attribute.java in  » Development » rapla » org » rapla » entities » dynamictype » 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 » Development » rapla » org.rapla.entities.dynamictype 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*--------------------------------------------------------------------------*
02:         | Copyright (C) 2006 Christopher Kohlhaas                                  |
03:         |                                                                          |
04:         | This program is free software; you can redistribute it and/or modify     |
05:         | it under the terms of the GNU General Public License as published by the |
06:         | Free Software Foundation. A copy of the license has been included with   |
07:         | these distribution in the COPYING file, if not go to www.fsf.org         |
08:         |                                                                          |
09:         | As a special exception, you are granted the permissions to link this     |
10:         | program with every library, which license fulfills the Open Source       |
11:         | Definition as published by the Open Source Initiative (OSI).             |
12:         *--------------------------------------------------------------------------*/
13:        package org.rapla.entities.dynamictype;
14:
15:        import org.rapla.entities.Annotatable;
16:        import org.rapla.entities.MultiLanguageNamed;
17:        import org.rapla.entities.RaplaObject;
18:        import org.rapla.entities.RaplaType;
19:
20:        /** Attributes are to DynamicTypes, what properties are to Beans.
21:         Currently Rapla supports the following types:
22:         <li>string</li>
23:         <li>int</li>
24:         <li>date</li>
25:         <li>boolean</li>
26:         <li>rapla:category</li>
27:         @see DynamicType */
28:        public interface Attribute extends RaplaObject, MultiLanguageNamed,
29:                Annotatable {
30:
31:            final RaplaType TYPE = new RaplaType(Attribute.class, "attribute");
32:
33:            AttributeType getType();
34:
35:            /** Set the type of the Attribute.
36:            <strong>Warning:</strong> Changing the type after initialization can lead to data loss,
37:                if there are already classifications that use this attribute and the classification value
38:                can't be converted to the new type. Example a non numerical string can't be converted to an int.*/
39:            void setType(AttributeType type);
40:
41:            void setKey(String key);
42:
43:            /** The Key is identifier in string-form. Keys could be helpfull
44:                for interaction with other modules. An Invoice-Plugin could
45:                work on attributes with a "price" key. Keys also allow for a
46:                better readability of the XML-File. Changing of a key is
47:                possible, but should be used with care.
48:             */
49:            String getKey();
50:
51:            Object defaultValue();
52:
53:            /** converts the passed value to fit the attributes type.
54:                Example Conversions are:
55:                <ul>
56:                  <li>to string: The result of the method toString() will be the new value.</li>
57:                  <li>boolean to int: The new value will be 1 when the oldValue is true. Otherwise it is 0.</li>
58:                  <li>other types to int: First the value will be converted to string-type. And then the
59:                  trimmed string will be parsed for Integer-values. If that is not possible the new value will
60:                  be null</li>
61:                  <li>to boolean: First the value will be converted to string-type. If the trimmed string equals
62:                  "0" or "false" the new value is false. Otherwise it is true</li>
63:                </ul>
64:
65:             */
66:            Object convertValue(Object oldValue);
67:
68:            /** Checks if the passed value matches the attribute type or needs conversion.
69:                @see #convertValue
70:             */
71:            boolean needsChange(Object value);
72:
73:            boolean isValid(Object object);
74:
75:            boolean isOptional();
76:
77:            void setOptional(boolean bOptional);
78:
79:            Object getConstraint(String key);
80:
81:            Class getConstraintClass(String key);
82:
83:            void setConstraint(String key, Object constraint);
84:
85:            String[] getConstraintKeys();
86:
87:            DynamicType getDynamicType();
88:
89:            public static final Attribute[] ATTRIBUTE_ARRAY = new Attribute[0];
90:
91:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.