001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id:WAR.java 2059 2007-11-22 17:22:33Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.deployment.xml.struct;
025:
026: import java.util.LinkedList;
027: import java.util.List;
028:
029: /**
030: * This class represents a WEB deployment descriptor.
031: * @author Florent Benoit
032: */
033: public class WAR {
034:
035: /**
036: * List of servlet objects.
037: */
038: private List<Servlet> servlets = null;
039:
040: /**
041: * List of listener objects.
042: */
043: private List<Listener> listeners = null;
044:
045: /**
046: * List of tag objects.
047: */
048: private List<Tag> tags = null;
049:
050: /**
051: * Default constructor.
052: */
053: public WAR() {
054: this .servlets = new LinkedList<Servlet>();
055: this .listeners = new LinkedList<Listener>();
056: this .tags = new LinkedList<Tag>();
057: }
058:
059: /**
060: * Add a given servlet.
061: * @param servlet the given servlet object.
062: */
063: public void addServlet(final Servlet servlet) {
064: this .servlets.add(servlet);
065: }
066:
067: /**
068: * @return list of servlets.
069: */
070: public List<Servlet> getServlets() {
071: return this .servlets;
072: }
073:
074: /**
075: * Add a given listener.
076: * @param listener the given servlet object.
077: */
078: public void addListener(final Listener listener) {
079: this .listeners.add(listener);
080: }
081:
082: /**
083: * @return list of listeners.
084: */
085: public List<Listener> getListeners() {
086: return this .listeners;
087: }
088:
089: /**
090: * Add a given tag.
091: * @param tag the given tag object.
092: */
093: public void addTag(final Tag tag) {
094: this .tags.add(tag);
095: }
096:
097: /**
098: * @return list of tags.
099: */
100: public List<Tag> getTags() {
101: return this.tags;
102: }
103: }
|