Package de.metalcon.server.exceptions

Examples of de.metalcon.server.exceptions.StatusUpdateInstantiationFailedException


      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


      try {
        for (String fieldName : template.getFields().keySet()) {
          try {
            value = values.getField(fieldName);
          } catch (final IllegalArgumentException e) {
            throw new StatusUpdateInstantiationFailedException(
                e.getMessage());
          }
          templateInstantiationClass.getField(fieldName).set(
              statusUpdate, value);
        }

        // set status update file paths
        for (String fileName : template.getFiles().keySet()) {
          try {
            value = values.getFile(fileName).getAbsoluteFilePath();
          } catch (final IllegalArgumentException e) {
            throw new StatusUpdateInstantiationFailedException(
                e.getMessage());
          }
          templateInstantiationClass.getField(fileName).set(
              statusUpdate, value);
        }
      } catch (final IllegalArgumentException e) {
        throw new StatusUpdateInstantiationFailedException(
            "The types of the parameters passed do not match the status update template.");
      }

      return statusUpdate;
    } catch (final SecurityException e) {
View Full Code Here

TOP

Related Classes of de.metalcon.server.exceptions.StatusUpdateInstantiationFailedException

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.