g-Eclipse
Release 1.0.0

eu.geclipse.core.model
Interface IGridConnectionElement

All Superinterfaces:
IGridContainer, IGridElement, IMountable
All Known Subinterfaces:
IGridConnection

public interface IGridConnectionElement
extends IGridContainer, IMountable

Base interface for elements of a file system mount.


Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.geclipse.core.model.IMountable
IMountable.MountPoint, IMountable.MountPointID
 
Method Summary
 boolean canAdaptToElement(java.lang.Class<? extends IGridElement> type)
          Determine if an adapter exists for adapting this connection element to an element of the specified type.
 IFileStore getCachedConnectionFileStore(IProgressMonitor monitor)
          Get a cached version of the IFileStore object corresponding to this connection.
 IFileInfo getConnectionFileInfo()
          Get the IFileInfo object corresponding to this connection.
 IFileStore getConnectionFileStore()
          Get the IFileStore object corresponding to this connection.
 IGridElement getElementAdapter(java.lang.Class<? extends IGridElement> type)
          Adapt this connection element to an element of the specified type if a corresponding adapter is available.
 java.lang.String getError()
          Get an error message that describes an error that occurred during the last operation.
 java.net.URI getURI()
          Get the URI corresponding to the connection.
 boolean isFolder()
          Determine if this grid mount object specifies a folder.
 boolean isValid()
          Determine if this mount is valid.
 void releaseCachedConnectionFileStore(IFileStore fileStore)
          Releases a cached file store that was formerly retrieved with getCachedConnectionFileStore(IProgressMonitor).
 
Methods inherited from interface eu.geclipse.core.model.IGridContainer
canContain, contains, create, delete, deleteAll, findChild, findChildWithResource, getChildCount, getChildren, hasChildren, isDirty, isLazy, refresh, setDirty
 
Methods inherited from interface eu.geclipse.core.model.IGridElement
dispose, getFileStore, getName, getParent, getPath, getProject, getResource, isHidden, isLocal, isVirtual
 
Methods inherited from interface eu.geclipse.core.model.IMountable
getMountPoint, getMountPointIDs
 
Methods inherited from interface eu.geclipse.core.model.IGridElement
dispose, getFileStore, getName, getParent, getPath, getProject, getResource, isHidden, isLocal, isVirtual
 

Method Detail

canAdaptToElement

boolean canAdaptToElement(java.lang.Class<? extends IGridElement> type)
Determine if an adapter exists for adapting this connection element to an element of the specified type.

Parameters:
type - The type of the target element.
Returns:
true if an adapter could be found.

getElementAdapter

IGridElement getElementAdapter(java.lang.Class<? extends IGridElement> type)
Adapt this connection element to an element of the specified type if a corresponding adapter is available.

Parameters:
type - The type of the target element.
Returns:
The target element or null if no adapter could be found.

getCachedConnectionFileStore

IFileStore getCachedConnectionFileStore(IProgressMonitor monitor)
                                        throws CoreException
Get a cached version of the IFileStore object corresponding to this connection. Cached means that this method opens the input stream of the file store and caches its content for later use. Cached file stores have to be release with releaseCachedConnectionFileStore(IFileStore) when they are not needed any more. It is not recommended to cache very large files since the caching is done in memory and this may lead to OutOfMemoryErrors or similar behaviour.

Parameters:
monitor - Am IProgressMonitor used to monitor the caching procedure.
Returns:
The file store with a cached input stream.
Throws:
CoreException - If either opening the stream or caching the input fails for any reason.
See Also:
releaseCachedConnectionFileStore(IFileStore)

getConnectionFileStore

IFileStore getConnectionFileStore()
                                  throws CoreException
Get the IFileStore object corresponding to this connection.

Returns:
The file store of this connection.
Throws:
CoreException - If a problem occurs when creating the file store.

getConnectionFileInfo

IFileInfo getConnectionFileInfo()
                                throws CoreException
Get the IFileInfo object corresponding to this connection. May be null.

Returns:
The file info or null.
Throws:
CoreException - If a problem occurs when creating the file info.

getError

java.lang.String getError()
Get an error message that describes an error that occurred during the last operation. This functionality is not yet fully defined.

Returns:
An error string.

getURI

java.net.URI getURI()
Get the URI corresponding to the connection.

Returns:
The connection URI.

isFolder

boolean isFolder()
Determine if this grid mount object specifies a folder. If it is not a folder it has to be a file.

Returns:
True if this is a folder.

isValid

boolean isValid()
Determine if this mount is valid. There are several reasons why a grid mount may be invalid. For instance it could request a file system that is currently not available.

Returns:
True if this mount is valid and can be browsed.

releaseCachedConnectionFileStore

void releaseCachedConnectionFileStore(IFileStore fileStore)
Releases a cached file store that was formerly retrieved with getCachedConnectionFileStore(IProgressMonitor). This method frees all system resources used for caching. This method has to be called for every file store retrieved with getCachedConnectionFileStore(IProgressMonitor) if they are not used any more. Otherwise the system may run out of resources.

Parameters:
fileStore - The cached file store to be released. If this file store is not a cached one nothing is done.

g-Eclipse
Release 1.0.0