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: FtpInput.java 7226 2007-05-03 18:58:58Z mpreston $
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 FtpInput extends BaseCommonAttribute implements
039: ExtensibilityElement, Serializable {
040:
041: /**
042: * Generated serial version UID.
043: */
044: private static final long serialVersionUID = -8148335719179695509L;
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: * Directory on FTP server where files are to be retrieved.
088: */
089: private String sourceDir;
090:
091: /**
092: * Directory where files are downloaded to.
093: */
094: private String transferDir;
095:
096: /**
097: * Staging directory where files are moved for processing.
098: */
099: private String stageDir;
100:
101: /**
102: * Archive location to place files when done processing.
103: */
104: private String archiveDir;
105:
106: /**
107: * Hold location to place files when an error occurs during processing.
108: */
109: private String holdDir;
110:
111: /**
112: * Value in milliseconds that determines how often the source URL is scanned for new
113: * data files.
114: */
115: private String scanInterval;
116:
117: private String schedule;
118:
119: private QName schedulerService;
120:
121: private String schedulerEndpoint;
122:
123: /**
124: * True means that if an error occurs while processing a file, the file will be moved
125: * to the Hold directory. If value is set to false, no special processing will be done
126: * when an error occurs. If true, then HoldDir must be specified.
127: */
128: private String hold;
129:
130: /**
131: * Glob style file pattern to determine which files in the Source URL will be
132: * processed. Only files that match the pattern will be processed.
133: */
134: private String filePattern;
135:
136: private String matchMode = "";
137:
138: /**
139: * Two pass mode causes the component to check the size of the files in the Source
140: * URL, wait for a set interval and check the sizes again. Only files that did not
141: * change size during the interval will be processed. This is to prevent processing a
142: * file that is still being written to by an external application. True enables two
143: * pass mode, false disables it.
144: */
145: private String twoPass;
146:
147: /**
148: * Value in milliseconds to wait between scans during Two Pass mode. This is only used
149: * when TwoPass is set to true.
150: */
151: private String twoPassInterval;
152:
153: /**
154: * Value determines what to do with the file after all data is read from it.
155: */
156: private String fileCompleteAction;
157:
158: /**
159: * Value that determines the number of records from a file will be placed in an
160: * individual Normalized Message.
161: */
162: private String recordsPerMessage;
163:
164: /**
165: * Value determines how to read a record from the file.
166: */
167: private String readStyle;
168:
169: /**
170: * Value determines the type of data each record contains.
171: */
172: private String recordType;
173:
174: /**
175: * Value is the name of the charset to use to read in character data.
176: */
177: private String charset;
178:
179: /**
180: * Describes a file pattern to use to rename the file when being archived.
181: */
182: private String archiveFilePattern;
183:
184: /**
185: * Host name or IP address of FTP server to send replies to.
186: */
187: private String replyFtpHost;
188:
189: /**
190: * User to login as to send replies.
191: */
192: private String replyFtpUser;
193:
194: /**
195: * Password to login to send replies.
196: */
197: private String replyFtpPassword;
198:
199: /**
200: * Value should be "active" or "passive".
201: */
202: private String replyFtpConnectMode;
203:
204: /**
205: * Values should be "ascii" or "binary".
206: */
207: private String replyFtpTransferMode;
208:
209: /**
210: * Directory on FTP server to place files containing reply messages.
211: */
212: private String replyDir;
213:
214: /**
215: * Value is the name of the charset to use to write character data to the file.
216: */
217: private String replyCharset;
218:
219: /**
220: * Value determines how records are written to a file.
221: */
222: private String replyWriteStyle;
223:
224: /**
225: * Describes a file pattern to use to name the file when being written.
226: */
227: private String replyFilePattern;
228:
229: /**
230: * Get the required.
231: *
232: * @return the required
233: */
234: public Boolean getRequired() {
235: return required;
236: }
237:
238: /**
239: * Set the required.
240: *
241: * @param required the required to set
242: */
243: public void setRequired(Boolean required) {
244: this .required = required;
245: }
246:
247: /**
248: * Get the elementType.
249: *
250: * @return the elementType
251: */
252: public QName getElementType() {
253: return elementType;
254: }
255:
256: /**
257: * Set the elementType.
258: *
259: * @param elementType the elementType to set
260: */
261: public void setElementType(QName elementType) {
262: this .elementType = elementType;
263: }
264:
265: /**
266: * Get the ftpHost.
267: *
268: * @return the ftpHost
269: */
270: public String getFtpHost() {
271: return ftpHost;
272: }
273:
274: /**
275: * Set the ftpHost.
276: *
277: * @param ftpHost the ftpHost to set
278: */
279: public void setFtpHost(String ftpHost) {
280: this .ftpHost = ftpHost;
281: }
282:
283: /**
284: * Get the ftpUser.
285: *
286: * @return the ftpUser
287: */
288: public String getFtpUser() {
289: return ftpUser;
290: }
291:
292: /**
293: * Set the ftpUser.
294: *
295: * @param ftpUser the ftpUser to set
296: */
297: public void setFtpUser(String ftpUser) {
298: this .ftpUser = ftpUser;
299: }
300:
301: /**
302: * Get the ftpPassword.
303: *
304: * @return the ftpPassword
305: */
306: public String getFtpPassword() {
307: return ftpPassword;
308: }
309:
310: /**
311: * Set the ftpPassword.
312: *
313: * @param ftpPassword the ftpPassword to set
314: */
315: public void setFtpPassword(String ftpPassword) {
316: this .ftpPassword = ftpPassword;
317: }
318:
319: /**
320: * Get the cmdFile.
321: *
322: * @return the cmdFile
323: */
324: public String getCmdFile() {
325: return cmdFile;
326: }
327:
328: /**
329: * Set the cmdFile.
330: *
331: * @param cmdFile the cmdFile to set
332: */
333: public void setCmdFile(String cmdFile) {
334: this .cmdFile = cmdFile;
335: }
336:
337: /**
338: * Get the ftpConnectMode.
339: *
340: * @return the ftpConnectMode
341: */
342: public String getFtpConnectMode() {
343: return ftpConnectMode;
344: }
345:
346: /**
347: * Set the ftpConnectMode.
348: *
349: * @param ftpConnectMode the ftpConnectMode to set
350: */
351: public void setFtpConnectMode(String ftpConnectMode) {
352: this .ftpConnectMode = ftpConnectMode;
353: }
354:
355: /**
356: * Get the ftpTransferMode.
357: *
358: * @return the ftpTransferMode
359: */
360: public String getFtpTransferMode() {
361: return ftpTransferMode;
362: }
363:
364: /**
365: * Set the ftpTransferMode.
366: *
367: * @param ftpTransferMode the ftpTransferMode to set
368: */
369: public void setFtpTransferMode(String ftpTransferMode) {
370: this .ftpTransferMode = ftpTransferMode;
371: }
372:
373: /**
374: * Get the sourceDir.
375: *
376: * @return the sourceDir
377: */
378: public String getSourceDir() {
379: return sourceDir;
380: }
381:
382: /**
383: * Set the sourceDir.
384: *
385: * @param sourceDir the sourceDir to set
386: */
387: public void setSourceDir(String sourceDir) {
388: this .sourceDir = sourceDir;
389: }
390:
391: /**
392: * Get the transferDir.
393: *
394: * @return the transferDir
395: */
396: public String getTransferDir() {
397: return transferDir;
398: }
399:
400: /**
401: * Set the transferDir.
402: *
403: * @param transferDir the transferDir to set
404: */
405: public void setTransferDir(String transferDir) {
406: this .transferDir = transferDir;
407: }
408:
409: /**
410: * Get the stageDir.
411: *
412: * @return the stageDir
413: */
414: public String getStageDir() {
415: return stageDir;
416: }
417:
418: /**
419: * Set the stageDir.
420: *
421: * @param stageDir the stageDir to set
422: */
423: public void setStageDir(String stageDir) {
424: this .stageDir = stageDir;
425: }
426:
427: /**
428: * Get the archiveDir.
429: *
430: * @return the archiveDir
431: */
432: public String getArchiveDir() {
433: return archiveDir;
434: }
435:
436: /**
437: * Set the archiveDir.
438: *
439: * @param archiveDir the archiveDir to set
440: */
441: public void setArchiveDir(String archiveDir) {
442: this .archiveDir = archiveDir;
443: }
444:
445: /**
446: * Get the holdDir.
447: *
448: * @return the holdDir
449: */
450: public String getHoldDir() {
451: return holdDir;
452: }
453:
454: /**
455: * Set the holdDir.
456: *
457: * @param holdDir the holdDir to set
458: */
459: public void setHoldDir(String holdDir) {
460: this .holdDir = holdDir;
461: }
462:
463: /**
464: * Get the scanInterval.
465: *
466: * @return the scanInterval
467: */
468: public String getScanInterval() {
469: return scanInterval;
470: }
471:
472: /**
473: * Set the scanInterval.
474: *
475: * @param scanInterval the scanInterval to set
476: */
477: public void setScanInterval(String scanInterval) {
478: this .scanInterval = scanInterval;
479: }
480:
481: /**
482: * Get the hold.
483: *
484: * @return the hold
485: */
486: public String getHold() {
487: return hold;
488: }
489:
490: /**
491: * Set the hold.
492: *
493: * @param hold the hold to set
494: */
495: public void setHold(String hold) {
496: this .hold = hold;
497: }
498:
499: /**
500: * Get the filePattern.
501: *
502: * @return the filePattern
503: */
504: public String getFilePattern() {
505: return filePattern;
506: }
507:
508: /**
509: * Set the filePattern.
510: *
511: * @param filePattern the filePattern to set
512: */
513: public void setFilePattern(String filePattern) {
514: this .filePattern = filePattern;
515: }
516:
517: public String getMatchMode() {
518: return matchMode;
519: }
520:
521: public void setMatchMode(String matchMode) {
522: this .matchMode = matchMode;
523: }
524:
525: /**
526: * Get the twoPass.
527: *
528: * @return the twoPass
529: */
530: public String getTwoPass() {
531: return twoPass;
532: }
533:
534: /**
535: * Set the twoPass.
536: *
537: * @param twoPass the twoPass to set
538: */
539: public void setTwoPass(String twoPass) {
540: this .twoPass = twoPass;
541: }
542:
543: /**
544: * Get the twoPassInterval.
545: *
546: * @return the twoPassInterval
547: */
548: public String getTwoPassInterval() {
549: return twoPassInterval;
550: }
551:
552: /**
553: * Set the twoPassInterval.
554: *
555: * @param twoPassInterval the twoPassInterval to set
556: */
557: public void setTwoPassInterval(String twoPassInterval) {
558: this .twoPassInterval = twoPassInterval;
559: }
560:
561: /**
562: * Get the fileCompleteAction.
563: *
564: * @return the fileCompleteAction
565: */
566: public String getFileCompleteAction() {
567: return fileCompleteAction;
568: }
569:
570: /**
571: * Set the fileCompleteAction.
572: *
573: * @param fileCompleteAction the fileCompleteAction to set
574: */
575: public void setFileCompleteAction(String fileCompleteAction) {
576: this .fileCompleteAction = fileCompleteAction;
577: }
578:
579: /**
580: * Get the recordsPerMessage.
581: *
582: * @return the recordsPerMessage
583: */
584: public String getRecordsPerMessage() {
585: return recordsPerMessage;
586: }
587:
588: /**
589: * Set the recordsPerMessage.
590: *
591: * @param recordsPerMessage the recordsPerMessage to set
592: */
593: public void setRecordsPerMessage(String recordsPerMessage) {
594: this .recordsPerMessage = recordsPerMessage;
595: }
596:
597: /**
598: * Get the readStyle.
599: *
600: * @return the readStyle
601: */
602: public String getReadStyle() {
603: return readStyle;
604: }
605:
606: /**
607: * Set the readStyle.
608: *
609: * @param readStyle the readStyle to set
610: */
611: public void setReadStyle(String readStyle) {
612: this .readStyle = readStyle;
613: }
614:
615: /**
616: * Get the recordType.
617: *
618: * @return the recordType
619: */
620: public String getRecordType() {
621: return recordType;
622: }
623:
624: /**
625: * Set the recordType.
626: *
627: * @param recordType the recordType to set
628: */
629: public void setRecordType(String recordType) {
630: this .recordType = recordType;
631: }
632:
633: /**
634: * Get the charset.
635: *
636: * @return the charset
637: */
638: public String getCharset() {
639: return charset;
640: }
641:
642: /**
643: * Set the charset.
644: *
645: * @param charset the charset to set
646: */
647: public void setCharset(String charset) {
648: this .charset = charset;
649: }
650:
651: /**
652: * Get the archiveFilePattern.
653: *
654: * @return the archiveFilePattern
655: */
656: public String getArchiveFilePattern() {
657: return archiveFilePattern;
658: }
659:
660: /**
661: * Set the archiveFilePattern.
662: *
663: * @param archiveFilePattern the archiveFilePattern to set
664: */
665: public void setArchiveFilePattern(String archiveFilePattern) {
666: this .archiveFilePattern = archiveFilePattern;
667: }
668:
669: /**
670: * Get the replyFtpHost.
671: *
672: * @return the replyFtpHost
673: */
674: public String getReplyFtpHost() {
675: return replyFtpHost;
676: }
677:
678: /**
679: * Set the replyFtpHost.
680: *
681: * @param replyFtpHost the replyFtpHost to set
682: */
683: public void setReplyFtpHost(String replyFtpHost) {
684: this .replyFtpHost = replyFtpHost;
685: }
686:
687: /**
688: * Get the replyFtpUser.
689: *
690: * @return the replyFtpUser
691: */
692: public String getReplyFtpUser() {
693: return replyFtpUser;
694: }
695:
696: /**
697: * Set the replyFtpUser.
698: *
699: * @param replyFtpUser the replyFtpUser to set
700: */
701: public void setReplyFtpUser(String replyFtpUser) {
702: this .replyFtpUser = replyFtpUser;
703: }
704:
705: /**
706: * Get the replyFtpPassword.
707: *
708: * @return the replyFtpPassword
709: */
710: public String getReplyFtpPassword() {
711: return replyFtpPassword;
712: }
713:
714: /**
715: * Set the replyFtpPassword.
716: *
717: * @param replyFtpPassword the replyFtpPassword to set
718: */
719: public void setReplyFtpPassword(String replyFtpPassword) {
720: this .replyFtpPassword = replyFtpPassword;
721: }
722:
723: /**
724: * Get the replyFtpConnectMode.
725: *
726: * @return the replyFtpConnectMode
727: */
728: public String getReplyFtpConnectMode() {
729: return replyFtpConnectMode;
730: }
731:
732: /**
733: * Set the replyFtpConnectMode.
734: *
735: * @param replyFtpConnectMode the replyFtpConnectMode to set
736: */
737: public void setReplyFtpConnectMode(String replyFtpConnectMode) {
738: this .replyFtpConnectMode = replyFtpConnectMode;
739: }
740:
741: /**
742: * Get the replyFtpTransferMode.
743: *
744: * @return the replyFtpTransferMode
745: */
746: public String getReplyFtpTransferMode() {
747: return replyFtpTransferMode;
748: }
749:
750: /**
751: * Set the replyFtpTransferMode.
752: *
753: * @param replyFtpTransferMode the replyFtpTransferMode to set
754: */
755: public void setReplyFtpTransferMode(String replyFtpTransferMode) {
756: this .replyFtpTransferMode = replyFtpTransferMode;
757: }
758:
759: /**
760: * Get the replyDir.
761: *
762: * @return the replyDir
763: */
764: public String getReplyDir() {
765: return replyDir;
766: }
767:
768: /**
769: * Set the replyDir.
770: *
771: * @param replyDir the replyDir to set
772: */
773: public void setReplyDir(String replyDir) {
774: this .replyDir = replyDir;
775: }
776:
777: /**
778: * Get the replyCharset.
779: *
780: * @return the replyCharset
781: */
782: public String getReplyCharset() {
783: return replyCharset;
784: }
785:
786: /**
787: * Set the replyCharset.
788: *
789: * @param replyCharset the replyCharset to set
790: */
791: public void setReplyCharset(String replyCharset) {
792: this .replyCharset = replyCharset;
793: }
794:
795: /**
796: * Get the replyWriteStyle.
797: *
798: * @return the replyWriteStyle
799: */
800: public String getReplyWriteStyle() {
801: return replyWriteStyle;
802: }
803:
804: /**
805: * Set the replyWriteStyle.
806: *
807: * @param replyWriteStyle the replyWriteStyle to set
808: */
809: public void setReplyWriteStyle(String replyWriteStyle) {
810: this .replyWriteStyle = replyWriteStyle;
811: }
812:
813: /**
814: * Get the replyFilePattern.
815: *
816: * @return the replyFilePattern
817: */
818: public String getReplyFilePattern() {
819: return replyFilePattern;
820: }
821:
822: /**
823: * @return the schedule
824: */
825: public String getSchedule() {
826: return schedule;
827: }
828:
829: /**
830: * @param schedule the schedule to set
831: */
832: public void setSchedule(String schedule) {
833: this .schedule = schedule;
834: }
835:
836: /**
837: * @return the schedulerEndpoint
838: */
839: public String getSchedulerEndpoint() {
840: return schedulerEndpoint;
841: }
842:
843: /**
844: * @param schedulerEndpoint the schedulerEndpoint to set
845: */
846: public void setSchedulerEndpoint(String schedulerEndpoint) {
847: this .schedulerEndpoint = schedulerEndpoint;
848: }
849:
850: /**
851: * @return the schedulerService
852: */
853: public QName getSchedulerService() {
854: return schedulerService;
855: }
856:
857: /**
858: * @param schedulerService the schedulerService to set
859: */
860: public void setSchedulerService(QName schedulerService) {
861: this .schedulerService = schedulerService;
862: }
863:
864: /**
865: * Set the replyFilePattern.
866: *
867: * @param replyFilePattern the replyFilePattern to set
868: */
869: public void setReplyFilePattern(String replyFilePattern) {
870: this .replyFilePattern = replyFilePattern;
871: }
872:
873: /* (non-Javadoc)
874: * @see com.bostechcorp.cbesb.runtime.component.util.wsdl.BaseCommonAttribute#toString()
875: */
876: public String toString() {
877: return "FtpInput[" + "required=" + required + ", "
878: + "elementType=" + elementType + ", "
879: + super .toString() + ", " + "ftpHost=" + ftpHost + ", "
880: + "ftpUser=" + ftpUser + ", " + "ftpPassword="
881: + ftpPassword + ", " + "cmdFile=" + cmdFile + ", "
882: + "ftpConnectMode=" + ftpConnectMode + ", "
883: + "ftpTransferMode=" + ftpTransferMode + ", "
884: + "sourceDir=" + sourceDir + ", " + "transferDir"
885: + transferDir + ", " + "stageDir=" + stageDir + ", "
886: + "archiveDir=" + archiveDir + ", " + "holdDir="
887: + holdDir + ", " + "scanInterval=" + scanInterval
888: + ", " + "hold=" + hold + ", " + "filePattern="
889: + filePattern + ", " + "twoPass=" + twoPass + ", "
890: + "twoPassInterval=" + twoPassInterval + ", "
891: + "fileCompleteAction=" + fileCompleteAction + ", "
892: + "recordsPerMessage=" + recordsPerMessage + ", "
893: + "readStyle=" + readStyle + ", " + "recordType="
894: + recordType + ", " + "charset=" + charset + ", "
895: + "archiveFilePattern=" + archiveFilePattern + ", "
896: + "replyFtpHost=" + replyFtpHost + ", "
897: + "replyFtpUser=" + replyFtpUser + ", "
898: + "replyFtpPassword=" + replyFtpPassword + ", "
899: + "replyFtpConnectMode=" + replyFtpConnectMode + ", "
900: + "replyFtpTransferMode=" + replyFtpTransferMode + ", "
901: + "replyDir=" + replyDir + ", " + "replyCharset="
902: + replyCharset + ", " + "replyWriteStyle="
903: + replyWriteStyle + ", " + "replyFilePattern="
904: + replyFilePattern + "]";
905: }
906: }
|