Package jcmdline

Examples of jcmdline.PdfFileParam


          if(pOption.isSet()){
            parsedCommandDTO.setOutputFilesPrefix(pOption.getValue());
          }

          //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(SlideShowParsedCommand.F_ARG);          
          if(fOption.isSet()){
            PdfFile inputFile = fOption.getPdfFile();
            ValidationUtility.assertValidPdfExtension(inputFile.getFile().getName())
              parsedCommandDTO.setInputFile(FileUtility.getPdfFile(inputFile));                 
          }else{
            throw new ParseException(ParseException.ERR_NO_F)
          }
View Full Code Here


          if(pOption.isSet()){
            parsedCommandDTO.setOutputFilesPrefix(pOption.getValue());
          }         
         
          //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(RotateParsedCommand.F_ARG);
          if(fOption.isSet()){
        //validate file extensions
            for(Iterator fIterator = fOption.getPdfFiles().iterator(); fIterator.hasNext();){
              PdfFile currentFile = (PdfFile) fIterator.next();
                //checking extension
                ValidationUtility.assertValidPdfExtension(currentFile.getFile().getName());
            }
            parsedCommandDTO.setInputFileList(FileUtility.getPdfFiles(fOption.getPdfFiles()));
          }
         
          //-r
          StringParam rOption = (StringParam) cmdLineHandler.getOption(RotateParsedCommand.R_ARG);
          if(rOption.isSet()){
View Full Code Here

            if(directionOption.isSet()){
              parsedCommandDTO.setDirection(getDirection(directionOption.getValue()));
            }
           
         //-f -d
        PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(SetViewerParsedCommand.F_ARG);
        FileParam dOption = (FileParam) cmdLineHandler.getOption(SetViewerParsedCommand.D_ARG);
        if(fOption.isSet() || dOption.isSet()){
          //-f
              if(fOption.isSet()){
            //validate file extensions
                for(Iterator fIterator = fOption.getPdfFiles().iterator(); fIterator.hasNext();){
                  PdfFile currentFile = (PdfFile) fIterator.next();
                  ValidationUtility.assertValidPdfExtension(currentFile.getFile().getName());                 
                }
                parsedCommandDTO.setInputFileList(FileUtility.getPdfFiles(fOption.getPdfFiles()));
              }
              //-d
          if ((dOption.isSet())){
                  File inputDir = dOption.getFile();
                  ValidationUtility.assertValidDirectory(inputDir);
View Full Code Here

          if(pOption.isSet()){
            parsedCommandDTO.setOutputFilesPrefix(pOption.getValue());
          }         
         
          //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(DecryptParsedCommand.F_ARG);
          if(fOption.isSet()){
        //validate file extensions
            for(Iterator fIterator = fOption.getPdfFiles().iterator(); fIterator.hasNext();){
              PdfFile currentFile = (PdfFile) fIterator.next();
                //checking extension
                ValidationUtility.assertValidPdfExtension(currentFile.getFile().getName());
            }
            parsedCommandDTO.setInputFileList(FileUtility.getPdfFiles(fOption.getPdfFiles()));
          }
         
    }else{
      throw new ConsoleException(ConsoleException.CMD_LINE_HANDLER_NULL);
    }
View Full Code Here

          }else{
            throw new ParseException(ParseException.ERR_NO_O);
          }
     
      //-f and -d
      PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(UnpackParsedCommand.F_ARG);
          FileParam dOption = (FileParam) cmdLineHandler.getOption(UnpackParsedCommand.D_ARG);
      if (fOption.isSet() || dOption.isSet()) {
        // -f
        if (fOption.isSet()) {
          // validate file extensions
          for (Iterator fIterator = fOption.getPdfFiles().iterator(); fIterator.hasNext();) {
            PdfFile currentFile = (PdfFile) fIterator.next();
            ValidationUtility.assertValidPdfExtension(currentFile.getFile().getName());           
          }
          parsedCommandDTO.setInputFileList(FileUtility.getPdfFiles(fOption.getPdfFiles()));
        }
        // -d
        if ((dOption.isSet())) {
          File inputDir = dOption.getFile();
          ValidationUtility.assertValidDirectory(inputDir);
View Full Code Here

          if(pOption.isSet()){
            parsedCommandDTO.setOutputFilesPrefix(pOption.getValue());
          }

          //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(SplitParsedCommand.F_ARG);          
          if(fOption.isSet()){
            PdfFile inputFile = fOption.getPdfFile();
            ValidationUtility.assertValidPdfExtension(inputFile.getFile().getName());
              parsedCommandDTO.setInputFile(FileUtility.getPdfFile(inputFile));                 
          }else{
            throw new ParseException(ParseException.ERR_NO_F)
          }
View Full Code Here

          }else{
            throw new ParseException(ParseException.ERR_NO_O);
          }

          //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption("f");          
          if(fOption.isSet()){
            PdfFile inputFile = fOption.getPdfFile();
            ValidationUtility.assertValidPdfExtension(inputFile.getFile().getName());
              parsedCommandDTO.setInputFile(FileUtility.getPdfFile(inputFile));                 
          }else{
            throw new ParseException(ParseException.ERR_NO_F)
          }
View Full Code Here

      } else {
        throw new ParseException(ParseException.ERR_NO_O);
      }
     
      //-f
          PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(DocumentInfoParsedCommand.F_ARG);          
          if(fOption.isSet()){
            PdfFile inputFile = fOption.getPdfFile();
            ValidationUtility.assertValidPdfExtension(inputFile.getFile().getName());
              parsedCommandDTO.setInputFile(FileUtility.getPdfFile(inputFile));                 
          }else{
            throw new ParseException(ParseException.ERR_NO_F)
          }
View Full Code Here

          }else{
            throw new ParseException(ParseException.ERR_NO_O);
          }
         
          //-f1
      PdfFileParam f1Option = (PdfFileParam) cmdLineHandler.getOption(MixParsedCommand.F1_ARG);          
          if(f1Option.isSet()){
            PdfFile firstFile = f1Option.getPdfFile();
             //checking extension
              ValidationUtility.assertValidPdfExtension(firstFile.getFile().getName());
              parsedCommandDTO.setFirstInputFile(FileUtility.getPdfFile(firstFile));                               
          }else{
            throw new ParseException(ParseException.ERR_NO_F1)
          }
         
          //-f2
          PdfFileParam f2Option = (PdfFileParam) cmdLineHandler.getOption(MixParsedCommand.F2_ARG);          
          if(f2Option.isSet()){
            PdfFile secondFile = f2Option.getPdfFile();
             //checking extension
              ValidationUtility.assertValidPdfExtension(secondFile.getFile().getName());
               parsedCommandDTO.setSecondInputFile(FileUtility.getPdfFile(secondFile));
          }else{
            throw new ParseException(ParseException.ERR_NO_F2)
View Full Code Here

          if(etypeOption.isSet()){
            parsedCommandDTO.setEncryptionType(etypeOption.getValue());
          }
         
          //-f - d
      PdfFileParam fOption = (PdfFileParam) cmdLineHandler.getOption(EncryptParsedCommand.F_ARG);
      FileParam dOption = (FileParam) cmdLineHandler.getOption(EncryptParsedCommand.D_ARG);
      if(fOption.isSet() || dOption.isSet()){
        //-f
            if(fOption.isSet()){
          //validate file extensions
              for(Iterator fIterator = fOption.getPdfFiles().iterator(); fIterator.hasNext();){
                PdfFile currentFile = (PdfFile) fIterator.next();
                ValidationUtility.assertValidPdfExtension(currentFile.getFile().getName());             
              }
              parsedCommandDTO.setInputFileList(FileUtility.getPdfFiles(fOption.getPdfFiles()));
            }
            //-d
        if ((dOption.isSet())){
                File inputDir = dOption.getFile();
                ValidationUtility.assertValidDirectory(inputDir);
View Full Code Here

TOP

Related Classes of jcmdline.PdfFileParam

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.