Source Code Cross Referenced for Repository.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 javax.naming.Referenceable;
007:
008:        /**
009:         * The entry point into the content repository. The <code>Repository</code> object
010:         * is usually acquired through JNDI.
011:         */
012:        public interface Repository extends Referenceable {
013:
014:            /**
015:             * The descriptor key for the version of the specification
016:             * that this repository implements. For JCR 2.0
017:             * the value of this descriptor is "2.0".
018:             */
019:            public static final String SPEC_VERSION_DESC = "jcr.specification.version";
020:
021:            /**
022:             * The descriptor key for the name of the specification
023:             * that this repository implements. For JCR 2.0
024:             * the value of this descriptor is "Content Repository for
025:             * Java Technology API".
026:             */
027:            public static final String SPEC_NAME_DESC = "jcr.specification.name";
028:
029:            /**
030:             * The descriptor key for the name of the repository vendor.
031:             */
032:            public static final String REP_VENDOR_DESC = "jcr.repository.vendor";
033:
034:            /**
035:             * The descriptor key for the URL of the repository vendor.
036:             */
037:            public static final String REP_VENDOR_URL_DESC = "jcr.repository.vendor.url";
038:
039:            /**
040:             * The descriptor key for the name of this repository implementation.
041:             */
042:            public static final String REP_NAME_DESC = "jcr.repository.name";
043:
044:            /**
045:             * The descriptor key for the version of this repository implementation.
046:             */
047:            public static final String REP_VERSION_DESC = "jcr.repository.version";
048:
049:            /**
050:             * Indicates whether this implementation supports all level 1 features.
051:             * This descriptor should always be "true".
052:             */
053:            public static final String LEVEL_1_SUPPORTED = "level.1.supported";
054:
055:            /**
056:             * Indicates whether this implementation supports all level 2 features.
057:             * This descriptor will be either "true" or "false".
058:             */
059:            public static final String LEVEL_2_SUPPORTED = "level.2.supported";
060:
061:            /**
062:             * Indicates whether this implementation supports node type registration.
063:             * This descriptor will be either "true" or "false".
064:             *
065:             * @since JCR 2.0
066:             */
067:            public static final String OPTION_NODE_TYPE_REG_SUPPORTED = "option.node.type.reg.supported";
068:
069:            /**
070:             * Indicates whether this implementation supports transactions.
071:             * This descriptor will be either "true" or "false".
072:             */
073:            public static final String OPTION_TRANSACTIONS_SUPPORTED = "option.transactions.supported";
074:
075:            /**
076:             * Indicates whether this implementation supports versioning.
077:             * This descriptor will be either "true" or "false".
078:             */
079:            public static final String OPTION_VERSIONING_SUPPORTED = "option.versioning.supported";
080:
081:            /**
082:             * Indicates whether this implementation supports simple versioning.
083:             * This descriptor will be either "true" or "false".
084:             *
085:             * @since JCR 2.0
086:             */
087:            public static final String OPTION_SIMPLE_VERSIONING_SUPPORTED = "option.simple.versioning.supported";
088:
089:            /**
090:             * Indicates whether this implementation supports activities.
091:             * This descriptor will be either "true" or "false".
092:             *
093:             * @since JCR 2.0
094:             */
095:            public static final String OPTION_ACTIVITIES_SUPPORTED = "option.activities.supported";
096:
097:            /**
098:             * Indicates whether this implementation supports configurations and
099:             * baselines. This descriptor will be either "true" or "false".
100:             *
101:             * @since JCR 2.0
102:             */
103:            public static final String OPTION_BASELINES_SUPPORTED = "option.baselines.supported";
104:
105:            /**
106:             * Indicates whether this implementation supports asynchronous observation.
107:             * This descriptor will be either "true" or "false".
108:             */
109:            public static final String OPTION_OBSERVATION_SUPPORTED = "option.observation.supported";
110:
111:            /**
112:             * Indicates whether this implementation supports journaled  observation.
113:             * This descriptor will be either "true" or "false".
114:             *
115:             * @since JCR 2.0
116:             */
117:            public static final String OPTION_JOURNALED_OBSERVATION_SUPPORTED = "option.journaled.observation.supported";
118:
119:            /**
120:             * Indicates whether this implementation supports locking.
121:             * This descriptor will be either "true" or "false".
122:             */
123:            public static final String OPTION_LOCKING_SUPPORTED = "option.locking.supported";
124:
125:            /**
126:             * Indicates whether this implementation supports the SQL query language.
127:             * This descriptor will be either "true" or "false".
128:             */
129:            public static final String OPTION_QUERY_SQL_SUPPORTED = "option.query.sql.supported";
130:
131:            /**
132:             * Indicates whether this implementation supports access control discovery.
133:             * This descriptor will be either "true" or "false".
134:             *
135:             * @since JCR 2.0
136:             */
137:            public static final String OPTION_ACCESS_CONTROL_DISCOVERY_SUPPORTED = "option.access.control.discovery.supported";
138:
139:            /**
140:             * Indicates whether this implementation supports access control policies.
141:             * This descriptor will be either "true" or "false".
142:             *
143:             * @since JCR 2.0
144:             */
145:            public static final String OPTION_ACCESS_CONTROL_POLICIES_SUPPORTED = "option.access.control.policies.supported";
146:
147:            /**
148:             * Indicates whether this implementation supports access control entries.
149:             * This descriptor will be either "true" or "false".
150:             *
151:             * @since JCR 2.0
152:             */
153:            public static final String OPTION_ACCESS_CONTROL_ENTRIES_SUPPORTED = "option.access.control.entries.supported";
154:
155:            /**
156:             * Indicates whether this implementation supports lifecycle management.
157:             * This descriptor will be either "true" or "false".
158:             *
159:             * @since JCR 2.0
160:             */
161:            public static final String OPTION_LIFECYCLE_SUPPORTED = "option.lifecycle.supported";
162:
163:            /**
164:             * Indicates whether the index position notation for
165:             * same-name siblings is supported within XPath queries.
166:             * This descriptor will be either "true" or "false".
167:             */
168:            public static final String QUERY_XPATH_POS_INDEX = "query.xpath.pos.index";
169:
170:            /**
171:             * Indicates whether XPath queries return results in document order.
172:             * This descriptor will be either "true" or "false".
173:             */
174:            public static final String QUERY_XPATH_DOC_ORDER = "query.xpath.doc.order";
175:
176:            /**
177:             * Returns a string array holding all descriptor keys available for this implementation.
178:             * This set must contain at least the built-in keys defined by the string constants in
179:             * this interface. Used in conjunction with {@link #getDescriptor(String name)}
180:             * to query information about this repository implementation.
181:             *
182:             * @return a string array holding all descriptor keys.
183:             */
184:            public String[] getDescriptorKeys();
185:
186:            /**
187:             * Returns the descriptor for the specified key. Used to query information about this
188:             * repository implementation. The set of available keys can be found by calling
189:             * {@link #getDescriptorKeys}. If the specifed key is not found, <code>null</code> is returned.
190:             *
191:             * @param key a string corresponding to a descriptor for this repository implementation.
192:             * @return a descriptor string
193:             */
194:            public String getDescriptor(String key);
195:
196:            /**
197:             * Authenticates the user using the supplied <code>credentials</code>. If <code>workspaceName</code> is
198:             * recognized as the name of an existing workspace in the repository and
199:             * authorization to access that workspace is granted, then a new <code>Session</code> object is returned.
200:             * The format of the string <code>workspaceName</code> depends upon the implementation.
201:             * <p>
202:             * If <code>credentials</code> is <code>null</code>, it is assumed that authentication is handled by a
203:             * mechanism external to the repository itself (for example, through the JAAS framework) and that the
204:             * repository implementation exists within a context (for example, an application server) that allows
205:             * it to handle authorization of the request for access to the specified workspace.
206:             * <p>
207:             * If <code>workspaceName</code> is <code>null</code>, a default workspace is automatically selected by
208:             * the repository implementation. This may, for example, be the "home workspace" of the user whose
209:             * credentials were passed, though this is entirely up to the configuration and implementation of the
210:             * repository. Alternatively, it may be a "null workspace" that serves only to provide the method
211:             * {@link Workspace#getAccessibleWorkspaceNames}, allowing the client to select from among available "real"
212:             * workspaces.
213:             * <p>
214:             * If authentication or authorization for the specified workspace fails, a <code>LoginException</code> is
215:             * thrown.
216:             * <p>
217:             * If <code>workspaceName</code> is not recognized, a <code>NoSuchWorkspaceException</code> is thrown.
218:             *
219:             * @param credentials   The credentials of the user
220:             * @param workspaceName the name of a workspace.
221:             * @return a valid session for the user to access the repository.
222:             * @throws LoginException  If the login fails.
223:             * @throws NoSuchWorkspaceException If the specified <code>workspaceName</code> is not recognized.
224:             * @throws RepositoryException if another error occurs.
225:             */
226:            public Session login(Credentials credentials, String workspaceName)
227:                    throws LoginException, NoSuchWorkspaceException,
228:                    RepositoryException;
229:
230:            /**
231:             * Equivalent to <code>login(credentials, null)</code>.
232:             *
233:             * @param credentials   The credentials of the user
234:             * @return a valid session for the user to access the repository.
235:             * @throws LoginException  If the login authentication fails.
236:             * @throws RepositoryException if another error occurs.
237:             */
238:            public Session login(Credentials credentials)
239:                    throws LoginException, RepositoryException;
240:
241:            /**
242:             * Equivalent to <code>login(null, workspaceName)</code>.
243:             *
244:             * @param workspaceName the name of a workspace.
245:             * @return a valid session for the user to access the repository.
246:             * @throws LoginException  If the login authentication fails.
247:             * @throws NoSuchWorkspaceException If the specified <code>workspaceName</code> is not recognized.
248:             * @throws RepositoryException if another error occurs.
249:             */
250:            public Session login(String workspaceName) throws LoginException,
251:                    NoSuchWorkspaceException, RepositoryException;
252:
253:            /**
254:             * Equivalent to <code>login(null, null)</code>.
255:             *
256:             * @return a valid session for the user to access the repository.
257:             * @throws LoginException  If the login authentication fails.
258:             * @throws RepositoryException if another error occurs.
259:             */
260:            public Session login() throws LoginException, RepositoryException;
261:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.