Remote Systems
v6.4.1

com.ibm.etools.systems.core.resources
Interface ISystemRemoteResource

All Known Subinterfaces:
ISystemRemoteEditResource
All Known Implementing Classes:
SystemRemoteResource

public interface ISystemRemoteResource

This interface defines some common functionality required from all remote resources, irrespective of whether the remote system is an OS/400, Windows, Linux or Unix operating system. In particular, it allows users to create markers on remote resources, and to create both session and persistent properties for them. A session property is one that is stored only during the current workbench session, while a persistent property is one that is kept between sessions. Clients must not implement this interface.

See Also:
IRemoteFile

Field Summary
static String Copyright
           
 
Method Summary
 ISystemRemoteMarker createMarker(String type)
          Creates and returns the marker of the specified type on this resource.
 void deleteMarkers(String type, boolean includeSubtypes)
          Deletes all markers on this resource of the given type, and optionally deletes such markers from its children.
 boolean exists()
          Returns whether this resource exists on the remote server.
 ISystemRemoteMarker findMarker(long id)
          Returns the marker with the specified id on this resource, or null if there is no such marker.
 ISystemRemoteMarker[] findMarkers(String type, boolean includeSubtypes)
          Returns all markers of the specified type on this resource, and optionally, on its children.
 boolean getLocalLastModifiedTime()
          Returns the last modified time on the client.
 ISystemRemoteMarker getMarker(long id)
          Gets the marker with the given id.
 String getPersistentProperty(QualifiedName key)
          Returns the value of the persistent property of this resource identified by the given key, or null if this resource has no such property.
 boolean getRemoteLastModifiedTime()
          Returns the last modified time on the server.
 Object getSessionProperty(QualifiedName key)
          Returns the value of the session property of this resource identified by the given key, or null if this resource has no such property.
 boolean isExistsLocally()
          Returns whether a local copy of the file exists.
 boolean isSynchronized()
          Returns whether the local copy, if there is one, is in sync with the remote copy.
 void setPersistentProperty(QualifiedName key, String value)
          Sets the value of the persistent property of this resource identified by the given key.
 void setSessionProperty(QualifiedName key, Object value)
          Sets the value of the session property of this resource identified by the given key.
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Method Detail

createMarker

public ISystemRemoteMarker createMarker(String type)
Creates and returns the marker of the specified type on this resource.

Returns:
the created marker

deleteMarkers

public void deleteMarkers(String type,
                          boolean includeSubtypes)
Deletes all markers on this resource of the given type, and optionally deletes such markers from its children. Deletion of markers with subtypes is also possible.


findMarker

public ISystemRemoteMarker findMarker(long id)
Returns the marker with the specified id on this resource, or null if there is no such marker.

Returns:
a marker if found, or null

findMarkers

public ISystemRemoteMarker[] findMarkers(String type,
                                         boolean includeSubtypes)
Returns all markers of the specified type on this resource, and optionally, on its children. Markers with subtypes of the given type can also be found optionally. Returns an empty array if there are no matching markers.

Returns:
an array of markers, or an empty array if no markers are found

getMarker

public ISystemRemoteMarker getMarker(long id)
Gets the marker with the given id. The marker is not guaranteed to exist.


setSessionProperty

public void setSessionProperty(QualifiedName key,
                               Object value)
Sets the value of the session property of this resource identified by the given key. If the supplied value is null, the session property is removed from this resource.

Sessions properties are intended to be used as a caching mechanism by ISV plug-ins. They allow key-object associations to be stored with existing resources in the workspace. These key-value associations are maintained in memory (at all times), and the information is lost when a resource is deleted from the workspace, when the parent project is closed, or when the workspace is closed.

The qualifier part of the property name must be the unique identifier of the declaring plug-in (e.g. "com.example.plugin").

Parameters:
key - the qualified name of the property
value - the value of the session property, or null if the property is to be removed
See Also:
getSessionProperty(org.eclipse.core.runtime.QualifiedName)

getSessionProperty

public Object getSessionProperty(QualifiedName key)
Returns the value of the session property of this resource identified by the given key, or null if this resource has no such property.

Parameters:
key - the qualified name of the property
Returns:
the string value of the session property, or null if this resource has no such property
See Also:
setSessionProperty(org.eclipse.core.runtime.QualifiedName, java.lang.Object)

setPersistentProperty

public void setPersistentProperty(QualifiedName key,
                                  String value)
Sets the value of the persistent property of this resource identified by the given key. If the supplied value is null, the persistent property is removed from this resource. The change is made immediately on disk.

Persistent properties are intended to be used by plug-ins to store resource-specific information that should be persisted across platform sessions. The value of a persistent property is a string which should be short (i.e., under 2KB). Unlike session properties, persistent properties are stored on disk and maintained across workspace shutdown and restart.

The qualifier part of the property name must be the unique identifier of the declaring plug-in (e.g. "com.example.plugin").

Parameters:
key - the qualified name of the property
value - the string value of the property, or null if the property is to be removed
See Also:
getPersistentProperty(org.eclipse.core.runtime.QualifiedName)

getPersistentProperty

public String getPersistentProperty(QualifiedName key)
Returns the value of the persistent property of this resource identified by the given key, or null if this resource has no such property.

Parameters:
key - the qualified name of the property
Returns:
the string value of the property, or null if this resource has no such property
See Also:
setPersistentProperty(org.eclipse.core.runtime.QualifiedName, java.lang.String)

exists

public boolean exists()
Returns whether this resource exists on the remote server.

Returns:
true if the resource exists, false otherwise

isExistsLocally

public boolean isExistsLocally()
Returns whether a local copy of the file exists.


getRemoteLastModifiedTime

public boolean getRemoteLastModifiedTime()
Returns the last modified time on the server.


getLocalLastModifiedTime

public boolean getLocalLastModifiedTime()
Returns the last modified time on the client.


isSynchronized

public boolean isSynchronized()
Returns whether the local copy, if there is one, is in sync with the remote copy.


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.