001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: *
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or 1any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * Initial developer: Eric Hardesty
023: * --------------------------------------------------------------------------
024: * $Id: SecurityEntry.java 5459 2004-09-17 22:33:33Z ehardesty $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_rar.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029:
030: /**
031: * This class defines the implementation of the element security-entry
032: *
033: * @author Eric Hardesty
034: */
035:
036: public class SecurityEntry extends AbsElement {
037:
038: /**
039: * principalName
040: */
041: private String principalName = null;
042:
043: /**
044: * user
045: */
046: private String user = null;
047:
048: /**
049: * password
050: */
051: private String password = null;
052:
053: /**
054: * encrypted
055: */
056: private String encrypted = null;
057:
058: /**
059: * Constructor
060: */
061: public SecurityEntry() {
062: super ();
063: }
064:
065: /**
066: * Gets the principalName
067: * @return the principalName
068: */
069: public String getPrincipalName() {
070: return principalName;
071: }
072:
073: /**
074: * Set the principalName
075: * @param principalName id object
076: */
077: public void setPrincipalName(String principalName) {
078: this .principalName = principalName;
079: }
080:
081: /**
082: * Gets the user
083: * @return the user
084: */
085: public String getUser() {
086: return user;
087: }
088:
089: /**
090: * Set the user
091: * @param user id object
092: */
093: public void setUser(String user) {
094: this .user = user;
095: }
096:
097: /**
098: * Gets the password
099: * @return the password
100: */
101: public String getPassword() {
102: return password;
103: }
104:
105: /**
106: * Set the password
107: * @param password id object
108: */
109: public void setPassword(String password) {
110: this .password = password;
111: }
112:
113: /**
114: * Gets the encrypted value
115: * @return the encrypted value
116: */
117: public String getEncrypted() {
118: return encrypted;
119: }
120:
121: /**
122: * Set the encrypted
123: * @param encrypted id object
124: */
125: public void setEncrypted(String 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 toXML(int indent) {
135: StringBuffer sb = new StringBuffer();
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: }
|