KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > component > lifecycle > test > TestComponentConfigurationImpl


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.component.lifecycle.test;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21
22 /**
23  * A Component configuration implementation (would otherwise
24  * be implemented by a Configuration Proxy)
25  *
26  * Copyright 2002 Sapient
27  * @since carbon 1.0
28  * @author Douglas Voet, April 2002
29  * @version $Revision: 1.18 $($Author: dvoet $ / $Date: 2003/05/05 21:21:13 $)
30  */

31 public class TestComponentConfigurationImpl
32 implements TestComponentConfiguration {
33
34     /** Creates a new instance of TestComponentConfigurationImpl */
35     public TestComponentConfigurationImpl() {
36     }
37
38     /**
39      * The method returns the Class object for the class that implements this
40      * component's service. This Class object must not be abstract and must
41      * be public. This class must also have a public default constructor to
42      * allow the ComponentBuilder to instantiate it.
43      *
44      * @return Class The class object that implements this component
45      */

46     public Class JavaDoc getFunctionalImplementationClass(){
47         return null;
48     }
49
50     /**
51      * This method returns the class of the implemented interface for this
52      * service. The Component Class must be an implementation of this interface.
53      *
54      * @return Class The class object of the interface implemented by this
55      * component.
56      */

57     public Class JavaDoc getFunctionalInterface() {
58         return null;
59     }
60
61     /**
62      * The method returns the Class object for the class that implements this
63      * component's service. This Class object must not be abstract and must
64      * be public. This class must also have a public default constructor to
65      * allow the ComponentBuilder to instantiate it.
66      *
67      * @return Class The class object that implements this component
68      */

69     public Class JavaDoc getComponentClass() {
70         return null;
71     }
72
73     /**
74      * Returns the name of this configuration
75      */

76     public String JavaDoc getConfigurationName() {
77         return "UNDEFINED";
78     }
79
80     /**
81      * This method returns the <code>Class</code> of this component's
82      * configuration.
83      *
84      * @return Class the class object for either an interface or a class that
85      * will hold the configuration representation for a Component.
86      */

87     public Class JavaDoc getConfigurationInterface() {
88         return null;
89     }
90
91     public org.jdom.Document getDataStructure() {
92         return null;
93     }
94
95
96
97     /**
98      * @see Object#clone()
99      */

100     public Object JavaDoc clone() {
101         try {
102             return super.clone();
103         } catch(CloneNotSupportedException JavaDoc cnse) {
104             throw new RuntimeException JavaDoc("caught exception: " + cnse);
105         }
106     }
107
108     /**
109      * @see Configuration#setName(String)
110      */

111     public void setConfigurationName(String JavaDoc name) {
112     }
113
114     public void setFunctionalImplementationClass(Class JavaDoc functionalImplementationClass) {
115     }
116
117     public void setFunctionalInterface(Class JavaDoc functionalInterfaceClass) {
118     }
119
120     /**
121      * @see ComponentConfiguration#getComponentTemplateName()
122      */

123     public String JavaDoc getComponentTemplateName() {
124         return ComponentConfiguration.ComponentTemplateName;
125     }
126
127     /**
128      * @see ComponentConfiguration#setComponentTemplateConfiguration(String)
129      */

130     public void setComponentTemplateName(String JavaDoc configuraitonName) {
131     }
132
133     public org.jdom.Element getRootElement() {
134         return null;
135     }
136
137     public String JavaDoc getComponentDescription() {
138         return null;
139     }
140
141     public void setComponentDescription(String JavaDoc str) {
142     }
143
144     /** Is this configuration document writable or is it read-only. Shared cache
145      * instances of configuration objects should either be synchronized or
146      * marked not writable. When a configuration object is not writable, it
147      * should throw an exception if an attempt is made to modify it.
148      *
149      * @return true if this cofiguration object may be altered.
150      * @since carbon 1.1
151      *
152      */

153     public boolean isConfigurationWritable() {
154         return true;
155     }
156
157     /** Sets whether this configuration may be altered.
158      * @param writable set to true if this document can be altered
159      * @since carbon 1.1
160      *
161      */

162     public void setConfigurationReadOnly() {
163         // bah
164
}
165
166 }
167
Popular Tags