KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
24  * This class represents the device capabilities.
25  *
26  * @author Luigia Fassina @ Funambol
27  *
28  * @version $Id: Capabilities.java,v 1.5 2005/03/02 20:57:38 harrie Exp $
29  *
30  */

31 public class Capabilities implements Serializable JavaDoc {
32
33     // ------------------------------------------------------------ Private data
34
private String JavaDoc id ;
35     private boolean supportLargeObject ;
36     private boolean supportNumberOfChanges;
37
38     // ------------------------------------------------------------- Costructors
39
/** Creates a new instance of Capabilities */
40     public Capabilities() {
41         this(null, false, false);
42     }
43
44     /**
45      * Creates a new instance of Capabilities.
46      *
47      * @param id the capabilities id
48      */

49     public Capabilities(String JavaDoc id) {
50         this(id, false, false);
51     }
52
53     /**
54      * Creates a new instance of Capabilities.
55      *
56      * @param id the capabilities id
57      * @param largeobject Y if the client device supports large objects,
58      * N otherwise
59      * @param numberofchanges Y if the client device supports number of changes,
60      * N otherwise
61      *
62      */

63     public Capabilities(String JavaDoc id ,
64                         boolean supportLargeObject ,
65                         boolean supportNumberOfChanges) {
66
67         this.id = id ;
68         this.supportLargeObject = supportLargeObject ;
69         this.supportNumberOfChanges = supportNumberOfChanges;
70     }
71
72     /**
73      * Getter for property id.
74      * @return Value of property id.
75      */

76     public String JavaDoc getId() {
77         return id;
78     }
79
80     /**
81      * Setter for property id.
82      * @param name New value of property id.
83      */

84     public void setId(String JavaDoc id) {
85         this.id = id;
86     }
87     
88     /**
89      * Setter for property supportLargeObject.
90      * @param name New value of property supportLargeObject.
91      *
92      */

93     public void setSupportLargeObject(boolean supportLargeObject) {
94         this.supportLargeObject = supportLargeObject;
95     }
96         
97     /**
98      * Getter for property supportLargeObject.
99      * @return true if device support large obj.
100      */

101     public boolean isSupportLargeObject() {
102         return supportLargeObject;
103     }
104
105     /** Setter for property numberOfChanges.
106      * @param name New value of property numberOfChanges.
107      *
108      */

109     public void setSupportNumberOfChanges(boolean supportNumberOfChanges) {
110         this.supportNumberOfChanges = supportNumberOfChanges;
111     }
112
113     /**
114      * Getter for property supportNumberOfChanges.
115      * @return true if device support number of changes.
116      */

117     public boolean isSupportNumberOfChanges() {
118         return supportNumberOfChanges;
119     }
120
121 }
122
Popular Tags