org.keel.apps.fileservices.model
Class ListUploadedFiles
java.lang.Object
org.keel.services.model.StandardModel
org.keel.services.model.StandardLogEnabledModel
org.keel.apps.fileservices.model.ListUploadedFiles
- All Implemented Interfaces:
- Configurable, LogEnabled, Model
- public class ListUploadedFiles
- extends StandardLogEnabledModel
- Author:
- sdutt
| Field Summary |
static java.lang.String |
FILE_LIST
Key for the ModelResponse that the file list is stored at. |
static java.lang.String |
PARAM_DIR
The parameter to store the name of the FileDirectory. |
static java.lang.String |
PARAM_FILTER
|
static java.lang.String |
PARAM_SUBDIR
The parameter to store the name of the FileDirectory. |
| Fields inherited from interface org.keel.services.model.Model |
ROLE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_DIR
public static final java.lang.String PARAM_DIR
-
The parameter to store the name of the FileDirectory. @todo Rename this to file.list. Problem is, doing so now will break a LOT of applications....
- See Also:
- Constant Field Values
PARAM_SUBDIR
public static final java.lang.String PARAM_SUBDIR
-
The parameter to store the name of the FileDirectory.
- See Also:
- Constant Field Values
PARAM_FILTER
public static final java.lang.String PARAM_FILTER
-
- See Also:
- Constant Field Values
FILE_LIST
public static final java.lang.String FILE_LIST
-
Key for the ModelResponse that the file list is stored at.
- See Also:
- Constant Field Values
ListUploadedFiles
public ListUploadedFiles()
execute
public ModelResponse execute(ModelRequest req)
throws ModelException
-
- Throws:
ModelException
processDir
private void processDir(ModelResponse res,
Output uploadedFiles,
java.io.File uploadFileDir,
java.lang.String fileDir,
java.io.FilenameFilter filter)
throws ModelException
-
Process the directory, and list the selected files in the Output.
-
- Parameters:
res - The Response to add the generated Outputs to.
uploadedFiles - The Output to add the list to
uploadFileDir - The directory to scan
fileDir - The string representation of the directory being scanned
filter - Filter to match on. Can be null
- Throws:
ModelException
setParamsFromConfig
private ModelRequest setParamsFromConfig(ModelRequest req,
Configuration modelConfig)
throws ModelException
-
- Parameters:
modelConfig -
- Throws:
ModelException
Please see keelframework.org for information about new Keel releases.