Class UnsafeUploadRequestException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
de.xima.fc.api.rest.impl.common.reader.UnsafeUploadRequestException
All Implemented Interfaces:
IErrorDetails, Serializable

public class UnsafeUploadRequestException extends javax.ws.rs.WebApplicationException implements IErrorDetails
This exception is thrown when malware or content type checks fail.
Since:
8.4.0
Author:
XIMA MEDIA GmbH, Dresden
See Also:
  • Constructor Details

    • UnsafeUploadRequestException

      public UnsafeUploadRequestException(String message, List<? extends IScannedFileItem> unsafeFiles)
      Creates an exception with the passed message that notifies about the passed 'unsafe' files.
      Parameters:
      message - the message (more technical)
      unsafeFiles - the upload files classified as 'unsafe' by the malware or content type check
  • Method Details

    • unsafeFiles

      public List<? extends IScannedFileItem> unsafeFiles()
      Returns:
      the upload files classified as 'unsafe' by the malware or content type check
    • getErrorCode

      public String getErrorCode()
      Specified by:
      getErrorCode in interface IErrorDetails
      Returns:
      the related error code string (as a technical error description)
    • getHttpStatusCode

      public int getHttpStatusCode()
      Specified by:
      getHttpStatusCode in interface IErrorDetails
      Returns:
      the HTTP status code related to this error
    • getErrorMessage

      public String getErrorMessage(Locale locale)
      Specified by:
      getErrorMessage in interface IErrorDetails
      Parameters:
      locale - the local to be used for localization
      Returns:
      a (usually localized) detailed error description for the end user
    • key

      protected String key()
      Returns:
      the i18n key for message localization