001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package com.caucho.jca.cfg;
031:
032: import com.caucho.config.types.DescriptionGroupConfig;
033: import com.caucho.log.Log;
034: import com.caucho.util.L10N;
035:
036: import java.util.logging.Logger;
037:
038: /**
039: * Configuration for a connector.
040: */
041: public class ConnectorConfig extends DescriptionGroupConfig {
042: private static final L10N L = new L10N(ConnectorConfig.class);
043: private static final Logger log = Logger
044: .getLogger(ConnectorConfig.class.getName());
045:
046: private String _id;
047:
048: private String _displayName;
049:
050: private String _vendorName;
051: private String _specVersion;
052: private String _eisType;
053: private String _resourceAdapterVersion;
054:
055: private ResourceAdapterConfig _resourceAdapter;
056:
057: public ConnectorConfig() {
058: _resourceAdapter = new ResourceAdapterConfig();
059: }
060:
061: /**
062: * Sets the id/name.
063: */
064: public void setId(String id) {
065: _id = id;
066: }
067:
068: /**
069: * Gets the id/name.
070: */
071: public String getId() {
072: return _id;
073: }
074:
075: /**
076: * Sets the version of JCA supported by the ResourceAdapter.
077: */
078: public void setVersion(String version) {
079: }
080:
081: /**
082: * Sets the schema.
083: */
084: public void setSchemaLocation(String schema) {
085: }
086:
087: /**
088: * Sets the vendor-name of the resource.
089: */
090: public void setVendorName(String vendorName) {
091: _vendorName = vendorName;
092: }
093:
094: /**
095: * Sets the license.
096: */
097: public License createLicense() {
098: return new License();
099: }
100:
101: /**
102: * Sets the eis type of the resource.
103: */
104: public void setEISType(String eisType) {
105: _eisType = eisType;
106: }
107:
108: /**
109: * Sets the version of the resource adapter.
110: */
111: public void setResourceadapterVersion(String version) {
112: _resourceAdapterVersion = version;
113: }
114:
115: /**
116: * Sets the spec version.
117: */
118: public void setSpecVersion(String version) {
119: }
120:
121: /**
122: * Sets the resource adapter itself.
123: */
124: public ResourceAdapterConfig createResourceadapter() {
125: return _resourceAdapter;
126: }
127:
128: /**
129: * Returns the resource adapter config.
130: */
131: public ResourceAdapterConfig getResourceAdapter() {
132: return _resourceAdapter;
133: }
134:
135: public void init() {
136: }
137:
138: public static class License {
139: public void setDescription(String value) {
140: }
141:
142: public void setLicenseRequired(boolean required) {
143: }
144: }
145: }
|