Examples of UploadException


Examples of com.alibaba.citrus.service.upload.UploadException

        } catch (FileUpload.SizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUpload.FileSizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUploadException e) {
            throw new UploadException(e);
        }

        return fileItems.toArray(new FileItem[fileItems.size()]);
    }
View Full Code Here

Examples of com.alibaba.citrus.service.upload.UploadException

        } catch (FileUpload.SizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUpload.FileSizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUploadException e) {
            throw new UploadException(e);
        }

        return fileItems.toArray(new FileItem[fileItems.size()]);
    }
View Full Code Here

Examples of com.alibaba.citrus.service.upload.UploadException

        } catch (FileUpload.SizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUpload.FileSizeLimitExceededException e) {
            throw new UploadSizeLimitExceededException(e);
        } catch (FileUploadException e) {
            throw new UploadException(e);
        }

        return fileItems.toArray(new FileItem[fileItems.size()]);
    }
View Full Code Here

Examples of com.liferay.util.servlet.UploadException

      PortalUtil.getUploadPortletRequest(req);

    byte[] bytes = FileUtil.getBytes(uploadReq.getFile("file_name"));

    if (bytes == null || bytes.length == 0) {
      throw new UploadException();
    }

    User user = PortalUtil.getSelectedUser(uploadReq);

    UserManagerUtil.updatePortrait(user.getUserId(), bytes);
View Full Code Here

Examples of com.vaadin.server.UploadException

            ClientConnector connector, String variableName)
            throws UploadException {
        session.lock();
        try {
            if (connector == null) {
                throw new UploadException(
                        "File upload ignored because the connector for the stream variable was not found");
            }
            if (!connector.isConnectorEnabled()) {
                throw new UploadException("Warning: file upload ignored for "
                        + connector.getConnectorId()
                        + " because the component was disabled");
            }
            if ((connector instanceof Component)
                    && ((Component) connector).isReadOnly()) {
                // Only checked for legacy reasons
                throw new UploadException(
                        "File upload ignored because the component is read-only");
            }
        } finally {
            session.unlock();
        }
View Full Code Here

Examples of com.vaadin.server.UploadException

                StreamingErrorEvent event = new StreamingErrorEventImpl(
                        filename, type, contentLength, totalBytes, e);
                streamVariable.streamingFailed(event);
                // throw exception for terminal to be handled (to be passed to
                // terminalErrorHandler)
                throw new UploadException(e);
            } finally {
                session.unlock();
            }
        }
        return startedEvent.isDisposed();
View Full Code Here

Examples of com.vaadin.server.UploadException

            ClientConnector connector, String variableName)
            throws UploadException {
        session.lock();
        try {
            if (connector == null) {
                throw new UploadException(
                        "File upload ignored because the connector for the stream variable was not found");
            }
            if (!connector.isConnectorEnabled()) {
                throw new UploadException("Warning: file upload ignored for "
                        + connector.getConnectorId()
                        + " because the component was disabled");
            }
            if ((connector instanceof Component)
                    && ((Component) connector).isReadOnly()) {
                // Only checked for legacy reasons
                throw new UploadException(
                        "File upload ignored because the component is read-only");
            }
        } finally {
            session.unlock();
        }
View Full Code Here

Examples of com.vaadin.server.UploadException

                StreamingErrorEvent event = new StreamingErrorEventImpl(
                        filename, type, contentLength, totalBytes, e);
                streamVariable.streamingFailed(event);
                // throw exception for terminal to be handled (to be passed to
                // terminalErrorHandler)
                throw new UploadException(e);
            } finally {
                session.unlock();
            }
        }
        return startedEvent.isDisposed();
View Full Code Here

Examples of com.vaadin.ui.Upload.UploadException

                while ((bytesRead = stream.read(buf)) != -1) {
                    receiveUpload.write(buf, 0, bytesRead);
                }
                receiveUpload.close();
            } catch (IOException e) {
                throw new UploadException(e);
            }
            // clean up the reference when file is downloaded
            receivers.remove(fileId);
        }
View Full Code Here

Examples of com.vaadin.ui.Upload.UploadException

                while ((bytesRead = stream.read(buf)) != -1) {
                    receiveUpload.write(buf, 0, bytesRead);
                }
                receiveUpload.close();
            } catch (IOException e) {
                throw new UploadException(e);
            }
            // clean up the reference when file is downloaded
            receivers.remove(fileId);
        }
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.