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: ArchiveInfo.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.ant.archive.info;
025:
026: import java.io.File;
027: import java.util.ArrayList;
028: import java.util.List;
029:
030: import org.apache.tools.ant.types.FileSet;
031:
032: /**
033: * Class that holds information about an archive.
034: * @author Florent Benoit
035: */
036: public class ArchiveInfo {
037:
038: /**
039: * Reference to the standard deployment descriptor.
040: */
041: private File dd = null;
042:
043: /**
044: * Reference to the persistence deployment descriptor.
045: */
046: private File persistenceDD = null;
047:
048: /**
049: * Full path to the archive.
050: */
051: private File dest = null;
052:
053: /**
054: * List of fileset used to add files.
055: */
056: private List<FileSet> fileSetList = null;
057:
058: /**
059: * Exploded mode or not ? (default = file).
060: */
061: private boolean exploded = false;
062:
063: /**
064: * Default constructor.
065: */
066: public ArchiveInfo() {
067: this .fileSetList = new ArrayList<FileSet>();
068:
069: }
070:
071: /**
072: * Add the given fileset to the list of existing fileset.
073: * @param fileSet the fileset to add.
074: */
075: public void addFileSet(final FileSet fileSet) {
076: fileSetList.add(fileSet);
077: }
078:
079: /**
080: * Gets the list of fileset to include in the archive.
081: * @return the list of fileset to include in the archive.
082: */
083: public List<FileSet> getFileSetList() {
084: return fileSetList;
085: }
086:
087: /**
088: * Sets the reference to the deployment descriptor.
089: * @param dd the given deployment descriptor.
090: */
091: public void setDD(final File dd) {
092: this .dd = dd;
093: }
094:
095: /**
096: * Gets the reference to the deployment descriptor.
097: * @return the standard deployment descriptor.
098: */
099: public File getDd() {
100: return dd;
101: }
102:
103: /**
104: * Sets the reference to the persistence deployment descriptor.
105: * @param persistenceDD the given persistence deployment descriptor.
106: */
107: public void setPersistenceDD(final File persistenceDD) {
108: this .persistenceDD = persistenceDD;
109: }
110:
111: /**
112: * Gets the reference to the persistence deployment descriptor.
113: * @return the persistence deployment descriptor.
114: */
115: public File getPersistenceDD() {
116: return persistenceDD;
117: }
118:
119: /**
120: * Sets the path to the archive that will be built.
121: * @param dest the reference to resulting archive path.
122: */
123: public void setDest(final File dest) {
124: this .dest = dest;
125: }
126:
127: /**
128: * Gets the path to the archive that will be built.
129: * @return the reference to resulting archive path.
130: */
131: public File getDest() {
132: return dest;
133: }
134:
135: /**
136: * Sets the exploded mode to true or false.
137: * @param exploded boolean true/false
138: */
139: public void setExploded(final boolean exploded) {
140: this .exploded = exploded;
141: }
142:
143: /**
144: * Gets the state : exploded mode or not ?
145: * @return the state : exploded mode or not ?
146: */
147: public boolean isExploded() {
148: return exploded;
149: }
150: }
|