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: ExcludeList.java 4716 2004-05-10 11:45:44Z sauthieg $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_ejb.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029: import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
030:
031: /**
032: * This class defines the implementation of the element exclude-list
033: *
034: * @author JOnAS team
035: */
036:
037: public class ExcludeList extends AbsElement {
038:
039: /**
040: * description
041: */
042: private String description = null;
043:
044: /**
045: * method
046: */
047: private JLinkedList methodList = null;
048:
049: /**
050: * Constructor
051: */
052: public ExcludeList() {
053: super ();
054: methodList = new JLinkedList("method");
055: }
056:
057: /**
058: * Gets the description
059: * @return the description
060: */
061: public String getDescription() {
062: return description;
063: }
064:
065: /**
066: * Set the description
067: * @param description description
068: */
069: public void setDescription(String description) {
070: this .description = description;
071: }
072:
073: /**
074: * Gets the method
075: * @return the method
076: */
077: public JLinkedList getMethodList() {
078: return methodList;
079: }
080:
081: /**
082: * Set the method
083: * @param methodList method
084: */
085: public void setMethodList(JLinkedList methodList) {
086: this .methodList = methodList;
087: }
088:
089: /**
090: * Add a new method element to this object
091: * @param method the methodobject
092: */
093: public void addMethod(Method method) {
094: methodList.add(method);
095: }
096:
097: /**
098: * Represents this element by it's XML description.
099: * @param indent use this indent for prexifing XML representation.
100: * @return the XML description of this object.
101: */
102: public String toXML(int indent) {
103: StringBuffer sb = new StringBuffer();
104: sb.append(indent(indent));
105: sb.append("<exclude-list>\n");
106:
107: indent += 2;
108:
109: // description
110: sb.append(xmlElement(description, "description", indent));
111: // method
112: sb.append(methodList.toXML(indent));
113: indent -= 2;
114: sb.append(indent(indent));
115: sb.append("</exclude-list>\n");
116:
117: return sb.toString();
118: }
119: }
|