001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2006 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify
008: * it under the terms of the GNU General Public License as published by
009: * the Free Software Foundation; either version 2 of the License, or
010: * (at your option) any later version.
011: *
012: * This program 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: * General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: *
023: * $Id: FtpOutput.java 3245 2006-11-28 05:51:14Z jzhang $
024: */
025: package com.bostechcorp.cbesb.runtime.component.ftp.wsdl;
026:
027: import java.io.Serializable;
028:
029: import javax.wsdl.extensions.ExtensibilityElement;
030: import javax.xml.namespace.QName;
031:
032: import com.bostechcorp.cbesb.runtime.component.util.wsdl.BaseCommonAttribute;
033:
034: /**
035: * @author j.zhang
036: * @version 1.0.0
037: */
038: public class FtpOutput extends BaseCommonAttribute implements
039: ExtensibilityElement, Serializable {
040:
041: /**
042: * Generated serial version UID.
043: */
044: private static final long serialVersionUID = -875125118672832105L;
045:
046: /**
047: * required.
048: */
049: protected Boolean required;
050:
051: /**
052: * elementType.
053: */
054: protected QName elementType;
055:
056: /**
057: * Hostname or IP address of FTP server.
058: */
059: private String ftpHost;
060:
061: /**
062: * User name to login to FTP server.
063: */
064: private String ftpUser;
065:
066: /**
067: * Password to login to FTP server.
068: */
069: private String ftpPassword;
070:
071: /**
072: * Specify the XML based command file described in advanced mode.
073: */
074: private String cmdFile;
075:
076: /**
077: * Value should be "active" or "passive".
078: */
079: private String ftpConnectMode;
080:
081: /**
082: * Value should be "ascii" or "binary".
083: */
084: private String ftpTransferMode;
085:
086: /**
087: * Destination location for data files.
088: */
089: private String destDir;
090:
091: /**
092: * Local directory used when transferring files.
093: */
094: private String transferDir;
095:
096: /**
097: * Staging directory where files are created and written to.
098: */
099: private String stageDir;
100:
101: /**
102: * Value is the name of the charset to use to write character data to the file.
103: */
104: private String charset;
105:
106: /**
107: * Value determines how records are written to a file. Acceptable values are:<br>
108: * raw - Each record from a Normalized Message is written to an individual file.<br>
109: * newline - Each record from a Normalized Message is written to the same file
110: * separated by a newline.
111: */
112: private String writeStyle;
113:
114: /**
115: * Describes a file pattern to use to name the file when being written. This can be
116: * used to add a date/time stamp to the file. The pattern may contain literal
117: * characters as well as the following macros that will be replaced with values at
118: * runtime:<br>
119: * {DATE} - The system date formatted as yyyymmdd.<br>
120: * {TIME} - The system time formatted as hhmmss.<br>
121: * {BASENAME} - The original file's base name (name without extension).<br>
122: * {EXT} - The original file's extension.<br>
123: * {COUNT} - An automatically incremented value that starts from 1 when the component
124: * is started.
125: */
126: private String filePattern;
127:
128: /**
129: * Value determines what to do with the file after it is transferred to the FTP
130: * server. Acceptable values are:<br>
131: * delete - File is deleted.<br>
132: * archive - File is moved to archive directory.
133: */
134: private String fileCompleteAction;
135:
136: /**
137: * Directory to place the local copy of the file when done transferring.
138: */
139: private String archiveDir;
140:
141: /**
142: * Describes a file pattern to use to rename the file when being archived. This can be
143: * used to add a date/time stamp to the file. If the value is null, then the file is
144: * not renamed when it is moved to archiveDir. The pattern may contain literal
145: * characters as well as the following macros that will be replaced with values at
146: * runtime:<br>
147: * {DATE} - The system date formatted as yyyymmdd.<br>
148: * {TIME} - The system time formatted as hhmmss.<br>
149: * {BASENAME} - The original file's base name (name without extension).<br>
150: * {EXT} - The original file's extension.<br>
151: * {COUNT} - An automatically incremented value that starts from 1 when the component
152: * is started.
153: */
154: private String archiveFilePattern;
155:
156: /**
157: * Get the required.
158: *
159: * @return the required
160: */
161: public Boolean getRequired() {
162: return required;
163: }
164:
165: /**
166: * Set the required.
167: *
168: * @param required the required to set
169: */
170: public void setRequired(Boolean required) {
171: this .required = required;
172: }
173:
174: /**
175: * Get the elementType.
176: *
177: * @return the elementType
178: */
179: public QName getElementType() {
180: return elementType;
181: }
182:
183: /**
184: * Set the elementType.
185: *
186: * @param elementType the elementType to set
187: */
188: public void setElementType(QName elementType) {
189: this .elementType = elementType;
190: }
191:
192: /**
193: * Get the ftpHost.
194: *
195: * @return the ftpHost
196: */
197: public String getFtpHost() {
198: return ftpHost;
199: }
200:
201: /**
202: * Set the ftpHost.
203: *
204: * @param ftpHost the ftpHost to set
205: */
206: public void setFtpHost(String ftpHost) {
207: this .ftpHost = ftpHost;
208: }
209:
210: /**
211: * Get the ftpUser.
212: *
213: * @return the ftpUser
214: */
215: public String getFtpUser() {
216: return ftpUser;
217: }
218:
219: /**
220: * Set the ftpUser.
221: *
222: * @param ftpUser the ftpUser to set
223: */
224: public void setFtpUser(String ftpUser) {
225: this .ftpUser = ftpUser;
226: }
227:
228: /**
229: * Get the ftpPassword.
230: *
231: * @return the ftpPassword
232: */
233: public String getFtpPassword() {
234: return ftpPassword;
235: }
236:
237: /**
238: * Set the ftpPassword.
239: *
240: * @param ftpPassword the ftpPassword to set
241: */
242: public void setFtpPassword(String ftpPassword) {
243: this .ftpPassword = ftpPassword;
244: }
245:
246: /**
247: * Get the cmdFile.
248: *
249: * @return the cmdFile
250: */
251: public String getCmdFile() {
252: return cmdFile;
253: }
254:
255: /**
256: * Set the cmdFile.
257: *
258: * @param cmdFile the cmdFile to set
259: */
260: public void setCmdFile(String cmdFile) {
261: this .cmdFile = cmdFile;
262: }
263:
264: /**
265: * Get the ftpConnectMode.
266: *
267: * @return the ftpConnectMode
268: */
269: public String getFtpConnectMode() {
270: return ftpConnectMode;
271: }
272:
273: /**
274: * Set the ftpConnectMode.
275: *
276: * @param ftpConnectMode the ftpConnectMode to set
277: */
278: public void setFtpConnectMode(String ftpConnectMode) {
279: this .ftpConnectMode = ftpConnectMode;
280: }
281:
282: /**
283: * Get the ftpTransferMode.
284: *
285: * @return the ftpTransferMode
286: */
287: public String getFtpTransferMode() {
288: return ftpTransferMode;
289: }
290:
291: /**
292: * Set the ftpTransferMode.
293: *
294: * @param ftpTransferMode the ftpTransferMode to set
295: */
296: public void setFtpTransferMode(String ftpTransferMode) {
297: this .ftpTransferMode = ftpTransferMode;
298: }
299:
300: /**
301: * Get the destDir.
302: *
303: * @return the destDir
304: */
305: public String getDestDir() {
306: return destDir;
307: }
308:
309: /**
310: * Set the destDir.
311: *
312: * @param destDir the destDir to set
313: */
314: public void setDestDir(String destDir) {
315: this .destDir = destDir;
316: }
317:
318: /**
319: * Get the transferDir.
320: *
321: * @return the transferDir
322: */
323: public String getTransferDir() {
324: return transferDir;
325: }
326:
327: /**
328: * Set the transferDir.
329: *
330: * @param transferDir the transferDir to set
331: */
332: public void setTransferDir(String transferDir) {
333: this .transferDir = transferDir;
334: }
335:
336: /**
337: * Get the stageDir.
338: *
339: * @return the stageDir
340: */
341: public String getStageDir() {
342: return stageDir;
343: }
344:
345: /**
346: * Set the stageDir.
347: *
348: * @param stageDir the stageDir to set
349: */
350: public void setStageDir(String stageDir) {
351: this .stageDir = stageDir;
352: }
353:
354: /**
355: * Get the charset.
356: *
357: * @return the charset
358: */
359: public String getCharset() {
360: return charset;
361: }
362:
363: /**
364: * Set the charset.
365: *
366: * @param charset the charset to set
367: */
368: public void setCharset(String charset) {
369: this .charset = charset;
370: }
371:
372: /**
373: * Get the writeStyle.
374: *
375: * @return the writeStyle
376: */
377: public String getWriteStyle() {
378: return writeStyle;
379: }
380:
381: /**
382: * Set the writeStyle.
383: *
384: * @param writeStyle the writeStyle to set
385: */
386: public void setWriteStyle(String writeStyle) {
387: this .writeStyle = writeStyle;
388: }
389:
390: /**
391: * Get the filePattern.
392: *
393: * @return the filePattern
394: */
395: public String getFilePattern() {
396: return filePattern;
397: }
398:
399: /**
400: * Set the filePattern.
401: *
402: * @param filePattern the filePattern to set
403: */
404: public void setFilePattern(String filePattern) {
405: this .filePattern = filePattern;
406: }
407:
408: /**
409: * Get the fileCompleteAction.
410: *
411: * @return the fileCompleteAction
412: */
413: public String getFileCompleteAction() {
414: return fileCompleteAction;
415: }
416:
417: /**
418: * Set the fileCompleteAction.
419: *
420: * @param fileCompleteAction the fileCompleteAction to set
421: */
422: public void setFileCompleteAction(String fileCompleteAction) {
423: this .fileCompleteAction = fileCompleteAction;
424: }
425:
426: /**
427: * Get the archiveDir.
428: *
429: * @return the archiveDir
430: */
431: public String getArchiveDir() {
432: return archiveDir;
433: }
434:
435: /**
436: * Set the archiveDir.
437: *
438: * @param archiveDir the archiveDir to set
439: */
440: public void setArchiveDir(String archiveDir) {
441: this .archiveDir = archiveDir;
442: }
443:
444: /**
445: * Get the archiveFilePattern.
446: *
447: * @return the archiveFilePattern
448: */
449: public String getArchiveFilePattern() {
450: return archiveFilePattern;
451: }
452:
453: /**
454: * Set the archiveFilePattern.
455: *
456: * @param archiveFilePattern the archiveFilePattern to set
457: */
458: public void setArchiveFilePattern(String archiveFilePattern) {
459: this .archiveFilePattern = archiveFilePattern;
460: }
461:
462: /* (non-Javadoc)
463: * @see com.bostechcorp.cbesb.runtime.component.util.wsdl.BaseCommonAttribute#toString()
464: */
465: public String toString() {
466: return "FtpOutput[" + "required=" + required + ", "
467: + "elementType=" + elementType + ", "
468: + super .toString() + "ftpHost=" + ftpHost + ", "
469: + "ftpUser=" + ftpUser + ", " + "ftpPassword="
470: + ftpPassword + ", " + "cmdFile=" + cmdFile + ", "
471: + "ftpConnectMode=" + ftpConnectMode + ", "
472: + "ftpTransferMode=" + ftpTransferMode + ", "
473: + "destDir=" + destDir + ", " + "transferDir="
474: + transferDir + ", " + "stageDir=" + stageDir + ", "
475: + "charset=" + charset + ", " + "writeStyle="
476: + writeStyle + ", " + "filePattern=" + filePattern
477: + ", " + "fileCompleteAction=" + fileCompleteAction
478: + ", " + "archiveDir=" + archiveDir + ", "
479: + "archiveFilePattern=" + archiveFilePattern + ", "
480: + "]";
481: }
482: }
|