Package org.bgerp.app.servlet.file
Class Files
java.lang.Object
org.bgerp.app.servlet.file.Files
Files accessor, allowing to see and remove directory files.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondelete(DynActionForm form) Delete file(s)org.apache.struts.action.ActionForwarddownload(DynActionForm form) Sends a file content to response output streamFile deletion permission action for checking it using ctxUser.checkPerm().File deletion URL, e.g.: '/admin/app.do?method=deleteLogUpdate'.File download permission action for checking it using ctxUser.checkPerm().File download URL, e.g.: '/admin/app.do?method=downloadLogUpdate'.getId()Unique string ID of the files set.Options.highlight(DynActionForm form) Set a file highlight classes to a responselist()List of files matchingsorted accordinglyinvalid reference
#wildcardOptions.getOrder() 
- 
Constructor Details
- 
Files
public Files(Class<? extends BaseAction> actionClass, String id, String basedir, Options options, String... wildcards) Constructor- Parameters:
 actionClass- the linked action classid- unique ID of the filesbasedir- base dir, only the files there are shownoptions- extended possibilitieswildcards- wildcards for filtering files, '*' is supported
 
 - 
 - 
Method Details
- 
getId
Unique string ID of the files set. Used for generation action names.- Returns:
 
 - 
getOptions
Options.- Returns:
 
 - 
getDownloadPermissionAction
File download permission action for checking it using ctxUser.checkPerm().- Returns:
 
 - 
getDownloadURL
File download URL, e.g.: '/admin/app.do?method=downloadLogUpdate'. Anameparam has to be added at the end.- Returns:
 
 - 
getHighlightPermissionAction
 - 
getHighlightURL
 - 
getDeletePermissionAction
File deletion permission action for checking it using ctxUser.checkPerm().- Returns:
 
 - 
getDeleteURL
File deletion URL, e.g.: '/admin/app.do?method=deleteLogUpdate'. Anameparam has to be added at the end.- Returns:
 
 - 
list
List of files matchingsorted accordinglyinvalid reference
#wildcardOptions.getOrder()- Returns:
 
 - 
download
public org.apache.struts.action.ActionForward download(DynActionForm form) throws BGIllegalArgumentException, IOException, FileNotFoundException Sends a file content to response output stream- Parameters:
 form- request form with file name in paramname- Returns:
 - always 
null - Throws:
 BGIllegalArgumentExceptionIOExceptionFileNotFoundException
 - 
highlight
public DynActionForm highlight(DynActionForm form) throws BGIllegalArgumentException, FileNotFoundException Set a file highlight classes to a response- Parameters:
 form- the request form with the file name in paramname- Returns:
 - Throws:
 BGIllegalArgumentExceptionFileNotFoundException
 - 
delete
Delete file(s)- Parameters:
 form- form withnameparameter values, containing the file name(s)- Returns:
 - the 
form 
 
 -