|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.core.model.RSEPersistableObject
org.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
public class FileServiceSubSystem
Generic Subsystem implementation for remote files. Clients may instantiate this class from their subsystem configurations.
Extending (overriding) this class is discouraged: configuration of the subsystem
behavior should be done by providing a custom IFileService
implementation
wherever possible.
Nested Class Summary |
---|
Nested classes/interfaces 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 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, matcher, osCmdShell, osName, osVarsSet, osWindows, osWindows95, osWindowsNT |
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
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 |
canSwitchTo(ISubSystemConfiguration configuration)
Determine if a service subsystem is capable of switching to this new configuration. |
void |
copy(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Copy a file or folder to a new target parent folder. |
void |
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,
IProgressMonitor monitor)
Create a new file, given its IRemoteFile object (these do not have to represent existing files). |
IRemoteFile |
createFolder(IRemoteFile folderToCreate,
IProgressMonitor monitor)
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,
IProgressMonitor monitor)
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)
|
void |
delete(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Delete the given remote file or folder. |
void |
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. |
void |
downloadMultiple(IRemoteFile[] sources,
String[] destinations,
String[] encodings,
IProgressMonitor monitor)
Get the remote files and save them locally. |
IRemoteFileContext |
getContextFor(IRemoteFile file)
|
protected IHostFile |
getFile(String parentPath,
String fileName,
IProgressMonitor monitor)
|
IFileService |
getFileService()
Returns the file service used by this subsystem. |
IHostFileToRemoteFileAdapter |
getHostFileToRemoteFileAdapter()
|
InputStream |
getInputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
Gets the input stream to access the contents a remote file. Defers to the file service. |
ILanguageUtilityFactory |
getLanguageUtilityFactory()
Returns a language utility factory associated with this subsystem. |
OutputStream |
getOutputStream(String remoteParent,
String remoteFile,
boolean isBinary,
IProgressMonitor monitor)
Deprecated. Use getOutputStream(String, String, int, IProgressMonitor)
instead |
OutputStream |
getOutputStream(String remoteParent,
String remoteFile,
int options,
IProgressMonitor monitor)
Gets the output stream to write/append to a remote file. |
IRemoteFile |
getParentFolder(IRemoteFile folderOrFile,
IProgressMonitor monitor)
Given a folder or file, return its parent folder object. |
String |
getRemoteEncoding()
Returns the encoding from the file service being used by this subsystem. |
IRemoteFile |
getRemoteFileObject(IRemoteFile parent,
String folderOrFileName,
IProgressMonitor monitor)
Constructs an IRemoteFile object given an unqualified file or folder name and its parent folder object. |
IRemoteFile |
getRemoteFileObject(String folderOrFileName,
IProgressMonitor monitor)
Constructs and returns an IRemoteFile object given a fully-qualified file or folder name. |
IRemoteFile[] |
getRemoteFileObjects(String[] folderOrFileNames,
IProgressMonitor monitor)
Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it. |
protected IHostFile[] |
getRoots(IProgressMonitor monitor)
|
ISearchService |
getSearchService()
|
Class |
getServiceType()
Return the service type for this subsystem. |
IRemoteFileContext |
getTheDefaultContext()
|
protected IRemoteFile |
getUserHome()
|
void |
initializeSubSystem(IProgressMonitor monitor)
Initialize this subsystem instance after the corresponding IConnectorService connect method finishes. |
protected IHostFile[] |
internalList(String parentPath,
String fileNameFilter,
int fileType,
IProgressMonitor monitor)
Return a list of children from the given parent path in service layer format. |
protected void |
internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfig)
Perform the subsystem specific processing required to complete a subsystem configuration switch for a service subsystem. |
protected boolean |
isBinary(IRemoteFile source)
|
protected boolean |
isBinary(String localEncoding,
String hostEncoding,
String remotePath)
|
boolean |
isCaseSensitive()
Return true if file names are case-sensitive. |
IRemoteFile[] |
list(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context,
int fileType,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
String[] fileNameFilters,
int[] fileTypes,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
listMultiple(IRemoteFile[] parents,
String[] fileNameFilters,
int fileType,
IProgressMonitor monitor)
Return a list of remote folders and/or files in the given folder. |
IRemoteFile[] |
listRoots(IRemoteFileContext context,
IProgressMonitor monitor)
Return a list of roots/drives on the remote system. |
void |
move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName,
IProgressMonitor monitor)
Move a file or folder to a new target parent folder. |
void |
rename(IRemoteFile folderOrFile,
String newName,
IProgressMonitor monitor)
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(ILanguageUtilityFactory factory)
|
void |
setLastModified(IRemoteFile folderOrFile,
long newDate,
IProgressMonitor monitor)
Set the last modified date for the given file or folder. |
void |
setReadOnly(IRemoteFile folderOrFile,
boolean readOnly,
IProgressMonitor monitor)
Set a files read-only permissions. |
void |
setSearchService(ISearchService service)
|
boolean |
supportsEncodingConversion()
Indicates whether this file subsystem supports code page conversion using the IFileServiceCodePageConverter mechanism. Defers to the file service. |
void |
uninitializeSubSystem(IProgressMonitor monitor)
Uninitialize this subsystem just after disconnect. |
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. |
void |
uploadMultiple(String[] sources,
IRemoteFile[] destinations,
String[] encodings,
IProgressMonitor monitor)
Put the local copies of the remote files to the remote locations. |
void |
uploadMultiple(String[] sources,
String[] srcEncodings,
String[] remotePaths,
String[] rmtEncodings,
IProgressMonitor monitor)
Put the local copies of the remote files to the remote locations. |
Methods inherited from class org.eclipse.rse.core.model.RSEModelObject |
---|
getDescription |
Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
---|
addPropertySet, addPropertySets, clonePropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
Methods inherited from class org.eclipse.rse.core.model.RSEPersistableObject |
---|
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
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.subsystems.files.core.subsystems.IRemoteFileSubSystem |
---|
getLineSeparator, getLocalAddress, getParentFolderName, getParentRemoteFileSubSystemConfiguration, getPathSeparator, getPathSeparatorChar, getRemoteSearchResultObject, getSeparator, getSeparatorChar, getUnusedPort, list, list, list, listMultiple, listMultiple, listRoots |
Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectResolver |
---|
getObjectWithAbsoluteName, 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, clonePropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
Field Detail |
---|
protected 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 boolean isCaseSensitive()
RemoteFileSubSystem
isCaseSensitive
in interface IRemoteFileSubSystem
isCaseSensitive
in class RemoteFileSubSystem
public IRemoteFileContext getContextFor(IRemoteFile file)
public IRemoteFileContext getTheDefaultContext()
public IFileService getFileService()
IFileServiceSubSystem
getFileService
in interface IFileServiceSubSystem
public void setFileService(IFileService service)
public ISearchService getSearchService()
public void setSearchService(ISearchService service)
public IHostFileToRemoteFileAdapter getHostFileToRemoteFileAdapter()
getHostFileToRemoteFileAdapter
in interface IFileServiceSubSystem
public void setHostFileToRemoteFileAdapter(IHostFileToRemoteFileAdapter hostFileAdapter)
public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException
getRemoteFileObject
in interface IRemoteFileSubSystem
parent
- Folder containing the folder or filefolderOrFileName
- Un-qualified folder or file namemonitor
- the progress monitor
SystemMessageException
IRemoteFile
public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException
getRemoteFileObject
in interface IRemoteFileSubSystem
folderOrFileName
- Fully qualified folder or file namemonitor
- the progress monitor
SystemMessageException
- in case an error occurs contacting the
remote system while retrieving the requested remote object.IRemoteFile
protected IRemoteFile getUserHome()
protected IHostFile[] internalList(String parentPath, String fileNameFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException
SystemMessageException
protected IHostFile getFile(String parentPath, String fileName, IProgressMonitor monitor) throws SystemMessageException
SystemMessageException
protected IHostFile[] getRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException
InterruptedException
SystemMessageException
public IRemoteFile[] getRemoteFileObjects(String[] folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException
RemoteFileSubSystem
getRemoteFileObjects
in interface IRemoteFileSubSystem
getRemoteFileObjects
in class RemoteFileSubSystem
folderOrFileNames
- Fully qualified folder or file namesmonitor
- the progress monitor
SystemMessageException
public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
listMultiple
in interface IRemoteFileSubSystem
parents
- The parent folders to list folders and files infileNameFilters
- The name patterns to subset the file list by, or null to return all files.
There should be exactly one fileNameFilter per parent.fileTypes
- - indicates whether to query files, folders, both or some other type. There
should be exactly one fileType specified per parent.
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int fileType, IProgressMonitor monitor) throws SystemMessageException
listMultiple
in interface IRemoteFileSubSystem
parents
- The parent folders to list folders and files infileNameFilters
- The name patterns to subset the file list by, or null to return all files.
There should be exactly one fileNameFilter per parent.fileType
- - indicates whether to query files, folders, both or some other type.
Available file types include IFileService.FILE_TYPE_FILES
,
IFileService.FILE_TYPE_FOLDERS
, and
IFileService.FILE_TYPE_FILES_AND_FOLDERS
.monitor
- the progress monitor
SystemMessageException
public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, int fileType, IProgressMonitor monitor) throws SystemMessageException
list
in interface IRemoteFileSubSystem
parent
- 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 information
- indicates whether to query files, folders, both or some other typefileType
- - indicates whether to query files, folders, both or some other type
For the default list of available file types see IFileServiceContants
monitor
- the progress monitor
SystemMessageException
public IRemoteFile[] listRoots(IRemoteFileContext context, IProgressMonitor monitor) throws InterruptedException
IRemoteFileSubSystem
listRoots
in interface IRemoteFileSubSystem
InterruptedException
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 SystemMessageException
IRemoteFileSubSystem
upload
in interface IRemoteFileSubSystem
source
- 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.
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void upload(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws SystemMessageException
IRemoteFileSubSystem
upload
in interface IRemoteFileSubSystem
source
- the absolute path of the local copydestination
- remote file that represents the file on the serverencoding
- the encoding of the local copymonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void uploadMultiple(String[] sources, String[] srcEncodings, String[] remotePaths, String[] rmtEncodings, IProgressMonitor monitor) throws SystemMessageException
uploadMultiple
in interface IRemoteFileSubSystem
sources
- the absolute paths of the local copiessrcEncodings
- the encodings of the local copiesremotePaths
- remote files that represents the files on the serverrmtEncodings
- the encodings of the remote files.
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void uploadMultiple(String[] sources, IRemoteFile[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException
uploadMultiple
in interface IRemoteFileSubSystem
sources
- the absolute paths of the local copiesdestinations
- remote files that represent the files on the serverencodings
- the encodings of the local copiesmonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void download(IRemoteFile file, String localpath, String encoding, IProgressMonitor monitor) throws SystemMessageException
IRemoteFileSubSystem
download
in interface IRemoteFileSubSystem
file
- remote file that represents the file to be obtainedlocalpath
- the absolute path of the local fileencoding
- the encoding of the local filemonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void downloadMultiple(IRemoteFile[] sources, String[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException
downloadMultiple
in interface IRemoteFileSubSystem
sources
- remote files that represent the files to be obtaineddestinations
- the absolute paths of the local filesencodings
- the encodings of the local filesmonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws SystemMessageException
copy
in interface IRemoteFileSubSystem
sourceFolderOrFile
- 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 foldermonitor
- progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void copyBatch(IRemoteFile[] sourceFolderOrFiles, IRemoteFile targetFolder, IProgressMonitor monitor) throws SystemMessageException
If an error occurs during the copy of an item, this operation stops on that item and a SystemMessageException
is thrown.
Items copied before that item will remain copied. Items copied after that item will not be copied.
The item on which the error occurs will not be copied.
copyBatch
in interface IRemoteFileSubSystem
sourceFolderOrFiles
- The file or folder to copytargetFolder
- The folder to copy to.monitor
- progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor monitor)
IRemoteFileSubSystem
getParentFolder
in interface IRemoteFileSubSystem
folderOrFile
- folder or file to return parent of.monitor
- the progress monitor
public IRemoteFile createFile(IRemoteFile fileToCreate, IProgressMonitor monitor) throws SystemMessageException
IRemoteFileSubSystem
createFile
in interface IRemoteFileSubSystem
fileToCreate
- The object representing the file to be created.
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.IRemoteFileSubSystem.createFolders(IRemoteFile,IProgressMonitor)
public IRemoteFile createFolder(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException
IRemoteFileSubSystem
IFileService.createFolder(String, String, IProgressMonitor)
).
createFolder
in interface IRemoteFileSubSystem
folderToCreate
- The object representing the folder to be created.monitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.IRemoteFileSubSystem.createFolders(IRemoteFile, IProgressMonitor)
public IRemoteFile createFolders(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException
IRemoteFileSubSystem
createFolders
in interface IRemoteFileSubSystem
folderToCreate
- The object representing the folder to be created, along with its parents.monitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.IRemoteFileSubSystem.getParentFolder(IRemoteFile, IProgressMonitor)
public void delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws SystemMessageException
delete
in interface IRemoteFileSubSystem
folderOrFile
- represents the object to be deleted.monitor
- progressMonitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws SystemMessageException
If an error occurs during the deletion of an item, this operation stops on that item and a SystemMessageException
is thrown.
Items deleted before that item will remain deleted. Items specified after that item will not be deleted.
The item on which the error occurs will not be deleted.
Without an exception thrown in such cases, views may not be refreshed correctly to account for deleted resources.
deleteBatch
in interface IRemoteFileSubSystem
folderOrFiles
- represents the objects to be deleted.monitor
- progressMonitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void rename(IRemoteFile folderOrFile, String newName, IProgressMonitor monitor) throws SystemMessageException
rename
in interface IRemoteFileSubSystem
folderOrFile
- represents the object to be renamed.newName
- new name to give it.monitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws SystemMessageException
move
in interface IRemoteFileSubSystem
sourceFolderOrFile
- 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
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void setLastModified(IRemoteFile folderOrFile, long newDate, IProgressMonitor monitor) throws SystemMessageException
setLastModified
in interface IRemoteFileSubSystem
folderOrFile
- represents the object to be renamed.newDate
- new date, in milliseconds from epoch, to assign.monitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public void setReadOnly(IRemoteFile folderOrFile, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
setReadOnly
in interface IRemoteFileSubSystem
folderOrFile
- represents the object to be renamed.readOnly
- whether to set it to be read-only or notmonitor
- the progress monitor
SystemMessageException
- if an error occurs.
Typically this would be one of those in the
RemoteFileException
family.public ILanguageUtilityFactory getLanguageUtilityFactory()
IRemoteFileSubSystem
getLanguageUtilityFactory
in interface IRemoteFileSubSystem
public void setLanguageUtilityFactory(ILanguageUtilityFactory factory)
public void search(IHostSearchResultConfiguration searchConfig)
IRemoteFileSubSystem
search
in interface IRemoteFileSubSystem
searchConfig
- a search configuration.public void cancelSearch(IHostSearchResultConfiguration searchConfig)
cancelSearch
in interface IRemoteFileSubSystem
cancelSearch
in class RemoteFileSubSystem
searchConfig
- a search configuration.IRemoteFileSubSystem.cancelSearch(IHostSearchResultConfiguration)
public IHostSearchResultConfiguration createSearchConfiguration(IHostSearchResultSet resultSet, Object searchTarget, SystemSearchString searchString)
createSearchConfiguration
in interface IFileServiceSubSystem
public boolean canSwitchTo(ISubSystemConfiguration configuration)
SubSystem
canSwitchTo
in interface ISubSystem
canSwitchTo
in class SubSystem
configuration
- the configuration to which this subsystem may switch
ISubSystem.canSwitchTo(ISubSystemConfiguration)
protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfig)
SubSystem
internalSwitchSubSystemConfiguration
in class SubSystem
newConfig
- the configuration this subsystem should use from
this point.public Class getServiceType()
SubSystem
getServiceType
in interface ISubSystem
getServiceType
in class SubSystem
ISubSystem.getServiceType()
public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
SubSystem
IConnectorService
connect method finishes. This method should be
overridden if any initialization for the subsystem needs to occur at this
time.
The default implementation currently does nothing, but overriding methods should call super before doing any other work.
initializeSubSystem
in interface ISubSystem
initializeSubSystem
in class RemoteFileSubSystem
monitor
- a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.
SystemMessageException
- if an error occurs during initialization.public void uninitializeSubSystem(IProgressMonitor monitor)
SubSystem
uninitializeSubSystem
in interface ISubSystem
uninitializeSubSystem
in class RemoteFileSubSystem
monitor
- a progress monitor that can be used to show progress
during long-running operation. Cancellation is typically not
supported since it might leave the system in an inconsistent
state.public String getRemoteEncoding()
getRemoteEncoding
in interface IRemoteFileSubSystem
getRemoteEncoding
in class RemoteFileSubSystem
RemoteFileSubSystem.getRemoteEncoding()
public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException
null
. Defers to the file service. The method is basically another
way to do download.
getInputStream
in interface IRemoteFileSubSystem
remoteParent
- the absolute path of the parent.remoteFile
- the name of the remote file.isBinary
- true
if the file is a binary file, false
otherwise.monitor
- the progress monitor.
SystemMessageException
- if an error occurs.IRemoteFileSubSystem.getInputStream(java.lang.String,
java.lang.String, boolean,
org.eclipse.core.runtime.IProgressMonitor)
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException
getOutputStream(String, String, int, IProgressMonitor)
instead
null
.
getOutputStream
in interface IRemoteFileSubSystem
remoteParent
- the absolute path of the parent.remoteFile
- the name of the remote file.isBinary
- true
if the file is a binary file, false
otherwise.monitor
- the progress monitor.
SystemMessageException
- if an error occurs.public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException
null
.
getOutputStream
in interface IRemoteFileSubSystem
remoteParent
- the absolute path of the parent.remoteFile
- the name of the remote file.options
- bit wise or of option constants. Valid constants are IFileService.APPEND
, IFileService.TEXT_MODE
, and IFileService.NONE
monitor
- the progress monitor.
SystemMessageException
- if an error occurs.public boolean supportsEncodingConversion()
supportsEncodingConversion
in interface IRemoteFileSubSystem
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |