class EngineModel extends LinkedHashMap<String, Object> {
    
    public EngineModel(Engine engine, String urlBaseRef){
        super();
        this.put("heritrixVersion", engine.getHeritrixVersion());
        this.put("heapReport", engine.heapReportData());
        this.put("jobsDir", FileUtils.tryToCanonicalize(engine.getJobsDir()).getAbsolutePath());
        this.put("jobsDirUrl", urlBaseRef + "jobsdir/");
        
        List<String> actions = new LinkedList<String>();
        actions.add("rescan");
        actions.add("add");
        actions.add("create");
        this.put("availableActions", actions);
        
        this.put("jobs", makeJobList(engine, urlBaseRef));
    }

	private List<Map<String, Object>> makeJobList(Engine engine,
			String urlBaseRef) {<FILL_FUNCTION_BODY>}
}

		List<Map<String, Object>> jobList;
		jobList = new ArrayList<Map<String,Object>>();
        // Generate list of jobs
        ArrayList<Map.Entry<String,CrawlJob>> jobConfigurations = new ArrayList<Map.Entry<String,CrawlJob>>(engine.getJobConfigs().entrySet());
        Collections.sort(jobConfigurations, new Comparator<Map.Entry<String, CrawlJob>>() {
            public int compare(Map.Entry<String, CrawlJob> cj1, Map.Entry<String, CrawlJob> cj2) {
                return cj1.getValue().compareTo(cj2.getValue());
            }
        });
        
        for(Map.Entry<String,CrawlJob> jobConfig : jobConfigurations) {
            CrawlJob job = jobConfig.getValue();
            Map<String, Object> crawlJobModel = new LinkedHashMap<String, Object>();
            crawlJobModel.put("shortName",job.getShortName());
            crawlJobModel.put("url",urlBaseRef+"job/"+job.getShortName());
            crawlJobModel.put("isProfile",job.isProfile());
            crawlJobModel.put("launchCount",job.getLaunchCount());
            crawlJobModel.put("lastLaunch",job.getLastLaunch());
            crawlJobModel.put("hasApplicationContext",job.hasApplicationContext());
            crawlJobModel.put("statusDescription", job.getJobStatusDescription());
            crawlJobModel.put("isLaunchInfoPartial", job.isLaunchInfoPartial());
            File primaryConfig = FileUtils.tryToCanonicalize(job.getPrimaryConfig());
            crawlJobModel.put("primaryConfig", primaryConfig.getAbsolutePath());
            crawlJobModel.put("primaryConfigUrl", urlBaseRef + "jobdir/" + primaryConfig.getName());
            if (job.getCrawlController() != null) {
                crawlJobModel.put("crawlControllerState", job.getCrawlController().getState());
                if (job.getCrawlController().getState() == State.FINISHED) {
                    crawlJobModel.put("crawlExitStatus", job.getCrawlController().getCrawlExitStatus());
                }
            }
            
            crawlJobModel.put("key", jobConfig.getKey());
            jobList.add(crawlJobModel);
        }
		return jobList;
	
<methods>public void <init>() ,public void <init>(int) ,public void <init>(Map<? extends java.lang.String,? extends java.lang.Object>) ,public void <init>(int, float) ,public void <init>(int, float, boolean) ,public void clear() ,public boolean containsValue(java.lang.Object) ,public Set<Entry<java.lang.String,java.lang.Object>> entrySet() ,public void forEach(BiConsumer<? super java.lang.String,? super java.lang.Object>) ,public java.lang.Object get(java.lang.Object) ,public java.lang.Object getOrDefault(java.lang.Object, java.lang.Object) ,public Set<java.lang.String> keySet() ,public void replaceAll(BiFunction<? super java.lang.String,? super java.lang.Object,? extends java.lang.Object>) ,public Collection<java.lang.Object> values() <variables>final boolean accessOrder,transient Entry<java.lang.String,java.lang.Object> head,private static final long serialVersionUID,transient Entry<java.lang.String,java.lang.Object> tail