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: jonas-team
023: * --------------------------------------------------------------------------
024: * $Id: JonasSecurity.java 4799 2004-05-25 14:26:36Z sauthieg $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_client.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029:
030: /**
031: * This class defines the implementation of the element jonas-security
032: * @author jonas-team
033: */
034:
035: public class JonasSecurity extends AbsElement {
036:
037: /**
038: * jaasfile
039: */
040: private String jaasfile = null;
041:
042: /**
043: * jaasentry
044: */
045: private String jaasentry = null;
046:
047: /**
048: * username
049: */
050: private String username = null;
051:
052: /**
053: * password
054: */
055: private String password = null;
056:
057: /**
058: * Default constructor
059: */
060: public JonasSecurity() {
061: super ();
062: }
063:
064: /**
065: * @return the jaasfile
066: */
067: public String getJaasfile() {
068: return jaasfile;
069: }
070:
071: /**
072: * Set the jaasfile
073: * @param jaasfile jaasfile
074: */
075: public void setJaasfile(String jaasfile) {
076: this .jaasfile = jaasfile;
077: }
078:
079: /**
080: * @return the jaasentry
081: */
082: public String getJaasentry() {
083: return jaasentry;
084: }
085:
086: /**
087: * Set the jaasentry
088: * @param jaasentry jaasentry
089: */
090: public void setJaasentry(String jaasentry) {
091: this .jaasentry = jaasentry;
092: }
093:
094: /**
095: * @return the username
096: */
097: public String getUsername() {
098: return username;
099: }
100:
101: /**
102: * Set the username
103: * @param username username
104: */
105: public void setUsername(String username) {
106: this .username = username;
107: }
108:
109: /**
110: * @return the password
111: */
112: public String getPassword() {
113: return password;
114: }
115:
116: /**
117: * Set the password
118: * @param password password
119: */
120: public void setPassword(String password) {
121: this .password = password;
122: }
123:
124: /**
125: * Represents this element by it's XML description.
126: * @param indent use this indent for prexifing XML representation.
127: * @return the XML description of this object.
128: */
129: public String toXML(int indent) {
130: StringBuffer sb = new StringBuffer();
131: sb.append(indent(indent));
132: sb.append("<jonas-security>\n");
133:
134: indent += 2;
135:
136: // jaasfile
137: sb.append(xmlElement(jaasfile, "jaasfile", indent));
138: // jaasentry
139: sb.append(xmlElement(jaasentry, "jaasentry", indent));
140: // username
141: sb.append(xmlElement(username, "username", indent));
142: // password
143: sb.append(xmlElement(password, "password", indent));
144: indent -= 2;
145: sb.append(indent(indent));
146: sb.append("</jonas-security>\n");
147:
148: return sb.toString();
149: }
150: }
|