KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > dm > ddf > Auth


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.core.dm.ddf;
20
21
22 /**
23  * Corresponds to the <Auth> interior node in the management tree
24  *
25  * @author Stefano Nichele @ Funambol
26  *
27  * @version $Id: Auth.java,v 1.1 2005/05/16 17:32:55 nichele Exp $
28  */

29 public class Auth {
30
31
32    // --------------------------------------------------------------- Constants
33
public static final String JavaDoc AUTH_ID = "/Id";
34    public static final String JavaDoc AUTH_SECRET = "/Secret" ;
35
36
37    // ------------------------------------------------------------ Private data
38
private String JavaDoc id;
39    private String JavaDoc secret;
40
41
42    // ------------------------------------------------------------ Constructors
43
/** For serialization purposes */
44    public Auth() {}
45
46     /**
47      * Creates a new ConAuth object with the given parameters
48      *
49      * @param id the authentication identifier
50      * @param secret the type authentication secret
51      */

52     public Auth(final String JavaDoc id,
53                    final String JavaDoc secret) {
54         this.id = id;
55         this.secret = secret;
56     }
57
58
59     // ---------------------------------------------------------- Public methods
60

61     /**
62      * Gets the id
63      *
64      * @return the id
65      */

66     public String JavaDoc getId() {
67         return id;
68     }
69
70     /**
71      * Sets the id
72      *
73      * @param the id
74      */

75     public void setId(String JavaDoc id) {
76         this.id = id;
77     }
78
79     /**
80      * Gets the secret
81      *
82      * @return the secret
83      */

84     public String JavaDoc getSecret() {
85         return secret;
86     }
87
88     /**
89      * Sets the secret
90      *
91      * @param the secret
92      */

93     public void setSecret(String JavaDoc secret) {
94         this.secret = secret;
95     }
96
97
98 }
Popular Tags