Remote Systems
v6.4.1

com.ibm.etools.systems.core.resources
Class SystemRemoteResource

java.lang.Object
  extended bycom.ibm.etools.systems.core.resources.SystemRemoteResource
All Implemented Interfaces:
ISystemRemoteResource

public class SystemRemoteResource
extends Object
implements ISystemRemoteResource

This class is the internal implementation of the ISystemRemoteResource interface.


Field Summary
static String Copyright
           
protected  ISystemRemotePath path
           
 
Constructor Summary
SystemRemoteResource(ISystemRemotePath path)
          Constructor for SystemRemoteResource.
 
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.
 boolean existsLocally()
           
 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.
 File getLocalCopy()
           
 boolean getLocalLastModifiedTime()
          Returns the last modified time on the client.
 ISystemRemotePath getLocation()
           
 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.
 SystemRemoteResourceInfo getResourceInfo()
          Get the resource info.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

path

protected ISystemRemotePath path
Constructor Detail

SystemRemoteResource

public SystemRemoteResource(ISystemRemotePath path)
Constructor for SystemRemoteResource.

Method Detail

getResourceInfo

public SystemRemoteResourceInfo getResourceInfo()
Get the resource info.

Returns:
the resource info for the resource

createMarker

public ISystemRemoteMarker createMarker(String type)
Description copied from interface: ISystemRemoteResource
Creates and returns the marker of the specified type on this resource.

Specified by:
createMarker in interface ISystemRemoteResource
Returns:
the created marker
See Also:
ISystemRemoteResource.createMarker(String)

deleteMarkers

public void deleteMarkers(String type,
                          boolean includeSubtypes)
Description copied from interface: ISystemRemoteResource
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.

Specified by:
deleteMarkers in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.deleteMarkers(String, boolean)

findMarker

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

Specified by:
findMarker in interface ISystemRemoteResource
Returns:
a marker if found, or null
See Also:
ISystemRemoteResource.findMarker(long)

findMarkers

public ISystemRemoteMarker[] findMarkers(String type,
                                         boolean includeSubtypes)
Description copied from interface: ISystemRemoteResource
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.

Specified by:
findMarkers in interface ISystemRemoteResource
Returns:
an array of markers, or an empty array if no markers are found
See Also:
ISystemRemoteResource.findMarkers(String, boolean)

getMarker

public ISystemRemoteMarker getMarker(long id)
Description copied from interface: ISystemRemoteResource
Gets the marker with the given id. The marker is not guaranteed to exist.

Specified by:
getMarker in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.getMarker(long)

exists

public boolean exists()
Description copied from interface: ISystemRemoteResource
Returns whether this resource exists on the remote server.

Specified by:
exists in interface ISystemRemoteResource
Returns:
true if the resource exists, false otherwise
See Also:
ISystemRemoteResource.exists()

getLocation

public ISystemRemotePath getLocation()

existsLocally

public boolean existsLocally()

getLocalCopy

public File getLocalCopy()

getPersistentProperty

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

Specified by:
getPersistentProperty in interface ISystemRemoteResource
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:
ISystemRemoteResource.getPersistentProperty(QualifiedName)

getSessionProperty

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

Specified by:
getSessionProperty in interface ISystemRemoteResource
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:
ISystemRemoteResource.getSessionProperty(QualifiedName)

setPersistentProperty

public void setPersistentProperty(QualifiedName key,
                                  String value)
Description copied from interface: ISystemRemoteResource
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").

Specified by:
setPersistentProperty in interface ISystemRemoteResource
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:
ISystemRemoteResource.setPersistentProperty(QualifiedName, String)

setSessionProperty

public void setSessionProperty(QualifiedName key,
                               Object value)
Description copied from interface: ISystemRemoteResource
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").

Specified by:
setSessionProperty in interface ISystemRemoteResource
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:
ISystemRemoteResource.setSessionProperty(QualifiedName, Object)

getLocalLastModifiedTime

public boolean getLocalLastModifiedTime()
Description copied from interface: ISystemRemoteResource
Returns the last modified time on the client.

Specified by:
getLocalLastModifiedTime in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.getLocalLastModifiedTime()

getRemoteLastModifiedTime

public boolean getRemoteLastModifiedTime()
Description copied from interface: ISystemRemoteResource
Returns the last modified time on the server.

Specified by:
getRemoteLastModifiedTime in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.getRemoteLastModifiedTime()

isExistsLocally

public boolean isExistsLocally()
Description copied from interface: ISystemRemoteResource
Returns whether a local copy of the file exists.

Specified by:
isExistsLocally in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.isExistsLocally()

isSynchronized

public boolean isSynchronized()
Description copied from interface: ISystemRemoteResource
Returns whether the local copy, if there is one, is in sync with the remote copy.

Specified by:
isSynchronized in interface ISystemRemoteResource
See Also:
ISystemRemoteResource.isSynchronized()

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.