KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_client > deployment > xml > JonasSecurity


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: jonas-team
23  * --------------------------------------------------------------------------
24  * $Id: JonasSecurity.java,v 1.4 2004/05/25 14:26:35 sauthieg Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_client.deployment.xml;
28
29 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
30
31 /**
32  * This class defines the implementation of the element jonas-security
33  * @author jonas-team
34  */

35
36 public class JonasSecurity extends AbsElement {
37
38     /**
39      * jaasfile
40      */

41     private String JavaDoc jaasfile = null;
42
43     /**
44      * jaasentry
45      */

46     private String JavaDoc jaasentry = null;
47
48     /**
49      * username
50      */

51     private String JavaDoc username = null;
52
53     /**
54      * password
55      */

56     private String JavaDoc password = null;
57
58     /**
59      * Default constructor
60      */

61     public JonasSecurity() {
62         super();
63     }
64
65     /**
66      * @return the jaasfile
67      */

68     public String JavaDoc getJaasfile() {
69         return jaasfile;
70     }
71
72     /**
73      * Set the jaasfile
74      * @param jaasfile jaasfile
75      */

76     public void setJaasfile(String JavaDoc jaasfile) {
77         this.jaasfile = jaasfile;
78     }
79
80     /**
81      * @return the jaasentry
82      */

83     public String JavaDoc getJaasentry() {
84         return jaasentry;
85     }
86
87     /**
88      * Set the jaasentry
89      * @param jaasentry jaasentry
90      */

91     public void setJaasentry(String JavaDoc jaasentry) {
92         this.jaasentry = jaasentry;
93     }
94
95     /**
96      * @return the username
97      */

98     public String JavaDoc getUsername() {
99         return username;
100     }
101
102     /**
103      * Set the username
104      * @param username username
105      */

106     public void setUsername(String JavaDoc username) {
107         this.username = username;
108     }
109
110     /**
111      * @return the password
112      */

113     public String JavaDoc getPassword() {
114         return password;
115     }
116
117     /**
118      * Set the password
119      * @param password password
120      */

121     public void setPassword(String JavaDoc password) {
122         this.password = password;
123     }
124
125     /**
126      * Represents this element by it's XML description.
127      * @param indent use this indent for prexifing XML representation.
128      * @return the XML description of this object.
129      */

130     public String JavaDoc toXML(int indent) {
131         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
132         sb.append(indent(indent));
133         sb.append("<jonas-security>\n");
134
135         indent += 2;
136
137         // jaasfile
138
sb.append(xmlElement(jaasfile, "jaasfile", indent));
139         // jaasentry
140
sb.append(xmlElement(jaasentry, "jaasentry", indent));
141         // username
142
sb.append(xmlElement(username, "username", indent));
143         // password
144
sb.append(xmlElement(password, "password", indent));
145         indent -= 2;
146         sb.append(indent(indent));
147         sb.append("</jonas-security>\n");
148
149         return sb.toString();
150     }
151 }
Popular Tags