Examples of FileBean


Examples of com.sogou.qadev.service.cynthia.bean.FileBean

        }

       
        Attachment attachment = das.createAttachment(realFileName, item.get());
       
        FileBean fBean = new FileBean();
        fBean.setId(attachment.getId().getValue());
        fBean.setFilename(attachment.getName());
        fBean.setFileId(attachment.getFileId());
        allFileBean.add(fBean);
       
      }
    }
    if(isError)
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

        if (request.isMultipart()) {
            Enumeration<String> fileParameterNames = request.getFileParameterNames();

            while (fileParameterNames.hasMoreElements()) {
                String fileParameterName = fileParameterNames.nextElement();
                FileBean fileBean = request.getFileParameterValue(fileParameterName);
                log.trace("Attempting to bind file parameter with name [", fileParameterName,
                        "] and value: ", fileBean);

                if (fileBean != null) {
                    try {
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

    protected void checkSingleRequiredField(String name, String strippedName, String[] values,
            StripesRequestWrapper req, ValidationErrors errors) {

        // Firstly if the post is a multipart request, check to see if a file was
        // sent under that parameter name
        FileBean file = null;
        if (req.isMultipart() && (file = req.getFileParameterValue(name)) != null) {
            if (file.getSize() <= 0) {
                errors.add(name, new ScopedLocalizableError("validation.required",
                        "valueNotPresent"));
            }
        }
        // And if not, see if any regular parameters were sent
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

                filename = filename.substring(index + 1);

            // Use an anonymous inner subclass of FileBean that overrides all the
            // methods that rely on having a File present, to use the FileItem
            // created by commons upload instead.
            return new FileBean(null, item.getContentType(), filename, this.charset) {
                @Override public long getSize() { return item.getSize(); }

                @Override public InputStream getInputStream() throws IOException {
                    return item.getInputStream();
                }
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

        if (request.isMultipart()) {
            Enumeration<String> fileParameterNames = request.getFileParameterNames();

            while (fileParameterNames.hasMoreElements()) {
                String fileParameterName = fileParameterNames.nextElement();
                FileBean fileBean = request.getFileParameterValue(fileParameterName);
                log.trace("Attempting to bind file parameter with name [", fileParameterName,
                        "] and value: ", fileBean);

                if (fileBean != null) {
                    try {
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

    protected void checkSingleRequiredField(String name, String strippedName, String[] values,
            StripesRequestWrapper req, ValidationErrors errors) {

        // Firstly if the post is a multipart request, check to see if a file was
        // sent under that parameter name
        FileBean file = null;
        if (req.isMultipart() && (file = req.getFileParameterValue(name)) != null) {
            if (file.getSize() <= 0) {
                errors.add(name, new ScopedLocalizableError("validation.required",
                        "valueNotPresent"));
            }
        }
        // And if not, see if any regular parameters were sent
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

     * @return a FileBean object wrapping the uploaded file
     */
    public FileBean getFileParameterValue(String name) {
        File file = this.multipart.getFile(name);
        if (file != null) {
            return new FileBean(file,
                                this.multipart.getContentType(name),
                                this.multipart.getOriginalFileName(name),
                                this.charset);
        }
        else {
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

        if (request.isMultipart()) {
            Enumeration<String> fileParameterNames = request.getFileParameterNames();

            while (fileParameterNames.hasMoreElements()) {
                String fileParameterName = fileParameterNames.nextElement();
                FileBean fileBean = request.getFileParameterValue(fileParameterName);
                log.trace("Attempting to bind file parameter with name [", fileParameterName,
                        "] and value: ", fileBean);

                if (fileBean != null) {
                    try {
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

    protected void checkSingleRequiredField(String name, String strippedName, String[] values,
            StripesRequestWrapper req, ValidationErrors errors) {

        // Firstly if the post is a multipart request, check to see if a file was
        // sent under that parameter name
        FileBean file = null;
        if (req.isMultipart() && (file = req.getFileParameterValue(name)) != null) {
            if (file.getSize() <= 0) {
                errors.add(name, new ScopedLocalizableError("validation.required",
                        "valueNotPresent"));
            }
        }
        // And if not, see if any regular parameters were sent
View Full Code Here

Examples of net.sourceforge.stripes.action.FileBean

     * @return a FileBean object wrapping the uploaded file
     */
    public FileBean getFileParameterValue(String name) {
        File file = this.multipart.getFile(name);
        if (file != null) {
            return new FileBean(file,
                                this.multipart.getContentType(name),
                                this.multipart.getOriginalFileName(name),
                                this.charset);
        }
        else {
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.