"
prefix. Such ultimately-qualified names are known as IRemoteFilePath names.
Base parent class that supplies all of the
functionality required by the IRemoteFile interface.
This base functionality is possible because this is a
read-only representation of a remote file ... all actions
like delete and rename are handled by the subsystem.
For all this base functionality to work, the subsystem
that creates this object must call the setter methods to
prefill this object with the core required information:
Method Summary |
boolean |
canRead()
Returns true if the application can read this file. |
boolean |
canWrite()
Returns true if the application can write to this file. |
void |
clearCache()
|
int |
compareTo(Object other)
Compare one remote file to another. |
protected boolean |
containsFilterKey(HashMap filters,
String filter)
|
void |
copyContentsTo(IRemoteContainer target)
Copies the persistable contents from this one to another one |
boolean |
exists()
Returns true if this folder or file actually exists. |
String |
getAbsolutePath()
Get fully qualified name: root plus path plus name. |
String |
getAbsolutePathPlusConnection()
Get fully qualified connection and file name: connection:\path\file
Note the separator character between the profile name and the connection name is always '.'
|
Object |
getAdapter(Class adapterType)
This is the method required by the IAdaptable interface.
|
RemoteFileFilterString[] |
getAllFilterStrings()
If this is a folder, it is possible that it is listed as part of a multiple filter string
filter. |
IFile |
getCachedCopy()
Return the cached copy of this remote file. |
String |
getCanonicalPath()
Returns the canonical path of the remote file. |
String |
getClassification()
Returns the classification of this file. |
String |
getComment()
|
long |
getCompressedSize()
|
String |
getCompressionMethod()
|
double |
getCompressionRatio()
|
String |
getContainingArchiveFullName()
|
Object[] |
getContents(ISystemContentsType contentsType)
Returns all the contents of the object (combining results of all filters |
Object[] |
getContents(ISystemContentsType contentsType,
String filter)
Returns the contents of the object. |
IRemoteFileContext |
getContext()
Return the context associated with this remote file |
long |
getExpandedSize()
|
String |
getExtension()
Return the extension part of a file name.
|
Object |
getFile()
Get the object. |
File |
getFileWrapper()
Return an object extending java.io.File and proxing this file.
|
RemoteFileFilterString |
getFilterString()
Return the filter string resolved to get this object |
String |
getLabel()
Get the display name for this file. |
long |
getLastModified()
Returns the time (in milliseconds since epoch) this file was last modified. |
Date |
getLastModifiedDate()
Return the last modified time as a Date object. |
long |
getLength()
Returns the length, in bytes, of this file. |
String |
getLineSeparator()
Return as a string the line separator character values |
String |
getLocalAbsolutePath()
|
String |
getName()
Get unqualified file name. |
String |
getParent()
Get fully qualified path and name of folder containing this file or folder.
|
String |
getParentName()
Get the unqualified name of the parent directory containing this file or folder.
|
String |
getParentNoRoot()
Get fully qualified path and name of folder containing this file or folder, minus the root.
|
IRemoteFile |
getParentRemoteFile()
Return the parent remote file object expanded to get this object, or null if no such parent |
RemoteFileSubSystem |
getParentRemoteFileSubSystem()
Return the parent subsystem |
RemoteFileSubSystemFactory |
getParentRemoteFileSubSystemFactory()
Return the parent subsystem factory |
Object[] |
getProperties(String[] keys)
Returns the value of the properties with the given keys. |
Object |
getProperty(String key)
Returns the value of the property with the given key. |
String |
getRoot()
Get the root part of the name.
|
String |
getSeparator()
Return the separator character for this file system, as a string: "\" or "/".
|
char |
getSeparatorChar()
Return the separator character for this file system: \ or /.
|
SystemConnection |
getSystemConnection()
Return the connection this remote file is from. |
boolean |
hasContents(ISystemContentsType contentsType)
Returns whether the object has contents of a particular type. |
boolean |
hasContents(ISystemContentsType contentsType,
String filter)
Returns whether the object has contents of a particular type associated with the specified filter string. |
boolean |
isAncestorOf(IRemoteFile file)
Note: if this remoteFile is the same as the file passed
as parameter, then this method returns true. |
boolean |
isArchive()
Returns true if this represents an archive file, versues a non-archive file |
boolean |
isBinary()
Returns true if this is a binary file |
boolean |
isDescendantOf(IRemoteFile file)
Note: if this remoteFile is the same as the file passed
as parameter, then this method returns true. |
boolean |
isDirectory()
Returns true if this represents a folder (eg: c:\\folder) |
boolean |
isExecutable()
Returns whether the file is executable or not. |
boolean |
isFile()
Returns true if this represents a file, versus a root or folder |
boolean |
isHidden()
Returns true if this is a hidden file. |
boolean |
isLink()
Returns whether the file is a symbolic link or not. |
boolean |
isLocal()
|
boolean |
isPropertyStale(String key)
Returns whether the property with the given key is stale. |
boolean |
isRoot()
Returns true if this represents a root folder (eg: c:\\ or /). |
boolean |
isStale()
Indicates whether the cached object is stale |
boolean |
isText()
Returns true if this is a text file |
boolean |
isUnix()
Return if this is a file on Unix, versus windows say
Queries it from the subsystem factory. |
boolean |
isVirtual()
Returns true if this is a virtual file. |
boolean |
isVirtualFile()
|
boolean |
isVirtualFolder()
|
void |
markAllPropertiesStale()
Marks all properties as stale. |
void |
markPropertyStale(String key)
Marks the property with the given key as stale. |
void |
markStale(boolean isStale)
Marks the object as stale or not |
void |
replaceContent(Object oldObject,
Object newObject)
|
void |
setAbsolutePath(String fullyQualifiedName,
String rootPart,
boolean isRoot,
boolean isDirectory)
One of four internal methods called by the subsystem factory methods, or by the
constructor. |
void |
setCanRead(boolean can)
Internal method called by the subsystem.
|
void |
setCanWrite(boolean can)
Internal method called by the subsystem.
|
void |
setClassification(String classification)
|
void |
setContainingArchiveFullName(String string)
|
void |
setContents(ISystemContentsType contentsType,
String filter,
Object[] con)
Sets the contents of this object that match a particular filter |
void |
setExists(boolean exists)
Internal method called by the subsystem.
|
void |
setFile(Object obj)
Internal method called by the subsystem. |
void |
setFilterString(RemoteFileFilterString filterString)
Set the filter string resolved to get this object |
void |
setIsContainer(boolean con)
|
void |
setIsHidden(boolean is)
Internal method called by the subsystem.
|
void |
setIsLocal(boolean isLocal)
Internal method called by the subsystem. |
void |
setLabel(String newLabel)
Set the in-memory label. |
void |
setLastModified(long lastModified)
Internal method called by the subsystem.
|
void |
setLength(long length)
Internal method called by the subsystem.
|
void |
setLocalAbsolutePath(String localAbsolutePath)
Internal method called by the subsystem. |
void |
setName(String newName)
Set the in-memory name. |
void |
setNameOnly(String newName)
Set the in-memory name with no consideration for path. |
void |
setParentRemoteFile(IRemoteFile parentFile)
|
void |
setProperties(String[] keys,
Object[] values)
Sets the values of the properties with the given keys. |
void |
setProperty(String key,
Object value)
Sets the value of the property with the given key. |
void |
setVirtualFile(boolean b)
|
void |
setVirtualFolder(boolean b)
|
boolean |
showBriefPropertySet()
Querying properties for the property sheet can be expensive on some operating systems.
|
boolean |
showReadOnlyProperty()
Returns true if the ReadOnly Property should be shown in the property page. |
String |
toString()
|
copyright
public static final String copyright
- See Also:
- Constant Field Values
ROOT_TRUE
public static final boolean ROOT_TRUE
- See Also:
- Constant Field Values
ROOT_FALSE
public static final boolean ROOT_FALSE
- See Also:
- Constant Field Values
DIRECTORY_TRUE
public static final boolean DIRECTORY_TRUE
- See Also:
- Constant Field Values
DIRECTORY_FALSE
public static final boolean DIRECTORY_FALSE
- See Also:
- Constant Field Values
BINARY_TRUE
public static final boolean BINARY_TRUE
- See Also:
- Constant Field Values
BINARY_FALSE
public static final boolean BINARY_FALSE
- See Also:
- Constant Field Values
context
protected IRemoteFileContext context
fullyQualifiedName
protected String fullyQualifiedName
nameOnly
protected String nameOnly
rootOnly
protected String rootOnly
pathOnly
protected String pathOnly
cacheAbsolutePath
protected String cacheAbsolutePath
classification
protected String classification
canonicalPath
protected String canonicalPath
label
protected String label
isRoot
protected boolean isRoot
isDirectory
protected boolean isDirectory
exists
protected boolean exists
isCached
protected boolean isCached
isHidden
protected boolean isHidden
canRead
protected boolean canRead
canWrite
protected boolean canWrite
debugMode
protected boolean debugMode
showReadOnly
protected boolean showReadOnly
lastModified
protected long lastModified
length
protected long length
remoteObj
protected Object remoteObj
parentFile
protected IRemoteFile parentFile
isContainer
protected boolean isContainer
isVirtualFolder
protected boolean isVirtualFolder
isVirtualFile
protected boolean isVirtualFile
containingArchiveFullName
protected String containingArchiveFullName
contents
protected HashMap contents
_isStale
protected boolean _isStale
properties
protected HashMap properties
propertyStates
protected HashMap propertyStates
RemoteFileImpl
public RemoteFileImpl(IRemoteFileContext context)
- Constructor that takes a context object containing important information.
- Parameters:
context
- An object holding contextual information about this object- See Also:
IRemoteFileContext
showBriefPropertySet
public boolean showBriefPropertySet()
- Querying properties for the property sheet can be expensive on some operating systems.
By default all properties are shown on the property sheet for this object, unless true
is returned from this query, in which only a couple properties are shown.
The default is false.
- Specified by:
showBriefPropertySet
in interface IRemoteFile
setAbsolutePath
public void setAbsolutePath(String fullyQualifiedName,
String rootPart,
boolean isRoot,
boolean isDirectory)
- One of four internal methods called by the subsystem factory methods, or by the
constructor. All four must be called to set this object's data.
Important assumption: this is ALWAYS called immediately after instantiating.
Important assumption: subsystem's getSeparator() returns correct value at this point.
- Specified by:
setAbsolutePath
in interface IRemoteFileMutable
- Parameters:
fullyQualifiedName
- the full name including root, path and file/folderrootPart
- the root part. Should match first xx chars of fullyQualifiedNameisRoot
- true if this is only a root folderisDirectory
- true if this is a directory or root versus a file- See Also:
setLength(long)
,
setLastModified(long)
,
setExists(boolean)
setExists
public void setExists(boolean exists)
- Internal method called by the subsystem.
- Specified by:
setExists
in interface IRemoteFileMutable
- See Also:
setLength(long)
,
setLastModified(long)
,
setAbsolutePath(String, String, boolean, boolean)
setLastModified
public void setLastModified(long lastModified)
- Internal method called by the subsystem.
- Specified by:
setLastModified
in interface IRemoteFileMutable
- See Also:
setLength(long)
,
setExists(boolean)
,
setAbsolutePath(String, String, boolean, boolean)
setLength
public void setLength(long length)
- Internal method called by the subsystem.
- Specified by:
setLength
in interface IRemoteFileMutable
- See Also:
setLastModified(long)
,
setExists(boolean)
,
setAbsolutePath(String, String, boolean, boolean)
setIsHidden
public void setIsHidden(boolean is)
- Internal method called by the subsystem.
- Specified by:
setIsHidden
in interface IRemoteFileMutable
- See Also:
setLastModified(long)
,
setExists(boolean)
,
setAbsolutePath(String, String, boolean, boolean)
,
setCanRead(boolean)
,
setCanWrite(boolean)
setCanRead
public void setCanRead(boolean can)
- Internal method called by the subsystem.
- Specified by:
setCanRead
in interface IRemoteFileMutable
- See Also:
setLastModified(long)
,
setExists(boolean)
,
setAbsolutePath(String, String, boolean, boolean)
,
setCanWrite(boolean)
,
setIsHidden(boolean)
setCanWrite
public void setCanWrite(boolean can)
- Internal method called by the subsystem.
- Specified by:
setCanWrite
in interface IRemoteFileMutable
- See Also:
setLastModified(long)
,
setExists(boolean)
,
setAbsolutePath(String, String, boolean, boolean)
,
setCanRead(boolean)
,
setIsHidden(boolean)
setFilterString
public void setFilterString(RemoteFileFilterString filterString)
- Set the filter string resolved to get this object
- Specified by:
setFilterString
in interface IRemoteFile
setName
public void setName(String newName)
- Set the in-memory name. This is not a rename action, but rather the
result of a successful rename action. Called by subsystem.
- Specified by:
setName
in interface IRemoteFileMutable
setLabel
public void setLabel(String newLabel)
- Description copied from interface:
IRemoteFileMutable
- Set the in-memory label.
- Specified by:
setLabel
in interface IRemoteFileMutable
setNameOnly
public void setNameOnly(String newName)
- Set the in-memory name with no consideration for path.
setClassification
public void setClassification(String classification)
getClassification
public String getClassification()
- Description copied from interface:
IRemoteFile
- Returns the classification of this file. If the file is
an executable, then "executable(...)" will be returned. If the
file is a symbolic link then it will appear as "link(....):resolvedPath".
The resolvedPath is the path that the link resolves to.
A symbolic link that resolves to an executable would appear as "link(executable(...)):resolvedPath".
By default this should just return "file".
- Specified by:
getClassification
in interface IRemoteFile
- Returns:
- the classification.
getContext
public IRemoteFileContext getContext()
- Return the context associated with this remote file
getParentRemoteFileSubSystem
public RemoteFileSubSystem getParentRemoteFileSubSystem()
- Return the parent subsystem
- Specified by:
getParentRemoteFileSubSystem
in interface IRemoteFile
getParentRemoteFileSubSystemFactory
public RemoteFileSubSystemFactory getParentRemoteFileSubSystemFactory()
- Return the parent subsystem factory
setParentRemoteFile
public void setParentRemoteFile(IRemoteFile parentFile)
getParentRemoteFile
public IRemoteFile getParentRemoteFile()
- Return the parent remote file object expanded to get this object, or null if no such parent
- Specified by:
getParentRemoteFile
in interface IRemoteFile
getFilterString
public RemoteFileFilterString getFilterString()
- Return the filter string resolved to get this object
- Specified by:
getFilterString
in interface IRemoteFile
getAllFilterStrings
public RemoteFileFilterString[] getAllFilterStrings()
- If this is a folder, it is possible that it is listed as part of a multiple filter string
filter. In this case, when the folder is expanded, we want to filter the file names to
show all the files that match any of the filter strings that have the same parent path.
This method supports that by returning all the filter strings in the filter which have the
same parent path as was used to produce this file.
- Specified by:
getAllFilterStrings
in interface IRemoteFile
getSeparatorChar
public char getSeparatorChar()
- Return the separator character for this file system: \ or /.
Queries it from the subsystem factory.
- Specified by:
getSeparatorChar
in interface IRemoteFile
getSeparator
public String getSeparator()
- Return the separator character for this file system, as a string: "\" or "/".
Queries it from the subsystem factory.
- Specified by:
getSeparator
in interface IRemoteFile
getLineSeparator
public String getLineSeparator()
- Return as a string the line separator character values
- Specified by:
getLineSeparator
in interface IRemoteFile
isUnix
public boolean isUnix()
- Return if this is a file on Unix, versus windows say
Queries it from the subsystem factory.
isLink
public boolean isLink()
- Description copied from interface:
IRemoteFile
- Returns whether the file is a symbolic link or not.
- Specified by:
isLink
in interface IRemoteFile
- Returns:
true
if the file is a symbolic link, false
otherwise.
isExecutable
public boolean isExecutable()
- Description copied from interface:
IRemoteFile
- Returns whether the file is executable or not.
- Specified by:
isExecutable
in interface IRemoteFile
- Returns:
true
if the file is executable, false
otherwise.
getCanonicalPath
public String getCanonicalPath()
- Description copied from interface:
IRemoteFile
- Returns the canonical path of the remote file.
- Specified by:
getCanonicalPath
in interface IRemoteFile
- Returns:
- the resolved path if the file is a symbolic link, or
- See Also:
IRemoteFile.getCanonicalPath()
isArchive
public boolean isArchive()
- Description copied from interface:
IRemoteFile
- Returns true if this represents an archive file, versues a non-archive file
- Specified by:
isArchive
in interface IRemoteFile
getSystemConnection
public SystemConnection getSystemConnection()
- Return the connection this remote file is from.
- Specified by:
getSystemConnection
in interface IRemoteFile
getAbsolutePath
public String getAbsolutePath()
- Description copied from interface:
IRemoteFile
- Get fully qualified name: root plus path plus name. No connection name.
- Specified by:
getAbsolutePath
in interface IRemoteFile
- See Also:
IRemoteFile.getAbsolutePath()
getAbsolutePathPlusConnection
public String getAbsolutePathPlusConnection()
- Get fully qualified connection and file name: connection:\path\file
Note the separator character between the profile name and the connection name is always '.'
Note the separator character between the connection and qualified-file is always ':'
- Specified by:
getAbsolutePathPlusConnection
in interface IRemoteFile
getLabel
public String getLabel()
- Description copied from interface:
IRemoteFile
- Get the display name for this file. By default, this should be the same as the name
If this object represents only a root drive, this is the same as getRoot().
- Specified by:
getLabel
in interface IRemoteFile
- See Also:
IRemoteFile.getLabel()
getName
public String getName()
- Description copied from interface:
IRemoteFile
- Get unqualified file name. No root and no path.
If this object represents only a root drive, this is the same as getRoot().
- Specified by:
getName
in interface IRemoteFile
- See Also:
IRemoteFile.getName()
getParent
public String getParent()
- Description copied from interface:
IRemoteFile
- Get fully qualified path and name of folder containing this file or folder.
Returns the root and path. No file name, and no ending separator.
If this object represent only a root drive, this returns null;
Example: c:\folder1\folder2\file1.ext
results in c:\folder1\folder2
- Specified by:
getParent
in interface IRemoteFile
- See Also:
IRemoteFile.getParent()
getParentNoRoot
public String getParentNoRoot()
- Description copied from interface:
IRemoteFile
- Get fully qualified path and name of folder containing this file or folder, minus the root.
Returns the path. No root prefix. No file name, and no ending separator.
If this object represent only a root drive, this returns null;
Example: c:\folder1\folder2\file1.ext
results in folder1\folder2
- Specified by:
getParentNoRoot
in interface IRemoteFile
- See Also:
IRemoteFile.getParentNoRoot()
getRoot
public String getRoot()
- Description copied from interface:
IRemoteFile
- Get the root part of the name.
- Example:
c:\folder1\folder2\file1.ext
results in c:\
- Example:
/folder1/folder2/file1.ext
results in /
- Specified by:
getRoot
in interface IRemoteFile
- See Also:
IRemoteFile.getRoot()
getParentName
public String getParentName()
- Description copied from interface:
IRemoteFile
- Get the unqualified name of the parent directory containing this file or folder.
Compare this to getParent() that returns the fully qualified parent directory.
If this object represents only a root drive, this returns null.
Example: c:\folder1\folder2\file1.ext
results in folder2
- Specified by:
getParentName
in interface IRemoteFile
- See Also:
IRemoteFile.getParentName()
isRoot
public boolean isRoot()
- Description copied from interface:
IRemoteFile
- Returns true if this represents a root folder (eg: c:\\ or /).
- Specified by:
isRoot
in interface IRemoteFile
- See Also:
IRemoteFile.isRoot()
isDirectory
public boolean isDirectory()
- Description copied from interface:
IRemoteFile
- Returns true if this represents a folder (eg: c:\\folder)
- Specified by:
isDirectory
in interface IRemoteFile
- See Also:
IRemoteFile.isDirectory()
isFile
public boolean isFile()
- Description copied from interface:
IRemoteFile
- Returns true if this represents a file, versus a root or folder
- Specified by:
isFile
in interface IRemoteFile
- See Also:
IRemoteFile.isFile()
isBinary
public boolean isBinary()
- Description copied from interface:
IRemoteFile
- Returns true if this is a binary file
- Specified by:
isBinary
in interface IRemoteFile
- See Also:
IRemoteFile.isBinary()
isText
public boolean isText()
- Description copied from interface:
IRemoteFile
- Returns true if this is a text file
- Specified by:
isText
in interface IRemoteFile
- See Also:
IRemoteFile.isText()
isHidden
public boolean isHidden()
- Returns true if this is a hidden file.
- Specified by:
isHidden
in interface IRemoteFile
canRead
public boolean canRead()
- Returns true if the application can read this file.
- Specified by:
canRead
in interface IRemoteFile
canWrite
public boolean canWrite()
- Returns true if the application can write to this file.
- Specified by:
canWrite
in interface IRemoteFile
exists
public boolean exists()
- Description copied from interface:
IRemoteFile
- Returns true if this folder or file actually exists.
- Specified by:
exists
in interface IRemoteFile
- See Also:
IRemoteFile.exists()
getLastModified
public long getLastModified()
- Description copied from interface:
IRemoteFile
- Returns the time (in milliseconds since epoch) this file was last modified.
- Specified by:
getLastModified
in interface IRemoteFile
- See Also:
IRemoteFile.getLastModified()
getLastModifiedDate
public Date getLastModifiedDate()
- Description copied from interface:
IRemoteFile
- Return the last modified time as a Date object.
- Specified by:
getLastModifiedDate
in interface IRemoteFile
- See Also:
IRemoteFile.getLastModifiedDate()
getLength
public long getLength()
- Description copied from interface:
IRemoteFile
- Returns the length, in bytes, of this file.
- Specified by:
getLength
in interface IRemoteFile
- See Also:
IRemoteFile.getLength()
getExtension
public String getExtension()
- Return the extension part of a file name.
Eg, for abc.java, return "java"
- Specified by:
getExtension
in interface IRemoteFile
setIsLocal
public void setIsLocal(boolean isLocal)
- Internal method called by the subsystem.
- Specified by:
setIsLocal
in interface IRemoteFileMutable
setLocalAbsolutePath
public void setLocalAbsolutePath(String localAbsolutePath)
- Internal method called by the subsystem.
- Specified by:
setLocalAbsolutePath
in interface IRemoteFileMutable
isLocal
public boolean isLocal()
- See Also:
setIsLocal(boolean)
getLocalAbsolutePath
public String getLocalAbsolutePath()
- See Also:
IRemoteFile.getAbsolutePath()
getCachedCopy
public IFile getCachedCopy()
throws SystemMessageException
- Return the cached copy of this remote file. The returned IFile must be used for read-only
purposes since no locks are acquired on the remote file.
- Returns:
- IFile The cached copy of this file if it exists AND it is upto date. null is returned if a local
cached copy of this file is not available or the local cached copy is not upto date (last modified
timestamp comparison.)
- Throws:
SystemMessageException
toString
public String toString()
getAdapter
public Object getAdapter(Class adapterType)
- This is the method required by the IAdaptable interface.
Given an adapter class type, return an object castable to the type, or
null if this is not possible.
By default this returns Platform.getAdapterManager().getAdapter(this, adapterType);
This in turn results in the default subsystem adapter SystemViewSubSystemAdapter,
in package com.ibm.etools.systems.core.ui.view.
- Specified by:
getAdapter
in interface IAdaptable
compareTo
public int compareTo(Object other)
throws ClassCastException
- Compare one remote file to another. This enables us to sort the files so they
are shown folders-first, and in alphabetical order.
- Specified by:
compareTo
in interface IRemoteFile
- Throws:
ClassCastException
getFileWrapper
public File getFileWrapper()
- Return an object extending java.io.File and proxing this file.
The resulting File object only supports the non-streaming, non
static methods.
- Specified by:
getFileWrapper
in interface IRemoteFile
setFile
public void setFile(Object obj)
- Description copied from interface:
IRemoteFileMutable
- Internal method called by the subsystem.
- Specified by:
setFile
in interface IRemoteFileMutable
getFile
public Object getFile()
- Description copied from interface:
IRemoteFile
- Get the object.
- Specified by:
getFile
in interface IRemoteFile
showReadOnlyProperty
public boolean showReadOnlyProperty()
- Description copied from interface:
IRemoteFile
- Returns true if the ReadOnly Property should be shown in the property page.
- Specified by:
showReadOnlyProperty
in interface IRemoteFile
isVirtualFolder
public boolean isVirtualFolder()
setVirtualFolder
public void setVirtualFolder(boolean b)
isVirtual
public boolean isVirtual()
- Description copied from interface:
IRemoteFile
- Returns true if this is a virtual file.
- Specified by:
isVirtual
in interface IRemoteFile
isVirtualFile
public boolean isVirtualFile()
setVirtualFile
public void setVirtualFile(boolean b)
getContainingArchiveFullName
public String getContainingArchiveFullName()
setContainingArchiveFullName
public void setContainingArchiveFullName(String string)
isAncestorOf
public boolean isAncestorOf(IRemoteFile file)
- Description copied from interface:
IRemoteFile
- Note: if this remoteFile is the same as the file passed
as parameter, then this method returns true.
- Specified by:
isAncestorOf
in interface IRemoteFile
isDescendantOf
public boolean isDescendantOf(IRemoteFile file)
- Description copied from interface:
IRemoteFile
- Note: if this remoteFile is the same as the file passed
as parameter, then this method returns true.
- Specified by:
isDescendantOf
in interface IRemoteFile
getComment
public String getComment()
- Specified by:
getComment
in interface IRemoteFile
- Returns:
- Any comments stored with the file in the file system or archive.
getCompressedSize
public long getCompressedSize()
- Specified by:
getCompressedSize
in interface IRemoteFile
- Returns:
- if this IRemoteFile is a virtual file, returns the amount of actual
space in the archive the file takes up after compression. If not a virtual file,
returns the size of the IRemoteFile.
getCompressionMethod
public String getCompressionMethod()
- Specified by:
getCompressionMethod
in interface IRemoteFile
- Returns:
- If this IRemoteFile is a virtual file, returns the method used to compress
the file, otherwise, returns "".
getCompressionRatio
public double getCompressionRatio()
- Specified by:
getCompressionRatio
in interface IRemoteFile
- Returns:
- If this IRemoteFile is a virtual file, returns the actual minus compressed size divided
by the actual size of this virtual file otherwise, returns 0.0.
getExpandedSize
public long getExpandedSize()
- Specified by:
getExpandedSize
in interface IRemoteFile
- Returns:
- if this IRemoteFile is an archive, returns the sum of the actual
size of all files within the archive (after expansion). If not an archive,
returns the size of the IRemoteFile.
hasContents
public boolean hasContents(ISystemContentsType contentsType)
- Description copied from interface:
ISystemContainer
- Returns whether the object has contents of a particular type.
- Specified by:
hasContents
in interface ISystemContainer
- Parameters:
contentsType
- type of contents
- Returns:
true
if the object has contents, false
otherwise.- See Also:
com.ibm.etools.systems.subsystems.IRemoteContainer#hasContents(java.lang.String)
hasContents
public boolean hasContents(ISystemContentsType contentsType,
String filter)
- Description copied from interface:
IRemoteContainer
- Returns whether the object has contents of a particular type associated with the specified filter string.
- Specified by:
hasContents
in interface IRemoteContainer
- Parameters:
contentsType
- type of contentsfilter
- criteria for contained contents
- Returns:
true
if the object has contents, false
otherwise.- See Also:
com.ibm.etools.systems.subsystems.IRemoteContainer#hasContents(java.lang.String, java.lang.String)
containsFilterKey
protected boolean containsFilterKey(HashMap filters,
String filter)
getContents
public Object[] getContents(ISystemContentsType contentsType)
- Description copied from interface:
ISystemContainer
- Returns all the contents of the object (combining results of all filters
- Specified by:
getContents
in interface ISystemContainer
- Parameters:
contentsType
- type of contents
- Returns:
- an array of contents.
- See Also:
com.ibm.etools.systems.subsystems.IRemoteContainer#getContents(java.lang.String)
getContents
public Object[] getContents(ISystemContentsType contentsType,
String filter)
- Description copied from interface:
IRemoteContainer
- Returns the contents of the object.
- Specified by:
getContents
in interface IRemoteContainer
- Parameters:
contentsType
- type of contentsfilter
- criteria for contained contents.
- Returns:
- an array of contents.
- See Also:
com.ibm.etools.systems.subsystems.IRemoteContainer#getContents(java.lang.String, java.lang.String)
setIsContainer
public void setIsContainer(boolean con)
replaceContent
public void replaceContent(Object oldObject,
Object newObject)
- Specified by:
replaceContent
in interface IRemoteContainer
setContents
public void setContents(ISystemContentsType contentsType,
String filter,
Object[] con)
- Description copied from interface:
IRemoteContainer
- Sets the contents of this object that match a particular filter
- Specified by:
setContents
in interface IRemoteContainer
- Parameters:
contentsType
- type of contentsfilter
- matching criteria for the contained objectscon
- the contained objects that match the filter- See Also:
com.ibm.etools.systems.subsystems.IRemoteContainer#setContents(java.lang.String, java.lang.String, java.lang.Object[])
isStale
public boolean isStale()
- Description copied from interface:
ISystemContainer
- Indicates whether the cached object is stale
- Specified by:
isStale
in interface ISystemContainer
- Returns:
- whether the container is stale
- See Also:
ISystemContainer.isStale()
markStale
public void markStale(boolean isStale)
- Description copied from interface:
ISystemContainer
- Marks the object as stale or not
- Specified by:
markStale
in interface ISystemContainer
- Parameters:
isStale
- whether the object is to be marked stale or not- See Also:
ISystemContainer.markStale(boolean)
clearCache
public void clearCache()
copyContentsTo
public void copyContentsTo(IRemoteContainer target)
- Description copied from interface:
IRemoteContainer
- Copies the persistable contents from this one to another one
- Specified by:
copyContentsTo
in interface IRemoteContainer
- Parameters:
target
- the container to copy contents to
getProperties
public Object[] getProperties(String[] keys)
- Description copied from interface:
IRemotePropertyHolder
- Returns the value of the properties with the given keys.
- Specified by:
getProperties
in interface IRemotePropertyHolder
- Parameters:
keys
- the property keys.
- Returns:
- the correspoding values of the properties.
- See Also:
IRemotePropertyHolder.getProperties(java.lang.String[])
getProperty
public Object getProperty(String key)
- Description copied from interface:
IRemotePropertyHolder
- Returns the value of the property with the given key.
- Specified by:
getProperty
in interface IRemotePropertyHolder
- Parameters:
key
- the property key.
- Returns:
- the value of the property.
- See Also:
IRemotePropertyHolder.getProperty(java.lang.String)
isPropertyStale
public boolean isPropertyStale(String key)
- Description copied from interface:
IRemotePropertyHolder
- Returns whether the property with the given key is stale.
- Specified by:
isPropertyStale
in interface IRemotePropertyHolder
- Parameters:
key
- the property key.
- Returns:
true
if the property is stale, false
otherwise.- See Also:
IRemotePropertyHolder.isPropertyStale(java.lang.String)
markAllPropertiesStale
public void markAllPropertiesStale()
- Description copied from interface:
IRemotePropertyHolder
- Marks all properties as stale.
- Specified by:
markAllPropertiesStale
in interface IRemotePropertyHolder
- See Also:
IRemotePropertyHolder.markAllPropertiesStale()
markPropertyStale
public void markPropertyStale(String key)
- Description copied from interface:
IRemotePropertyHolder
- Marks the property with the given key as stale.
- Specified by:
markPropertyStale
in interface IRemotePropertyHolder
- Parameters:
key
- the property key.- See Also:
IRemotePropertyHolder.markPropertyStale(java.lang.String)
setProperties
public void setProperties(String[] keys,
Object[] values)
- Description copied from interface:
IRemotePropertyHolder
- Sets the values of the properties with the given keys.
- Specified by:
setProperties
in interface IRemotePropertyHolder
- Parameters:
keys
- the property keys.values
- the corresponding values of the properties.- See Also:
IRemotePropertyHolder.setProperties(java.lang.String[], java.lang.Object[])
setProperty
public void setProperty(String key,
Object value)
- Description copied from interface:
IRemotePropertyHolder
- Sets the value of the property with the given key.
- Specified by:
setProperty
in interface IRemotePropertyHolder
- Parameters:
key
- the property key.value
- the value of the property.- See Also:
IRemotePropertyHolder.setProperty(java.lang.String, java.lang.Object)
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.