|
Awake File v1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.awakefw.file.api.server.fileaction.DefaultAwakeFileActionManager
public class DefaultAwakeFileActionManager
The Default Action Manager for files: all operations will simply be done on the local file system.
Constructor Summary | |
---|---|
DefaultAwakeFileActionManager()
Constructor. |
Method Summary | |
---|---|
boolean |
delete(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: deletes a file. |
boolean |
download(OutputStream out,
AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: downloads a file on the Servlet response output stream. |
boolean |
exists(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: says if a file exists. |
long |
length(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: returns the file length in bytes. |
List<File> |
listDirectories(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: Lists all sub-directories of a directory. |
List<File> |
listFiles(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: Lists all files of a directory. |
boolean |
mkdir(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: creates a directory or sub-directory. |
boolean |
mkdirs(AwakeFileConfigurator awakeFileConfigurator,
String username,
String filename)
Action: creates a directory or sub-directory. |
void |
upload(AwakeFileConfigurator awakeFileConfigurator,
InputStream inputStream,
String username,
String filename)
Action: creates the uploaded file on the server. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAwakeFileActionManager()
Method Detail |
---|
public boolean delete(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
delete
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of filename to delete
IOException
- if any IOException occurspublic boolean download(OutputStream out, AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws FileNotFoundException, IOException
AwakeFileActionManager
download
in interface AwakeFileActionManager
out
- the Servlet response output streamawakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the filename to download
FileNotFoundException
IOException
public boolean exists(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
exists
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of filename to delete
IOException
- if any IOException occurspublic long length(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
length
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the filename to get the size from
IOException
public List<File> listDirectories(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
listDirectories
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of the directory into which to search for
sur-directories
IOException
public List<File> listFiles(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
listFiles
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of the directory into which to search for files
IOException
public boolean mkdir(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
mkdir
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of filename to create the sub-dir for
IOException
- if any IOException occurspublic boolean mkdirs(AwakeFileConfigurator awakeFileConfigurator, String username, String filename) throws IOException
AwakeFileActionManager
mkdirs
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationusername
- the client usernamefilename
- the full path of filename to create the sub-dir for
IOException
- if any IOException occurspublic void upload(AwakeFileConfigurator awakeFileConfigurator, InputStream inputStream, String username, String filename) throws IOException
AwakeFileActionManager
upload
in interface AwakeFileActionManager
awakeFileConfigurator
- the user configurationinputStream
- the input stream of the multipart uploaded fileusername
- the client usernamefilename
- the full path of filename to create
IOException
- if any IOException occurs
|
Awake File v1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |