Keel 2.1RC2

org.keel.apps.fileservices.model
Class ListUploadedFiles

java.lang.Object
  extended byorg.keel.services.model.StandardModel
      extended byorg.keel.services.model.StandardLogEnabledModel
          extended byorg.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 class org.keel.services.model.StandardLogEnabledModel
log
 
Fields inherited from class org.keel.services.model.StandardModel
configuration
 
Fields inherited from interface org.keel.services.model.Model
ROLE
 
Constructor Summary
ListUploadedFiles()
           
 
Method Summary
 ModelResponse execute(ModelRequest req)
           
private  void processDir(ModelResponse res, Output uploadedFiles, java.io.File uploadFileDir, java.lang.String fileDir, java.io.FilenameFilter filter)
          Process the directory, and list the selected files in the Output.
private  ModelRequest setParamsFromConfig(ModelRequest req, Configuration modelConfig)
           
 
Methods inherited from class org.keel.services.model.StandardLogEnabledModel
enableLogging
 
Methods inherited from class org.keel.services.model.StandardModel
configure, getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

ListUploadedFiles

public ListUploadedFiles()
Method Detail

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

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.