protected BatchHeader createHeader(final File file) {
   final BatchHeader header = new BatchHeader();
   header.setFile(file);
   header.setSequenceId(sequenceId);
   header.setLanguage(LANG_EN);
   header.setCatalog(APPAREL);
   return header;
 }
 protected ProductModel processFile(
     final Long productId, final String filePrefix, final FileContent content)
     throws Exception // NOPMD
     {
   File file = null;
   BatchHeader header = null;
   try {
     file = File.createTempFile(filePrefix, ".csv");
     header = createHeader(file);
     createFile(file, productId, content);
     batchTransformerTask.execute(header);
     batchRunnerTask.execute(header);
     return productService.getProductForCode(productId.toString());
   } finally {
     if (file != null) {
       file.delete();
     }
     if (header != null) {
       header.setFile(null);
       batchCleanupTask.execute(header);
     }
   }
 }