Class FileAction
java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.action.FileAction
File download and temporary upload actions
-
Field Summary
Fields inherited from class BaseAction
l, log, MAPPER, PATH_JSP, PATH_JSP_ADMIN, PATH_JSP_OPEN, PATH_JSP_USER, PATH_JSP_USERMOB, setupFields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, typesFields inherited from class org.apache.struts.actions.BaseAction
messagesFields inherited from class org.apache.struts.action.Action
servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardtemporaryDelete(DynActionForm form, ConnectionSet conSet) Deletes a temporary file from the session storageorg.apache.struts.action.ActionForwardtemporaryUpload(DynActionForm form, ConnectionSet conSet) Uploads a file into the session temporary storageorg.apache.struts.action.ActionForwardunspecified(DynActionForm form, Connection con) Default action method if no parameter 'action' passed.static voiduploadFileCheck(org.apache.struts.upload.FormFile file) Checks that the uploaded file does not exceed the allowed maximum sizeMethods inherited from class BaseAction
checkModified, dispatchMethod, getParameter, html, html, json, json, permissionCheck, restoreRequestParams, unspecified, updatePersonalizationMethods inherited from class org.apache.struts.actions.DispatchAction
cancelled, execute, getMethod, getMethodName, unspecifiedMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Constructor Details
-
FileAction
public FileAction()Default constructor
-
-
Method Details
-
unspecified
public org.apache.struts.action.ActionForward unspecified(DynActionForm form, Connection con) throws SQLException, FileNotFoundException Description copied from class:BaseActionDefault action method if no parameter 'action' passed. Overwrite and implement.- Overrides:
unspecifiedin classBaseAction- Parameters:
form-con-- Returns:
- Throws:
SQLExceptionFileNotFoundException
-
temporaryUpload
public org.apache.struts.action.ActionForward temporaryUpload(DynActionForm form, ConnectionSet conSet) throws Exception Uploads a file into the session temporary storage- Parameters:
form- request formconSet- connection set- Returns:
- JSON response
- Throws:
Exception- on any error
-
uploadFileCheck
public static void uploadFileCheck(org.apache.struts.upload.FormFile file) throws FileNotFoundException, IOException, BGMessageException Checks that the uploaded file does not exceed the allowed maximum size- Parameters:
file- uploaded file, may benull- Throws:
FileNotFoundException- if the file data cannot be accessedIOException- on an I/O errorBGMessageException- if the file is larger than allowed
-
temporaryDelete
public org.apache.struts.action.ActionForward temporaryDelete(DynActionForm form, ConnectionSet conSet) Deletes a temporary file from the session storage- Parameters:
form- request formconSet- connection set- Returns:
- JSON response
-