|
From: <tr...@us...> - 2003-06-30 22:14:59
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/command
In directory sc8-pr-cvs1:/tmp/cvs-serv22133/src/com/babeldoc/core/pipeline/command
Modified Files:
PipelineFeeder.java
Log Message:
Added the feeder factory and the abstraction of access to the feeders.
Index: PipelineFeeder.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/command/PipelineFeeder.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PipelineFeeder.java 27 Jun 2003 02:19:58 -0000 1.8
--- PipelineFeeder.java 30 Jun 2003 22:14:56 -0000 1.9
***************
*** 69,76 ****
import com.babeldoc.core.LogService;
import com.babeldoc.core.ResourceLoader;
! import com.babeldoc.core.journal.JournalException;
import com.babeldoc.core.pipeline.PipelineException;
! import com.babeldoc.core.pipeline.feeder.FeedDocument;
! import com.babeldoc.core.pipeline.feeder.SynchronousFeeder;
import org.apache.commons.cli.CommandLine;
--- 69,75 ----
import com.babeldoc.core.LogService;
import com.babeldoc.core.ResourceLoader;
! import com.babeldoc.core.GeneralException;
import com.babeldoc.core.pipeline.PipelineException;
! import com.babeldoc.core.pipeline.feeder.FeederFactory;
import org.apache.commons.cli.CommandLine;
***************
*** 161,166 ****
} catch (PipelineException pipex) {
LogService.getInstance().logError(I18n.get("009003"), pipex);
- } catch (JournalException journalx) {
- LogService.getInstance().logError(I18n.get("009004"), journalx);
} catch (Exception x) {
LogService.getInstance().logError(I18n.get("009005"), x);
--- 160,163 ----
***************
*** 187,196 ****
*
* @throws PipelineException
- * @throws JournalException
* @throws IOException DOCUMENT ME!
*/
public static void process(String pipelineName, String fileName,
String[] attrs, boolean bindata, boolean nojournal)
! throws PipelineException, JournalException, IOException {
byte[] fileData = null;
Map attrMap = getAttributes(attrs);
--- 184,192 ----
*
* @throws PipelineException
* @throws IOException DOCUMENT ME!
*/
public static void process(String pipelineName, String fileName,
String[] attrs, boolean bindata, boolean nojournal)
! throws PipelineException, IOException {
byte[] fileData = null;
Map attrMap = getAttributes(attrs);
***************
*** 206,211 ****
}
! new SynchronousFeeder().process(new FeedDocument(pipelineName, fileData,
! attrMap, bindata, nojournal));
}
--- 202,211 ----
}
! try {
! FeederFactory.getInstance().process(FeederFactory.SYNC, pipelineName, fileData,
! attrMap, bindata, nojournal);
! } catch (GeneralException e) {
! LogService.getInstance().logError(e);
! }
}
|