KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > bootstrap > Characteristic


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.bootstrap;
20
21 import java.util.ArrayList JavaDoc;
22
23
24 /**
25  * Corresponds to the <characteristic> tag in a Wap provisioning doc.
26  *
27  * @author Stefano Nichele
28  *
29  * @version $Id: Characteristic.java,v 1.1 2005/05/16 17:32:54 nichele Exp $
30  *
31  */

32 public final class Characteristic {
33
34     // --------------------------------------------------------------- Constants
35
public static final String JavaDoc TYPE_PXLOGICAL = "PXLOGICAL";
36     public static final String JavaDoc TYPE_PXPHYSICAL = "PXPHYSICAL";
37     public static final String JavaDoc TYPE_PXAUTHINFO = "PXAUTHINFO";
38     public static final String JavaDoc TYPE_PORT = "PORT";
39     public static final String JavaDoc TYPE_NAPDEF = "NAPDEF";
40     public static final String JavaDoc TYPE_NAPAUTHINFO = "NAPAUTHINFO";
41     public static final String JavaDoc TYPE_VALIDITY = "VALIDITY";
42     public static final String JavaDoc TYPE_BOOTSTRAP = "BOOTSTRAP";
43     public static final String JavaDoc TYPE_CLIENTIDENTITY = "CLIENTIDENTITY";
44     public static final String JavaDoc TYPE_VENDORCONFIG = "VENDORCONFIG";
45     public static final String JavaDoc TYPE_APPLICATION = "APPLICATION";
46     public static final String JavaDoc TYPE_APPADDR = "APPADDR";
47     public static final String JavaDoc TYPE_APPAUTH = "APPAUTH";
48     public static final String JavaDoc TYPE_RESOURCE = "RESOURCE";
49     public static final String JavaDoc TYPE_ACCESS = "ACCESS";
50
51
52
53     // -------------------------------------------------------------- Properties
54

55     private ArrayList JavaDoc childs;
56
57     private String JavaDoc type;
58
59     // ------------------------------------------------------------ Constructors
60

61     public Characteristic() {
62         childs = new ArrayList JavaDoc();
63     }
64
65     public Characteristic(String JavaDoc type) {
66         this();
67         this.type = type;
68     }
69
70
71     /**
72      * Adds new <code>Characteristic</code> to this characteristic
73      * @param characteristicToAdd the characteristic to add
74      */

75     public void add(Characteristic characteristicToAdd) {
76         childs.add(characteristicToAdd);
77     }
78
79     /**
80      * Adds new <code>Parm</code> to this characteristic
81      * @param parmToAdd the parm to add
82      */

83     public void add(Parm parmToAdd) {
84         childs.add(parmToAdd);
85     }
86
87     /**
88      * Gets the type
89      * @return the type of this characteristic
90      */

91     public String JavaDoc getType() {
92         return type;
93     }
94
95     /**
96      * Sets the type of this characteristic
97      * @param type the type to sets
98      */

99     public void setType(String JavaDoc type) {
100         this.type = type;
101     }
102
103 }
Popular Tags