Examples of FileUploadException


Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map<String, Object> model = new HashMap<String, Object>();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + getMaxSize();
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);

          log.warn(msg, e);
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();

        // Create model with exception and maximum size values
        final Map<String, Object> model = new HashMap<String, Object>();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map model = new HashMap();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + getMaxSize();
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY, Model
              .valueOf(model), defaultValue);
          error(msg);

          if (log.isDebugEnabled())
          {
            log.error(msg, e);
          }
          else
          {
            log.error(msg);
          }
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY, Model
              .valueOf(model), defaultValue);
          error(msg);

          log.error(msg, e);
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map<String, Object> model = new HashMap<String, Object>();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + getMaxSize();
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);

          log.warn(msg, e);
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map model = new HashMap();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + getMaxSize();
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY,
            Model.valueOf(model), defaultValue);
          error(msg);
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY,
            Model.valueOf(model), defaultValue);
          error(msg);

          log.warn(msg, e);
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();

        // Create model with exception and maximum size values
        final Map<String, Object> model = new HashMap<String, Object>();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map model = new HashMap();
        model.put("exception", e);
        model.put("maxSize", maxSize);

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + maxSize;
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY, Model
              .valueOf(model), defaultValue);
          error(msg);

          if (log.isDebugEnabled())
          {
            log.error(msg, e);
          }
          else
          {
            log.error(msg);
          }
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY, Model
              .valueOf(model), defaultValue);
          error(msg);

          log.error(msg, e);
View Full Code Here

Examples of org.apache.wicket.util.upload.FileUploadException

        if (wre.getCause() == null || !(wre.getCause() instanceof FileUploadException))
        {
          throw wre;
        }

        FileUploadException e = (FileUploadException)wre.getCause();
        // Create model with exception and maximum size values
        final Map<String, Object> model = new HashMap<String, Object>();
        model.put("exception", e);
        model.put("maxSize", getMaxSize());

        if (e instanceof SizeLimitExceededException)
        {
          // Resource key should be <form-id>.uploadTooLarge to
          // override default message
          final String defaultValue = "Upload must be less than " + getMaxSize();
          String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);
        }
        else
        {
          // Resource key should be <form-id>.uploadFailed to override
          // default message
          final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
          String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY,
            Model.of(model), defaultValue);
          error(msg);

          log.warn(msg, e);
View Full Code Here

Examples of org.jboss.seam.web.FileUploadException

        }

        List<String> flagList = from.getFlags();
        // rhbz1012502 - should not store fuzzy tag in source document
        if (flagList.contains("fuzzy")) {
            throw new FileUploadException(String.format(
                    "Please remove fuzzy flags from document. "
                            + "First fuzzy flag was found on "
                            + "text flow %s with content %s", textFlow.getId(),
                    textFlow.getContents()));
        }
View Full Code Here

Examples of org.richfaces.exception.FileUploadException

                readNext();
            }
        } catch (IOException e) {
            this.cancel();

            throw new FileUploadException(MessageFormat.format("Exception parsing multipart request: {0}", e.getMessage()), e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.