|
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.core.model.PropertySetContainer
org.eclipse.rse.core.model.RSEModelObject
org.eclipse.rse.core.subsystems.SubSystem
org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem
org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem
| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.rse.core.subsystems.SubSystem |
|---|
SubSystem.ChangeStatusJob, SubSystem.ConnectJob, SubSystem.DisconnectJob, SubSystem.DisplayErrorMessageJob, SubSystem.GetPropertiesJob, SubSystem.GetPropertyJob, SubSystem.ResolveAbsoluteJob, SubSystem.ResolveAbsolutesJob, SubSystem.ResolveRelativeJob, SubSystem.SetPropertiesJob, SubSystem.SetPropertyJob, SubSystem.SubSystemOperationJob, SubSystem.SystemMessageDialogRunnable |
| Field Summary | |
|---|---|
protected IFileService |
_hostFileService
|
protected IHostFileToRemoteFileAdapter |
_hostFileToRemoteFileAdapter
|
protected ISearchService |
_hostSearchService
|
protected org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory |
_languageUtilityFactory
|
protected IRemoteFile |
_userHome
|
| Fields inherited from class org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem |
|---|
_cachedRemoteFiles, _searchHistory, currFilterString, DEFAULT_CONTEXT, DEFAULT_CONTEXT_NOFILTERSTRING, FILTERSTRING_LISTROOTS, folderNameMatcher, HOME_FOLDER_EDEFAULT, homeFolder, matcher, monitor, osCmdShell, osName, osVarsSet, osWindows, osWindows95, osWindowsNT |
| Fields inherited from class org.eclipse.rse.core.model.RSEModelObject |
|---|
_isDirty, _wasRestored |
| Constructor Summary | |
|---|---|
FileServiceSubSystem(IHost host,
IConnectorService connectorService,
IFileService hostFileService,
IHostFileToRemoteFileAdapter fileAdapter,
ISearchService searchService)
|
|
| Method Summary | |
|---|---|
void |
cancelSearch(IHostSearchResultConfiguration searchConfig)
Given a search configuration, cancel the search. |
boolean |
copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Copy a file or folder to a new target parent folder. |
boolean |
copyBatch(IRemoteFile[] sourceFolderOrFiles,
IRemoteFile targetFolder,
IProgressMonitor monitor)
Copy a set of remote files or folders to a new target parent folder. |
IRemoteFile |
createFile(IRemoteFile fileToCreate)
Create a new file, given its IRemoteFile object (these do not have to represent existing files). |
IRemoteFile |
createFolder(IRemoteFile folderToCreate)
Create a new folder, given its IRemoteFile object (these do not have to represent existing folders) The parent folder must exist for this to succeed. |
IRemoteFile |
createFolders(IRemoteFile folderToCreate)
Given an IRemoteFile for a folder, this will create that folder and any missing parent folders in its path. |
IHostSearchResultConfiguration |
createSearchConfiguration(IHostSearchResultSet resultSet,
Object searchTarget,
SystemSearchString searchString)
|
boolean |
delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Delete the given remote file or folder. |
boolean |
deleteBatch(IRemoteFile[] folderOrFiles,
IProgressMonitor monitor)
Delete the given batch of remote file or folder. |
void |
download(IRemoteFile file,
String localpath,
String encoding,
IProgressMonitor monitor)
Get the remote file and save it locally. |
IRemoteFileContext |
getContextFor(IRemoteFile file)
|
protected IHostFile |
getFile(IProgressMonitor monitor,
String parentPath,
String fileName)
|
protected IHostFile[] |
getFiles(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
|
protected IHostFile[] |
getFilesAndFolders(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
|
IFileService |
getFileService()
Returns the file service used by this subsystem. |
protected IHostFile[] |
getFolders(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
|
IHostFileToRemoteFileAdapter |
getHostFileToRemoteFileAdapter()
|
org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory |
getLanguageUtilityFactory()
Returns a language utility factory associated with this subsystem. |
IRemoteFile |
getParentFolder(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder object. |
String |
getRemoteEncoding()
Get the default encoding of the target system |
IRemoteFile |
getRemoteFileObject(IRemoteFile parent,
String folderOrFileName)
Constructs an IRemoteFile object given an unqualified file or folder name and its parent folder object. |
IRemoteFile |
getRemoteFileObject(String folderOrFileName)
Constructs and returns an IRemoteFile object given a fully-qualified file or folder name. |
protected IHostFile[] |
getRoots(IProgressMonitor monitor)
|
ISearchService |
getSearchService()
|
Class |
getServiceType()
|
IRemoteFileContext |
getTheDefaultContext()
|
protected IRemoteFile |
getUserHome()
|
void |
initializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it connects. |
protected boolean |
isBinary(IRemoteFile source)
|
protected boolean |
isBinary(String localEncoding,
String hostEncoding,
String remotePath)
|
IRemoteFile[] |
listFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return the array of IRemoteFile instances, matching the given pattern, that are contained in the given folder. |
IRemoteFile[] |
listFolders(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return a subsetted list of remote folders in the given parent folder on the remote system. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of remote folders and files in the given folder. |
IRemoteFile[] |
listRoots(IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of roots/drives on the remote system. |
boolean |
move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Move a file or folder to a new target parent folder. |
boolean |
rename(IRemoteFile folderOrFile,
String newName)
Rename the given remote file or folder. |
void |
search(IHostSearchResultConfiguration searchConfig)
Given a search configuration, searches for its results. |
void |
setFileService(IFileService service)
|
void |
setHostFileToRemoteFileAdapter(IHostFileToRemoteFileAdapter hostFileAdapter)
|
void |
setLanguageUtilityFactory(org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory factory)
|
boolean |
setLastModified(IRemoteFile folderOrFile,
long newDate)
Set the last modified date for the given file or folder. |
boolean |
setReadOnly(IRemoteFile folderOrFile)
Set a file to readonly. |
void |
setSearchService(ISearchService service)
|
void |
switchServiceFactory(IServiceSubSystemConfiguration fact)
Switch to use another protocol |
void |
uninitializeSubSystem(IProgressMonitor monitor)
Called on each subsystem associated with a particular IConnectorService after it disconnects |
void |
upload(InputStream stream,
long totalBytes,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
Put local data to a remote location. |
void |
upload(String source,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
upload(String source,
String srcEncoding,
String remotePath,
String rmtEncoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
| Methods inherited from class org.eclipse.rse.core.model.RSEModelObject |
|---|
compareStrings, getDescription, isDirty, setDirty, setWasRestored, wasRestored |
| Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
|---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem |
|---|
download, download, download, download, download, downloadUTF8, downloadUTF8, downloadUTF8, getHomeFolder, getLineSeparator, getLocalAddress, getParentFolderName, getParentRemoteFileSubSystemConfiguration, getPathSeparator, getPathSeparatorChar, getRemoteFileObjects, getRemoteSearchResultObject, getSeparator, getSeparatorChar, getUnusedPort, isCaseSensitive, listFiles, listFiles, listFolders, listFolders, listFoldersAndFiles, listFoldersAndFiles, listRoots, setHomeFolder, upload, upload, upload, upload, upload, upload, uploadUTF8, uploadUTF8, uploadUTF8 |
| Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
|---|
getObjectWithAbsoluteName |
| Methods inherited from interface org.eclipse.core.runtime.jobs.ISchedulingRule |
|---|
contains, isConflicting |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEModelObject |
|---|
getDescription |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
|---|
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.persistance.IRSEPersistableContainer |
|---|
commit, isDirty, setDirty, setWasRestored, wasRestored |
| Field Detail |
protected org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory _languageUtilityFactory
protected IFileService _hostFileService
protected ISearchService _hostSearchService
protected IHostFileToRemoteFileAdapter _hostFileToRemoteFileAdapter
protected IRemoteFile _userHome
| Constructor Detail |
public FileServiceSubSystem(IHost host,
IConnectorService connectorService,
IFileService hostFileService,
IHostFileToRemoteFileAdapter fileAdapter,
ISearchService searchService)
| Method Detail |
public IRemoteFileContext getContextFor(IRemoteFile file)
public IRemoteFileContext getTheDefaultContext()
public IFileService getFileService()
IFileServiceSubSystem
getFileService in interface IFileServiceSubSystempublic void setFileService(IFileService service)
public ISearchService getSearchService()
public void setSearchService(ISearchService service)
public IHostFileToRemoteFileAdapter getHostFileToRemoteFileAdapter()
getHostFileToRemoteFileAdapter in interface IFileServiceSubSystempublic String getRemoteEncoding()
IRemoteFileSubSystem
getRemoteEncoding in interface IRemoteFileSubSystempublic void setHostFileToRemoteFileAdapter(IHostFileToRemoteFileAdapter hostFileAdapter)
public IRemoteFile getRemoteFileObject(IRemoteFile parent,
String folderOrFileName)
throws SystemMessageException
getRemoteFileObject in interface IRemoteFileSubSystemgetRemoteFileObject in class RemoteFileSubSystemparent - Folder containing the folder or filefolderOrFileName - Un-qualified folder or file name
SystemMessageExceptionIRemoteFile
public IRemoteFile getRemoteFileObject(String folderOrFileName)
throws SystemMessageException
getRemoteFileObject in interface IRemoteFileSubSystemfolderOrFileName - Fully qualified folder or file name
SystemMessageExceptionIRemoteFileprotected IRemoteFile getUserHome()
protected IHostFile[] getFolders(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
throws SystemMessageException
SystemMessageException
protected IHostFile[] getFiles(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
throws SystemMessageException
SystemMessageException
protected IHostFile[] getFilesAndFolders(IProgressMonitor monitor,
String parentPath,
String fileNameFilter)
throws SystemMessageException
SystemMessageException
protected IHostFile getFile(IProgressMonitor monitor,
String parentPath,
String fileName)
throws SystemMessageException
SystemMessageException
protected IHostFile[] getRoots(IProgressMonitor monitor)
throws InterruptedException,
SystemMessageException
InterruptedException
SystemMessageException
public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
The files part of the list is subsetted by the given file name filter. It can be null for no subsetting. This version is called by RemoteFileSubSystemImpl's resolveFilterString(s).
listFoldersAndFiles in interface IRemoteFileSubSystemparent - The parent folder to list folders and files infileNameFilter - The name pattern to subset the file list by, or null to return all files.context - The holder of state informationmonitor - the progress monitor
SystemMessageException
public IRemoteFile[] listFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
listFiles in interface IRemoteFileSubSystemparent - The parent folder to list files infileNameFilter - The name pattern to subset the list by, or null to return all files.context - The holder of state informationmonitor - the progress monitor
SystemMessageException
public IRemoteFile[] listFolders(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
IProgressMonitor monitor)
throws SystemMessageException
listFolders in interface IRemoteFileSubSystemparent - The parent folder to list folders infileNameFilter - The name pattern for subsetting the file list when this folder is subsequently expandedcontext - The holder of state informationmonitor - the progress monitor
SystemMessageException
public IRemoteFile[] listRoots(IRemoteFileContext context,
IProgressMonitor monitor)
throws InterruptedException
IRemoteFileSubSystem
listRoots in interface IRemoteFileSubSystemInterruptedException
public void download(IRemoteFile file,
String localpath,
String encoding,
IProgressMonitor monitor)
download in interface IRemoteFileSubSystemencoding - the encoding of the local filemonitor - progress monitorfile - remote file that represents the file to be obtainedlocalpath - the absolute path of the local file
protected boolean isBinary(String localEncoding,
String hostEncoding,
String remotePath)
protected boolean isBinary(IRemoteFile source)
public void upload(String source,
String srcEncoding,
String remotePath,
String rmtEncoding,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
upload in interface IRemoteFileSubSystemsource - the absolute path of the local copysrcEncoding - The encoding of the local copyremotePath - remote file that represents the file on the serverrmtEncoding - The encoding of the remote file.
RemoteFileSecurityException
RemoteFileIOException
public void upload(String source,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
upload in interface IRemoteFileSubSystemsource - the absolute path of the local copydestination - location to copy toencoding - The encoding of the local copymonitor - progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void upload(InputStream stream,
long totalBytes,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
upload in interface IRemoteFileSubSystemstream - the input stream containing the local data.totalBytes - the total number of bytes in the stream, or -1 if unknown. If -1 is specified, then the progress monitor must be null.destination - remote file that represents the file on the server.encoding - the encoding of the local data, or null to specify binary.monitor - the progress monitor.
RemoteFileSecurityException
RemoteFileIOException
public boolean copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
copy in interface IRemoteFileSubSystemsourceFolderOrFile - The file or folder to copytargetFolder - The folder to copy to. No guarantee it is on the same system, so be sure to check getSystemConnection()!newName - The new name for the copied file or folder
RemoteFileSecurityException
RemoteFileIOException
public boolean copyBatch(IRemoteFile[] sourceFolderOrFiles,
IRemoteFile targetFolder,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
copyBatch in interface IRemoteFileSubSystemtargetFolder - The folder to copy to.
RemoteFileSecurityException
RemoteFileIOExceptionpublic IRemoteFile getParentFolder(IRemoteFile folderOrFile)
IRemoteFileSubSystem
getParentFolder in interface IRemoteFileSubSystemfolderOrFile - folder or file to return parent of.
public IRemoteFile createFile(IRemoteFile fileToCreate)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
createFile in interface IRemoteFileSubSystemfileToCreate - The object representing the file to be created.
RemoteFileSecurityException
RemoteFileIOExceptionIRemoteFileSubSystem.createFolders(IRemoteFile)
public IRemoteFile createFolder(IRemoteFile folderToCreate)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
createFolder in interface IRemoteFileSubSystemfolderToCreate - The object representing the folder to be created.
RemoteFileSecurityException
RemoteFileIOExceptionIRemoteFileSubSystem.createFolders(IRemoteFile)
public IRemoteFile createFolders(IRemoteFile folderToCreate)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
createFolders in interface IRemoteFileSubSystemfolderToCreate - The object representing the folder to be created, along with its parents.
RemoteFileSecurityException
RemoteFileIOExceptionIRemoteFileSubSystem.getParentFolder(IRemoteFile)
public boolean delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
throws RemoteFolderNotEmptyException,
RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
delete in interface IRemoteFileSubSystemfolderOrFile - represents the object to be deleted.monitor - progressMonitor
RemoteFolderNotEmptyException
RemoteFileSecurityException
RemoteFileIOException
public boolean deleteBatch(IRemoteFile[] folderOrFiles,
IProgressMonitor monitor)
throws RemoteFolderNotEmptyException,
RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
deleteBatch in interface IRemoteFileSubSystemfolderOrFiles - represents the objects to be deleted.monitor - progressMonitor
RemoteFolderNotEmptyException
RemoteFileSecurityException
RemoteFileIOException
public boolean rename(IRemoteFile folderOrFile,
String newName)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
rename in interface IRemoteFileSubSystemfolderOrFile - represents the object to be renamed.newName - new name to give it.
RemoteFileSecurityException
RemoteFileIOException
public boolean move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
move in interface IRemoteFileSubSystemsourceFolderOrFile - The file or folder to movetargetFolder - The folder to move to. No guarantee it is on the same system, so be sure to check getSystemConnection()!newName - The new name for the moved file or foldermonitor - progress monitor
RemoteFileSecurityException
RemoteFileIOException
public boolean setLastModified(IRemoteFile folderOrFile,
long newDate)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
setLastModified in interface IRemoteFileSubSystemfolderOrFile - represents the object to be renamed.newDate - new date, in milliseconds from epoch, to assign.
RemoteFileSecurityException
RemoteFileIOException
public boolean setReadOnly(IRemoteFile folderOrFile)
throws RemoteFileSecurityException,
RemoteFileIOException
IRemoteFileSubSystem
setReadOnly in interface IRemoteFileSubSystemfolderOrFile - represents the object to be renamed.
RemoteFileSecurityException
RemoteFileIOExceptionpublic org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory getLanguageUtilityFactory()
IRemoteFileSubSystem
getLanguageUtilityFactory in interface IRemoteFileSubSystempublic void setLanguageUtilityFactory(org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory factory)
public void search(IHostSearchResultConfiguration searchConfig)
IRemoteFileSubSystem
search in interface IRemoteFileSubSystemsearchConfig - a search configuration.public void cancelSearch(IHostSearchResultConfiguration searchConfig)
IRemoteFileSubSystem
cancelSearch in interface IRemoteFileSubSystemcancelSearch in class RemoteFileSubSystem
public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet,
Object searchTarget,
SystemSearchString searchString)
createSearchConfiguration in interface IFileServiceSubSystempublic void switchServiceFactory(IServiceSubSystemConfiguration fact)
switchServiceFactory in interface IServiceSubSystempublic Class getServiceType()
getServiceType in interface IServiceSubSystempublic void initializeSubSystem(IProgressMonitor monitor)
ISubSystemIConnectorService after it connects.
initializeSubSystem in interface ISubSysteminitializeSubSystem in class RemoteFileSubSystempublic void uninitializeSubSystem(IProgressMonitor monitor)
ISubSystemIConnectorService after it disconnects
uninitializeSubSystem in interface ISubSystemuninitializeSubSystem in class RemoteFileSubSystem
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||