Package de.metalcon.server.statusupdates

Examples of de.metalcon.server.statusupdates.TemplateFileInfo


   *             if a file could not be written
   */
  private void writeFiles(final StatusUpdateTemplate template,
      final FormItemList items) throws Exception {
    FormFile fileItem;
    TemplateFileInfo fileInfo;
    for (String fileIdentifier : items.getFileIdentifiers()) {
      fileItem = items.getFile(fileIdentifier);
      fileInfo = template.getFiles().get(fileIdentifier);

      if (fileInfo.getContentType().equals(fileItem.getContentType())) {
        // write the file and store it within the instantiation item
        final File file = this.writeFile(fileItem);
        fileItem.setFile(file);
      } else {
        throw new StatusUpdateInstantiationFailedException("file \""
            + fileIdentifier + "\" must have content type "
            + fileInfo.getContentType());
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.metalcon.server.statusupdates.TemplateFileInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.