public class NullProcessor extends Object implements IoProcessor
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
ALPHA_ALG, BACK_ALPHA_ALG, LARGETS_ALG, NEWEST_ALG, OLDEST_ALG, SMALLEST_ALG
Constructor and Description |
---|
NullProcessor() |
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 processor,
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 processor,
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.
|
public static final String NAME
public void connect(String url, String user, String password, boolean passiveMode, String params, Object request) throws Exception
IoProcessor
connect
in interface IoProcessor
url
- the urluser
- the userpassword
- the passwordpassiveMode
- the passive mode flagparams
- the parametersrequest
- the requestException
- in case of any errorpublic IoStatus copy(IoProcessor processor, String fromFolder, String toFolder, String filename, String toFilename) throws Exception
IoProcessor
copy
in interface IoProcessor
processor
- the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorpublic boolean delete(String folder, String filename) throws Exception
IoProcessor
delete
in interface IoProcessor
folder
- the folderfilename
- the filenameException
- in case of any errorpublic void disconnect()
IoProcessor
disconnect
in interface IoProcessor
public boolean done() throws Exception
IoProcessor
done
in interface IoProcessor
Exception
- in case of any errorpublic void dumpOutput(OutputStream outputStream, String name) throws Exception
IoProcessor
dumpOutput
in interface IoProcessor
outputStream
- the output streamname
- the dataset nameException
- the exceptionpublic IoStatus get(IoProcessor processor, String fromFolder, String toFolder, String filename) throws Exception
IoProcessor
get
in interface IoProcessor
processor
- the source IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic InputStream get(String fromFolder, String filename) throws Exception
IoProcessor
get
in interface IoProcessor
fromFolder
- the from folderfilename
- the filenameException
- in case of any errorpublic boolean get(String fromFolder, String toFolder, String filename) throws Exception
IoProcessor
get
in interface IoProcessor
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic List<FileResource> getList(String folder, String filename, boolean includeFolders, int maxFiles) throws Exception
IoProcessor
getList
in interface IoProcessor
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
public String getName()
IoProcessor
getName
in interface IoProcessor
public OutputStream getOutputStream(String fileName) throws Exception
IoProcessor
getOutputStream
in interface IoProcessor
fileName
- the file nameException
- the exceptionpublic String getPropsWizardResource()
IoProcessor
getPropsWizardResource
in interface IoProcessor
public IoProcessor getProxyIoProcessor(String proxyUrl, int proxyPort)
IoProcessor
getProxyIoProcessor
in interface IoProcessor
proxyUrl
- the proxy urlproxyPort
- the proxy portpublic boolean isFileSystem()
IoProcessor
isFileSystem
in interface IoProcessor
public boolean isTruncateUrl()
IoProcessor
isTruncateUrl
in interface IoProcessor
public boolean mkDir(String folder) throws Exception
IoProcessor
mkDir
in interface IoProcessor
folder
- the folder to createException
- in case of any errorpublic boolean move(IoProcessor processor, String fromFolder, String toFolder, String filename, String toFilename) throws Exception
IoProcessor
move
in interface IoProcessor
processor
- the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorpublic boolean put(IoProcessor processor, String fromFolder, String toFolder, String filename) throws Exception
IoProcessor
put
in interface IoProcessor
processor
- the designation IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic IoStatus put(String toFolder, String filename, InputStream in) throws Exception
IoProcessor
put
in interface IoProcessor
toFolder
- the to folderfilename
- the filenamein
- the InputStreamException
- in case of any errorpublic boolean put(String fromFolder, String toFolder, String filename) throws Exception
IoProcessor
put
in interface IoProcessor
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic int rank()
IoProcessor
rank
in interface IoProcessor
public boolean rename(String fromFolder, String toFolder, String filename, String toFilename) throws Exception
IoProcessor
rename
in interface IoProcessor
fromFolder
- the from foldertoFolder
- the to folderfilename
- the filenametoFilename
- the to filenameException
- in case of any errorpublic boolean supportsCdata()
IoProcessor
supportsCdata
in interface IoProcessor
public boolean supportsFiles()
IoProcessor
supportsFiles
in interface IoProcessor
public String getWildcardAlgorithm()
IoProcessor
getWildcardAlgorithm
in interface IoProcessor
public boolean isDirect()
IoProcessor
isDirect
in interface IoProcessor
public InputStream get(Object cData) throws Exception
IoProcessor
get
in interface IoProcessor
cData
- the cdataException
public boolean forceFileExtension()
IoProcessor
forceFileExtension
in interface IoProcessor
public String getActualName(String name)
IoProcessor
getActualName
in interface IoProcessor
name
- Stringpublic boolean isApi()
IoProcessor
isApi
in interface IoProcessor
public int maxObjectsInBatch()
IoProcessor
maxObjectsInBatch
in interface IoProcessor
public boolean batchDelete(String folder, String filename, boolean forceDelete) throws Exception
IoProcessor
batchDelete
in interface IoProcessor
folder
- the folderfilename
- the filenameforceDelete
- if true force the deleteException
- in case of any errorpublic boolean isStreamingProcessor()
IoProcessor
isStreamingProcessor
in interface IoProcessor
public String appendPrefix()
IoProcessor
appendPrefix
in interface IoProcessor
public boolean preserveUrl()
IoProcessor
preserveUrl
in interface IoProcessor
Copyright © 2010-2020 Toolsverse. All Rights Reserved.