KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > ServiceRegistry


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service;
18
19 import java.util.Collection JavaDoc;
20
21 import org.alfresco.service.cmr.action.ActionService;
22 import org.alfresco.service.cmr.coci.CheckOutCheckInService;
23 import org.alfresco.service.cmr.dictionary.DictionaryService;
24 import org.alfresco.service.cmr.lock.LockService;
25 import org.alfresco.service.cmr.model.FileFolderService;
26 import org.alfresco.service.cmr.repository.ContentService;
27 import org.alfresco.service.cmr.repository.CopyService;
28 import org.alfresco.service.cmr.repository.MimetypeService;
29 import org.alfresco.service.cmr.repository.NodeService;
30 import org.alfresco.service.cmr.repository.TemplateService;
31 import org.alfresco.service.cmr.rule.RuleService;
32 import org.alfresco.service.cmr.search.CategoryService;
33 import org.alfresco.service.cmr.search.SearchService;
34 import org.alfresco.service.cmr.security.AuthenticationService;
35 import org.alfresco.service.cmr.security.AuthorityService;
36 import org.alfresco.service.cmr.security.PermissionService;
37 import org.alfresco.service.cmr.version.VersionService;
38 import org.alfresco.service.cmr.view.ExporterService;
39 import org.alfresco.service.cmr.view.ImporterService;
40 import org.alfresco.service.descriptor.DescriptorService;
41 import org.alfresco.service.namespace.NamespaceService;
42 import org.alfresco.service.namespace.QName;
43 import org.alfresco.service.transaction.TransactionService;
44
45
46 /**
47  * This interface represents the registry of public Repository Services.
48  * The registry provides meta-data about each service and provides
49  * access to the service interface.
50  *
51  * @author David Caruana
52  */

53 public interface ServiceRegistry
54 {
55     // Service Bean Names
56

57     static final String JavaDoc SERVICE_REGISTRY = "ServiceRegistry";
58
59     static final QName REGISTRY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "ServiceRegistry");
60     static final QName DESCRIPTOR_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "DescriptorService");
61     static final QName TRANSACTION_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "TransactionService");
62     static final QName AUTHENTICATION_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "AuthenticationService");
63     static final QName NAMESPACE_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "NamespaceService");
64     static final QName DICTIONARY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "DictionaryService");
65     static final QName NODE_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "NodeService");
66     static final QName CONTENT_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "ContentService");
67     static final QName MIMETYPE_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "MimetypeService");
68     static final QName SEARCH_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "SearchService");
69     static final QName CATEGORY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "CategoryService");
70     static final QName COPY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "CopyService");
71     static final QName LOCK_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "LockService");
72     static final QName VERSION_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "VersionService");
73     static final QName COCI_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "CheckoutCheckinService");
74     static final QName RULE_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "RuleService");
75     static final QName IMPORTER_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "ImporterService");
76     static final QName EXPORTER_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "ExporterService");
77     static final QName ACTION_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "ActionService");
78     static final QName PERMISSIONS_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "PermissionService");
79     static final QName AUTHORITY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "AuthorityService");
80     static final QName TEMPLATE_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "TemplateService");
81     static final QName FILE_FOLDER_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "FileFolderService");
82     
83     /**
84      * Get the list of services provided by the Repository
85      *
86      * @return list of provided Services
87      */

88     Collection JavaDoc<QName> getServices();
89
90     /**
91      * Is the specified service provided by the Repository?
92      *
93      * @param service name of service to test provision of
94      * @return true => provided, false => not provided
95      */

96     boolean isServiceProvided(QName service);
97
98     /**
99      * Get meta-data about the specified service
100      *
101      * @param service name of service to retrieve meta data for
102      * @return the service meta data
103      */

104     ServiceDescriptor getServiceDescriptor(QName service);
105
106     /**
107      * Get the specified service.
108      *
109      * @param service name of service to retrieve
110      * @return the service interface (must cast to interface as described in service meta-data)
111      */

112     Object JavaDoc getService(QName service);
113     
114     /**
115      * @return the descriptor service
116      */

117     DescriptorService getDescriptorService();
118     
119     /**
120      * @return the transaction service
121      */

122     TransactionService getTransactionService();
123
124     /**
125      * @return the namespace service (or null, if one is not provided)
126      */

127     NamespaceService getNamespaceService();
128     
129     /**
130      * @return the authentication service (or null, if one is not provided)
131      */

132     AuthenticationService getAuthenticationService();
133     
134     /**
135      * @return the node service (or null, if one is not provided)
136      */

137     NodeService getNodeService();
138
139     /**
140      * @return the content service (or null, if one is not provided)
141      */

142     ContentService getContentService();
143     
144     /**
145      * @return the mimetype service (or null, if one is not provided)
146      */

147     MimetypeService getMimetypeService();
148
149     /**
150      * @return the search service (or null, if one is not provided)
151      */

152     SearchService getSearchService();
153     
154     /**
155      * @return the version service (or null, if one is not provided)
156      */

157     VersionService getVersionService();
158     
159     /**
160      * @return the lock service (or null, if one is not provided)
161      */

162     LockService getLockService();
163
164     /**
165      * @return the dictionary service (or null, if one is not provided)
166      */

167     DictionaryService getDictionaryService();
168  
169     /**
170      * @return the copy service (or null, if one is not provided)
171      */

172     CopyService getCopyService();
173     
174     /**
175      * @return the checkout / checkin service (or null, if one is not provided)
176      */

177     CheckOutCheckInService getCheckOutCheckInService();
178     
179     /**
180      * @return the category service (or null, if one is not provided)
181      */

182     CategoryService getCategoryService();
183     
184     /**
185      * @return the importer service or null if not present
186      */

187     ImporterService getImporterService();
188     
189     /**
190      * @return the exporter service or null if not present
191      */

192     ExporterService getExporterService();
193     
194     /**
195      * @return the rule service (or null, if one is not provided)
196      */

197     RuleService getRuleService();
198     
199     /**
200      * @return the action service (or null if one is not provided)
201      */

202     ActionService getActionService();
203     
204     /**
205      * @return the permission service (or null if one is not provided)
206      */

207     PermissionService getPermissionService();
208     
209     /**
210      * @return the authority service (or null if one is not provided)
211      */

212     AuthorityService getAuthorityService();
213     
214     /**
215      * @return the template service (or null if one is not provided)
216      */

217     TemplateService getTemplateService();
218     
219     /**
220      * @return the file-folder manipulation service (or null if one is not provided)
221      */

222     FileFolderService getFileFolderService();
223 }
224
Popular Tags