|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.pdfsam.console.business.pdf.handlers.interfaces.AbstractCmdExecutor
public abstract class AbstractCmdExecutor
Abstract command executor
Constructor Summary | |
---|---|
AbstractCmdExecutor()
|
Method Summary | |
---|---|
protected PdfFile[] |
arraysConcat(PdfFile[] first,
PdfFile[] second)
concat the two arrays |
protected void |
closePdfReader(com.lowagie.text.pdf.PdfReader pdfReader)
Close the @lonk PdfReader if not null. |
protected void |
closePdfStamper(com.lowagie.text.pdf.PdfStamper pdfStamper)
Close the @link PdfStamper if not null. |
protected void |
closePdfWriter(com.lowagie.text.pdf.PdfWriter pdfWriter)
Close the @lonk PdfWriter if not null. |
abstract void |
execute(AbstractParsedCommand parsedCommand)
Execute the tool command. |
protected PdfFile[] |
getPdfFiles(java.io.File directory)
get an array of PdfFile in the input directory alphabetically ordered |
protected void |
resetPercentageOfWorkDone()
reset the percentage of work done |
protected void |
setCompressionSettingOnStamper(AbstractParsedCommand inputCommand,
com.lowagie.text.pdf.PdfStamper pdfStamper)
Sets the compression settings on the pdf stamper depending on the inputCommand |
protected void |
setCompressionSettingOnWriter(AbstractParsedCommand inputCommand,
com.lowagie.text.pdf.PdfWriter pdfWriter)
Sets the compression settings on the pdf writer depending on the inputCommand |
protected void |
setPdfVersionSettingOnWriter(AbstractParsedCommand inputCommand,
com.lowagie.text.pdf.PdfWriter pdfWriter)
Convenience method to set the pdf version settings on the writer without a default version |
protected void |
setPdfVersionSettingOnWriter(AbstractParsedCommand inputCommand,
com.lowagie.text.pdf.PdfWriter pdfWriter,
java.lang.Character defaultVersion)
Sets the pdf version setting on the pdf writer depending on the inputCommand |
protected void |
setPercentageOfWorkDone(int percentage)
set the percentage of work done for the current execution and notify the observers |
protected void |
setWorkCompleted()
set the work completed for the current execution and notify the observers |
protected void |
setWorkIndeterminate()
set the percentage of work done to indeterminate for the current execution and notify the observers |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pdfsam.console.business.pdf.handlers.interfaces.CmdExecutor |
---|
clean |
Constructor Detail |
---|
public AbstractCmdExecutor()
Method Detail |
---|
protected final void setPercentageOfWorkDone(int percentage)
percentage
- protected final void setWorkIndeterminate()
protected final void setWorkCompleted()
protected final void resetPercentageOfWorkDone()
public abstract void execute(AbstractParsedCommand parsedCommand) throws ConsoleException
CmdExecutor
execute
in interface CmdExecutor
parsedCommand
- command to be executed
ConsoleException
protected PdfFile[] getPdfFiles(java.io.File directory)
directory
-
protected PdfFile[] arraysConcat(PdfFile[] first, PdfFile[] second)
first
- second
-
protected void setCompressionSettingOnWriter(AbstractParsedCommand inputCommand, com.lowagie.text.pdf.PdfWriter pdfWriter)
inputCommand
- pdfWriter
- protected void setCompressionSettingOnStamper(AbstractParsedCommand inputCommand, com.lowagie.text.pdf.PdfStamper pdfStamper)
inputCommand
- pdfWriter
- protected void setPdfVersionSettingOnWriter(AbstractParsedCommand inputCommand, com.lowagie.text.pdf.PdfWriter pdfWriter, java.lang.Character defaultVersion)
inputCommand
- pdfWriter
- defaultVersion
- default version to apply if the inputCommand version is nullprotected void setPdfVersionSettingOnWriter(AbstractParsedCommand inputCommand, com.lowagie.text.pdf.PdfWriter pdfWriter)
inputCommand
- pdfWriter
- setPdfVersionSettingOnWriter(AbstractParsedCommand, PdfWriter, Character)
protected void closePdfReader(com.lowagie.text.pdf.PdfReader pdfReader)
PdfReader
if not null.
pdfReader
- protected void closePdfStamper(com.lowagie.text.pdf.PdfStamper pdfStamper)
PdfStamper
if not null.
pdfStamper
- protected void closePdfWriter(com.lowagie.text.pdf.PdfWriter pdfWriter)
PdfWriter
if not null.
pdfWriter
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |