KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_rar > deployment > xml > SecurityEntry


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: Eric Hardesty
23  * --------------------------------------------------------------------------
24  * $Id: SecurityEntry.java,v 1.3 2004/09/17 22:33:32 ehardesty Exp $
25  * --------------------------------------------------------------------------
26  */

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

35
36 public class SecurityEntry extends AbsElement {
37
38     /**
39      * principalName
40      */

41     private String JavaDoc principalName = null;
42
43     /**
44      * user
45      */

46     private String JavaDoc user = null;
47
48     /**
49      * password
50      */

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

56     private String JavaDoc encrypted = null;
57
58     /**
59      * Constructor
60      */

61     public SecurityEntry() {
62         super();
63     }
64
65     /**
66      * Gets the principalName
67      * @return the principalName
68      */

69     public String JavaDoc getPrincipalName() {
70         return principalName;
71     }
72
73     /**
74      * Set the principalName
75      * @param principalName id object
76      */

77     public void setPrincipalName(String JavaDoc principalName) {
78         this.principalName = principalName;
79     }
80
81     /**
82      * Gets the user
83      * @return the user
84      */

85     public String JavaDoc getUser() {
86         return user;
87     }
88
89     /**
90      * Set the user
91      * @param user id object
92      */

93     public void setUser(String JavaDoc user) {
94         this.user = user;
95     }
96
97     /**
98      * Gets the password
99      * @return the password
100      */

101     public String JavaDoc getPassword() {
102         return password;
103     }
104
105     /**
106      * Set the password
107      * @param password id object
108      */

109     public void setPassword(String JavaDoc password) {
110         this.password = password;
111     }
112
113     /**
114      * Gets the encrypted value
115      * @return the encrypted value
116      */

117     public String JavaDoc getEncrypted() {
118         return encrypted;
119     }
120
121     /**
122      * Set the encrypted
123      * @param encrypted id object
124      */

125     public void setEncrypted(String JavaDoc encrypted) {
126         this.encrypted = encrypted;
127     }
128
129     /**
130      * Represents this element by it's XML description.
131      * @param indent use this indent for prefixing XML representation.
132      * @return the XML description of this object.
133      */

134     public String JavaDoc toXML(int indent) {
135         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
136         sb.append(indent(indent));
137         sb.append("<security-entry");
138         sb.append(xmlAttribute(principalName, "principalName"));
139         sb.append(xmlAttribute(user, "user"));
140         sb.append(xmlAttribute(password, "password"));
141         sb.append(xmlAttribute(encrypted, "encrypted"));
142         sb.append("/>\n");
143
144         return sb.toString();
145     }
146 }
147
Popular Tags