Remote Systems
v6.4.1

com.ibm.etools.systems.files
Class RemotePath

java.lang.Object
  extended bycom.ibm.etools.systems.files.RemotePath
All Implemented Interfaces:
IRemotePath

public class RemotePath
extends Object
implements IRemotePath

Class representing a remote path.


Field Summary
protected  String absolutePath
           
protected  String connectionName
           
protected  String profileName
           
 
Constructor Summary
RemotePath(String fullyQualifiedPath)
          Sets the profile name, connection name and absolute path on the remote machine from the fully qualified path.
RemotePath(String profileName, String connectionName, String absolutePath)
          Constructor.
 
Method Summary
 IRemotePath addFileExtension(String extension)
          Returns a new path with the file extension added to this path.
 String getAbsolutePath()
          Returns the absolute path.
 String getConnectionName()
          Returns the connection name.
 String getFileExtension()
          Returns the file extension for the path.
 String getFullyQualifiedPath()
          Returns the fully qualified path.
 String getProfileName()
          Returns the profile name.
 boolean isVirtual()
          Returns whether this path represents a virtual file.
 IRemotePath removeFileExtension()
          Returns a new path with the file extension removed from this path.
protected  void setAbsolutePath(String absolutePath)
           
protected  void setConnectionName(String connectionName)
           
protected  void setProfileName(String profileName)
           
 IRemoteFile toRemoteFile()
          Returns the remote file represented by the remote path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profileName

protected String profileName

connectionName

protected String connectionName

absolutePath

protected String absolutePath
Constructor Detail

RemotePath

public RemotePath(String profileName,
                  String connectionName,
                  String absolutePath)
Constructor.

Parameters:
profileName - the profile name.
connectionName - the connection name.
absolutePath - the absolute path.

RemotePath

public RemotePath(String fullyQualifiedPath)
Sets the profile name, connection name and absolute path on the remote machine from the fully qualified path. The fully qualified path is the absolute path on the remote machine, prefixed by profile name and connection name. It must be of the form "profileName.connectionName:absolutePath".

Method Detail

setProfileName

protected void setProfileName(String profileName)
See Also:
com.ibm.etools.systems.files.IRemotePath#setProfileName(java.lang.String)

setConnectionName

protected void setConnectionName(String connectionName)
See Also:
com.ibm.etools.systems.files.IRemotePath#setConnectionName(java.lang.String)

setAbsolutePath

protected void setAbsolutePath(String absolutePath)
See Also:
com.ibm.etools.systems.files.IRemotePath#setAbsolutePath(java.lang.String)

getProfileName

public String getProfileName()
Description copied from interface: IRemotePath
Returns the profile name.

Specified by:
getProfileName in interface IRemotePath
Returns:
the profile name.
See Also:
IRemotePath.getProfileName()

getConnectionName

public String getConnectionName()
Description copied from interface: IRemotePath
Returns the connection name.

Specified by:
getConnectionName in interface IRemotePath
Returns:
the connection name.
See Also:
IRemotePath.getConnectionName()

getAbsolutePath

public String getAbsolutePath()
Description copied from interface: IRemotePath
Returns the absolute path.

Specified by:
getAbsolutePath in interface IRemotePath
Returns:
the absolute path.
See Also:
IRemotePath.getAbsolutePath()

getFullyQualifiedPath

public String getFullyQualifiedPath()
Description copied from interface: IRemotePath
Returns the fully qualified path. The fully qualified path is the absolute path on the remote machine, prefixed by profile name and connection name. It is of the form "profileName.connectionName:absolutePath". If the profile name, connection name or absolute path is null, then the fully qualified path will also be null.

Specified by:
getFullyQualifiedPath in interface IRemotePath
Returns:
the fully qualified path.
See Also:
IRemotePath.getFullyQualifiedPath()

getFileExtension

public String getFileExtension()
Description copied from interface: IRemotePath
Returns the file extension for the path. The file extension portion is defined as the string following the last period (".") character in the path.

Specified by:
getFileExtension in interface IRemotePath
Returns:
the extension, or null if none.
See Also:
IRemotePath.getFileExtension()

addFileExtension

public IRemotePath addFileExtension(String extension)
Description copied from interface: IRemotePath
Returns a new path with the file extension added to this path. The file extension portion is defined as the string following the last period (".") character in the path. If this path ends with a separator, i.e. '/' or '\\', then this path is returned. The given extension should not include a leading ".".

Specified by:
addFileExtension in interface IRemotePath
Parameters:
extension - the file extension to append to the path.
Returns:
the new path.
See Also:
IRemotePath.addFileExtension(java.lang.String)

removeFileExtension

public IRemotePath removeFileExtension()
Description copied from interface: IRemotePath
Returns a new path with the file extension removed from this path. The file extension portion is defined as the string following the last period (".") character in the path. If this path ends with a separator, i.e. '/' or '\\', or if it does not have an extension, then this path is returned. The given extension should not include a leading ".".

Specified by:
removeFileExtension in interface IRemotePath
See Also:
com.ibm.etools.systems.files.IRemotePath#removeFileExtension(java.lang.String)

isVirtual

public boolean isVirtual()
Description copied from interface: IRemotePath
Returns whether this path represents a virtual file.

Specified by:
isVirtual in interface IRemotePath
Returns:
true if the path represents a virtual file, false otherwise.
See Also:
IRemotePath.isVirtual()

toRemoteFile

public IRemoteFile toRemoteFile()
Description copied from interface: IRemotePath
Returns the remote file represented by the remote path.

Specified by:
toRemoteFile in interface IRemotePath
Returns:
the remote file.
See Also:
IRemotePath.toRemoteFile()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.