KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > service > ServiceDescriptorAdvisorFactory


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.repo.service;
18
19 import org.springframework.beans.factory.FactoryBean;
20
21 /**
22  * Factory for creating Service Descriptor Advisors.
23  *
24  * @author David Caruana
25  */

26 public class ServiceDescriptorAdvisorFactory implements FactoryBean
27 {
28     
29     private String JavaDoc namespace;
30     private String JavaDoc description;
31     private Class JavaDoc interfaceClass;
32     
33     
34     /* (non-Javadoc)
35      * @see org.springframework.beans.factory.FactoryBean#getObject()
36      */

37     public Object JavaDoc getObject() throws Exception JavaDoc
38     {
39         return new ServiceDescriptorAdvisor(namespace, description, interfaceClass);
40     }
41
42     /* (non-Javadoc)
43      * @see org.springframework.beans.factory.FactoryBean#getObjectType()
44      */

45     public Class JavaDoc getObjectType()
46     {
47         // TODO Auto-generated method stub
48
return ServiceDescriptorAdvisor.class;
49     }
50
51     /* (non-Javadoc)
52      * @see org.springframework.beans.factory.FactoryBean#isSingleton()
53      */

54     public boolean isSingleton()
55     {
56         // TODO Auto-generated method stub
57
return false;
58     }
59
60     /**
61      * @param namespace the service name namespace
62      */

63     public void setNamespace(String JavaDoc namespace)
64     {
65         this.namespace = namespace;
66     }
67     
68     /**
69      * @param description the service description
70      */

71     public void setDescription(String JavaDoc description)
72     {
73         this.description = description;
74     }
75
76     /**
77      * @param interfaceClass the service interface class
78      */

79     public void setInterface(Class JavaDoc interfaceClass)
80     {
81         this.interfaceClass = interfaceClass;
82     }
83
84 }
85
Popular Tags