Package scap.check.content

Examples of scap.check.content.FileSourceContent


            showHelp(cmdLineProcessor.getOptions());
            System.exit(0);
        }

        XCCDFOptions xccdfOptions = commandLineResult.getXccdfOptions();
        SourceContext checklist = new FileSourceContent(commandLineResult.getChecklistFile(), xccdfOptions.isCleanupTempFiles());     
        Log4jConsoleConfiguration.configure(xccdfOptions.isVerboseOutput());
        logBuildProperties();

        if (xccdfOptions.isVerboseOutput()) {
            System.out.println();
            System.out.println("Using the following commandline parameters:");
//            System.out.println("  Result Directory: " + resultDirectory.getAbsolutePath());
            System.out.println("  XCCDF File: " + checklist.getSourceContent().getId());
            System.out.println("  Tailoring File: " + ((xccdfOptions.getTailoringInstance() != null) ? xccdfOptions.getTailoringInstance().getSourceContent().getLocalFile().getAbsoluteFile() : "none"));
            System.out.println("  Profile: " + xccdfOptions.getProfileId());
            System.out.print("  CPE Dictionary File(s):");
            List<SourceContext> dictionaries = xccdfOptions.getCpeDictionaries();
            if (dictionaries.isEmpty()) {
View Full Code Here


            if (line.hasOption(tailoringFile.getOpt())) {
              String lineOpt  = line.getOptionValue( tailoringFile.getOpt() );
                if (lineOpt != null) {
                  try {
            xccdfOptions.setTailoringInstance(new FileSourceContent(new File(lineOpt), xccdfOptions.isCleanupTempFiles()));
          } catch (IOException e) {
            throw new CommandLineException("invalid tailoring file: "+lineOpt, e);
          }
                }
            }

            if (xccdfOptions.isProcessCpeApplicability()) {
              if (line.hasOption(cpeDictionary.getOpt())) {
          String lineOpt  = line.getOptionValue( cpeDictionary.getOpt() );
          String text  = ( lineOpt  == null ) ? "" : lineOpt;
          String[] cpeDicts = text.split(";");

          List<SourceContext> cpeDictionaries = new ArrayList<SourceContext>(cpeDicts.length);
          for (String cpeDict : cpeDicts) {
            try {
              cpeDictionaries.add(new FileSourceContent(new File(cpeDict), xccdfOptions.isCleanupTempFiles()));
            } catch (IOException e) {
              throw new CommandLineException("invalid CPE dictionary file: "+cpeDict, e);
            }
          }
          xccdfOptions.setCpeDictionaries(cpeDictionaries);
View Full Code Here

TOP

Related Classes of scap.check.content.FileSourceContent

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.