|
|
|
|
org.eclipse.rse.files.ui.resources
Interface ISystemRemoteResource
-
All Known Subinterfaces:
-
ISystemRemoteEditResource
-
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
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. |
createMarker
ISystemRemoteMarker createMarker(
String type)
- Creates and returns the marker of the specified type on this resource.
-
-
Parameters:
-
type - the marker type
-
Returns:
- the created marker
deleteMarkers
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.
-
-
Parameters:
-
type - the marker type, or null to indicate all types. -
includeSubtypes - whether or not to consider the subtypes of the given type
findMarker
ISystemRemoteMarker findMarker(long id)
- Returns the marker with the specified id on this resource, or null if there
is no such marker.
-
-
Parameters:
-
id - the id of the marker to find
-
Returns:
- a marker if found, or
null
findMarkers
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.
-
-
Parameters:
-
type - the marker type, or null to indicate all types. -
includeSubtypes - whether or not to consider the subtypes of the given type
-
Returns:
- an array of markers, or an empty array if no markers are found
getMarker
ISystemRemoteMarker getMarker(long id)
- Gets the marker with the given id. The marker is not guaranteed to exist.
-
-
Parameters:
-
id - the marker id.
setSessionProperty
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
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
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
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
boolean exists()
- Returns whether this resource exists on the remote server.
-
-
Returns:
-
true if the resource exists, false otherwise
isExistsLocally
boolean isExistsLocally()
- Returns whether a local copy of the file exists.
-
getRemoteLastModifiedTime
boolean getRemoteLastModifiedTime()
- Returns the last modified time on the server.
-
-
Returns:
- the last modified time on the server
getLocalLastModifiedTime
boolean getLocalLastModifiedTime()
- Returns the last modified time on the client.
-
-
Returns:
- the last modified time on the client.
isSynchronized
boolean isSynchronized()
- Returns whether the local copy, if there is one, is in sync with the
remote copy.
-
-
Returns:
- true if the local copy is in sync, false otherwise, or if the
local copy does not exist.
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|