KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > webservice > AbstractWebService


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the GNU Lesser General Public License as
5  * published by the Free Software Foundation; either version
6  * 2.1 of the License, or (at your option) any later version.
7  * You may obtain a copy of the License at
8  *
9  * http://www.gnu.org/licenses/lgpl.txt
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the
16  * License.
17  */

18 package org.alfresco.repo.webservice;
19
20 import org.alfresco.service.cmr.repository.ContentService;
21 import org.alfresco.service.cmr.repository.NodeService;
22 import org.alfresco.service.cmr.search.SearchService;
23 import org.alfresco.service.namespace.NamespaceService;
24
25 /**
26  * Abstract base class for all web service implementations, provides support for common
27  * service injection
28  *
29  * @author gavinc
30  */

31 public abstract class AbstractWebService
32 {
33    protected NodeService nodeService;
34    protected ContentService contentService;
35    protected SearchService searchService;
36    protected NamespaceService namespaceService;
37    
38    /**
39     * Sets the instance of the NodeService to be used
40     *
41     * @param nodeService The NodeService
42     */

43    public void setNodeService(NodeService nodeService)
44    {
45       this.nodeService = nodeService;
46    }
47    
48    /**
49     * Sets the ContentService instance to use
50     *
51     * @param contentSvc The ContentService
52     */

53    public void setContentService(ContentService contentSvc)
54    {
55       this.contentService = contentSvc;
56    }
57    
58    /**
59     * Sets the instance of the SearchService to be used
60     *
61     * @param searchService The SearchService
62     */

63    public void setSearchService(SearchService searchService)
64    {
65       this.searchService = searchService;
66    }
67    
68    /**
69     * Sets the instance of the NamespaceService to be used
70     *
71     * @param namespaceService The NamespaceService
72     */

73    public void setNamespaceService(NamespaceService namespaceService)
74    {
75       this.namespaceService = namespaceService;
76    }
77 }
78
Popular Tags