Source Code Cross Referenced for ValueFactory.java in  » 6.0-JDK-Modules » jsr-283 » javax » jcr » 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 » 6.0 JDK Modules » jsr 283 » javax.jcr 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
003:         */
004:        package javax.jcr;
005:
006:        import java.io.InputStream;
007:        import java.util.Calendar;
008:        import java.math.BigDecimal;
009:
010:        /**
011:         * The <code>ValueFactory</code> object provides methods for the creation Value objects that can then
012:         * be used to set properties.
013:         */
014:        public interface ValueFactory {
015:
016:            /**
017:             * Returns a <code>Value</code> object of {@link PropertyType#STRING}
018:             * with the specified <code>value</code>.
019:             *
020:             * @param value a <code>String</code>
021:             * @return a <code>Value</code> of {@link PropertyType#STRING}
022:             */
023:            public Value createValue(String value);
024:
025:            /**
026:             * Returns a <code>Value</code> object of the {@link PropertyType} specified by <code>type</code>
027:             * with the specified <code>value</code>.
028:             *
029:             * A <code>ValueFormatException</code> is thrown if the specified <code>value</code> cannot
030:             * be converted to the specifed <code>type</code>.
031:             *
032:             * @param value a <code>String</code>
033:             * @param type one of the constants defined in {@link PropertyType}.
034:             * @return a <code>Value</code> of {@link PropertyType} <code>type</code>.
035:             * @throws ValueFormatException if the specified <code>value</code> cannot
036:             * be converted to the specified <code>type</code>.
037:             */
038:            public Value createValue(String value, int type)
039:                    throws ValueFormatException;
040:
041:            /**
042:             * Returns a <code>Value</code> object of {@link PropertyType#LONG}
043:             * with the specified <code>value</code>.
044:             *
045:             * @param value a <code>long</code>
046:             * @return a <code>Value</code> of {@link PropertyType#LONG}
047:             */
048:            public Value createValue(long value);
049:
050:            /**
051:             * Returns a <code>Value</code> object of {@link PropertyType#DOUBLE}
052:             * with the specified <code>value</code>.
053:             *
054:             * @param value a <code>double</code>
055:             * @return a <code>Value</code> of {@link PropertyType#DOUBLE}
056:             */
057:            public Value createValue(double value);
058:
059:            /**
060:             * Returns a <code>Value</code> object of {@link PropertyType#DECIMAL}
061:             * with the specified <code>value</code>.
062:             *
063:             * @param value a <code>double</code>
064:             * @return a <code>Value</code> of {@link PropertyType#DECIMAL}
065:             * @since JCR 2.0
066:             */
067:            public Value createValue(BigDecimal value);
068:
069:            /**
070:             * Returns a <code>Value</code> object of {@link PropertyType#BOOLEAN}
071:             * with the specified <code>value</code>.
072:             *
073:             * @param value a <code>boolean</code>
074:             * @return a <code>Value</code> of {@link PropertyType#BOOLEAN}
075:             */
076:            public Value createValue(boolean value);
077:
078:            /**
079:             * Returns a <code>Value</code> object of {@link PropertyType#DATE}
080:             * with the specified <code>value</code>.
081:             *
082:             * @param value a <code>Calendar</code>
083:             * @return a <code>Value</code> of {@link PropertyType#DATE}
084:             */
085:            public Value createValue(Calendar value);
086:
087:            /**
088:             * Returns a <code>Value</code> object of <code>PropertyType.BINARY</code>
089:             * with a value consisting of the content of the specified <code>InputStream</code>.
090:             * <p/>
091:             * The passed <code>InputStream</code> is closed before this method returns either
092:             * normally or because of an exception.
093:             * <p/>
094:             * Throws a <code>RepositoryException</code> if an error occurs.
095:             *
096:             * @deprecated As of JCR 2.0, {@link #createValue(Binary)} should be used instead.
097:             *
098:             * @param value an <code>InputStream</code>
099:             * @return a <code>Value</code> of {@link PropertyType#BINARY}
100:             * @throws RepositoryException if an error occurs.
101:             */
102:            public Value createValue(InputStream value)
103:                    throws RepositoryException;
104:
105:            /**
106:             * Returns a <code>Value</code> object of <code>PropertyType.BINARY</code>
107:             * with a value consisting of the content of the specified <code>Binary</code>.
108:             *
109:             * @param value a <code>Binary</code>
110:             * @return a <code>Value</code> of {@link PropertyType#BINARY}
111:             * @since JCR 2.0
112:             */
113:            public Value createValue(Binary value);
114:
115:            /**
116:             * Returns a <code>Value</code> object of {@link PropertyType#REFERENCE}
117:             * that holds the identifier of the specified <code>Node</code>. This <code>Value</code>
118:             * object can then be used to set a property that will be a reference to that
119:             * <code>Node</code>.<p/>
120:             * <p/>
121:             * A <code>RepositoryException</code> is thrown if the specified <code>Node</code>
122:             * is not referenceable, the current <code>Session</code> is no longer active, or another
123:             * error occurs.
124:             *
125:             * @param value a <code>Node</code>
126:             * @return a <code>Value</code> of {@link PropertyType#REFERENCE}
127:             * @throws RepositoryException if the specified <code>Node</code>
128:             * is not referencable, the current <code>Session</code> is no longer active, or another
129:             * error occurs.
130:             */
131:            public Value createValue(Node value) throws RepositoryException;
132:
133:            /**
134:             * Returns a <code>Binary</code> object with a value consisting of the
135:             * content of the specified <code>InputStream</code>.
136:             * <p/>
137:             * The passed <code>InputStream</code> is closed before this method returns either
138:             * normally or because of an exception.
139:             * <p/>
140:             * Throws a <code>RepositoryException</code> if an error occurs.
141:             *
142:             * @param stream an <code>InputStream</code> 
143:             * @return a <code>Binary</code>
144:             * @throws RepositoryException if an error occurs.
145:             * @since JCR 2.0
146:             */
147:            public Binary createBinary(InputStream stream)
148:                    throws RepositoryException;
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.