KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > server > Sync4jConnector


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package sync4j.framework.server;
20
21 import java.io.Serializable JavaDoc;
22
23 import sync4j.framework.server.Sync4jSourceType;
24
25 import org.apache.commons.lang.builder.ToStringBuilder;
26
27 /**
28  * This class represents a connector.
29  *
30  * @author Luigia Fassina @ Funambol
31  *
32  * @version $Id: Sync4jConnector.java,v 1.4 2005/03/02 20:57:38 harrie Exp $
33  *
34  */

35 public class Sync4jConnector implements Serializable JavaDoc {
36
37     private String JavaDoc connectorId;
38     private String JavaDoc connectorName;
39     private String JavaDoc description;
40     private String JavaDoc adminClass;
41     private Sync4jSourceType[] syncSourceType;
42
43     /** Creates a new instance of SyncConnector */
44     public Sync4jConnector() {
45         this(null,null,null,null);
46     }
47
48     public Sync4jConnector(String JavaDoc connectorId ,
49                            String JavaDoc connectorName,
50                            String JavaDoc description ,
51                            String JavaDoc adminClass ) {
52         this.connectorId = connectorId;
53         this.connectorName = connectorName;
54         this.description = description;
55         this.adminClass = adminClass;
56     }
57
58     /** Getter for property connectorId.
59      * @return Value of property connectorId.
60      *
61      */

62     public String JavaDoc getConnectorId() {
63         return connectorId;
64     }
65
66     /** Setter for property connectorId.
67      * @param connectorId New value of property connectorId.
68      *
69      */

70     public void setConnectorId(String JavaDoc connectorId) {
71         this.connectorId = connectorId;
72     }
73
74     /** Getter for property connectorName.
75      * @return Value of property connectorName.
76      *
77      */

78     public String JavaDoc getConnectorName() {
79         return connectorName;
80     }
81
82     /** Setter for property connectorName.
83      * @param connectorName New value of property connectorName.
84      *
85      */

86     public void setConnectorName(String JavaDoc connectorName) {
87         this.connectorName = connectorName;
88     }
89
90     /** Getter for property desciption.
91      * @return Value of property description.
92      *
93      */

94     public String JavaDoc getDescription() {
95         return description;
96     }
97
98     /** Setter for property description.
99      * @param description New value of property description.
100      *
101      */

102     public void setDescription(String JavaDoc description) {
103         this.description = description;
104     }
105
106     /** Getter for property adminClass.
107      * @return Value of property adminClass.
108      *
109      */

110     public String JavaDoc getAdminClass() {
111         return adminClass;
112     }
113
114     /** Setter for property adminClass.
115      * @param adminClass New value of property adminClass.
116      *
117      */

118     public void setAdminClass(String JavaDoc adminClass) {
119         this.adminClass = adminClass;
120     }
121
122     public void setSourceTypes(Sync4jSourceType[] syncSourceType) {
123         this.syncSourceType = syncSourceType;
124     }
125     public Sync4jSourceType[] getSourceTypes() {
126         return this.syncSourceType;
127     }
128
129     public String JavaDoc toString() {
130         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
131         sb.append("IdConnector :" + this.connectorId);
132         sb.append("ConnectorName:" + this.connectorName);
133         sb.append("Description :" + this.description);
134         sb.append("AdminClass :" + this.adminClass);
135         return sb.toString();
136     }
137
138 }
139
Popular Tags