1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.chemistry.opencmis.commons.spi;
20
21 import java.io.Serializable;
22
23 import org.apache.chemistry.opencmis.commons.enums.BindingType;
24
25 /**
26 * Entry point for all CMIS binding related operations. It provides access to
27 * the service interface objects which are very similar to the CMIS 1.0 domain
28 * model.
29 *
30 * <p>
31 * Each instance of this class represents a session. A session comprises of a
32 * connection to one CMIS endpoint over one binding for one particular user and
33 * a set of caches. All repositories that are exposed by this CMIS endpoint are
34 * accessible in this session. All CMIS operations and extension points are
35 * provided if they are supported by the underlying binding.
36 * </p>
37 */
38 public interface CmisBinding extends Serializable {
39
40 /**
41 * Returns the client session id.
42 */
43 String getSessionId();
44
45 /**
46 * Returns the binding type.
47 */
48 BindingType getBindingType();
49
50 /**
51 * Gets a Repository Service interface object.
52 */
53 RepositoryService getRepositoryService();
54
55 /**
56 * Gets a Navigation Service interface object.
57 */
58 NavigationService getNavigationService();
59
60 /**
61 * Gets an Object Service interface object.
62 */
63 ObjectService getObjectService();
64
65 /**
66 * Gets a Versioning Service interface object.
67 */
68 VersioningService getVersioningService();
69
70 /**
71 * Gets a Relationship Service interface object.
72 */
73 RelationshipService getRelationshipService();
74
75 /**
76 * Gets a Discovery Service interface object.
77 */
78 DiscoveryService getDiscoveryService();
79
80 /**
81 * Gets a Multifiling Service interface object.
82 */
83 MultiFilingService getMultiFilingService();
84
85 /**
86 * Gets an ACL Service interface object.
87 */
88 AclService getAclService();
89
90 /**
91 * Gets a Policy Service interface object.
92 */
93 PolicyService getPolicyService();
94
95 /**
96 * Gets a factory for CMIS binding specific objects.
97 */
98 BindingsObjectFactory getObjectFactory();
99
100 /**
101 * Gets the authentication provider.
102 */
103 AuthenticationProvider getAuthenticationProvider();
104
105 /**
106 * Clears all caches of the current CMIS binding session.
107 */
108 void clearAllCaches();
109
110 /**
111 * Clears all caches of the current CMIS binding session that are related to
112 * the given repository.
113 *
114 * @param repositoryId
115 * the repository id
116 */
117 void clearRepositoryCache(String repositoryId);
118
119 /**
120 * Releases all resources assigned to this binding instance.
121 */
122 void close();
123 }