public interface IoProcessor
Modifier and Type | Field and Description |
---|---|
static String |
ALPHA_ALG |
static String |
BACK_ALPHA_ALG |
static String |
LARGETS_ALG |
static String |
NEWEST_ALG |
static String |
OLDEST_ALG |
static String |
SMALLEST_ALG |
Modifier and Type | Method and Description |
---|---|
String |
appendPrefix()
Append this prefix at the beginning of the URL if not present.
|
boolean |
batchDelete(String folder,
String filename,
boolean forceDelete)
Batch delete.
|
void |
connect(String url,
String user,
String password,
boolean passiveMode,
String params,
Object request)
Connects to the remote resource.
|
IoStatus |
copy(IoProcessor processor,
String fromFolder,
String toFolder,
String filename,
String toFilename)
Copies fromFolder + filename file to the toFolder + toFilename using
provided destination processor.
|
boolean |
delete(String folder,
String filename)
Deletes a file folder + filename.
|
void |
disconnect()
Disconnects from the remore resource.
|
boolean |
done()
Executed when IO command is finished.
|
void |
dumpOutput(OutputStream outputStream,
String name)
Dumps output stream to the designated destination.
|
boolean |
forceFileExtension()
If true force adding file extension to the name.
|
IoStatus |
get(IoProcessor client,
String fromFolder,
String toFolder,
String filename)
Copies a file fromFolder + filename to the toFolder + filename using
client as a source IoProcessor.
|
InputStream |
get(Object cData)
Gets the InputStream from the cData.
|
InputStream |
get(String fromFolder,
String filename)
Copies file fromFolder + filename to the InputStream.
|
boolean |
get(String fromFolder,
String toFolder,
String filename)
Copies file fromFolder + filename to the toFolder + filename using itself
as a source IoProcessor.
|
String |
getActualName(String name)
Gets the actual file name from the passed name.
|
List<FileResource> |
getList(String folder,
String filename,
boolean includeFolders,
int maxFiles)
Gets the list of FileResource objects from the folder + filename.
|
String |
getName()
Get processor name.
|
OutputStream |
getOutputStream(String fileName)
Gets the output stream through which data can be written to store a file.
|
String |
getPropsWizardResource()
Gets the name of the xml file used to create a wizard for editing
properties.
|
IoProcessor |
getProxyIoProcessor(String proxyUrl,
int proxyPort)
Gets the proxy version of the give io processor.
|
String |
getWildcardAlgorithm()
Gets the wildcard algorithm.
|
boolean |
isApi()
Checks if processor is associated with api.
|
boolean |
isDirect()
Checks if processor gets and saves data directly to the alias.
|
boolean |
isFileSystem()
Checks if IoProcessor operates on a local file system.
|
boolean |
isStreamingProcessor()
Checks if this is a streaming processor.
|
boolean |
isTruncateUrl()
Checks if url needs to be truncated (separated from the file name).
|
int |
maxObjectsInBatch()
Maximum number of objects that can be processed in a single call.
|
boolean |
mkDir(String folder)
Creates a folder.
|
boolean |
move(IoProcessor processor,
String fromFolder,
String toFolder,
String filename,
String toFilename)
Moves a file fromFolder + filename to the toFolder + filename using
processor as a destination IoProcessor.
|
boolean |
preserveUrl()
If true - do not modify the URL when connecting to the resource.
|
boolean |
put(IoProcessor client,
String fromFolder,
String toFolder,
String filename)
Copies file fromFolder + filename to the toFolder + filename using client
as a designation IoProcessor.
|
IoStatus |
put(String toFolder,
String filename,
InputStream in)
Creates a file toFolder + filename from the InputStream in.
|
boolean |
put(String fromFolder,
String toFolder,
String filename)
Copies a file fromFolder + filename to the toFolder + toFolder using
itself as a destination IoProcessor.
|
int |
rank()
Gets the sorting rank.
|
boolean |
rename(String fromFolder,
String toFolder,
String filename,
String toFilename)
Renames a file fromFolder + filename to toFolder + toFilename.
|
boolean |
supportsCdata()
Checks if IoProcessor supports cdata.
|
boolean |
supportsFiles()
Checks if IoProcessor supports files.
|
static final String OLDEST_ALG
static final String NEWEST_ALG
static final String ALPHA_ALG
static final String BACK_ALPHA_ALG
static final String LARGETS_ALG
static final String SMALLEST_ALG
void connect(String url, String user, String password, boolean passiveMode, String params, Object request) throws Exception
url
- the urluser
- the userpassword
- the passwordpassiveMode
- the passive mode flagparams
- the parametersrequest
- the requestException
- in case of any errorIoStatus copy(IoProcessor processor, String fromFolder, String toFolder, String filename, String toFilename) throws Exception
processor
- the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorboolean delete(String folder, String filename) throws Exception
folder
- the folderfilename
- the filenameException
- in case of any errorvoid disconnect()
boolean done() throws Exception
Exception
- in case of any errorvoid dumpOutput(OutputStream outputStream, String name) throws Exception
outputStream
- the output streamname
- the dataset nameException
- the exceptionIoStatus get(IoProcessor client, String fromFolder, String toFolder, String filename) throws Exception
client
- the source IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorInputStream get(String fromFolder, String filename) throws Exception
fromFolder
- the from folderfilename
- the filenameException
- in case of any errorboolean get(String fromFolder, String toFolder, String filename) throws Exception
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorList<FileResource> getList(String folder, String filename, boolean includeFolders, int maxFiles) throws Exception
folder
- the folderfilename
- the filenameincludeFolders
- the include folders flag. If equals to true recursively
includes sub-foldersmaxFiles
- the maximum number of filesException
- in case of any errorFileResource
String getName()
OutputStream getOutputStream(String fileName) throws Exception
fileName
- the file nameException
- the exceptionString getPropsWizardResource()
IoProcessor getProxyIoProcessor(String proxyUrl, int proxyPort)
proxyUrl
- the proxy urlproxyPort
- the proxy portboolean isFileSystem()
boolean isTruncateUrl()
boolean mkDir(String folder) throws Exception
folder
- the folder to createException
- in case of any errorboolean move(IoProcessor processor, String fromFolder, String toFolder, String filename, String toFilename) throws Exception
processor
- the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorboolean put(IoProcessor client, String fromFolder, String toFolder, String filename) throws Exception
client
- the designation IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorIoStatus put(String toFolder, String filename, InputStream in) throws Exception
toFolder
- the to folderfilename
- the filenamein
- the InputStreamException
- in case of any errorboolean put(String fromFolder, String toFolder, String filename) throws Exception
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorint rank()
boolean rename(String fromFolder, String toFolder, String filename, String toFilename) throws Exception
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorboolean supportsCdata()
boolean supportsFiles()
String getWildcardAlgorithm()
boolean isDirect()
InputStream get(Object cData) throws Exception
cData
- the cdataException
boolean forceFileExtension()
String getActualName(String name)
name
- Stringboolean isApi()
int maxObjectsInBatch()
boolean batchDelete(String folder, String filename, boolean forceDelete) throws Exception
folder
- the folderfilename
- the filenameforceDelete
- if true force the deleteException
- in case of any errorboolean isStreamingProcessor()
String appendPrefix()
boolean preserveUrl()
Copyright © 2010-2020 Toolsverse. All Rights Reserved.