KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > jca > cfg > ConnectorConfig


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Scott Ferguson
27  */

28
29 package com.caucho.jca.cfg;
30
31 import com.caucho.log.Log;
32 import com.caucho.util.L10N;
33
34 import java.util.logging.Logger JavaDoc;
35
36 /**
37  * Configuration for a connector.
38  */

39 public class ConnectorConfig {
40   private static final L10N L = new L10N(ConnectorConfig.class);
41   private static final Logger JavaDoc log = Log.open(ConnectorConfig.class);
42
43   private String JavaDoc _id;
44
45   private String JavaDoc _displayName;
46   
47   private String JavaDoc _vendorName;
48   private String JavaDoc _specVersion;
49   private String JavaDoc _eisType;
50   private String JavaDoc _resourceAdapterVersion;
51
52   private ResourceAdapterConfig _resourceAdapter;
53   
54   public ConnectorConfig()
55   {
56     _resourceAdapter = new ResourceAdapterConfig();
57   }
58
59   /**
60    * Sets the id/name.
61    */

62   public void setId(String JavaDoc id)
63   {
64     _id = id;
65   }
66
67   /**
68    * Gets the id/name.
69    */

70   public String JavaDoc getId()
71   {
72     return _id;
73   }
74
75   /**
76    * Sets the version of JCA supported by the ResourceAdapter.
77    */

78   public void setVersion(String JavaDoc version)
79   {
80   }
81
82   /**
83    * Sets the schema.
84    */

85   public void setSchemaLocation(String JavaDoc schema)
86   {
87   }
88
89   /**
90    * Sets the vendor-name of the resource.
91    */

92   public void setVendorName(String JavaDoc vendorName)
93   {
94     _vendorName = vendorName;
95   }
96
97   /**
98    * Sets the display-name of the resource.
99    */

100   public void setDisplayName(String JavaDoc displayName)
101   {
102     _displayName = displayName;
103   }
104
105   /**
106    * Gets the display-name of the resource.
107    */

108   public String JavaDoc getDisplayName()
109   {
110     return _displayName;
111   }
112
113   /**
114    * Sets the description of the resource.
115    */

116   public void setDescription(String JavaDoc description)
117   {
118   }
119
120   /**
121    * Sets the icon.
122    */

123   public Icon createIcon()
124   {
125     return new Icon();
126   }
127
128   /**
129    * Sets the license.
130    */

131   public License createLicense()
132   {
133     return new License();
134   }
135
136   /**
137    * Sets the eis type of the resource.
138    */

139   public void setEISType(String JavaDoc eisType)
140   {
141     _eisType = eisType;
142   }
143
144   /**
145    * Sets the version of the resource adapter.
146    */

147   public void setResourceAdapterVersion(String JavaDoc version)
148   {
149     _resourceAdapterVersion = version;
150   }
151
152   /**
153    * Sets the spec version.
154    */

155   public void setSpecVersion(String JavaDoc version)
156   {
157   }
158
159   /**
160    * Sets the resource adapter itself.
161    */

162   public ResourceAdapterConfig createResourceadapter()
163   {
164     return _resourceAdapter;
165   }
166
167   /**
168    * Returns the resource adapter config.
169    */

170   public ResourceAdapterConfig getResourceAdapter()
171   {
172     return _resourceAdapter;
173   }
174
175   public void init()
176   {
177   }
178
179   public static class Icon {
180     public void setSmallIcon(String JavaDoc value)
181     {
182     }
183     
184     public void setLargeIcon(String JavaDoc value)
185     {
186     }
187   }
188
189   public static class License {
190     public void setDescription(String JavaDoc value)
191     {
192     }
193     
194     public void setLicenseRequired(boolean required)
195     {
196     }
197   }
198 }
199
Popular Tags