|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEObjectImpl
com.ibm.etools.systems.subsystems.impl.SubSystemImpl
com.ibm.etools.systems.subsystems.impl.RemoteFileSubSystemImpl
Nested Class Summary |
---|
Nested classes inherited from class com.ibm.etools.systems.subsystems.impl.SubSystemImpl |
---|
SubSystemImpl.ConnectRunnable, SubSystemImpl.DisplayErrorMessageRunnable |
Field Summary | |
---|---|
protected HashMap |
_cachedRemoteFiles
|
protected ArrayList |
_searchHistory
|
static String |
copyright
|
protected RemoteFileFilterString |
currFilterString
|
protected RemoteFileContext |
DEFAULT_CONTEXT
|
protected RemoteFileContext |
DEFAULT_CONTEXT_NOFILTERSTRING
|
protected RemoteFileFilterString |
FILTERSTRING_LISTROOTS
|
protected NamePatternMatcher |
folderNameMatcher
|
protected static String |
HOME_FOLDER_EDEFAULT
The default value of the ' Home Folder ' attribute |
protected String |
homeFolder
|
protected IMatcher |
matcher
|
String |
osCmdShell
|
String |
osName
|
boolean |
osVarsSet
|
boolean |
osWindows
|
boolean |
osWindows95
|
boolean |
osWindowsNT
|
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectResolver |
---|
Copyright |
Constructor Summary | |
---|---|
RemoteFileSubSystemImpl()
Default constructor. |
Method Summary | |
---|---|
protected boolean |
accept(String name,
boolean isFile)
Method to decide if a given folder or file name matches the present criteria. |
protected void |
addResolvedFilterStringObjects(Vector allChildrenSoFar,
Object[] childrenForThisFilterString,
String[] allFilterStrings,
int currFilterStringIndex)
Overridable parent extension point for adding the results of a filter string to the overall list of results. |
void |
cacheRemoteFile(IRemoteFile file)
Store the IRemoteFile in a hashmap to quick subsequent retrieval |
void |
cacheRemoteFile(IRemoteFile file,
String path)
Store the IRemoteFile in a hashmap to quick subsequent retrieval |
boolean |
checkForCancel()
Long running list processing calls this method to check for a user-cancel event. |
void |
communicationsStateChange(CommunicationsEvent e)
This method is invoked whenever the communications state is invoked immediately before and after the state of the communications changes. |
void |
copy(File source,
IRemoteFile destination,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copy(File source,
IRemoteFile destination,
String encoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copy(IRemoteFile source,
File destination,
IProgressMonitor monitor)
Get the remote file and save it locally. |
void |
copy(IRemoteFile source,
File destination,
String encoding,
IProgressMonitor monitor)
Get the remote file and save it locally. |
void |
copy(IRemoteFile source,
String destination,
IProgressMonitor monitor)
Get the remote file and save it locally. |
void |
copy(String source,
IRemoteFile destination,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copyLocalToRemote(String source,
String destination,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copyLocalToRemote(String source,
String srcEncoding,
String remotePath,
String rmtEncoding,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copyUTF8(File source,
IRemoteFile destination,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
void |
copyUTF8(IRemoteFile source,
File destination,
IProgressMonitor monitor)
Get the remote file and save it locally. |
void |
copyUTF8(IRemoteFile source,
String destination,
IProgressMonitor monitor)
Get the remote file and save it locally. |
void |
copyUTF8(String source,
IRemoteFile destination,
IProgressMonitor monitor)
Put the local copy of the remote file back to the remote location. |
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. |
boolean |
delete(IRemoteFile folderOrFile)
Delete the given remote file or folder. |
boolean |
doesFilterStringListContentsOf(SystemFilterString filterString,
String remoteObjectAbsoluteName)
Return true if the given filter string lists the contents of the given remote object. |
boolean |
doesFilterStringMatch(String filterString,
String remoteObjectAbsoluteName,
boolean caseSensitive)
Return true if the given remote object name will pass the filtering criteria for the given filter string. |
Object |
eGet(EStructuralFeature eFeature,
boolean resolve)
|
NotificationChain |
eInverseAdd(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
|
NotificationChain |
eInverseRemove(InternalEObject otherEnd,
int featureID,
Class baseClass,
NotificationChain msgs)
|
boolean |
eIsSet(EStructuralFeature eFeature)
Private. |
void |
eSet(EStructuralFeature eFeature,
Object newValue)
Private. |
protected EClass |
eStaticClass()
|
void |
eUnset(EStructuralFeature eFeature)
Private. |
IRemoteFile |
getCachedRemoteFile(String path)
Returns the cached remote file with the specified path. |
protected RemoteFileContext |
getContext(IRemoteFile parent)
|
protected RemoteFileContext |
getContext(IRemoteFile parent,
RemoteFileFilterString rffs)
|
protected RemoteFileFilterString |
getCurrentFilterString()
|
protected RemoteFileContext |
getDefaultContext()
|
protected RemoteFileContext |
getDefaultContextNoFilterString()
|
protected RemoteFileFilterString |
getFilterStringListRoots()
|
protected String |
getFirstParentFilterString(Object parent)
Called by parent when we defer getting a filter string until later, where we query it from the parent. |
String |
getHomeFolder()
|
ILanguageUtilityFactory |
getLanguageUtilityFactory()
Returns null . |
String |
getLineSeparator()
Return as a string the line separator. |
InetAddress |
getLocalAddress()
Returns the address found by calling InetAddress.getLocalHost() . |
Object |
getObjectWithAbsoluteName(String key)
Return the object within the subsystem that corresponds to the specified unique ID. |
IRemoteFile |
getParentFolder(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder object. |
String |
getParentFolderName(IRemoteFile folderOrFile)
Given a folder or file, return its parent folder name, fully qualified |
RemoteFileSubSystemFactory |
getParentRemoteFileSubSystemFactory()
Return parent subsystem factory, cast to a RemoteFileSubSystemFactory Assumes SubSystemImpl.setParentSubSystemFactory(SubSystemFactory) has already been called. |
String |
getPathSeparator()
Return in string format the character used to separate paths. |
char |
getPathSeparatorChar()
Return in char format the character used to separate paths. |
PropertyPage |
getPropertyPage(Composite parent)
Return the single property page to show in the tabbed notebook for the for SubSystem property of the parent Connection. |
IRemoteFile |
getRemoteFileObject(IRemoteFile parent,
String folderOrFileName)
Given a un-qualified file or folder name, and its parent folder object, return an IRemoteFile object for the file. |
IRemoteFile |
getRemoteFileObject(String folderOrFileName)
Given a fully qualified file or folder name, return an IRemoteFile object for it. |
IRemoteSearchResult |
getRemoteSearchResultObject(String key)
Given a key, returns a search result object for it. |
String |
getSeparator()
Return in string format the character used to separate folders. |
char |
getSeparatorChar()
Return in character format the character used to separate folders. |
Object |
getTargetForFilter(SystemFilterReference filterRef)
Returns the parent object associated with a filter reference. |
int |
getUnusedPort()
Returns -1 by default. |
protected Object[] |
internalResolveFilterString(IProgressMonitor monitor,
Object parent,
String filterString)
Actually resolve a relative filter string. |
protected Object[] |
internalResolveFilterString(IProgressMonitor monitor,
String filterString)
Actually resolve an absolute filter string. |
Object[] |
internalResolveFilterStrings(IProgressMonitor monitor,
String[] filterStrings)
Resolves filter strings. |
protected Object[] |
internalResolveOneFilterString(IProgressMonitor monitor,
Object parent,
RemoteFileFilterString fs,
boolean sort)
Do one filter string relative resolve |
boolean |
isCaseSensitive()
Return true if file names are case-sensitive. |
boolean |
isPassiveCommunicationsListener()
This method determines if the communications listener is a passive or active listener. |
IRemoteFile[] |
listFiles(IRemoteFile parent)
Return a list of all remote files in the given parent folder on the remote system |
IRemoteFile[] |
listFiles(IRemoteFile parent,
String fileNameFilter)
Return a list of remote files in the given folder, which match the given name pattern. |
IRemoteFile[] |
listFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context)
Return a list of remote files in the given folder, which match the given name pattern. |
IRemoteFile[] |
listFolders(IRemoteFile parent)
Return a list of all remote folders in the given parent folder on the remote system |
IRemoteFile[] |
listFolders(IRemoteFile parent,
String fileNameFilter)
Return a full list of remote folders in the given parent folder on the remote system. |
IRemoteFile[] |
listFolders(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context)
Return a subsetted list of remote folders in the given parent folder on the remote system. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent)
Return a list of all remote folders and files in the given folder. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter)
Return a list of remote folders and files in the given folder. |
IRemoteFile[] |
listFoldersAndFiles(IRemoteFile parent,
String fileNameFilter,
IRemoteFileContext context)
Return a list of remote folders and files in the given folder. |
IRemoteFile[] |
listRoots()
Return a list of roots/drives on the remote system |
IRemoteFile[] |
listRoots(IRemoteFileContext context)
Return a list of roots/drives on the remote system. |
boolean |
move(IRemoteFile sourceFolderOrFile,
IRemoteFile targetFolder,
String newName)
Move a file or folder to a new target parent folder. |
protected void |
removeCachedRemoteFile(IRemoteFile file)
|
protected void |
removeCachedRemoteFile(String path)
|
boolean |
rename(IRemoteFile folderOrFile,
String newName)
Rename the given remote file or folder. |
void |
runLocalCommand(String cmd)
|
static int |
runLocalCommand(String cmd,
Vector lines)
helper method to run an external command |
void |
setHomeFolder(String newHomeFolder)
|
boolean |
setLastModified(IRemoteFile folderOrFile,
long newDate)
Set the last modified date for the given file or folder. |
protected void |
setListValues(int includeFilesOrFolders,
String nameFilter)
Method to set variables to affect the folder content subsetting. |
protected void |
setListValues(int includeFilesOrFolders,
String folderNameFilter,
String fileNameFilter)
Overloaded method to set variables to affect the folder content subsetting, when there is separate filters for both folder names and filter names. |
boolean |
setReadOnly(IRemoteFile folderOrFile)
Set a file to readonly. |
Object[] |
sortResolvedFilterStringObjects(Object[] children)
Sort the concatenated list of all objects returned by resolving one or more filter strings. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.etools.systems.subsystems.RemoteFileSubSystem |
---|
cancelSearch, copy, copy, copy, copy, getRemoteEncoding, getRemoteSearchResultConfigurationFactory, search |
Field Detail |
protected static final String HOME_FOLDER_EDEFAULT
Home Folder
' attribute.
getHomeFolder()
public static final String copyright
public boolean osVarsSet
public boolean osWindows
public boolean osWindows95
public boolean osWindowsNT
public String osName
public String osCmdShell
protected IMatcher matcher
protected NamePatternMatcher folderNameMatcher
protected RemoteFileFilterString currFilterString
protected RemoteFileFilterString FILTERSTRING_LISTROOTS
protected RemoteFileContext DEFAULT_CONTEXT
protected RemoteFileContext DEFAULT_CONTEXT_NOFILTERSTRING
protected ArrayList _searchHistory
protected HashMap _cachedRemoteFiles
protected String homeFolder
Constructor Detail |
public RemoteFileSubSystemImpl()
SubSystemImpl.setParentSubSystemFactory(SubSystemFactory)
.
Method Detail |
protected EClass eStaticClass()
eStaticClass
in class SubSystemImpl
public RemoteFileSubSystemFactory getParentRemoteFileSubSystemFactory()
SubSystemImpl.setParentSubSystemFactory(SubSystemFactory)
has already been called.
getParentRemoteFileSubSystemFactory
in interface RemoteFileSubSystem
public boolean isCaseSensitive()
isCaseSensitive
in interface RemoteFileSubSystem
public boolean checkForCancel()
protected RemoteFileFilterString getCurrentFilterString()
protected RemoteFileFilterString getFilterStringListRoots()
protected RemoteFileContext getDefaultContext()
protected RemoteFileContext getDefaultContextNoFilterString()
protected RemoteFileContext getContext(IRemoteFile parent)
protected RemoteFileContext getContext(IRemoteFile parent, RemoteFileFilterString rffs)
public String getSeparator()
getParentRemoteFileSubSystemFactory()
.getSeparator()
getSeparator
in interface RemoteFileSubSystem
public char getSeparatorChar()
getParentRemoteFileSubSystemFactory()
.getSeparatorChar()
getSeparatorChar
in interface RemoteFileSubSystem
public String getPathSeparator()
getParentRemoteFileSubSystemFactory()
.getPathSeparator()
getPathSeparator
in interface RemoteFileSubSystem
public char getPathSeparatorChar()
getParentRemoteFileSubSystemFactory()
.getPathSeparatorChar()
getPathSeparatorChar
in interface RemoteFileSubSystem
public String getLineSeparator()
getParentRemoteFileSubSystemFactory()
.getLineSeparator()
getLineSeparator
in interface RemoteFileSubSystem
public PropertyPage getPropertyPage(Composite parent)
getPropertyPage
in interface SubSystem
getPropertyPage
in class SubSystemImpl
public boolean doesFilterStringMatch(String filterString, String remoteObjectAbsoluteName, boolean caseSensitive)
Subclasses need to override this. If in doubt, return true.
There is a hack here if you want to tell us the absolute name is that of a folder: append " -folder" to the name!
doesFilterStringMatch
in interface SubSystem
doesFilterStringMatch
in class SubSystemImpl
public boolean doesFilterStringListContentsOf(SystemFilterString filterString, String remoteObjectAbsoluteName)
This should only return true if the filter string directly lists the contents of the given object, versus indirectly.
Subclasses should override this.
doesFilterStringListContentsOf
in interface SubSystem
doesFilterStringListContentsOf
in class SubSystemImpl
public Object[] internalResolveFilterStrings(IProgressMonitor monitor, String[] filterStrings) throws InvocationTargetException, InterruptedException
#internalResolveFilterString(IProgressMontior, String)
.
If the result for each filter string is a SystemMessage (e.g. an error), then the messages are returned.
If the result for any filter string is not a message (i.e. an array of children), then the children are returned,
and the messages are not. This avoids mixing chuldren as a result of successful resolution of a filter string with
messages that might result for other filter strings.
So the returned results are always the successful results, or messages (never a mix of the two).
internalResolveFilterStrings
in class SubSystemImpl
monitor
- the progress monitor we are running underfilterStrings
- array of filter patterns for objects to return.
InvocationTargetException
InterruptedException
SubSystemImpl.internalResolveFilterStrings(org.eclipse.core.runtime.IProgressMonitor, java.lang.String[])
protected void addResolvedFilterStringObjects(Vector allChildrenSoFar, Object[] childrenForThisFilterString, String[] allFilterStrings, int currFilterStringIndex)
Can be used to filter out redundant entries in the concatenated list, if this is desired.
addResolvedFilterStringObjects
in class SubSystemImpl
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString) throws InvocationTargetException, InterruptedException
internalResolveFilterString
in class SubSystemImpl
InvocationTargetException
InterruptedException
SubSystemImpl.internalResolveFilterString(IProgressMonitor,String)
public Object[] sortResolvedFilterStringObjects(Object[] children)
sortResolvedFilterStringObjects
in class SubSystemImpl
protected String getFirstParentFilterString(Object parent)
getFirstParentFilterString
in class SubSystemImpl
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString) throws InvocationTargetException, InterruptedException
As per IRunnableWithProgress rules:
internalResolveFilterString
in class SubSystemImpl
InvocationTargetException
InterruptedException
protected Object[] internalResolveOneFilterString(IProgressMonitor monitor, Object parent, RemoteFileFilterString fs, boolean sort) throws InvocationTargetException, InterruptedException
InvocationTargetException
InterruptedException
public IRemoteFile[] listRoots() throws InterruptedException
listRoots
in interface RemoteFileSubSystem
InterruptedException
public IRemoteFile[] listRoots(IRemoteFileContext context) throws InterruptedException
InterruptedException
public IRemoteFile[] listFolders(IRemoteFile parent)
listFolders
in interface RemoteFileSubSystem
parent
- The parent folder to list folders inpublic IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter)
listFolders
in interface RemoteFileSubSystem
parent
- The parent folder to list folders infileNameFilter
- The name pattern for subsetting the file list when this folder is subsequently expandedpublic IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
parent
- 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 informationpublic IRemoteFile[] listFiles(IRemoteFile parent)
listFiles
in interface RemoteFileSubSystem
parent
- The parent folder to list files inpublic IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter)
listFiles
in interface RemoteFileSubSystem
parent
- The parent folder to list files infileNameFilter
- The name pattern to subset the list by, or null to return all files.public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
parent
- 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 informationpublic IRemoteFile[] listFoldersAndFiles(IRemoteFile parent)
listFoldersAndFiles
in interface RemoteFileSubSystem
parent
- The parent folder to list folders and files inpublic IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter)
The files part of the list is subsetted by the given file name filter. It can be null for no subsetting.
listFoldersAndFiles
in interface RemoteFileSubSystem
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.public IRemoteFile[] listFoldersAndFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
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) noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point
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 informationpublic IRemoteFile getParentFolder(IRemoteFile folderOrFile)
getParentFolder
in interface RemoteFileSubSystem
folderOrFile
- folder or file to return parent of.public String getParentFolderName(IRemoteFile folderOrFile)
getParentFolderName
in interface RemoteFileSubSystem
folderOrFile
- folder or file to return parent of.public IRemoteFile getRemoteFileObject(String folderOrFileName) throws SystemMessageException
getRemoteFileObject
in interface RemoteFileSubSystem
folderOrFileName
- Fully qualified folder or file name
SystemMessageException
public IRemoteSearchResult getRemoteSearchResultObject(String key) throws SystemMessageException
RemoteFileSubSystem
getRemoteSearchResultObject
in interface RemoteFileSubSystem
key
- the key that uniquely identifies a search result.
SystemMessageException
RemoteFileSubSystem.getRemoteSearchResultObject(java.lang.String)
public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName) throws SystemMessageException
getRemoteFileObject
in interface RemoteFileSubSystem
parent
- Folder containing the folder or filefolderOrFileName
- Un-qualified folder or file name
SystemMessageException
public Object getObjectWithAbsoluteName(String key) throws Exception
getObjectWithAbsoluteName
in interface IRemoteObjectResolver
getObjectWithAbsoluteName
in class SubSystemImpl
Exception
public IRemoteFile createFile(IRemoteFile fileToCreate) throws RemoteFileSecurityException, RemoteFileIOException
createFile
in interface RemoteFileSubSystem
fileToCreate
- The object representing the file to be created.
RemoteFileSecurityException
RemoteFileIOException
createFolders(IRemoteFile)
public IRemoteFile createFolder(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException
createFolder
in interface RemoteFileSubSystem
folderToCreate
- The object representing the folder to be created.
RemoteFileSecurityException
RemoteFileIOException
createFolders(IRemoteFile)
public IRemoteFile createFolders(IRemoteFile folderToCreate) throws RemoteFileSecurityException, RemoteFileIOException
createFolders
in interface RemoteFileSubSystem
folderToCreate
- The object representing the folder to be created, along with its parents.
RemoteFileSecurityException
RemoteFileIOException
getParentFolder(IRemoteFile)
public boolean delete(IRemoteFile folderOrFile) throws RemoteFolderNotEmptyException, RemoteFileSecurityException, RemoteFileIOException
delete
in interface RemoteFileSubSystem
folderOrFile
- represents the object to be deleted.
RemoteFolderNotEmptyException
RemoteFileSecurityException
RemoteFileIOException
public boolean rename(IRemoteFile folderOrFile, String newName) throws RemoteFileIOException, RemoteFileSecurityException
rename
in interface RemoteFileSubSystem
folderOrFile
- represents the object to be renamed.newName
- new name to give it.
RemoteFileIOException
RemoteFileSecurityException
public boolean move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName) throws RemoteFileSecurityException, RemoteFileIOException
move
in interface RemoteFileSubSystem
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 folder
RemoteFileSecurityException
RemoteFileIOException
public boolean setLastModified(IRemoteFile folderOrFile, long newDate) throws RemoteFileIOException, RemoteFileSecurityException
setLastModified
in interface RemoteFileSubSystem
folderOrFile
- represents the object to be renamed.newDate
- new date, in milliseconds from epoch, to assign.
RemoteFileIOException
RemoteFileSecurityException
public boolean setReadOnly(IRemoteFile folderOrFile) throws RemoteFileSecurityException, RemoteFileIOException
setReadOnly
in interface RemoteFileSubSystem
folderOrFile
- represents the object to be renamed.
RemoteFileSecurityException
RemoteFileIOException
protected void setListValues(int includeFilesOrFolders, String nameFilter)
includeFilesOrFolders
- A constant from IFileConstants
nameFilter
- The pattern to filter the file or folder names by. Can be null to include all.protected void setListValues(int includeFilesOrFolders, String folderNameFilter, String fileNameFilter)
includeFilesOrFolders
- A constant from IFileConstants
folderNameFilter
- The pattern to filter the folder names by. Can be null to include all foldersprotected boolean accept(String name, boolean isFile)
setListValues(int, String)
or setListValues(int, String, String)
name
- The file or folder name to testisFile
- true if this is a file name, false if it is a folder name.
public void copy(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- remote file that represents the file to be obtaineddestination
- the absolute path of the local filemonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copyUTF8(IRemoteFile source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyUTF8
in interface RemoteFileSubSystem
source
- remote file that represents the file to be obtaineddestination
- the absolute path of the local filemonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copy(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- remote file that represents the file to be obtaineddestination
- the local filemonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copy(IRemoteFile source, File destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- remote file that represents the file to be obtaineddestination
- the local fileencoding
- the encoding of the local filemonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copyUTF8(IRemoteFile source, File destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyUTF8
in interface RemoteFileSubSystem
source
- remote file that represents the file to be obtaineddestination
- the local filemonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copy(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- the absolute path of the local copydestination
- remote file that represents the file on the servermonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copyLocalToRemote(String source, String destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyLocalToRemote
in interface RemoteFileSubSystem
source
- the absolute path of the local copydestination
- remote file that represents the file on the servermonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copyLocalToRemote(String source, String srcEncoding, String remotePath, String rmtEncoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyLocalToRemote
in interface RemoteFileSubSystem
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.
RemoteFileSecurityException
RemoteFileIOException
public void copyUTF8(String source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyUTF8
in interface RemoteFileSubSystem
source
- the absolute path of the local copydestination
- remote file that represents the file on the servermonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copy(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- the local copydestination
- remote file that represents the file on the servermonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copy(File source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copy
in interface RemoteFileSubSystem
source
- the local copydestination
- remote file that represents the file on the serverencoding
- the encoding of the local copymonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void copyUTF8(File source, IRemoteFile destination, IProgressMonitor monitor) throws RemoteFileSecurityException, RemoteFileIOException
copyUTF8
in interface RemoteFileSubSystem
source
- the local copydestination
- remote file that represents the file on the servermonitor
- the progress monitor
RemoteFileSecurityException
RemoteFileIOException
public void runLocalCommand(String cmd) throws Exception
Exception
public static int runLocalCommand(String cmd, Vector lines) throws Exception
Exception
public String getHomeFolder()
getHomeFolder
in interface RemoteFileSubSystem
public void setHomeFolder(String newHomeFolder)
setHomeFolder
in interface RemoteFileSubSystem
newHomeFolder
- The new value of the HomeFolder attributepublic void cacheRemoteFile(IRemoteFile file, String path)
file
- the filepublic void cacheRemoteFile(IRemoteFile file)
file
- the filepublic IRemoteFile getCachedRemoteFile(String path)
path
-
protected void removeCachedRemoteFile(IRemoteFile file)
protected void removeCachedRemoteFile(String path)
public void communicationsStateChange(CommunicationsEvent e)
ICommunicationsListener
communicationsStateChange
in interface ICommunicationsListener
public boolean isPassiveCommunicationsListener()
ICommunicationsListener
isPassiveCommunicationsListener
in interface ICommunicationsListener
ICommunicationsListener.isPassiveCommunicationsListener()
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
eInverseAdd
in class SubSystemImpl
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
eInverseRemove
in class SubSystemImpl
public Object eGet(EStructuralFeature eFeature, boolean resolve)
eGet
in class SubSystemImpl
public boolean eIsSet(EStructuralFeature eFeature)
SubSystemImpl
eIsSet
in class SubSystemImpl
public void eSet(EStructuralFeature eFeature, Object newValue)
SubSystemImpl
eSet
in class SubSystemImpl
public void eUnset(EStructuralFeature eFeature)
SubSystemImpl
eUnset
in class SubSystemImpl
public String toString()
toString
in class SubSystemImpl
public ILanguageUtilityFactory getLanguageUtilityFactory()
null
. Subclasses should override if necessary.
getLanguageUtilityFactory
in interface RemoteFileSubSystem
RemoteFileSubSystem.getLanguageUtilityFactory()
public int getUnusedPort()
getUnusedPort
in interface RemoteFileSubSystem
RemoteFileSubSystem.getUnusedPort()
public InetAddress getLocalAddress()
InetAddress.getLocalHost()
. If that
call returns the local loopback address, it returns null
.
Subclasses should reimplement to handle cases where systems have multiple IP addresses due
to multiple network cards or VPN. This method should return an address
that is usable from the remote system to connect back to the local system.
getLocalAddress
in interface RemoteFileSubSystem
null
if
no address can be resolved.RemoteFileSubSystem.getLocalAddress()
public Object getTargetForFilter(SystemFilterReference filterRef)
SubSystem
getTargetForFilter
in interface SubSystem
getTargetForFilter
in class SubSystemImpl
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |