*/
public abstract class AbstractCmdValidator implements CmdValidator{
public AbstractParsedCommand validate(CmdLineHandler cmdLineHandler)
throws ConsoleException {
AbstractParsedCommand parsedCommand = validateArguments(cmdLineHandler);
if(cmdLineHandler.getOption(AbstractParsedCommand.OVERWRITE_ARG) != null){
parsedCommand.setOverwrite(((BooleanParam) cmdLineHandler.getOption(AbstractParsedCommand.OVERWRITE_ARG)).isTrue());
}
if(cmdLineHandler.getOption(AbstractParsedCommand.COMPRESSED_ARG) != null){
parsedCommand.setCompress(((BooleanParam) cmdLineHandler.getOption(AbstractParsedCommand.COMPRESSED_ARG)).isTrue());
}
if(cmdLineHandler.getOption(AbstractParsedCommand.PDFVERSION_ARG) != null){
StringParam pdfversionOption = (StringParam) cmdLineHandler.getOption(AbstractParsedCommand.PDFVERSION_ARG);
if (pdfversionOption.isSet()){
parsedCommand.setOutputPdfVersion(pdfversionOption.getValue().charAt(0));
}
}
return parsedCommand;
}