import java.io.*; public class TemplateServer{ public static File getTemplate(String ID){ // find the path to the pdf template that has ID as its key // Assume that ID is the product name, and the name of the // pdf template is called Template.pdf File test = new File(TEMPLATEDIR + ID + TEMPLATENAME + EXTENSION); //System.out.println(TEMPLATEDIR + ID + TEMPLATENAME + EXTENSION); if(test.canRead()) return test; else return null; } public static final String TEMPLATEDIR = WebDocumentDistribution.PATH; public static final String TEMPLATENAME = "Template"; public static final String EXTENSION = ".pdf"; }