dependency-check-core/src/main/java/org/owasp/dependencycheck/reporting/ReportGenerator.java
/**
     * Constructs the velocity context used to generate the dependency-check
     * reports.
     *
     * @param applicationName the application name being analyzed
     * @param dependencies the list of dependencies
     * @param analyzers the list of analyzers used
     * @param properties the database properties (containing timestamps of the
     * NVD CVE data)
     * @return the velocity context
     */
Constructs the velocity context used to generate the dependency-check
reports.


Constructs the velocity context used to generate the dependency - check reports .
private VelocityContext createContext(String applicationName, List<Dependency> dependencies,
            List<Analyzer> analyzers, DatabaseProperties properties) {
        final DateTime dt = new DateTime();
        final DateTimeFormatter dateFormat = DateTimeFormat.forPattern("MMM d, yyyy 'at' HH:mm:ss z");
        final DateTimeFormatter dateFormatXML = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
        final String scanDate = dateFormat.print(dt);
        final String scanDateXML = dateFormatXML.print(dt);
        final VelocityContext ctxt = new VelocityContext();
        ctxt.put("applicationName", applicationName);
        ctxt.put("dependencies", dependencies);
        ctxt.put("analyzers", analyzers);
        ctxt.put("properties", properties);
        ctxt.put("scanDate", scanDate);
        ctxt.put("scanDateXML", scanDateXML);
        ctxt.put("enc", new EscapeTool());
        ctxt.put("version", Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown"));
        return ctxt;
    }
private VelocityContext createContext ( String applicationName , List < Dependency > dependencies , List < Analyzer > analyzers , DatabaseProperties properties ) { final DateTime dt = new DateTime ( ) ; final DateTimeFormatter dateFormat = DateTimeFormat . forPattern ( "MMM d, yyyy 'at' HH:mm:ss z" ) ; final DateTimeFormatter dateFormatXML = DateTimeFormat . forPattern ( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) ; final String scanDate = dateFormat . print ( dt ) ; final String scanDateXML = dateFormatXML . print ( dt ) ; final VelocityContext ctxt = new VelocityContext ( ) ; ctxt . put ( "applicationName" , applicationName ) ; ctxt . put ( "dependencies" , dependencies ) ; ctxt . put ( "analyzers" , analyzers ) ; ctxt . put ( "properties" , properties ) ; ctxt . put ( "scanDate" , scanDate ) ; ctxt . put ( "scanDateXML" , scanDateXML ) ; ctxt . put ( "enc" , new EscapeTool ( ) ) ; ctxt . put ( "version" , Settings . getString ( Settings . KEYS . APPLICATION_VERSION , "Unknown" ) ) ; return ctxt ; }
Constructs the velocity context used to generate the dependency-check
 reports.
Constructs the velocity context used to generate the dependency - check reports .