org.kuali.rice.kns.web.struts.action
Class KualiMultipartRequestHandler
java.lang.Object
org.apache.struts.upload.CommonsMultipartRequestHandler
org.kuali.rice.kns.web.struts.action.KualiMultipartRequestHandler
- All Implemented Interfaces:
- org.apache.struts.upload.MultipartRequestHandler
public class KualiMultipartRequestHandler
- extends org.apache.struts.upload.CommonsMultipartRequestHandler
Subclass of the MultipartRequestHandler used by Struts. This one allows the maximum upload size to be set
by the application rather than by an init parameter.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Fields inherited from class org.apache.struts.upload.CommonsMultipartRequestHandler |
DEFAULT_SIZE_MAX, DEFAULT_SIZE_THRESHOLD, log |
Fields inherited from interface org.apache.struts.upload.MultipartRequestHandler |
ATTRIBUTE_MAX_LENGTH_EXCEEDED |
Methods inherited from class org.apache.struts.upload.CommonsMultipartRequestHandler |
addFileParameter, addTextParameter, convertSizeToBytes, finish, getAllElements, getFileElements, getMapping, getRepositoryPath, getServlet, getSizeThreshold, getTextElements, handleRequest, rollback, setMapping, setServlet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final org.apache.log4j.Logger LOG
sizeMax
private String sizeMax
KualiMultipartRequestHandler
public KualiMultipartRequestHandler()
getSizeMax
public long getSizeMax(org.apache.struts.config.ModuleConfig mc)
- Returns the maximum allowable size, in bytes, of an uploaded file. The
value is obtained from the current module's controller configuration.
- Overrides:
getSizeMax
in class org.apache.struts.upload.CommonsMultipartRequestHandler
- Parameters:
mc
- The current module's configuration.
- Returns:
- The maximum allowable file size, in bytes.
getSizeMaxString
public String getSizeMaxString()
setSizeMax
public void setSizeMax(String sizeString)
setMaxUploadSizeToMaxOfList
public void setMaxUploadSizeToMaxOfList(List<String> sizes)
- Sets the max size string to the item in the list that represents the largest size.
calculateMaxUploadSizeToMaxOfList
public long calculateMaxUploadSizeToMaxOfList(List<String> sizes)
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.