/** * Constructs a new PatchScript by reading the contents of a PromotionFile. * @param pResolver Resolver for finding the file. * @param pPromotionFile File to be parsed. * @return The new PatchScript. * @throws IOException If the file cannot be read. * @throws ExParser If the file contents or file name cannot be parsed. */ public static PatchScript createFromPromotionFile(FileResolver pResolver, PromotionFile pPromotionFile) { FileInfo lFile = pResolver.resolveFile(pPromotionFile.getFilePath()); String lFileContents = FileUtils.readFileToString(lFile); return(new PatchScript(lFile.getName(), lFileContents, pPromotionFile.getFileHash(), pPromotionFile.getSequencePosition(), pPromotionFile.getFileVersion())); }