Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner
In directory sc8-pr-cvs1:/tmp/cvs-serv18862/scanner/src/com/babeldoc/scanner
Modified Files:
ScannerWorker.java ScannerWorkerInfo.java
Log Message:
All scanner workers have a new general option: binary. This means that the document that they enqueue to the pipeline
could possibly be submitted as a binary file. Additionally I have changed the FtpScanner so that it sets the binary flag
for transfer depending on the state of this flag.
Index: ScannerWorker.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/ScannerWorker.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ScannerWorker.java 5 Sep 2003 13:28:29 -0000 1.24
--- ScannerWorker.java 12 Sep 2003 01:09:16 -0000 1.25
***************
*** 112,115 ****
--- 112,118 ----
private ScannerSchedule cronSchedule = null;
+ /** must the documents be submitted as binaries */
+ private boolean binary;
+
public static final String SCANNER_KEY = "scanner";
public static final String SCAN_DATE_KEY = "scan_date";
***************
*** 246,249 ****
--- 249,253 ----
configData.getValue(ScannerWorkerInfo.SCANNER_TYPE) + ") configured...");
this.countdown = getInfo().getIntValue(ScannerWorkerInfo.COUNTDOWN);
+ this.binary = getInfo().getBooleanValue(ScannerWorkerInfo.BINARY);
}
***************
*** 367,373 ****
}
! FeedDocument feed = new FeedDocument(this.getPipelineName(), data, attr,
! !("false".equals(getInfo().getStrValue(ScannerWorkerInfo.JOURNAL))),
! false);
try {
--- 371,379 ----
}
! FeedDocument feed = new FeedDocument(this.getPipelineName(),
! data,
! attr,
! getInfo().getBooleanValue(ScannerWorkerInfo.JOURNAL),
! isBinary());
try {
***************
*** 518,521 ****
--- 524,535 ----
// return !(countdown == -1) || countdown-- == 0;
+ }
+
+ public int getCountdown() {
+ return countdown;
+ }
+
+ public boolean isBinary() {
+ return binary;
}
}
Index: ScannerWorkerInfo.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/ScannerWorkerInfo.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ScannerWorkerInfo.java 17 Aug 2003 04:12:29 -0000 1.11
--- ScannerWorkerInfo.java 12 Sep 2003 01:09:16 -0000 1.12
***************
*** 110,113 ****
--- 110,116 ----
public static String COUNTDOWN = "countDown";
+ /** if the documents must be submitted as binary documents */
+ public static final String BINARY = "binary";
+
/**
* Return collection of options that are common to all scanners
***************
*** 150,153 ****
--- 153,160 ----
IConfigOptionType.INTEGER, "-1", false,
"The number of times this countdown must run."));
+
+ general.add(new ConfigOption(BINARY,
+ IConfigOptionType.BOOLEAN, "false", false,
+ "The documents from this stage must be submitted as binary pipeline documents"));
return general;
|