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: SecurityRoleRef.java 4718 2004-05-10 12:06:09Z sauthieg $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_lib.deployment.xml;
027:
028: /**
029: * This class defines the implementation of the element security-role-ref
030: *
031: * @author JOnAS team
032: */
033:
034: public class SecurityRoleRef extends AbsElement {
035:
036: /**
037: * description
038: */
039: private String description = null;
040:
041: /**
042: * role-name
043: */
044: private String roleName = null;
045:
046: /**
047: * role-link
048: */
049: private String roleLink = null;
050:
051: /**
052: * Constructor
053: */
054: public SecurityRoleRef() {
055: super ();
056: }
057:
058: /**
059: * Gets the description
060: * @return the description
061: */
062: public String getDescription() {
063: return description;
064: }
065:
066: /**
067: * Set the description
068: * @param description description
069: */
070: public void setDescription(String description) {
071: this .description = description;
072: }
073:
074: /**
075: * Gets the role-name
076: * @return the role-name
077: */
078: public String getRoleName() {
079: return roleName;
080: }
081:
082: /**
083: * Set the role-name
084: * @param roleName roleName
085: */
086: public void setRoleName(String roleName) {
087: this .roleName = roleName;
088: }
089:
090: /**
091: * Gets the role-link
092: * @return the role-link
093: */
094: public String getRoleLink() {
095: return roleLink;
096: }
097:
098: /**
099: * Set the role-link
100: * @param roleLink roleLink
101: */
102: public void setRoleLink(String roleLink) {
103: this .roleLink = roleLink;
104: }
105:
106: /**
107: * Represents this element by it's XML description.
108: * @param indent use this indent for prexifing XML representation.
109: * @return the XML description of this object.
110: */
111: public String toXML(int indent) {
112: StringBuffer sb = new StringBuffer();
113: sb.append(indent(indent));
114: sb.append("<security-role-ref>\n");
115:
116: indent += 2;
117:
118: // description
119: sb.append(xmlElement(description, "description", indent));
120: // role-name
121: sb.append(xmlElement(roleName, "role-name", indent));
122: // role-link
123: sb.append(xmlElement(roleLink, "role-link", indent));
124: indent -= 2;
125: sb.append(indent(indent));
126: sb.append("</security-role-ref>\n");
127:
128: return sb.toString();
129: }
130: }
|