- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 33 of file FileUtilAjax.java.
◆ FileUtilAjax()
org.turro.elephant.impl.util.FileUtilAjax.FileUtilAjax |
( |
| ) |
|
◆ execute()
int org.turro.elephant.impl.util.FileUtilAjax.execute |
( |
| ) |
throws Exception |
Called by constructor in request for one action.
- Exceptions
-
- Returns
- Action's result.
Implements org.turro.elephant.context.IAction.
Definition at line 43 of file FileUtilAjax.java.
48 return IAction.NO_DATA;
50 File realPath =
new File(ElephantContext.getRealPath(path));
51 if(
"list-folders".equals(action)) {
52 if(realPath.exists()) {
53 return listFolders(realPath);
59 else if(
"list-files".equals(action)) {
60 if(realPath.exists()) {
61 return listFiles(realPath, selectable);
67 else if(
"list-attachments".equals(action)) {
68 if(realPath.exists()) {
69 return listAttachments(realPath, selectable);
75 else if(
"remove-attachments".equals(action)) {
76 return removeAttachments(selectable, realPath);
78 else if(
"file-content".equals(action)) {
79 if(realPath.exists()) {
80 return fileContent(realPath);
86 else if(
"save-content".equals(action)) {
87 return saveContent(realPath);
89 else if(
"remove-file".equals(action)) {
90 if(realPath.exists()) {
97 return IAction.NO_DATA;
String getActionParameter()
String getParameter(String param)
◆ VALID_ATTACHMENTS
final String org.turro.elephant.impl.util.FileUtilAjax.VALID_ATTACHMENTS = "(?i).*\\.(jpg|gif|png|pdf|doc|txt|zip)$" |
|
static |
The documentation for this class was generated from the following file: