|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.services.dstore.AbstractDStoreService
org.eclipse.rse.services.dstore.files.DStoreFileService
| Field Summary | |
|---|---|
protected Map |
_fileElementMap
|
protected ISystemFileTypes |
_fileTypeRegistry
|
protected org.eclipse.dstore.core.model.DataElement |
_uploadLogElement
|
| Fields inherited from class org.eclipse.rse.services.dstore.AbstractDStoreService |
|---|
_cmdDescriptorMap, _dataStoreProvider, _initializeStatus, _minerElement, _msgProvider, _statusMonitor |
| Fields inherited from interface org.eclipse.rse.services.clientserver.IServiceConstants |
|---|
FAILED, FAILED_TO_DELETE_DIR, FAILED_WITH_DOES_NOT_EXIST, FAILED_WITH_EXCEPTION, FAILED_WITH_EXIST, FAILED_WITH_SECURITY, SUCCESS, TOKEN_SEPARATOR, UNEXPECTED_ERROR, VERSION_1 |
| Constructor Summary | |
|---|---|
DStoreFileService(org.eclipse.dstore.core.model.IDataStoreProvider dataStoreProvider,
ISystemFileTypes fileTypeRegistry,
ISystemMessageProvider msgProvider)
|
|
| Method Summary | |
|---|---|
protected IHostFile |
convertToHostFile(org.eclipse.dstore.core.model.DataElement element)
|
protected IHostFile[] |
convertToHostFiles(org.eclipse.dstore.core.model.DataElement[] elements)
|
boolean |
copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Copy the file or folder to the specified destination |
boolean |
copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
Copy a set of files or folders to the specified destination |
IHostFile |
createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
Create a file on the host |
IHostFile |
createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
Create a folder on the host |
boolean |
delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
Deletes a file or folder on the host |
boolean |
deleteBatch(IProgressMonitor monitor,
String[] remoteParents,
String[] fileNames)
Deletes a set of files or folders on the host. |
boolean |
download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String encoding)
Copy a file from the remote file system to the local system. |
protected IHostFile[] |
fetch(IProgressMonitor monitor,
String remoteParent,
String fileFilter,
String queryType)
|
protected org.eclipse.dstore.core.model.DataElement |
findUploadLog()
|
protected org.eclipse.dstore.core.model.DataElement |
getAttributes(String fileNameFilter,
boolean showHidden)
|
protected int |
getBufferDownloadSize()
|
protected int |
getBufferUploadSize()
|
protected String |
getByteStreamHandlerId()
|
protected String |
getDataStoreRoot()
|
String |
getDescription()
|
protected org.eclipse.dstore.core.model.DataElement |
getElementFor(String path)
|
IHostFile |
getFile(IProgressMonitor monitor,
String remoteParent,
String name)
|
IHostFile[] |
getFiles(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
IHostFile[] |
getFilesAndFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
IHostFile[] |
getFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
|
protected String |
getMinerId()
|
String |
getName()
|
IHostFile[] |
getRoots(IProgressMonitor monitor)
|
protected String |
getSeparator(String parentPath)
Returns what the next part of the path should be, given the current path as parentPath. |
IHostFile |
getUserHome()
|
boolean |
isCaseSensitive()
Indicates whether the file system is case sensitive |
protected boolean |
isSpecialChar(char c)
Checks whether the given character is a special character in the shell. |
boolean |
move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
Move the file or folder specified |
protected String |
prepareForDownload(String localPath)
|
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
Renames a file or folder on the host |
boolean |
rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
Renames a file or folder on the host |
void |
setBufferDownloadSize(int size)
|
void |
setBufferUploadSize(int size)
|
protected void |
setDataStoreRoot(String root)
|
void |
uninitService(IProgressMonitor monitor)
|
boolean |
upload(IProgressMonitor monitor,
File file,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
Copy a file to the remote file system. |
boolean |
upload(IProgressMonitor monitor,
InputStream inputStream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
Copy a file to the remote file system. |
| Methods inherited from class org.eclipse.rse.services.dstore.AbstractDStoreService |
|---|
checkHostJVM, dsQueryCommand, dsQueryCommand, dsStatusCommand, dsStatusCommand, getCommandDescriptor, getDataStore, getMessage, getMinerElement, getMinerElement, getServerMinor, getServerVersion, getStatusMonitor, initMiner, initService, isInitialized, waitForInitialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.services.IService |
|---|
getMessage, initService |
| Field Detail |
protected org.eclipse.dstore.core.model.DataElement _uploadLogElement
protected Map _fileElementMap
protected ISystemFileTypes _fileTypeRegistry
| Constructor Detail |
public DStoreFileService(org.eclipse.dstore.core.model.IDataStoreProvider dataStoreProvider,
ISystemFileTypes fileTypeRegistry,
ISystemMessageProvider msgProvider)
| Method Detail |
public void uninitService(IProgressMonitor monitor)
uninitService in interface IServiceuninitService in class AbstractDStoreServicepublic String getName()
getName in interface IServicepublic String getDescription()
getDescription in interface IServicepublic void setBufferUploadSize(int size)
public void setBufferDownloadSize(int size)
protected int getBufferUploadSize()
protected int getBufferDownloadSize()
protected String getMinerId()
getMinerId in class AbstractDStoreServiceprotected String getByteStreamHandlerId()
protected String getDataStoreRoot()
protected String prepareForDownload(String localPath)
protected void setDataStoreRoot(String root)
protected org.eclipse.dstore.core.model.DataElement findUploadLog()
protected org.eclipse.dstore.core.model.DataElement getAttributes(String fileNameFilter,
boolean showHidden)
public boolean upload(IProgressMonitor monitor,
InputStream inputStream,
String remoteParent,
String remoteFile,
boolean isBinary,
String hostEncoding)
IFileService
upload in interface IFileServicemonitor - the monitor for this potentially long running operationinputStream - input stream to transferremoteParent - - a string designating the parent folder of the target for this file.remoteFile - - a string designating the name of the file to be written on the remote system.isBinary - - indicates whether the file is text or binaryhostEncoding - - the tgt encoding of the file (if text)
public boolean upload(IProgressMonitor monitor,
File file,
String remoteParent,
String remoteFile,
boolean isBinary,
String srcEncoding,
String hostEncoding)
IFileService
upload in interface IFileServicemonitor - the monitor for this potentially long running operationfile - - a real file in the local file system.remoteParent - - a string designating the parent folder of the target for this file.remoteFile - - a string designating the name of the file to be written on the remote system.isBinary - - indicates whether the file is text or binarysrcEncoding - - the src encoding of the file (if text)hostEncoding - - the tgt encoding of the file (if text)
public boolean download(IProgressMonitor monitor,
String remoteParent,
String remoteFile,
File localFile,
boolean isBinary,
String encoding)
throws SystemMessageException
IFileService
download in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - - a String designating the remote parent.remoteFile - - a String designating the remote file residing in the parent.localFile - - The file that is to be written. If the file exists it is
overwritten.isBinary - - indicates whether the file is text on binaryencoding - - the encoding on the host (if text)
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile getFile(IProgressMonitor monitor,
String remoteParent,
String name)
getFile in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - name -
protected String getSeparator(String parentPath)
protected IHostFile convertToHostFile(org.eclipse.dstore.core.model.DataElement element)
protected IHostFile[] convertToHostFiles(org.eclipse.dstore.core.model.DataElement[] elements)
public IHostFile getUserHome()
getUserHome in interface IFileService
public IHostFile createFile(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
IFileService
createFile in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - the parent directoryfileName - the name of the new file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public IHostFile createFolder(IProgressMonitor monitor,
String remoteParent,
String folderName)
throws SystemMessageException
IFileService
createFolder in interface IFileServicemonitor - the progress monitorremoteParent - the parent directoryfolderName - the name of the new folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean delete(IProgressMonitor monitor,
String remoteParent,
String fileName)
throws SystemMessageException
IFileService
delete in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to deletefileName - the name of the file or folder to delete
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean deleteBatch(IProgressMonitor monitor,
String[] remoteParents,
String[] fileNames)
throws SystemMessageException
IFileService
deleteBatch in interface IFileServicemonitor - the progress monitorremoteParents - the array of folders containing the files to deletefileNames - the names of the files or folders to delete
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName)
throws SystemMessageException
IFileService
rename in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the file
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean rename(IProgressMonitor monitor,
String remoteParent,
String oldName,
String newName,
IHostFile oldFile)
throws SystemMessageException
IFileService
rename in interface IFileServicemonitor - the progress monitorremoteParent - the folder containing the file to renameoldName - the old name of the file or folder to renamenewName - the new name for the fileoldFile - the file to update with the change
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean move(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
IFileService
move in interface IFileServicemonitor - the progress monitorsrcParent - the folder containing the file or folder to movesrcName - the new of the file or folder to movetgtParent - the destination folder for the movetgtName - the name of the moved file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.protected boolean isSpecialChar(char c)
c - the character to check.
true if the character is a special character, false otherwise.
public boolean copy(IProgressMonitor monitor,
String srcParent,
String srcName,
String tgtParent,
String tgtName)
throws SystemMessageException
IFileService
copy in interface IFileServicemonitor - the progress monitorsrcParent - the folder containing the file or folder to copysrcName - the new of the file or folder to copytgtParent - the destination folder for the copytgtName - the name of the copied file or folder
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.
public boolean copyBatch(IProgressMonitor monitor,
String[] srcParents,
String[] srcNames,
String tgtParent)
throws SystemMessageException
IFileService
copyBatch in interface IFileServicemonitor - the progress monitorsrcParents - the folders containing each file or folder to copysrcNames - the names of the files or folders to copytgtParent - the destination folder for the copy
SystemMessageException - if an error occurs.
Typically this would be one of those in the RemoteFileException family.public IHostFile[] getRoots(IProgressMonitor monitor)
getRoots in interface IFileServicemonitor - the monitor for this potentially long running operation
Return the list of roots for this system
public IHostFile[] getFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
getFolders in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
public IHostFile[] getFiles(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
getFiles in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
public IHostFile[] getFilesAndFolders(IProgressMonitor monitor,
String remoteParent,
String fileFilter)
getFilesAndFolders in interface IFileServicemonitor - the monitor for this potentially long running operationremoteParent - - the name of the parent directory on the remote file
system from which to retrieve the child list.fileFilter - - a string that can be used to filter the children. Only
those files matching the filter make it into the list. The interface
does not dictate where the filtering occurs.
protected org.eclipse.dstore.core.model.DataElement getElementFor(String path)
protected IHostFile[] fetch(IProgressMonitor monitor,
String remoteParent,
String fileFilter,
String queryType)
public boolean isCaseSensitive()
IFileService
isCaseSensitive in interface IFileService
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||